diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2007-11-05 11:37:46 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-12 00:22:40 (GMT) |
commit | e39c8877a41e8f70225baeeb74fade8fe3a80d8b (patch) | |
tree | db8dabfae60c974318608bac0ee8ced0c405a782 /drivers | |
parent | 18edcdbdb2911baa5aaeb0ed781e3424cbf98d64 (diff) | |
download | linux-fsl-qoriq-e39c8877a41e8f70225baeeb74fade8fe3a80d8b.tar.xz |
[SCSI] zfcp: Remove SCSI devices when removing complete adapter
The common I/O layer can call remove a handler to inform zfcp
that a device disappeared. The handler zfcp_ccw_remove then
removes all unit, port and the adapter data structures. Removing
the units requires that the SCSI devices are removed first.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index e01cbf1..a6a29a2 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c @@ -120,6 +120,9 @@ zfcp_ccw_remove(struct ccw_device *ccw_device) list_for_each_entry_safe(port, p, &adapter->port_remove_lh, list) { list_for_each_entry_safe(unit, u, &port->unit_remove_lh, list) { + if (atomic_test_mask(ZFCP_STATUS_UNIT_REGISTERED, + &unit->status)) + scsi_remove_device(unit->device); zfcp_unit_dequeue(unit); } zfcp_port_dequeue(port); |