]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-12-13-zfcp_deadlock_port_scan_ERP.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-12-13-zfcp_deadlock_port_scan_ERP.patch
CommitLineData
2cb7cef9
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: zfcp: deadlock between scheduled task and ERP
3References: bnc#487755,LTC#52846
4
5Symptom: I/O stall.
6Problem: 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.
9Solution: Remove the necessity to wait for the ERP.
10
11Acked-by: John Jolly <jjolly@suse.de>
12
13---
14 drivers/s390/scsi/zfcp_erp.c | 2 +-
15 drivers/s390/scsi/zfcp_fc.c | 1 -
16 2 files changed, 1 insertion(+), 2 deletions(-)
17
18Index: 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
23 goto failed_openfcp;
24
25 atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status);
26- schedule_work(&act->adapter->scan_work);
27
28 return ZFCP_ERP_SUCCEEDED;
29
30@@ -1215,6 +1214,7 @@ static void zfcp_erp_action_cleanup(stru
31 break;
32
33 case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
34+ schedule_work(&adapter->scan_work);
35 zfcp_adapter_put(adapter);
36 break;
37 }
38Index: 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;
45
46- zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */
47 if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT)
48 return 0;
49