LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	torvalds@osdl.org, jeff@garzik.org
Subject: Re: GAK!!!! Re: PCI: AMD SATA IDE mode quirk
Date: Fri, 22 Feb 2008 11:34:35 +0100	[thread overview]
Message-ID: <47BEA53B.6090903@gmail.com> (raw)
In-Reply-To: <20080222100205.5c86d351@core>

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?

  reply	other threads:[~2008-02-22 10:34 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 [this message]
2008-02-25 22:53   ` Jeff Garzik
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=47BEA53B.6090903@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --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).