Skip to content

Commit 78a632a

Browse files
committed
Merge tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci fixes from Bjorn Helgaas: - Update a BUILD_BUG_ON() usage that works on current compilers, but breaks compilation on gcc 5.3.1 (Alex Williamson) - Avoid use of FLR for Mediatek MT7922 WiFi; the device previously worked after a long timeout and fallback to SBR, but after a recent RRS change it doesn't work at all after FLR (Bjorn Helgaas) * tag 'pci-v6.14-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: Avoid FLR for Mediatek MT7922 WiFi PCI: Fix BUILD_BUG_ON usage for old gcc
2 parents 3f2ca7b + 81f64e9 commit 78a632a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/pci/probe.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,14 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
339339
return (res->flags & IORESOURCE_MEM_64) ? 1 : 0;
340340
}
341341

342-
static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
342+
static __always_inline void pci_read_bases(struct pci_dev *dev,
343+
unsigned int howmany, int rom)
343344
{
344345
u32 rombar, stdbars[PCI_STD_NUM_BARS];
345346
unsigned int pos, reg;
346347
u16 orig_cmd;
347348

348-
BUILD_BUG_ON(howmany > PCI_STD_NUM_BARS);
349+
BUILD_BUG_ON(statically_true(howmany > PCI_STD_NUM_BARS));
349350

350351
if (dev->non_compliant_bars)
351352
return;

drivers/pci/quirks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5522,7 +5522,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap);
55225522
* AMD Matisse USB 3.0 Host Controller 0x149c
55235523
* Intel 82579LM Gigabit Ethernet Controller 0x1502
55245524
* Intel 82579V Gigabit Ethernet Controller 0x1503
5525-
*
5525+
* Mediatek MT7922 802.11ax PCI Express Wireless Network Adapter
55265526
*/
55275527
static void quirk_no_flr(struct pci_dev *dev)
55285528
{
@@ -5534,6 +5534,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x149c, quirk_no_flr);
55345534
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AMD, 0x7901, quirk_no_flr);
55355535
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_no_flr);
55365536
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_no_flr);
5537+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MEDIATEK, 0x0616, quirk_no_flr);
55375538

55385539
/* FLR may cause the SolidRun SNET DPU (rev 0x1) to hang */
55395540
static void quirk_no_flr_snet(struct pci_dev *dev)

0 commit comments

Comments
 (0)