From: Tejun Heo Date: Sat, 24 Jun 2006 11:30:19 +0000 (+0900) Subject: [PATCH] libata: clear EH action on device detach X-Git-Tag: v2.6.18-rc1~460^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=beb07c1a56e2cff3842e22c473bd1aaaea08e532;p=linux-2.6 [PATCH] libata: clear EH action on device detach 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c index c7e6298db0..bf5a72aca8 100644 --- a/drivers/scsi/libata-eh.c +++ b/drivers/scsi/libata-eh.c @@ -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); }