NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/38081: ahcisata does not attach for Intel 82801GB/GR



On Fri, Feb 22, 2008 at 10:55:00AM +0000, mlelstv%serpens.de@localhost wrote:

> >Description:
> 
> A system (HP Proliant ML110) booting a kernel built from today's sources
> fails to attach the ahcisata driver. The PCI device shows up as
> 'not configured'.
> 
> An older kernel:
> 
> NetBSD pussyfoot 4.99.54 NetBSD 4.99.54 (PUSSYFOOT) #3: Tue Feb 12 23:16:16 
> CET 2008 
> mlelstv@henery:/home/netbsd-current/obj.amd64/home/netbsd-current/src/sys/arch/amd64/compile/PUSSYFOOT
>  amd64
> 
> reports correctly:
> 
> ahcisata0 at pci0 dev 31 function 2: Intel 82801GB/GR AHCI SATA Controller
> ahcisata0: interrupting at ioapic0 pin 19 (irq 5) ahcisata0: AHCI revision 
> 1.1, 4 ports, 32 command slots, features 0xc720e000
> 
> The attachment fails because ahcisata_pci.c was changed recently to allow only
> RAID controllers to attach.
> 
> However, revoking that change still fails, the device is attached but
> ahcisata complains about not being able to map AHCI registers.
> 
> I can set the device to RAID mode in the BIOS, however, it still does
> not attach since the following test for 'AHCI mode' fails independent
> of the BIOS setting.
> 
>    if (bus_space_read_4(regt, regh, AHCI_GHC) & AHCI_GHC_AE)
>               ret = 3;

The attached patch changes the behavour from something like:

        if (SATA_AHCI || RAID)
                return match if ACHI mode;

to

        if (SATA_AHCI || RAID)
                if (SATA_ACHI)
                        return match;
                else if (ACHI enable bit)
                        return match;

I think we're right to not blindly attach to any card that is
PCI_SUBCLASS_MASS_STORAGE_RAID as rev 1.3 of ahcisata_pci.c did.
However, I'm not sure what you attach such a device if it doesn't have
AHCI_GHC_AE set...


Home | Main Index | Thread Index | Old Index