aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c14
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index fc55429dc914..62a3ad6e8ecb 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -406,6 +406,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
406 INIT_LIST_HEAD(&vha->list); 406 INIT_LIST_HEAD(&vha->list);
407 INIT_LIST_HEAD(&vha->fcports); 407 INIT_LIST_HEAD(&vha->fcports);
408 INIT_LIST_HEAD(&vha->vp_fcports); 408 INIT_LIST_HEAD(&vha->vp_fcports);
409 INIT_LIST_HEAD(&vha->work_list);
409 410
410 vha->dpc_flags = 0L; 411 vha->dpc_flags = 0L;
411 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); 412 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 817f62fbdd83..48eaa3bb5433 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2157,13 +2157,14 @@ static int
2157qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked) 2157qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked)
2158{ 2158{
2159 unsigned long flags; 2159 unsigned long flags;
2160 scsi_qla_host_t *pha = to_qla_parent(ha);
2160 2161
2161 if (!locked) 2162 if (!locked)
2162 spin_lock_irqsave(&ha->hardware_lock, flags); 2163 spin_lock_irqsave(&pha->hardware_lock, flags);
2163 list_add_tail(&e->list, &ha->work_list); 2164 list_add_tail(&e->list, &ha->work_list);
2164 qla2xxx_wake_dpc(ha); 2165 qla2xxx_wake_dpc(ha);
2165 if (!locked) 2166 if (!locked)
2166 spin_unlock_irqrestore(&ha->hardware_lock, flags); 2167 spin_unlock_irqrestore(&pha->hardware_lock, flags);
2167 return QLA_SUCCESS; 2168 return QLA_SUCCESS;
2168} 2169}
2169 2170
@@ -2203,12 +2204,13 @@ static void
2203qla2x00_do_work(struct scsi_qla_host *ha) 2204qla2x00_do_work(struct scsi_qla_host *ha)
2204{ 2205{
2205 struct qla_work_evt *e; 2206 struct qla_work_evt *e;
2207 scsi_qla_host_t *pha = to_qla_parent(ha);
2206 2208
2207 spin_lock_irq(&ha->hardware_lock); 2209 spin_lock_irq(&pha->hardware_lock);
2208 while (!list_empty(&ha->work_list)) { 2210 while (!list_empty(&ha->work_list)) {
2209 e = list_entry(ha->work_list.next, struct qla_work_evt, list); 2211 e = list_entry(ha->work_list.next, struct qla_work_evt, list);
2210 list_del_init(&e->list); 2212 list_del_init(&e->list);
2211 spin_unlock_irq(&ha->hardware_lock); 2213 spin_unlock_irq(&pha->hardware_lock);
2212 2214
2213 switch (e->type) { 2215 switch (e->type) {
2214 case QLA_EVT_AEN: 2216 case QLA_EVT_AEN:
@@ -2222,9 +2224,9 @@ qla2x00_do_work(struct scsi_qla_host *ha)
2222 } 2224 }
2223 if (e->flags & QLA_EVT_FLAG_FREE) 2225 if (e->flags & QLA_EVT_FLAG_FREE)
2224 kfree(e); 2226 kfree(e);
2225 spin_lock_irq(&ha->hardware_lock); 2227 spin_lock_irq(&pha->hardware_lock);
2226 } 2228 }
2227 spin_unlock_irq(&ha->hardware_lock); 2229 spin_unlock_irq(&pha->hardware_lock);
2228} 2230}
2229 2231
2230/************************************************************************** 2232/**************************************************************************