Date: Wed, 30 Jun 2010 20:38:11 +0300 From: Alexander Motin <mav@FreeBSD.org> To: FreeBSD Stable <freebsd-stable@freebsd.org> Cc: Garrett Cooper <yanefbsd@gmail.com>, Paul Mather <pmather@vt.edu> Subject: Re: Fwd: Problems with ATA_CAM support in RELENG_8 Message-ID: <4C2B8103.6010409@FreeBSD.org> In-Reply-To: <AANLkTimPHAeu1lvqfgo2mX59aMPDOvu_GRJ94-GxQlz0@mail.gmail.com> References: <D77A24D9-8F38-42D4-996D-769352EE1C54@vt.edu> <AANLkTimPHAeu1lvqfgo2mX59aMPDOvu_GRJ94-GxQlz0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Cooper wrote: > I am running FreeBSD/amd64 RELENG_8 on a Dell Optiplex 745. The hard > drive in the system is SATA and I have "Normal", not "Legacy" SATA > support enabled in the BIOS. (BIOS is V2.6.4.) I am assuming this > will enable native AHCI mode for the drive. > > I built a kernel with ATA_CAM support, but for some reason the SATA > drive is probing at slow, UDMA2, speeds: > > ada0 at ata2 bus 0 scbus0 target 0 lun 0 > ada0: <ST3160812AS 3.ADJ> ATA-7 SATA 2.x device > ada0: 33.300MB/s transfers (UDMA2, PIO 8192bytes) > ada0: 152587MB (312500000 512 byte sectors: 16H 63S/T 16383C) > When I run "camcontrol identify" on the drive, it states the drive is > capable of UDMA6 speeds: > > backup# camcontrol identify ada0 > PIO supported PIO4 > DMA supported WDMA2 UDMA6 > Native Command Queuing (NCQ) yes 32 tags > > So, why the slower speed? Also, "camcontrol identify" states the > drive supports NCQ with up to 32 tags supported, yet "camcontrol tags > ada0" reports only 1 device opening, not 32 as I would expect: > > backup# camcontrol tags ada0 > (pass0:ata2:0:0:0): device openings: 1 Speed, number of tags and other options limited by lowest of device and controller capabilities. > To enable ATA_CAM AHCI support, I included this in my kernel config file: > > # ATA and ATAPI devices > options ATA_CAM > device ahci > device atacore > device atapci > options ATA_STATIC_ID # Static device numbering > > Is this the correct way to enable ATA_CAM AHCI support? I tried > initially including just "options ATA_CAM" and "device ahci" but the > resultant kernel would not probe my disk drive as ada0. Your controller seems to not report AHCI support. In such case legacy mode driver attaches to it. But as soon as you have no `device ataintel` line, only generic driver was there, limited by UDMA2 mode. PS: ATA_STATIC_ID is useless when ATA_CAM option enabled. > Does my problem lie with my kernel config or is the Dell Optiplex 745 > BIOS brain dead when it comes to AHCI native support? The only option > it appears to have in the BIOS is "Normal" and "Legacy" when it comes > to the SATA controller mode. Your controller is not identified as AHCI: > atapci0: <Intel ATA controller> port > 0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfecf,0xecc0-0xeccf > irq 20 at device 31.2 on pci0 > atapci0: [ITHREAD] > ata2: <ATA channel 0> on atapci0 > ata2: [ITHREAD] > ata3: <ATA channel 1> on atapci0 > ata3: [ITHREAD] > atapci1: <Intel ATA controller> port > 0xfe40-0xfe47,0xfe50-0xfe53,0xfe60-0xfe67,0xfe70-0xfe73,0xfed0-0xfedf,0xecd0-0xecdf > irq 20 at device 31.5 on pci0 > atapci1: [ITHREAD] > ata4: <ATA channel 0> on atapci1 > ata4: [ITHREAD] > ata5: <ATA channel 1> on atapci1 > ata5: [ITHREAD] You may check `pciconf -lvcb` output. For ICH8 with AHCI you should see there something like: ahci0@pci0:0:31:2: class=0x010601 card=0xa00c14ff chip=0x28298086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'Mobile SATA AHCI Controller' class = mass storage subclass = SATA bar [10] = type I/O Port, range 32, base 0xe880, size 8, enabled bar [14] = type I/O Port, range 32, base 0xe800, size 4, enabled bar [18] = type I/O Port, range 32, base 0xe480, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xe400, size 4, enabled bar [20] = type I/O Port, range 32, base 0xe080, size 32, enabled bar [24] = type Memory, range 32, base 0xfeaff800, size 2048, enabled cap 05[80] = MSI supports 4 messages enabled with 4 messages cap 01[70] = powerspec 3 supports D0 D3 current D0 cap 12[a8] = SATA Index-Data Pair Pay attention to "subclass = SATA". -- Alexander Motin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C2B8103.6010409>