Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34e934b9 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'qlcnic-fixes'



Manish Chopra says:

====================
qlcnic: Bug fix and update version

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d86b5672 33c16bfd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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))
+34 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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 *);
+3 −0
Original line number Diff line number Diff line
@@ -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;