aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-08-06 05:36:24 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:32 -0400
commit41bda9c98035dd3589b02cbc1de02f71d2faf9c8 (patch)
tree2a5b0c85584d443c1c8f7cb2b592e75bea3da6cf /drivers/ata/libata-core.c
parent9b1e2658faf3f3095a96558c333b333c0e29dbc0 (diff)
libata-link: update hotplug to handle PMP links
Update hotplug to handle PMP links. When PMP is attached, the PMP number corresponds to C of SCSI H:C:I:L. While at it, change argument to ata_find_dev() to @devno from @id to avoid confusion with SCSI device ID. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index af9c0ab600dc..14f299278f1b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6604,6 +6604,7 @@ int ata_host_activate(struct ata_host *host, int irq,
6604void ata_port_detach(struct ata_port *ap) 6604void ata_port_detach(struct ata_port *ap)
6605{ 6605{
6606 unsigned long flags; 6606 unsigned long flags;
6607 struct ata_link *link;
6607 struct ata_device *dev; 6608 struct ata_device *dev;
6608 6609
6609 if (!ap->ops->error_handler) 6610 if (!ap->ops->error_handler)
@@ -6621,8 +6622,10 @@ void ata_port_detach(struct ata_port *ap)
6621 */ 6622 */
6622 spin_lock_irqsave(ap->lock, flags); 6623 spin_lock_irqsave(ap->lock, flags);
6623 6624
6624 ata_link_for_each_dev(dev, &ap->link) 6625 ata_port_for_each_link(link, ap) {
6625 ata_dev_disable(dev); 6626 ata_link_for_each_dev(dev, link)
6627 ata_dev_disable(dev);
6628 }
6626 6629
6627 spin_unlock_irqrestore(ap->lock, flags); 6630 spin_unlock_irqrestore(ap->lock, flags);
6628 6631