aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_scsi.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-03-02 07:08:55 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 13:58:18 -0400
commit86f8a1b4b472e4b2b58df5826709d4797d84d46f (patch)
treead6119d1162416b62ee68daf74df6ba4fa1ba19e /drivers/s390/scsi/zfcp_scsi.c
parenta5b11dda12ed7e3a79180b10ad6209a40a02989f (diff)
[SCSI] zfcp: Remove UNIT_REGISTERED status flag
Use the device pointer in zfcp_unit for tracking if we have a registered SCSI device. With this approach, the flag ZFCP_STATUS_UNIT_REGISTERED is only redundant and can be removed. Acked-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_scsi.c')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c4
1 files changed, 1 insertions, 3 deletions
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);