lkml.org 
[lkml]   [2008]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: GAK!!!! Re: PCI: AMD SATA IDE mode quirk
Alan Cox wrote:
>> Signed-off-by: Crane Cai <crane.cai@amd.com>
>> Acked-by: Jeff Garzik <jeff@garzik.org>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> Vomitted-upon-by: Alan Cox <alan@redhat.com>
>
>> - if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
>> - u8 tmp;
>> + /* set sb600/sb700/sb800 sata to ahci mode */
>> + u8 tmp;
>>
>> + pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
>> + if (tmp == 0x01) {
>
> CLASS_DEVICE is cached in pdev->class so why not simply do:
>
> if (pdev->class & (1 << 8))

I agree. I [obviously] missed this when I ack'd, mainly ack'ing the
overall change.

BIOS certainly may modify that PCI config register, but that's before
the kernel boots. So, using pdev->class is fine.

Jeff





\
 
 \ /
  Last update: 2008-02-25 23:55    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site