public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* IDE code
@ 2002-01-14 13:57 Ian Molton
  2002-01-14 16:08 ` Bjorn Wesen
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Molton @ 2002-01-14 13:57 UTC (permalink / raw)
  To: linux-kernel

Hi.

in the ide code the functions ide_[input|output]_data() seem to have become
polluted by a test for a 'helper function' to be used to read data instead
of inb() and friends.

It is my opinion that the functions should not have the test and
subroutine, as it violates the 'layering' in that they no longer just 'get
the data' but now also test for ... etc. blah blah.

I propose that we should be using the already existing function pointers to
allow the CALLERS of ide_[input|output]_data() to perform the condition,
and branch if appropriate to a driver provided alternative function.

This would mean replacing the handful (literally) of ide_input_data() and
ide_output_data() calls with a macro (say, IDE_INPUT_DATA()) which performs
the condition, or, if not needed, can be defined away as a straight call to
ide_input_data() etc.

As the writer of an ide card driver that needs this functionality (it uses
a multiply mapped register concept on ARM hardware to take advantage of its
multiple load/store instructions for PIO (the hardware cannot do DMA, its
15 years old :)), I would appreciate input on wether or not anyone else
feels this change should / should not be made?

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

end of thread, other threads:[~2002-01-14 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-14 13:57 IDE code Ian Molton
2002-01-14 16:08 ` Bjorn Wesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox