lkml.org 
[lkml]   [2002]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectIDE code
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?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.113 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site