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

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

Merge branch 'qlcnic'



Shahed Shaikh says:

====================
This series includes following changes:
o SRIOV and VLAN filtering related enhancements which includes
   - Do MAC learning for PF
   - Restrict VF from configuring any VLAN mode
   - Enable flooding on PF
   - Turn on promiscuous mode for PF

o Bug fix in qlcnic_sriov_cleanup() introduced by commit
  154d0c81("qlcnic: VLAN enhancement for 84XX adapters")

o Beaconing support for 83xx and 84xx series adapters

o Allow 82xx adapter to perform IPv6 LRO even if destination IP address is not
  programmed.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2315dc91 db5ee75d
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -38,8 +38,8 @@

#define _QLCNIC_LINUX_MAJOR 5
#define _QLCNIC_LINUX_MINOR 3
#define _QLCNIC_LINUX_SUBVERSION 53
#define QLCNIC_LINUX_VERSIONID  "5.3.53"
#define _QLCNIC_LINUX_SUBVERSION 54
#define QLCNIC_LINUX_VERSIONID  "5.3.54"
#define QLCNIC_DRV_IDC_VER  0x01
#define QLCNIC_DRIVER_VERSION  ((_QLCNIC_LINUX_MAJOR << 16) |\
		 (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
@@ -970,6 +970,9 @@ struct qlcnic_ipaddr {
#define QLCNIC_BEACON_EANBLE		0xC
#define QLCNIC_BEACON_DISABLE		0xD

#define QLCNIC_BEACON_ON		2
#define QLCNIC_BEACON_OFF		0

#define QLCNIC_MSIX_TBL_SPACE		8192
#define QLCNIC_PCI_REG_MSIX_TBL 	0x44
#define QLCNIC_MSIX_TBL_PGSIZE		4096
@@ -1079,6 +1082,7 @@ struct qlcnic_adapter {
	u64 dev_rst_time;
	bool drv_mac_learn;
	bool fdb_mac_learn;
	u8 rx_mac_learn;
	unsigned long vlans[BITS_TO_LONGS(VLAN_N_VID)];
	u8 flash_mfg_id;
	struct qlcnic_npar_info *npars;
@@ -1640,7 +1644,6 @@ int qlcnic_set_default_offload_settings(struct qlcnic_adapter *);
int qlcnic_reset_npar_config(struct qlcnic_adapter *);
int qlcnic_set_eswitch_port_config(struct qlcnic_adapter *);
void qlcnic_add_lb_filter(struct qlcnic_adapter *, struct sk_buff *, int, u16);
int qlcnic_get_beacon_state(struct qlcnic_adapter *, u8 *);
int qlcnic_83xx_configure_opmode(struct qlcnic_adapter *adapter);
int qlcnic_read_mac_addr(struct qlcnic_adapter *);
int qlcnic_setup_netdev(struct qlcnic_adapter *, struct net_device *, int);
@@ -1767,6 +1770,7 @@ struct qlcnic_hardware_ops {
					       pci_channel_state_t);
	pci_ers_result_t (*io_slot_reset) (struct pci_dev *);
	void (*io_resume) (struct pci_dev *);
	void (*get_beacon_state)(struct qlcnic_adapter *);
};

extern struct qlcnic_nic_template qlcnic_vf_ops;
@@ -1993,6 +1997,11 @@ static inline void qlcnic_set_mac_filter_count(struct qlcnic_adapter *adapter)
		adapter->ahw->hw_ops->set_mac_filter_count(adapter);
}

static inline void qlcnic_get_beacon_state(struct qlcnic_adapter *adapter)
{
	adapter->ahw->hw_ops->get_beacon_state(adapter);
}

static inline void qlcnic_read_phys_port_id(struct qlcnic_adapter *adapter)
{
	if (adapter->ahw->hw_ops->read_phys_port_id)
+34 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ static struct qlcnic_hardware_ops qlcnic_83xx_hw_ops = {
	.io_error_detected		= qlcnic_83xx_io_error_detected,
	.io_slot_reset			= qlcnic_83xx_io_slot_reset,
	.io_resume			= qlcnic_83xx_io_resume,

	.get_beacon_state		= qlcnic_83xx_get_beacon_state,
};

static struct qlcnic_nic_template qlcnic_83xx_ops = {
@@ -1388,6 +1388,33 @@ static void qlcnic_83xx_diag_free_res(struct net_device *netdev,
	netif_device_attach(netdev);
}

void qlcnic_83xx_get_beacon_state(struct qlcnic_adapter *adapter)
{
	struct qlcnic_hardware_context *ahw = adapter->ahw;
	struct qlcnic_cmd_args cmd;
	u8 beacon_state;
	int err = 0;

	err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_LED_CONFIG);
	if (!err) {
		err = qlcnic_issue_cmd(adapter, &cmd);
		if (!err) {
			beacon_state = cmd.rsp.arg[4];
			if (beacon_state == QLCNIC_BEACON_DISABLE)
				ahw->beacon_state = QLC_83XX_BEACON_OFF;
			else if (beacon_state == QLC_83XX_ENABLE_BEACON)
				ahw->beacon_state = QLC_83XX_BEACON_ON;
		}
	} else {
		netdev_err(adapter->netdev, "Get beacon state failed, err=%d\n",
			   err);
	}

	qlcnic_free_mbx_args(&cmd);

	return;
}

int qlcnic_83xx_config_led(struct qlcnic_adapter *adapter, u32 state,
			   u32 beacon)
{
@@ -1591,7 +1618,9 @@ static void qlcnic_83xx_set_interface_id_promisc(struct qlcnic_adapter *adapter,
						 u32 *interface_id)
{
	if (qlcnic_sriov_pf_check(adapter)) {
		qlcnic_alloc_lb_filters_mem(adapter);
		qlcnic_pf_set_interface_id_promisc(adapter, interface_id);
		adapter->rx_mac_learn = 1;
	} else {
		if (!qlcnic_sriov_vf_check(adapter))
			*interface_id = adapter->recv_ctx->context_id << 16;
@@ -1618,6 +1647,10 @@ int qlcnic_83xx_nic_set_promisc(struct qlcnic_adapter *adapter, u32 mode)

	cmd->type = QLC_83XX_MBX_CMD_NO_WAIT;
	qlcnic_83xx_set_interface_id_promisc(adapter, &temp);

	if (qlcnic_84xx_check(adapter) && qlcnic_sriov_pf_check(adapter))
		mode = VPORT_MISS_MODE_ACCEPT_ALL;

	cmd->req.arg[1] = mode | temp;
	err = qlcnic_issue_cmd(adapter, cmd);
	if (!err)
+3 −0
Original line number Diff line number Diff line
@@ -381,6 +381,8 @@ enum qlcnic_83xx_states {

/* LED configuration settings */
#define QLC_83XX_ENABLE_BEACON		0xe
#define QLC_83XX_BEACON_ON		1
#define QLC_83XX_BEACON_OFF		0
#define QLC_83XX_LED_RATE		0xff
#define QLC_83XX_LED_ACT		(1 << 10)
#define QLC_83XX_LED_MOD		(0 << 13)
@@ -559,6 +561,7 @@ void qlcnic_83xx_napi_del(struct qlcnic_adapter *);
void qlcnic_83xx_napi_enable(struct qlcnic_adapter *);
void qlcnic_83xx_napi_disable(struct qlcnic_adapter *);
int qlcnic_83xx_config_led(struct qlcnic_adapter *, u32, u32);
void qlcnic_83xx_get_beacon_state(struct qlcnic_adapter *);
void qlcnic_ind_wr(struct qlcnic_adapter *, u32, u32);
int qlcnic_ind_rd(struct qlcnic_adapter *, u32);
int qlcnic_83xx_create_rx_ctx(struct qlcnic_adapter *);
+1 −0
Original line number Diff line number Diff line
@@ -2214,6 +2214,7 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)
	struct qlcnic_hardware_context *ahw = adapter->ahw;
	int err = 0;

	adapter->rx_mac_learn = 0;
	ahw->msix_supported = !!qlcnic_use_msi_x;

	qlcnic_83xx_init_rings(adapter);
+6 −2
Original line number Diff line number Diff line
@@ -224,10 +224,14 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter)
		return -EIO;
	}

	if (ahw->capabilities & QLC_83XX_ESWITCH_CAPABILITY)
	if (ahw->capabilities & QLC_83XX_ESWITCH_CAPABILITY) {
		adapter->flags |= QLCNIC_ESWITCH_ENABLED;
	else
		if (adapter->drv_mac_learn)
			adapter->rx_mac_learn = 1;
	} else {
		adapter->flags &= ~QLCNIC_ESWITCH_ENABLED;
		adapter->rx_mac_learn = 0;
	}

	ahw->idc.vnic_state = QLCNIC_DEV_NPAR_NON_OPER;
	ahw->idc.vnic_wait_limit = QLCNIC_DEV_NPAR_OPER_TIMEO;
Loading