1232 hwgroup->handler = NULL;
1233
1234
1235
1236
1237
1238 spin_unlock(&ide_lock);
1239 hwif = HWIF(drive);
1240
1241 disable_irq(hwif->irq);
1242
1243
1244 local_irq_disable();
1245 if (hwgroup->polling) {
1246 startstop = handler(drive);
1247 } else if (drive_is_ready(drive)) {
1248 if (drive->waiting_for_dma)
1249 hwif->dma_ops->dma_lost_irq(drive);
1250 (void)ide_ack_intr(hwif);
1251 printk(KERN_WARNING "%s: lost interrupt\n", drive->name);
1252 startstop = handler(drive);
1253 } else {
1254 if (drive->waiting_for_dma) {
1255 startstop = ide_dma_timeout_retry(drive, wait);
1256 } else
1257 startstop =
1258 ide_error(drive, "irq timeout",
1259 hwif->tp_ops->read_status(hwif));
1260 }
1261 drive->service_time = jiffies - drive->service_start;
1262 spin_lock_irq(&ide_lock);
1263 enable_irq(hwif->irq);
1264 if (startstop == ide_stopped)
1265 hwgroup->busy = 0;
1266 }
1267 }
1268 ide_do_request(hwgroup, IDE_NO_IRQ);
1269 spin_unlock_irqrestore(&ide_lock, flags);
1270}
1271
1272