Re: [PATCH 07/13] libata-hp: implement unload-unplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun Heo wrote:
Implement unload unplug - driver unloading / PCI removal via hot
unplug path.  This is done by ata_port_detach() which requests detach
of all devices, schedules EH and wait for it to complete.  EH path is
slightly modified to handle this (e.g. force zero eh_info during
unloading).  With this patch, EH and unloading are properly
synchronized and unloading should be safe under any circumstances.

Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>

---

 drivers/scsi/ahci.c        |    1 +
 drivers/scsi/libata-core.c |   47 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/scsi/libata-eh.c   |    7 ++++---
 include/linux/libata.h     |    1 +
 4 files changed, 53 insertions(+), 3 deletions(-)

894a291fa186a541ef3eb74d01f0947fb40ad97e
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index afb3805..98fffca 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1396,6 +1396,7 @@ static void ahci_remove_one (struct pci_
 	for (i = 0; i < host_set->n_ports; i++) {
 		ap = host_set->ports[i];
+ ata_port_detach(ap);
 		scsi_remove_host(ap->host);

Seems like a nice cleanup would be to move scsi_remove_host() into ata_port_detach() ? It would be nice to remove that tidbit of SCSI host management from the ->remove() hook in various drivers (mostly ahci, sata_sil24, and libata-core).

ACK.

	Jeff



-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux