linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Flexible SFF interrupt handling
@ 2007-11-28 13:45 Jeff Garzik
  2007-11-28 14:29 ` Alan Cox
  2007-11-28 14:33 ` Mark Lord
  0 siblings, 2 replies; 9+ messages in thread
From: Jeff Garzik @ 2007-11-28 13:45 UTC (permalink / raw)
  To: IDE/ATA development list

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-11-30  1:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 13:45 Flexible SFF interrupt handling Jeff Garzik
2007-11-28 14:29 ` Alan Cox
2007-11-28 16:09   ` Jeff Garzik
2007-11-28 14:33 ` Mark Lord
2007-11-28 15:58   ` Jeff Garzik
2007-11-28 16:48     ` Mark Lord
2007-11-28 17:00       ` Mark Lord
2007-11-30  1:08     ` Tejun Heo
2007-11-30  1:11       ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).