diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-11 14:09:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-11 14:09:49 -0700 |
| commit | 1c126d3c29611c11088b6ca5ba35379f71a4c716 (patch) | |
| tree | d51834290066a6b91c90c9bbfd244b5a8e5ed09c | |
| parent | 3e08ba9f88c368d97e948bc692638d12101ec6fd (diff) | |
| download | patches-1c126d3c29611c11088b6ca5ba35379f71a4c716.tar.gz | |
more patches
27 files changed, 2229 insertions, 8 deletions
diff --git a/driver-core/driver-core-fix-device_move-vs.-dpm-list-ordering-v2.patch b/driver-core/driver-core-fix-device_move-vs.-dpm-list-ordering-v2.patch new file mode 100644 index 00000000000000..ec02078d1a8bce --- /dev/null +++ b/driver-core/driver-core-fix-device_move-vs.-dpm-list-ordering-v2.patch @@ -0,0 +1,263 @@ +From cornelia.huck@de.ibm.com Wed Mar 11 13:39:25 2009 +From: Cornelia Huck <cornelia.huck@de.ibm.com> +Date: Wed, 4 Mar 2009 12:44:00 +0100 +Subject: Driver core: Fix device_move() vs. dpm list ordering, v2 +To: Alan Stern <stern@rowland.harvard.edu>, "Rafael J. Wysocki" <rjw@sisk.pl>, Marcel Holtmann <marcel@holtmann.org>, Martin Schwidefsky <schwidefsky@de.ibm.com>, Heiko Carstens <heiko.carstens@de.ibm.com>, Greg KH <gregkh@suse.de> +Message-ID: <20090304124400.6822dd83@gondolin> + + +dpm_list currently relies on the fact that child devices will +be registered after their parents to get a correct suspend +order. Using device_move() however destroys this assumption, as +an already registered device may be moved under a newly registered +one. + +This patch adds a new argument to device_move(), allowing callers +to specify how dpm_list should be adapted. + +Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> +Acked-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/base/core.c | 19 ++++++++++++++++++- + drivers/base/power/main.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + drivers/base/power/power.h | 8 ++++++++ + drivers/s390/cio/device.c | 9 +++++---- + include/linux/device.h | 3 ++- + include/linux/pm.h | 11 +++++++++++ + net/bluetooth/hci_sysfs.c | 2 +- + net/bluetooth/rfcomm/tty.c | 5 +++-- + 8 files changed, 92 insertions(+), 9 deletions(-) + +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -1561,8 +1561,10 @@ out: + * device_move - moves a device to a new parent + * @dev: the pointer to the struct device to be moved + * @new_parent: the new parent of the device (can by NULL) ++ * @dpm_order: how to reorder the dpm_list + */ +-int device_move(struct device *dev, struct device *new_parent) ++int device_move(struct device *dev, struct device *new_parent, ++ enum dpm_order dpm_order) + { + int error; + struct device *old_parent; +@@ -1572,6 +1574,7 @@ int device_move(struct device *dev, stru + if (!dev) + return -EINVAL; + ++ device_pm_lock(); + new_parent = get_device(new_parent); + new_parent_kobj = get_device_parent(dev, new_parent); + +@@ -1613,9 +1616,23 @@ int device_move(struct device *dev, stru + put_device(new_parent); + goto out; + } ++ switch (dpm_order) { ++ case DPM_ORDER_NONE: ++ break; ++ case DPM_ORDER_DEV_AFTER_PARENT: ++ device_pm_move_after(dev, new_parent); ++ break; ++ case DPM_ORDER_PARENT_BEFORE_DEV: ++ device_pm_move_before(new_parent, dev); ++ break; ++ case DPM_ORDER_DEV_LAST: ++ device_pm_move_last(dev); ++ break; ++ } + out_put: + put_device(old_parent); + out: ++ device_pm_unlock(); + put_device(dev); + return error; + } +--- a/drivers/base/power/main.c ++++ b/drivers/base/power/main.c +@@ -107,6 +107,50 @@ void device_pm_remove(struct device *dev + } + + /** ++ * device_pm_move_before - move device in dpm_list ++ * @deva: Device to move in dpm_list ++ * @devb: Device @deva should come before ++ */ ++void device_pm_move_before(struct device *deva, struct device *devb) ++{ ++ pr_debug("PM: Moving %s:%s before %s:%s\n", ++ deva->bus ? deva->bus->name : "No Bus", ++ kobject_name(&deva->kobj), ++ devb->bus ? devb->bus->name : "No Bus", ++ kobject_name(&devb->kobj)); ++ /* Delete deva from dpm_list and reinsert before devb. */ ++ list_move_tail(&deva->power.entry, &devb->power.entry); ++} ++ ++/** ++ * device_pm_move_after - move device in dpm_list ++ * @deva: Device to move in dpm_list ++ * @devb: Device @deva should come after ++ */ ++void device_pm_move_after(struct device *deva, struct device *devb) ++{ ++ pr_debug("PM: Moving %s:%s after %s:%s\n", ++ deva->bus ? deva->bus->name : "No Bus", ++ kobject_name(&deva->kobj), ++ devb->bus ? devb->bus->name : "No Bus", ++ kobject_name(&devb->kobj)); ++ /* Delete deva from dpm_list and reinsert after devb. */ ++ list_move(&deva->power.entry, &devb->power.entry); ++} ++ ++/** ++ * device_pm_move_last - move device to end of dpm_list ++ * @dev: Device to move in dpm_list ++ */ ++void device_pm_move_last(struct device *dev) ++{ ++ pr_debug("PM: Moving %s:%s to end of list\n", ++ dev->bus ? dev->bus->name : "No Bus", ++ kobject_name(&dev->kobj)); ++ list_move_tail(&dev->power.entry, &dpm_list); ++} ++ ++/** + * pm_op - execute the PM operation appropiate for given PM event + * @dev: Device. + * @ops: PM operations to choose from. +--- a/drivers/base/power/power.h ++++ b/drivers/base/power/power.h +@@ -18,11 +18,19 @@ static inline struct device *to_device(s + + extern void device_pm_add(struct device *); + extern void device_pm_remove(struct device *); ++extern void device_pm_move_before(struct device *, struct device *); ++extern void device_pm_move_after(struct device *, struct device *); ++extern void device_pm_move_last(struct device *); + + #else /* CONFIG_PM_SLEEP */ + + static inline void device_pm_add(struct device *dev) {} + static inline void device_pm_remove(struct device *dev) {} ++static inline void device_pm_move_before(struct device *deva, ++ struct device *devb) {} ++static inline void device_pm_move_after(struct device *deva, ++ struct device *devb) {} ++static inline void device_pm_move_last(struct device *dev) {} + + #endif + +--- a/drivers/s390/cio/device.c ++++ b/drivers/s390/cio/device.c +@@ -799,7 +799,7 @@ static void sch_attach_disconnected_devi + return; + other_sch = to_subchannel(cdev->dev.parent); + /* Note: device_move() changes cdev->dev.parent */ +- ret = device_move(&cdev->dev, &sch->dev); ++ ret = device_move(&cdev->dev, &sch->dev, DPM_ORDER_PARENT_BEFORE_DEV); + if (ret) { + CIO_MSG_EVENT(0, "Moving disconnected device 0.%x.%04x failed " + "(ret=%d)!\n", cdev->private->dev_id.ssid, +@@ -830,7 +830,7 @@ static void sch_attach_orphaned_device(s + * Try to move the ccw device to its new subchannel. + * Note: device_move() changes cdev->dev.parent + */ +- ret = device_move(&cdev->dev, &sch->dev); ++ ret = device_move(&cdev->dev, &sch->dev, DPM_ORDER_PARENT_BEFORE_DEV); + if (ret) { + CIO_MSG_EVENT(0, "Moving device 0.%x.%04x from orphanage " + "failed (ret=%d)!\n", +@@ -897,7 +897,8 @@ void ccw_device_move_to_orphanage(struct + * ccw device can take its place on the subchannel. + * Note: device_move() changes cdev->dev.parent + */ +- ret = device_move(&cdev->dev, &css->pseudo_subchannel->dev); ++ ret = device_move(&cdev->dev, &css->pseudo_subchannel->dev, ++ DPM_ORDER_NONE); + if (ret) { + CIO_MSG_EVENT(0, "Moving device 0.%x.%04x to orphanage failed " + "(ret=%d)!\n", cdev->private->dev_id.ssid, +@@ -1129,7 +1130,7 @@ static void ccw_device_move_to_sch(struc + * Try to move the ccw device to its new subchannel. + * Note: device_move() changes cdev->dev.parent + */ +- rc = device_move(&cdev->dev, &sch->dev); ++ rc = device_move(&cdev->dev, &sch->dev, DPM_ORDER_PARENT_BEFORE_DEV); + mutex_unlock(&sch->reg_mutex); + if (rc) { + CIO_MSG_EVENT(0, "Moving device 0.%x.%04x to subchannel " +--- a/include/linux/device.h ++++ b/include/linux/device.h +@@ -494,7 +494,8 @@ extern int device_for_each_child(struct + extern struct device *device_find_child(struct device *dev, void *data, + int (*match)(struct device *dev, void *data)); + extern int device_rename(struct device *dev, char *new_name); +-extern int device_move(struct device *dev, struct device *new_parent); ++extern int device_move(struct device *dev, struct device *new_parent, ++ enum dpm_order dpm_order); + + /* + * Root device objects for grouping under /sys/devices +--- a/include/linux/pm.h ++++ b/include/linux/pm.h +@@ -400,6 +400,9 @@ extern void __suspend_report_result(cons + + #else /* !CONFIG_PM_SLEEP */ + ++#define device_pm_lock() do {} while (0) ++#define device_pm_unlock() do {} while (0) ++ + static inline int device_suspend(pm_message_t state) + { + return 0; +@@ -409,6 +412,14 @@ static inline int device_suspend(pm_mess + + #endif /* !CONFIG_PM_SLEEP */ + ++/* How to reorder dpm_list after device_move() */ ++enum dpm_order { ++ DPM_ORDER_NONE, ++ DPM_ORDER_DEV_AFTER_PARENT, ++ DPM_ORDER_PARENT_BEFORE_DEV, ++ DPM_ORDER_DEV_LAST, ++}; ++ + /* + * Global Power Management flags + * Used to keep APM and ACPI from both being active +--- a/net/bluetooth/hci_sysfs.c ++++ b/net/bluetooth/hci_sysfs.c +@@ -140,7 +140,7 @@ static void del_conn(struct work_struct + dev = device_find_child(&conn->dev, NULL, __match_tty); + if (!dev) + break; +- device_move(dev, NULL); ++ device_move(dev, NULL, DPM_ORDER_DEV_LAST); + put_device(dev); + } + +--- a/net/bluetooth/rfcomm/tty.c ++++ b/net/bluetooth/rfcomm/tty.c +@@ -731,7 +731,8 @@ static int rfcomm_tty_open(struct tty_st + remove_wait_queue(&dev->wait, &wait); + + if (err == 0) +- device_move(dev->tty_dev, rfcomm_get_device(dev)); ++ device_move(dev->tty_dev, rfcomm_get_device(dev), ++ DPM_ORDER_DEV_AFTER_PARENT); + + rfcomm_tty_copy_pending(dev); + +@@ -751,7 +752,7 @@ static void rfcomm_tty_close(struct tty_ + + if (atomic_dec_and_test(&dev->opened)) { + if (dev->tty_dev->parent) +- device_move(dev->tty_dev, NULL); ++ device_move(dev->tty_dev, NULL, DPM_ORDER_DEV_LAST); + + /* Close DLC and dettach TTY */ + rfcomm_dlc_close(dev->dlc, 0); diff --git a/driver-core/driver-core-implement-uevent-suppress-in-kobject.patch b/driver-core/driver-core-implement-uevent-suppress-in-kobject.patch new file mode 100644 index 00000000000000..bd69a5d99bec42 --- /dev/null +++ b/driver-core/driver-core-implement-uevent-suppress-in-kobject.patch @@ -0,0 +1,251 @@ +From tom.leiming@gmail.com Wed Mar 11 13:28:11 2009 +From: tom.leiming@gmail.com +Date: Sun, 1 Mar 2009 21:10:49 +0800 +Subject: Driver core: implement uevent suppress in kobject +To: greg@kroah.com +Cc: Ming Lei <tom.leiming@gmail.com> +Message-ID: <1235913049-4533-1-git-send-email-tom.leiming@gmail.com> + + +From: Ming Lei <tom.leiming@gmail.com> + +This patch implements uevent suppress in kobject and removes it +from struct device, based on the following ideas: + +1,Uevent sending should be one attribute of kobject, so suppressing it +in kobject layer is more natural than in device layer. By this way, +we can do it for other objects embedded with kobject. + +2,It may save several bytes for each instance of struct device.(On my +omap3(32bit ARM) based box, can save 8bytes per device object) + +This patch also introduces dev_set|get_uevent_suppress() helpers to +set and query uevent_suppress attribute in case to help kobject +as private part of struct device in future. + +[This version is against the latest driver-core patch set of Greg,please +ignore the last version.] + +Signed-off-by: Ming Lei <tom.leiming@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/acpi/dock.c | 2 +- + drivers/base/core.c | 2 -- + drivers/base/firmware_class.c | 4 ++-- + drivers/i2c/i2c-core.c | 2 +- + drivers/s390/cio/chsc_sch.c | 4 ++-- + drivers/s390/cio/css.c | 4 ++-- + drivers/s390/cio/device.c | 4 ++-- + fs/partitions/check.c | 10 +++++----- + include/linux/device.h | 11 ++++++++++- + include/linux/kobject.h | 1 + + lib/kobject_uevent.c | 7 +++++++ + 11 files changed, 33 insertions(+), 18 deletions(-) + +--- a/drivers/acpi/dock.c ++++ b/drivers/acpi/dock.c +@@ -977,7 +977,7 @@ static int dock_add(acpi_handle handle) + sizeof(struct dock_station *)); + + /* we want the dock device to send uevents */ +- dock_device->dev.uevent_suppress = 0; ++ dev_set_uevent_suppress(&dock_device->dev, 0); + + if (is_dock(handle)) + dock_station->flags |= DOCK_IS_DOCK; +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -136,8 +136,6 @@ static int dev_uevent_filter(struct kset + + if (ktype == &device_ktype) { + struct device *dev = to_dev(kobj); +- if (dev->uevent_suppress) +- return 0; + if (dev->bus) + return 1; + if (dev->class) +--- a/drivers/base/firmware_class.c ++++ b/drivers/base/firmware_class.c +@@ -319,7 +319,7 @@ static int fw_register_device(struct dev + f_dev->parent = device; + f_dev->class = &firmware_class; + dev_set_drvdata(f_dev, fw_priv); +- f_dev->uevent_suppress = 1; ++ dev_set_uevent_suppress(f_dev, 1); + retval = device_register(f_dev); + if (retval) { + dev_err(device, "%s: device_register failed\n", __func__); +@@ -366,7 +366,7 @@ static int fw_setup_device(struct firmwa + } + + if (uevent) +- f_dev->uevent_suppress = 0; ++ dev_set_uevent_suppress(f_dev, 0); + *dev_p = f_dev; + goto out; + +--- a/drivers/i2c/i2c-core.c ++++ b/drivers/i2c/i2c-core.c +@@ -841,7 +841,7 @@ int i2c_attach_client(struct i2c_client + + if (client->driver && !is_newstyle_driver(client->driver)) { + client->dev.release = i2c_client_release; +- client->dev.uevent_suppress = 1; ++ dev_set_uevent_suppress(&client->dev, 1); + } else + client->dev.release = i2c_client_dev_release; + +--- a/drivers/s390/cio/chsc_sch.c ++++ b/drivers/s390/cio/chsc_sch.c +@@ -84,8 +84,8 @@ static int chsc_subchannel_probe(struct + kfree(private); + } else { + sch->private = private; +- if (sch->dev.uevent_suppress) { +- sch->dev.uevent_suppress = 0; ++ if (dev_get_uevent_suppress(&sch->dev)) { ++ dev_set_uevent_suppress(&sch->dev, 0); + kobject_uevent(&sch->dev.kobj, KOBJ_ADD); + } + } +--- a/drivers/s390/cio/css.c ++++ b/drivers/s390/cio/css.c +@@ -272,7 +272,7 @@ static int css_register_subchannel(struc + * the subchannel driver can decide itself when it wants to inform + * userspace of its existence. + */ +- sch->dev.uevent_suppress = 1; ++ dev_set_uevent_suppress(&sch->dev, 1); + css_update_ssd_info(sch); + /* make it known to the system */ + ret = css_sch_device_register(sch); +@@ -287,7 +287,7 @@ static int css_register_subchannel(struc + * a fitting driver module may be loaded based on the + * modalias. + */ +- sch->dev.uevent_suppress = 0; ++ dev_set_uevent_suppress(&sch->dev, 0); + kobject_uevent(&sch->dev.kobj, KOBJ_ADD); + } + return ret; +--- a/drivers/s390/cio/device.c ++++ b/drivers/s390/cio/device.c +@@ -981,7 +981,7 @@ io_subchannel_register(struct work_struc + * Now we know this subchannel will stay, we can throw + * our delayed uevent. + */ +- sch->dev.uevent_suppress = 0; ++ dev_set_uevent_suppress(&sch->dev, 0); + kobject_uevent(&sch->dev.kobj, KOBJ_ADD); + /* make it known to the system */ + ret = ccw_device_register(cdev); +@@ -1243,7 +1243,7 @@ static int io_subchannel_probe(struct su + * the ccw_device and exit. This happens for all early + * devices, e.g. the console. + */ +- sch->dev.uevent_suppress = 0; ++ dev_set_uevent_suppress(&sch->dev, 0); + kobject_uevent(&sch->dev.kobj, KOBJ_ADD); + cdev->dev.groups = ccwdev_attr_groups; + device_initialize(&cdev->dev); +--- a/fs/partitions/check.c ++++ b/fs/partitions/check.c +@@ -400,7 +400,7 @@ struct hd_struct *add_partition(struct g + pdev->devt = devt; + + /* delay uevent until 'holders' subdir is created */ +- pdev->uevent_suppress = 1; ++ dev_set_uevent_suppress(pdev, 1); + err = device_add(pdev); + if (err) + goto out_put; +@@ -410,7 +410,7 @@ struct hd_struct *add_partition(struct g + if (!p->holder_dir) + goto out_del; + +- pdev->uevent_suppress = 0; ++ dev_set_uevent_suppress(pdev, 0); + if (flags & ADDPART_FLAG_WHOLEDISK) { + err = device_create_file(pdev, &dev_attr_whole_disk); + if (err) +@@ -422,7 +422,7 @@ struct hd_struct *add_partition(struct g + rcu_assign_pointer(ptbl->part[partno], p); + + /* suppress uevent if the disk supresses it */ +- if (!ddev->uevent_suppress) ++ if (!dev_get_uevent_suppress(pdev)) + kobject_uevent(&pdev->kobj, KOBJ_ADD); + + return p; +@@ -455,7 +455,7 @@ void register_disk(struct gendisk *disk) + dev_set_name(ddev, disk->disk_name); + + /* delay uevents, until we scanned partition table */ +- ddev->uevent_suppress = 1; ++ dev_set_uevent_suppress(ddev, 1); + + if (device_add(ddev)) + return; +@@ -490,7 +490,7 @@ void register_disk(struct gendisk *disk) + + exit: + /* announce disk after possible partitions are created */ +- ddev->uevent_suppress = 0; ++ dev_set_uevent_suppress(ddev, 0); + kobject_uevent(&ddev->kobj, KOBJ_ADD); + + /* announce possible partitions */ +--- a/include/linux/device.h ++++ b/include/linux/device.h +@@ -373,7 +373,6 @@ struct device { + struct device_private *p; + + struct kobject kobj; +- unsigned uevent_suppress:1; + const char *init_name; /* initial name of the device */ + struct device_type *type; + +@@ -465,6 +464,16 @@ static inline void dev_set_drvdata(struc + dev->driver_data = data; + } + ++static inline unsigned int dev_get_uevent_suppress(const struct device *dev) ++{ ++ return dev->kobj.uevent_suppress; ++} ++ ++static inline void dev_set_uevent_suppress(struct device *dev, int val) ++{ ++ dev->kobj.uevent_suppress = val; ++} ++ + static inline int device_is_registered(struct device *dev) + { + return dev->kobj.state_in_sysfs; +--- a/include/linux/kobject.h ++++ b/include/linux/kobject.h +@@ -68,6 +68,7 @@ struct kobject { + unsigned int state_in_sysfs:1; + unsigned int state_add_uevent_sent:1; + unsigned int state_remove_uevent_sent:1; ++ unsigned int uevent_suppress:1; + }; + + extern int kobject_set_name(struct kobject *kobj, const char *name, ...) +--- a/lib/kobject_uevent.c ++++ b/lib/kobject_uevent.c +@@ -118,6 +118,13 @@ int kobject_uevent_env(struct kobject *k + kset = top_kobj->kset; + uevent_ops = kset->uevent_ops; + ++ /* skip the event, if uevent_suppress is set*/ ++ if (kobj->uevent_suppress) { ++ pr_debug("kobject: '%s' (%p): %s: uevent_suppress " ++ "caused the event to drop!\n", ++ kobject_name(kobj), kobj, __func__); ++ return 0; ++ } + /* skip the event, if the filter returns zero. */ + if (uevent_ops && uevent_ops->filter) + if (!uevent_ops->filter(kset, kobj)) { diff --git a/driver-core/driver-core-some-cleanup-on-drivers-base-sys.c.patch b/driver-core/driver-core-some-cleanup-on-drivers-base-sys.c.patch new file mode 100644 index 00000000000000..bb7a3c0df53c1f --- /dev/null +++ b/driver-core/driver-core-some-cleanup-on-drivers-base-sys.c.patch @@ -0,0 +1,198 @@ +From helight.xu@gmail.com Wed Mar 11 13:32:38 2009 +From: Zhenwen Xu <helight.xu@gmail.com> +Date: Tue, 3 Mar 2009 18:36:02 +0800 +Subject: Driver core: some cleanup on drivers/base/sys.c +To: Greg Kroah-Hartman <gregkh@suse.de> +Message-ID: <20090303103602.GA9658@helight> + + +From: Zhenwen Xu <helight.xu@gmail.com> + +do some cleanup on drivers/base/sys.c + + +Signed-off-by: Zhenwen Xu <helight.xu@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/base/sys.c | 54 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 27 insertions(+), 27 deletions(-) + +--- a/drivers/base/sys.c ++++ b/drivers/base/sys.c +@@ -30,10 +30,10 @@ + + + static ssize_t +-sysdev_show(struct kobject * kobj, struct attribute * attr, char * buffer) ++sysdev_show(struct kobject *kobj, struct attribute *attr, char *buffer) + { +- struct sys_device * sysdev = to_sysdev(kobj); +- struct sysdev_attribute * sysdev_attr = to_sysdev_attr(attr); ++ struct sys_device *sysdev = to_sysdev(kobj); ++ struct sysdev_attribute *sysdev_attr = to_sysdev_attr(attr); + + if (sysdev_attr->show) + return sysdev_attr->show(sysdev, sysdev_attr, buffer); +@@ -42,11 +42,11 @@ sysdev_show(struct kobject * kobj, struc + + + static ssize_t +-sysdev_store(struct kobject * kobj, struct attribute * attr, +- const char * buffer, size_t count) ++sysdev_store(struct kobject *kobj, struct attribute *attr, ++ const char *buffer, size_t count) + { +- struct sys_device * sysdev = to_sysdev(kobj); +- struct sysdev_attribute * sysdev_attr = to_sysdev_attr(attr); ++ struct sys_device *sysdev = to_sysdev(kobj); ++ struct sysdev_attribute *sysdev_attr = to_sysdev_attr(attr); + + if (sysdev_attr->store) + return sysdev_attr->store(sysdev, sysdev_attr, buffer, count); +@@ -63,13 +63,13 @@ static struct kobj_type ktype_sysdev = { + }; + + +-int sysdev_create_file(struct sys_device * s, struct sysdev_attribute * a) ++int sysdev_create_file(struct sys_device *s, struct sysdev_attribute *a) + { + return sysfs_create_file(&s->kobj, &a->attr); + } + + +-void sysdev_remove_file(struct sys_device * s, struct sysdev_attribute * a) ++void sysdev_remove_file(struct sys_device *s, struct sysdev_attribute *a) + { + sysfs_remove_file(&s->kobj, &a->attr); + } +@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(sysdev_remove_file); + static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr, + char *buffer) + { +- struct sysdev_class * class = to_sysdev_class(kobj); ++ struct sysdev_class *class = to_sysdev_class(kobj); + struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); + + if (class_attr->show) +@@ -95,8 +95,8 @@ static ssize_t sysdev_class_show(struct + static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr, + const char *buffer, size_t count) + { +- struct sysdev_class * class = to_sysdev_class(kobj); +- struct sysdev_class_attribute * class_attr = to_sysdev_class_attr(attr); ++ struct sysdev_class *class = to_sysdev_class(kobj); ++ struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr); + + if (class_attr->store) + return class_attr->store(class, buffer, count); +@@ -128,7 +128,7 @@ EXPORT_SYMBOL_GPL(sysdev_class_remove_fi + + static struct kset *system_kset; + +-int sysdev_class_register(struct sysdev_class * cls) ++int sysdev_class_register(struct sysdev_class *cls) + { + pr_debug("Registering sysdev class '%s'\n", cls->name); + +@@ -141,7 +141,7 @@ int sysdev_class_register(struct sysdev_ + return kset_register(&cls->kset); + } + +-void sysdev_class_unregister(struct sysdev_class * cls) ++void sysdev_class_unregister(struct sysdev_class *cls) + { + pr_debug("Unregistering sysdev class '%s'\n", + kobject_name(&cls->kset.kobj)); +@@ -203,8 +203,8 @@ int sysdev_driver_register(struct sysdev + * @cls: Class driver belongs to. + * @drv: Driver. + */ +-void sysdev_driver_unregister(struct sysdev_class * cls, +- struct sysdev_driver * drv) ++void sysdev_driver_unregister(struct sysdev_class *cls, ++ struct sysdev_driver *drv) + { + mutex_lock(&sysdev_drivers_lock); + list_del_init(&drv->entry); +@@ -229,10 +229,10 @@ EXPORT_SYMBOL_GPL(sysdev_driver_unregist + * @sysdev: device in question + * + */ +-int sysdev_register(struct sys_device * sysdev) ++int sysdev_register(struct sys_device *sysdev) + { + int error; +- struct sysdev_class * cls = sysdev->cls; ++ struct sysdev_class *cls = sysdev->cls; + + if (!cls) + return -EINVAL; +@@ -252,7 +252,7 @@ int sysdev_register(struct sys_device * + sysdev->id); + + if (!error) { +- struct sysdev_driver * drv; ++ struct sysdev_driver *drv; + + pr_debug("Registering sys device '%s'\n", + kobject_name(&sysdev->kobj)); +@@ -274,9 +274,9 @@ int sysdev_register(struct sys_device * + return error; + } + +-void sysdev_unregister(struct sys_device * sysdev) ++void sysdev_unregister(struct sys_device *sysdev) + { +- struct sysdev_driver * drv; ++ struct sysdev_driver *drv; + + mutex_lock(&sysdev_drivers_lock); + list_for_each_entry(drv, &sysdev->cls->drivers, entry) { +@@ -305,19 +305,19 @@ void sysdev_unregister(struct sys_device + */ + void sysdev_shutdown(void) + { +- struct sysdev_class * cls; ++ struct sysdev_class *cls; + + pr_debug("Shutting Down System Devices\n"); + + mutex_lock(&sysdev_drivers_lock); + list_for_each_entry_reverse(cls, &system_kset->list, kset.kobj.entry) { +- struct sys_device * sysdev; ++ struct sys_device *sysdev; + + pr_debug("Shutting down type '%s':\n", + kobject_name(&cls->kset.kobj)); + + list_for_each_entry(sysdev, &cls->kset.list, kobj.entry) { +- struct sysdev_driver * drv; ++ struct sysdev_driver *drv; + pr_debug(" %s\n", kobject_name(&sysdev->kobj)); + + /* Call auxillary drivers first */ +@@ -364,7 +364,7 @@ static void __sysdev_resume(struct sys_d + */ + int sysdev_suspend(pm_message_t state) + { +- struct sysdev_class * cls; ++ struct sysdev_class *cls; + struct sys_device *sysdev, *err_dev; + struct sysdev_driver *drv, *err_drv; + int ret; +@@ -442,12 +442,12 @@ EXPORT_SYMBOL_GPL(sysdev_suspend); + */ + int sysdev_resume(void) + { +- struct sysdev_class * cls; ++ struct sysdev_class *cls; + + pr_debug("Resuming System Devices\n"); + + list_for_each_entry(cls, &system_kset->list, kset.kobj.entry) { +- struct sys_device * sysdev; ++ struct sys_device *sysdev; + + pr_debug("Resuming type '%s':\n", + kobject_name(&cls->kset.kobj)); diff --git a/driver-core/dynamic-debug-combine-dprintk-and-dynamic-printk.patch b/driver-core/dynamic-debug-combine-dprintk-and-dynamic-printk.patch index cfaeb2662f4711..091958d8dec355 100644 --- a/driver-core/dynamic-debug-combine-dprintk-and-dynamic-printk.patch +++ b/driver-core/dynamic-debug-combine-dprintk-and-dynamic-printk.patch @@ -94,7 +94,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> *(.init.text) \ --- a/include/linux/device.h +++ b/include/linux/device.h -@@ -572,7 +572,7 @@ extern const char *dev_driver_string(con +@@ -582,7 +582,7 @@ extern const char *dev_driver_string(con #if defined(DEBUG) #define dev_dbg(dev, format, arg...) \ dev_printk(KERN_DEBUG , dev , format , ## arg) diff --git a/driver-core/dynamic-debug-fix-pr_fmt-build-error.patch b/driver-core/dynamic-debug-fix-pr_fmt-build-error.patch new file mode 100644 index 00000000000000..937e2713e08760 --- /dev/null +++ b/driver-core/dynamic-debug-fix-pr_fmt-build-error.patch @@ -0,0 +1,58 @@ +From gnb@sgi.com Wed Mar 11 13:53:29 2009 +From: Greg Banks <gnb@sgi.com> +Date: Wed, 11 Mar 2009 21:07:28 +1100 +Subject: Dynamic debug: fix pr_fmt() build error +To: Jason Baron <jbaron@redhat.com> +Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>, Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Greg KH <greg@kroah.com>, Herbert Xu <herbert@gondor.apana.org.au> +Message-ID: <49B78D60.2070402@sgi.com> + +When CONFIG_DYNAMIC_DEBUG is enabled, allow callers of pr_debug() +to provide their own definition of pr_fmt() even if that definition +uses tricks like + +#define pr_fmt(fmt) "%s:" fmt, __func__ + +Signed-off-by: Greg Banks <gnb@sgi.com> +Cc: Jason Baron <jbaron@redhat.com> +Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + + include/linux/dynamic_debug.h | 4 ++-- + include/linux/kernel.h | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +--- a/include/linux/dynamic_debug.h ++++ b/include/linux/dynamic_debug.h +@@ -57,7 +57,7 @@ extern int ddebug_remove_module(char *mo + { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \ + DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ + if (__dynamic_dbg_enabled(descriptor)) \ +- printk(KERN_DEBUG KBUILD_MODNAME ":" fmt, \ ++ printk(KERN_DEBUG KBUILD_MODNAME ":" pr_fmt(fmt), \ + ##__VA_ARGS__); \ + } while (0) + +@@ -70,7 +70,7 @@ extern int ddebug_remove_module(char *mo + DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT }; \ + if (__dynamic_dbg_enabled(descriptor)) \ + dev_printk(KERN_DEBUG, dev, \ +- KBUILD_MODNAME ": " fmt, \ ++ KBUILD_MODNAME ": " pr_fmt(fmt),\ + ##__VA_ARGS__); \ + } while (0) + +--- a/include/linux/kernel.h ++++ b/include/linux/kernel.h +@@ -359,8 +359,9 @@ static inline char *pack_hex_byte(char * + #define pr_debug(fmt, ...) \ + printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) + #elif defined(CONFIG_DYNAMIC_DEBUG) ++/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ + #define pr_debug(fmt, ...) do { \ +- dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \ ++ dynamic_pr_debug(fmt, ##__VA_ARGS__); \ + } while (0) + #else + #define pr_debug(fmt, ...) \ @@ -16,11 +16,19 @@ gregkh.pre/detect-atomic-counter-underflows.patch # USB patches for 2.6.29 ################################# usb.current/usb-usbtmc-fix-stupid-bug-in-open.patch +usb.current/usb-usbtmc-add-protocol-1-support.patch usb.current/usb-usbfs-keep-async-urbs-until-the-device-file-is-closed.patch usb.current/usb-serial-add-ftdi-usb-serial-converter-devices.patch usb.current/usb-serial-ftdi-enable-uart-detection-on-gnice-jtag-adaptors-blacklist-interface0.patch usb.current/usb-serial-new-cp2101-device-id.patch usb.current/usb-unusual_devs-add-support-for-gi-0431-sd-card-interface.patch +usb.current/usb-atm-cxacru-fix-lock-imbalance.patch +usb.current/usb-image-mdc800-fix-lock-imbalance.patch +usb.current/usb-misc-adutux-fix-lock-imbalance.patch +usb.current/usb-misc-vstusb-fix-lock-imbalance.patch +usb.current/usb-wusbcore-wa-xfer-fix-lock-imbalance.patch +usb.current/usb-option.c-add-zte-622-modem-device.patch + ##################################################################### # Stuff to be merged after 2.6.29 is out @@ -89,11 +97,15 @@ driver-core/driver-core-move-knode_bus-into-private-structure.patch driver-core/sysfs-don-t-block-indefinitely-for-unmapped-files.patch driver-core/driver-core-move-platform_data-into-platform_device.patch driver-core/vcs-hook-sysfs-devices-into-object-lifetime-instead-of-binding.patch +driver-core/driver-core-implement-uevent-suppress-in-kobject.patch +driver-core/driver-core-some-cleanup-on-drivers-base-sys.c.patch +driver-core/driver-core-fix-device_move-vs.-dpm-list-ordering-v2.patch # dynamic debug rework driver-core/dynamic-debug-combine-dprintk-and-dynamic-printk.patch driver-core/dynamic-debug-update-docs.patch driver-core/dynamic-debug-allow-simple-quoting-of-words.patch +driver-core/dynamic-debug-fix-pr_fmt-build-error.patch # helper tools, not for mainline. driver-core/warn-when-statically-allocated-kobjects-are-used.patch @@ -179,6 +191,13 @@ usb/usb-use-kzfree.patch usb/usb-cp2101-support-an205-baud-rates.patch usb/usb-cp2101-reduce-error-logging.patch usb/usb-serial-rename-cp2101-driver-to-cp210x.patch +usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch +usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch +usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch +usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch +usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch +usb/usb-s3c-move-usb-control.h-to-platform-include.patch +usb/usb-ipaq-handle-4-endpoint-devices.patch # stuff I want in my tree, but not to go into -next @@ -241,6 +260,9 @@ staging/staging-w35und-kill-wbdebug-and-remove-common.h-header-file.patch staging/staging-w35und-typedef-removal.patch staging/staging-w35und-remove-hw_data_t-typedef.patch staging/staging-w35und-remove-mto_func_input-macro-obfuscation.patch +staging/staging-w35und-remove-unused-bssdscpt.h-header.patch +staging/staging-w35und-remove-ds_tkip.h-header.patch +staging/staging-w35und-remove-gl_80211.h-header.patch staging/staging-wlan-ng-remove-use-of-__wlan_attrib_pack__.patch staging/staging-wlan-ng-remove-use-of-wlan_addr_len.patch @@ -359,6 +381,8 @@ staging/staging-rt2860-remove-kernel-version-compatibility-wrappers.patch staging/staging-rt2860-fix-printk-format-warnings.patch staging/staging-rt2860-ported-v1.7.1.1-changes-into-v1.8.0.0-becoming-v1.8.1.1.patch +staging/staging-rt2870-add-linksys-wusb600n-device-id.patch + staging/staging-slicoss-use-request_firmware.patch staging/staging-slicoss-remove-the-static-firmware-header-files.patch staging/staging-slicoss-add-binary-firmware-to-firmware-directory.patch @@ -623,4 +647,6 @@ staging/staging-line6-fix-checkpatch-errors-in-pcm.c.patch staging/staging-line6-fix-checkpatch-errors-in-toneport.c.patch staging/staging-line6-fix-checkpatch-errors-in-variax.c.patch +staging/staging-irq-remove-irqf_disabled.patch +staging/staging-remove-some-pointless-conditionals-before-kfree_skb.patch diff --git a/staging/staging-irq-remove-irqf_disabled.patch b/staging/staging-irq-remove-irqf_disabled.patch new file mode 100644 index 00000000000000..abff36d9dadb1f --- /dev/null +++ b/staging/staging-irq-remove-irqf_disabled.patch @@ -0,0 +1,210 @@ +From peterz@infradead.org Wed Mar 11 13:30:19 2009 +From: Peter Zijlstra <peterz@infradead.org> +Date: Mon, 02 Mar 2009 13:21:17 +0100 +Subject: Staging: irq: remove IRQF_DISABLED +Message-ID: <1235996477.5330.174.camel@laptop> + + +People are playing odd games with IRQF_DISABLED, remove it. + +Its not reliable, since shared interrupt lines could disable it for you, +and its possible and allowed for archs to disable IRQs to limit IRQ nesting. + +Therefore, simply mandate that _ALL_ IRQ handlers are run with IRQs disabled. + +[ This _should_ not break anything, since we've mandated that IRQ handlers + _must_ be able to deal with this for a _long_ time ] + +IRQ handlers should be fast, no if buts and any other exceptions. We also have +plenty instrumentation to find any offending IRQ latency sources. + +Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> +Acked-by: Ingo Molnar <mingo@elte.hu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/me4000/me4000.c | 6 +++--- + drivers/staging/meilhaus/me0600_ext_irq.c | 6 +----- + drivers/staging/meilhaus/me1400_ext_irq.c | 6 +----- + drivers/staging/meilhaus/me4600_ai.c | 6 +----- + drivers/staging/meilhaus/me4600_ao.c | 6 +----- + drivers/staging/meilhaus/me4600_ext_irq.c | 6 +----- + drivers/staging/meilhaus/me6000_ao.c | 6 +----- + drivers/staging/meilhaus/me8100_di.c | 6 +----- + drivers/staging/meilhaus/me8200_di.c | 12 ++---------- + drivers/staging/meilhaus/me8200_do.c | 6 +----- + 10 files changed, 13 insertions(+), 53 deletions(-) + +--- a/drivers/staging/me4000/me4000.c ++++ b/drivers/staging/me4000/me4000.c +@@ -842,7 +842,7 @@ static int alloc_ao_contexts(struct me40 + /* Request the interrupt line */ + err = + request_irq(ao_context->irq, me4000_ao_isr, +- IRQF_DISABLED | IRQF_SHARED, ++ IRQF_SHARED, + ME4000_NAME, ao_context); + if (err) { + printk(KERN_ERR +@@ -1555,7 +1555,7 @@ static int me4000_open(struct inode *ino + /* Request the interrupt line */ + err = + request_irq(ext_int_context->irq, me4000_ext_int_isr, +- IRQF_DISABLED | IRQF_SHARED, ME4000_NAME, ++ IRQF_SHARED, ME4000_NAME, + ext_int_context); + if (err) { + printk(KERN_ERR +@@ -3032,7 +3032,7 @@ static int me4000_ai_prepare(struct me40 + /* Request the interrupt line */ + err = + request_irq(ai_context->irq, me4000_ai_isr, +- IRQF_DISABLED | IRQF_SHARED, ME4000_NAME, ++ IRQF_SHARED, ME4000_NAME, + ai_context); + if (err) { + printk(KERN_ERR +--- a/drivers/staging/meilhaus/me0600_ext_irq.c ++++ b/drivers/staging/meilhaus/me0600_ext_irq.c +@@ -438,11 +438,7 @@ me0600_ext_irq_subdevice_t *me0600_ext_i + subdevice->irq = irq; + + err = request_irq(subdevice->irq, me0600_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME0600_NAME, (void *)subdevice); + + if (err) { +--- a/drivers/staging/meilhaus/me1400_ext_irq.c ++++ b/drivers/staging/meilhaus/me1400_ext_irq.c +@@ -463,11 +463,7 @@ me1400_ext_irq_subdevice_t *me1400_ext_i + subdevice->irq = irq; + + err = request_irq(irq, me1400_ext_irq_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME1400_NAME, (void *)subdevice); + + if (err) { +--- a/drivers/staging/meilhaus/me4600_ai.c ++++ b/drivers/staging/meilhaus/me4600_ai.c +@@ -307,11 +307,7 @@ me4600_ai_subdevice_t *me4600_ai_constru + // Register interrupt service routine. + subdevice->irq = irq; + if (request_irq(subdevice->irq, me4600_ai_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME4600_NAME, subdevice)) { + PERROR("Cannot register interrupt service routine.\n"); + me_subdevice_deinit((me_subdevice_t *) subdevice); +--- a/drivers/staging/meilhaus/me4600_ao.c ++++ b/drivers/staging/meilhaus/me4600_ao.c +@@ -2581,11 +2581,7 @@ me4600_ao_subdevice_t *me4600_ao_constru + if (subdevice->fifo) { + subdevice->irq = irq; + if (request_irq(subdevice->irq, me4600_ao_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME4600_NAME, subdevice)) { + PERROR("Cannot get interrupt line.\n"); + PDEBUG("free circ_buf = %p size=%d", +--- a/drivers/staging/meilhaus/me4600_ext_irq.c ++++ b/drivers/staging/meilhaus/me4600_ext_irq.c +@@ -425,11 +425,7 @@ me4600_ext_irq_subdevice_t *me4600_ext_i + subdevice->irq = irq; + + if (request_irq(subdevice->irq, me4600_ext_irq_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME4600_NAME, subdevice)) { + PERROR("Cannot register interrupt.\n"); + kfree(subdevice); +--- a/drivers/staging/meilhaus/me6000_ao.c ++++ b/drivers/staging/meilhaus/me6000_ao.c +@@ -2639,11 +2639,7 @@ me6000_ao_subdevice_t *me6000_ao_constru + if (subdevice->fifo & ME6000_AO_HAS_FIFO) { + subdevice->irq = irq; + if (request_irq(subdevice->irq, me6000_ao_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME6000_NAME, subdevice)) { + PERROR("Cannot get interrupt line.\n"); + PDEBUG("free circ_buf = %p size=%d", +--- a/drivers/staging/meilhaus/me8100_di.c ++++ b/drivers/staging/meilhaus/me8100_di.c +@@ -637,11 +637,7 @@ me8100_di_subdevice_t *me8100_di_constru + /* Register interrupt service routine. */ + subdevice->irq = irq; + err = request_irq(subdevice->irq, me8100_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME8100_NAME, (void *)subdevice); + + if (err) { +--- a/drivers/staging/meilhaus/me8200_di.c ++++ b/drivers/staging/meilhaus/me8200_di.c +@@ -817,19 +817,11 @@ me8200_di_subdevice_t *me8200_di_constru + subdevice->irq = irq; + if (subdevice->version > 0) { // NEW + err = request_irq(subdevice->irq, me8200_isr_EX, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME8200_NAME, (void *)subdevice); + } else { //OLD + err = request_irq(subdevice->irq, me8200_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME8200_NAME, (void *)subdevice); + } + +--- a/drivers/staging/meilhaus/me8200_do.c ++++ b/drivers/staging/meilhaus/me8200_do.c +@@ -560,11 +560,7 @@ me8200_do_subdevice_t *me8200_do_constru + + /* Request the interrupt line */ + err = request_irq(irq, me8200_do_isr, +-#ifdef IRQF_DISABLED +- IRQF_DISABLED | IRQF_SHARED, +-#else +- SA_INTERRUPT | SA_SHIRQ, +-#endif ++ IRQF_SHARED, + ME8200_NAME, (void *)subdevice); + + if (err) { diff --git a/staging/staging-remove-some-pointless-conditionals-before-kfree_skb.patch b/staging/staging-remove-some-pointless-conditionals-before-kfree_skb.patch new file mode 100644 index 00000000000000..1eed49583218e4 --- /dev/null +++ b/staging/staging-remove-some-pointless-conditionals-before-kfree_skb.patch @@ -0,0 +1,42 @@ +From yjwei@cn.fujitsu.com Wed Mar 11 13:27:24 2009 +From: Wei Yongjun <yjwei@cn.fujitsu.com> +Date: Wed, 25 Feb 2009 18:26:33 +0800 +Subject: Staging: remove some pointless conditionals before kfree_skb() +To: Greg Kroah-Hartman <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org> +Message-ID: <49A51CD9.4060408@cn.fujitsu.com> + + +Remove some pointless conditionals before kfree_skb(). + +Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/at76_usb/at76_usb.c | 3 +-- + drivers/staging/otus/wwrap.c | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +--- a/drivers/staging/at76_usb/at76_usb.c ++++ b/drivers/staging/at76_usb/at76_usb.c +@@ -5370,8 +5370,7 @@ static void at76_delete_device(struct at + + at76_dbg(DBG_PROC_ENTRY, "%s: unlinked urbs", __func__); + +- if (priv->rx_skb) +- kfree_skb(priv->rx_skb); ++ kfree_skb(priv->rx_skb); + + at76_free_bss_list(priv); + del_timer_sync(&priv->bss_list_timer); +--- a/drivers/staging/otus/wwrap.c ++++ b/drivers/staging/otus/wwrap.c +@@ -971,8 +971,7 @@ int zfLnxCencSendMsg(struct sock *netlin + out: + return ret; + nlmsg_failure: /*NLMSG_PUT ʧ�ܣ��������ֻ���*/ +- if(skb) +- kfree_skb(skb); ++ kfree_skb(skb); + goto out; + + #undef COMMTYPE_GROUP diff --git a/staging/staging-rt2870-add-linksys-wusb600n-device-id.patch b/staging/staging-rt2870-add-linksys-wusb600n-device-id.patch new file mode 100644 index 00000000000000..2771c4903dc8a2 --- /dev/null +++ b/staging/staging-rt2870-add-linksys-wusb600n-device-id.patch @@ -0,0 +1,27 @@ +From josef.jiru@esk.fraunhofer.de Wed Mar 11 13:54:57 2009 +From: "Josef Jiru" <josef.jiru@esk.fraunhofer.de> +Date: Wed, 11 Mar 2009 15:50:48 +0100 +Subject: Staging: rt2870: add Linksys WUSB600N device id +To: "Greg KH" <gregkh@suse.de> +Message-ID: <EAFC716668964A48A4B97DD4703A4E604D742D@mara.esk.fraunhofer.de> + + +Updated usb device list to support Linksys WUSB600N wireless adapter + +Signed-off-by: Josef Jiru <josef.jiru@gmx.net> + + +--- + drivers/staging/rt2870/rt2870.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/staging/rt2870/rt2870.h ++++ b/drivers/staging/rt2870/rt2870.h +@@ -86,6 +86,7 @@ + #define RT2870_USB_DEVICES \ + { \ + {USB_DEVICE(0x148F,0x2770)}, /* Ralink */ \ ++ {USB_DEVICE(0x1737,0x0071)}, /* Linksys WUSB600N */ \ + {USB_DEVICE(0x148F,0x2870)}, /* Ralink */ \ + {USB_DEVICE(0x148F,0x3070)}, /* Ralink */ \ + {USB_DEVICE(0x0B05,0x1731)}, /* Asus */ \ diff --git a/staging/staging-w35und-remove-ds_tkip.h-header.patch b/staging/staging-w35und-remove-ds_tkip.h-header.patch new file mode 100644 index 00000000000000..ac5a3538180151 --- /dev/null +++ b/staging/staging-w35und-remove-ds_tkip.h-header.patch @@ -0,0 +1,89 @@ +From penberg@cs.helsinki.fi Wed Mar 11 13:34:41 2009 +From: Pekka Enberg <penberg@cs.helsinki.fi> +Date: Mon, 2 Mar 2009 12:19:57 +0200 +Subject: Staging: w35und: remove ds_tkip.h header +To: greg@kroah.com +Cc: Pavel Machek <pavel@ucw.cz> +Message-ID: <1235989197-18385-2-git-send-email-penberg@cs.helsinki.fi> + + +The ds_tkip.h header file contains declarations of a function that is not +actually defined anywhere. + +Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> +Acked-by: Pavel Machek <pavel@ucw.cz> + +--- + drivers/staging/winbond/ds_tkip.h | 37 ------------------------------------- + drivers/staging/winbond/mds.c | 9 +-------- + 2 files changed, 1 insertion(+), 45 deletions(-) + +--- a/drivers/staging/winbond/ds_tkip.h ++++ /dev/null +@@ -1,37 +0,0 @@ +-#ifndef __WINBOND_DS_TKIP_H +-#define __WINBOND_DS_TKIP_H +- +-#include <linux/types.h> +- +-// Rotation functions on 32 bit values +-#define ROL32( A, n ) \ +- ( ((A) << (n)) | ( ((A)>>(32-(n))) & ( (1UL << (n)) - 1 ) ) ) +- +-#define ROR32( A, n ) ROL32( (A), 32-(n) ) +- +- +-typedef struct tkip +-{ +- u32 K0, K1; // Key +- union +- { +- struct // Current state +- { +- u32 L; +- u32 R; +- }; +- u8 LR[8]; +- }; +- union +- { +- u32 M; // Message accumulator (single word) +- u8 Mb[4]; +- }; +- s32 bytes_in_M; // # bytes in M +-} tkip_t; +- +-//void _append_data( u8 *pData, u16 size, tkip_t *p ); +-void Mds_MicGet( void* adapter, void* pRxLayer1, u8 *pKey, u8 *pMic ); +-void Mds_MicFill( void* adapter, void* pDes, u8 *XmitBufAddress ); +- +-#endif +--- a/drivers/staging/winbond/mds.c ++++ b/drivers/staging/winbond/mds.c +@@ -1,4 +1,3 @@ +-#include "ds_tkip.h" + #include "gl_80211.h" + #include "mds_f.h" + #include "mlmetxrx_f.h" +@@ -425,7 +424,7 @@ Mds_Tx(struct wbsoft_priv * adapter) + u8 *XmitBufAddress; + u16 XmitBufSize, PacketSize, stmp, CurrentSize, FragmentThreshold; + u8 FillIndex, TxDesIndex, FragmentCount, FillCount; +- unsigned char BufferFilled = false, MICAdd = 0; ++ unsigned char BufferFilled = false; + + + if (pMds->TxPause) +@@ -499,12 +498,6 @@ Mds_Tx(struct wbsoft_priv * adapter) + // Set RTS/CTS and Normal duration field into buffer + Mds_DurationSet(adapter, pTxDes, XmitBufAddress); + +- // +- // Calculation MIC from buffer which maybe fragment, then fill into temporary address 8 byte +- // 931130.5.e +- if (MICAdd) +- Mds_MicFill( adapter, pTxDes, XmitBufAddress ); +- + //Shift to the next address + XmitBufSize += CurrentSize; + XmitBufAddress += CurrentSize; diff --git a/staging/staging-w35und-remove-gl_80211.h-header.patch b/staging/staging-w35und-remove-gl_80211.h-header.patch new file mode 100644 index 00000000000000..00d232bd06f2d3 --- /dev/null +++ b/staging/staging-w35und-remove-gl_80211.h-header.patch @@ -0,0 +1,186 @@ +From penberg@cs.helsinki.fi Wed Mar 11 13:38:37 2009 +From: Pekka Enberg <penberg@cs.helsinki.fi> +Date: Mon, 02 Mar 2009 12:30:16 +0200 +Subject: Staging: w35und: remove gl_80211.h header +To: Greg KH <greg@kroah.com> +Cc: Pavel Machek <pavel@ucw.cz> +Message-ID: <1235989816.18284.72.camel@penberg-laptop> + + +From: Pekka Enberg <penberg@cs.helsinki.fi> + +The gl_80211.h header file contains only two definitions that are actually +used. Move them to mds_s.h and remove the otherwise unused file. + +Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> +Cc: Pavel Machek <pavel@ucw.cz> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/winbond/gl_80211.h | 126 ------------------------------------- + drivers/staging/winbond/mds.c | 1 + drivers/staging/winbond/mds_s.h | 6 + + drivers/staging/winbond/mto.c | 1 + 4 files changed, 6 insertions(+), 128 deletions(-) + +--- a/drivers/staging/winbond/gl_80211.h ++++ /dev/null +@@ -1,126 +0,0 @@ +-#ifndef __GL_80211_H__ +-#define __GL_80211_H__ +- +-#include <linux/types.h> +- +-/****************** CONSTANT AND MACRO SECTION ******************************/ +- +-/* BSS Type */ +-enum { +- WLAN_BSSTYPE_INFRASTRUCTURE = 0, +- WLAN_BSSTYPE_INDEPENDENT, +- WLAN_BSSTYPE_ANY_BSS, +-}; +- +- +- +-/* Preamble_Type, see <SFS-802.11G-MIB-203> */ +-typedef enum preamble_type { +- WLAN_PREAMBLE_TYPE_SHORT, +- WLAN_PREAMBLE_TYPE_LONG, +-} preamble_type_e; +- +- +-/* Slot_Time_Type, see <SFS-802.11G-MIB-208> */ +-typedef enum slot_time_type { +- WLAN_SLOT_TIME_TYPE_LONG, +- WLAN_SLOT_TIME_TYPE_SHORT, +-} slot_time_type_e; +- +-/*--------------------------------------------------------------------------*/ +-/* Encryption Mode */ +-typedef enum { +- WEP_DISABLE = 0, +- WEP_64, +- WEP_128, +- +- ENCRYPT_DISABLE, +- ENCRYPT_WEP, +- ENCRYPT_WEP_NOKEY, +- ENCRYPT_TKIP, +- ENCRYPT_TKIP_NOKEY, +- ENCRYPT_CCMP, +- ENCRYPT_CCMP_NOKEY, +-} encryption_mode_e; +- +-typedef enum _WLAN_RADIO { +- WLAN_RADIO_ON, +- WLAN_RADIO_OFF, +- WLAN_RADIO_MAX, // not a real type, defined as an upper bound +-} WLAN_RADIO; +- +-typedef struct _WLAN_RADIO_STATUS { +- WLAN_RADIO HWStatus; +- WLAN_RADIO SWStatus; +-} WLAN_RADIO_STATUS; +- +-//---------------------------------------------------------------------------- +-// 20041021 1.1.81.1000 ybjiang +-// add for radio notification +-typedef +-void (*RADIO_NOTIFICATION_HANDLER)( +- void *Data, +- void *RadioStatusBuffer, +- u32 RadioStatusBufferLen +- ); +- +-typedef struct _WLAN_RADIO_NOTIFICATION +-{ +- RADIO_NOTIFICATION_HANDLER RadioChangeHandler; +- void *Data; +-} WLAN_RADIO_NOTIFICATION; +- +-//---------------------------------------------------------------------------- +-// 20041102 1.1.91.1000 ybjiang +-// add for OID_802_11_CUST_REGION_CAPABILITIES and OID_802_11_OID_REGION +-typedef enum _WLAN_REGION_CODE +-{ +- WLAN_REGION_UNKNOWN, +- WLAN_REGION_EUROPE, +- WLAN_REGION_JAPAN, +- WLAN_REGION_USA, +- WLAN_REGION_FRANCE, +- WLAN_REGION_SPAIN, +- WLAN_REGION_ISRAEL, +- WLAN_REGION_MAX, // not a real type, defined as an upper bound +-} WLAN_REGION_CODE; +- +-#define REGION_NAME_MAX_LENGTH 256 +- +-typedef struct _WLAN_REGION_CHANNELS +-{ +- u32 Length; +- u32 NameLength; +- u8 Name[REGION_NAME_MAX_LENGTH]; +- WLAN_REGION_CODE Code; +- u32 Frequency[1]; +-} WLAN_REGION_CHANNELS; +- +-typedef struct _WLAN_REGION_CAPABILITIES +-{ +- u32 NumberOfItems; +- WLAN_REGION_CHANNELS Region[1]; +-} WLAN_REGION_CAPABILITIES; +- +-typedef struct _region_name_map { +- WLAN_REGION_CODE region; +- u8 *name; +- u32 *channels; +-} region_name_map; +- +-/*--------------------------------------------------------------------------*/ +-#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] +-#define MACSTR "%02X:%02X:%02X:%02X:%02X:%02X" +- +-// TODO: 0627 kevin +-#define MIC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5], (a)[6], (a)[7] +-#define MICSTR "%02X %02X %02X %02X %02X %02X %02X %02X" +- +-#define MICKEY2STR(a) MIC2STR(a) +-#define MICKEYSTR MICSTR +- +- +-#endif /* __GL_80211_H__ */ +-/*** end of file ***/ +- +- +--- a/drivers/staging/winbond/mds.c ++++ b/drivers/staging/winbond/mds.c +@@ -1,4 +1,3 @@ +-#include "gl_80211.h" + #include "mds_f.h" + #include "mlmetxrx_f.h" + #include "mto.h" +--- a/drivers/staging/winbond/mds_s.h ++++ b/drivers/staging/winbond/mds_s.h +@@ -9,6 +9,12 @@ + #include "mac_structures.h" + #include "scan_s.h" + ++/* Preamble_Type, see <SFS-802.11G-MIB-203> */ ++enum { ++ WLAN_PREAMBLE_TYPE_SHORT, ++ WLAN_PREAMBLE_TYPE_LONG, ++}; ++ + //////////////////////////////////////////////////////////////////////////////////////////////////////// + #define MAX_USB_TX_DESCRIPTOR 15 // IS89C35 ability + #define MAX_USB_TX_BUFFER_NUMBER 4 // Virtual pre-buffer number of MAX_USB_TX_BUFFER +--- a/drivers/staging/winbond/mto.c ++++ b/drivers/staging/winbond/mto.c +@@ -24,7 +24,6 @@ + // LA20040210_DTO kevin + #include "sysdef.h" + #include "sme_api.h" +-#include "gl_80211.h" + #include "wbhal_f.h" + + // Declare SQ3 to rate and fragmentation threshold table diff --git a/staging/staging-w35und-remove-unused-bssdscpt.h-header.patch b/staging/staging-w35und-remove-unused-bssdscpt.h-header.patch new file mode 100644 index 00000000000000..95baa71b7e6418 --- /dev/null +++ b/staging/staging-w35und-remove-unused-bssdscpt.h-header.patch @@ -0,0 +1,248 @@ +From penberg@cs.helsinki.fi Wed Mar 11 13:33:27 2009 +From: Pekka Enberg <penberg@cs.helsinki.fi> +Date: Mon, 2 Mar 2009 12:19:56 +0200 +Subject: Staging: w35und: remove unused bssdscpt.h header +To: greg@kroah.com +Cc: Pavel Machek <pavel@ucw.cz> +Message-ID: <1235989197-18385-1-git-send-email-penberg@cs.helsinki.fi> + + +The bssdscpt.h header file contains definitions that are not actually used for +anything. + +Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> +Acked-by: Pavel Machek <pavel@ucw.cz> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/winbond/bssdscpt.h | 164 ------------------------------------- + drivers/staging/winbond/core.h | 3 + drivers/staging/winbond/mds_s.h | 18 ---- + drivers/staging/winbond/mto.h | 1 + 4 files changed, 1 insertion(+), 185 deletions(-) + +--- a/drivers/staging/winbond/bssdscpt.h ++++ /dev/null +@@ -1,164 +0,0 @@ +-#ifndef __WINBOND_BSSDSCPT_H +-#define __WINBOND_BSSDSCPT_H +- +-#include <linux/types.h> +- +-#include "mds_s.h" +-#include "mlme_s.h" +- +-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +-// bssdscpt.c +-// BSS descriptor data base +-// history : +-// +-// Description: +-// BSS descriptor data base will store the information of the stations at the +-// surrounding environment. The first entry( psBSS(0) ) will not be used and the +-// second one( psBSS(1) ) will be used for the broadcast address. +-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +- +-//#define MAX_ACC_RSSI_COUNT 10 +-#define MAX_ACC_RSSI_COUNT 6 +- +-/////////////////////////////////////////////////////////////////////////// +-// +-// BSS Description set Element , to store scan received Beacon information +-// +-// Our's differs slightly from the specs. The specify a PHY_Parameter_Set. +-// Since we're only doing a DS design right now, we just have a DS structure. +-////////////////////////////////////////////////////////////////////////////// +-typedef struct BSSDescriptionElement +-{ +- u32 SlotValid; +- u32 PowerSaveMode; +- RXLAYER1 RxLayer1; +- +- u8 abPeerAddress[ MAC_ADDR_LENGTH + 2 ]; // peer MAC Address associated with this session. 6-OCTET value +- u32 dwBgScanStamp; // BgScan Sequence Counter stamp, record psROAM->dwScanCounter. +- +- u16 Beacon_Period; +- u16 wATIM_Window; +- +- u8 abBssID[ MAC_ADDR_LENGTH + 2 ]; // 6B +- +- u8 bBssType; +- u8 DTIM_Period; // 1 octet usually from TIM element, if present +- u8 boInTimerHandler; +- u8 boERP; // analysis ERP or (extended) supported rate element +- +- u8 Timestamp[8]; +- u8 BasicRate[32]; +- u8 OperationalRate[32]; +- u32 dwBasicRateBitmap; //bit map, retrieve from SupportedRateSet +- u32 dwOperationalRateBitmap; //bit map, retrieve from SupportedRateSet and +- // ExtendedSupportedRateSet +- // For RSSI calculating +- u32 HalRssi[MAX_ACC_RSSI_COUNT]; // Encode. It must use MACRO of HAL to get the LNA and AGC data +- u32 HalRssiIndex; +- +- ////From beacon/probe response +- struct SSID_Element SSID; // 34B +- u8 reserved_1[ 2 ]; +- +- struct Capability_Information_Element CapabilityInformation; // 2B +- u8 reserved_2[ 2 ]; +- +- struct CF_Parameter_Set_Element CF_Parameter_Set; // 8B +- struct IBSS_Parameter_Set_Element IBSS_Parameter_Set; // 4B +- struct TIM_Element TIM_Element_Set; // 256B +- +- struct DS_Parameter_Set_Element DS_Parameter_Set; // 3B +- u8 reserved_3; +- +- struct ERP_Information_Element ERP_Information_Set; // 3B +- u8 reserved_4; +- +- struct Supported_Rates_Element SupportedRateSet; // 10B +- u8 reserved_5[2]; +- +- struct Extended_Supported_Rates_Element ExtendedSupportedRateSet; // 257B +- u8 reserved_6[3]; +- +- u8 band; +- u8 reserved_7[3]; +- +- // for MLME module +- u16 wState; // the current state of the system +- u16 wIndex; // THIS BSS element entry index +- +- void* psadapter; // pointer to THIS adapter +- struct timer_list timer; // MLME timer +- +- // Authentication +- u16 wAuthAlgo; // peer MAC MLME use Auth algorithm, default OPEN_AUTH +- u16 wAuthSeqNum; // current local MAC sendout AuthReq sequence number +- +- u8 auth_challengeText[128]; +- +- ////For XP: +- u32 ies_len; // information element length +- u8 ies[256]; // information element +- +- ////For WPA +- u8 RsnIe_Type[2]; //added by ws for distinguish WPA and WPA2 05/14/04 +- u8 RsnIe_len; +- u8 Rsn_Num; +- +- // to record the rsn cipher suites,addded by ws 09/05/04 +- SUITE_SELECTOR group_cipher; // 4B +- SUITE_SELECTOR pairwise_key_cipher_suites[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT]; +- SUITE_SELECTOR auth_key_mgt_suites[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT]; +- +- u16 pairwise_key_cipher_suite_count; +- u16 auth_key_mgt_suite_count; +- +- u8 pairwise_key_cipher_suite_selected; +- u8 auth_key_mgt_suite_selected; +- u8 reserved_8[2]; +- +- struct RSN_Capability_Element rsn_capabilities; // 2B +- u8 reserved_9[2]; +- +- //to record the rsn cipher suites for WPA2 +- #ifdef _WPA2_ +- u32 pre_auth; //added by WS for distinguish for 05/04/04 +- SUITE_SELECTOR wpa2_group_cipher; // 4B +- SUITE_SELECTOR wpa2_pairwise_key_cipher_suites[WLAN_MAX_PAIRWISE_CIPHER_SUITE_COUNT]; +- SUITE_SELECTOR wpa2_auth_key_mgt_suites[WLAN_MAX_AUTH_KEY_MGT_SUITE_LIST_COUNT]; +- +- u16 wpa2_pairwise_key_cipher_suite_count; +- u16 wpa2_auth_key_mgt_suite_count; +- +- u8 wpa2_pairwise_key_cipher_suite_selected; +- u8 wpa2_auth_key_mgt_suite_selected; +- u8 reserved_10[2]; +- +- struct RSN_Capability_Element wpa2_rsn_capabilities; // 2B +- u8 reserved_11[2]; +- #endif //endif _WPA2_ +- +- //For Replay protection +-// u8 PairwiseTSC[6]; +-// u8 GroupTSC[6]; +- +- ////For up-to-date +- u32 ScanTimeStamp; //for the decision whether the station/AP(may exist at +- //different channels) has left. It must be detected by +- //scanning. Local device may connected or disconnected. +- u32 BssTimeStamp; //Only for the decision whether the station/AP(exist in +- //the same channel, and no scanning) if local device has +- //connected successfully. +- +- // 20061108 Add for storing WPS_IE. [E id][Length][OUI][Data] +- u8 WPS_IE_Data[MAX_IE_APPEND_SIZE]; +- u16 WPS_IE_length; +- u16 WPS_IE_length_tmp; // For verify there is an WPS_IE in Beacon or probe response +- +-} WB_BSSDESCRIPTION, *PWB_BSSDESCRIPTION; +- +-#define wBSSConnectedSTA(adapter) \ +- ((u16)(adapter)->sLocalPara.wConnectedSTAindex) +- +-#define psBSS(i) (&(adapter->asBSSDescriptElement[(i)])) +- +-#endif +--- a/drivers/staging/winbond/core.h ++++ b/drivers/staging/winbond/core.h +@@ -3,7 +3,7 @@ + + #include <linux/wireless.h> + +-#include "bssdscpt.h" ++#include "mlme_s.h" + #include "wbhal_s.h" + #include "mto.h" + +@@ -15,7 +15,6 @@ struct wbsoft_priv { + u32 adapterIndex; // 20060703.4 Add for using padapterContext global adapter point + + WB_LOCALDESCRIPT sLocalPara; // Myself connected parameters +- PWB_BSSDESCRIPTION asBSSDescriptElement; + + MLME_FRAME sMlmeFrame; // connect to peerSTA parameters + +--- a/drivers/staging/winbond/mds_s.h ++++ b/drivers/staging/winbond/mds_s.h +@@ -17,26 +17,8 @@ + #define AUTH_REQUEST_PAIRWISE_ERROR 0 // _F flag setting + #define AUTH_REQUEST_GROUP_ERROR 1 // _F flag setting + +-// For variable setting +-#define CURRENT_BSS_TYPE psBSS(psLOCAL->wConnectedSTAindex)->bBssType +-#define CURRENT_WEP_MODE psSME->_dot11PrivacyInvoked +-#define CURRENT_BSSID psBSS(psLOCAL->wConnectedSTAindex)->abBssID +-#define CURRENT_DESIRED_WPA_ENABLE ((psSME->bDesiredAuthMode==WPA_AUTH)||(psSME->bDesiredAuthMode==WPAPSK_AUTH)) +-#ifdef _WPA2_ +-#define CURRENT_DESIRED_WPA2_ENABLE ((psSME->bDesiredAuthMode==WPA2_AUTH)||(psSME->bDesiredAuthMode==WPA2PSK_AUTH)) +-#endif //end def _WPA2_ +-#define CURRENT_PAIRWISE_KEY_OK psSME->pairwise_key_ok +-//[20040712 WS] +-#define CURRENT_GROUP_KEY_OK psSME->group_key_ok +-#define CURRENT_PAIRWISE_KEY psSME->tx_mic_key +-#define CURRENT_GROUP_KEY psSME->group_tx_mic_key +-#define CURRENT_ENCRYPT_STATUS psSME->encrypt_status +-#define CURRENT_WEP_ID adapter->sSmePara._dot11WEPDefaultKeyID +-#define CURRENT_CONTROL_PORT_BLOCK ( psSME->wpa_ok!=1 || (adapter->Mds.boCounterMeasureBlock==1 && (CURRENT_ENCRYPT_STATUS==ENCRYPT_TKIP)) ) + #define CURRENT_FRAGMENT_THRESHOLD (adapter->Mds.TxFragmentThreshold & ~0x1) + #define CURRENT_PREAMBLE_MODE psLOCAL->boShortPreamble?WLAN_PREAMBLE_TYPE_SHORT:WLAN_PREAMBLE_TYPE_LONG +-#define CURRENT_TX_RATE adapter->sLocalPara.CurrentTxRate +-#define CURRENT_FALL_BACK_TX_RATE adapter->sLocalPara.CurrentTxFallbackRate + #define CURRENT_TX_RATE_FOR_MNG adapter->sLocalPara.CurrentTxRateForMng + #define CURRENT_PROTECT_MECHANISM psLOCAL->boProtectMechanism + #define CURRENT_RTS_THRESHOLD adapter->Mds.TxRTSThreshold +--- a/drivers/staging/winbond/mto.h ++++ b/drivers/staging/winbond/mto.h +@@ -140,7 +140,6 @@ typedef struct _MTO_PARAMETERS + #define MTO_TXPOWER_FROM_EEPROM (adapter->sHwData.PowerIndexFromEEPROM) + #define LOCAL_ANTENNA_NO() (adapter->sLocalPara.bAntennaNo) + #define LOCAL_IS_CONNECTED() (adapter->sLocalPara.wConnectedSTAindex != 0) +-#define LOCAL_IS_IBSS_MODE() (adapter->asBSSDescriptElement[adapter->sLocalPara.wConnectedSTAindex].bBssType == IBSS_NET) + #define MTO_INITTXRATE_MODE (adapter->sHwData.SoftwareSet&0x2) //bit 1 + // 20040510 Turbo add + #define MTO_TMR_CNT() MTO_DATA().TmrCnt diff --git a/usb.current/usb-atm-cxacru-fix-lock-imbalance.patch b/usb.current/usb-atm-cxacru-fix-lock-imbalance.patch new file mode 100644 index 00000000000000..0fec4a15217854 --- /dev/null +++ b/usb.current/usb-atm-cxacru-fix-lock-imbalance.patch @@ -0,0 +1,39 @@ +From jirislaby@gmail.com Wed Mar 11 14:00:49 2009 +From: Jiri Slaby <jirislaby@gmail.com> +Date: Wed, 11 Mar 2009 21:47:36 +0100 +Subject: USB: atm/cxacru, fix lock imbalance +To: gregkh@suse.de +Cc: Jiri Slaby <jirislaby@gmail.com>, Simon Arlott <cxacru@fire.lp0.eu> +Message-ID: <1236804460-1432-1-git-send-email-jirislaby@gmail.com> + + +We do not hold mutex in one place in cxacru_cm, but unlock it on fail path. +Fix this. + +Signed-off-by: Jiri Slaby <jirislaby@gmail.com> +Cc: Simon Arlott <cxacru@fire.lp0.eu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/atm/cxacru.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/atm/cxacru.c ++++ b/drivers/usb/atm/cxacru.c +@@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data + usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", + wbuflen, rbuflen); + ret = -ENOMEM; +- goto fail; ++ goto err; + } + + mutex_lock(&instance->cm_serialize); +@@ -565,6 +565,7 @@ static int cxacru_cm(struct cxacru_data + dbg("cm %#x", cm); + fail: + mutex_unlock(&instance->cm_serialize); ++err: + return ret; + } + diff --git a/usb.current/usb-image-mdc800-fix-lock-imbalance.patch b/usb.current/usb-image-mdc800-fix-lock-imbalance.patch new file mode 100644 index 00000000000000..91aeaedb08a414 --- /dev/null +++ b/usb.current/usb-image-mdc800-fix-lock-imbalance.patch @@ -0,0 +1,29 @@ +From jirislaby@gmail.com Wed Mar 11 14:01:10 2009 +From: Jiri Slaby <jirislaby@gmail.com> +Date: Wed, 11 Mar 2009 21:47:37 +0100 +Subject: USB: image/mdc800, fix lock imbalance +To: gregkh@suse.de +Cc: Jiri Slaby <jirislaby@gmail.com>, Henning Zabel <henning@uni-paderborn.de> +Message-ID: <1236804460-1432-2-git-send-email-jirislaby@gmail.com> + + +There is an omitted unlock in mdc800_usb_probe's fail path. Add it. + +Signed-off-by: Jiri Slaby <jirislaby@gmail.com> +Cc: Henning Zabel <henning@uni-paderborn.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/image/mdc800.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/image/mdc800.c ++++ b/drivers/usb/image/mdc800.c +@@ -499,6 +499,7 @@ static int mdc800_usb_probe (struct usb_ + retval = usb_register_dev(intf, &mdc800_class); + if (retval) { + dev_err(&intf->dev, "Not able to get a minor for this device.\n"); ++ mutex_unlock(&mdc800->io_lock); + return -ENODEV; + } + diff --git a/usb.current/usb-misc-adutux-fix-lock-imbalance.patch b/usb.current/usb-misc-adutux-fix-lock-imbalance.patch new file mode 100644 index 00000000000000..8f1bdc71ef4a74 --- /dev/null +++ b/usb.current/usb-misc-adutux-fix-lock-imbalance.patch @@ -0,0 +1,41 @@ +From jirislaby@gmail.com Wed Mar 11 14:01:28 2009 +From: Jiri Slaby <jirislaby@gmail.com> +Date: Wed, 11 Mar 2009 21:47:38 +0100 +Subject: USB: misc/adutux, fix lock imbalance +To: gregkh@suse.de +Cc: Jiri Slaby <jirislaby@gmail.com> +Message-ID: <1236804460-1432-3-git-send-email-jirislaby@gmail.com> + + +Don't unlock adutux_mutex when not held. + +Signed-off-by: Jiri Slaby <jirislaby@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/misc/adutux.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/usb/misc/adutux.c ++++ b/drivers/usb/misc/adutux.c +@@ -376,7 +376,7 @@ static int adu_release(struct inode *ino + if (dev->open_count <= 0) { + dbg(1," %s : device not opened", __func__); + retval = -ENODEV; +- goto exit; ++ goto unlock; + } + + adu_release_internal(dev); +@@ -385,9 +385,9 @@ static int adu_release(struct inode *ino + if (!dev->open_count) /* ... and we're the last user */ + adu_delete(dev); + } +- +-exit: ++unlock: + mutex_unlock(&adutux_mutex); ++exit: + dbg(2," %s : leave, return value %d", __func__, retval); + return retval; + } diff --git a/usb.current/usb-misc-vstusb-fix-lock-imbalance.patch b/usb.current/usb-misc-vstusb-fix-lock-imbalance.patch new file mode 100644 index 00000000000000..a6dc8dac509ba6 --- /dev/null +++ b/usb.current/usb-misc-vstusb-fix-lock-imbalance.patch @@ -0,0 +1,29 @@ +From jirislaby@gmail.com Wed Mar 11 14:01:52 2009 +From: Jiri Slaby <jirislaby@gmail.com> +Date: Wed, 11 Mar 2009 21:47:39 +0100 +Subject: USB: misc/vstusb, fix lock imbalance +To: gregkh@suse.de +Cc: Jiri Slaby <jirislaby@gmail.com> +Message-ID: <1236804460-1432-4-git-send-email-jirislaby@gmail.com> + + +Make sure we don't leak locked vstdev->lock in vstusb_write. Unlock +properly on one fail path. + +Signed-off-by: Jiri Slaby <jirislaby@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/misc/vstusb.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/misc/vstusb.c ++++ b/drivers/usb/misc/vstusb.c +@@ -401,6 +401,7 @@ static ssize_t vstusb_write(struct file + } + + if (copy_from_user(buf, buffer, count)) { ++ mutex_unlock(&vstdev->lock); + dev_err(&dev->dev, "%s: can't copy_from_user\n", __func__); + retval = -EFAULT; + goto exit; diff --git a/usb.current/usb-option.c-add-zte-622-modem-device.patch b/usb.current/usb-option.c-add-zte-622-modem-device.patch new file mode 100644 index 00000000000000..23911ed4703303 --- /dev/null +++ b/usb.current/usb-option.c-add-zte-622-modem-device.patch @@ -0,0 +1,37 @@ +From albert.pauw@gmail.com Wed Mar 11 13:28:39 2009 +From: Albert Pauw <albert.pauw@gmail.com> +Date: Sun, 01 Mar 2009 09:37:52 +0100 +Subject: USB: option.c: add ZTE 622 modem device +To: linux-usb@vger.kernel.org +Message-ID: <49AA4960.8010903@gmail.com> + + +Please consider this small patch for the usb option-card driver. +This patch adds the ZTE 622 usb modem device. + +Signed-off-by: Albert Pauw <albert.pauw@gmail.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -288,6 +288,7 @@ static int option_send_setup(struct tty + + /* ZTE PRODUCTS */ + #define ZTE_VENDOR_ID 0x19d2 ++#define ZTE_PRODUCT_MF622 0x0001 + #define ZTE_PRODUCT_MF628 0x0015 + #define ZTE_PRODUCT_MF626 0x0031 + #define ZTE_PRODUCT_CDMA_TECH 0xfffe +@@ -510,6 +511,7 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ + { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, ++ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, diff --git a/usb.current/usb-usbtmc-add-protocol-1-support.patch b/usb.current/usb-usbtmc-add-protocol-1-support.patch new file mode 100644 index 00000000000000..f25db3b64d1a21 --- /dev/null +++ b/usb.current/usb-usbtmc-add-protocol-1-support.patch @@ -0,0 +1,28 @@ +From foo@baz Wed Mar 11 13:51:42 PDT 2009 +Date: Wed, 11 Mar 2009 13:51:42 -0700 +To: Greg KH <greg@kroah.com> +From: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: usbtmc: add protocol 1 support + +The driver already supports the 1 protocol support, so just add it to +the MODULE_DEVICE_TABLE entry so it properly picks up these devices. + +Thanks to Jouni Rynö for pointing this out. + +Reported-by: Jouni Ryno <Jouni.Ryno@fmi.fi> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/class/usbtmc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/class/usbtmc.c ++++ b/drivers/usb/class/usbtmc.c +@@ -50,6 +50,7 @@ + + static struct usb_device_id usbtmc_devices[] = { + { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, ++ { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 1), }, + { 0, } /* terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, usbtmc_devices); diff --git a/usb.current/usb-wusbcore-wa-xfer-fix-lock-imbalance.patch b/usb.current/usb-wusbcore-wa-xfer-fix-lock-imbalance.patch new file mode 100644 index 00000000000000..b8e0b4466f4c3f --- /dev/null +++ b/usb.current/usb-wusbcore-wa-xfer-fix-lock-imbalance.patch @@ -0,0 +1,33 @@ +From jirislaby@gmail.com Wed Mar 11 14:02:08 2009 +From: Jiri Slaby <jirislaby@gmail.com> +Date: Wed, 11 Mar 2009 21:47:40 +0100 +Subject: USB: wusbcore/wa-xfer, fix lock imbalance +To: gregkh@suse.de +Cc: Jiri Slaby <jirislaby@gmail.com>, Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> +Message-ID: <1236804460-1432-5-git-send-email-jirislaby@gmail.com> + + +Fix locking on one wa_urb_enqueue_b's fail path. There was omitted unlock. + +Signed-off-by: Jiri Slaby <jirislaby@gmail.com> +Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/wusbcore/wa-xfer.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/usb/wusbcore/wa-xfer.c ++++ b/drivers/usb/wusbcore/wa-xfer.c +@@ -921,8 +921,10 @@ static void wa_urb_enqueue_b(struct wa_x + result = -ENODEV; + /* FIXME: segmentation broken -- kills DWA */ + mutex_lock(&wusbhc->mutex); /* get a WUSB dev */ +- if (urb->dev == NULL) ++ if (urb->dev == NULL) { ++ mutex_unlock(&wusbhc->mutex); + goto error_dev_gone; ++ } + wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev); + if (wusb_dev == NULL) { + mutex_unlock(&wusbhc->mutex); diff --git a/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch b/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch new file mode 100644 index 00000000000000..ced37423fbc05f --- /dev/null +++ b/usb/usb-host-fix-sparse-warning-using-plain-integer-as-null-pointer.patch @@ -0,0 +1,30 @@ +From hannes@hanneseder.net Wed Mar 11 11:39:10 2009 +From: Hannes Eder <hannes@hanneseder.net> +Date: Fri, 27 Feb 2009 02:04:31 +0100 +Subject: USB: host: fix sparse warning: Using plain integer as NULL pointer +To: Greg Kroah-Hartman <gregkh@suse.de> +Message-ID: <154e089b0902261704j8dba825q59411db576a157e8@mail.gmail.com> + +From: Hannes Eder <hannes@hanneseder.net> + +Fix this sparse warning: +�drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer + +Signed-off-by: Hannes Eder <hannes@hanneseder.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/oxu210hp-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/oxu210hp-hcd.c ++++ b/drivers/usb/host/oxu210hp-hcd.c +@@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd + oxu->urb_len = 0; + + /* FIMXE */ +- hcd->self.controller->dma_mask = 0UL; ++ hcd->self.controller->dma_mask = NULL; + + if (oxu->is_otg) { + oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; diff --git a/usb/usb-ipaq-handle-4-endpoint-devices.patch b/usb/usb-ipaq-handle-4-endpoint-devices.patch new file mode 100644 index 00000000000000..54cc2108b0e6f1 --- /dev/null +++ b/usb/usb-ipaq-handle-4-endpoint-devices.patch @@ -0,0 +1,100 @@ +From mark@mpellis.org.uk Wed Mar 11 13:49:33 2009 +From: Mark Ellis <mark@mpellis.org.uk> +Date: Mon, 9 Mar 2009 22:24:29 +0000 +Subject: USB: ipaq: handle 4 endpoint devices +To: Greg KH <greg@kroah.com> +Message-ID: <1236637469.6741.21.camel@mark01> + + +From: Mark Ellis <mark@mpellis.org.uk> + +The ipaq driver currently enforces one port on all devices. This +is correct for 2 and 3 endpoint devices, but with 4 endpoint devices +meaningful communication occurs on the second pair. + +This patch allows 2 ports for 4 endpoint devices. + +Signed-off-by: Mark Ellis <mark@mpellis.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/ipaq.c | 43 +++++++++++++++++++++++++++++++++++++------ + 1 file changed, 37 insertions(+), 6 deletions(-) + +--- a/drivers/usb/serial/ipaq.c ++++ b/drivers/usb/serial/ipaq.c +@@ -78,6 +78,7 @@ static int ipaq_open(struct tty_struct + struct usb_serial_port *port, struct file *filp); + static void ipaq_close(struct tty_struct *tty, + struct usb_serial_port *port, struct file *filp); ++static int ipaq_calc_num_ports(struct usb_serial *serial); + static int ipaq_startup(struct usb_serial *serial); + static void ipaq_shutdown(struct usb_serial *serial); + static int ipaq_write(struct tty_struct *tty, struct usb_serial_port *port, +@@ -572,15 +573,10 @@ static struct usb_serial_driver ipaq_dev + .description = "PocketPC PDA", + .usb_driver = &ipaq_driver, + .id_table = ipaq_id_table, +- /* +- * some devices have an extra endpoint, which +- * must be ignored as it would make the core +- * create a second port which oopses when used +- */ +- .num_ports = 1, + .open = ipaq_open, + .close = ipaq_close, + .attach = ipaq_startup, ++ .calc_num_ports = ipaq_calc_num_ports, + .shutdown = ipaq_shutdown, + .write = ipaq_write, + .write_room = ipaq_write_room, +@@ -956,14 +952,49 @@ static void ipaq_destroy_lists(struct us + } + + ++static int ipaq_calc_num_ports(struct usb_serial *serial) ++{ ++ /* ++ * some devices have 3 endpoints, the 3rd of which ++ * must be ignored as it would make the core ++ * create a second port which oopses when used ++ */ ++ int ipaq_num_ports = 1; ++ ++ dbg("%s - numberofendpoints: %d", __FUNCTION__, ++ (int)serial->interface->cur_altsetting->desc.bNumEndpoints); ++ ++ /* ++ * a few devices have 4 endpoints, seemingly Yakuma devices, ++ * and we need the second pair, so let them have 2 ports ++ * ++ * TODO: can we drop port 1 ? ++ */ ++ if (serial->interface->cur_altsetting->desc.bNumEndpoints > 3) { ++ ipaq_num_ports = 2; ++ } ++ ++ return ipaq_num_ports; ++} ++ ++ + static int ipaq_startup(struct usb_serial *serial) + { + dbg("%s", __func__); + if (serial->dev->actconfig->desc.bConfigurationValue != 1) { ++ /* ++ * FIXME: HP iPaq rx3715, possibly others, have 1 config that ++ * is labeled as 2 ++ */ ++ + dev_err(&serial->dev->dev, "active config #%d != 1 ??\n", + serial->dev->actconfig->desc.bConfigurationValue); + return -ENODEV; + } ++ ++ dbg("%s - iPAQ module configured for %d ports", ++ __FUNCTION__, serial->num_ports); ++ + return usb_reset_configuration(serial->dev); + } + diff --git a/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch b/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch new file mode 100644 index 00000000000000..ee3e7a2e431596 --- /dev/null +++ b/usb/usb-ohci-hcd-add-arch_s3c24xx-to-the-ohci-s3c2410.c-glue.patch @@ -0,0 +1,31 @@ +From ben@simtec.co.uk Wed Mar 11 13:47:38 2009 +From: Ben Dooks <ben@simtec.co.uk> +Date: Sat, 07 Mar 2009 11:44:10 +0000 +Subject: USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue +To: linux-usb@vger.kernel.org +Cc: dbrownell@users.sourceforge.net +Message-ID: <20090307114409.944672654@fluff.org.uk> + + +The ohci-s3c2410.c glue supports both CONFIG_ARCH_S3C2410 and +CONFIG_ARCH_S3C64XX so add it to the build of ohci-s3c2410.c + +Signed-off-by: Ben Dooks <ben@simtec.co.uk> +Cc: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-hcd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -997,7 +997,7 @@ MODULE_LICENSE ("GPL"); + #define SA1111_DRIVER ohci_hcd_sa1111_driver + #endif + +-#ifdef CONFIG_ARCH_S3C2410 ++#if defined(CONFIG_ARCH_S3C2410) || defined(CONFIG_ARCH_S3C64XX) + #include "ohci-s3c2410.c" + #define PLATFORM_DRIVER ohci_hcd_s3c2410_driver + #endif diff --git a/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch b/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch new file mode 100644 index 00000000000000..2e54f39621e431 --- /dev/null +++ b/usb/usb-ohci-s3c2410-fix-name-of-bus-clock.patch @@ -0,0 +1,29 @@ +From ben@simtec.co.uk Wed Mar 11 11:38:37 2009 +From: Ben Dooks <ben@simtec.co.uk> +Date: Thu, 26 Feb 2009 23:03:15 +0000 +Subject: USB: ohci-s3c2410: fix name of bus clock +Cc: dbrownell@users.sourceforge.net +Message-ID: <20090226230314.880253822@fluff.org.uk> + + +The USB bus clock is usb-bus-host, so print the correct name in the +dev_err() statement if we cannot find it. + +Signed-off-by: Ben Dooks <ben@simtec.co.uk> +Acked-by: David Brownell <dbrownell@users.sourceforge.net> + +--- + drivers/usb/host/ohci-s3c2410.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/host/ohci-s3c2410.c ++++ b/drivers/usb/host/ohci-s3c2410.c +@@ -371,7 +371,7 @@ static int usb_hcd_s3c2410_probe (const + + usb_clk = clk_get(&dev->dev, "usb-bus-host"); + if (IS_ERR(usb_clk)) { +- dev_err(&dev->dev, "cannot get usb-host clock\n"); ++ dev_err(&dev->dev, "cannot get usb-bus-host clock\n"); + retval = -ENOENT; + goto err_clk; + } diff --git a/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch b/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch new file mode 100644 index 00000000000000..87350a13eb1ba1 --- /dev/null +++ b/usb/usb-ohci-s3c2410-remove-mach-hardware.h-include.patch @@ -0,0 +1,29 @@ +From ben@simtec.co.uk Wed Mar 11 11:37:10 2009 +From: Ben Dooks <ben@simtec.co.uk> +Date: Thu, 26 Feb 2009 23:02:19 +0000 +Subject: USB: ohci-s3c2410: remove <mach/hardware.h> include +Cc: dbrownell@users.sourceforge.net, Ben Dooks <ben-linux@fluff.org> +Message-ID: <20090226230219.040186835@fluff.org.uk> + + +Remove the include of <mach/hardware.h>, as no definitions +from it are used by the OHCI driver. + +Signed-off-by: Ben Dooks <ben-linux@fluff.org> +Acked-by: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-s3c2410.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/usb/host/ohci-s3c2410.c ++++ b/drivers/usb/host/ohci-s3c2410.c +@@ -22,7 +22,6 @@ + #include <linux/platform_device.h> + #include <linux/clk.h> + +-#include <mach/hardware.h> + #include <mach/usb-control.h> + + #define valid_port(idx) ((idx) == 1 || (idx) == 2) diff --git a/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch b/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch new file mode 100644 index 00000000000000..41a33389074024 --- /dev/null +++ b/usb/usb-pedantic-spelling-correction-in-comment-for-ch9.h.patch @@ -0,0 +1,28 @@ +From dev@capelis.dj Wed Mar 11 13:40:12 2009 +From: "D.J. Capelis" <dev@capelis.dj> +Date: Wed, 04 Mar 2009 10:27:52 -0800 +Subject: USB: pedantic: spelling correction in comment for ch9.h +To: Greg K-H <gregkh@suse.de> +Message-ID: <1236191272.19965.51.camel@aes.capelis.dj> + + +Just noticed this during a grep, figured I might as well send it in. + +From: D.J. Capelis <dev@capelis.dj> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + include/linux/usb/ch9.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/usb/ch9.h ++++ b/include/linux/usb/ch9.h +@@ -102,7 +102,7 @@ + #define USB_REQ_LOOPBACK_DATA_READ 0x16 + #define USB_REQ_SET_INTERFACE_DS 0x17 + +-/* The Link Power Mangement (LPM) ECN defines USB_REQ_TEST_AND_SET command, ++/* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command, + * used by hubs to put ports into a new L1 suspend state, except that it + * forgot to define its number ... + */ diff --git a/usb/usb-s3c-move-usb-control.h-to-platform-include.patch b/usb/usb-s3c-move-usb-control.h-to-platform-include.patch new file mode 100644 index 00000000000000..21cc3fe5056a69 --- /dev/null +++ b/usb/usb-s3c-move-usb-control.h-to-platform-include.patch @@ -0,0 +1,140 @@ +From ben@simtec.co.uk Wed Mar 11 13:48:12 2009 +From: Ben Dooks <ben@simtec.co.uk> +Date: Sat, 07 Mar 2009 11:44:21 +0000 +Subject: USB: S3C: Move usb-control.h to platform include +Cc: dbrownell@users.sourceforge.net +Message-ID: <20090307114421.098974047@fluff.org.uk> + + +The usb-control.h is needed by ohci-s3c2410.c for both S3C24XX and S3C64XX +architectures, so move it to <plat/usb-control.h> + +Signed-off-by: Ben Dooks <ben@simtec.co.uk> +Cc: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + arch/arm/mach-s3c2410/include/mach/usb-control.h | 41 ----------------------- + arch/arm/mach-s3c2410/usb-simtec.c | 3 + + arch/arm/plat-s3c/include/plat/usb-control.h | 41 +++++++++++++++++++++++ + drivers/usb/host/ohci-s3c2410.c | 3 - + 4 files changed, 44 insertions(+), 44 deletions(-) + +--- a/arch/arm/mach-s3c2410/include/mach/usb-control.h ++++ /dev/null +@@ -1,41 +0,0 @@ +-/* arch/arm/mach-s3c2410/include/mach/usb-control.h +- * +- * Copyright (c) 2004 Simtec Electronics +- * Ben Dooks <ben@simtec.co.uk> +- * +- * S3C2410 - usb port information +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +-*/ +- +-#ifndef __ASM_ARCH_USBCONTROL_H +-#define __ASM_ARCH_USBCONTROL_H "arch/arm/mach-s3c2410/include/mach/usb-control.h" +- +-#define S3C_HCDFLG_USED (1) +- +-struct s3c2410_hcd_port { +- unsigned char flags; +- unsigned char power; +- unsigned char oc_status; +- unsigned char oc_changed; +-}; +- +-struct s3c2410_hcd_info { +- struct usb_hcd *hcd; +- struct s3c2410_hcd_port port[2]; +- +- void (*power_control)(int port, int to); +- void (*enable_oc)(struct s3c2410_hcd_info *, int on); +- void (*report_oc)(struct s3c2410_hcd_info *, int ports); +-}; +- +-static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports) +-{ +- if (info->report_oc != NULL) { +- (info->report_oc)(info, ports); +- } +-} +- +-#endif /*__ASM_ARCH_USBCONTROL_H */ +--- a/arch/arm/mach-s3c2410/usb-simtec.c ++++ b/arch/arm/mach-s3c2410/usb-simtec.c +@@ -29,13 +29,14 @@ + + #include <mach/bast-map.h> + #include <mach/bast-irq.h> +-#include <mach/usb-control.h> + #include <mach/regs-gpio.h> + + #include <mach/hardware.h> + #include <asm/irq.h> + ++#include <plat/usb-control.h> + #include <plat/devs.h> ++ + #include "usb-simtec.h" + + /* control power and monitor over-current events on various Simtec +--- /dev/null ++++ b/arch/arm/plat-s3c/include/plat/usb-control.h +@@ -0,0 +1,41 @@ ++/* arch/arm/plat-s3c/include/plat/usb-control.h ++ * ++ * Copyright (c) 2004 Simtec Electronics ++ * Ben Dooks <ben@simtec.co.uk> ++ * ++ * S3C - USB host port information ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++*/ ++ ++#ifndef __ASM_ARCH_USBCONTROL_H ++#define __ASM_ARCH_USBCONTROL_H ++ ++#define S3C_HCDFLG_USED (1) ++ ++struct s3c2410_hcd_port { ++ unsigned char flags; ++ unsigned char power; ++ unsigned char oc_status; ++ unsigned char oc_changed; ++}; ++ ++struct s3c2410_hcd_info { ++ struct usb_hcd *hcd; ++ struct s3c2410_hcd_port port[2]; ++ ++ void (*power_control)(int port, int to); ++ void (*enable_oc)(struct s3c2410_hcd_info *, int on); ++ void (*report_oc)(struct s3c2410_hcd_info *, int ports); ++}; ++ ++static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int ports) ++{ ++ if (info->report_oc != NULL) { ++ (info->report_oc)(info, ports); ++ } ++} ++ ++#endif /*__ASM_ARCH_USBCONTROL_H */ +--- a/drivers/usb/host/ohci-s3c2410.c ++++ b/drivers/usb/host/ohci-s3c2410.c +@@ -21,8 +21,7 @@ + + #include <linux/platform_device.h> + #include <linux/clk.h> +- +-#include <mach/usb-control.h> ++#include <plat/usb-control.h> + + #define valid_port(idx) ((idx) == 1 || (idx) == 2) + diff --git a/usb/usb-suspend-resume-support-for-option-driver.patch b/usb/usb-suspend-resume-support-for-option-driver.patch index a262d03fd73c5e..78a17aba8b3a1d 100644 --- a/usb/usb-suspend-resume-support-for-option-driver.patch +++ b/usb/usb-suspend-resume-support-for-option-driver.patch @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Vendor and product IDs */ #define OPTION_VENDOR_ID 0x0AF0 -@@ -525,6 +527,8 @@ static struct usb_driver option_driver = +@@ -527,6 +529,8 @@ static struct usb_driver option_driver = .name = "option", .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, @@ -42,7 +42,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> .id_table = option_ids, .no_dynamic_id = 1, }; -@@ -553,6 +557,8 @@ static struct usb_serial_driver option_1 +@@ -555,6 +559,8 @@ static struct usb_serial_driver option_1 .attach = option_startup, .shutdown = option_shutdown, .read_int_callback = option_instat_callback, @@ -51,7 +51,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> }; static int debug; -@@ -823,10 +829,10 @@ static void option_instat_callback(struc +@@ -825,10 +831,10 @@ static void option_instat_callback(struc req_pkt->bRequestType, req_pkt->bRequest); } } else @@ -64,7 +64,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> urb->dev = serial->dev; err = usb_submit_urb(urb, GFP_ATOMIC); if (err) -@@ -845,7 +851,6 @@ static int option_write_room(struct tty_ +@@ -847,7 +853,6 @@ static int option_write_room(struct tty_ portdata = usb_get_serial_port_data(port); @@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> for (i = 0; i < N_OUT_URB; i++) { this_urb = portdata->out_urbs[i]; if (this_urb && !test_bit(i, &portdata->out_busy)) -@@ -1107,14 +1112,12 @@ bail_out_error: +@@ -1109,14 +1114,12 @@ bail_out_error: return 1; } @@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Stop reading/writing urbs */ for (i = 0; i < serial->num_ports; ++i) { port = serial->port[i]; -@@ -1124,6 +1127,17 @@ static void option_shutdown(struct usb_s +@@ -1126,6 +1129,17 @@ static void option_shutdown(struct usb_s for (j = 0; j < N_OUT_URB; j++) usb_kill_urb(portdata->out_urbs[j]); } @@ -106,7 +106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Now free them */ for (i = 0; i < serial->num_ports; ++i) { -@@ -1154,6 +1168,66 @@ static void option_shutdown(struct usb_s +@@ -1156,6 +1170,66 @@ static void option_shutdown(struct usb_s } } |
