File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5857,3 +5857,13 @@ static void nvidia_ion_ahci_fixup(struct pci_dev *pdev)
58575857 pdev -> dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING ;
58585858}
58595859DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_NVIDIA , 0x0ab8 , nvidia_ion_ahci_fixup );
5860+
5861+ static void rom_bar_overlap_defect (struct pci_dev * dev )
5862+ {
5863+ pci_info (dev , "working around ROM BAR overlap defect\n" );
5864+ dev -> rom_bar_overlap = 1 ;
5865+ }
5866+ DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL , 0x1533 , rom_bar_overlap_defect );
5867+ DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL , 0x1536 , rom_bar_overlap_defect );
5868+ DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL , 0x1537 , rom_bar_overlap_defect );
5869+ DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL , 0x1538 , rom_bar_overlap_defect );
Original file line number Diff line number Diff line change @@ -75,12 +75,16 @@ static void pci_std_update_resource(struct pci_dev *dev, int resno)
7575 * as zero when disabled, so don't update ROM BARs unless
7676 * they're enabled. See
7777 * https://lore.kernel.org/r/43147B3D.1030309@vc.cvut.cz/
78+ * But we must update ROM BAR for buggy devices where even a
79+ * disabled ROM can conflict with other BARs.
7880 */
79- if (!(res -> flags & IORESOURCE_ROM_ENABLE ))
81+ if (!(res -> flags & IORESOURCE_ROM_ENABLE ) &&
82+ !dev -> rom_bar_overlap )
8083 return ;
8184
8285 reg = dev -> rom_base_reg ;
83- new |= PCI_ROM_ADDRESS_ENABLE ;
86+ if (res -> flags & IORESOURCE_ROM_ENABLE )
87+ new |= PCI_ROM_ADDRESS_ENABLE ;
8488 } else
8589 return ;
8690
Original file line number Diff line number Diff line change @@ -455,6 +455,7 @@ struct pci_dev {
455455 unsigned int link_active_reporting :1 ;/* Device capable of reporting link active */
456456 unsigned int no_vf_scan :1 ; /* Don't scan for VFs after IOV enablement */
457457 unsigned int no_command_memory :1 ; /* No PCI_COMMAND_MEMORY */
458+ unsigned int rom_bar_overlap :1 ; /* ROM BAR disable broken */
458459 pci_dev_flags_t dev_flags ;
459460 atomic_t enable_cnt ; /* pci_enable_device has been called */
460461
You can’t perform that action at this time.
0 commit comments