MSI fix for buggy PCI/PCI-X hardware

From: long
Date: Tue Sep 09 2003 - 13:31:34 EST


The latest patches that enable MSI in the Linux kernel were
sent out a few weeks ago on lkml. These patches will enable
MSI support if users rebuild the kernel with CONFIG_PCI_MSI
set to 'Y'. Option one (default option) enables MSI on
specific individual PCI/PCI-X MSI-capable devices listed in
the boot parameter "device_msi=". Users may choose option
two, which enables MSI on all PCI/PCI-X MSI-capable devices,
by setting CONFIG_PCI_MSI_ON_SPECIFIC_DEVICES to 'N'.
Depending on if either option one or option two is selected,
the kernel detects and enables MSI on requested PCI/PCI-X
MSI-capable devices.

During testing we have found many currently shipping
PCI/PCI-X MSI-capable devices have silicon bugs specific to
MSI support. Most of these will cause system failures when
MSI is enabled. To filter out MSI buggy hardware requires the
kernel to detect and disable the MSI support on specific hardware.

The proposed solution is to provide a new API, named "int
disable_msi(struct pci_dev *dev)", to allow IHV's who have
shipped PCI/PCI-X hardware that does not work in MSI mode to update
their software drivers to request the kernel to switch the
interrupt mode from MSI mode back to IRQ pin-assertion mode.
There are some reasons to justify this as below:

1) According to the PCI spec 3.0 or latest, the software
driver is prohibited from directly interfacing with its
device to switch MSI mode to IRQ pin-assertion mode.
Consequently, a kernel interface is required since the kernel
is the only entity permitted to change modes.

2) All PCI-Express endpoints require MSI support. These
endpoints should have MSI enabled automatically by default.
For PCI/PCI-X hardware that can't use MSI due to hardware bugs,
it is the IHVs' responsibility to update their software drivers to
request the kernel to disable MSI so the HW can function with MSI
enabled for all other devices.

3) Some PCI/PCI-X MSI-capable hardware devices out there work with
this patch without requiring any changes to their existing software
drivers.

I'd appreciate any feedback you have on this proposed solution.

Thanks,
Long
-
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/