From: Marin Mitov <mitov@issp.bas.bg>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-kernel@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH] pci_try_set_mwi() in sata_promise
Date: Wed, 23 Apr 2008 15:31:20 +0300 [thread overview]
Message-ID: <200804231531.20803.mitov@issp.bas.bg> (raw)
In-Reply-To: <18446.60365.156326.246875@harpo.it.uu.se>
On 23.4.2008, Mikael Pettersson wrote:
> Marin Mitov writes:
> > Hi all,
> >
> > The BIOS (Asus A8V Deluxe) is setting incorrectly PCI
> > Cache Line Size Register (as seen in lspci -vvv output),
> > so try to correct it by pci_try_set_mwi(pdev).
> >
> > Marin Mitov
> > ----------------------------------------------------------
> > Enable Memory-Write-and-Invalidate in sata_promise driver and
> > get rid of strange BIOS-set value for cache line size register.
> >
> > According to Documentation/pci.txt: "This enables...
> > ...and also ensures that the cache line size register
> > is set correctly".
> >
> > Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
> > ----------------------------------------------------------
> > --- a/drivers/ata/sata_promise.c 2008-04-22 13:09:15.000000000 +0300
> > +++ b/drivers/ata/sata_promise.c 2008-04-22 13:11:01.000000000 +0300
> > @@ -1114,6 +1114,7 @@ static int pdc_ata_init_one(struct pci_d
> >
> > /* start host, request IRQ and attach */
> > pci_set_master(pdev);
> > + pci_try_set_mwi(pdev);
> > return ata_host_activate(host, pdev->irq, pdc_interrupt, IRQF_SHARED,
> > &pdc_ata_sht);
> > }
> >
>
> Not enough information here.
>
> 0. Please post lspci -vvvx including all PCI devices.
Here it is:
> 1. What consequence does the incorrect cache line size setting have?
None if MWI is not enabled.
> 2. What improvement does that pci_try_set_mwi() cause? Speed? Fewer errors?
May be speed, but practicaly hardly observable. It is described in PCI specs.
If the hardware has this property why not using it? In any case that does not hurt.
> 3. Why call pci_try_set_mwi()? Can't you set the cache line size directly?
pci_set_cacheline_size() is NOT exported, while pci_try_set_mwi() is and
sets (as a side effect) the cache line size.
> 4. You write "try to correct it". So the "fix" might not work? Then what?
It fails only if cache line size cannot be set. Then MWI is not enabled.
The device continues to work (nicely) as it did up to now.
> 5. Is the problem specific for the Promise chip? That is:
> a) are any other built-in PCI devices affected by this BIOS bug?
> b) if you add a PCI card (of any kind), does it also
> get the incorrect cache line size setting?
> 6. Are you running the latest BIOS?
>
> To me it sounds like this is a generic PCI bug on that
> machine, and so should be handled by the kernel's PCI layer.
> But if the problem really is specific to the built-in Promise
> chip on that machine, then I can see why a workaround in
> sata_promise could be appropriate.
>
> /Mikael
>
next prev parent reply other threads:[~2008-04-23 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 18:26 [PATCH] pci_try_set_mwi() in sata_promise Marin Mitov
2008-04-23 7:57 ` Mikael Pettersson
2008-04-23 12:31 ` Marin Mitov [this message]
2008-04-23 12:34 ` Marin Mitov
2008-04-23 13:33 ` Marin Mitov
2008-04-23 14:46 ` Grant Grundler
2008-04-23 18:15 ` Marin Mitov
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=200804231531.20803.mitov@issp.bas.bg \
--to=mitov@issp.bas.bg \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
/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;
as well as URLs for NNTP newsgroup(s).