summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo2007-08-06 11:36:24 +0200
committerJeff Garzik2007-10-12 20:55:32 +0200
commit41bda9c98035dd3589b02cbc1de02f71d2faf9c8 (patch)
tree2a5b0c85584d443c1c8f7cb2b592e75bea3da6cf /drivers/ata/libata-core.c
parentlibata-link: update EH to deal with PMP links (diff)
downloadkernel-qcow2-linux-41bda9c98035dd3589b02cbc1de02f71d2faf9c8.tar.gz
kernel-qcow2-linux-41bda9c98035dd3589b02cbc1de02f71d2faf9c8.tar.xz
kernel-qcow2-linux-41bda9c98035dd3589b02cbc1de02f71d2faf9c8.zip
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,
void ata_port_detach(struct ata_port *ap)
{
unsigned long flags;
+ struct ata_link *link;
struct ata_device *dev;
if (!ap->ops->error_handler)
@@ -6621,8 +6622,10 @@ void ata_port_detach(struct ata_port *ap)
*/
spin_lock_irqsave(ap->lock, flags);
- ata_link_for_each_dev(dev, &ap->link)
- ata_dev_disable(dev);
+ ata_port_for_each_link(link, ap) {
+ ata_link_for_each_dev(dev, link)
+ ata_dev_disable(dev);
+ }
spin_unlock_irqrestore(ap->lock, flags);