netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] qlcnic: Bug fix and update version
@ 2017-05-11 14:12 Manish Chopra
  2017-05-11 14:12 ` [PATCH net 1/2] qlcnic: Fix link configuration with autoneg disabled Manish Chopra
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Manish Chopra @ 2017-05-11 14:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

Hi David,

This series has one fix and bumps up driver version.
Please consider applying to "net"

Thanks,
Manish

Manish Chopra (2):
  qlcnic: Fix link configuration with autoneg disabled
  qlcnic: Update version to 5.3.66

 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h        |  4 +--
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c    | 34 ++++++++++++++++++++++
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h    |  1 +
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |  3 ++
 4 files changed, 40 insertions(+), 2 deletions(-)

-- 
2.7.2

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

* [PATCH net 1/2] qlcnic: Fix link configuration with autoneg disabled
  2017-05-11 14:12 [PATCH net 0/2] qlcnic: Bug fix and update version Manish Chopra
@ 2017-05-11 14:12 ` Manish Chopra
  2017-05-11 14:12 ` [PATCH net 2/2] qlcnic: Update version to 5.3.66 Manish Chopra
  2017-05-12  1:40 ` [PATCH net 0/2] qlcnic: Bug fix and update version David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Manish Chopra @ 2017-05-11 14:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

Currently driver returns error on speed configurations
for 83xx adapter's non XGBE ports, due to this link doesn't
come up on the ports using 1000Base-T as a connector with
autoneg disabled. This patch fixes this with initializing
appropriate port type based on queried module/connector
types from hardware before any speed/autoneg configuration.

Signed-off-by: Manish Chopra <manish.chopra@cavium.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c    | 34 ++++++++++++++++++++++
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h    |  1 +
 .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    |  3 ++
 3 files changed, 38 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 718bf58..4fb6879 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -3168,6 +3168,40 @@ int qlcnic_83xx_flash_read32(struct qlcnic_adapter *adapter, u32 flash_addr,
 	return 0;
 }
 
+void qlcnic_83xx_get_port_type(struct qlcnic_adapter *adapter)
+{
+	struct qlcnic_hardware_context *ahw = adapter->ahw;
+	struct qlcnic_cmd_args cmd;
+	u32 config;
+	int err;
+
+	err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_LINK_STATUS);
+	if (err)
+		return;
+
+	err = qlcnic_issue_cmd(adapter, &cmd);
+	if (err) {
+		dev_info(&adapter->pdev->dev,
+			 "Get Link Status Command failed: 0x%x\n", err);
+		goto out;
+	} else {
+		config = cmd.rsp.arg[3];
+
+		switch (QLC_83XX_SFP_MODULE_TYPE(config)) {
+		case QLC_83XX_MODULE_FIBRE_1000BASE_SX:
+		case QLC_83XX_MODULE_FIBRE_1000BASE_LX:
+		case QLC_83XX_MODULE_FIBRE_1000BASE_CX:
+		case QLC_83XX_MODULE_TP_1000BASE_T:
+			ahw->port_type = QLCNIC_GBE;
+			break;
+		default:
+			ahw->port_type = QLCNIC_XGBE;
+		}
+	}
+out:
+	qlcnic_free_mbx_args(&cmd);
+}
+
 int qlcnic_83xx_test_link(struct qlcnic_adapter *adapter)
 {
 	u8 pci_func;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
index 3dfe8e2..b75a812 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h
@@ -637,6 +637,7 @@ void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *,
 int qlcnic_83xx_set_pauseparam(struct qlcnic_adapter *,
 			       struct ethtool_pauseparam *);
 int qlcnic_83xx_test_link(struct qlcnic_adapter *);
+void qlcnic_83xx_get_port_type(struct qlcnic_adapter *adapter);
 int qlcnic_83xx_reg_test(struct qlcnic_adapter *);
 int qlcnic_83xx_get_regs_len(struct qlcnic_adapter *);
 int qlcnic_83xx_get_registers(struct qlcnic_adapter *, u32 *);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 9a869c1..7f7deea 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -486,6 +486,9 @@ static int qlcnic_set_link_ksettings(struct net_device *dev,
 	u32 ret = 0;
 	struct qlcnic_adapter *adapter = netdev_priv(dev);
 
+	if (qlcnic_83xx_check(adapter))
+		qlcnic_83xx_get_port_type(adapter);
+
 	if (adapter->ahw->port_type != QLCNIC_GBE)
 		return -EOPNOTSUPP;
 
-- 
2.7.2

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

* [PATCH net 2/2] qlcnic: Update version to 5.3.66
  2017-05-11 14:12 [PATCH net 0/2] qlcnic: Bug fix and update version Manish Chopra
  2017-05-11 14:12 ` [PATCH net 1/2] qlcnic: Fix link configuration with autoneg disabled Manish Chopra
@ 2017-05-11 14:12 ` Manish Chopra
  2017-05-12  1:40 ` [PATCH net 0/2] qlcnic: Bug fix and update version David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Manish Chopra @ 2017-05-11 14:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-GELinuxNICDev

Bumping up the version as couple of fixes added after 5.3.65

Signed-off-by: Manish Chopra <manish.chopra@cavium.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
index 49bad00..7245b10 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
@@ -37,8 +37,8 @@
 
 #define _QLCNIC_LINUX_MAJOR 5
 #define _QLCNIC_LINUX_MINOR 3
-#define _QLCNIC_LINUX_SUBVERSION 65
-#define QLCNIC_LINUX_VERSIONID  "5.3.65"
+#define _QLCNIC_LINUX_SUBVERSION 66
+#define QLCNIC_LINUX_VERSIONID  "5.3.66"
 #define QLCNIC_DRV_IDC_VER  0x01
 #define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
 		 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
-- 
2.7.2

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

* Re: [PATCH net 0/2] qlcnic: Bug fix and update version
  2017-05-11 14:12 [PATCH net 0/2] qlcnic: Bug fix and update version Manish Chopra
  2017-05-11 14:12 ` [PATCH net 1/2] qlcnic: Fix link configuration with autoneg disabled Manish Chopra
  2017-05-11 14:12 ` [PATCH net 2/2] qlcnic: Update version to 5.3.66 Manish Chopra
@ 2017-05-12  1:40 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-05-12  1:40 UTC (permalink / raw)
  To: manish.chopra; +Cc: netdev, Dept-GELinuxNICDev

From: Manish Chopra <manish.chopra@cavium.com>
Date: Thu, 11 May 2017 07:12:46 -0700

> This series has one fix and bumps up driver version.
> Please consider applying to "net"

Series applied, thanks.

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

end of thread, other threads:[~2017-05-12  1:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 14:12 [PATCH net 0/2] qlcnic: Bug fix and update version Manish Chopra
2017-05-11 14:12 ` [PATCH net 1/2] qlcnic: Fix link configuration with autoneg disabled Manish Chopra
2017-05-11 14:12 ` [PATCH net 2/2] qlcnic: Update version to 5.3.66 Manish Chopra
2017-05-12  1:40 ` [PATCH net 0/2] qlcnic: Bug fix and update version 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).