aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:22 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:55 -0400
commitb7f15f3c94196accac799727502ed88a029ae7ef (patch)
treed620f4cc0fe75ca43b48a675fb7bd681cb7919f3 /drivers/s390/scsi/zfcp_erp.c
parent57069386699994c3e67042fc4928c418f3a39e01 (diff)
[SCSI] zfcp: fix deadlock caused by shared work queue tasks
Each adapter reopen trigger automatically a scan_port task which is waiting for the ERP to be finished before further processing. Since the initial device setup enqueues adapter, port and LUN which are individual ERP actions, this process would start after everything is done. Unfortunately the port_reopen requires another scheduled work to be finished which is queued after the automatic scan_port -> deadlock ! This fix creates an own work queue for ERP based nameserver requests. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 174b38fe7623..f5ebeb7ca2be 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -869,7 +869,7 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
869 if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP) 869 if (fc_host_port_type(adapter->scsi_host) == FC_PORTTYPE_PTP)
870 return zfcp_erp_open_ptp_port(act); 870 return zfcp_erp_open_ptp_port(act);
871 if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) { 871 if (!(p_status & ZFCP_STATUS_PORT_DID_DID)) {
872 schedule_work(&port->gid_pn_work); 872 queue_work(zfcp_data.work_queue, &port->gid_pn_work);
873 return ZFCP_ERP_CONTINUES; 873 return ZFCP_ERP_CONTINUES;
874 } 874 }
875 case ZFCP_ERP_STEP_NAMESERVER_LOOKUP: 875 case ZFCP_ERP_STEP_NAMESERVER_LOOKUP:
@@ -1209,7 +1209,7 @@ static void zfcp_erp_schedule_work(struct zfcp_unit *unit)
1209 atomic_set_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status); 1209 atomic_set_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
1210 INIT_WORK(&p->work, zfcp_erp_scsi_scan); 1210 INIT_WORK(&p->work, zfcp_erp_scsi_scan);
1211 p->unit = unit; 1211 p->unit = unit;
1212 schedule_work(&p->work); 1212 queue_work(zfcp_data.work_queue, &p->work);
1213} 1213}
1214 1214
1215static void zfcp_erp_rport_register(struct zfcp_port *port) 1215static void zfcp_erp_rport_register(struct zfcp_port *port)