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

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

Merge branch 'qlcnic-enhancements'



Shahed Shaikh says:

====================
qlcnic: enhancements

This series adds few enhancements.

  o Patch from Harish reorders the sequence of header files inclusion,
    keeping kernel's header files on top.

  o Firmware introduced a new feature which allows driver to increases
    the size of firmware dump of iSCSI function which is being collected
    by NIC driver.

  o Print buffer address which is holding a firmware dump.

  o Use vzalloc() instead kzalloc() for allocating large chunk of memory
    which will avoid potential memory allocation failure.

  o Add new device ID for 0x8C30 which is a 83xx series based VF function.

Please apply this series to net-next.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 07151bc9 02509f17
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -24,9 +24,7 @@
#include <linux/mii.h>
#include <linux/timer.h>
#include <linux/irq.h>

#include <linux/vmalloc.h>

#include <linux/io.h>
#include <asm/byteorder.h>
#include <linux/bitops.h>
@@ -39,8 +37,8 @@

#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 3
#define _QLCNIC_LINUX_SUBVERSION 62
#define QLCNIC_LINUX_VERSIONID  "5.3.62"
#define _QLCNIC_LINUX_SUBVERSION 63
#define QLCNIC_LINUX_VERSIONID  "5.3.63"
#define QLCNIC_DRV_IDC_VER  0x01
#define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
		 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
