LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	torvalds@osdl.org, "Cai, Crane" <Crane.Cai@amd.com>
Subject: Re: GAK!!!! Re: PCI: AMD SATA IDE mode quirk
Date: Mon, 25 Feb 2008 17:53:22 -0500	[thread overview]
Message-ID: <47C346E2.10908@garzik.org> (raw)
In-Reply-To: <20080222094828.2a0124ca@core>

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




  parent reply	other threads:[~2008-02-25 22:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200802220059.m1M0xgjZ022717@hera.kernel.org>
2008-02-22  9:48 ` Alan Cox
2008-02-22 10:02   ` Alan Cox
2008-02-22 10:34     ` Jiri Slaby
2008-02-25 22:53   ` Jeff Garzik [this message]
2008-02-26  2:15     ` Crane Cai
2008-02-26 12:45     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C346E2.10908@garzik.org \
    --to=jeff@garzik.org \
    --cc=Crane.Cai@amd.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --subject='Re: GAK'\!''\!''\!''\!' Re: PCI: AMD SATA IDE mode quirk' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).