diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index bbb30d882f05..3fa75eac135d 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -190,7 +190,7 @@ static ssize_t ata_scsi_park_show(struct device *device, | |||
190 | struct ata_port *ap; | 190 | struct ata_port *ap; |
191 | struct ata_link *link; | 191 | struct ata_link *link; |
192 | struct ata_device *dev; | 192 | struct ata_device *dev; |
193 | unsigned long flags; | 193 | unsigned long flags, now; |
194 | unsigned int uninitialized_var(msecs); | 194 | unsigned int uninitialized_var(msecs); |
195 | int rc = 0; | 195 | int rc = 0; |
196 | 196 | ||
@@ -208,10 +208,11 @@ static ssize_t ata_scsi_park_show(struct device *device, | |||
208 | } | 208 | } |
209 | 209 | ||
210 | link = dev->link; | 210 | link = dev->link; |
211 | now = jiffies; | ||
211 | if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS && | 212 | if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS && |
212 | link->eh_context.unloaded_mask & (1 << dev->devno) && | 213 | link->eh_context.unloaded_mask & (1 << dev->devno) && |
213 | time_after(dev->unpark_deadline, jiffies)) | 214 | time_after(dev->unpark_deadline, now)) |
214 | msecs = jiffies_to_msecs(dev->unpark_deadline - jiffies); | 215 | msecs = jiffies_to_msecs(dev->unpark_deadline - now); |
215 | else | 216 | else |
216 | msecs = 0; | 217 | msecs = 0; |
217 | 218 | ||