lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: GAK!!!! Re: PCI: AMD SATA IDE mode quirk
On 02/22/2008 11:02 AM, Alan Cox wrote:
> On Fri, 22 Feb 2008 09:48:28 +0000
> Alan Cox <alan@lxorguk.ukuu.org.uk> 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))
>
> or better yet
>
> ((pdev->class & 0xFF00) == 0x0100)

Isn't it what was there before the change:
>>> - if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
>>> - u8 tmp;
and there was some reason to change it?


\
 
 \ /
  Last update: 2008-02-22 11:37    [W:0.060 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site