public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-kernel@vger.kernel.org
Subject: Re: [RFC/CFT] cmd640 irqlocking fixes
Date: Thu, 25 Jul 2002 09:54:48 +0200	[thread overview]
Message-ID: <20020725095448.B21541@ucw.cz> (raw)
In-Reply-To: <1027559111.6456.34.camel@irongate.swansea.linux.org.uk>; from alan@lxorguk.ukuu.org.uk on Thu, Jul 25, 2002 at 02:05:11AM +0100

On Thu, Jul 25, 2002 at 02:05:11AM +0100, Alan Cox wrote:

> > I don't have one of these, and I'm not even sure what it is. But here's
> > a wild guess at a fix.
> 
> These must be locked against any other PCI access so it needs to share
> the lock with arch/i386/kernel/pci*.c. The code is also wrong for other
> reasons and there are some fixes in the 2.4.19-ac tree to those
> functions that affect the locking and maybe should be merged too.
> 
> What is going on here is that we have to probe the CMD640 PCI either via
> PCI conf1 or PCI conf2. We cannot use the kernel default functions
> because they may trigger a bug in the CMD640 hardware.

> get_cmd640_reg_pci[12] are basically reimplementations of the
> pci_read_config bits for type 1/type 2 PCI configurations. The register
> and lock are thus the same as the core. This lock also needs to match
> the same lock on non x86 platforms so the pci config lock name should be
> unified now before the brown and sticky impacts on the rotating
> propellor blades

The kernel functions are OK. The problem is that the kernel can use
PCIBIOS calls to set the registers. And certain old buggy BIOSes which
violate the PCI spec can use wrong size data transfers to set the
registers, which the CMD640 doesn't like.

IMHO the best workaround here would be either to disable PCIBIOS calls
and revert to conf1 or conf2 in the PCI code if a CMD640 is present, or
just panic() in the CMD640 code and suggest to the user to use
"pci=nobios" on the kernel command line. I'd actually prefer the later.

-- 
Vojtech Pavlik
SuSE Labs

  reply	other threads:[~2002-07-25  7:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 22:58 [RFC/CFT] cmd640 irqlocking fixes William Lee Irwin III
2002-07-24 23:16 ` William Lee Irwin III
2002-07-25  1:05 ` Alan Cox
2002-07-25  7:54   ` Vojtech Pavlik [this message]
2002-07-25  8:28     ` Marcin Dalecki
2002-07-25  8:55       ` Vojtech Pavlik
2002-07-25  8:56         ` Marcin Dalecki
2002-07-25 10:24           ` Alan Cox
2002-07-25 10:37             ` Marcin Dalecki
2002-07-25 10:51             ` Andre Hedrick
2002-07-25 12:52               ` Alan Cox
2002-07-25 12:05                 ` Andre Hedrick
2002-07-25 13:08                 ` Alan Cox
2002-07-25 11:53                   ` Marcin Dalecki
2002-07-25 12:30                   ` Andre Hedrick
2002-07-25 14:33                     ` Alan Cox
2002-07-25 13:39                   ` Benjamin Herrenschmidt
2002-07-25 14:18                     ` PCI config locking (WAS Re: [RFC/CFT] cmd640 irqlocking fixes)2 Benjamin Herrenschmidt
2002-07-25 15:45                       ` Alan Cox
2002-07-25 14:40                         ` benh
2002-07-25 16:10                           ` Alan Cox
2002-07-25 23:04                           ` Alan Cox
2002-07-25 14:48                         ` Dave Jones
2002-07-25 15:44                           ` Thunder from the hill
2002-07-29  7:13                           ` David S. Miller
2002-07-26  0:41                       ` Marcin Dalecki
2002-07-26  0:15         ` [RFC/CFT] cmd640 irqlocking fixes Albert D. Cahalan
2002-07-25 10:22     ` Alan Cox
2002-07-25  8:01 ` Marcin Dalecki
  -- strict thread matches above, loose matches on Subject: below --
2002-07-25 12:50 Petr Vandrovec
2002-07-25 14:34 ` Alan Cox
2002-07-26  2:15   ` Marcin Dalecki

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=20020725095448.B21541@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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