Subject: ahcisata on PC3000 problem
To: None <tech-kern@netbsd.org>
From: Dima Veselov <kab00m@lich.phys.spbu.ru>
List: tech-kern
Date: 07/06/2007 20:38:06
Hi,

I have a strange problem using new ahcisata driver on Intel PC3000 chipset. 
First I had problem with SATA RAID controller is not visible in RAID mode, this was fixed and also unneeded, because Intel Matrix RAID is soft-only. (But no driver can configure this soft-RAID labels, btw)

Now, I have NetBSD-current booting on SATA controller, configured in Enchanced AHCI mode. This box got two HDD HS bays with identical 80Gb disks installed in them. First drive are always shown as ST506 with chs addressing, second is shown all-right. This is the most problem. I have checked BIOS parameters - they are fine and identical for both, RAID BIOS is never shown up since RAID mode is off. I swapped them - result is the same, I zeroed first sectors of the disk - same. Disk on atabus2 is always ST506 with strange geometry. Also, BIOS geometry, reported by fdisk is always correct. Besides, `atactl wd0 (wd1) identify` gives absolutely identical output.

One more thing I've noticed. When box is booting up, after founding first port of ahcisata0 console is stalling for a little. After this pause it give two console outputs together making a little mess. Dmesg and fdisk output follows. Question I have - is this a bug and have this problem a possible workaround?

Kernelized RAIDframe activated
atapibus0 at atabus0: 2 targets
cd0 at atapibus0 drive 1: <ASUS    DVD-E616A2, , 1.02> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
cd0(piixide0:0:1): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
ahcisata0 port 0: device present, speed: 3.0Gb/s

#### Here is a pause for 3-4 seconds.

wd0 at atabus2 drive 0ahcisata0 port 2: device present, speed: 3.0Gb/s
: <ST506>

#### ^^^^ This string got a mess of two.

wd0: drive supports 1-sector PIO transfers, chs addressing
wd0: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 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 atabus4 drive 0: <WDC WD800JD-75MSA3>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 76293 MB, 155009 cyl, 16 head, 63 sec, 512 bytes/sect x 156250000 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd1(ahcisata0:2:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133) (using DMA)
boot device: bge1


[root@free ~]$ fdisk wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 139264

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 156250000

[root@free ~]$ fdisk wd1
fdisk: primary partition table invalid, no magic in sector 0
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 155009, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 156250000

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 156250000


-- 
Sincerelly yours