From: Tejun Heo Date: Wed, 31 Oct 2007 01:17:02 +0000 (+0900) Subject: libata: fix timing computation in ata_eh_reset() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cd955463bb4e96cfec18a0e5b6887c6797fb821d;p=openwrt%2Fstaging%2Fblogic.git libata: fix timing computation in ata_eh_reset() As jiffies changes asynchronously, it needs to be cached if unchanging timestamp is needed. The code in ata_eh_reset() intended to do that with @now but never actually did it. Fix it. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8d64f8fd8f1d..53b2348a364d 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2204,7 +2204,7 @@ int ata_eh_reset(struct ata_link *link, int classify, unsigned long now = jiffies; if (time_before(now, deadline)) { - unsigned long delta = deadline - jiffies; + unsigned long delta = deadline - now; ata_link_printk(link, KERN_WARNING, "reset failed " "(errno=%d), retrying in %u secs\n",