Messages in this thread Patch in this message | | | Date | Mon, 05 Nov 2007 12:37:46 +0100 | From | swen@vnet ... | Subject | [patch 4/6] zfcp: Remove SCSI devices when removing complete adapter |
| |
From: Christof Schmitt <christof.schmitt@de.ibm.com>
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> ---
drivers/s390/scsi/zfcp_ccw.c | 3 +++ 1 file changed, 3 insertions(+)
diff -urpN linux-2.6/drivers/s390/scsi/zfcp_ccw.c linux-2.6-patched/drivers/s390/scsi/zfcp_ccw.c --- linux-2.6/drivers/s390/scsi/zfcp_ccw.c 2007-11-02 08:37:56.000000000 +0100 +++ linux-2.6-patched/drivers/s390/scsi/zfcp_ccw.c 2007-11-02 08:38:26.000000000 +0100 @@ -120,6 +120,9 @@ zfcp_ccw_remove(struct ccw_device *ccw_d 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); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |