1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: zfcp: deadlock between scheduled task and ERP
3 References: bnc#487755,LTC#52846
6 Problem: Waiting for the ERP in a task running in global wq
7 is a bad idea especially if the ERP needs to run another
8 job in this wq before it can finish. ->deadlock.
9 Solution: Remove the necessity to wait for the ERP.
11 Acked-by: John Jolly <jjolly@suse.de>
14 drivers/s390/scsi/zfcp_erp.c | 2 +-
15 drivers/s390/scsi/zfcp_fc.c | 1 -
16 2 files changed, 1 insertion(+), 2 deletions(-)
18 Index: linux-sles11/drivers/s390/scsi/zfcp_erp.c
19 ===================================================================
20 --- linux-sles11.orig/drivers/s390/scsi/zfcp_erp.c
21 +++ linux-sles11/drivers/s390/scsi/zfcp_erp.c
22 @@ -725,7 +725,6 @@ static int zfcp_erp_adapter_strategy_gen
25 atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status);
26 - schedule_work(&act->adapter->scan_work);
28 return ZFCP_ERP_SUCCEEDED;
30 @@ -1215,6 +1214,7 @@ static void zfcp_erp_action_cleanup(stru
33 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
34 + schedule_work(&adapter->scan_work);
35 zfcp_adapter_put(adapter);
38 Index: linux-sles11/drivers/s390/scsi/zfcp_fc.c
39 ===================================================================
40 --- linux-sles11.orig/drivers/s390/scsi/zfcp_fc.c
41 +++ linux-sles11/drivers/s390/scsi/zfcp_fc.c
42 @@ -631,7 +631,6 @@ int zfcp_scan_ports(struct zfcp_adapter
43 max_entries = chain ? ZFCP_GPN_FT_MAX_ENTRIES : ZFCP_GPN_FT_ENTRIES;
44 max_bytes = chain ? ZFCP_GPN_FT_MAX_SIZE : ZFCP_CT_SIZE_ONE_PAGE;
46 - zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */
47 if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT)