From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Marc Singer <elf@buici.com>, linux-ide@vger.kernel.org
Subject: Re: SELECT_DRIVE and friends
Date: Sun, 6 Jun 2004 03:13:20 +0200 [thread overview]
Message-ID: <200406060313.20525.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <20040606003617.GA24095@buici.com>
On Sunday 06 of June 2004 02:36, Marc Singer wrote:
> > > > > > > The OUTB breaks my interface because I don't really have
> > > > > > > byte-level access to the resgisters. So, is selectproc a
> > > > > > > pre-select procedure or should it be a substitute?
> > > > > >
> > > > > > pre-select but you can change it to be substitute if you need
> > > > > > (just remember to update all users if you decide to do this)
> > > > >
> > > > > I'll have to search the kernel to see what uses it. Maybe the
> > > > > better way would be to define a new select proc that *is* a
> > > > > substitute.
> > > >
> > > > Nope.
> > >
> > > So then we break anyone who is using the selectproc as a pre-select
> > > proc? I don't understand what you mean here. There are several
> > > drivers that use this function. How do you propose that we provide
> > > both types of behavior with one entry point?
> >
> > You can add last line of SELECT_DRIVE() to all ->selectproc()
> > implementations and add 'else' to SELECT_DRIVE().
>
> This would probably work if all references to the IDE_SELECT_REG were
> replaced with SELECT_DRIVE calls. This, it turns out, is not true.
> There are direct calls to access the select register in several files
> listed below. Are you confortable with all of these being replaced
> with SELECT_DRIVE calls?
No, SELECT_DRIVE only writes drive->select.all.
I need to think some more about it.
> ide-disk.c:
> hwif->OUTB(0x00|drive->select.all,IDE_SELECT_REG); ide-disk.c:
> hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG);
> ide-disk.c: hwif->OUTB(head|drive->select.all,IDE_SELECT_REG);
> ide-floppy.c: HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG);
> ide-io.c: hwif->OUTB(sel, IDE_SELECT_REG);
> ide-iops.c: HWIF(drive)->OUTB(drive->select.all,
> IDE_SELECT_REG); ide-probe.c:
> hwif->OUTB(drive->select.all, IDE_SELECT_REG); ide-tape.c:
> hwif->OUTB(drive->select.all, IDE_SELECT_REG);
> ide-taskfile.c: hwif->OUTB((taskfile->device_head & HIHI) |
> drive->select.all, IDE_SELECT_REG); ide-taskfile.c:
> hwif->OUTB(taskfile->device_head | drive->select.all, IDE_SELECT_REG);
prev parent reply other threads:[~2004-06-06 1:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 0:36 SELECT_DRIVE and friends Marc Singer
2004-06-06 1:13 ` Bartlomiej Zolnierkiewicz [this message]
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=200406060313.20525.bzolnier@elka.pw.edu.pl \
--to=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=elf@buici.com \
--cc=linux-ide@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