netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang.
@ 2012-02-03 23:45 Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 2/4] qlcnic: report valid speed and duplex status when link is down Sony Chacko
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sony Chacko @ 2012-02-03 23:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Sritej Velaga

From: Sritej Velaga <sritej.velaga@qlogic.com>

When firmware hang is detected, fw should stop sending pause control frames.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 7bfdf57..a47c70b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -2999,8 +2999,18 @@ qlcnic_set_npar_non_operational(struct qlcnic_adapter *adapter)
 void
 qlcnic_dev_request_reset(struct qlcnic_adapter *adapter)
 {
-	u32 state;
-
+	u32 state, xg_val = 0, gb_val = 0;
+
+	qlcnic_xg_set_xg0_mask(xg_val);
+	qlcnic_xg_set_xg1_mask(xg_val);
+	QLCWR32(adapter, QLCNIC_NIU_XG_PAUSE_CTL, xg_val);
+	qlcnic_gb_set_gb0_mask(gb_val);
+	qlcnic_gb_set_gb1_mask(gb_val);
+	qlcnic_gb_set_gb2_mask(gb_val);
+	qlcnic_gb_set_gb3_mask(gb_val);
+	QLCWR32(adapter, QLCNIC_NIU_GB_PAUSE_CTL, gb_val);
+	dev_info(&adapter->pdev->dev, "Pause control frames disabled"
+				" on all ports\n");
 	adapter->need_fw_reset = 1;
 	if (qlcnic_api_lock(adapter))
 		return;
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 2/4] qlcnic: report valid speed and duplex status when link is down
  2012-02-03 23:45 [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang Sony Chacko
@ 2012-02-03 23:45 ` Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 3/4] qlcnic: Fix firmware abort code check Sony Chacko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sony Chacko @ 2012-02-03 23:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Sony Chacko

Report valid link statistics when link is down.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    7 ++-----
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c   |    8 +++++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index cc228cf..6b2cf8b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -155,7 +155,6 @@ qlcnic_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 {
 	struct qlcnic_adapter *adapter = netdev_priv(dev);
 	int check_sfp_module = 0;
-	u16 pcifn = adapter->ahw->pci_func;
 
 	/* read which mode */
 	if (adapter->ahw->port_type == QLCNIC_GBE) {
@@ -194,10 +193,8 @@ qlcnic_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
 			goto skip;
 		}
 
-		val = QLCRD32(adapter, P3P_LINK_SPEED_REG(pcifn));
-		ethtool_cmd_speed_set(ecmd, P3P_LINK_SPEED_MHZ *
-				      P3P_LINK_SPEED_VAL(pcifn, val));
-		ecmd->duplex = DUPLEX_FULL;
+		ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN);
+		ecmd->duplex = DUPLEX_UNKNOWN;
 		ecmd->autoneg = AUTONEG_DISABLE;
 	} else
 		return -EIO;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
index 3866958..41d85ef 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
@@ -1369,7 +1369,13 @@ qlcnic_handle_linkevent(struct qlcnic_adapter *adapter,
 
 	adapter->module_type = module;
 	adapter->link_autoneg = autoneg;
-	adapter->link_speed = link_speed;
+
+	if (link_status) {
+		adapter->link_speed = link_speed;
+	} else {
+		adapter->link_speed = SPEED_UNKNOWN;
+		adapter->link_duplex = DUPLEX_UNKNOWN;
+	}
 }
 
 static void
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 3/4] qlcnic: Fix firmware abort code check.
  2012-02-03 23:45 [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 2/4] qlcnic: report valid speed and duplex status when link is down Sony Chacko
@ 2012-02-03 23:45 ` Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 4/4] qlcnic: Fix API unlock Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 0/4] qlcnic: Fixes Sony Chacko
  3 siblings, 0 replies; 6+ messages in thread
From: Sony Chacko @ 2012-02-03 23:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Sritej Velaga

From: Sritej Velaga <sritej.velaga@qlogic.com>

Check bits 8-28 of peg_halt status register for firmware abort code.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index a47c70b..dba9531 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -3159,7 +3159,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)
 			QLCRD32(adapter, QLCNIC_CRB_PEG_NET_3 + 0x3c),
 			QLCRD32(adapter, QLCNIC_CRB_PEG_NET_4 + 0x3c));
 	peg_status = QLCRD32(adapter, QLCNIC_PEG_HALT_STATUS1);
