Subject: Re: SATA DVD support?
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Takayoshi Kochi <takayoshi.kochi@gmail.com>
List: tech-kern
Date: 12/10/2007 23:02:09
Hi,

Haven't heard from Bernd, but I've had a similar experience.
Mine has an ICH9 AHCI and has 4 ports on the motherboard.
2 ports are connected to hard drives and the 3rd one is connected
to SATA DVD drive.

Below are relevant pieces from dmesg:

ahcisata0 at pci0 dev 31 function 2: Intel 82801I AHCI SATA Controller
with 4 ports
ahcisata0: interrupting at ioapic0 pin 19 (irq 15)
ahcisata0: AHCI revision 0x10200, 4 ports, 32 command slots, features 0xef22e0c0
atabus1 at ahcisata0 channel 0
atabus2 at ahcisata0 channel 1
atabus3 at ahcisata0 channel 4
atabus4 at ahcisata0 channel 5
ahcisata0 port 0: device present, speed: 3.0Gb/s
wd0 at atabus1 drive 0: <Hitachi HDT725032VLA360>
ahcisata0 port 1: device present, speed: 1.5Gb/s
ahcisata0 port 4: device present, speed 1.5Gb/s
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 298 GB, 620181 cyl, 16 head, 63 sec, 512 bytes/sect x 625142448 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(ahcisata0:0:0): using PIO mode 4, DMA  mode 2, Ultra-DMA mode 6
(Ultra/133) (using DMA)
wd1 at atabus2 drive 0: <ST506>
wd1: drive supports 1-sector PIO transfers, chs addressing
wd1: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6
(Ultra/133) (using DMA)
wd2 at atabus3 drive 0: <ST506>
wd2: drive supports 1-sector PIO transfers, chs addressing
wd2: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
wd2: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd2(ahcisata0:1:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6
(Ultra/133) (using DMA)

The second drive (which should have 160GB capacity) was not correctly detected.
And it is strange that the DVD drive was detected as wd2.

After that, the kernel tried to read mbr on wd2, which of course fails:

wd2d: error reading fsbn 0 (wd2 bn 0; cn 0 tn 0 sn 0), retrying
wd2: (aborted command)
ahcisata0 port 4: device present, speed: 1.5Gb/s

This retry repeated about 40 times.

The full dmesg is available on request.


On Nov 30, 2007 7:16 AM, Manuel Bouyer <bouyer@antioche.eu.org> wrote:
> On Fri, Nov 30, 2007 at 08:41:18AM +1030, Berndt Josef Wulf wrote:
> > > Your SATA ATAPI drive should work now in current ... at last I hope so :)
> >
> > Still no such luck.
> >
> > I've installed latest userland and kernel (netbsd-GENERIC.MP) and the system
> > boots fine, however, it still doesn't detect the SATA DVD drive.
> >
> > The bootlog can be found on
> >
> > ftp://ftp.netbsd.org/pub/NetBSD/misc/wulf/bootlog
>
> The PHY on the jmide0 SATA channels don't go up. Are you sure the SATA
> channels are working on this device ?
>
>
> --
> Manuel Bouyer <bouyer@antioche.eu.org>
>      NetBSD: 26 ans d'experience feront toujours la difference
> --

-- 
Takayoshi Kochi