mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhao Yakui <yakui.zhao@intel.com>
To: NoWhereMan <uncommonnonsense@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 2.6.25-rc7 001/001] ACPI: workaround for buggy BIOS to ignore error LINK CRS method
Date: Thu, 10 Apr 2008 18:40:57 +0800	[thread overview]
Message-ID: <1207824057.8704.12.camel@yakui_zhao.sh.intel.com> (raw)
In-Reply-To: <20080409161251.0c0e73e9.akpm@linux-foundation.org>

On Wed, 2008-04-09 at 16:12 -0700, Andrew Morton wrote:
> On Wed, 9 Apr 2008 17:42:34 +0200
> NoWhereMan <uncommonnonsense@gmail.com> wrote:
> 
> > >From : Edoardo Vacchi <uncommonnonsense@gmail.com>
> > 
> > When acpi_pci_link_crs_ignore is passed at boot to the kernel,
> > ignores the error about the _CRS method of LINK device and selects
> > IRQ from possible IRQ list returned by _PRS method.
> > 
> > Signed-off-by: Edoardo Vacchi <uncommonnonsense@gmail.com>
> > 
> 
> Let's add some cc's.
> 
> > 
> > This is nothing more than the patch on comment #127 on bug #8896
> > http://bugzilla.kernel.org/show_bug.cgi?id=8896#c127
> > 
> > originally by Zhao Yakui <yakui.zhao@intel.com>
> > 
> > ported to 2.6.25 and wrapped into an additional check for the kernel parameter
> > (plus of course the defintion of the kernel param itself)
> > 
> > The patch provides a workaround for some buggy BIOSes such as Insyde
> > in Packard Bell EasyNote r1938 (of which I'm an unfortunate owner),
> > while still keeping boot safe for people not suffering from this bug
> > 
> 
> That patch is about four months old.  Hopefully there was a reason why we
> dodn't proceed with it?
It seems that the system can work after applying the patch. 
But the patch depends on the returned result(-ENODEV).
> if (ACPI_FAILURE(status)) {
>               ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS"));
>                result = -ENODEV;
 >               goto end;
 >       }
Now I am writing another workaround patch about this problem.
> 
> > diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
> > index 233c40c..ed54c63 100644
> > --- a/drivers/acpi/pci_link.c
> > +++ b/drivers/acpi/pci_link.c
> > @@ -297,6 +297,16 @@ static int acpi_pci_link_get_current(struct
> > acpi_pci_link *link)
> >         return result;
> >  }
> > 
> > +
> > +/*
> > + * this is set when acpi_pci_link_crs_ignore is passed on boot
> > + * it will ignore the -ENODEV error on buggy BIOSes
> > + *
> > + * workaround for bug #8896
> > + *
> > + */
> > +static int acpi_pci_link_crs_ignore; /* 0 or 1*/
> > +
> >  static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
> >  {
> >         int result = 0;
> > @@ -385,9 +395,16 @@ static int acpi_pci_link_set(struct acpi_pci_link
> > *link, int irq)
> > 
> >         /* Query _CRS, set link->irq.active */
> >         result = acpi_pci_link_get_current(link);
> > -       if (result) {
> > -               goto end;
> > -       }
> > +       if (acpi_pci_link_crs_ignore && result == -ENODEV) {
> > +               /*
> > +                * Ignore the error about the _CRS method of Link device and
> > +                * select IRQ from the Possible IRQ list
> > +                * returned by _PRS method.
> > +                */
> > +                printk(KERN_WARNING "Ignore error LINK CRS method.\n");
> > +                link->irq.active = irq;
> > +                result = 0;
> > +        }
> > 
> >         /*
> >          * Is current setting not what we set?
> > @@ -412,7 +429,16 @@ static int acpi_pci_link_set(struct acpi_pci_link
> > *link, int irq)
> >         return result;
> >  }
> > 
> > -/* --------------------------------------------------------------------------
> > +int __init acpi_pci_link_crs_ignore_set(char *str)
> > +{
> > +       acpi_pci_link_crs_ignore = 1;
> > +       return 1;
> > +}
> > +
> > +__setup("acpi_pci_link_crs_ignore", acpi_pci_link_crs_ignore_set);
> > +
> > +
> > + /* --------------------------------------------------------------------------
> >                              PCI Link IRQ Management
> >     --------------------------------------------------------------------------
> > */
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2008-04-10  3:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 15:42 NoWhereMan
2008-04-09 23:12 ` Andrew Morton
2008-04-10 10:40   ` Zhao Yakui [this message]
2008-04-10 12:23     ` NoWhereMan
2008-04-15 13:49       ` Zhao Yakui
     [not found]         ` <f7430a760804150121ndfaf065j332ebf1cee3c572@mail.gmail.com>
     [not found]           ` <f7430a760804151538v410f7c64m21d90cb9da8e9baa@mail.gmail.com>
     [not found]             ` <f7430a760804161154o77dd7fc5g622d3bbe4fa1183b@mail.gmail.com>
2008-04-21 13:13               ` NoWhereMan
2008-04-22 13:37                 ` Zhao Yakui

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=1207824057.8704.12.camel@yakui_zhao.sh.intel.com \
    --to=yakui.zhao@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uncommonnonsense@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®