aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 99db02062c3b..e742b3de16ac 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -22,6 +22,7 @@
22#define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI 22#define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI
23 23
24#include "zfcp_ext.h" 24#include "zfcp_ext.h"
25#include <asm/atomic.h>
25 26
26static void zfcp_scsi_slave_destroy(struct scsi_device *sdp); 27static void zfcp_scsi_slave_destroy(struct scsi_device *sdp);
27static int zfcp_scsi_slave_alloc(struct scsi_device *sdp); 28static int zfcp_scsi_slave_alloc(struct scsi_device *sdp);
@@ -179,6 +180,10 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
179 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; 180 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata;
180 181
181 if (unit) { 182 if (unit) {
183 zfcp_erp_wait(unit->port->adapter);
184 wait_event(unit->scsi_scan_wq,
185 atomic_test_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING,
186 &unit->status) == 0);
182 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status); 187 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
183 sdpnt->hostdata = NULL; 188 sdpnt->hostdata = NULL;
184 unit->device = NULL; 189 unit->device = NULL;