Skip to content

Commit

Permalink
[SCSI] zfcp: Remove SCSI devices when removing complete adapter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Jan 12, 2008
1 parent 18edcdb commit e39c887
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/s390/scsi/zfcp_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e39c887

Please sign in to comment.