From: Ian Molton <spyro@armlinux.org>
To: linux-kernel@vger.kernel.org
Subject: IDE code
Date: Mon, 14 Jan 2002 13:57:45 +0000 [thread overview]
Message-ID: <20020114135745.671cc624.spyro@armlinux.org> (raw)
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?
next reply other threads:[~2002-01-14 13:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-14 13:57 Ian Molton [this message]
2002-01-14 16:08 ` IDE code Bjorn Wesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020114135745.671cc624.spyro@armlinux.org \
--to=spyro@armlinux.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox