LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Crane Cai <crane.cai@amd.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	torvalds@osdl.org
Subject: Re: GAK!!!! Re: PCI: AMD SATA IDE mode quirk
Date: Tue, 26 Feb 2008 10:15:26 +0800	[thread overview]
Message-ID: <1203992126.1320.1.camel@SHAPC235.amd.com> (raw)
In-Reply-To: <47C346E2.10908@garzik.org>

在 2008-02-26Tue的 06:53 +0800,Jeff Garzik写道:
> 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

pdev->class is also quirked when resume. We need to reread PCI
configuation on resume.


  reply	other threads:[~2008-02-26  2:16 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
2008-02-26  2:15     ` Crane Cai [this message]
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=1203992126.1320.1.camel@SHAPC235.amd.com \
    --to=crane.cai@amd.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).