9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: Intel Sata
Date: Thu, 20 Dec 2007 13:37:03 -0500	[thread overview]
Message-ID: <c8c4db82a077803993a6f5c3051a86ef@quanstro.net> (raw)
In-Reply-To: <192fd422-5e8a-456c-8861-2141054b7a82@p1g2000hsb.googlegroups.com>

> > > So now the update. The dev id 27c0 corresponds to my sata in ata mode.
> > > 27c1 is the sata in ahci mode. If I add 27c1 to sdiahci.c and 27c0 to
> > > sdata.c I get nothing from the kernel at boot up saying it found
> > > anything. If I add 27c1 to both I get the response from the kernel. I
> > > wonder if the driver can't handle the drive. Maybe the sata controller
> > > I have is different enough from the controller used to write the
> > > driver that it won't work. I find that hard to believe, but stranger
> > > things are true.
> >
> > either you can recognize the drive as ahci, or as a normal ata drive,
> > but not both at the same time.  that's prohibited.
> >
> > - erik
> 
> So adding the same dev id to both drivers is wrong. But then why does
> it not work when I add the corresponding dev id's to the appropiate
> driver. It should then be able to recognize it in both instances.

intel like to have multiple dids for the same hardware.  the various
dids represent the programming interface.  the problem is that you
can't use both programming interfaces at the same time because,
evidently, the different programming interfaces have internal state.
even if you could, i don't think you'd want /dev/sdC0 and /dev/sdE0
representing the same hardware.

for example, on one machine i use in testing i have

neponset; pci|grep disk|grep 8086/
0.31.1:	disk 01.01.8a 8086/269e 255 0:00000001 16 1:00000001 16 2:00000001 16 3:00000001 16 4:00001881 16
0.31.2:	disk 01.06.01 8086/2681  10 0:000018b1 16 1:000018a5 16 2:000018a9 16 3:000018a1 16 4:00001891 32 5:d9000400 1024

i use the 2681 did.  i know that's the ahci did because bar#5 shows up.
(well that, and the intel documentation says so.)  269e is not used.
as you can see the pata drives are available through the traditional interface:

neponset# cat /dev/sdctl
sdC ata port 1F0 ctl 3F4 irq 14
sdE ahci port 0xe008b400: 64a alp led ncq pm pslum slum iss 2 ncs 31 np 6; ghc 80000002 isr 0 pi 3f 0-5 ver 10100
neponset# lc '#S'
sdC0	sdE0	sdE1	sdE2	sdE3	sdE4	sdE5	sdctl

by the way, i've never been able combine sata and pata under the
traditional interface with intel southbridges of any description,
with the exception of the case of a pata cdrom and a sata hard drive,
combined mode notwithstanding.

- erik


      reply	other threads:[~2007-12-20 18:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14  9:46 [9fans] Building a Floppy Disk Bob
2007-12-14 13:46 ` erik quanstrom
2007-12-14 15:23 ` [9fans] " Bob
2007-12-14 15:54   ` erik quanstrom
2007-12-14 17:27   ` Russ Cox
2007-12-17 10:04   ` Bob
2007-12-17 12:54     ` erik quanstrom
2007-12-17 13:28     ` [9fans] Intel Sata Bob
2007-12-17 13:34       ` erik quanstrom
2007-12-18  9:42       ` [9fans] " Bob
2007-12-18 14:25         ` erik quanstrom
2007-12-19  9:56         ` Bob
2007-12-20  9:36         ` Bob
2007-12-20 13:11           ` erik quanstrom
2007-12-20 16:42           ` Bob
2007-12-20 18:37             ` erik quanstrom [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=c8c4db82a077803993a6f5c3051a86ef@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).