Problems with ATA_CAM support in RELENG_8

Paul Mather paul at gromit.dlib.vt.edu
Wed Jun 30 20:52:54 UTC 2010


On Jun 30, 2010, at 1:38 PM, Alexander Motin wrote:

>> 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.

Thank you (and Jeremy Chadwick) for the help and information.  The kernel configuration options I used above were taken from a VirtualBox FreeBSD/amd64 install I have that I converted over to ATA_CAM when the code first went into RELENG_8 and it wasn't exactly clear at the time what options were absolutely required.  (I'm not even sure that "options ATA_CAM" is needed any more, given "device ahci" implies it.)

>> 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 at 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".

Then that's where my problem lies:

atapci0 at pci0:0:31:2:    class=0x01018f card=0x01da1028 chip=0x28208086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'SATA IDE Controller:4 port (82801HB/HR/HH/HO)'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0xfe00, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0xfe10, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0xfe20, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0xfe30, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0xfec0, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0xecc0, size 16, enabled
    cap 01[70] = powerspec 3  supports D0 D3  current D0

atapci1 at pci0:0:31:5:    class=0x010185 card=0x01da1028 chip=0x28258086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801H (ICH8 Family) 2 port SATA Controller'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0xfe40, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0xfe50, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0xfe60, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0xfe70, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0xfed0, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0xecd0, size 16, enabled
    cap 01[70] = powerspec 3  supports D0 D3  current D0


I thought ICH8 supported AHCI, but maybe it's only ICH8R that does?  I'm assuming that "subclass = ATA" means the controller can't operate in AHCI mode.  The BIOS setting is also confusing.  It has two options, "Normal" and "Legacy."  "Normal" mode says, "The hard drive controller is configured for native mode.  This mode provides the highest drive performance and most flexibility."  I guess I misinterpreted "native mode" to be AHCI mode.

Thanks again for the help and for clearing things up.

Cheers,

Paul.


More information about the freebsd-stable mailing list