Flexible SFF interrupt handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This has been bubbling on my brain for a while. I blathered on about this on IRC to Tejun, but figured I might as well post it here and get it archived.

In general, I think we should adopt a flexible or "loose" model for acking interrupts on SFF controllers.

(a) whenever we are in bus-idle (qc == NULL), and get an interrupt, go ahead and read Status.

(b) if we are expecting an interrupt, and receive one, check Status (or AltStatus if DMAing).

(c) if condition "(b)" indicates busy, initiate status polling every 250ms until timeout occurs or BSY clears.

(d) if N seconds (4?) elapses without an interrupt, initiate polling. keep a history of such "fail-over" events, and note each fail-over'd command's eventual success via polling, success via interrupt, or timeout. Use that history to decide to switch to 100% polling mode (i.e. reach conclusion that interrupt delivery is broken, via observation)

That should cover no-interrupts, lost interrupts, early interrupts, screaming interrupts, insane devices, and of course normal operation.

The model could be summarized as "interrupt as a hint" operation.

	Jeff




-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux