aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c3
-rw-r--r--drivers/s390/scsi/zfcp_def.h1
-rw-r--r--drivers/s390/scsi/zfcp_erp.c2
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c4
4 files changed, 2 insertions, 8 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index 285881f07648..683ac4ed5e56 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -72,8 +72,7 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device)
72 72
73 list_for_each_entry_safe(port, p, &port_remove_lh, list) { 73 list_for_each_entry_safe(port, p, &port_remove_lh, list) {
74 list_for_each_entry_safe(unit, u, &unit_remove_lh, list) { 74 list_for_each_entry_safe(unit, u, &unit_remove_lh, list) {
75 if (atomic_read(&unit->status) & 75 if (unit->device)
76 ZFCP_STATUS_UNIT_REGISTERED)
77 scsi_remove_device(unit->device); 76 scsi_remove_device(unit->device);
78 zfcp_unit_dequeue(unit); 77 zfcp_unit_dequeue(unit);
79 } 78 }
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index 62f9ee58c9b8..56302a1a4b68 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -255,7 +255,6 @@ enum zfcp_wka_status {
255/* logical unit status */ 255/* logical unit status */
256#define ZFCP_STATUS_UNIT_SHARED 0x00000004 256#define ZFCP_STATUS_UNIT_SHARED 0x00000004
257#define ZFCP_STATUS_UNIT_READONLY 0x00000008 257#define ZFCP_STATUS_UNIT_READONLY 0x00000008
258#define ZFCP_STATUS_UNIT_REGISTERED 0x00000010
259#define ZFCP_STATUS_UNIT_SCSI_WORK_PENDING 0x00000020 258#define ZFCP_STATUS_UNIT_SCSI_WORK_PENDING 0x00000020
260 259
261/* FSF request status (this does not have a common part) */ 260/* FSF request status (this does not have a common part) */
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index aed08e70aa96..2a00f812779a 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -1250,8 +1250,6 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
1250 case ZFCP_ERP_ACTION_REOPEN_UNIT: 1250 case ZFCP_ERP_ACTION_REOPEN_UNIT:
1251 if ((result == ZFCP_ERP_SUCCEEDED) && 1251 if ((result == ZFCP_ERP_SUCCEEDED) &&
1252 !unit->device && port->rport) { 1252 !unit->device && port->rport) {
1253 atomic_set_mask(ZFCP_STATUS_UNIT_REGISTERED,
1254 &unit->status);
1255 if (!(atomic_read(&unit->status) & 1253 if (!(atomic_read(&unit->status) &
1256 ZFCP_STATUS_UNIT_SCSI_WORK_PENDING)) 1254 ZFCP_STATUS_UNIT_SCSI_WORK_PENDING))
1257 zfcp_erp_schedule_work(unit); 1255 zfcp_erp_schedule_work(unit);
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 9dc42a68fbdd..7829c72d83d0 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -27,7 +27,6 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu)
27static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) 27static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
28{ 28{
29 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; 29 struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata;
30 atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
31 unit->device = NULL; 30 unit->device = NULL;
32 zfcp_erp_unit_failed(unit, 12, NULL); 31 zfcp_erp_unit_failed(unit, 12, NULL);
33 zfcp_unit_put(unit); 32 zfcp_unit_put(unit);
@@ -133,8 +132,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdp)
133 132
134 read_lock_irqsave(&zfcp_data.config_lock, flags); 133 read_lock_irqsave(&zfcp_data.config_lock, flags);
135 unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun); 134 unit = zfcp_unit_lookup(adapter, sdp->channel, sdp->id, sdp->lun);
136 if (unit && 135 if (unit) {
137 (atomic_read(&unit->status) & ZFCP_STATUS_UNIT_REGISTERED)) {
138 sdp->hostdata = unit; 136 sdp->hostdata = unit;
139 unit->device = sdp; 137 unit->device = sdp;
140 zfcp_unit_get(unit); 138 zfcp_unit_get(unit);