diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-18 09:21:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-18 09:21:30 -0800 |
commit | c86829ed35162a012126e1866317d7d726a73b21 (patch) | |
tree | af937635ff9a141fbd3144306d30d18485d946a1 /driver | |
parent | 83af9d4ec9d9dd35d6f24f3f50db513a50a5c83c (diff) | |
download | patches-c86829ed35162a012126e1866317d7d726a73b21.tar.gz |
2.6.15-rc1-git6 refresh (dropped a lot of usb patches)
Diffstat (limited to 'driver')
-rw-r--r-- | driver/driver-model-wakeup-03.patch | 86 | ||||
-rw-r--r-- | driver/kill-hotplug-word-from-driver-core.patch | 14 |
2 files changed, 7 insertions, 93 deletions
diff --git a/driver/driver-model-wakeup-03.patch b/driver/driver-model-wakeup-03.patch deleted file mode 100644 index a05e5bff99846..0000000000000 --- a/driver/driver-model-wakeup-03.patch +++ /dev/null @@ -1,86 +0,0 @@ -From linux-pm-bounces@lists.osdl.org Mon Sep 12 21:30:47 2005 -From: David Brownell <david-b@pacbell.net> -Date: Mon, 12 Sep 2005 19:48:14 -0700 -Message-Id: <200509121948.14849.david-b@pacbell.net> -Subject: [linux-pm] [patch 3/3] pci device wakeup flags - -This patch teaches "pci_dev" about the new driver model wakeup support: - - - It marks devices as supporting wakeup when "can issue PME#" is - listed in its PCI PM capability. - - - pci_enable_wake() refuses to enable wake if that's been disabled - (e.g. through sysfs). - -NOTE that a recent patch changed PCI probing, and this reverts part -of that change ... so that driver model initialization is again done -before the PCI setup. - -(One issue is that the driver model "init + add == register" pattern isn't -being used inside PCI ... and that probe change worsened the problem by -making "add" do some "init" too. Maybe PCI should match the driver model -more closely, and just grow a new "pci_dev_init" function.) - -Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - - ---- gregkh-2.6.orig/drivers/pci/probe.c 2005-11-12 13:59:16.000000000 -0800 -+++ gregkh-2.6/drivers/pci/probe.c 2005-11-12 13:59:22.000000000 -0800 -@@ -589,6 +589,7 @@ - static int pci_setup_device(struct pci_dev * dev) - { - u32 class; -+ u16 pm; - - sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(dev->bus), - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); -@@ -616,6 +617,19 @@ - pci_read_bases(dev, 6, PCI_ROM_ADDRESS); - pci_read_config_word(dev, PCI_SUBSYSTEM_VENDOR_ID, &dev->subsystem_vendor); - pci_read_config_word(dev, PCI_SUBSYSTEM_ID, &dev->subsystem_device); -+ -+ /* PCI PM capable devices may be able to issue PME# (wakeup) */ -+ pm = pci_find_capability(dev, PCI_CAP_ID_PM); -+ if (pm) { -+ pci_read_config_word(dev, pm + PCI_PM_PMC, &pm); -+ if (pm & PCI_PM_CAP_PME_MASK) -+ device_init_wakeup(&dev->dev, 1); -+ -+ /* REVISIT: if (pm & PCI_PM_CAP_PME_D3cold) then -+ * pci pm spec 1.2, section 3.2.4 says we should -+ * init PCI_PM_CTRL_PME_{STATUS,ENABLE} ... -+ */ -+ } - break; - - case PCI_HEADER_TYPE_BRIDGE: /* bridge header */ -@@ -756,6 +770,7 @@ - memset(dev, 0, sizeof(struct pci_dev)); - dev->bus = bus; - dev->sysdata = bus->sysdata; -+ device_initialize(&dev->dev); - dev->dev.parent = bus->bridge; - dev->dev.bus = &pci_bus_type; - dev->devfn = devfn; -@@ -778,7 +793,6 @@ - - void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) - { -- device_initialize(&dev->dev); - dev->dev.release = pci_release_dev; - pci_dev_get(dev); - ---- gregkh-2.6.orig/drivers/pci/pci.c 2005-11-12 13:59:16.000000000 -0800 -+++ gregkh-2.6/drivers/pci/pci.c 2005-11-12 13:59:22.000000000 -0800 -@@ -559,6 +559,10 @@ - if (!pm) - return enable ? -EIO : 0; - -+ /* don't enable unless policy set through driver core allows it */ -+ if (!device_may_wakeup(&dev->dev) && enable) -+ return -EROFS; -+ - /* Check device's ability to generate PME# */ - pci_read_config_word(dev,pm+PCI_PM_PMC,&value); - diff --git a/driver/kill-hotplug-word-from-driver-core.patch b/driver/kill-hotplug-word-from-driver-core.patch index 95289d5d6d555..0a5c91933a091 100644 --- a/driver/kill-hotplug-word-from-driver-core.patch +++ b/driver/kill-hotplug-word-from-driver-core.patch @@ -1308,7 +1308,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/drivers/usb/core/usb.c +++ gregkh-2.6/drivers/usb/core/usb.c -@@ -370,8 +370,7 @@ void usb_driver_release_interface(struct +@@ -363,8 +363,7 @@ void usb_driver_release_interface(struct * Most USB device drivers will use this indirectly, through the usb core, * but some layered driver frameworks use it directly. * These device tables are exported with MODULE_DEVICE_TABLE, through @@ -1318,7 +1318,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * * What Matches: * -@@ -552,10 +551,7 @@ static int usb_device_match (struct devi +@@ -545,10 +544,7 @@ static int usb_device_match (struct devi #ifdef CONFIG_HOTPLUG /* @@ -1330,7 +1330,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * or other modules, configure the device, and more. Drivers can provide * a MODULE_DEVICE_TABLE to help with module loading subtasks. * -@@ -564,8 +560,8 @@ static int usb_device_match (struct devi +@@ -557,8 +553,8 @@ static int usb_device_match (struct devi * delays in event delivery. Use sysfs (and DEVPATH) to make sure the * device (and this configuration!) are still present. */ @@ -1341,7 +1341,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> { struct usb_interface *intf; struct usb_device *usb_dev; -@@ -577,7 +573,7 @@ static int usb_hotplug (struct device *d +@@ -570,7 +566,7 @@ static int usb_hotplug (struct device *d return -ENODEV; /* driver is often null here; dev_dbg() would oops */ @@ -1350,7 +1350,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Must check driver_data here, as on remove driver is always NULL */ if ((dev->driver == &usb_generic_driver) || -@@ -604,51 +600,51 @@ static int usb_hotplug (struct device *d +@@ -597,51 +593,51 @@ static int usb_hotplug (struct device *d * * FIXME reduce hardwired intelligence here */ @@ -1436,7 +1436,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> return -ENOMEM; envp[i] = NULL; -@@ -658,7 +654,7 @@ static int usb_hotplug (struct device *d +@@ -651,7 +647,7 @@ static int usb_hotplug (struct device *d #else @@ -1445,7 +1445,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int num_envp, char *buffer, int buffer_size) { return -ENODEV; -@@ -1495,7 +1491,7 @@ static int usb_generic_resume(struct dev +@@ -1488,7 +1484,7 @@ static int usb_generic_resume(struct dev struct bus_type usb_bus_type = { .name = "usb", .match = usb_device_match, |