Re: MSI fix for buggy PCI/PCI-X hardware

From: Zwane Mwaikambo
Date: Wed Sep 10 2003 - 16:35:13 EST


On Tue, 9 Sep 2003, Jeff Garzik wrote:

> 5) Another option is to enable MSI only for devices which call
> request_msi(). This idea follows the current model of
> pci_enable_device(): PCI resources and interrupts are guaranteed to be
> assigned and set up only after a successful call to pci_enable_device().
> Then, later on, the driver will call request_irq(), which will unmask
> the irq (if it's not already shared). Continuing this model, a driver's
> call to request_msi() would signal that MSI is to be enabled for that
> device.... and ensure that the PCI core does not unconditionally enable
> MSI for any device outside of request_msi() call.

Jun, i'm of the opinion that we can't be doing this in the kernel. The
bugs are device specific so putting blacklists in the core kernel
code sounds a bit wrong. What i would prefer is if this is done on a driver
level via a flag (e.g. say it's a buggy batch upto a given pci revision).
I don't believe we'd be "violating" the PCI 3.0 mandate if we only check
revisions when making a decision on driving a device via the irq line or
msi. So i'm actually agreeing with the request_msi/request_irq pair and
using that as the interface a driver writer uses to enable the respective
modes. I know it's kind of cheating and normally the communication path
when doing this query should be the kernel informing the driver of
capability and the driver working with the specified mode. But driver
informing the kernel of specific preferred mode for a device should save
some headaches. Workable?

Btw have there been some updates? I want to have another look.

Thanks,
Zwane
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/