Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Marc Singer <elf@buici.com>
To: linux-ide@vger.kernel.org
Subject: SELECT_DRIVE and friends
Date: Sat, 5 Jun 2004 17:36:17 -0700	[thread overview]
Message-ID: <20040606003617.GA24095@buici.com> (raw)

> > > > > > 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?

  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);


             reply	other threads:[~2004-06-06  0:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06  0:36 Marc Singer [this message]
2004-06-06  1:13 ` SELECT_DRIVE and friends Bartlomiej Zolnierkiewicz

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=20040606003617.GA24095@buici.com \
    --to=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