qla2xxx: Updates for 2.6.31 merge-window [8.03.01-k3]
Subsystems (2)
PATCH 1/20 qla2xxx: Export negotiated fabric-parameters for application support.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_attr.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +11 -0
@@ -1115,6 +1115,15 @@ qla2x00_vn_port_mac_address_show(struct device *dev, vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]); } +static ssize_t +qla2x00_fabric_param_show (struct device *dev,struct device_attribute *attr, +char *buf) +{ +scsi_qla_host_t *vha =shost_priv (class_to_shost (dev)); + +return snprintf (buf,PAGE_SIZE ,"%d\n" , vha->hw->switch_cap); +} + static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
@@ -1146,6 +1155,7 @@ static DEVICE_ATTR(flash_block_size, S_IRUGO, qla2x00_flash_block_size_show, static DEVICE_ATTR(vlan_id, S_IRUGO, qla2x00_vlan_id_show, NULL); static DEVICE_ATTR(vn_port_mac_address, S_IRUGO, qla2x00_vn_port_mac_address_show, NULL); +static DEVICE_ATTR(fabric_param, S_IRUGO, qla2x00_fabric_param_show, NULL);struct device_attribute *qla2x00_host_attrs[] = { &dev_attr_driver_version,
@@ -1170,6 +1180,7 @@ struct device_attribute *qla2x00_host_attrs[] = { &dev_attr_flash_block_size, &dev_attr_vlan_id, &dev_attr_vn_port_mac_address, + &dev_attr_fabric_param, NULL, };
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 4/20 qla2xxx: Correct logic-bug in set-model-info().
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +1 -1
@@ -1538,7 +1538,7 @@ qla2x00_set_model_info(scsi_qla_host_t *vha, uint8_t *model, size_t len,char *st, *en;uint16_t index;struct qla_hw_data *ha = vha->hw; -int use_tbl = !IS_QLA25XX (ha) &&IS_QLA81XX (ha); +int use_tbl = !IS_QLA25XX (ha) && !IS_QLA81XX (ha);if (memcmp (model,BINZERO , len) !=0 ) {strncpy (ha->model_number, model, len);
Signature · 1 line
1.6.3.1.244.gf9275
cover qla2xxx: Updates for 2.6.31 merge-window [8.03.01-k3]
Another round of updates/fixes for 2.6.31.
drivers/scsi/qla2xxx/qla_attr.c | 166 +++++++++++++++++++++++++++++++++--- drivers/scsi/qla2xxx/qla_dbg.c | 6 +- drivers/scsi/qla2xxx/qla_def.h | 13 +++- drivers/scsi/qla2xxx/qla_fw.h | 4 +- drivers/scsi/qla2xxx/qla_gbl.h | 14 +++- drivers/scsi/qla2xxx/qla_gs.c | 3 + drivers/scsi/qla2xxx/qla_init.c | 120 +++++++++++++++++++++----- drivers/scsi/qla2xxx/qla_iocb.c | 16 ++-- drivers/scsi/qla2xxx/qla_isr.c | 4 +- drivers/scsi/qla2xxx/qla_mbx.c | 154 ++++++++++++++++++++++++++++++++- drivers/scsi/qla2xxx/qla_os.c | 61 ++++++++----- drivers/scsi/qla2xxx/qla_sup.c | 11 ++- drivers/scsi/qla2xxx/qla_version.h | 2 +- 13 files changed, 490 insertions(+), 84 deletions(-)
Here's the commits:
Andrew Vasquez (18):
qla2xxx: Export negotiated fabric-parameters for application support.
qla2xxx: Export XGMAC statistics on supported ISPs.
qla2xxx: Export TLV data on supported ISPs.
qla2xxx: Correct logic-bug in set-model-info().
qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs.
qla2xxx: Use 'proper' DID_* status code for dropped-frame scenarios.
qla2xxx: Check status of qla2x00_get_fw_version() call.
qla2xxx: Mark a port's state as needing-rediscovery during link
disruptions.
qla2xxx: Add 10Gb iiDMA support.
qla2xxx: Add notification message when an NPIV fails to acquire a
port-id.
qla2xxx: Fallback enode-mac should not be a multicast address.
qla2xxx: Avoid redundant RISC reset during (re)-initialization.
qla2xxx: Query supported RISC registers bits in determining a
paused-state.
qla2xxx: Avoid explicit LOGO during driver host tear-down.
qla2xxx: Reduce lock-contention during do-work processing.
qla2xxx: Export additional firmware-states for application support.
qla2xxx: Synchronize MPI settings after a PE Reset.
qla2xxx: Update version number to 8.03.01-k3.
Anirban Chakraborty (2):
qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.
qla2xxx: Correct NULL pointer bug in cpu affinity mode.
PATCH 2/20 qla2xxx: Export XGMAC statistics on supported ISPs.
--- drivers/scsi/qla2xxx/qla_attr.c | 57 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_def.h | 4 +++ drivers/scsi/qla2xxx/qla_fw.h | 1 + drivers/scsi/qla2xxx/qla_gbl.h | 3 ++ drivers/scsi/qla2xxx/qla_mbx.c | 38 ++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 4 +++ 6 files changed, 107 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +57 -0
@@ -692,6 +692,58 @@ static struct bin_attribute sysfs_edc_status_attr = { .read = qla2x00_sysfs_read_edc_status, }; +static ssize_t +qla2x00_sysfs_read_xgmac_stats (struct kobject *kobj, +struct bin_attribute *bin_attr, +char *buf,loff_t off,size_t count) +{ +struct scsi_qla_host *vha =shost_priv (dev_to_shost (container_of (kobj, + struct device, kobj))); +struct qla_hw_data *ha = vha->hw; +int rval; +uint16_t actual_size; + +if (!capable (CAP_SYS_ADMIN ) || off !=0 || count >XGMAC_DATA_SIZE ) +return 0 ; + +if (ha->xgmac_data) + goto do_read; + + ha->xgmac_data =dma_alloc_coherent (&ha->pdev->dev,XGMAC_DATA_SIZE , + &ha->xgmac_data_dma,GFP_KERNEL ); +if (!ha->xgmac_data) { +qla_printk (KERN_WARNING , ha, +"Unable to allocate memory for XGMAC read-data.\n" ); +return 0 ; + } + +do_read: + actual_size =0 ; +memset (ha->xgmac_data,0 ,XGMAC_DATA_SIZE ); + + rval =qla2x00_get_xgmac_stats (vha, ha->xgmac_data_dma, +XGMAC_DATA_SIZE , &actual_size); +if (rval !=QLA_SUCCESS ) { +qla_printk (KERN_WARNING , ha, +"Unable to read XGMAC data (%x).\n" , rval); + count =0 ; + } + + count = actual_size > count ? count: actual_size; +memcpy (buf, ha->xgmac_data, count); + +return count; +} + +static struct bin_attribute sysfs_xgmac_stats_attr = { + .attr = { + .name ="xgmac_stats" , + .mode =S_IRUSR , + }, + .size =0 , + .read = qla2x00_sysfs_read_xgmac_stats, +}; + static struct sysfs_entry { char *name; struct bin_attribute *attr;
@@ -706,6 +758,7 @@ static struct sysfs_entry { { "reset", &sysfs_reset_attr, }, { "edc", &sysfs_edc_attr, 2 }, { "edc_status", &sysfs_edc_status_attr, 2 }, + { "xgmac_stats", &sysfs_xgmac_stats_attr, 3 }, { NULL }, };
@@ -721,6 +774,8 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *vha)continue ;if (iter->is4GBp_only ==2 && !IS_QLA25XX (vha->hw))continue ; +if (iter->is4GBp_only ==3 && !IS_QLA81XX (vha->hw)) +continue ; ret =sysfs_create_bin_file (&host->shost_gendev.kobj, iter->attr);
@@ -743,6 +798,8 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *vha)continue ;if (iter->is4GBp_only ==2 && !IS_QLA25XX (ha))continue ; +if (iter->is4GBp_only ==3 && !IS_QLA81XX (ha)) +continue ;sysfs_remove_bin_file (&host->shost_gendev.kobj, iter->attr);
drivers/scsi/qla2xxx/qla_def.h +4 -0
@@ -2397,6 +2397,10 @@ struct qla_hw_data {dma_addr_t edc_data_dma;uint16_t edc_data_len; +#define XGMAC_DATA_SIZE PAGE_SIZE +void *xgmac_data; +dma_addr_t xgmac_data_dma; +struct task_struct *dpc_thread;uint8_t dpc_active;/* DPC routine is active */
drivers/scsi/qla2xxx/qla_fw.h +1 -0
@@ -1405,6 +1405,7 @@ struct access_chip_rsp_84xx {#define MBC_IDC_ACK 0x101#define MBC_RESTART_MPI_FW 0x3d#define MBC_FLASH_ACCESS_CTRL 0x3e/* Control flash access. */ +#define MBC_GET_XGMAC_STATS 0x7a/* Flash access control option field bit definitions */ #define FAC_OPT_FORCE_SEMAPHORE BIT_15
drivers/scsi/qla2xxx/qla_gbl.h +3 -0
@@ -293,6 +293,9 @@ qla81xx_fac_do_write_enable(scsi_qla_host_t *, int);extern int qla81xx_fac_erase_sector (scsi_qla_host_t *,uint32_t ,uint32_t ); +extern int +qla2x00_get_xgmac_stats (scsi_qla_host_t *,dma_addr_t ,uint16_t ,uint16_t *); +/* * Global Function Prototypes in qla_isr.c source file. */
drivers/scsi/qla2xxx/qla_mbx.c +38 -0
@@ -3462,3 +3462,41 @@ qla2x00_write_edc(scsi_qla_host_t *vha, uint16_t dev, uint16_t adr,return rval; } + +int +qla2x00_get_xgmac_stats (scsi_qla_host_t *vha,dma_addr_t stats_dma, +uint16_t size_in_bytes,uint16_t *actual_size) +{ +int rval; +mbx_cmd_t mc; +mbx_cmd_t *mcp = &mc; + +if (!IS_QLA81XX (vha->hw)) +return QLA_FUNCTION_FAILED ; + +DEBUG11 (printk ("%s(%ld): entered.\n" , __func__, vha->host_no)); + + mcp->mb[0 ] =MBC_GET_XGMAC_STATS ; + mcp->mb[2 ] =MSW (stats_dma); + mcp->mb[3 ] =LSW (stats_dma); + mcp->mb[6 ] =MSW (MSD (stats_dma)); + mcp->mb[7 ] =LSW (MSD (stats_dma)); + mcp->mb[8 ] = size_in_bytes >>2 ; + mcp->out_mb =MBX_8 |MBX_7 |MBX_6 |MBX_3 |MBX_2 |MBX_0 ; + mcp->in_mb =MBX_2 |MBX_1 |MBX_0 ; + mcp->tov =MBX_TOV_SECONDS ; + mcp->flags =0 ; + rval =qla2x00_mailbox_command (vha, mcp); + +if (rval !=QLA_SUCCESS ) { +DEBUG2_3_11 (printk ("%s(%ld): failed=%x mb[0]=0x%x " +"mb[1]=0x%x mb[2]=0x%x.\n" , __func__, vha->host_no, rval, + mcp->mb[0 ], mcp->mb[1 ], mcp->mb[2 ])); + }else { +DEBUG11 (printk ("%s(%ld): done.\n" , __func__, vha->host_no)); + + *actual_size = mcp->mb[2 ] <<2 ; + } + +return rval; +}
drivers/scsi/qla2xxx/qla_os.c +4 -0
@@ -2434,6 +2434,10 @@ qla2x00_mem_free(struct qla_hw_data *ha)vfree (ha->fw_dump); } +if (ha->xgmac_data) +dma_free_coherent (&ha->pdev->dev,XGMAC_DATA_SIZE , + ha->xgmac_data, ha->xgmac_data_dma); +if (ha->sns_cmd)dma_free_coherent (&ha->pdev->dev,sizeof (struct sns_cmd_pkt ), ha->sns_cmd, ha->sns_cmd_dma);
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 3/20 qla2xxx: Export TLV data on supported ISPs.
In reply to Andrew VasquezFirmware currently provides PB and PGF TLVs.
--- drivers/scsi/qla2xxx/qla_attr.c | 52 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_def.h | 4 +++ drivers/scsi/qla2xxx/qla_fw.h | 1 + drivers/scsi/qla2xxx/qla_gbl.h | 3 ++ drivers/scsi/qla2xxx/qla_mbx.c | 37 +++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_os.c | 4 +++ 6 files changed, 101 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +52 -0
@@ -744,6 +744,57 @@ static struct bin_attribute sysfs_xgmac_stats_attr = { .read = qla2x00_sysfs_read_xgmac_stats, }; +static ssize_t +qla2x00_sysfs_read_dcbx_tlv (struct kobject *kobj, +struct bin_attribute *bin_attr, +char *buf,loff_t off,size_t count) +{ +struct scsi_qla_host *vha =shost_priv (dev_to_shost (container_of (kobj, + struct device, kobj))); +struct qla_hw_data *ha = vha->hw; +int rval; +uint16_t actual_size; + +if (!capable (CAP_SYS_ADMIN ) || off !=0 || count >DCBX_TLV_DATA_SIZE ) +return 0 ; + +if (ha->dcbx_tlv) + goto do_read; + + ha->dcbx_tlv =dma_alloc_coherent (&ha->pdev->dev,DCBX_TLV_DATA_SIZE , + &ha->dcbx_tlv_dma,GFP_KERNEL ); +if (!ha->dcbx_tlv) { +qla_printk (KERN_WARNING , ha, +"Unable to allocate memory for DCBX TLV read-data.\n" ); +return 0 ; + } + +do_read: + actual_size =0 ; +memset (ha->dcbx_tlv,0 ,DCBX_TLV_DATA_SIZE ); + + rval =qla2x00_get_dcbx_params (vha, ha->dcbx_tlv_dma, +DCBX_TLV_DATA_SIZE ); +if (rval !=QLA_SUCCESS ) { +qla_printk (KERN_WARNING , ha, +"Unable to read DCBX TLV data (%x).\n" , rval); + count =0 ; + } + +memcpy (buf, ha->dcbx_tlv, count); + +return count; +} + +static struct bin_attribute sysfs_dcbx_tlv_attr = { + .attr = { + .name ="dcbx_tlv" , + .mode =S_IRUSR , + }, + .size =0 , + .read = qla2x00_sysfs_read_dcbx_tlv, +}; + static struct sysfs_entry { char *name; struct bin_attribute *attr;
@@ -759,6 +810,7 @@ static struct sysfs_entry { { "edc", &sysfs_edc_attr, 2 }, { "edc_status", &sysfs_edc_status_attr, 2 }, { "xgmac_stats", &sysfs_xgmac_stats_attr, 3 }, + { "dcbx_tlv", &sysfs_dcbx_tlv_attr, 3 }, { NULL }, };
drivers/scsi/qla2xxx/qla_def.h +4 -0
@@ -2401,6 +2401,10 @@ struct qla_hw_data {void *xgmac_data;dma_addr_t xgmac_data_dma; +#define DCBX_TLV_DATA_SIZE PAGE_SIZE +void *dcbx_tlv; +dma_addr_t dcbx_tlv_dma; +struct task_struct *dpc_thread;uint8_t dpc_active;/* DPC routine is active */
drivers/scsi/qla2xxx/qla_fw.h +1 -0
@@ -1406,6 +1406,7 @@ struct access_chip_rsp_84xx {#define MBC_RESTART_MPI_FW 0x3d#define MBC_FLASH_ACCESS_CTRL 0x3e/* Control flash access. */ #define MBC_GET_XGMAC_STATS 0x7a +#define MBC_GET_DCBX_PARAMS 0x51/* Flash access control option field bit definitions */ #define FAC_OPT_FORCE_SEMAPHORE BIT_15
drivers/scsi/qla2xxx/qla_gbl.h +3 -0
@@ -296,6 +296,9 @@ qla81xx_fac_erase_sector(scsi_qla_host_t *, uint32_t, uint32_t);extern int qla2x00_get_xgmac_stats (scsi_qla_host_t *,dma_addr_t ,uint16_t ,uint16_t *); +extern int +qla2x00_get_dcbx_params (scsi_qla_host_t *,dma_addr_t ,uint16_t ); +/* * Global Function Prototypes in qla_isr.c source file. */
drivers/scsi/qla2xxx/qla_mbx.c +37 -0
@@ -3500,3 +3500,40 @@ qla2x00_get_xgmac_stats(scsi_qla_host_t *vha, dma_addr_t stats_dma,return rval; } + +int +qla2x00_get_dcbx_params (scsi_qla_host_t *vha,dma_addr_t tlv_dma, +uint16_t size) +{ +int rval; +mbx_cmd_t mc; +mbx_cmd_t *mcp = &mc; + +if (!IS_QLA81XX (vha->hw)) +return QLA_FUNCTION_FAILED ; + +DEBUG11 (printk ("%s(%ld): entered.\n" , __func__, vha->host_no)); + + mcp->mb[0 ] =MBC_GET_DCBX_PARAMS ; + mcp->mb[1 ] =0 ; + mcp->mb[2 ] =MSW (tlv_dma); + mcp->mb[3 ] =LSW (tlv_dma); + mcp->mb[6 ] =MSW (MSD (tlv_dma)); + mcp->mb[7 ] =LSW (MSD (tlv_dma)); + mcp->mb[8 ] = size; + mcp->out_mb =MBX_8 |MBX_7 |MBX_6 |MBX_3 |MBX_2 |MBX_1 |MBX_0 ; + mcp->in_mb =MBX_2 |MBX_1 |MBX_0 ; + mcp->tov =MBX_TOV_SECONDS ; + mcp->flags =0 ; + rval =qla2x00_mailbox_command (vha, mcp); + +if (rval !=QLA_SUCCESS ) { +DEBUG2_3_11 (printk ("%s(%ld): failed=%x mb[0]=0x%x " +"mb[1]=0x%x mb[2]=0x%x.\n" , __func__, vha->host_no, rval, + mcp->mb[0 ], mcp->mb[1 ], mcp->mb[2 ])); + }else { +DEBUG11 (printk ("%s(%ld): done.\n" , __func__, vha->host_no)); + } + +return rval; +}
drivers/scsi/qla2xxx/qla_os.c +4 -0
@@ -2434,6 +2434,10 @@ qla2x00_mem_free(struct qla_hw_data *ha)vfree (ha->fw_dump); } +if (ha->dcbx_tlv) +dma_free_coherent (&ha->pdev->dev,DCBX_TLV_DATA_SIZE , + ha->dcbx_tlv, ha->dcbx_tlv_dma); +if (ha->xgmac_data)dma_free_coherent (&ha->pdev->dev,XGMAC_DATA_SIZE , ha->xgmac_data, ha->xgmac_data_dma);
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 5/20 qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.
In reply to Andrew VasquezFrom: Anirban Chakraborty <[email protected]>
--- drivers/scsi/qla2xxx/qla_attr.c | 14 +++++++------- drivers/scsi/qla2xxx/qla_def.h | 1 - drivers/scsi/qla2xxx/qla_os.c | 1 + drivers/scsi/qla2xxx/qla_sup.c | 8 +++----- 4 files changed, 11 insertions(+), 13 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +7 -7
@@ -1651,13 +1651,13 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)qla24xx_vport_disable (fc_vport, disable); ret =0 ; -if (ha->cur_vport_count <= ha->flex_port_count || ql2xmultique_tag - || ha->max_req_queues ==1 || !ha->npiv_info) +if (ql2xmaxqueues ==1 || ql2xmultique_tag || !ha->npiv_info) goto vport_queue;/* Create a request queue in QoS mode for the vport */ -for (cnt = ha->flex_port_count; cnt < ha->nvram_npiv_size; cnt++) { -if (ha->npiv_info[cnt].port_name == vha->port_name && - ha->npiv_info[cnt].node_name == vha->node_name) { +for (cnt =0 ; cnt < ha->nvram_npiv_size; cnt++) { +if (memcmp (ha->npiv_info[cnt].port_name, vha->port_name,8 ) ==0 + &&memcmp (ha->npiv_info[cnt].node_name, vha->node_name, +8 ) ==0 ) { qos = ha->npiv_info[cnt].q_qos;break ; }
@@ -1671,8 +1671,8 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable) vha->vp_idx); else DEBUG2(qla_printk(KERN_INFO, ha, -"Request Que:%d created for vp_idx:%d\n" , - ret, vha->vp_idx)); +"Request Que:%d (QoS: %d) created for vp_idx:%d\n" , + ret, qos, vha->vp_idx)); } vport_queue:
drivers/scsi/qla2xxx/qla_def.h +0 -1
@@ -2545,7 +2545,6 @@ struct qla_hw_data {uint16_t num_vsans;/* number of vsan created */ uint16_t max_npiv_vports;/* 63 or 125 per topoloty */ int cur_vport_count; -uint16_t flex_port_count;struct qla_chip_state_84xx *cs84xx;struct qla_statistics qla_stats;
drivers/scsi/qla2xxx/qla_os.c +1 -0
@@ -1853,6 +1853,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->init_cb_size =sizeof (struct mid_init_cb_81xx ); ha->gid_list_info_size =8 ; ha->optrom_size =OPTROM_SIZE_81XX ; + ha->nvram_npiv_size =QLA_MAX_VPORTS_QLA25XX ; ha->isp_ops = &qla81xx_isp_ops; ha->flash_conf_off =FARX_ACCESS_FLASH_CONF_81XX ; ha->flash_data_off =FARX_ACCESS_FLASH_DATA_81XX ;
drivers/scsi/qla2xxx/qla_sup.c +3 -5
@@ -920,12 +920,13 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) entry = data +sizeof (struct qla_npiv_header ); cnt =le16_to_cpu (hdr.entries); - ha->flex_port_count = cnt;for (i =0 ; cnt; cnt--, entry++, i++) {uint16_t flags;struct fc_vport_identifiers vid;struct fc_vport *vport; +memcpy (&ha->npiv_info[i], entry,sizeof (struct qla_npiv_entry )); + flags =le16_to_cpu (entry->flags);if (flags ==0xffff )continue ;
@@ -939,9 +940,7 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) vid.port_name =wwn_to_u64 (entry->port_name); vid.node_name =wwn_to_u64 (entry->node_name); -memcpy (&ha->npiv_info[i], entry,sizeof (struct qla_npiv_entry )); - -DEBUG2 (qla_printk (KERN_DEBUG , ha,"NPIV[%02x]: wwpn=%llx " +DEBUG2 (qla_printk (KERN_INFO , ha,"NPIV[%02x]: wwpn=%llx " "wwnn=%llx vf_id=0x%x Q_qos=0x%x F_qos=0x%x.\n" , cnt, vid.port_name, vid.node_name,le16_to_cpu (entry->vf_id), entry->q_qos, entry->f_qos));
@@ -957,7 +956,6 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) } done:kfree (data); - ha->npiv_info =NULL ; } static int
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 10/20 qla2xxx: Mark a port's state as needing-rediscovery during link disruptions.
In reply to Andrew VasquezWith RSCN states not being kept across qla2x00_configure_loop() invocations, loop-resync distruptions during fabric-discovery may cause ports to remain in a lost state. Force state renegotiation during a follow-on configure-loop iteration.
--- drivers/scsi/qla2xxx/qla_init.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +3 -1
@@ -2064,8 +2064,10 @@ qla2x00_configure_loop(scsi_qla_host_t *vha)if (test_bit (LOOP_RESYNC_NEEDED , &vha->dpc_flags)) {if (test_bit (LOCAL_LOOP_UPDATE , &save_flags))set_bit (LOCAL_LOOP_UPDATE , &vha->dpc_flags); -if (test_bit (RSCN_UPDATE , &save_flags)) +if (test_bit (RSCN_UPDATE , &save_flags)) {set_bit (RSCN_UPDATE , &vha->dpc_flags); + vha->flags.rscn_queue_overflow =1 ; + } }return (rval);
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 12/20 qla2xxx: Add notification message when an NPIV fails to acquire a port-id.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_mbx.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_mbx.c +4 -1
@@ -2753,8 +2753,11 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,if (vp_idx ==0 )return ; -if (MSB (stat) ==1 ) +if (MSB (stat) ==1 ) { +DEBUG2 (printk ("scsi(%ld): Could not acquire ID for " +"VP[%d].\n" , vha->host_no, vp_idx));return ; + }list_for_each_entry_safe (vp, tvp, &ha->vp_list, list)if (vp_idx == vp->vp_idx)
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 7/20 qla2xxx: Use 'proper' DID_* status code for dropped-frame scenarios.
In reply to Andrew VasquezThe SCSI-midlayer's fast-fail codes consider an DID_ERROR status as a driver-error and the failed I/O would then be retried in the midlayer without being fast-failed to dm-multipath. DID_BUS_BUSY status returns would induce unneeded path-failures events being propagated to the DM/MD.
--- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c +2 -2
@@ -1211,7 +1211,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)/* * If RISC reports underrun and target does not report * it then we must have a lost frame, so tell upper -* layer to retry it by reporting a bus busy. +* layer to retry it by reporting an error. */ if (!(scsi_status &SS_RESIDUAL_UNDER )) { DEBUG2(printk("scsi(%ld:%d:%d:%d) Dropped "
@@ -1221,7 +1221,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) cp->device->id, cp->device->lun, resid, scsi_bufflen(cp))); - cp->result =DID_BUS_BUSY <<16 ; + cp->result =DID_ERROR <<16 ;break ; }
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 9/20 qla2xxx: Check status of qla2x00_get_fw_version() call.
In reply to Andrew VasquezUnlike earlier ISPs, recent ISPs (ISP81xx) can in fact fail this mailbox command.
--- drivers/scsi/qla2xxx/qla_gbl.h | 2 +- drivers/scsi/qla2xxx/qla_init.c | 7 +++++-- drivers/scsi/qla2xxx/qla_mbx.c | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_gbl.h +1 -1
@@ -148,7 +148,7 @@ qla2x00_dump_ram(scsi_qla_host_t *, dma_addr_t, uint32_t, uint32_t);extern int qla2x00_execute_fw (scsi_qla_host_t *,uint32_t ); -extern void +extern int qla2x00_get_fw_version (scsi_qla_host_t *,uint16_t *,uint16_t *,uint16_t *,uint16_t *,uint32_t *,uint8_t *,uint32_t *,uint8_t *);
drivers/scsi/qla2xxx/qla_init.c +5 -2
@@ -929,13 +929,16 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)/* Retrieve firmware information. */ if (rval ==QLA_SUCCESS ) { fw_major_version = ha->fw_major_version; -qla2x00_get_fw_version (vha, + rval =qla2x00_get_fw_version (vha, &ha->fw_major_version, &ha->fw_minor_version, &ha->fw_subminor_version, &ha->fw_attributes, &ha->fw_memory_size, ha->mpi_version, &ha->mpi_capabilities, ha->phy_version); +if (rval !=QLA_SUCCESS ) + goto failed; + ha->flags.npiv_supported =0 ;if (IS_QLA2XXX_MIDTYPE (ha) && (ha->fw_attributes &BIT_2 )) {
@@ -987,7 +990,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha) ha->fw_subminor_version); } } - +failed:if (rval) {DEBUG2_3 (printk ("scsi(%ld): Setup chip **** FAILED ****.\n" , vha->host_no));
drivers/scsi/qla2xxx/qla_mbx.c +5 -2
@@ -408,7 +408,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)* Context: * Kernel context. */ -void +int qla2x00_get_fw_version (scsi_qla_host_t *vha,uint16_t *major,uint16_t *minor,uint16_t *subminor,uint16_t *attributes,uint32_t *memory,uint8_t *mpi,uint32_t *mpi_caps,uint8_t *phy)
@@ -427,6 +427,8 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, mcp->flags =0 ; mcp->tov =MBX_TOV_SECONDS ; rval =qla2x00_mailbox_command (vha, mcp); +if (rval !=QLA_SUCCESS ) + goto failed;/* Return mailbox data. */ *major = mcp->mb[1 ];
@@ -446,7 +448,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, phy[1 ] = mcp->mb[9 ] >>8 ; phy[2 ] = mcp->mb[9 ] &0xff ; } - +failed:if (rval !=QLA_SUCCESS ) {/*EMPTY*/ DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__,
@@ -455,6 +457,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,/*EMPTY*/ DEBUG11 (printk ("%s(%ld): done.\n" , __func__, vha->host_no)); } +return rval; }/*
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 11/20 qla2xxx: Add 10Gb iiDMA support.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_gs.c | 3 +++ drivers/scsi/qla2xxx/qla_init.c | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_gs.c +3 -0
@@ -1879,6 +1879,9 @@ qla2x00_gpsc(scsi_qla_host_t *vha, sw_info_t *list)case BIT_13 : list[i].fp_speed =PORT_SPEED_4GB ;break ; +case BIT_12 : + list[i].fp_speed =PORT_SPEED_10GB ; +break ;case BIT_11 : list[i].fp_speed =PORT_SPEED_8GB ;break ;
drivers/scsi/qla2xxx/qla_init.c +8 -2
@@ -2248,7 +2248,8 @@ static void qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) {#define LS_UNKNOWN 2 -static char *link_speeds[5 ] = {"1" ,"2" ,"?" ,"4" ,"8" }; +static char *link_speeds[] = {"1" ,"2" ,"?" ,"4" ,"8" ,"10" }; +char *link_speed;int rval;uint16_t mb[6 ];struct qla_hw_data *ha = vha->hw;
@@ -2271,10 +2272,15 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) fcport->port_name[6 ], fcport->port_name[7 ], rval, fcport->fp_speed, mb[0], mb[1])); }else { + link_speed = link_speeds[LS_UNKNOWN ]; +if (fcport->fp_speed <5 ) + link_speed = link_speeds[fcport->fp_speed]; +else if (fcport->fp_speed ==0x13 ) + link_speed = link_speeds[5 ]; DEBUG2(qla_printk(KERN_INFO, ha, "iIDMA adjusted to %s GB/s on " "%02x%02x%02x%02x%02x%02x%02x%02x.\n", - link_speeds[fcport->fp_speed], fcport->port_name[0], + link_speed, fcport->port_name[0], fcport->port_name[1], fcport->port_name[2], fcport->port_name[3], fcport->port_name[4], fcport->port_name[5], fcport->port_name[6],
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 6/20 qla2xxx: Fallback to 'golden-firmware' operation on supported ISPs.
In reply to Andrew VasquezIn case the onboard firmware is unable to be read or loaded for operation, attempt to fallback to a limited-operational firmware image stored in a different flash region. This will allow a user to reflash and correct a board with proper operational firmware.
--- drivers/scsi/qla2xxx/qla_def.h | 2 ++ drivers/scsi/qla2xxx/qla_fw.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 33 +++++++++++++++++++++++++-------- drivers/scsi/qla2xxx/qla_os.c | 7 +++++++ drivers/scsi/qla2xxx/qla_sup.c | 3 +++ 5 files changed, 38 insertions(+), 8 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +2 -0
@@ -2223,6 +2223,7 @@ struct qla_hw_data { uint32_t fac_supported :1; uint32_t chip_reset_done :1; uint32_t port0 :1; + uint32_t running_gold_fw :1; } flags;/* This spinlock is used to protect "io transactions", you must
@@ -2523,6 +2524,7 @@ struct qla_hw_data {uint32_t flt_region_vpd;uint32_t flt_region_nvram;uint32_t flt_region_npiv_conf; +uint32_t flt_region_gold_fw;/* Needed for BEACON */ uint16_t beacon_blink_led;
drivers/scsi/qla2xxx/qla_fw.h +1 -0
@@ -1241,6 +1241,7 @@ struct qla_flt_header {#define FLT_REG_HW_EVENT_1 0x1f#define FLT_REG_NPIV_CONF_0 0x29#define FLT_REG_NPIV_CONF_1 0x2a +#define FLT_REG_GOLD_FW 0x2fstruct qla_flt_region {uint32_t code;
drivers/scsi/qla2xxx/qla_init.c +25 -8
@@ -3806,11 +3806,11 @@ qla24xx_nvram_config(scsi_qla_host_t *vha) }static int -qla24xx_load_risc_flash (scsi_qla_host_t *vha,uint32_t *srisc_addr) +qla24xx_load_risc_flash (scsi_qla_host_t *vha,uint32_t *srisc_addr, +uint32_t faddr) {int rval =QLA_SUCCESS ;int segments, fragment; -uint32_t faddr;uint32_t *dcode, dlen;uint32_t risc_addr;uint32_t risc_size;
@@ -3819,12 +3819,11 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr)struct req_que *req = ha->req_q_map[0 ];qla_printk (KERN_INFO , ha, -"FW: Loading from flash (%x)...\n" , ha->flt_region_fw); +"FW: Loading from flash (%x)...\n" , faddr); rval =QLA_SUCCESS ; segments =FA_RISC_CODE_SEGMENTS ; - faddr = ha->flt_region_fw; dcode = (uint32_t *)req->ring; *srisc_addr =0 ;
@@ -4124,27 +4123,45 @@ qla24xx_load_risc(scsi_qla_host_t *vha, uint32_t *srisc_addr)if (rval ==QLA_SUCCESS )return rval; -return qla24xx_load_risc_flash (vha, srisc_addr); +return qla24xx_load_risc_flash (vha, srisc_addr, + vha->hw->flt_region_fw); }int qla81xx_load_risc (scsi_qla_host_t *vha,uint32_t *srisc_addr) {int rval; +struct qla_hw_data *ha = vha->hw;if (ql2xfwloadbin ==2 ) -return qla24xx_load_risc (vha, srisc_addr); + goto try_blob_fw;/* * FW Load priority: * 1) Firmware residing in flash. * 2) Firmware via request-firmware interface (.bin file). +* 3) Golden-Firmware residing in flash -- limited operation. */ - rval =qla24xx_load_risc_flash (vha, srisc_addr); + rval =qla24xx_load_risc_flash (vha, srisc_addr, ha->flt_region_fw);if (rval ==QLA_SUCCESS )return rval; -return qla24xx_load_risc_blob (vha, srisc_addr); +try_blob_fw: + rval =qla24xx_load_risc_blob (vha, srisc_addr); +if (rval ==QLA_SUCCESS || !ha->flt_region_gold_fw) +return rval; + +qla_printk (KERN_ERR , ha, +"FW: Attempting to fallback to golden firmware...\n" ); + rval =qla24xx_load_risc_flash (vha, srisc_addr, ha->flt_region_gold_fw); +if (rval !=QLA_SUCCESS ) +return rval; + +qla_printk (KERN_ERR , ha, +"FW: Please update operational firmware...\n" ); + ha->flags.running_gold_fw =1 ; + +return rval; }void
drivers/scsi/qla2xxx/qla_os.c +7 -0
@@ -1690,6 +1690,9 @@ qla2xxx_scan_start(struct Scsi_Host *shost) {scsi_qla_host_t *vha =shost_priv (shost); +if (vha->hw->flags.running_gold_fw) +return ; +set_bit (LOOP_RESYNC_NEEDED , &vha->dpc_flags);set_bit (LOCAL_LOOP_UPDATE , &vha->dpc_flags);set_bit (RSCN_UPDATE , &vha->dpc_flags);
@@ -1962,6 +1965,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)"Can't create queues, falling back to single" " queue mode\n"); +if (ha->flags.running_gold_fw) + goto skip_dpc; +/* * Startup the kernel thread for this host adapter */
@@ -1974,6 +1980,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto probe_failed; } +skip_dpc:list_add_tail (&base_vha->list, &ha->vp_list); base_vha->host->irq = ha->pdev->irq;
drivers/scsi/qla2xxx/qla_sup.c +3 -0
@@ -728,6 +728,9 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr)if (!ha->flags.port0) ha->flt_region_npiv_conf = start;break ; +case FLT_REG_GOLD_FW : + ha->flt_region_gold_fw = start; +break ; } } goto done;
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 8/20 qla2xxx: Correct NULL pointer bug in cpu affinity mode.
In reply to Andrew VasquezFrom: Anirban Chakraborty <[email protected]>
This patch fixes a NULL pointer bug that occurs when IO is being carried out on a vport for which the cpu affinity mode is turned on.
--- drivers/scsi/qla2xxx/qla_attr.c | 15 ++++++++++----- drivers/scsi/qla2xxx/qla_iocb.c | 16 ++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +10 -5
@@ -1595,6 +1595,7 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)struct qla_hw_data *ha = base_vha->hw;uint16_t options =0 ;int cnt; +struct req_que *req = ha->req_q_map[0 ]; ret =qla24xx_vport_create_req_sanity_check (fc_vport);if (ret) {
@@ -1650,14 +1651,16 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)qla24xx_vport_disable (fc_vport, disable); - ret =0 ; -if (ql2xmaxqueues ==1 || ql2xmultique_tag || !ha->npiv_info) +if (ql2xmultique_tag) { + req = ha->req_q_map[1 ]; + goto vport_queue; + }else if (ql2xmaxqueues ==1 || !ha->npiv_info) goto vport_queue;/* Create a request queue in QoS mode for the vport */ for (cnt =0 ; cnt < ha->nvram_npiv_size; cnt++) {if (memcmp (ha->npiv_info[cnt].port_name, vha->port_name,8 ) ==0 &&memcmp (ha->npiv_info[cnt].node_name, vha->node_name, -8 ) ==0 ) { +8 ) ==0 ) { qos = ha->npiv_info[cnt].q_qos;break ; }
@@ -1669,14 +1672,16 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)qla_printk (KERN_WARNING , ha,"Can't create request queue for vp_idx:%d\n" , vha->vp_idx); - else + else {DEBUG2 (qla_printk (KERN_INFO , ha,"Request Que:%d (QoS: %d) created for vp_idx:%d\n" , ret, qos, vha->vp_idx)); + req = ha->req_q_map[ret]; + } } vport_queue: - vha->req = ha->req_q_map[ret]; + vha->req = req;return 0 ; vport_create_failed_2:
drivers/scsi/qla2xxx/qla_iocb.c +6 -10
@@ -15,7 +15,7 @@ static request_t *qla2x00_req_pkt(struct scsi_qla_host *, struct req_que *, struct rsp_que *rsp);static void qla2x00_isp_cmd (struct scsi_qla_host *,struct req_que *); -static void qla25xx_set_que (srb_t *,struct req_que **,struct rsp_que **); +static void qla25xx_set_que (srb_t *,struct rsp_que **);/** * qla2x00_get_cmd_direction() - Determine control_flag data direction. * @cmd: SCSI command
@@ -722,7 +722,8 @@ qla24xx_start_scsi(srb_t *sp)/* Setup device pointers. */ ret =0 ; -qla25xx_set_que (sp, &req, &rsp); +qla25xx_set_que (sp, &rsp); + req = vha->req;/* So we know we haven't pci_map'ed anything yet */ tot_dsds =0 ;
@@ -845,20 +846,15 @@ queuing_error:return QLA_FUNCTION_FAILED ; } -static void qla25xx_set_que (srb_t *sp,struct req_que **req, -struct rsp_que **rsp) +static void qla25xx_set_que (srb_t *sp,struct rsp_que **rsp) {struct scsi_cmnd *cmd = sp->cmd; -struct scsi_qla_host *vha = sp->fcport->vha;struct qla_hw_data *ha = sp->fcport->vha->hw;int affinity = cmd->request->cpu;if (ql2xmultique_tag && affinity >=0 && - affinity < ha->max_rsp_queues -1 ) { + affinity < ha->max_rsp_queues -1 ) *rsp = ha->rsp_q_map[affinity +1 ]; - *req = ha->req_q_map[1 ]; - }else { - *req = vha->req; +else *rsp = ha->rsp_q_map[0 ]; - } }
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 14/20 qla2xxx: Avoid redundant RISC reset during (re)-initialization.
In reply to Andrew VasquezISP24xx and above ISPs perform a RISC reset inqla24xx_reset_chip(), which is called prior toqla24xx_chip_diag().
--- drivers/scsi/qla2xxx/qla_init.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +0 -3
@@ -730,9 +730,6 @@ qla24xx_chip_diag(scsi_qla_host_t *vha)struct qla_hw_data *ha = vha->hw;struct req_que *req = ha->req_q_map[0 ]; -/* Perform RISC reset. */ -qla24xx_reset_risc (vha); - ha->fw_transfer_size =REQUEST_ENTRY_SIZE * req->length; rval =qla2x00_mbx_reg_test (vha);
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 13/20 qla2xxx: Fallback enode-mac should not be a multicast address.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_init.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_init.c +1 -1
@@ -4406,7 +4406,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha) nv->max_luns_per_target =__constant_cpu_to_le16 (128 ); nv->port_down_retry_count =__constant_cpu_to_le16 (30 ); nv->link_down_timeout =__constant_cpu_to_le16 (30 ); - nv->enode_mac[0 ] =0x01 ; + nv->enode_mac[0 ] =0x00 ; nv->enode_mac[1 ] =0x02 ; nv->enode_mac[2 ] =0x03 ; nv->enode_mac[3 ] =0x04 ;
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 15/20 qla2xxx: Query supported RISC registers bits in determining a paused-state.
In reply to Andrew VasquezISP24xx and above must query the host-status register, not HCCR.
--- drivers/scsi/qla2xxx/qla_dbg.c | 6 ++---- drivers/scsi/qla2xxx/qla_fw.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/scsi/qla2xxx/qla_dbg.c +2 -4
@@ -149,11 +149,9 @@ qla24xx_pause_risc(struct device_reg_24xx __iomem *reg)int rval =QLA_SUCCESS ;uint32_t cnt; -if (RD_REG_DWORD (®->hccr) &HCCRX_RISC_PAUSE ) -return rval; -WRT_REG_DWORD (®->hccr,HCCRX_SET_RISC_PAUSE ); -for (cnt =30000 ; (RD_REG_DWORD (®->hccr) &HCCRX_RISC_PAUSE ) ==0 && +for (cnt =30000 ; + ((RD_REG_DWORD (®->host_status) &HSRX_RISC_PAUSED ) ==0 ) && rval ==QLA_SUCCESS ; cnt--) {if (cnt)udelay (100 );
drivers/scsi/qla2xxx/qla_fw.h +0 -1
@@ -878,7 +878,6 @@ struct device_reg_24xx {/* HCCR statuses. */ #define HCCRX_HOST_INT BIT_6/* Host to RISC interrupt bit. */ #define HCCRX_RISC_RESET BIT_5/* RISC Reset mode bit. */ -#define HCCRX_RISC_PAUSE BIT_4/* RISC Pause mode bit. */ /* HCCR commands. */ /* NOOP. */ #define HCCRX_NOOP 0x00000000
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 16/20 qla2xxx: Avoid explicit LOGO during driver host tear-down.
In reply to Andrew VasquezAs firmware will ultimately terminate (stop) and port states-cleared.
--- drivers/scsi/qla2xxx/qla_attr.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +2 -1
@@ -1465,7 +1465,8 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)* At this point all fcport's software-states are cleared. Perform any * final cleanup of firmware resources (PCBs and XCBs). */ -if (fcport->loop_id !=FC_NO_LOOP_ID ) +if (fcport->loop_id !=FC_NO_LOOP_ID && + !test_bit (UNLOADING , &fcport->vha->dpc_flags)) fcport->vha->hw->isp_ops->fabric_logout (fcport->vha, fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa);
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 20/20 qla2xxx: Update version number to 8.03.01-k3.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_version.h +1 -1
@@ -7,7 +7,7 @@/* * Driver version */ -#define QLA2XXX_VERSION "8.03.01-k2" +#define QLA2XXX_VERSION "8.03.01-k3"#define QLA_DRIVER_MAJOR_VER 8#define QLA_DRIVER_MINOR_VER 3
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 19/20 qla2xxx: Synchronize MPI settings after a PE Reset.
In reply to Andrew VasquezEnsure MPS remains in synchronization across all NIC/FCoE functions after a reset.
--- drivers/scsi/qla2xxx/qla_gbl.h | 6 ++++ drivers/scsi/qla2xxx/qla_init.c | 52 ++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_mbx.c | 63 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 0 deletions(-)
drivers/scsi/qla2xxx/qla_gbl.h +6 -0
@@ -299,6 +299,12 @@ qla2x00_get_xgmac_stats(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t *);extern int qla2x00_get_dcbx_params (scsi_qla_host_t *,dma_addr_t ,uint16_t ); +extern int +qla2x00_read_ram_word (scsi_qla_host_t *,uint32_t ,uint32_t *); + +extern int +qla2x00_write_ram_word (scsi_qla_host_t *,uint32_t ,uint32_t ); +/* * Global Function Prototypes in qla_isr.c source file. */
drivers/scsi/qla2xxx/qla_init.c +52 -0
64 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_mbx.c +63 -0
66 lines not on this page · raw message
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 18/20 qla2xxx: Export additional firmware-states for application support.
In reply to Andrew Vasquez--- drivers/scsi/qla2xxx/qla_attr.c | 18 ++++++++++++++++++ drivers/scsi/qla2xxx/qla_init.c | 7 ++++--- drivers/scsi/qla2xxx/qla_mbx.c | 4 +++- 3 files changed, 25 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +18 -0
@@ -1233,6 +1233,22 @@ qla2x00_fabric_param_show(struct device *dev, struct device_attribute *attr,return snprintf (buf,PAGE_SIZE ,"%d\n" , vha->hw->switch_cap); } +static ssize_t +qla2x00_fw_state_show (struct device *dev,struct device_attribute *attr, +char *buf) +{ +scsi_qla_host_t *vha =shost_priv (class_to_shost (dev)); +int rval; +uint16_t state[5 ]; + + rval =qla2x00_get_firmware_state (vha, state); +if (rval !=QLA_SUCCESS ) +memset (state,-1 ,sizeof (state)); + +return snprintf (buf,PAGE_SIZE ,"0x%x 0x%x 0x%x 0x%x 0x%x\n" , state[0 ], + state[1 ], state[2 ], state[3 ], state[4 ]); +} + static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL); static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL); static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
@@ -1265,6 +1281,7 @@ static DEVICE_ATTR(vlan_id, S_IRUGO, qla2x00_vlan_id_show, NULL); static DEVICE_ATTR(vn_port_mac_address, S_IRUGO, qla2x00_vn_port_mac_address_show, NULL); static DEVICE_ATTR(fabric_param, S_IRUGO, qla2x00_fabric_param_show, NULL); +static DEVICE_ATTR(fw_state, S_IRUGO, qla2x00_fw_state_show, NULL);struct device_attribute *qla2x00_host_attrs[] = { &dev_attr_driver_version,
@@ -1290,6 +1307,7 @@ struct device_attribute *qla2x00_host_attrs[] = { &dev_attr_vlan_id, &dev_attr_vn_port_mac_address, &dev_attr_fabric_param, + &dev_attr_fw_state, NULL, };
drivers/scsi/qla2xxx/qla_init.c +4 -3
@@ -1304,7 +1304,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)unsigned long wtime, mtime, cs84xx_time;uint16_t min_wait;/* Minimum wait time if loop is down */ uint16_t wait_time;/* Wait time if loop is coming ready */ -uint16_t state[3 ]; +uint16_t state[5 ];struct qla_hw_data *ha = vha->hw; rval =QLA_SUCCESS ;
@@ -1403,8 +1403,9 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) vha->host_no, state[0], jiffies)); }while (1 ); -DEBUG (printk ("scsi(%ld): fw_state=%x curr time=%lx.\n" , - vha->host_no, state[0 ], jiffies)); +DEBUG (printk ("scsi(%ld): fw_state=%x (%x, %x, %x, %x) curr time=%lx.\n" , + vha->host_no, state[0 ], state[1 ], state[2 ], state[3 ], state[4 ], + jiffies));if (rval) { DEBUG2_3(printk("scsi(%ld): Firmware ready **** FAILED ****.\n",
drivers/scsi/qla2xxx/qla_mbx.c +3 -1
@@ -1267,7 +1267,7 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) mcp->mb[0 ] =MBC_GET_FIRMWARE_STATE ; mcp->out_mb =MBX_0 ; - mcp->in_mb =MBX_3 |MBX_2 |MBX_1 |MBX_0 ; + mcp->in_mb =MBX_5 |MBX_4 |MBX_3 |MBX_2 |MBX_1 |MBX_0 ; mcp->tov =MBX_TOV_SECONDS ; mcp->flags =0 ; rval =qla2x00_mailbox_command (vha, mcp);
@@ -1276,6 +1276,8 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) states[0 ] = mcp->mb[1 ]; states[1 ] = mcp->mb[2 ]; states[2 ] = mcp->mb[3 ]; + states[3 ] = mcp->mb[4 ]; + states[4 ] = mcp->mb[5 ];if (rval !=QLA_SUCCESS ) {/*EMPTY*/
Signature · 1 line
1.6.3.1.244.gf9275
PATCH 17/20 qla2xxx: Reduce lock-contention during do-work processing.
In reply to Andrew VasquezQueued work processing will now be serialized with its own lower-priority spinlock. This also simplifies the work-queue interface for future work-queue consumers.
--- drivers/scsi/qla2xxx/qla_def.h | 2 + drivers/scsi/qla2xxx/qla_os.c | 45 +++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 23 deletions(-)
drivers/scsi/qla2xxx/qla_def.h +2 -0
@@ -2561,6 +2561,8 @@ typedef struct scsi_qla_host {struct list_head list;struct list_head vp_fcports;/* list of fcports */ struct list_head work_list; +spinlock_t work_lock; +/* Commonly used flags and state information. */ struct Scsi_Host *host;unsigned long host_no;
drivers/scsi/qla2xxx/qla_os.c +22 -23
106 lines not on this page · raw message
Signature · 1 line
1.6.3.1.244.gf9275