diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 15:21:04 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 15:21:04 -0800 |
| commit | c54515499d214192eca0be51095ae906b9deb276 (patch) | |
| tree | 2f745f2b63f5cb147027f89753746a1409de85ee /bad | |
| parent | 29825dfa76c955680517f367f63abe5395773da1 (diff) | |
| download | patches-c54515499d214192eca0be51095ae906b9deb276.tar.gz | |
move some patches to bad/
Diffstat (limited to 'bad')
| -rw-r--r-- | bad/ata_piix-multithread.patch | 27 | ||||
| -rw-r--r-- | bad/power_filter.patch | 72 | ||||
| -rw-r--r-- | bad/supports_power.patch | 44 |
3 files changed, 143 insertions, 0 deletions
diff --git a/bad/ata_piix-multithread.patch b/bad/ata_piix-multithread.patch new file mode 100644 index 00000000000000..b28d98d6d7ec18 --- /dev/null +++ b/bad/ata_piix-multithread.patch @@ -0,0 +1,27 @@ +From foo@baz Tue Apr 9 12:12:43 2002 +Date: Tue, 18 Jul 2006 10:59:59 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: Driver: multi-threaded hacks + + - Fix "issue" with ata_piix doing multi-threaded boot + +Use at your own risk. + +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/ata/ata_piix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/ata/ata_piix.c ++++ gregkh-2.6/drivers/ata/ata_piix.c +@@ -1142,7 +1142,7 @@ static int __init piix_init(void) + if (rc) + return rc; + +- in_module_init = 0; ++// in_module_init = 0; + + DPRINTK("done\n"); + return 0; diff --git a/bad/power_filter.patch b/bad/power_filter.patch new file mode 100644 index 00000000000000..854c5d73bda7cb --- /dev/null +++ b/bad/power_filter.patch @@ -0,0 +1,72 @@ +--- + drivers/base/power/suspend.c | 2 +- + drivers/base/power/sysfs.c | 30 ++++++++++++++++++++++++++++++ + include/linux/device.h | 1 + + 3 files changed, 32 insertions(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/base/power/suspend.c ++++ gregkh-2.6/drivers/base/power/suspend.c +@@ -78,7 +78,7 @@ int suspend_device(struct device * dev, + suspend_report_result(dev->class->suspend, error); + } + +- if (!error && dev->bus && dev->bus->suspend && !dev->power.power_state.event) { ++ if (!error && !dev->no_suspend && dev->bus && dev->bus->suspend && !dev->power.power_state.event) { + dev_dbg(dev, "%s%s\n", + suspend_verb(state.event), + ((state.event == PM_EVENT_SUSPEND) +--- gregkh-2.6.orig/drivers/base/power/sysfs.c ++++ gregkh-2.6/drivers/base/power/sysfs.c +@@ -141,12 +141,42 @@ wake_store(struct device * dev, struct d + + static DEVICE_ATTR(wakeup, 0644, wake_show, wake_store); + ++static ssize_t can_suspend_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "%s\n", dev->no_suspend ? "no" : "yes"); ++} ++ ++static ssize_t can_suspend_store(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t n) ++{ ++ if (!n) ++ return -EINVAL; ++ ++ switch (buf[0]) { ++ case 'y': ++ case 'Y': ++ case '1': ++ dev->no_suspend = 0; ++ break; ++ case 'n': ++ case 'N': ++ case '0': ++ dev->no_suspend = 1; ++ break; ++ } ++ ++ return n; ++} ++static DEVICE_ATTR(can_suspend, 0644, can_suspend_show, can_suspend_store); + + static struct attribute * power_attrs[] = { + #ifdef CONFIG_PM_SYSFS_DEPRECATED + &dev_attr_state.attr, + #endif + &dev_attr_wakeup.attr, ++ &dev_attr_can_suspend.attr, + NULL, + }; + static struct attribute_group pm_attr_group = { +--- gregkh-2.6.orig/include/linux/device.h ++++ gregkh-2.6/include/linux/device.h +@@ -402,6 +402,7 @@ struct device { + char bus_id[BUS_ID_SIZE]; /* position on parent bus */ + struct device_type *type; + unsigned is_registered:1; ++ unsigned no_suspend:1; + struct device_attribute uevent_attr; + struct device_attribute *devt_attr; + diff --git a/bad/supports_power.patch b/bad/supports_power.patch new file mode 100644 index 00000000000000..626ecca0d4bf06 --- /dev/null +++ b/bad/supports_power.patch @@ -0,0 +1,44 @@ +--- + drivers/base/power/sysfs.c | 7 +++++-- + drivers/pci/probe.c | 1 + + include/linux/device.h | 1 + + 3 files changed, 7 insertions(+), 2 deletions(-) + +--- gregkh-2.6.orig/drivers/base/power/sysfs.c ++++ gregkh-2.6/drivers/base/power/sysfs.c +@@ -186,10 +186,13 @@ static struct attribute_group pm_attr_gr + + int dpm_sysfs_add(struct device * dev) + { +- return sysfs_create_group(&dev->kobj, &pm_attr_group); ++ if (dev->pm_aware) ++ return sysfs_create_group(&dev->kobj, &pm_attr_group); ++ return 0; + } + + void dpm_sysfs_remove(struct device * dev) + { +- sysfs_remove_group(&dev->kobj, &pm_attr_group); ++ if (dev->pm_aware) ++ sysfs_remove_group(&dev->kobj, &pm_attr_group); + } +--- gregkh-2.6.orig/drivers/pci/probe.c ++++ gregkh-2.6/drivers/pci/probe.c +@@ -893,6 +893,7 @@ pci_scan_device(struct pci_bus *bus, int + dev->sysdata = bus->sysdata; + dev->dev.parent = bus->bridge; + dev->dev.bus = &pci_bus_type; ++ dev->dev.pm_aware = 1; + dev->devfn = devfn; + dev->hdr_type = hdr_type & 0x7f; + dev->multifunction = !!(hdr_type & 0x80); +--- gregkh-2.6.orig/include/linux/device.h ++++ gregkh-2.6/include/linux/device.h +@@ -403,6 +403,7 @@ struct device { + struct device_type *type; + unsigned is_registered:1; + unsigned no_suspend:1; ++ unsigned pm_aware:1; + struct device_attribute uevent_attr; + struct device_attribute *devt_attr; + |