@@ -926,6 +924,7 @@ struct qlcnic_mac_vlan_list {
#define QLCNIC_FW_CAPABILITY_SET_DRV_VER	BIT_5
#define QLCNIC_FW_CAPABILITY_2_BEACON		BIT_7
#define QLCNIC_FW_CAPABILITY_2_PER_PORT_ESWITCH_CFG	BIT_9
#define QLCNIC_FW_CAPABILITY_2_EXT_ISCSI_DUMP	BIT_13

#define QLCNIC_83XX_FW_CAPAB_ENCAP_RX_OFFLOAD	BIT_0
#define QLCNIC_83XX_FW_CAPAB_ENCAP_TX_OFFLOAD	BIT_1
@@ -2291,8 +2290,9 @@ extern const struct ethtool_ops qlcnic_ethtool_failed_ops;

#define PCI_DEVICE_ID_QLOGIC_QLE824X		0x8020
#define PCI_DEVICE_ID_QLOGIC_QLE834X		0x8030
#define PCI_DEVICE_ID_QLOGIC_QLE8830		0x8830
#define PCI_DEVICE_ID_QLOGIC_VF_QLE834X	0x8430
#define PCI_DEVICE_ID_QLOGIC_QLE8830		0x8830
#define PCI_DEVICE_ID_QLOGIC_VF_QLE8C30		0x8C30
#define PCI_DEVICE_ID_QLOGIC_QLE844X		0x8040
#define PCI_DEVICE_ID_QLOGIC_VF_QLE844X	0x8440

@@ -2319,7 +2319,8 @@ static inline bool qlcnic_83xx_check(struct qlcnic_adapter *adapter)
		  (device == PCI_DEVICE_ID_QLOGIC_QLE8830) ||
		  (device == PCI_DEVICE_ID_QLOGIC_QLE844X) ||
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X) ||
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X)) ? true : false;
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ||
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE8C30)) ? true : false;

	return status;
}
@@ -2335,7 +2336,8 @@ static inline bool qlcnic_sriov_vf_check(struct qlcnic_adapter *adapter)
	bool status;

	status = ((device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ||
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X)) ? true : false;
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE844X) ||
		  (device == PCI_DEVICE_ID_QLOGIC_VF_QLE8C30)) ? true : false;

	return status;
}
@@ -2351,7 +2353,8 @@ static inline bool qlcnic_83xx_vf_check(struct qlcnic_adapter *adapter)
{
	unsigned short device = adapter->pdev->device;

	return (device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ? true : false;
	return ((device == PCI_DEVICE_ID_QLOGIC_VF_QLE834X) ||
		(device == PCI_DEVICE_ID_QLOGIC_VF_QLE8C30)) ? true : false;
}

static inline bool qlcnic_sriov_check(struct qlcnic_adapter *adapter)
+29 −2
Original line number Diff line number Diff line
@@ -5,14 +5,15 @@
 * See LICENSE.qlcnic for copyright and licensing details.
 */

#include "qlcnic.h"
#include "qlcnic_sriov.h"
#include <linux/if_vlan.h>
#include <linux/ipv6.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/aer.h>

#include "qlcnic.h"
#include "qlcnic_sriov.h"

static void __qlcnic_83xx_process_aen(struct qlcnic_adapter *);
static int qlcnic_83xx_clear_lb_mode(struct qlcnic_adapter *, u8);
static void qlcnic_83xx_configure_mac(struct qlcnic_adapter *, u8 *, u8,
@@ -118,6 +119,7 @@ static const struct qlcnic_mailbox_metadata qlcnic_83xx_mbx_tbl[] = {
	{QLCNIC_CMD_DCB_QUERY_CAP, 1, 2},
	{QLCNIC_CMD_DCB_QUERY_PARAM, 1, 50},
	{QLCNIC_CMD_SET_INGRESS_ENCAP, 2, 1},
	{QLCNIC_CMD_83XX_EXTEND_ISCSI_DUMP_CAP, 4, 1},
};

const u32 qlcnic_83xx_ext_reg_tbl[] = {
@@ -3513,6 +3515,31 @@ out:
	qlcnic_free_mbx_args(&cmd);
}

#define QLCNIC_83XX_ADD_PORT0		BIT_0
#define QLCNIC_83XX_ADD_PORT1		BIT_1
#define QLCNIC_83XX_EXTENDED_MEM_SIZE	13 /* In MB */
int qlcnic_83xx_extend_md_capab(struct qlcnic_adapter *adapter)
{
	struct qlcnic_cmd_args cmd;
	int err;

	err = qlcnic_alloc_mbx_args(&cmd, adapter,
				    QLCNIC_CMD_83XX_EXTEND_ISCSI_DUMP_CAP);
	if (err)
		return err;

	cmd.req.arg[1] = (QLCNIC_83XX_ADD_PORT0 | QLCNIC_83XX_ADD_PORT1);
	cmd.req.arg[2] = QLCNIC_83XX_EXTENDED_MEM_SIZE;
	cmd.req.arg[3] = QLCNIC_83XX_EXTENDED_MEM_SIZE;

	err = qlcnic_issue_cmd(adapter, &cmd);
	if (err)
		dev_err(&adapter->pdev->dev,
			"failed to issue extend iSCSI minidump capability\n");

	return err;
}

int qlcnic_83xx_reg_test(struct qlcnic_adapter *adapter)
{
	u32 major, minor, sub;
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include <linux/types.h>
#include <linux/etherdevice.h>

#include "qlcnic_hw.h"

#define QLCNIC_83XX_BAR0_LENGTH 0x4000
@@ -626,6 +627,7 @@ int qlcnic_83xx_set_port_eswitch_status(struct qlcnic_adapter *, int, int *);

void qlcnic_83xx_get_minidump_template(struct qlcnic_adapter *);
void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data);
int qlcnic_83xx_extend_md_capab(struct qlcnic_adapter *);
int qlcnic_83xx_get_settings(struct qlcnic_adapter *, struct ethtool_cmd *);
int qlcnic_83xx_set_settings(struct qlcnic_adapter *, struct ethtool_cmd *);
void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *,
+2 −2
Original line number Diff line number Diff line
@@ -1384,7 +1384,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
	size_t size;
	u64 addr;

	temp = kzalloc(fw->size, GFP_KERNEL);
	temp = vzalloc(fw->size);
	if (!temp) {
		release_firmware(fw);
		fw_info->fw = NULL;
@@ -1430,7 +1430,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
exit:
	release_firmware(fw);
	fw_info->fw = NULL;
	kfree(temp);
	vfree(temp);

	return ret;
}
+3 −3
Original line number Diff line number Diff line
@@ -5,13 +5,13 @@
 * See LICENSE.qlcnic for copyright and licensing details.
 */

#include "qlcnic.h"
#include "qlcnic_hdr.h"

#include <linux/slab.h>
#include <net/ip.h>
#include <linux/bitops.h>

#include "qlcnic.h"
#include "qlcnic_hdr.h"

#define MASK(n) ((1ULL<<(n))-1)
#define OCM_WIN_P3P(addr) (addr & 0xffc0000)

Loading