[PATCH] libata: clear EH action on device detach
authorTejun Heo <htejun@gmail.com>
Sat, 24 Jun 2006 11:30:19 +0000 (20:30 +0900)
committerJeff Garzik <jeff@garzik.org>
Tue, 27 Jun 2006 00:59:27 +0000 (20:59 -0400)
Clear related EH action on device detach such that new device doesn't
receive EH actions scheduled for the old one.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/scsi/libata-eh.c

index c7e6298db05053565d3a337f4baceed342dfa6ff..bf5a72aca8a4979957ae9a7ce8ff519d70490655 100644 (file)
@@ -734,6 +734,10 @@ static void ata_eh_detach_dev(struct ata_device *dev)
                ap->flags |= ATA_FLAG_SCSI_HOTPLUG;
        }
 
+       /* clear per-dev EH actions */
+       ata_eh_clear_action(dev, &ap->eh_info, ATA_EH_PERDEV_MASK);
+       ata_eh_clear_action(dev, &ap->eh_context.i, ATA_EH_PERDEV_MASK);
+
        spin_unlock_irqrestore(ap->lock, flags);
 }