MSI: Replace pci_msi_quirk with calls to pci_no_msi()
I don't see any reason why we need pci_msi_quirk, quirk code can just call pci_no_msi() instead. Remove the check of pci_msi_quirk in msi_init(). This is safe as all calls to msi_init() are protected by calls to pci_msi_supported(), which checks pci_msi_enable, which is disabled by pci_no_msi(). The pci_disable_msi routines didn't check pci_msi_quirk, only pci_msi_enable, but as far as I can see that was a bug not a feature. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
89298c7a41
commit
88187dfa4d
4 changed files with 4 additions and 19 deletions
|
@ -5954,8 +5954,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
* responding after a while.
|
* responding after a while.
|
||||||
*
|
*
|
||||||
* AMD believes this incompatibility is unique to the 5706, and
|
* AMD believes this incompatibility is unique to the 5706, and
|
||||||
* prefers to locally disable MSI rather than globally disabling it
|
* prefers to locally disable MSI rather than globally disabling it.
|
||||||
* using pci_msi_quirk.
|
|
||||||
*/
|
*/
|
||||||
if (CHIP_NUM(bp) == CHIP_NUM_5706 && disable_msi == 0) {
|
if (CHIP_NUM(bp) == CHIP_NUM_5706 && disable_msi == 0) {
|
||||||
struct pci_dev *amd_8132 = NULL;
|
struct pci_dev *amd_8132 = NULL;
|
||||||
|
|
|
@ -170,13 +170,6 @@ static int msi_init(void)
|
||||||
if (!status)
|
if (!status)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (pci_msi_quirk) {
|
|
||||||
pci_msi_enable = 0;
|
|
||||||
printk(KERN_WARNING "PCI: MSI quirk detected. MSI disabled.\n");
|
|
||||||
status = -EINVAL;
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = msi_cache_init();
|
status = msi_cache_init();
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
pci_msi_enable = 0;
|
pci_msi_enable = 0;
|
||||||
|
|
|
@ -43,12 +43,8 @@ extern void pci_remove_legacy_files(struct pci_bus *bus);
|
||||||
/* Lock for read/write access to pci device and bus lists */
|
/* Lock for read/write access to pci device and bus lists */
|
||||||
extern struct rw_semaphore pci_bus_sem;
|
extern struct rw_semaphore pci_bus_sem;
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_MSI
|
|
||||||
extern int pci_msi_quirk;
|
|
||||||
#else
|
|
||||||
#define pci_msi_quirk 0
|
|
||||||
#endif
|
|
||||||
extern unsigned int pci_pm_d3_delay;
|
extern unsigned int pci_pm_d3_delay;
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_MSI
|
#ifdef CONFIG_PCI_MSI
|
||||||
void disable_msi_mode(struct pci_dev *dev, int pos, int type);
|
void disable_msi_mode(struct pci_dev *dev, int pos, int type);
|
||||||
void pci_no_msi(void);
|
void pci_no_msi(void);
|
||||||
|
|
|
@ -1700,9 +1700,6 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
|
||||||
quirk_nvidia_ck804_pcie_aer_ext_cap);
|
quirk_nvidia_ck804_pcie_aer_ext_cap);
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_MSI
|
#ifdef CONFIG_PCI_MSI
|
||||||
/* To disable MSI globally */
|
|
||||||
int pci_msi_quirk;
|
|
||||||
|
|
||||||
/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely
|
/* The Serverworks PCI-X chipset does not support MSI. We cannot easily rely
|
||||||
* on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually
|
* on setting PCI_BUS_FLAGS_NO_MSI in its bus flags because there are actually
|
||||||
* some other busses controlled by the chipset even if Linux is not aware of it.
|
* some other busses controlled by the chipset even if Linux is not aware of it.
|
||||||
|
@ -1711,8 +1708,8 @@ int pci_msi_quirk;
|
||||||
*/
|
*/
|
||||||
static void __init quirk_svw_msi(struct pci_dev *dev)
|
static void __init quirk_svw_msi(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
pci_msi_quirk = 1;
|
pci_no_msi();
|
||||||
printk(KERN_WARNING "PCI: MSI quirk detected. pci_msi_quirk set.\n");
|
printk(KERN_WARNING "PCI: MSI quirk detected. MSI deactivated.\n");
|
||||||
}
|
}
|
||||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi);
|
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_svw_msi);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue