Running FreeBSD 7.0-STABLE (csup today) on AMD64. I got a MSI K9AGM3-F motherboard, with ATI SB600 chipset. The PATA controller is well recognised as <ATI IXP600 UDMA133 controller>, but the sata controler is detected as <ATI (ID=43801002) AHCI controller> : The SATA controller is setup in AHCI mode on the BIOS. (output from dmesg : ) atapci0: <ATI (ID=43801002) AHCI controller> port 0xb000-0xb007,0xa000-0xa003,0x9000-0x9007,0x8000-0x8003,0x7000-0x700f mem 0xfe7ff800-0xfe7ffbff irq 22 at device 18.0 on pci0 atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0x7000 atapci0: Reserved 0x400 bytes for rid 0x24 type 3 at 0xfe7ff800 ioapic0: routing intpin 22 (PCI IRQ 22) to vector 49 atapci0: [MPSAFE] atapci0: [ITHREAD] atapci0: AHCI Version 01.10 controller with 4 ports detected atacontrol list returns the following : [carenath] ~# atacontrol list ATA channel 0: Master: ad0 <Maxtor 6Y120L0/YAR41BW0> ATA/ATAPI revision 7 Slave: no device present atacontrol: ioctl(IOCATADEVICES): Device not configured The 4 drives are still recognised and work perfectly. How-To-Repeat: Run the "atacontrol list" command.
This bug occurs when there is missing controllers in the 0..n range. Ie, if the box has controllers: ata2 ata3 via a atapci but no native controllers (ie ata0, ata1) atacontrol list Will fail to list any controllers. This is due to atacontrol requesting information about a non existent channel (ata0) as it sequentially goes from 0..n (where n is obtained from IOATAGMAXCHANNEL). ata(4) notices the invalid controller request and returns EXIO. Hence atacontrol thinks it's an error and exits. A potential fix is at: http://lists.freebsd.org/pipermail/freebsd-stable/2008-April/041991.html However this simply avoids the real problem, that is, there needs to be a way to ask the kernel what channels exist. One potential solution is to introduce a IOATAGCHANNELS ioctl which returns a list of valid channels taking a struct like: struct ata_ioc_channels { int max; int channels[n]; } and replace the MAXCHANNELS request. Till then the patch will ignore the error state.
State Changed From-To: open->closed Patch was committed to 8-CURRENT and merged to 7-STABLE.