Changeset 34467


Ignore:
Timestamp:
2012-12-03T11:33:47+01:00 (5 years ago)
Author:
nbd
Message:

kernel: disable more pci quirks to save space on platforms that don't need them

Location:
trunk/target/linux/generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-3.6/810-pci_disable_common_quirks.patch

    r33911 r34467  
    2424  * Mark this device with a broken_parity_status, to allow 
    2525  * PCI scanning code to "skip" this now blacklisted device. 
    26 @@ -1933,7 +1934,9 @@ static void __devinit fixup_rev1_53c810( 
     26@@ -2844,6 +2845,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I 
     27 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); 
     28 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); 
     29  
     30+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
     31  
     32 static ktime_t fixup_debug_start(struct pci_dev *dev, 
     33                                 void (*fn)(struct pci_dev *dev)) 
     34@@ -2875,6 +2877,8 @@ static void fixup_debug_report(struct pc 
    2735        } 
    2836 } 
    29  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); 
    30 +#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
    3137  
    3238+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
    33  /* Enable 1k I/O space granularity on the Intel P64H2 */ 
    34  static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) 
    35  { 
    36 @@ -2605,6 +2608,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT 
    37  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0x1083, 
    38                         quirk_msi_intx_disable_bug); 
    39  #endif /* CONFIG_PCI_MSI */ 
     39+ 
     40 /* 
     41  * Some BIOS implementations leave the Intel GPU interrupts enabled, 
     42  * even though no one is handling them (f.e. i915 driver is never loaded). 
     43@@ -2909,6 +2913,8 @@ static void __devinit disable_igfx_irq(s 
     44 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); 
     45 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); 
     46  
    4047+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
    41   
    42  /* Allow manual resource allocation for PCI hotplug bridges 
    43   * via pci=hpmemsize=nnM and pci=hpiosize=nnM parameters. For 
     48+ 
     49 /* 
     50  * Some devices may pass our check in pci_intx_mask_supported if 
     51  * PCI_COMMAND_INTX_DISABLE works though they actually do not properly 
  • trunk/target/linux/generic/patches-3.6/811-pci_disable_usb_common_quirks.patch

    r34042 r34467  
    22--- a/drivers/usb/host/pci-quirks.c 
    33+++ b/drivers/usb/host/pci-quirks.c 
    4 @@ -434,6 +434,8 @@ reset_needed: 
     4@@ -79,6 +79,8 @@ 
     5 #define USB_INTEL_USB3_PSSEN   0xD8 
     6 #define USB_INTEL_USB3PRM      0xDC 
     7  
     8+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
     9+ 
     10 static struct amd_chipset_info { 
     11        struct pci_dev  *nb_dev; 
     12        struct pci_dev  *smbus_dev; 
     13@@ -353,6 +355,10 @@ void usb_amd_dev_put(void) 
     14 } 
     15 EXPORT_SYMBOL_GPL(usb_amd_dev_put); 
     16  
     17+#endif /* CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
     18+ 
     19+#if IS_ENABLED(CONFIG_USB_UHCI_HCD) 
     20+ 
     21 /* 
     22  * Make sure the controller is completely inactive, unable to 
     23  * generate interrupts or do DMA. 
     24@@ -434,6 +440,10 @@ reset_needed: 
    525 } 
    626 EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); 
    727  
     28+#endif 
     29+ 
    830+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
    931+ 
     
    1133 { 
    1234        u16 cmd; 
    13 @@ -971,3 +973,4 @@ static void __devinit quirk_usb_early_ha 
     35@@ -971,3 +981,4 @@ static void __devinit quirk_usb_early_ha 
    1436 } 
    1537 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, 
    1638                        PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); 
    1739+#endif 
     40--- a/drivers/usb/host/pci-quirks.h 
     41+++ b/drivers/usb/host/pci-quirks.h 
     42@@ -4,18 +4,26 @@ 
     43 #ifdef CONFIG_PCI 
     44 void uhci_reset_hc(struct pci_dev *pdev, unsigned long base); 
     45 int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base); 
     46+bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); 
     47+void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); 
     48+void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 
     49+#else 
     50+static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 
     51+#endif  /* CONFIG_PCI */ 
     52+ 
     53+#if defined(CONFIG_PCI) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS) 
     54 int usb_amd_find_chipset_info(void); 
     55 void usb_amd_dev_put(void); 
     56 void usb_amd_quirk_pll_disable(void); 
     57 void usb_amd_quirk_pll_enable(void); 
     58-bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); 
     59-void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); 
     60-void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 
     61 #else 
     62+static inline int usb_amd_find_chipset_info(void) 
     63+{ 
     64+       return 0; 
     65+} 
     66 static inline void usb_amd_quirk_pll_disable(void) {} 
     67 static inline void usb_amd_quirk_pll_enable(void) {} 
     68 static inline void usb_amd_dev_put(void) {} 
     69-static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 
     70-#endif  /* CONFIG_PCI */ 
     71+#endif 
     72  
     73 #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */ 
  • trunk/target/linux/generic/patches-3.7/810-pci_disable_common_quirks.patch

    r34247 r34467  
    2424  * Mark this device with a broken_parity_status, to allow 
    2525  * PCI scanning code to "skip" this now blacklisted device. 
    26 @@ -1933,7 +1934,9 @@ static void __devinit fixup_rev1_53c810( 
     26@@ -2844,6 +2845,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I 
     27 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata); 
     28 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata); 
     29  
     30+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
     31  
     32 static ktime_t fixup_debug_start(struct pci_dev *dev, 
     33                                 void (*fn)(struct pci_dev *dev)) 
     34@@ -2875,6 +2877,8 @@ static void fixup_debug_report(struct pc 
    2735        } 
    2836 } 
    29  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); 
    30 +#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
    3137  
    3238+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
    33  /* Enable 1k I/O space granularity on the Intel P64H2 */ 
    34  static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) 
    35  { 
    36 @@ -2605,6 +2608,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT 
    37  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0x1083, 
    38                         quirk_msi_intx_disable_bug); 
    39  #endif /* CONFIG_PCI_MSI */ 
     39+ 
     40 /* 
     41  * Some BIOS implementations leave the Intel GPU interrupts enabled, 
     42  * even though no one is handling them (f.e. i915 driver is never loaded). 
     43@@ -2909,6 +2913,8 @@ static void __devinit disable_igfx_irq(s 
     44 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); 
     45 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); 
     46  
    4047+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
    41   
    42  /* Allow manual resource allocation for PCI hotplug bridges 
    43   * via pci=hpmemsize=nnM and pci=hpiosize=nnM parameters. For 
     48+ 
     49 /* 
     50  * Some devices may pass our check in pci_intx_mask_supported if 
     51  * PCI_COMMAND_INTX_DISABLE works though they actually do not properly 
  • trunk/target/linux/generic/patches-3.7/811-pci_disable_usb_common_quirks.patch

    r34042 r34467  
    22--- a/drivers/usb/host/pci-quirks.c 
    33+++ b/drivers/usb/host/pci-quirks.c 
    4 @@ -434,6 +434,8 @@ reset_needed: 
     4@@ -79,6 +79,8 @@ 
     5 #define USB_INTEL_USB3_PSSEN   0xD8 
     6 #define USB_INTEL_USB3PRM      0xDC 
     7  
     8+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
     9+ 
     10 static struct amd_chipset_info { 
     11        struct pci_dev  *nb_dev; 
     12        struct pci_dev  *smbus_dev; 
     13@@ -353,6 +355,10 @@ void usb_amd_dev_put(void) 
     14 } 
     15 EXPORT_SYMBOL_GPL(usb_amd_dev_put); 
     16  
     17+#endif /* CONFIG_PCI_DISABLE_COMMON_QUIRKS */ 
     18+ 
     19+#if IS_ENABLED(CONFIG_USB_UHCI_HCD) 
     20+ 
     21 /* 
     22  * Make sure the controller is completely inactive, unable to 
     23  * generate interrupts or do DMA. 
     24@@ -434,6 +440,10 @@ reset_needed: 
    525 } 
    626 EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); 
    727  
     28+#endif 
     29+ 
    830+#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS 
    931+ 
     
    1133 { 
    1234        u16 cmd; 
    13 @@ -971,3 +973,4 @@ static void __devinit quirk_usb_early_ha 
     35@@ -971,3 +981,4 @@ static void __devinit quirk_usb_early_ha 
    1436 } 
    1537 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, 
    1638                        PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); 
    1739+#endif 
     40--- a/drivers/usb/host/pci-quirks.h 
     41+++ b/drivers/usb/host/pci-quirks.h 
     42@@ -4,18 +4,26 @@ 
     43 #ifdef CONFIG_PCI 
     44 void uhci_reset_hc(struct pci_dev *pdev, unsigned long base); 
     45 int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base); 
     46+bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); 
     47+void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); 
     48+void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 
     49+#else 
     50+static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 
     51+#endif  /* CONFIG_PCI */ 
     52+ 
     53+#if defined(CONFIG_PCI) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS) 
     54 int usb_amd_find_chipset_info(void); 
     55 void usb_amd_dev_put(void); 
     56 void usb_amd_quirk_pll_disable(void); 
     57 void usb_amd_quirk_pll_enable(void); 
     58-bool usb_is_intel_switchable_xhci(struct pci_dev *pdev); 
     59-void usb_enable_xhci_ports(struct pci_dev *xhci_pdev); 
     60-void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 
     61 #else 
     62+static inline int usb_amd_find_chipset_info(void) 
     63+{ 
     64+       return 0; 
     65+} 
     66 static inline void usb_amd_quirk_pll_disable(void) {} 
     67 static inline void usb_amd_quirk_pll_enable(void) {} 
     68 static inline void usb_amd_dev_put(void) {} 
     69-static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {} 
     70-#endif  /* CONFIG_PCI */ 
     71+#endif 
     72  
     73 #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */ 
Note: See TracChangeset for help on using the changeset viewer.