Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jun 2010 16:52:22 -0400
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Cc:        Alexander Motin <mav@freebsd.org>
Subject:   Re: Problems with ATA_CAM support in RELENG_8
Message-ID:  <1CD8E4CC-53C6-4594-9FF4-CDD57A6B51AC@gromit.dlib.vt.edu>
In-Reply-To: <4C2B8103.6010409@FreeBSD.org>
References:  <D77A24D9-8F38-42D4-996D-769352EE1C54@vt.edu> <AANLkTimPHAeu1lvqfgo2mX59aMPDOvu_GRJ94-GxQlz0@mail.gmail.com> <4C2B8103.6010409@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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:
>>=20
>> # ATA and ATAPI devices
>> options         ATA_CAM
>> device          ahci
>> device          atacore
>> device          atapci
>> options         ATA_STATIC_ID   # Static device numbering
>>=20
>> 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.
>=20
> 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.
>=20
> 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.
>=20
> Your controller is not identified as AHCI:
>=20
>> atapci0: <Intel ATA controller> port
>> =
0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfecf,0xec=
c0-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,0xec=
d0-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]
>=20
> You may check `pciconf -lvcb` output. For ICH8 with AHCI you should =
see
> there something like:
> ahci0@pci0:0:31:2:      class=3D0x010601 card=3D0xa00c14ff =
chip=3D0x28298086
> rev=3D0x03 hdr=3D0x00
>    vendor     =3D 'Intel Corporation'
>    device     =3D 'Mobile SATA AHCI Controller'
>    class      =3D mass storage
>    subclass   =3D SATA
>    bar   [10] =3D type I/O Port, range 32, base 0xe880, size  8, =
enabled
>    bar   [14] =3D type I/O Port, range 32, base 0xe800, size  4, =
enabled
>    bar   [18] =3D type I/O Port, range 32, base 0xe480, size  8, =
enabled
>    bar   [1c] =3D type I/O Port, range 32, base 0xe400, size  4, =
enabled
>    bar   [20] =3D type I/O Port, range 32, base 0xe080, size 32, =
enabled
>    bar   [24] =3D type Memory, range 32, base 0xfeaff800, size 2048, =
enabled
>    cap 05[80] =3D MSI supports 4 messages enabled with 4 messages
>    cap 01[70] =3D powerspec 3  supports D0 D3  current D0
>    cap 12[a8] =3D SATA Index-Data Pair
>=20
> Pay attention to "subclass =3D SATA".

Then that's where my problem lies:

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

atapci1@pci0:0:31:5:    class=3D0x010185 card=3D0x01da1028 =
chip=3D0x28258086 rev=3D0x02 hdr=3D0x00
    vendor     =3D 'Intel Corporation'
    device     =3D '82801H (ICH8 Family) 2 port SATA Controller'
    class      =3D mass storage
    subclass   =3D ATA
    bar   [10] =3D type I/O Port, range 32, base 0xfe40, size  8, =
enabled
    bar   [14] =3D type I/O Port, range 32, base 0xfe50, size  4, =
enabled
    bar   [18] =3D type I/O Port, range 32, base 0xfe60, size  8, =
enabled
    bar   [1c] =3D type I/O Port, range 32, base 0xfe70, size  4, =
enabled
    bar   [20] =3D type I/O Port, range 32, base 0xfed0, size 16, =
enabled
    bar   [24] =3D type I/O Port, range 32, base 0xecd0, size 16, =
enabled
    cap 01[70] =3D 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 =3D 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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1CD8E4CC-53C6-4594-9FF4-CDD57A6B51AC>