qlcnic: fixes and ethtool enhancements.
Subsystems (3)
cover qlcnic: fixes and ethtool enhancements.
From: Himanshu Madhani <[email protected]>
This patch series contains
o patch to fix regression introduced by commit aa4a1f7df7cbb98797c9f4edfde3c726e2b3841f.
o updates to ethtool for pause settings and enhance register dump to display mask and ring indices.
o cleanup in DCB code and remove redundant eSwitch enablement command.
o fixed firmware dump collection logic to skip unknown entries.
o fix to register device if adapter is in FAILED state.
Please apply to net-next.
Thanks,
Himanshu
Himanshu Madhani (2):
qlcnic: Validate Tx queue only for 82xx adapters.
qlcnic: update version to 5.3.51
Jitendra Kalsaria (1):
qlcnic: Update ethtool standard pause settings.
Pratik Pujar (2):
qlcnic: Enhance ethtool to display ring indices and interrupt mask
qlcnic: Firmware dump collection when auto recovery is disabled.
Shahed Shaikh (1):
qlcnic: Skip unknown entry type while collecting firmware dump
Sony Chacko (1):
qlcnic: Remove redundant eSwitch enable commands
Sucheta Chakraborty (3):
qlcnic: Print informational messages only once during driver load.
qlcnic: dcb code cleanup and refactoring.
qlcnic: Register netdev in FAILED state for 83xx/84xx
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 102 +----------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 72 ++++---- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 5 +- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 36 ++-- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 48 +++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c | 182 ++++++++++----------- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 109 ++++++++++-- .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 69 +++++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 90 +++++----- .../net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 41 +++-- .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 9 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 8 +- 13 files changed, 417 insertions(+), 356 deletions(-)
Signature · 1 line
1.8.1.4
PATCH 1/10 qlcnic: Print informational messages only once during driver load.
From: Sucheta Chakraborty <[email protected]>
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 + .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 12 ----------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 25 ++++++++++++++++++---- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 4 files changed, 23 insertions(+), 16 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1 -0
@@ -1199,6 +1199,7 @@ struct qlcnic_npar_info {u8 promisc_mode;u8 offload_flags;u8 pci_func; +u8 mac[ETH_ALEN ]; };struct qlcnic_eswitch {
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +0 -12
@@ -2321,19 +2321,7 @@ int qlcnic_83xx_get_pci_info(struct qlcnic_adapter *adapter, i++;memcpy (pci_info->mac +sizeof (u32), &cmd.rsp.arg[i],2 ); i = i +3 ; -if (ahw->op_mode ==QLCNIC_MGMT_FUNC ) -dev_info (dev,"id = %d active = %d type = %d\n" -"\tport = %d min bw = %d max bw = %d\n" -"\tmac_addr = %pM\n" , pci_info->id, - pci_info->active, pci_info->type, - pci_info->default_port, - pci_info->tx_min_bw, - pci_info->tx_max_bw, pci_info->mac); } -if (ahw->op_mode ==QLCNIC_MGMT_FUNC ) -dev_info (dev,"Max functions = %d, active functions = %d\n" , - ahw->max_pci_func, ahw->act_pci_func); - }else {dev_err (dev,"Failed to get PCI Info, error = %d\n" , err); err = -EIO ;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c +21 -4
@@ -94,13 +94,30 @@ qlcnic_83xx_config_vnic_buff_descriptors(struct qlcnic_adapter *adapter)**/ static int qlcnic_83xx_init_mgmt_vnic (struct qlcnic_adapter *adapter) { -int err = -EIO ; +struct qlcnic_hardware_context *ahw = adapter->ahw; +struct device *dev = &adapter->pdev->dev; +struct qlcnic_npar_info *npar; +int i, err = -EIO ;qlcnic_83xx_get_minidump_template (adapter); +if (!(adapter->flags &QLCNIC_ADAPTER_INITIALIZED )) {if (qlcnic_init_pci_info (adapter))return err; + npar = adapter->npars; + +for (i =0 ; i < ahw->act_pci_func; i++, npar++) { +dev_info (dev,"id = %d active = %d type = %d\n" +"\tport = %d min bw = %d max bw = %d\n" +"\tmac_addr = %pM\n" , npar->pci_func, + npar->active, npar->type, npar->phy_port, + npar->min_bw, npar->max_bw, npar->mac); + } + +dev_info (dev,"Max functions = %d, active functions = %d\n" , + ahw->max_pci_func, ahw->act_pci_func); +if (qlcnic_83xx_set_vnic_opmode (adapter))return err;
@@ -115,12 +132,12 @@ static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter)return err;qlcnic_83xx_config_vnic_buff_descriptors (adapter); - adapter->ahw->msix_supported = !!qlcnic_use_msi_x; + ahw->msix_supported = qlcnic_use_msi_x ?1 :0 ; adapter->flags |=QLCNIC_ADAPTER_INITIALIZED ;qlcnic_83xx_enable_vnic_mode (adapter,1 ); -dev_info (&adapter->pdev->dev,"HAL Version: %d, Management function\n" , - adapter->ahw->fw_hal_version); +dev_info (dev,"HAL Version: %d, Management function\n" , + ahw->fw_hal_version);return 0 ; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1 -0
@@ -875,6 +875,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter) adapter->npars[j].min_bw = pci_info[i].tx_min_bw; adapter->npars[j].max_bw = pci_info[i].tx_max_bw; +memcpy (&adapter->npars[j].mac, &pci_info[i].mac,ETH_ALEN ); j++; }
Signature · 1 line
1.8.1.4
PATCH 2/10 qlcnic: Enhance ethtool to display ring indices and interrupt mask
In reply to Himanshu MadhaniFrom: Pratik Pujar <[email protected]>
o Updated ethtool -d <ethX> option to display ring indices for Transmit(Tx), Receive(Rx), and Status(St) rings.
o Updated ethtool -d <ethX> option to display ring interrupt mask for Transmit(Tx), and Status(St) rings.
--- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 8 +-- .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 61 +++++++++++++++++----- 2 files changed, 51 insertions(+), 18 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +4 -4
@@ -3267,12 +3267,12 @@ int qlcnic_83xx_reg_test(struct qlcnic_adapter *adapter)return 0 ; } -int qlcnic_83xx_get_regs_len (struct qlcnic_adapter *adapter) +inline int qlcnic_83xx_get_regs_len (struct qlcnic_adapter *adapter) {return (ARRAY_SIZE (qlcnic_83xx_ext_reg_tbl) * -sizeof (adapter->ahw->ext_reg_tbl)) + - (ARRAY_SIZE (qlcnic_83xx_reg_tbl) + -sizeof (adapter->ahw->reg_tbl)); +sizeof (*adapter->ahw->ext_reg_tbl)) + + (ARRAY_SIZE (qlcnic_83xx_reg_tbl) * +sizeof (*adapter->ahw->reg_tbl)); }int qlcnic_83xx_get_registers (struct qlcnic_adapter *adapter,u32 *regs_buff)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +47 -14
95 lines not on this page · raw message
Signature · 1 line
1.8.1.4
PATCH 3/10 qlcnic: Firmware dump collection when auto recovery is disabled.
In reply to Himanshu MadhaniFrom: Pratik Pujar <[email protected]>
o Allow collecting the firmware dump of halted firmware when auto recovery is disabled.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 11 +++++++++++ drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +11 -0
@@ -818,6 +818,7 @@ static int qlcnic_83xx_idc_ready_state(struct qlcnic_adapter *adapter)struct qlcnic_hardware_context *ahw = adapter->ahw;struct qlcnic_mailbox *mbx = ahw->mailbox;int ret =0 ; +u32 owner;u32 val;/* Perform NIC configuration based ready state entry actions */
@@ -846,6 +847,10 @@ static int qlcnic_83xx_idc_ready_state(struct qlcnic_adapter *adapter)clear_bit (QLC_83XX_MBX_READY , &mbx->status);set_bit (__QLCNIC_RESETTING, &adapter->state);qlcnic_83xx_idc_enter_need_reset_state (adapter,1 ); + }else { + owner =qlcnic_83xx_idc_find_reset_owner_id (adapter); +if (ahw->pci_func == owner) +qlcnic_dump_fw (adapter); }return -EIO ; }
@@ -1058,6 +1063,12 @@ void qlcnic_83xx_idc_poll_dev_state(struct work_struct *work) adapter->ahw->idc.prev_state = adapter->ahw->idc.curr_state;qlcnic_83xx_periodic_tasks (adapter); +/* Do not reschedule if firmaware is in hanged state and auto +* recovery is disabled +*/ +if ((adapter->flags &QLCNIC_FW_HANG ) && !qlcnic_auto_fw_reset) +return ; +/* Re-schedule the function */ if (test_bit (QLC_83XX_MODULE_LOADED , &adapter->ahw->idc.status)) qlcnic_schedule_work(adapter, qlcnic_83xx_idc_poll_dev_state,
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +6 -1
@@ -3350,6 +3350,8 @@ done:static int qlcnic_check_health (struct qlcnic_adapter *adapter) { +struct qlcnic_hardware_context *ahw = adapter->ahw; +struct qlcnic_fw_dump *fw_dump = &ahw->fw_dump;u32 state =0 , heartbeat;u32 peg_status;int err =0 ;
@@ -3374,7 +3376,7 @@ qlcnic_check_health(struct qlcnic_adapter *adapter)if (adapter->need_fw_reset) goto detach; -if (adapter->ahw->reset_context && qlcnic_auto_fw_reset) +if (ahw->reset_context && qlcnic_auto_fw_reset)qlcnic_reset_hw_context (adapter);return 0 ;
@@ -3417,6 +3419,9 @@ detach:qlcnic_schedule_work (adapter, qlcnic_detach_work,0 );QLCDB (adapter,DRV ,"fw recovery scheduled.\n" ); + }else if (!qlcnic_auto_fw_reset && fw_dump->enable && + adapter->flags &QLCNIC_FW_RESET_OWNER ) { +qlcnic_dump_fw (adapter); }return 1 ;
Signature · 1 line
1.8.1.4
PATCH 4/10 qlcnic: Update ethtool standard pause settings.
In reply to Himanshu MadhaniFrom: Jitendra Kalsaria <[email protected]>
Update ethtool standard pause parameter settings and display
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 18 +++++++++++++++--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 3 +++ 2 files changed, 18 insertions(+), 3 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +15 -3
@@ -3369,10 +3369,21 @@ void qlcnic_83xx_get_pauseparam(struct qlcnic_adapter *adapter, } config = ahw->port_config;if (config &QLC_83XX_CFG_STD_PAUSE ) { -if (config &QLC_83XX_CFG_STD_TX_PAUSE ) +switch (MSW (config)) { +case QLC_83XX_TX_PAUSE : + pause->tx_pause =1 ; +break ; +case QLC_83XX_RX_PAUSE : + pause->rx_pause =1 ; +break ; +case QLC_83XX_TX_RX_PAUSE : +default : +/* Backward compatibility for existing +* flash definitions +*/ pause->tx_pause =1 ; -if (config &QLC_83XX_CFG_STD_RX_PAUSE ) pause->rx_pause =1 ; + } }if (QLC_83XX_AUTONEG (config))
@@ -3415,7 +3426,8 @@ int qlcnic_83xx_set_pauseparam(struct qlcnic_adapter *adapter, ahw->port_config &= ~QLC_83XX_CFG_STD_RX_PAUSE ; ahw->port_config |=QLC_83XX_CFG_STD_TX_PAUSE ; }else if (!pause->rx_pause && !pause->tx_pause) { - ahw->port_config &= ~QLC_83XX_CFG_STD_TX_RX_PAUSE ; + ahw->port_config &= ~(QLC_83XX_CFG_STD_TX_RX_PAUSE | +QLC_83XX_CFG_STD_PAUSE ); } status =qlcnic_83xx_set_port_config (adapter);if (status) {
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +3 -0
@@ -363,6 +363,9 @@ enum qlcnic_83xx_states {#define QLC_83XX_LINK_EEE (data) ((data) & BIT_13)#define QLC_83XX_DCBX (data) (((data) >> 28) & 7)#define QLC_83XX_AUTONEG (data) ((data) & BIT_15) +#define QLC_83XX_TX_PAUSE 0x10 +#define QLC_83XX_RX_PAUSE 0x20 +#define QLC_83XX_TX_RX_PAUSE 0x30#define QLC_83XX_CFG_STD_PAUSE (1 << 5)#define QLC_83XX_CFG_STD_TX_PAUSE (1 << 20)#define QLC_83XX_CFG_STD_RX_PAUSE (2 << 20)
Signature · 1 line
1.8.1.4
PATCH 5/10 qlcnic: Remove redundant eSwitch enable commands
In reply to Himanshu MadhaniFrom: Sony Chacko <[email protected]>
When more than one NIC physical functions are enabled on a port, eSwitch on that port gets enabled automatically. Driver need not explicitly enable the eSwitch.
--- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 23 ++++------------------ drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 13 ++++++------ 3 files changed, 12 insertions(+), 26 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.h +1 -1
@@ -629,7 +629,7 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *);int qlcnic_83xx_get_vnic_vport_info (struct qlcnic_adapter *,struct qlcnic_info *,u8 );int qlcnic_83xx_get_vnic_pf_info (struct qlcnic_adapter *,struct qlcnic_info *); -int qlcnic_83xx_enable_port_eswitch (struct qlcnic_adapter *,int ); +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);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c +4 -19
@@ -257,8 +257,8 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter)return 0 ; } -static int qlcnic_83xx_get_eswitch_port_info (struct qlcnic_adapter *adapter, -int func,int *port_id) +int qlcnic_83xx_set_port_eswitch_status (struct qlcnic_adapter *adapter, +int func,int *port_id) {struct qlcnic_info nic_info;int err =0 ;
@@ -274,23 +274,8 @@ static int qlcnic_83xx_get_eswitch_port_info(struct qlcnic_adapter *adapter,else err = -EIO ; -return err; -} - -int qlcnic_83xx_enable_port_eswitch (struct qlcnic_adapter *adapter,int func) -{ -int id, err =0 ; - - err =qlcnic_83xx_get_eswitch_port_info (adapter, func, &id); -if (err) -return err; - -if (!(adapter->eswitch[id].flags &QLCNIC_SWITCH_ENABLE )) { -if (!qlcnic_enable_eswitch (adapter, id,1 )) - adapter->eswitch[id].flags |=QLCNIC_SWITCH_ENABLE ; -else - err = -EIO ; - } +if (!err) + adapter->eswitch[*port_id].flags |=QLCNIC_SWITCH_ENABLE ;return err; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +7 -6
@@ -819,7 +819,7 @@ static bool qlcnic_port_eswitch_cfg_capability(struct qlcnic_adapter *adapter)int qlcnic_init_pci_info (struct qlcnic_adapter *adapter) {struct qlcnic_pci_info *pci_info; -int i, ret =0 , j =0 ; +int i, id =0 , ret =0 , j =0 ;u16 act_pci_func;u8 pfn;
@@ -860,7 +860,8 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter)continue ;if (qlcnic_port_eswitch_cfg_capability (adapter)) { -if (!qlcnic_83xx_enable_port_eswitch (adapter, pfn)) +if (!qlcnic_83xx_set_port_eswitch_status (adapter, pfn, + &id)) adapter->npars[j].eswitch_status = true;else continue ;
@@ -879,12 +880,12 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter) j++; } -if (qlcnic_82xx_check (adapter)) { +/* Update eSwitch status for adapters without per port eSwitch +* configuration capability +*/ +if (!qlcnic_port_eswitch_cfg_capability (adapter)) {for (i =0 ; i <QLCNIC_NIU_MAX_XG_PORTS ; i++) adapter->eswitch[i].flags |=QLCNIC_SWITCH_ENABLE ; - }else if (!qlcnic_port_eswitch_cfg_capability (adapter)) { -for (i =0 ; i <QLCNIC_NIU_MAX_XG_PORTS ; i++) -qlcnic_enable_eswitch (adapter, i,1 ); }kfree (pci_info);
Signature · 1 line
1.8.1.4
PATCH 6/10 qlcnic: dcb code cleanup and refactoring.
In reply to Himanshu MadhaniFrom: Sucheta Chakraborty <[email protected]>
o Move dcb specific function definitions to dcb files.
o Move dcb specific variables to qlcnic_dcb structure.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 96 ----------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 9 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c | 182 ++++++++++----------- drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h | 109 ++++++++++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 24 +-- .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 9 +- 8 files changed, 206 insertions(+), 227 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +0 -96
@@ -961,8 +961,6 @@ struct qlcnic_ipaddr {#define __QLCNIC_SRIOV_CAPABLE 11#define __QLCNIC_MBX_POLL_ENABLE 12#define __QLCNIC_DIAG_MODE 13 -#define __QLCNIC_DCB_STATE 14 -#define __QLCNIC_DCB_IN_AEN 15#define QLCNIC_INTERRUPT_TEST 1#define QLCNIC_LOOPBACK_TEST 2
@@ -2116,98 +2114,4 @@ static inline bool qlcnic_sriov_vf_check(struct qlcnic_adapter *adapter) return status; } - -static inline int qlcnic_dcb_get_hw_capability (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->get_hw_capability) -return dcb->ops->get_hw_capability (adapter); - -return 0 ; -} - -static inline void qlcnic_dcb_free (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->free) - dcb->ops->free (adapter); -} - -static inline int qlcnic_dcb_attach (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->attach) -return dcb->ops->attach (adapter); - -return 0 ; -} - -static inline int -qlcnic_dcb_query_hw_capability (struct qlcnic_adapter *adapter,char *buf) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->query_hw_capability) -return dcb->ops->query_hw_capability (adapter, buf); - -return 0 ; -} - -static inline void qlcnic_dcb_get_info (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->get_info) - dcb->ops->get_info (adapter); -} - -static inline int -qlcnic_dcb_query_cee_param (struct qlcnic_adapter *adapter,char *buf,u8 type) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->query_cee_param) -return dcb->ops->query_cee_param (adapter, buf, type); - -return 0 ; -} - -static inline int qlcnic_dcb_get_cee_cfg (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->get_cee_cfg) -return dcb->ops->get_cee_cfg (adapter); - -return 0 ; -} - -static inline void -qlcnic_dcb_register_aen (struct qlcnic_adapter *adapter,u8 flag) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->register_aen) - dcb->ops->register_aen (adapter, flag); -} - -static inline void qlcnic_dcb_handle_aen (struct qlcnic_adapter *adapter, -void *msg) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->handle_aen) - dcb->ops->handle_aen (adapter, msg); -} - -static inline void qlcnic_dcb_init_dcbnl_ops (struct qlcnic_adapter *adapter) -{ -struct qlcnic_dcb *dcb = adapter->dcb; - -if (dcb && dcb->ops->init_dcbnl_ops) - dcb->ops->init_dcbnl_ops (adapter); -}#endif /* __QLCNIC_H_ */
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +1 -1
@@ -902,7 +902,7 @@ void __qlcnic_83xx_process_aen(struct qlcnic_adapter *adapter) QLCNIC_MBX_RSP(event[0]));break ;case QLCNIC_MBX_DCBX_CONFIG_CHANGE_EVENT : -qlcnic_dcb_handle_aen (adapter, (void *)&event[1 ]); +qlcnic_dcb_aen_handler (adapter->dcb, (void *)&event[1 ]);break ;default : dev_dbg(&adapter->pdev->dev, "Unsupported AEN:0x%x.\n",
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +6 -3
@@ -636,7 +636,7 @@ int qlcnic_83xx_idc_reattach_driver(struct qlcnic_adapter *adapter)if (adapter->portnum ==0 )qlcnic_set_drv_version (adapter); -qlcnic_dcb_get_info (adapter); +qlcnic_dcb_get_info (adapter->dcb);qlcnic_83xx_idc_attach_driver (adapter);return 0 ;
@@ -2174,6 +2174,7 @@ static int qlcnic_83xx_get_fw_info(struct qlcnic_adapter *adapter)int qlcnic_83xx_init (struct qlcnic_adapter *adapter,int pci_using_dac) {struct qlcnic_hardware_context *ahw = adapter->ahw; +struct qlcnic_dcb *dcb;int err =0 ; ahw->msix_supported = !!qlcnic_use_msi_x;
@@ -2231,8 +2232,10 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)if (err) goto disable_mbx_intr; -if (adapter->dcb &&qlcnic_dcb_attach (adapter)) -qlcnic_clear_dcb_ops (adapter); + dcb = adapter->dcb; + +if (dcb &&qlcnic_dcb_attach (dcb)) +qlcnic_clear_dcb_ops (dcb);/* Periodically monitor device status */ qlcnic_83xx_idc_poll_dev_state (&adapter->fw_work.work);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c +88 -94
486 lines not on this page · raw message
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h +96 -13
127 lines not on this page · raw message
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +1 -1
@@ -1011,7 +1011,7 @@ static void qlcnic_handle_fw_message(int desc_cnt, int index, }break ;case QLCNIC_C2H_OPCODE_GET_DCB_AEN : -qlcnic_dcb_handle_aen (adapter, (void *)&msg); +qlcnic_dcb_aen_handler (adapter->dcb, (void *)&msg);break ;default :break ;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +8 -16
@@ -2071,7 +2071,7 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, struct net_device *netdev,return err; } -qlcnic_dcb_init_dcbnl_ops (adapter); +qlcnic_dcb_init_dcbnl_ops (adapter->dcb);return 0 ; }
@@ -2166,17 +2166,6 @@ void qlcnic_set_drv_version(struct qlcnic_adapter *adapter)qlcnic_fw_cmd_set_drv_version (adapter, fw_cmd); } -static int qlcnic_register_dcb (struct qlcnic_adapter *adapter) -{ -return __qlcnic_register_dcb (adapter); -} - -void qlcnic_clear_dcb_ops (struct qlcnic_adapter *adapter) -{ -kfree (adapter->dcb); - adapter->dcb =NULL ; -} -static int qlcnic_probe (struct pci_dev *pdev,const struct pci_device_id *ent) {
@@ -2185,6 +2174,7 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)struct qlcnic_hardware_context *ahw;int err, pci_using_dac =-1 ;char board_name[QLCNIC_MAX_BOARD_NAME_LEN +19 ];/* MAC + ": " + name */ +struct qlcnic_dcb *dcb;if (pdev->is_virtfn)return -ENODEV ;
@@ -2305,8 +2295,10 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) adapter->flags |=QLCNIC_NEED_FLR ; -if (adapter->dcb &&qlcnic_dcb_attach (adapter)) -qlcnic_clear_dcb_ops (adapter); + dcb = adapter->dcb; + +if (dcb &&qlcnic_dcb_attach (dcb)) +qlcnic_clear_dcb_ops (dcb); }else if (qlcnic_83xx_check (adapter)) { adapter->max_drv_tx_rings =1 ;
@@ -2448,7 +2440,7 @@ static void qlcnic_remove(struct pci_dev *pdev)qlcnic_cancel_idc_work (adapter); ahw = adapter->ahw; -qlcnic_dcb_free (adapter); +qlcnic_dcb_free (adapter->dcb);unregister_netdev (netdev);qlcnic_sriov_cleanup (adapter);
@@ -3326,7 +3318,7 @@ qlcnic_attach_work(struct work_struct *work)return ; } attach: -qlcnic_dcb_get_info (adapter); +qlcnic_dcb_get_info (adapter->dcb);if (netif_running (netdev)) {if (qlcnic_up (adapter, netdev))
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c +6 -3
@@ -500,6 +500,7 @@ static int qlcnic_sriov_vf_init_driver(struct qlcnic_adapter *adapter)static int qlcnic_sriov_setup_vf (struct qlcnic_adapter *adapter,int pci_using_dac) { +struct qlcnic_dcb *dcb;int err;INIT_LIST_HEAD (&adapter->vf_mc_list);
@@ -533,8 +534,10 @@ static int qlcnic_sriov_setup_vf(struct qlcnic_adapter *adapter,if (err) goto err_out_send_channel_term; -if (adapter->dcb &&qlcnic_dcb_attach (adapter)) -qlcnic_clear_dcb_ops (adapter); + dcb = adapter->dcb; + +if (dcb &&qlcnic_dcb_attach (dcb)) +qlcnic_clear_dcb_ops (dcb); err =qlcnic_setup_netdev (adapter, adapter->netdev, pci_using_dac);if (err)
@@ -1577,7 +1580,7 @@ static int qlcnic_sriov_vf_reinit_driver(struct qlcnic_adapter *adapter)if (err) goto err_out_term_channel; -qlcnic_dcb_get_info (adapter); +qlcnic_dcb_get_info (adapter->dcb);return 0 ;
Signature · 1 line
1.8.1.4
PATCH 7/10 qlcnic: Validate Tx queue only for 82xx adapters.
In reply to Himanshu MadhaniFrom: Himanshu Madhani <[email protected]>
o validate Tx queue only in case of adapters which supports multi Tx queue.
This patch is to fix regression introduced in commit aa4a1f7df7cbb98797c9f4edfde3c726e2b3841f
"qlcnic: Enable Tx queue changes using ethtool for 82xx Series adapter"
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 2 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +1 -1
@@ -698,7 +698,7 @@ static int qlcnic_set_channels(struct net_device *dev,return err; } -if (channel->tx_count) { +if (qlcnic_82xx_check (adapter) && channel->tx_count) { err =qlcnic_validate_max_tx_rings (adapter, channel->tx_count);if (err)return err;
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1 -7
@@ -3647,11 +3647,6 @@ int qlcnic_validate_max_tx_rings(struct qlcnic_adapter *adapter, u32 txq)u8 max_hw =QLCNIC_MAX_TX_RINGS ;u32 max_allowed; -if (!qlcnic_82xx_check (adapter)) { -netdev_err (netdev,"No Multi TX-Q support\n" ); -return -EINVAL ; - } -if (!qlcnic_use_msi_x && !qlcnic_use_msi) {netdev_err (netdev,"No Multi TX-Q support in INT-x mode\n" );return -EINVAL ;
@@ -3691,8 +3686,7 @@ int qlcnic_validate_max_rss(struct qlcnic_adapter *adapter,u8 max_hw = adapter->ahw->max_rx_ques;u32 max_allowed; -if (qlcnic_82xx_check (adapter) && !qlcnic_use_msi_x && - !qlcnic_use_msi) { +if (!qlcnic_use_msi_x && !qlcnic_use_msi) {netdev_err (netdev,"No RSS support in INT-x mode\n" );return -EINVAL ; }
Signature · 1 line
1.8.1.4
PATCH 8/10 qlcnic: Skip unknown entry type while collecting firmware dump
In reply to Himanshu MadhaniFrom: Shahed Shaikh <[email protected]>
o Driver aborts the minidump collection operation when it finds an unknown entry opcode. This patch skips unknown entry type and resumes the minidump collection operation.
o Removed a comparision of collected dump size with expected dump size. Size may differ when driver decides to skip an entry.
--- .../net/ethernet/qlogic/qlcnic/qlcnic_minidump.c | 41 ++++++++++------------ 1 file changed, 19 insertions(+), 22 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c +19 -22
@@ -1187,41 +1187,38 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) }if (ops_index == ops_cnt) { -dev_info (&adapter->pdev->dev, -"Invalid entry type %d, exiting dump\n" , +dev_info (dev,"Skipping unknown entry opcode %d\n" , entry->hdr.type); - goto error; + entry->hdr.flags |=QLCNIC_DUMP_SKIP ; + entry_offset += entry->hdr.offset; +continue ; }/* Collect dump for this entry */ dump = fw_dump_ops[ops_index].handler (adapter, entry, buffer); -if (!qlcnic_valid_dump_entry (&adapter->pdev->dev, entry, dump)) +if (!qlcnic_valid_dump_entry (dev, entry, dump)) { entry->hdr.flags |=QLCNIC_DUMP_SKIP ; + entry_offset += entry->hdr.offset; +continue ; + } + buf_offset += entry->hdr.cap_size; entry_offset += entry->hdr.offset; buffer = fw_dump->data + buf_offset; } -if (dump_size != buf_offset) { -dev_info (&adapter->pdev->dev, -"Captured(%d) and expected size(%d) do not match\n" , - buf_offset, dump_size); - goto error; - }else { - fw_dump->clr =1 ; -snprintf (mesg,sizeof (mesg),"FW_DUMP=%s" , - adapter->netdev->name); -dev_info (&adapter->pdev->dev,"%s: Dump data, %d bytes captured\n" , - adapter->netdev->name, fw_dump->size); -/* Send a udev event to notify availability of FW dump */ -kobject_uevent_env (&adapter->pdev->dev.kobj,KOBJ_CHANGE , msg); -return 0 ; - } -error: + + fw_dump->clr =1 ; +snprintf (mesg,sizeof (mesg),"FW_DUMP=%s" , adapter->netdev->name); +dev_info (dev,"%s: Dump data %d bytes captured, template header size %d bytes\n" , + adapter->netdev->name, fw_dump->size, tmpl_hdr->size); +/* Send a udev event to notify availability of FW dump */ +kobject_uevent_env (&dev->kobj,KOBJ_CHANGE , msg); +if (fw_dump->use_pex_dma)dma_free_coherent (dev,QLC_PEX_DMA_READ_SIZE , fw_dump->dma_buffer, fw_dump->phys_addr); -vfree (fw_dump->data); -return -EINVAL ; + +return 0 ; }void qlcnic_83xx_get_minidump_template (struct qlcnic_adapter *adapter)
Signature · 1 line
1.8.1.4
PATCH 9/10 qlcnic: Register netdev in FAILED state for 83xx/84xx
In reply to Himanshu MadhaniFrom: Sucheta Chakraborty <[email protected]>
o Without failing probe, register netdev when device is in FAILED state.
o Device will come up with minimum functionality and allow diagnostics and repair of the adapter.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 + .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 32 ++++++++++++++----- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 16 ++++++---- .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 6 ++-- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 37 +++++++++++++++++----- drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c | 8 ++--- 6 files changed, 67 insertions(+), 33 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1 -0
@@ -961,6 +961,7 @@ struct qlcnic_ipaddr {#define __QLCNIC_SRIOV_CAPABLE 11#define __QLCNIC_MBX_POLL_ENABLE 12#define __QLCNIC_DIAG_MODE 13 +#define __QLCNIC_MAINTENANCE_MODE 16#define QLCNIC_INTERRUPT_TEST 1#define QLCNIC_LOOPBACK_TEST 2
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +24 -8
@@ -325,7 +325,8 @@ inline void qlcnic_83xx_clear_legacy_intr_mask(struct qlcnic_adapter *adapter)inline void qlcnic_83xx_set_legacy_intr_mask (struct qlcnic_adapter *adapter) { -writel (1 , adapter->tgt_mask_reg); +if (adapter->tgt_mask_reg) +writel (1 , adapter->tgt_mask_reg); }/* Enable MSI-x and INT-x interrupts */
@@ -498,8 +499,11 @@ void qlcnic_83xx_free_mbx_intr(struct qlcnic_adapter *adapter) num_msix =0 ;msleep (20 ); -synchronize_irq (adapter->msix_entries[num_msix].vector); -free_irq (adapter->msix_entries[num_msix].vector, adapter); + +if (adapter->msix_entries) { +synchronize_irq (adapter->msix_entries[num_msix].vector); +free_irq (adapter->msix_entries[num_msix].vector, adapter); + } }int qlcnic_83xx_setup_mbx_intr (struct qlcnic_adapter *adapter)
@@ -760,6 +764,9 @@ int qlcnic_83xx_issue_cmd(struct qlcnic_adapter *adapter,int cmd_type, err, opcode;unsigned long timeout; +if (!mbx) +return -EIO ; + opcode =LSW (cmd->req.arg[0 ]); cmd_type = cmd->type; err = mbx->ops->enqueue_cmd (adapter, cmd, &timeout);
@@ -3049,11 +3056,14 @@ int qlcnic_83xx_get_settings(struct qlcnic_adapter *adapter,int status =0 ;struct qlcnic_hardware_context *ahw = adapter->ahw; -/* Get port configuration info */ - status =qlcnic_83xx_get_port_info (adapter); -/* Get Link Status related info */ - config =qlcnic_83xx_test_link (adapter); - ahw->module_type =QLC_83XX_SFP_MODULE_TYPE (config); +if (!test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state)) { +/* Get port configuration info */ + status =qlcnic_83xx_get_port_info (adapter); +/* Get Link Status related info */ + config =qlcnic_83xx_test_link (adapter); + ahw->module_type =QLC_83XX_SFP_MODULE_TYPE (config); + } +/* hard code until there is a way to get it from flash */ ahw->board_type =QLCNIC_BRDTYPE_83XX_10G ;
@@ -3530,6 +3540,9 @@ void qlcnic_83xx_reinit_mbx_work(struct qlcnic_mailbox *mbx)void qlcnic_83xx_free_mailbox (struct qlcnic_mailbox *mbx) { +if (!mbx) +return ; +destroy_workqueue (mbx->work_q);kfree (mbx); }
@@ -3650,6 +3663,9 @@ void qlcnic_83xx_detach_mailbox_work(struct qlcnic_adapter *adapter) {struct qlcnic_mailbox *mbx = adapter->ahw->mailbox; +if (!mbx) +return ; +clear_bit (QLC_83XX_MBX_READY , &mbx->status);complete (&mbx->completion);cancel_work_sync (&mbx->work);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +9 -7
@@ -2190,20 +2190,24 @@ int qlcnic_83xx_init(struct qlcnic_adapter *adapter, int pci_using_dac)return err; } +if (qlcnic_83xx_read_flash_descriptor_table (adapter) || +qlcnic_83xx_read_flash_mfg_id (adapter)) { +dev_err (&adapter->pdev->dev,"Failed reading flash mfg id\n" ); + err = -ENOTRECOVERABLE ; + goto detach_mbx; + } + err =qlcnic_83xx_check_hw_status (adapter);if (err) goto detach_mbx; -if (!qlcnic_83xx_read_flash_descriptor_table (adapter)) -qlcnic_83xx_read_flash_mfg_id (adapter); - err =qlcnic_83xx_get_fw_info (adapter);if (err) goto detach_mbx; err =qlcnic_83xx_idc_init (adapter);if (err) - goto clear_fw_info; + goto detach_mbx; err =qlcnic_setup_intr (adapter,0 ,0 );if (err) {
@@ -2247,12 +2251,10 @@ disable_mbx_intr: disable_intr:qlcnic_teardown_intr (adapter); -clear_fw_info: -kfree (ahw->fw_info); - detach_mbx:qlcnic_83xx_detach_mailbox_work (adapter);qlcnic_83xx_free_mailbox (ahw->mailbox); + ahw->mailbox =NULL ; exit:return err; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +2 -4
@@ -1692,7 +1692,6 @@ qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump;bool valid_mask = false;int i, ret =0 ; -u32 state;switch (val->flag) {case QLCNIC_FORCE_FW_DUMP_KEY :
@@ -1745,9 +1744,8 @@ qlcnic_set_dump(struct net_device *netdev, struct ethtool_dump *val)case QLCNIC_SET_QUIESCENT :case QLCNIC_RESET_QUIESCENT : - state =QLC_SHARED_REG_RD32 (adapter,QLCNIC_CRB_DEV_STATE ); -if (state ==QLCNIC_DEV_FAILED || (state ==QLCNIC_DEV_BADBAD )) -netdev_info (netdev,"Device in FAILED state\n" ); +if (test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state)) +netdev_info (netdev,"Device is in non-operational state\n" );break ;default :
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +29 -8
@@ -2305,10 +2305,23 @@ qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)qlcnic_83xx_check_vf (adapter, ent); adapter->portnum = adapter->ahw->pci_func; err =qlcnic_83xx_init (adapter, pci_using_dac); +if (err) { -dev_err (&pdev->dev,"%s: failed\n" , __func__); - goto err_out_free_hw; +switch (err) { +case -ENOTRECOVERABLE : +dev_err (&pdev->dev,"Adapter initialization failed due to a faulty hardware.\n" +"\t\tPlease replace the adapter with new one and return the faulty adapter for repair\n" ); + goto err_out_free_hw; +case -ENOMEM : +dev_err (&pdev->dev,"Adapter initialization failed. Please reboot\n" ); + goto err_out_free_hw; +default : +dev_err (&pdev->dev,"Adapter initialization failed. A reboot may be required to recover from this failure.\n" +"\t\tIf reboot does not help to recover from this failure, try a flash update of the adapter\n" ); + goto err_out_maintenance_mode; + } } +if (qlcnic_sriov_vf_check (adapter))return 0 ; }else {
@@ -2408,8 +2421,16 @@ err_out_disable_pdev:return err; err_out_maintenance_mode: +set_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state); netdev->netdev_ops = &qlcnic_netdev_failed_ops;SET_ETHTOOL_OPS (netdev, &qlcnic_ethtool_failed_ops); + ahw->port_type =QLCNIC_XGBE ; + +if (qlcnic_83xx_check (adapter)) + adapter->tgt_status_reg =NULL ; +else + ahw->board_type =QLCNIC_BRDTYPE_P3P_10G_SFP_PLUS ; + err =register_netdev (netdev);if (err) {
@@ -2532,12 +2553,11 @@ static int qlcnic_resume(struct pci_dev *pdev)static int qlcnic_open (struct net_device *netdev) {struct qlcnic_adapter *adapter =netdev_priv (netdev); -u32 state;int err; - state =QLC_SHARED_REG_RD32 (adapter,QLCNIC_CRB_DEV_STATE ); -if (state ==QLCNIC_DEV_FAILED || state ==QLCNIC_DEV_BADBAD ) { -netdev_err (netdev,"%s: Device is in FAILED state\n" , __func__); +if (test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state)) { +netdev_err (netdev,"%s: Device is in non-operational state\n" , + __func__);return -EIO ; }
@@ -3250,8 +3270,9 @@ void qlcnic_82xx_dev_request_reset(struct qlcnic_adapter *adapter, u32 key)return ; state =QLC_SHARED_REG_RD32 (adapter,QLCNIC_CRB_DEV_STATE ); -if (state ==QLCNIC_DEV_FAILED || state ==QLCNIC_DEV_BADBAD ) { -netdev_err (adapter->netdev,"%s: Device is in FAILED state\n" , + +if (test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state)) { +netdev_err (adapter->netdev,"%s: Device is in non-operational state\n" , __func__);qlcnic_api_unlock (adapter);
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c +2 -6
@@ -1272,7 +1272,6 @@ void qlcnic_remove_sysfs_entries(struct qlcnic_adapter *adapter)void qlcnic_create_diag_entries (struct qlcnic_adapter *adapter) {struct device *dev = &adapter->pdev->dev; -u32 state;if (device_create_bin_file (dev, &bin_attr_port_stats))dev_info (dev,"failed to create port stats sysfs entry" );
@@ -1286,8 +1285,7 @@ void qlcnic_create_diag_entries(struct qlcnic_adapter *adapter)if (device_create_bin_file (dev, &bin_attr_mem))dev_info (dev,"failed to create mem sysfs entry\n" ); - state =QLC_SHARED_REG_RD32 (adapter,QLCNIC_CRB_DEV_STATE ); -if (state ==QLCNIC_DEV_FAILED || state ==QLCNIC_DEV_BADBAD ) +if (test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state))return ;if (device_create_bin_file (dev, &bin_attr_pci_config))
@@ -1313,7 +1311,6 @@ void qlcnic_create_diag_entries(struct qlcnic_adapter *adapter)void qlcnic_remove_diag_entries (struct qlcnic_adapter *adapter) {struct device *dev = &adapter->pdev->dev; -u32 state;device_remove_bin_file (dev, &bin_attr_port_stats);
@@ -1323,8 +1320,7 @@ void qlcnic_remove_diag_entries(struct qlcnic_adapter *adapter)device_remove_bin_file (dev, &bin_attr_crb);device_remove_bin_file (dev, &bin_attr_mem); - state =QLC_SHARED_REG_RD32 (adapter,QLCNIC_CRB_DEV_STATE ); -if (state ==QLCNIC_DEV_FAILED || state ==QLCNIC_DEV_BADBAD ) +if (test_bit (__QLCNIC_MAINTENANCE_MODE, &adapter->state))return ;device_remove_bin_file (dev, &bin_attr_pci_config);
Signature · 1 line
1.8.1.4
PATCH 10/10 qlcnic: update version to 5.3.51
In reply to Himanshu MadhaniFrom: Himanshu Madhani <[email protected]>
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +2 -2
@@ -38,8 +38,8 @@#define _QLCNIC_LINUX_MAJOR 5#define _QLCNIC_LINUX_MINOR 3 -#define _QLCNIC_LINUX_SUBVERSION 50 -#define QLCNIC_LINUX_VERSIONID "5.3.50" +#define _QLCNIC_LINUX_SUBVERSION 51 +#define QLCNIC_LINUX_VERSIONID "5.3.51"#define QLCNIC_DRV_IDC_VER 0x01#define QLCNIC_DRIVER_VERSION ((_QLCNIC_LINUX_MAJOR << 16) |\ (_QLCNIC_LINUX_MINOR << 8) | (_QLCNIC_LINUX_SUBVERSION))
Signature · 1 line
1.8.1.4
Re: [PATCH net-next 02/10] qlcnic: Enhance ethtool to display ring indices and interrupt mask
In reply to Himanshu MadhaniQuoted 18 lines · Himanshu Madhani
From: Pratik Pujar <[email protected]>
o Updated ethtool -d <ethX> option to display ring indices for Transmit(Tx), Receive(Rx), and Status(St) rings.
o Updated ethtool -d <ethX> option to display ring interrupt mask for Transmit(Tx), and Status(St) rings.Signed-off-by Pratik Pujar <[email protected]>Signed-off-by Himanshu Madhani <[email protected]>--- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 8 +-- .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 61 +++++++++++++++++----- 2 files changed, 51 insertions(+), 18 deletions(-)drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +0
-0
[...]
Quoted 7 lines
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +0
-3@@ -512,21 +527,39 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)if (!test_bit (__QLCNIC_DEV_UP, &adapter->state))return ; - regs_buff[i++] =0xFFEFCDAB ;/* Marker btw regs and ring count*/ - - regs_buff[i++] =1 ;/* No. of tx ring */
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) · line 531
Quoted 10 lines
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c +2
-8- regs_buff[i++] =le32_to_cpu (*(adapter->tx_ring->hw_consumer)); - regs_buff[i++] =readl (adapter->tx_ring->crb_cmd_producer); - - regs_buff[i++] =2 ;/* No. of rx ring */ - regs_buff[i++] =readl (recv_ctx->rds_rings[0 ].crb_rcv_producer); - regs_buff[i++] =readl (recv_ctx->rds_rings[1 ].crb_rcv_producer); - - regs_buff[i++] = adapter->max_sds_rings; +/* Marker btw regs and TX ring count */ + regs_buff[i++] =QLCNIC_TX_RING_MARKER ;
[...]
This is really sad; why don't you write a proper dump parser for ethtool rather than including markers that make it slightly easier to read hex dumps?
And when changing the dump format in an incompatible way like this, you should also bump the version number.
Ben.
Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Re: [PATCH net-next 01/10] qlcnic: Print informational messages only once during driver load.
In reply to Himanshu MadhaniQuoted 17 lines · On Fri, 4 Oct 2013 14:30:48 -0400 Himanshu Madhani…
From: Sucheta Chakraborty <[email protected]>
Signed-off-by Sucheta Chakraborty <[email protected]>Signed-off-by Himanshu Madhani <[email protected]>--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 + .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 12 ----------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 25 ++++++++++++++++++---- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 4 files changed, 23 insertions(+), 16 deletions(-)drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +0
-0
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h struct qlcnic_npar_info { · line 1205
Quoted 7 lines
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1
-0@@ -1199,6 +1199,7 @@ struct qlcnic_npar_info {u8 promisc_mode;u8 offload_flags;u8 pci_func; +u8 mac[ETH_ALEN ]; };
There is a field in netdevice which should probably be used for this perm_addr.
And then this could be corrected:
static void qlcnic_dcb_get_perm_hw_addr(struct net_device *netdev, u8 *addr)
{
memcpy(addr, netdev->dev_addr, netdev->addr_len);
}RE: [PATCH net-next 02/10] qlcnic: Enhance ethtool to display ring indices and interrupt mask
In reply to Ben HutchingsQuoted 8 lines
This is really sad; why don't you write a proper dump parser for ethtool rather than including markers that make it slightly easier to read hex dumps?
And when changing the dump format in an incompatible way like this, you should also bump the version number.
We will resubmit the patch after making the appropriate changes.
Quoted 6 lines
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
RE: [PATCH net-next 01/10] qlcnic: Print informational messages only once during driver load.
In reply to Stephen HemmingerQuoted 38 lines
-----Original Message-----
From: Stephen Hemminger [mailto:[email protected]]
Sent: Saturday, October 05, 2013 3:00 AM
To: Himanshu Madhani
Cc: David Miller; netdev; Dept-NX Linux NIC Driver; Sucheta Chakraborty
Subject: Re: [PATCH net-next 01/10] qlcnic: Print informational messages only once during driver load.Quoted 8 lines · On Fri, 4 Oct 2013 14:30:48 -0400 Himanshu Madhani…
From: Sucheta Chakraborty <[email protected]>
Signed-off-by Sucheta Chakraborty <[email protected]>Signed-off-by Himanshu Madhani <[email protected]>--- drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 1 + .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 12 ----------- .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 25++++++++++++++++++----
Quoted 10 lines
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 4 files changed, 23 insertions(+), 16 deletions(-)drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +0
-0drivers/net/ethernet/qlogic/qlcnic/qlcnic.h struct qlcnic_npar_info { · line 1205
Quoted 7 lines
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +1
-0@@ -1199,6 +1199,7 @@ struct qlcnic_npar_info {u8 promisc_mode;u8 offload_flags;u8 pci_func; +u8 mac[ETH_ALEN ]; };
Quoted 3 lines
There is a field in netdevice which should probably be used for this
perm_addr.
This information is logged from the management function in Virtual NIC mode. Management function do not a have access to the netdev info structure of other functions. So we cannot make the changes as suggested.
Quoted 5 lines
And then this could be corrected:
static void qlcnic_dcb_get_perm_hw_addr(struct
net_device*netdev, u8*addr) { memcpy(addr, netdev->dev_addr, netdev->addr_len); }
Will incorporate this change in "dcb cleanup patch".
Thanks,
Sucheta.