irqreturn_t ide_intr (int irq, void * dev_id, struct pt_regs * regs);
This is the default IRQ handler for the IDE layer. You should not need to override it. If you do be aware it is subtle in places
hwgroup->hwif is the interface in the group currently performing a command. hwgroup->drive is the drive and hwgroup->handler is the IRQ handler to call. As we issue a command the handlers step through multiple states, reassigning the handler to the next step in the process. Unlike a smart SCSI controller IDE expects the main processor to sequence the various transfer stages. We also manage a poll timer to catch up with most timeout situations. There are still a few where the handlers don't ever decide to give up.
The handler eventually returns ide_stopped to indicate the request completed. At this point we issue the next request on the hwgroup and the process begins again.