From 14c5e1a08ce258254f39a291568a06e9a42144a6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 16 Mar 2009 17:35:04 -0700 Subject: [PATCH] delete a pci patch from .27 and .28 queues --- ...on-t-enable-too-many-ht-msi-mappings.patch | 164 ------------------ review-2.6.27/series | 1 - ...on-t-enable-too-many-ht-msi-mappings.patch | 164 ------------------ review-2.6.28/series | 1 - 4 files changed, 330 deletions(-) delete mode 100644 review-2.6.27/pci-don-t-enable-too-many-ht-msi-mappings.patch delete mode 100644 review-2.6.28/pci-don-t-enable-too-many-ht-msi-mappings.patch diff --git a/review-2.6.27/pci-don-t-enable-too-many-ht-msi-mappings.patch b/review-2.6.27/pci-don-t-enable-too-many-ht-msi-mappings.patch deleted file mode 100644 index 8817ea39331..00000000000 --- a/review-2.6.27/pci-don-t-enable-too-many-ht-msi-mappings.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 1dec6b054dd1fc780e18b815068bf5677409eb2d Mon Sep 17 00:00:00 2001 -From: Yinghai Lu -Date: Mon, 23 Feb 2009 11:51:59 -0800 -Subject: PCI: don't enable too many HT MSI mappings - -From: Yinghai Lu - -commit 1dec6b054dd1fc780e18b815068bf5677409eb2d upstream. - -Prakash reported that his c51-mcp51 ondie sound card doesn't work with -MSI. But if he hacks out the HT-MSI quirk, MSI works fine. - -So this patch reworks the nv_msi_ht_cap_quirk(). It will now only -enable ht_msi on own its root device, avoiding enabling it on devices -following that root dev. - -Reported-by: Prakash Punnoor -Tested-by: Prakash Punnoor -Signed-off-by: Yinghai Lu -Signed-off-by: Jesse Barnes -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/pci/quirks.c | 115 ++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 100 insertions(+), 15 deletions(-) - ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -1934,10 +1934,100 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE, - ht_enable_msi_mapping); - --static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) -+static void __devinit nv_ht_enable_msi_mapping(struct pci_dev *dev) - { - struct pci_dev *host_bridge; -+ int pos; -+ int i, dev_no; -+ int found = 0; -+ -+ dev_no = dev->devfn >> 3; -+ for (i = dev_no; i >= 0; i--) { -+ host_bridge = pci_get_slot(dev->bus, PCI_DEVFN(i, 0)); -+ if (!host_bridge) -+ continue; -+ -+ pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE); -+ if (pos != 0) { -+ found = 1; -+ break; -+ } -+ pci_dev_put(host_bridge); -+ } -+ -+ if (!found) -+ return; -+ -+ /* root did that ! */ -+ if (msi_ht_cap_enabled(host_bridge)) -+ goto out; -+ -+ ht_enable_msi_mapping(dev); -+ -+out: -+ pci_dev_put(host_bridge); -+} -+ -+static void __devinit ht_disable_msi_mapping(struct pci_dev *dev) -+{ -+ int pos, ttl = 48; -+ -+ pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -+ while (pos && ttl--) { -+ u8 flags; -+ -+ if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -+ &flags) == 0) { -+ dev_info(&dev->dev, "Enabling HT MSI Mapping\n"); -+ -+ pci_write_config_byte(dev, pos + HT_MSI_FLAGS, -+ flags & ~HT_MSI_FLAGS_ENABLE); -+ } -+ pos = pci_find_next_ht_capability(dev, pos, -+ HT_CAPTYPE_MSI_MAPPING); -+ } -+} -+ -+static int __devinit ht_check_msi_mapping(struct pci_dev *dev) -+{ - int pos, ttl = 48; -+ int found = 0; -+ -+ /* check if there is HT MSI cap or enabled on this device */ -+ pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -+ while (pos && ttl--) { -+ u8 flags; -+ -+ if (found < 1) -+ found = 1; -+ if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -+ &flags) == 0) { -+ if (flags & HT_MSI_FLAGS_ENABLE) { -+ if (found < 2) { -+ found = 2; -+ break; -+ } -+ } -+ } -+ pos = pci_find_next_ht_capability(dev, pos, -+ HT_CAPTYPE_MSI_MAPPING); -+ } -+ -+ return found; -+} -+ -+static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) -+{ -+ struct pci_dev *host_bridge; -+ int pos; -+ int found; -+ -+ /* check if there is HT MSI cap or enabled on this device */ -+ found = ht_check_msi_mapping(dev); -+ -+ /* no HT MSI CAP */ -+ if (found == 0) -+ return; - - /* - * HT MSI mapping should be disabled on devices that are below -@@ -1953,24 +2043,19 @@ static void __devinit nv_msi_ht_cap_quir - pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE); - if (pos != 0) { - /* Host bridge is to HT */ -- ht_enable_msi_mapping(dev); -+ if (found == 1) { -+ /* it is not enabled, try to enable it */ -+ nv_ht_enable_msi_mapping(dev); -+ } - return; - } - -- /* Host bridge is not to HT, disable HT MSI mapping on this device */ -- pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -- while (pos && ttl--) { -- u8 flags; -+ /* HT MSI is not enabled */ -+ if (found == 1) -+ return; - -- if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -- &flags) == 0) { -- dev_info(&dev->dev, "Disabling HT MSI mapping"); -- pci_write_config_byte(dev, pos + HT_MSI_FLAGS, -- flags & ~HT_MSI_FLAGS_ENABLE); -- } -- pos = pci_find_next_ht_capability(dev, pos, -- HT_CAPTYPE_MSI_MAPPING); -- } -+ /* Host bridge is not to HT, disable HT MSI mapping on this device */ -+ ht_disable_msi_mapping(dev); - } - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi_ht_cap_quirk); - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk); diff --git a/review-2.6.27/series b/review-2.6.27/series index 4941c7e1c92..2a57e7dbf02 100644 --- a/review-2.6.27/series +++ b/review-2.6.27/series @@ -49,7 +49,6 @@ mmc-s3cmci-fix-s3c2410_dma_config-arguments.patch mmc_test-fix-basic-read-test.patch mtd_dataflash-fix-probing-of-at45db321c-chips.patch pci-add-pci-quirk-to-disable-l0s-aspm-state-for-82575-and-82598.patch -pci-don-t-enable-too-many-ht-msi-mappings.patch pci-enable-pcie-aer-only-after-checking-firmware-support.patch pcie-portdrv-call-pci_disable_device-during-remove.patch powerpc-fix-load-store-float-double-alignment-handler.patch diff --git a/review-2.6.28/pci-don-t-enable-too-many-ht-msi-mappings.patch b/review-2.6.28/pci-don-t-enable-too-many-ht-msi-mappings.patch deleted file mode 100644 index 062231a6370..00000000000 --- a/review-2.6.28/pci-don-t-enable-too-many-ht-msi-mappings.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 1dec6b054dd1fc780e18b815068bf5677409eb2d Mon Sep 17 00:00:00 2001 -From: Yinghai Lu -Date: Mon, 23 Feb 2009 11:51:59 -0800 -Subject: PCI: don't enable too many HT MSI mappings - -From: Yinghai Lu - -commit 1dec6b054dd1fc780e18b815068bf5677409eb2d upstream. - -Prakash reported that his c51-mcp51 ondie sound card doesn't work with -MSI. But if he hacks out the HT-MSI quirk, MSI works fine. - -So this patch reworks the nv_msi_ht_cap_quirk(). It will now only -enable ht_msi on own its root device, avoiding enabling it on devices -following that root dev. - -Reported-by: Prakash Punnoor -Tested-by: Prakash Punnoor -Signed-off-by: Yinghai Lu -Signed-off-by: Jesse Barnes -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/pci/quirks.c | 115 ++++++++++++++++++++++++++++++++++++++++++++------- - 1 file changed, 100 insertions(+), 15 deletions(-) - ---- a/drivers/pci/quirks.c -+++ b/drivers/pci/quirks.c -@@ -1847,10 +1847,100 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NV - PCI_DEVICE_ID_NVIDIA_NVENET_15, - nvenet_msi_disable); - --static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) -+static void __devinit nv_ht_enable_msi_mapping(struct pci_dev *dev) - { - struct pci_dev *host_bridge; -+ int pos; -+ int i, dev_no; -+ int found = 0; -+ -+ dev_no = dev->devfn >> 3; -+ for (i = dev_no; i >= 0; i--) { -+ host_bridge = pci_get_slot(dev->bus, PCI_DEVFN(i, 0)); -+ if (!host_bridge) -+ continue; -+ -+ pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE); -+ if (pos != 0) { -+ found = 1; -+ break; -+ } -+ pci_dev_put(host_bridge); -+ } -+ -+ if (!found) -+ return; -+ -+ /* root did that ! */ -+ if (msi_ht_cap_enabled(host_bridge)) -+ goto out; -+ -+ ht_enable_msi_mapping(dev); -+ -+out: -+ pci_dev_put(host_bridge); -+} -+ -+static void __devinit ht_disable_msi_mapping(struct pci_dev *dev) -+{ -+ int pos, ttl = 48; -+ -+ pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -+ while (pos && ttl--) { -+ u8 flags; -+ -+ if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -+ &flags) == 0) { -+ dev_info(&dev->dev, "Enabling HT MSI Mapping\n"); -+ -+ pci_write_config_byte(dev, pos + HT_MSI_FLAGS, -+ flags & ~HT_MSI_FLAGS_ENABLE); -+ } -+ pos = pci_find_next_ht_capability(dev, pos, -+ HT_CAPTYPE_MSI_MAPPING); -+ } -+} -+ -+static int __devinit ht_check_msi_mapping(struct pci_dev *dev) -+{ - int pos, ttl = 48; -+ int found = 0; -+ -+ /* check if there is HT MSI cap or enabled on this device */ -+ pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -+ while (pos && ttl--) { -+ u8 flags; -+ -+ if (found < 1) -+ found = 1; -+ if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -+ &flags) == 0) { -+ if (flags & HT_MSI_FLAGS_ENABLE) { -+ if (found < 2) { -+ found = 2; -+ break; -+ } -+ } -+ } -+ pos = pci_find_next_ht_capability(dev, pos, -+ HT_CAPTYPE_MSI_MAPPING); -+ } -+ -+ return found; -+} -+ -+static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) -+{ -+ struct pci_dev *host_bridge; -+ int pos; -+ int found; -+ -+ /* check if there is HT MSI cap or enabled on this device */ -+ found = ht_check_msi_mapping(dev); -+ -+ /* no HT MSI CAP */ -+ if (found == 0) -+ return; - - /* - * HT MSI mapping should be disabled on devices that are below -@@ -1866,24 +1956,19 @@ static void __devinit nv_msi_ht_cap_quir - pos = pci_find_ht_capability(host_bridge, HT_CAPTYPE_SLAVE); - if (pos != 0) { - /* Host bridge is to HT */ -- ht_enable_msi_mapping(dev); -+ if (found == 1) { -+ /* it is not enabled, try to enable it */ -+ nv_ht_enable_msi_mapping(dev); -+ } - return; - } - -- /* Host bridge is not to HT, disable HT MSI mapping on this device */ -- pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING); -- while (pos && ttl--) { -- u8 flags; -+ /* HT MSI is not enabled */ -+ if (found == 1) -+ return; - -- if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, -- &flags) == 0) { -- dev_info(&dev->dev, "Disabling HT MSI mapping"); -- pci_write_config_byte(dev, pos + HT_MSI_FLAGS, -- flags & ~HT_MSI_FLAGS_ENABLE); -- } -- pos = pci_find_next_ht_capability(dev, pos, -- HT_CAPTYPE_MSI_MAPPING); -- } -+ /* Host bridge is not to HT, disable HT MSI mapping on this device */ -+ ht_disable_msi_mapping(dev); - } - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi_ht_cap_quirk); - DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk); diff --git a/review-2.6.28/series b/review-2.6.28/series index 36fa091e0ef..cbf5b1d6153 100644 --- a/review-2.6.28/series +++ b/review-2.6.28/series @@ -66,7 +66,6 @@ x86-64-fix-int-0x80-enosys-return.patch selinux-fix-a-panic-in-selinux_netlbl_inode_permission.patch selinux-fix-the-netlabel-glue-code-for-setsockopt.patch hpilo-new-pci-device.patch -pci-don-t-enable-too-many-ht-msi-mappings.patch x86-64-seccomp-fix-32-64-syscall-hole.patch x86-64-syscall-audit-fix-32-64-syscall-hole.patch xen-disable-interrupts-early-as-start_kernel-expects.patch -- 2.47.3