-	if (LSW(MSB(peg_status)) == 0x67)
+	if (QLCNIC_FWERROR_CODE(peg_status) == 0x67)
 		dev_err(&adapter->pdev->dev,
 			"Firmware aborted with error code 0x00006700. "
 				"Device is being reset.\n");
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 4/4] qlcnic: Fix API unlock
  2012-02-03 23:45 [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 2/4] qlcnic: report valid speed and duplex status when link is down Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 3/4] qlcnic: Fix firmware abort code check Sony Chacko
@ 2012-02-03 23:45 ` Sony Chacko
  2012-02-03 23:45 ` [PATCH net-next 0/4] qlcnic: Fixes Sony Chacko
  3 siblings, 0 replies; 6+ messages in thread
From: Sony Chacko @ 2012-02-03 23:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Manish chopra

From: Manish chopra <manish.chopra@qlogic.com>

Log dump status.
Remove unmatched qlcnic_api_unlock call.
Update version to 5.0.26.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h        |    2 +-
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 60976fc..2b5af22 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -37,7 +37,7 @@
 #define _QLCNIC_LINUX_MAJOR 5
 #define _QLCNIC_LINUX_MINOR 0
 #define _QLCNIC_LINUX_SUBVERSION 25
-#define QLCNIC_LINUX_VERSIONID  "5.0.25"
+#define QLCNIC_LINUX_VERSIONID  "5.0.26"
 #define QLCNIC_DRV_IDC_VER  0x01
 #define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
 		 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 6b2cf8b..30dcbfb 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -1152,7 +1152,6 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
 
 	if (!fw_dump->clr) {
 		netdev_info(netdev, "Dump not available\n");
-		qlcnic_api_unlock(adapter);
 		return -EINVAL;
 	}
 	/* Copy template header first */
@@ -1171,7 +1170,7 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump,
 	vfree(fw_dump->data);
 	fw_dump->data = NULL;
 	fw_dump->clr = 0;
-
+	netdev_info(netdev, "extracted the FW dump Successfully\n");
 	return 0;
 }
 
@@ -1189,7 +1188,7 @@ qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)
 			return ret;
 		}
 		if (fw_dump->clr) {
-			dev_info(&adapter->pdev->dev,
+			netdev_info(netdev,
 			"Previous dump not cleared, not forcing dump\n");
 			return ret;
 		}
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 0/4] qlcnic: Fixes
  2012-02-03 23:45 [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang Sony Chacko
                   ` (2 preceding siblings ...)
  2012-02-03 23:45 ` [PATCH net-next 4/4] qlcnic: Fix API unlock Sony Chacko
@ 2012-02-03 23:45 ` Sony Chacko
  2012-02-04 21:04   ` David Miller
  3 siblings, 1 reply; 6+ messages in thread
From: Sony Chacko @ 2012-02-03 23:45 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Dept_NX_Linux_NIC_Driver, Sony Chacko

Please apply the series to net-next. Thanks.

-Sony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next 0/4] qlcnic: Fixes
  2012-02-03 23:45 ` [PATCH net-next 0/4] qlcnic: Fixes Sony Chacko
@ 2012-02-04 21:04   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-02-04 21:04 UTC (permalink / raw)
  To: sony.chacko; +Cc: netdev, Dept_NX_Linux_NIC_Driver

From: Sony Chacko <sony.chacko@qlogic.com>
Date: Fri, 3 Feb 2012 15:45:45 -0800

> Please apply the series to net-next. Thanks.

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-04 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-03 23:45 [PATCH net-next 1/4] qlcnic: Stop pause ctrl frames on fw hang Sony Chacko
2012-02-03 23:45 ` [PATCH net-next 2/4] qlcnic: report valid speed and duplex status when link is down Sony Chacko
2012-02-03 23:45 ` [PATCH net-next 3/4] qlcnic: Fix firmware abort code check Sony Chacko
2012-02-03 23:45 ` [PATCH net-next 4/4] qlcnic: Fix API unlock Sony Chacko
2012-02-03 23:45 ` [PATCH net-next 0/4] qlcnic: Fixes Sony Chacko
2012-02-04 21:04   ` David Miller

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).