aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2007-03-06 13:15:51 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-03-06 13:15:51 -0800
commita30c144bd8c8cde8a46aa885a58b65720d211c7c (patch)
treed033047620561e3d75b811fee11e87888a075842
parentbf07f29b3409dfc569e9e7fbcbbd0e5f6e39f1db (diff)
downloadpatches-a30c144bd8c8cde8a46aa885a58b65720d211c7c.tar.gz
version resync and device symlink patch
-rw-r--r--driver-class/config_sysfs_deprecated-future.patch6
-rw-r--r--driver/device-symlink.patch108
-rw-r--r--pci/msi-fixup-the-msi-enable-disable-logic.patch319
-rw-r--r--pci/msi-sanely-support-hardware-level-msi-disabling.patch165
-rw-r--r--pci/msi-support-masking-msi-irqs-without-a-mask-bit.patch35
-rw-r--r--pci/pci-new-pci-e-reset-api.patch4
-rw-r--r--series5
-rw-r--r--usb/usb-storage-do-not-rebuild-when-kernel-version-changes.patch41
-rw-r--r--version2
9 files changed, 115 insertions, 570 deletions
diff --git a/driver-class/config_sysfs_deprecated-future.patch b/driver-class/config_sysfs_deprecated-future.patch
index af07eea3f45feb..e0e3e9cb58413a 100644
--- a/driver-class/config_sysfs_deprecated-future.patch
+++ b/driver-class/config_sysfs_deprecated-future.patch
@@ -16,9 +16,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- gregkh-2.6.orig/init/Kconfig
+++ gregkh-2.6/init/Kconfig
-@@ -293,6 +293,15 @@ config SYSFS_DEPRECATED
- If you are using a distro that was released in 2006 or later,
- it should be safe to say N here.
+@@ -302,6 +302,15 @@ config SYSFS_DEPRECATED
+
+ If you are unsure about this at all, say Y.
+config SYSFS_DEPRECATED_FUTURE
+ bool "Create sysfs files which will be deprecated in the future"
diff --git a/driver/device-symlink.patch b/driver/device-symlink.patch
new file mode 100644
index 00000000000000..167ae02fd5196f
--- /dev/null
+++ b/driver/device-symlink.patch
@@ -0,0 +1,108 @@
+From foo@baz Tue Apr 9 12:12:43 2002
+Date: Tue, 6 Mar 2007 12:55:53 -0800
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Driver core: add device symlink back to sysfs
+
+This moves the device symlink back to sysfs even if
+CONFIG_SYSFS_DEPRECATED is enabled as too many userspace programs (well,
+HAL), still rely on this link to be present.
+
+I will rework the ability for sysfs to change layouts like this in the
+future, but for now, this patch should fix people's network connections.
+
+
+Cc: Kay Sievers <kay.sievers@vrfy.org>
+Cc: Matt Mackall <mpm@selenic.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/core.c | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+--- gregkh-2.6.orig/drivers/base/core.c
++++ gregkh-2.6/drivers/base/core.c
+@@ -584,17 +584,17 @@ int device_add(struct device *dev)
+ if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
+ sysfs_create_link(&dev->class->subsys.kset.kobj,
+ &dev->kobj, dev->bus_id);
+-#ifdef CONFIG_SYSFS_DEPRECATED
+ if (parent) {
+ sysfs_create_link(&dev->kobj, &dev->parent->kobj,
+ "device");
++#ifdef CONFIG_SYSFS_DEPRECATED
+ class_name = make_class_name(dev->class->name,
+ &dev->kobj);
+ if (class_name)
+ sysfs_create_link(&dev->parent->kobj,
+ &dev->kobj, class_name);
+- }
+ #endif
++ }
+ }
+
+ if ((error = device_add_attrs(dev)))
+@@ -651,17 +651,17 @@ int device_add(struct device *dev)
+ if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
+ sysfs_remove_link(&dev->class->subsys.kset.kobj,
+ dev->bus_id);
+-#ifdef CONFIG_SYSFS_DEPRECATED
+ if (parent) {
++#ifdef CONFIG_SYSFS_DEPRECATED
+ char *class_name = make_class_name(dev->class->name,
+ &dev->kobj);
+ if (class_name)
+ sysfs_remove_link(&dev->parent->kobj,
+ class_name);
+ kfree(class_name);
++#endif
+ sysfs_remove_link(&dev->kobj, "device");
+ }
+-#endif
+
+ down(&dev->class->sem);
+ /* notify any interfaces that the device is now gone */
+@@ -761,17 +761,17 @@ void device_del(struct device * dev)
+ if (dev->kobj.parent != &dev->class->subsys.kset.kobj)
+ sysfs_remove_link(&dev->class->subsys.kset.kobj,
+ dev->bus_id);
+-#ifdef CONFIG_SYSFS_DEPRECATED
+ if (parent) {
++#ifdef CONFIG_SYSFS_DEPRECATED
+ char *class_name = make_class_name(dev->class->name,
+ &dev->kobj);
+ if (class_name)
+ sysfs_remove_link(&dev->parent->kobj,
+ class_name);
+ kfree(class_name);
++#endif
+ sysfs_remove_link(&dev->kobj, "device");
+ }
+-#endif
+
+ down(&dev->class->sem);
+ /* notify any interfaces that the device is now gone */
+@@ -1064,8 +1064,8 @@ static int device_move_class_links(struc
+ struct device *old_parent,
+ struct device *new_parent)
+ {
++ int error = 0;
+ #ifdef CONFIG_SYSFS_DEPRECATED
+- int error;
+ char *class_name;
+
+ class_name = make_class_name(dev->class->name, &dev->kobj);
+@@ -1093,7 +1093,12 @@ out:
+ kfree(class_name);
+ return error;
+ #else
+- return 0;
++ if (old_parent)
++ sysfs_remove_link(&dev->kobj, "device");
++ if (new_parent)
++ error = sysfs_create_link(&dev->kobj, &new_parent->kobj,
++ "device");
++ return error;
+ #endif
+ }
+
diff --git a/pci/msi-fixup-the-msi-enable-disable-logic.patch b/pci/msi-fixup-the-msi-enable-disable-logic.patch
deleted file mode 100644
index 1da283dd2e466e..00000000000000
--- a/pci/msi-fixup-the-msi-enable-disable-logic.patch
+++ /dev/null
@@ -1,319 +0,0 @@
-From ebiederm@xmission.com Tue Feb 27 11:32:11 2007
-From: ebiederm@xmission.com (Eric W. Biederman)
-Date: Tue, 27 Feb 2007 12:31:39 -0700
-Subject: [PATCH 2/3] msi: Fixup the msi enable/disable logic
-To: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Michael Ellerman <michael@ellerman.id.au>, Greg Kroah-Hartman <gregkh@suse.de>
-Message-ID: <m1lkijl7ms.fsf_-_@ebiederm.dsl.xmission.com>
-
-enable/disable_msi_mode have several side effects which keeps them from
-being generally useful. So this patch replaces them with with two
-much more targeted functions: msi_set_enable and msix_set_enable.
-
-This patch makes pci_dev->msi_enabled and pci_dev->msix_enabled the
-definitive way to test if linux has enabled the msi capability, and
-has the appropriate msi data structures set up.
-
-This patch ensures that while writing the msi messages in save/restore
-and during device initialization we have the msi capability disabled
-so we don't get into races. The pci spec requires that we do not have
-the msi capability enabled and the msi messages unmasked while we write
-the messages. Completely disabling the capability is overkill but it
-is easy :)
-
-Care has been taken so we never have both a msi capability and intx
-enabled simultaneously. We haven't run into a problem yet but better
-safe then sorry.
-
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/pci/msi.c | 144 ++++++++++++++++++++++++------------------------------
- 1 file changed, 64 insertions(+), 80 deletions(-)
-
---- gregkh-2.6.orig/drivers/pci/msi.c
-+++ gregkh-2.6/drivers/pci/msi.c
-@@ -38,6 +38,36 @@ static int msi_cache_init(void)
- return 0;
- }
-
-+static void msi_set_enable(struct pci_dev *dev, int enable)
-+{
-+ int pos;
-+ u16 control;
-+
-+ pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
-+ if (pos) {
-+ pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
-+ control &= ~PCI_MSI_FLAGS_ENABLE;
-+ if (enable)
-+ control |= PCI_MSI_FLAGS_ENABLE;
-+ pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
-+ }
-+}
-+
-+static void msix_set_enable(struct pci_dev *dev, int enable)
-+{
-+ int pos;
-+ u16 control;
-+
-+ pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-+ if (pos) {
-+ pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control);
-+ control &= ~PCI_MSIX_FLAGS_ENABLE;
-+ if (enable)
-+ control |= PCI_MSIX_FLAGS_ENABLE;
-+ pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
-+ }
-+}
-+
- static void msi_set_mask_bit(unsigned int irq, int flag)
- {
- struct msi_desc *entry;
-@@ -192,44 +222,6 @@ static struct msi_desc* alloc_msi_entry(
- return entry;
- }
-
--static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
--{
-- u16 control;
--
-- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (type == PCI_CAP_ID_MSI) {
-- /* Set enabled bits to single MSI & enable MSI_enable bit */
-- msi_enable(control, 1);
-- pci_write_config_word(dev, msi_control_reg(pos), control);
-- dev->msi_enabled = 1;
-- } else {
-- msix_enable(control);
-- pci_write_config_word(dev, msi_control_reg(pos), control);
-- dev->msix_enabled = 1;
-- }
--
-- pci_intx(dev, 0); /* disable intx */
--}
--
--static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
--{
-- u16 control;
--
-- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (type == PCI_CAP_ID_MSI) {
-- /* Set enabled bits to single MSI & enable MSI_enable bit */
-- msi_disable(control);
-- pci_write_config_word(dev, msi_control_reg(pos), control);
-- dev->msi_enabled = 0;
-- } else {
-- msix_disable(control);
-- pci_write_config_word(dev, msi_control_reg(pos), control);
-- dev->msix_enabled = 0;
-- }
--
-- pci_intx(dev, 1); /* enable intx */
--}
--
- #ifdef CONFIG_PM
- static int __pci_save_msi_state(struct pci_dev *dev)
- {
-@@ -238,12 +230,11 @@ static int __pci_save_msi_state(struct p
- struct pci_cap_saved_state *save_state;
- u32 *cap;
-
-- pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
-- if (pos <= 0 || dev->no_msi)
-+ if (!dev->msi_enabled)
- return 0;
-
-- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (!(control & PCI_MSI_FLAGS_ENABLE))
-+ pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
-+ if (pos <= 0)
- return 0;
-
- save_state = kzalloc(sizeof(struct pci_cap_saved_state) + sizeof(u32) * 5,
-@@ -276,13 +267,18 @@ static void __pci_restore_msi_state(stru
- struct pci_cap_saved_state *save_state;
- u32 *cap;
-
-+ if (!dev->msi_enabled)
-+ return;
-+
- save_state = pci_find_saved_cap(dev, PCI_CAP_ID_MSI);
- pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
- if (!save_state || pos <= 0)
- return;
- cap = &save_state->data[0];
-
-+ pci_intx(dev, 0); /* disable intx */
- control = cap[i++] >> 16;
-+ msi_set_enable(dev, 0);
- pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_LO, cap[i++]);
- if (control & PCI_MSI_FLAGS_64BIT) {
- pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, cap[i++]);
-@@ -292,7 +288,6 @@ static void __pci_restore_msi_state(stru
- if (control & PCI_MSI_FLAGS_MASKBIT)
- pci_write_config_dword(dev, pos + PCI_MSI_MASK_BIT, cap[i++]);
- pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
-- enable_msi_mode(dev, pos, PCI_CAP_ID_MSI);
- pci_remove_saved_cap(save_state);
- kfree(save_state);
- }
-@@ -308,13 +303,11 @@ static int __pci_save_msix_state(struct
- return 0;
-
- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-- if (pos <= 0 || dev->no_msi)
-+ if (pos <= 0)
- return 0;
-
- /* save the capability */
- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (!(control & PCI_MSIX_FLAGS_ENABLE))
-- return 0;
- save_state = kzalloc(sizeof(struct pci_cap_saved_state) + sizeof(u16),
- GFP_KERNEL);
- if (!save_state) {
-@@ -376,6 +369,8 @@ static void __pci_restore_msix_state(str
- return;
-
- /* route the table */
-+ pci_intx(dev, 0); /* disable intx */
-+ msix_set_enable(dev, 0);
- irq = head = dev->first_msi_irq;
- while (head != tail) {
- entry = get_irq_msi(irq);
-@@ -386,7 +381,6 @@ static void __pci_restore_msix_state(str
- }
-
- pci_write_config_word(dev, msi_control_reg(pos), save);
-- enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
- }
-
- void pci_restore_msi_state(struct pci_dev *dev)
-@@ -411,6 +405,8 @@ static int msi_capability_init(struct pc
- int pos, irq;
- u16 control;
-
-+ msi_set_enable(dev, 0); /* Ensure msi is disabled as I set it up */
-+
- pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
- pci_read_config_word(dev, msi_control_reg(pos), &control);
- /* MSI Entry Initialization */
-@@ -454,7 +450,9 @@ static int msi_capability_init(struct pc
- set_irq_msi(irq, entry);
-
- /* Set MSI enabled bits */
-- enable_msi_mode(dev, pos, PCI_CAP_ID_MSI);
-+ pci_intx(dev, 0); /* disable intx */
-+ msi_set_enable(dev, 1);
-+ dev->msi_enabled = 1;
-
- dev->irq = irq;
- return 0;
-@@ -481,6 +479,8 @@ static int msix_capability_init(struct p
- u8 bir;
- void __iomem *base;
-
-+ msix_set_enable(dev, 0);/* Ensure msix is disabled as I set it up */
-+
- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
- /* Request & Map MSI-X table region */
- pci_read_config_word(dev, msi_control_reg(pos), &control);
-@@ -549,7 +549,9 @@ static int msix_capability_init(struct p
- }
- dev->first_msi_irq = entries[0].vector;
- /* Set MSI-X enabled bits */
-- enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
-+ pci_intx(dev, 0); /* disable intx */
-+ msix_set_enable(dev, 1);
-+ dev->msix_enabled = 1;
-
- return 0;
- }
-@@ -611,12 +613,11 @@ int pci_enable_msi(struct pci_dev* dev)
- WARN_ON(!!dev->msi_enabled);
-
- /* Check whether driver already requested for MSI-X irqs */
-- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-- if (pos > 0 && dev->msix_enabled) {
-- printk(KERN_INFO "PCI: %s: Can't enable MSI. "
-- "Device already has MSI-X enabled\n",
-- pci_name(dev));
-- return -EINVAL;
-+ if (dev->msix_enabled) {
-+ printk(KERN_INFO "PCI: %s: Can't enable MSI. "
-+ "Device already has MSI-X enabled\n",
-+ pci_name(dev));
-+ return -EINVAL;
- }
- status = msi_capability_init(dev);
- return status;
-@@ -625,8 +626,7 @@ int pci_enable_msi(struct pci_dev* dev)
- void pci_disable_msi(struct pci_dev* dev)
- {
- struct msi_desc *entry;
-- int pos, default_irq;
-- u16 control;
-+ int default_irq;
-
- if (!pci_msi_enable)
- return;
-@@ -636,16 +636,9 @@ void pci_disable_msi(struct pci_dev* dev
- if (!dev->msi_enabled)
- return;
-
-- pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
-- if (!pos)
-- return;
--
-- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (!(control & PCI_MSI_FLAGS_ENABLE))
-- return;
--
--
-- disable_msi_mode(dev, pos, PCI_CAP_ID_MSI);
-+ msi_set_enable(dev, 0);
-+ pci_intx(dev, 1); /* enable intx */
-+ dev->msi_enabled = 0;
-
- entry = get_irq_msi(dev->first_msi_irq);
- if (!entry || !entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI) {
-@@ -746,8 +739,7 @@ int pci_enable_msix(struct pci_dev* dev,
- WARN_ON(!!dev->msix_enabled);
-
- /* Check whether driver already requested for MSI irq */
-- if (pci_find_capability(dev, PCI_CAP_ID_MSI) > 0 &&
-- dev->msi_enabled) {
-+ if (dev->msi_enabled) {
- printk(KERN_INFO "PCI: %s: Can't enable MSI-X. "
- "Device already has an MSI irq assigned\n",
- pci_name(dev));
-@@ -760,8 +752,6 @@ int pci_enable_msix(struct pci_dev* dev,
- void pci_disable_msix(struct pci_dev* dev)
- {
- int irq, head, tail = 0, warning = 0;
-- int pos;
-- u16 control;
-
- if (!pci_msi_enable)
- return;
-@@ -771,15 +761,9 @@ void pci_disable_msix(struct pci_dev* de
- if (!dev->msix_enabled)
- return;
-
-- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-- if (!pos)
-- return;
--
-- pci_read_config_word(dev, msi_control_reg(pos), &control);
-- if (!(control & PCI_MSIX_FLAGS_ENABLE))
-- return;
--
-- disable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
-+ msix_set_enable(dev, 0);
-+ pci_intx(dev, 1); /* enable intx */
-+ dev->msix_enabled = 0;
-
- irq = head = dev->first_msi_irq;
- while (head != tail) {
diff --git a/pci/msi-sanely-support-hardware-level-msi-disabling.patch b/pci/msi-sanely-support-hardware-level-msi-disabling.patch
deleted file mode 100644
index 348e2fcd5ae7c6..00000000000000
--- a/pci/msi-sanely-support-hardware-level-msi-disabling.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From ebiederm@xmission.com Tue Feb 27 11:29:15 2007
-From: ebiederm@xmission.com (Eric W. Biederman)
-Date: Tue, 27 Feb 2007 12:28:40 -0700
-Subject: msi: Sanely support hardware level msi disabling.
-To: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Michael Ellerman <michael@ellerman.id.au>, Greg Kroah-Hartman <gregkh@suse.de>
-Message-ID: <m1ps7vl7rr.fsf@ebiederm.dsl.xmission.com>
-
-In some cases when we are not using msi we need a way to ensure that
-the hardware does not have an msi capability enabled. Currently the
-code has been calling disable_msi_mode to try and achieve that.
-However disable_msi_mode has several other side effects and is only
-available when msi support is compiled in so it isn't really
-appropriate.
-
-Instead this patch implements pci_msi_off which disables all msi and
-msix capabilities unconditionally with no additional side effects.
-
-
-pci_disable_device was redundantly clearing the bus master enable flag
-and clearing the msi enable bit. A device that is not allowed to
-perform bus mastering operations cannot generate intx or msi interrupt
-messages as those are essentially a special case of dma, and require
-bus mastering. So the call in pci_disable_device to disable msi
-capabilities was redundant.
-
-quirk_pcie_pxh also called disable_msi_mode and is updated to use
-pci_msi_off.
-
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/powerpc/kernel/irq.c | 1 -
- drivers/pci/msi.c | 2 +-
- drivers/pci/pci.c | 34 +++++++++++++++++++++++++++-------
- drivers/pci/pci.h | 2 --
- drivers/pci/quirks.c | 4 ++--
- include/linux/pci.h | 1 +
- include/linux/pci_regs.h | 7 ++++---
- 7 files changed, 35 insertions(+), 16 deletions(-)
-
---- gregkh-2.6.orig/arch/powerpc/kernel/irq.c
-+++ gregkh-2.6/arch/powerpc/kernel/irq.c
-@@ -968,7 +968,6 @@ void pci_scan_msi_device(struct pci_dev
- int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) {return -1;}
- void pci_disable_msix(struct pci_dev *dev) {}
- void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
--void disable_msi_mode(struct pci_dev *dev, int pos, int type) {}
- void pci_no_msi(void) {}
- EXPORT_SYMBOL(pci_enable_msix);
- EXPORT_SYMBOL(pci_disable_msix);
---- gregkh-2.6.orig/drivers/pci/msi.c
-+++ gregkh-2.6/drivers/pci/msi.c
-@@ -211,7 +211,7 @@ static void enable_msi_mode(struct pci_d
- pci_intx(dev, 0); /* disable intx */
- }
-
--void disable_msi_mode(struct pci_dev *dev, int pos, int type)
-+static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
- {
- u16 control;
-
---- gregkh-2.6.orig/drivers/pci/pci.c
-+++ gregkh-2.6/drivers/pci/pci.c
-@@ -882,13 +882,6 @@ pci_disable_device(struct pci_dev *dev)
- if (atomic_sub_return(1, &dev->enable_cnt) != 0)
- return;
-
-- if (dev->msi_enabled)
-- disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
-- PCI_CAP_ID_MSI);
-- if (dev->msix_enabled)
-- disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
-- PCI_CAP_ID_MSIX);
--
- pci_read_config_word(dev, PCI_COMMAND, &pci_command);
- if (pci_command & PCI_COMMAND_MASTER) {
- pci_command &= ~PCI_COMMAND_MASTER;
-@@ -1306,6 +1299,33 @@ pci_intx(struct pci_dev *pdev, int enabl
- }
- }
-
-+/**
-+ * pci_msi_off - disables any msi or msix capabilities
-+ * @pdev: the PCI device to operate on
-+ *
-+ * If you want to use msi see pci_enable_msi and friends.
-+ * This is a lower level primitive that allows us to disable
-+ * msi operation at the device level.
-+ */
-+void pci_msi_off(struct pci_dev *dev)
-+{
-+ int pos;
-+ u16 control;
-+
-+ pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
-+ if (pos) {
-+ pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
-+ control &= ~PCI_MSI_FLAGS_ENABLE;
-+ pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
-+ }
-+ pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
-+ if (pos) {
-+ pci_read_config_word(dev, pos + PCI_MSIX_FLAGS, &control);
-+ control &= ~PCI_MSIX_FLAGS_ENABLE;
-+ pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
-+ }
-+}
-+
- #ifndef HAVE_ARCH_PCI_SET_DMA_MASK
- /*
- * These can be overridden by arch-specific implementations
---- gregkh-2.6.orig/drivers/pci/pci.h
-+++ gregkh-2.6/drivers/pci/pci.h
-@@ -46,10 +46,8 @@ extern struct rw_semaphore pci_bus_sem;
- extern unsigned int pci_pm_d3_delay;
-
- #ifdef CONFIG_PCI_MSI
--void disable_msi_mode(struct pci_dev *dev, int pos, int type);
- void pci_no_msi(void);
- #else
--static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { }
- static inline void pci_no_msi(void) { }
- #endif
-
---- gregkh-2.6.orig/drivers/pci/quirks.c
-+++ gregkh-2.6/drivers/pci/quirks.c
-@@ -1438,8 +1438,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
- */
- static void __devinit quirk_pcie_pxh(struct pci_dev *dev)
- {
-- disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
-- PCI_CAP_ID_MSI);
-+ pci_msi_off(dev);
-+
- dev->no_msi = 1;
-
- printk(KERN_WARNING "PCI: PXH quirk detected, "
---- gregkh-2.6.orig/include/linux/pci.h
-+++ gregkh-2.6/include/linux/pci.h
-@@ -555,6 +555,7 @@ int pci_set_pcie_reset_state(struct pci_
- int __must_check pci_set_mwi(struct pci_dev *dev);
- void pci_clear_mwi(struct pci_dev *dev);
- void pci_intx(struct pci_dev *dev, int enable);
-+void pci_msi_off(struct pci_dev *dev);
- int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
- int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
- void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
---- gregkh-2.6.orig/include/linux/pci_regs.h
-+++ gregkh-2.6/include/linux/pci_regs.h
-@@ -292,9 +292,10 @@
- #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */
- #define PCI_MSI_MASK_BIT 16 /* Mask bits register */
-
--/* MSI-X registers (these are at offset PCI_MSI_FLAGS) */
--#define PCI_MSIX_FLAGS_QSIZE 0x7FF
--#define PCI_MSIX_FLAGS_ENABLE (1 << 15)
-+/* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */
-+#define PCI_MSIX_FLAGS 2
-+#define PCI_MSIX_FLAGS_QSIZE 0x7FF
-+#define PCI_MSIX_FLAGS_ENABLE (1 << 15)
- #define PCI_MSIX_FLAGS_BIRMASK (7 << 0)
- #define PCI_MSIX_FLAGS_BITMASK (1 << 0)
-
diff --git a/pci/msi-support-masking-msi-irqs-without-a-mask-bit.patch b/pci/msi-support-masking-msi-irqs-without-a-mask-bit.patch
deleted file mode 100644
index 3e85a3075f4f8b..00000000000000
--- a/pci/msi-support-masking-msi-irqs-without-a-mask-bit.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ebiederm@xmission.com Tue Feb 27 11:33:42 2007
-From: ebiederm@xmission.com (Eric W. Biederman)
-Date: Tue, 27 Feb 2007 12:33:20 -0700
-Subject: [PATCH 3/3] msi: Support masking msi irqs without a mask bit
-To: Linus Torvalds <torvalds@linux-foundation.org>
-Cc: Michael Ellerman <michael@ellerman.id.au>, Greg Kroah-Hartman <gregkh@suse.de>
-Message-ID: <m1hct7l7jz.fsf_-_@ebiederm.dsl.xmission.com>
-
-For devices that do not support msi-x we only support 1 interrupt. Therefore
-we can disable that one interrupt by disabling the msi capability itself. If
-we leave the intx interrupts disabled while we have the msi capability disabled
-no interrupts should be delivered from that device.
-
-Devices with just the minimal msi support (and thus hitting this code path)
-include things like the intel e1000 nic, so it looks like is going to be
-a fairly common case and thus important to get right.
-
-Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/pci/msi.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- gregkh-2.6.orig/drivers/pci/msi.c
-+++ gregkh-2.6/drivers/pci/msi.c
-@@ -85,6 +85,8 @@ static void msi_set_mask_bit(unsigned in
- mask_bits &= ~(1);
- mask_bits |= flag;
- pci_write_config_dword(entry->dev, pos, mask_bits);
-+ } else {
-+ msi_set_enable(entry->dev, !flag);
- }
- break;
- case PCI_CAP_ID_MSIX:
diff --git a/pci/pci-new-pci-e-reset-api.patch b/pci/pci-new-pci-e-reset-api.patch
index 926c9876b97a75..5943603b8915b9 100644
--- a/pci/pci-new-pci-e-reset-api.patch
+++ b/pci/pci-new-pci-e-reset-api.patch
@@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- gregkh-2.6.orig/drivers/pci/pci.c
+++ gregkh-2.6/drivers/pci/pci.c
-@@ -900,6 +900,34 @@ pci_disable_device(struct pci_dev *dev)
+@@ -893,6 +893,34 @@ pci_disable_device(struct pci_dev *dev)
}
/**
@@ -62,7 +62,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* pci_enable_wake - enable device to generate PME# when suspended
* @dev: - PCI device to operate on
* @state: - Current state of device.
-@@ -1385,4 +1413,5 @@ EXPORT_SYMBOL(pci_set_power_state);
+@@ -1405,4 +1433,5 @@ EXPORT_SYMBOL(pci_set_power_state);
EXPORT_SYMBOL(pci_save_state);
EXPORT_SYMBOL(pci_restore_state);
EXPORT_SYMBOL(pci_enable_wake);
diff --git a/series b/series
index 74377ce045eae7..8df009b9911f6a 100644
--- a/series
+++ b/series
@@ -6,6 +6,7 @@ gregkh/sysfs-test.patch
gregkh/detect-atomic-counter-underflows.patch
# driver patches queued for 2.6.21
+driver/device-symlink.patch
driver/platform-reorder-platform_device_del.patch
driver/remove-devfs-from-maintainers.patch
driver/driver-core-export-device_rename.patch
@@ -41,9 +42,6 @@ pci/pci-fix-section-mismatch-warning.patch
# pci patches for after 2.6.21 is out
pci/pci-new-pci-e-reset-api.patch
-pci/msi-sanely-support-hardware-level-msi-disabling.patch
-pci/msi-fixup-the-msi-enable-disable-logic.patch
-pci/msi-support-masking-msi-irqs-without-a-mask-bit.patch
# usb patches queued for 2.6.21 (bugfixes, new ids, etc.)
usb/pxa2xx_udc-cleanups-use-platform_get_irq.patch
@@ -68,7 +66,6 @@ usb/usb-fix-usb-serial-device-naming-bug.patch
usb/usb-further-fix-for-usb-serial.patch
usb/usb-kill-bkl-in-usblcd.patch
usb/usb-ipaq.c-additional-devices.patch
-usb/usb-storage-do-not-rebuild-when-kernel-version-changes.patch
usb/usbnet-dm9501-add-corega-fether-usb-txc-support.patch
# stuff after 2.6.21 is out
diff --git a/usb/usb-storage-do-not-rebuild-when-kernel-version-changes.patch b/usb/usb-storage-do-not-rebuild-when-kernel-version-changes.patch
deleted file mode 100644
index a9eb89d8a3d49e..00000000000000
--- a/usb/usb-storage-do-not-rebuild-when-kernel-version-changes.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From sam@ravnborg.org Mon Mar 5 10:30:53 2007
-From: Sam Ravnborg <sam@ravnborg.org>
-Date: Sat, 3 Mar 2007 20:09:41 +0100
-Subject: usb-storage: do not rebuild when kernel version changes
-To: <usb-storage@lists.one-eyed-alien.net>, Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>
-Message-ID: <20070303190941.GB30463@uranus.ravnborg.org>
-Content-Disposition: inline
-
-
-Replacing use of UTS_RELEASE with utsname()->release
-avoids that the usb-storage driver is recompiled each
-time the kernel version changes.
-
-Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/usb/storage/usb.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- gregkh-2.6.orig/drivers/usb/storage/usb.c
-+++ gregkh-2.6/drivers/usb/storage/usb.c
-@@ -55,7 +55,7 @@
- #include <linux/slab.h>
- #include <linux/kthread.h>
- #include <linux/mutex.h>
--#include <linux/utsrelease.h>
-+#include <linux/utsname.h>
-
- #include <scsi/scsi.h>
- #include <scsi/scsi_cmnd.h>
-@@ -547,7 +547,7 @@ static int get_device_info(struct us_dat
- idesc->bInterfaceSubClass,
- idesc->bInterfaceProtocol,
- msgs[msg],
-- UTS_RELEASE);
-+ utsname()->release);
- }
-
- return 0;
diff --git a/version b/version
index be43878a88c18f..e5beb384089c42 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.6.21-rc2-git4
+2.6.21-rc2-git5