|
@@ -1226,6 +1226,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
|
|
#endif
|
|
#endif
|
|
/* so that ide_timer_expiry knows what to do */
|
|
/* so that ide_timer_expiry knows what to do */
|
|
hwgroup->sleeping = 1;
|
|
hwgroup->sleeping = 1;
|
|
|
|
+ hwgroup->req_gen_timer = hwgroup->req_gen;
|
|
mod_timer(&hwgroup->timer, sleep);
|
|
mod_timer(&hwgroup->timer, sleep);
|
|
/* we purposely leave hwgroup->busy==1
|
|
/* we purposely leave hwgroup->busy==1
|
|
* while sleeping */
|
|
* while sleeping */
|
|
@@ -1411,7 +1412,8 @@ void ide_timer_expiry (unsigned long data)
|
|
|
|
|
|
spin_lock_irqsave(&ide_lock, flags);
|
|
spin_lock_irqsave(&ide_lock, flags);
|
|
|
|
|
|
- if ((handler = hwgroup->handler) == NULL) {
|
|
|
|
|
|
+ if (((handler = hwgroup->handler) == NULL) ||
|
|
|
|
+ (hwgroup->req_gen != hwgroup->req_gen_timer)) {
|
|
/*
|
|
/*
|
|
* Either a marginal timeout occurred
|
|
* Either a marginal timeout occurred
|
|
* (got the interrupt just as timer expired),
|
|
* (got the interrupt just as timer expired),
|
|
@@ -1439,6 +1441,7 @@ void ide_timer_expiry (unsigned long data)
|
|
if ((wait = expiry(drive)) > 0) {
|
|
if ((wait = expiry(drive)) > 0) {
|
|
/* reset timer */
|
|
/* reset timer */
|
|
hwgroup->timer.expires = jiffies + wait;
|
|
hwgroup->timer.expires = jiffies + wait;
|
|
|
|
+ hwgroup->req_gen_timer = hwgroup->req_gen;
|
|
add_timer(&hwgroup->timer);
|
|
add_timer(&hwgroup->timer);
|
|
spin_unlock_irqrestore(&ide_lock, flags);
|
|
spin_unlock_irqrestore(&ide_lock, flags);
|
|
return;
|
|
return;
|
|
@@ -1653,6 +1656,7 @@ irqreturn_t ide_intr (int irq, void *dev_id)
|
|
printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
|
|
printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
|
|
}
|
|
}
|
|
hwgroup->handler = NULL;
|
|
hwgroup->handler = NULL;
|
|
|
|
+ hwgroup->req_gen++;
|
|
del_timer(&hwgroup->timer);
|
|
del_timer(&hwgroup->timer);
|
|
spin_unlock(&ide_lock);
|
|
spin_unlock(&ide_lock);
|
|
|
|
|