qla2xxx: fixes for 2.6.26 [8.02.01-k4].
Subsystems (2)
cover qla2xxx: fixes for 2.6.26 [8.02.01-k4].
James,
Further testing has found some regressions in the NPIV code. Please add the following to your rc-fixes tree.
drivers/scsi/qla2xxx/qla_isr.c | 36 ++++++++++-------------------------- drivers/scsi/qla2xxx/qla_mid.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 14 ++++++++------ drivers/scsi/qla2xxx/qla_version.h | 2 +- 4 files changed, 20 insertions(+), 33 deletions(-)
commits:
- Revert "qla2xxx: Use proper HA during asynchrounous event handling."
- Correct handling of AENs postings for vports.
- Update version number to 8.02.01-k4.
Regards,
Andrew Vasquez
PATCH 1/3 qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."
From: Seokmann Ju <[email protected]>
This reverts commit bd2a1846b2313e32d0270151a31a6b8335384a20. The original (prior to the reverted commit) code was correct. Additionally, the vp_idx should be checked during MBA_PORT_UPDATE in order for proper handling to take place for a given vport.
--- drivers/scsi/qla2xxx/qla_isr.c | 36 ++++++++++-------------------------- 1 files changed, 10 insertions(+), 26 deletions(-)
drivers/scsi/qla2xxx/qla_isr.c +10 -26
@@ -272,8 +272,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)uint32_t rscn_entry, host_pid;uint8_t rscn_queue_index;unsigned long flags; -scsi_qla_host_t *vha; -int i;/* Setup to process RIO completion. */ handle_cnt =0 ;
@@ -544,18 +542,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)break ;case MBA_PORT_UPDATE :/* Port database update */ -if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { -for_each_mapped_vp_idx (ha, i) { -list_for_each_entry (vha, &ha->vp_list, - vp_list) { -if ((mb[3 ] &0xff ) - == vha->vp_idx) { - ha = vha; -break ; - } - } - } - } +/* Only handle SCNs for our Vport index. */ +if (ha->parent && ha->vp_idx != (mb[3 ] &0xff )) +break ; +/* * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET * event etc. earlier indicating loop is down) then process
@@ -590,18 +580,12 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)break ;case MBA_RSCN_UPDATE :/* State Change Registration */ -if ((ha->flags.npiv_supported) && (ha->num_vhosts)) { -for_each_mapped_vp_idx (ha, i) { -list_for_each_entry (vha, &ha->vp_list, - vp_list) { -if ((mb[3 ] &0xff ) - == vha->vp_idx) { - ha = vha; -break ; - } - } - } - } +/* Check if the Vport has issued a SCR */ +if (ha->parent &&test_bit (VP_SCR_NEEDED , &ha->vp_flags)) +break ; +/* Only handle SCNs for our Vport index. */ +if (ha->parent && ha->vp_idx != (mb[3 ] &0xff )) +break ;DEBUG2 (printk ("scsi(%ld): Asynchronous RSCR UPDATE.\n" , ha->host_no));
Signature · 1 line
1.5.5.1.316.g377d9
PATCH 2/3 qla2xxx: Correct handling of AENs postings for vports.
In reply to Andrew VasquezFrom: Seokmann Ju <[email protected]>
Initialize all proper structure members in order to support work-list vport processing. This code also properly acquires the correct (physical hardware_lock) lock during work submission.
--- drivers/scsi/qla2xxx/qla_mid.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-)
drivers/scsi/qla2xxx/qla_mid.c +1 -0
@@ -406,6 +406,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)INIT_LIST_HEAD (&vha->list);INIT_LIST_HEAD (&vha->fcports);INIT_LIST_HEAD (&vha->vp_fcports); +INIT_LIST_HEAD (&vha->work_list); vha->dpc_flags =0L ;set_bit (REGISTER_FDMI_NEEDED , &vha->dpc_flags);
drivers/scsi/qla2xxx/qla_os.c +8 -6
@@ -2157,13 +2157,14 @@ static int qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked) { unsigned long flags; +scsi_qla_host_t *pha =to_qla_parent (ha);if (!locked) -spin_lock_irqsave (&ha->hardware_lock, flags); +spin_lock_irqsave (&pha->hardware_lock, flags);list_add_tail (&e->list, &ha->work_list);qla2xxx_wake_dpc (ha);if (!locked) -spin_unlock_irqrestore (&ha->hardware_lock, flags); +spin_unlock_irqrestore (&pha->hardware_lock, flags);return QLA_SUCCESS ; }
@@ -2203,12 +2204,13 @@ static void qla2x00_do_work(struct scsi_qla_host *ha) {struct qla_work_evt *e; +scsi_qla_host_t *pha =to_qla_parent (ha); -spin_lock_irq (&ha->hardware_lock); +spin_lock_irq (&pha->hardware_lock);while (!list_empty (&ha->work_list)) { e = list_entry(ha->work_list.next, struct qla_work_evt, list);list_del_init (&e->list); -spin_unlock_irq (&ha->hardware_lock); +spin_unlock_irq (&pha->hardware_lock);switch (e->type) {case QLA_EVT_AEN :
@@ -2222,9 +2224,9 @@ qla2x00_do_work(struct scsi_qla_host *ha) }if (e->flags &QLA_EVT_FLAG_FREE )kfree (e); -spin_lock_irq (&ha->hardware_lock); +spin_lock_irq (&pha->hardware_lock); } -spin_unlock_irq (&ha->hardware_lock); +spin_unlock_irq (&pha->hardware_lock); }/**************************************************************************
Signature · 1 line
1.5.5.1.316.g377d9
PATCH 3/3 qla2xxx: Update version number to 8.02.01-k4.
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.02.01-k3" +#define QLA2XXX_VERSION "8.02.01-k4"#define QLA_DRIVER_MAJOR_VER 8#define QLA_DRIVER_MINOR_VER 2
Signature · 1 line
1.5.5.1.316.g377d9
Quoted 11 lines · Andrew Vasquez
James,
Further testing has found some regressions in the NPIV code. Please add the following to your rc-fixes tree.
drivers/scsi/qla2xxx/qla_isr.c | 36 ++++++++++-------------------------- drivers/scsi/qla2xxx/qla_mid.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 14 ++++++++------ drivers/scsi/qla2xxx/qla_version.h | 2 +- 4 files changed, 20 insertions(+), 33 deletions(-)
Quoted 5 lines
commits:
- Revert "qla2xxx: Use proper HA during asynchrounous event handling."
- Correct handling of AENs postings for vports.
- Update version number to 8.02.01-k4.
Ack/Nack? These fixes should really be in 2.6.26.
Thanks, AV
James Bottomley
maintainerQuoted 13 lines · Andrew Vasquez
Quoted 11 lines · Andrew Vasquez
James,
Further testing has found some regressions in the NPIV code. Please add the following to your rc-fixes tree.
drivers/scsi/qla2xxx/qla_isr.c | 36 ++++++++++-------------------------- drivers/scsi/qla2xxx/qla_mid.c | 1 + drivers/scsi/qla2xxx/qla_os.c | 14 ++++++++------ drivers/scsi/qla2xxx/qla_version.h | 2 +- 4 files changed, 20 insertions(+), 33 deletions(-)
Quoted 7 lines
Quoted 5 lines
commits:
- Revert "qla2xxx: Use proper HA during asynchrounous event handling."
- Correct handling of AENs postings for vports.
- Update version number to 8.02.01-k4.Ack/Nack? These fixes should really be in 2.6.26.
Next on the list to look at, honest! I've been away for a week, so I'm in catch up mode.
James