All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
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 10:02:05 +0000	[thread overview]
Message-ID: <20080222100205.5c86d351@core> (raw)
In-Reply-To: <20080222094828.2a0124ca@core>

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)

;)
--
Gnome #3319

  reply	other threads:[~2008-02-22 10:11 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 ` GAK!!!! Re: PCI: AMD SATA IDE mode quirk Alan Cox
2008-02-22 10:02   ` Alan Cox [this message]
2008-02-22 10:34     ` Jiri Slaby
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=20080222100205.5c86d351@core \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.