netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuval Mintz <Yuval.Mintz@cavium.com>
To: <netdev@vger.kernel.org>, <davem@davemloft.net>
Cc: Tomer Tayar <Tomer.Tayar@cavium.com>,
	Yuval Mintz <Yuval.Mintz@cavium.com>
Subject: [PATCH net-next 04/11] qed: Log incorrectly installed board
Date: Mon, 22 May 2017 14:32:04 +0300	[thread overview]
Message-ID: <1495452731-27171-5-git-send-email-Yuval.Mintz@cavium.com> (raw)
In-Reply-To: <1495452731-27171-1-git-send-email-Yuval.Mintz@cavium.com>

From: Tomer Tayar <Tomer.Tayar@cavium.com>

In case nvram layout of board is incorrect, board may exhibit peculiar
oddities. Log such a rare event.

Signed-off-by: Tomer Tayar <Tomer.Tayar@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 +++++
 drivers/net/ethernet/qlogic/qed/qed_hsi.h | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 9dd28ba..b01df24 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -1698,6 +1698,11 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
 			return mfw_rc;
 		}
 
+		/* Check if there is a DID mismatch between nvm-cfg/efuse */
+		if (param & FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR)
+			DP_NOTICE(p_hwfn,
+				  "warning: device configuration is not supported on this board type. The device may not function as expected.\n");
+
 		/* send DCBX attention request command */
 		DP_VERBOSE(p_hwfn,
 			   QED_MSG_DCB,
diff --git a/drivers/net/ethernet/qlogic/qed/qed_hsi.h b/drivers/net/ethernet/qlogic/qed/qed_hsi.h
index eedf79a..4755d0b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_hsi.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_hsi.h
@@ -11655,6 +11655,8 @@ struct public_drv_mb {
 #define FW_MB_PARAM_GET_PF_RDMA_IWARP		0x2
 #define FW_MB_PARAM_GET_PF_RDMA_BOTH		0x3
 
+#define FW_MB_PARAM_LOAD_DONE_DID_EFUSE_ERROR	(1 << 0)
+
 	u32 drv_pulse_mb;
 #define DRV_PULSE_SEQ_MASK			0x00007fff
 #define DRV_PULSE_SYSTEM_TIME_MASK		0xffff0000
-- 
1.9.3

  parent reply	other threads:[~2017-05-22 11:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 11:32 [PATCH net-next 00/11] qed/qede: Mostly-cleanup series Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 01/11] qede: Fix sparse warnings Yuval Mintz
2017-05-22 16:38   ` David Miller
2017-05-22 16:48     ` Mintz, Yuval
2017-05-22 16:54       ` David Miller
2017-05-22 17:44         ` Mintz, Yuval
2017-05-22 18:29           ` David Miller
2017-05-22 11:32 ` [PATCH net-next 02/11] qed: Align DP_ERR style with other DP macros Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 03/11] qed: !main_ptt for tunnel configuration Yuval Mintz
2017-05-22 11:32 ` Yuval Mintz [this message]
2017-05-22 11:32 ` [PATCH net-next 05/11] qed: Drop the 's' from num_ports_in_engines Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 06/11] qed: Remove BB_A0 references Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 07/11] qed: Flush slowpath tasklet on stop Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 08/11] qed: Enable RoCE parser searching on fp init Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 09/11] qed: Provide MBI information in dev_info Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 10/11] qede: Log probe of PCI device Yuval Mintz
2017-05-22 11:32 ` [PATCH net-next 11/11] qed: Replace set_id() api with set_name() Yuval Mintz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495452731-27171-5-git-send-email-Yuval.Mintz@cavium.com \
    --to=yuval.mintz@cavium.com \
    --cc=Tomer.Tayar@cavium.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).