Skip to content

Commit 0ba379e

Browse files
ebiedermjbarnes993
authored andcommitted
PCI: Simplify hotplug mch quirk.
There is a very old quirk for the intel E7502 E7320 and E7525 memory controller hubs that disables usage of msi interrupts on pcie hotplug bridges of those devices, and disables changing the affinity of irqs. Today all we have to do to disable msi on a specific device is to set dev->no_msi, which is much more straightforward than the previous logic. The re-running of this fixup after pci hotplug happens below these devices is totally bogus. All of the state we change is pure software state and we don't change the hardware at all. Which means hotplug on the lower devices doesn't have a chance to change this state. So we can safely remove the special case from the pciehp driver and the pcie portdriver. I suspect the special case was someone's expermental debug code that slipped in. Certainly it isn't mentioned in commit 6fb8880a61510295aece04a542767161f624dffe aka BKrev: 41966101LJ_ogfOU0m2aE6teZfQnuQ where the code first appears. Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent b1c089b commit 0ba379e

5 files changed

Lines changed: 2 additions & 19 deletions

File tree

‎drivers/pci/hotplug/pciehp_ctrl.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,6 @@ static int board_added(struct slot *p_slot)
246246
goto err_exit;
247247
}
248248

249-
/*
250-
* Some PCI Express root ports require fixup after hot-plug operation.
251-
*/
252-
if (pcie_mch_quirk)
253-
pci_fixup_device(pci_fixup_final, ctrl->pci_dev);
254249
if (PWR_LED(ctrl))
255250
p_slot->hpc_ops->green_led_on(p_slot);
256251

‎drivers/pci/hotplug/pciehp_pci.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,6 @@ int pciehp_unconfigure_device(struct slot *p_slot)
285285
}
286286
pci_dev_put(temp);
287287
}
288-
/*
289-
* Some PCI Express root ports require fixup after hot-plug operation.
290-
*/
291-
if (pcie_mch_quirk)
292-
pci_fixup_device(pci_fixup_final, p_slot->ctrl->pci_dev);
293288

294289
return rc;
295290
}

‎drivers/pci/pci.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
134134
return (dev->no_d1d2 || parent_dstates);
135135

136136
}
137-
extern int pcie_mch_quirk;
138137
extern struct device_attribute pci_dev_attrs[];
139138
extern struct device_attribute dev_attr_cpuaffinity;
140139
extern struct device_attribute dev_attr_cpulistaffinity;

‎drivers/pci/pcie/portdrv_core.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ static int assign_interrupt_mode(struct pci_dev *dev, int *vectors, int mask)
191191
int irq, interrupt_mode = PCIE_PORT_NO_IRQ;
192192
int i;
193193

194-
/* Check MSI quirk */
195-
if (port_data->port_type == PCIE_RC_PORT && pcie_mch_quirk)
196-
goto Fallback;
197-
198194
/* Try to use MSI-X if supported */
199195
if (!pcie_port_enable_msix(dev, vectors, mask))
200196
return PCIE_PORT_MSIX_MODE;
@@ -203,7 +199,6 @@ static int assign_interrupt_mode(struct pci_dev *dev, int *vectors, int mask)
203199
if (!pci_enable_msi(dev))
204200
interrupt_mode = PCIE_PORT_MSI_MODE;
205201

206-
Fallback:
207202
if (interrupt_mode == PCIE_PORT_NO_IRQ && dev->pin)
208203
interrupt_mode = PCIE_PORT_INTx_MODE;
209204

‎drivers/pci/quirks.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ int isa_dma_bridge_buggy;
3131
EXPORT_SYMBOL(isa_dma_bridge_buggy);
3232
int pci_pci_problems;
3333
EXPORT_SYMBOL(pci_pci_problems);
34-
int pcie_mch_quirk;
35-
EXPORT_SYMBOL(pcie_mch_quirk);
3634

3735
#ifdef CONFIG_PCI_QUIRKS
3836
/*
@@ -1500,7 +1498,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_a
15001498

15011499
static void __devinit quirk_pcie_mch(struct pci_dev *pdev)
15021500
{
1503-
pcie_mch_quirk = 1;
1501+
pci_msi_off(pdev);
1502+
pdev->no_msi = 1;
15041503
}
15051504
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_pcie_mch);
15061505
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch);

0 commit comments

Comments
 (0)