FreeBSD 8.0 STABLE sata regression

Alexander Motin mav at
Sat Jan 9 23:50:54 UTC 2010

Abdullah Ibn Hamad Al-Marri wrote:
>> Abdullah Ibn Hamad Al-Marri wrote:
>>> My servers are alright with FreeBSD 8.0-RELEASE, but not with -STABLE.
>>> FreeBSD NOC.WEArab.Net 8.0-STABLE FreeBSD 8.0-STABLE #0: Fri Jan  8 18:26:13 
>> UTC 2010    admin at localhost.localdomain:/usr/obj/usr/src/sys/GENERIC  amd64
>>> atapci0: port 
>> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x20a0-0x20af mem 0x90200000-0x902003ff irq 
>> 19 at device 31.2 on pci0
>>> ata0: on atapci0
>>> ata0: [ITHREAD]
>>> ata1: on atapci0
>>> ata1: [ITHREAD]
>>> when I upgraded to FreeBSD 8.0-STABLE it got many issues.
>>> ad2: 381554MB at ata1-master UDMA100 
>> If UDMA mode reported instead of SATA speed is the only issue, then it
>> is not an issue, but only a cosmetic change. It doesn't mean that your
>> drives will work slower.
>> Thanks for report, I'll plug ICH7 board a bit later to check this.
>> To get more info about the problem, try `atacontrol mode ad2` command.
> Here is the result,
> VB# atacontrol mode ad4
> current mode = UDMA100 
> VB# atacontrol mode ad6
> current mode = UDMA100 
> VB# 

OK. I have attached my ICH7 board and found where is the problem. This
chipset doesn't provide access to SATA control registers. As result,
driver can't get SATA connection info and so doesn't report it. If you
wish, you can restore previous behavior by applying attached patch. Here
is what I have with it:

%atacontrol mode ad0
current mode = UDMA100
%atacontrol mode ad4
current mode = UDMA100 SATA 1.5Gb/s
%atacontrol mode ad5
current mode = UDMA100 SATA 1.5Gb/s
%atacontrol mode ad6
current mode = UDMA100 SATA 1.5Gb/s
%atacontrol mode ad7
current mode = UDMA100 SATA 1.5Gb/s

But as I have said before, it is only a cosmetics.

Alexander Motin
-------------- next part --------------
--- ata-pci.c.prev	2010-01-10 01:25:45.000000000 +0200
+++ ata-pci.c	2010-01-10 01:25:49.000000000 +0200
@@ -714,9 +714,12 @@ static int
 ata_pcichannel_getrev(device_t dev, int target)
 	struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
+	struct ata_channel *ch = device_get_softc(dev);
 	if (ctlr->getrev)
 		return (ctlr->getrev(dev, target));
+	else if (ch->flags & ATA_SATA)
+		return (1);
 		return (0);

More information about the freebsd-questions mailing list