aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-31 05:28:13 -0400
committerTejun Heo <htejun@gmail.com>2006-05-31 05:28:13 -0400
commit720ba12620ee09dce269adf4ad50958adac7bb54 (patch)
treef31a8b3da52195610bd244baf42a5fe2e26b0a36 /drivers/scsi/ahci.c
parent3e706399b03bd237d087d731d4b1b029e546b33d (diff)
[PATCH] libata-hp: update unload-unplug
Update unload unplug - driver unloading / PCI removal. This is done by ata_port_detach() which short-circuits EH, disables all devices and freezes the port. With this patch, EH and unloading/unplugging are properly synchronized. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index afb3805f9e95..60f455bf3696 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1389,21 +1389,17 @@ static void ahci_remove_one (struct pci_dev *pdev)
1389 struct device *dev = pci_dev_to_dev(pdev); 1389 struct device *dev = pci_dev_to_dev(pdev);
1390 struct ata_host_set *host_set = dev_get_drvdata(dev); 1390 struct ata_host_set *host_set = dev_get_drvdata(dev);
1391 struct ahci_host_priv *hpriv = host_set->private_data; 1391 struct ahci_host_priv *hpriv = host_set->private_data;
1392 struct ata_port *ap;
1393 unsigned int i; 1392 unsigned int i;
1394 int have_msi; 1393 int have_msi;
1395 1394
1396 for (i = 0; i < host_set->n_ports; i++) { 1395 for (i = 0; i < host_set->n_ports; i++)
1397 ap = host_set->ports[i]; 1396 ata_port_detach(host_set->ports[i]);
1398
1399 scsi_remove_host(ap->host);
1400 }
1401 1397
1402 have_msi = hpriv->flags & AHCI_FLAG_MSI; 1398 have_msi = hpriv->flags & AHCI_FLAG_MSI;
1403 free_irq(host_set->irq, host_set); 1399 free_irq(host_set->irq, host_set);
1404 1400
1405 for (i = 0; i < host_set->n_ports; i++) { 1401 for (i = 0; i < host_set->n_ports; i++) {
1406 ap = host_set->ports[i]; 1402 struct ata_port *ap = host_set->ports[i];
1407 1403
1408 ata_scsi_release(ap->host); 1404 ata_scsi_release(ap->host);
1409 scsi_host_put(ap->host); 1405 scsi_host_put(ap->host);