diff options
6 files changed, 1039 insertions, 2 deletions
diff --git a/driver-core/driver-core-remove-config_sysfs_deprecated_v2-but-keep-it-for-block-devices.patch b/driver-core/driver-core-remove-config_sysfs_deprecated_v2-but-keep-it-for-block-devices.patch new file mode 100644 index 00000000000000..0c388c3d70d4e4 --- /dev/null +++ b/driver-core/driver-core-remove-config_sysfs_deprecated_v2-but-keep-it-for-block-devices.patch @@ -0,0 +1,578 @@ +From foo@baz Sat Sep 4 22:33:14 PDT 2010 +Date: Sat, 04 Sep 2010 22:33:14 -0700 +To: Greg KH <greg@kroah.com> +From: Kay Sievers <kay.sievers@vrfy.org> +Subject: driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices + +This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option, +but it keeps the logic around to handle block devices in the old manner +as some people like to run new kernel versions on old (pre 2007/2008) +distros. + +Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> +Cc: Jens Axboe <axboe@kernel.dk> +Cc: Stephen Hemminger <shemminger@vyatta.com> +Cc: "Eric W. Biederman" <ebiederm@xmission.com> +Cc: Alan Stern <stern@rowland.harvard.edu> +Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> +Cc: Andrew Morton <akpm@linux-foundation.org> +Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> +Cc: Randy Dunlap <randy.dunlap@oracle.com> +Cc: Tejun Heo <tj@kernel.org> +Cc: "David S. Miller" <davem@davemloft.net> +Cc: Jaroslav Kysela <perex@perex.cz> +Cc: Takashi Iwai <tiwai@suse.de> +Cc: Ingo Molnar <mingo@elte.hu> +Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> +Cc: David Howells <dhowells@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/base/bus.c | 22 ----- + drivers/base/class.c | 19 ---- + drivers/base/core.c | 194 ++++++----------------------------------------- + drivers/scsi/hosts.c | 2 + drivers/scsi/scsi_scan.c | 2 + include/sound/core.h | 6 - + init/Kconfig | 42 +++------- + sound/core/init.c | 11 -- + 8 files changed, 41 insertions(+), 257 deletions(-) + +--- a/drivers/base/bus.c ++++ b/drivers/base/bus.c +@@ -440,22 +440,6 @@ static void device_remove_attrs(struct b + } + } + +-#ifdef CONFIG_SYSFS_DEPRECATED +-static int make_deprecated_bus_links(struct device *dev) +-{ +- return sysfs_create_link(&dev->kobj, +- &dev->bus->p->subsys.kobj, "bus"); +-} +- +-static void remove_deprecated_bus_links(struct device *dev) +-{ +- sysfs_remove_link(&dev->kobj, "bus"); +-} +-#else +-static inline int make_deprecated_bus_links(struct device *dev) { return 0; } +-static inline void remove_deprecated_bus_links(struct device *dev) { } +-#endif +- + /** + * bus_add_device - add device to bus + * @dev: device being added +@@ -482,15 +466,10 @@ int bus_add_device(struct device *dev) + &dev->bus->p->subsys.kobj, "subsystem"); + if (error) + goto out_subsys; +- error = make_deprecated_bus_links(dev); +- if (error) +- goto out_deprecated; + klist_add_tail(&dev->p->knode_bus, &bus->p->klist_devices); + } + return 0; + +-out_deprecated: +- sysfs_remove_link(&dev->kobj, "subsystem"); + out_subsys: + sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); + out_id: +@@ -530,7 +509,6 @@ void bus_remove_device(struct device *de + { + if (dev->bus) { + sysfs_remove_link(&dev->kobj, "subsystem"); +- remove_deprecated_bus_links(dev); + sysfs_remove_link(&dev->bus->p->devices_kset->kobj, + dev_name(dev)); + device_remove_attrs(dev->bus, dev); +--- a/drivers/base/class.c ++++ b/drivers/base/class.c +@@ -276,25 +276,6 @@ void class_destroy(struct class *cls) + class_unregister(cls); + } + +-#ifdef CONFIG_SYSFS_DEPRECATED +-char *make_class_name(const char *name, struct kobject *kobj) +-{ +- char *class_name; +- int size; +- +- size = strlen(name) + strlen(kobject_name(kobj)) + 2; +- +- class_name = kmalloc(size, GFP_KERNEL); +- if (!class_name) +- return NULL; +- +- strcpy(class_name, name); +- strcat(class_name, ":"); +- strcat(class_name, kobject_name(kobj)); +- return class_name; +-} +-#endif +- + /** + * class_dev_iter_init - initialize class device iterator + * @iter: class iterator to initialize +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -203,37 +203,6 @@ static int dev_uevent(struct kset *kset, + if (dev->driver) + add_uevent_var(env, "DRIVER=%s", dev->driver->name); + +-#ifdef CONFIG_SYSFS_DEPRECATED +- if (dev->class) { +- struct device *parent = dev->parent; +- +- /* find first bus device in parent chain */ +- while (parent && !parent->bus) +- parent = parent->parent; +- if (parent && parent->bus) { +- const char *path; +- +- path = kobject_get_path(&parent->kobj, GFP_KERNEL); +- if (path) { +- add_uevent_var(env, "PHYSDEVPATH=%s", path); +- kfree(path); +- } +- +- add_uevent_var(env, "PHYSDEVBUS=%s", parent->bus->name); +- +- if (parent->driver) +- add_uevent_var(env, "PHYSDEVDRIVER=%s", +- parent->driver->name); +- } +- } else if (dev->bus) { +- add_uevent_var(env, "PHYSDEVBUS=%s", dev->bus->name); +- +- if (dev->driver) +- add_uevent_var(env, "PHYSDEVDRIVER=%s", +- dev->driver->name); +- } +-#endif +- + /* have the bus specific function add its stuff */ + if (dev->bus && dev->bus->uevent) { + retval = dev->bus->uevent(dev, env); +@@ -578,24 +547,6 @@ void device_initialize(struct device *de + set_dev_node(dev, -1); + } + +-#ifdef CONFIG_SYSFS_DEPRECATED +-static struct kobject *get_device_parent(struct device *dev, +- struct device *parent) +-{ +- /* class devices without a parent live in /sys/class/<classname>/ */ +- if (dev->class && (!parent || parent->class != dev->class)) +- return &dev->class->p->class_subsys.kobj; +- /* all other devices keep their parent */ +- else if (parent) +- return &parent->kobj; +- +- return NULL; +-} +- +-static inline void cleanup_device_parent(struct device *dev) {} +-static inline void cleanup_glue_dir(struct device *dev, +- struct kobject *glue_dir) {} +-#else + static struct kobject *virtual_device_parent(struct device *dev) + { + static struct kobject *virtual_dir = NULL; +@@ -666,6 +617,14 @@ static struct kobject *get_device_parent + struct kobject *parent_kobj; + struct kobject *k; + ++#ifdef CONFIG_SYSFS_DEPRECATED ++ /* block disks show up in /sys/block */ ++ if (dev->class == &block_class) { ++ if (parent && parent->class == &block_class) ++ return &parent->kobj; ++ return &block_class.p->class_subsys.kobj; ++ } ++#endif + /* + * If we have no parent, we live in "virtual". + * Class-devices with a non class-device as parent, live +@@ -719,7 +678,6 @@ static void cleanup_device_parent(struct + { + cleanup_glue_dir(dev, dev->kobj.parent); + } +-#endif + + static void setup_parent(struct device *dev, struct device *parent) + { +@@ -742,70 +700,29 @@ static int device_add_class_symlinks(str + if (error) + goto out; + +-#ifdef CONFIG_SYSFS_DEPRECATED +- /* stacked class devices need a symlink in the class directory */ +- if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && +- device_is_not_partition(dev)) { +- error = sysfs_create_link(&dev->class->p->class_subsys.kobj, +- &dev->kobj, dev_name(dev)); +- if (error) +- goto out_subsys; +- } +- + if (dev->parent && device_is_not_partition(dev)) { +- struct device *parent = dev->parent; +- char *class_name; +- +- /* +- * stacked class devices have the 'device' link +- * pointing to the bus device instead of the parent +- */ +- while (parent->class && !parent->bus && parent->parent) +- parent = parent->parent; +- +- error = sysfs_create_link(&dev->kobj, +- &parent->kobj, ++ error = sysfs_create_link(&dev->kobj, &dev->parent->kobj, + "device"); + if (error) +- goto out_busid; +- +- class_name = make_class_name(dev->class->name, +- &dev->kobj); +- if (class_name) +- error = sysfs_create_link(&dev->parent->kobj, +- &dev->kobj, class_name); +- kfree(class_name); +- if (error) +- goto out_device; ++ goto out_subsys; + } +- return 0; + +-out_device: +- if (dev->parent && device_is_not_partition(dev)) +- sysfs_remove_link(&dev->kobj, "device"); +-out_busid: +- if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && +- device_is_not_partition(dev)) +- sysfs_delete_link(&dev->class->p->class_subsys.kobj, &dev->kobj, +- dev_name(dev)); +-#else ++#ifdef CONFIG_SYSFS_DEPRECATED ++ /* /sys/block has directories and does not need symlinks */ ++ if (dev->class == &block_class) ++ return 0; ++#endif ++ + /* link in the class directory pointing to the device */ + error = sysfs_create_link(&dev->class->p->class_subsys.kobj, + &dev->kobj, dev_name(dev)); + if (error) +- goto out_subsys; ++ goto out_device; + +- if (dev->parent && device_is_not_partition(dev)) { +- error = sysfs_create_link(&dev->kobj, &dev->parent->kobj, +- "device"); +- if (error) +- goto out_busid; +- } + return 0; + +-out_busid: +- sysfs_delete_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev_name(dev)); +-#endif ++out_device: ++ sysfs_remove_link(&dev->kobj, "device"); + + out_subsys: + sysfs_remove_link(&dev->kobj, "subsystem"); +@@ -818,30 +735,14 @@ static void device_remove_class_symlinks + if (!dev->class) + return; + +-#ifdef CONFIG_SYSFS_DEPRECATED +- if (dev->parent && device_is_not_partition(dev)) { +- char *class_name; +- +- class_name = make_class_name(dev->class->name, &dev->kobj); +- if (class_name) { +- sysfs_remove_link(&dev->parent->kobj, class_name); +- kfree(class_name); +- } +- sysfs_remove_link(&dev->kobj, "device"); +- } +- +- if (dev->kobj.parent != &dev->class->p->class_subsys.kobj && +- device_is_not_partition(dev)) +- sysfs_delete_link(&dev->class->p->class_subsys.kobj, &dev->kobj, +- dev_name(dev)); +-#else + if (dev->parent && device_is_not_partition(dev)) + sysfs_remove_link(&dev->kobj, "device"); +- +- sysfs_delete_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev_name(dev)); +-#endif +- + sysfs_remove_link(&dev->kobj, "subsystem"); ++#ifdef CONFIG_SYSFS_DEPRECATED ++ if (dev->class == &block_class) ++ return; ++#endif ++ sysfs_delete_link(&dev->class->p->class_subsys.kobj, &dev->kobj, dev_name(dev)); + } + + /** +@@ -1613,41 +1514,23 @@ int device_rename(struct device *dev, co + pr_debug("device: '%s': %s: renaming to '%s'\n", dev_name(dev), + __func__, new_name); + +-#ifdef CONFIG_SYSFS_DEPRECATED +- if ((dev->class) && (dev->parent)) +- old_class_name = make_class_name(dev->class->name, &dev->kobj); +-#endif +- + old_device_name = kstrdup(dev_name(dev), GFP_KERNEL); + if (!old_device_name) { + error = -ENOMEM; + goto out; + } + +-#ifndef CONFIG_SYSFS_DEPRECATED + if (dev->class) { + error = sysfs_rename_link(&dev->class->p->class_subsys.kobj, + &dev->kobj, old_device_name, new_name); + if (error) + goto out; + } +-#endif ++ + error = kobject_rename(&dev->kobj, new_name); + if (error) + goto out; + +-#ifdef CONFIG_SYSFS_DEPRECATED +- if (old_class_name) { +- new_class_name = make_class_name(dev->class->name, &dev->kobj); +- if (new_class_name) { +- error = sysfs_rename_link(&dev->parent->kobj, +- &dev->kobj, +- old_class_name, +- new_class_name); +- } +- } +-#endif +- + out: + put_device(dev); + +@@ -1664,40 +1547,13 @@ static int device_move_class_links(struc + struct device *new_parent) + { + int error = 0; +-#ifdef CONFIG_SYSFS_DEPRECATED +- char *class_name; + +- class_name = make_class_name(dev->class->name, &dev->kobj); +- if (!class_name) { +- error = -ENOMEM; +- goto out; +- } +- if (old_parent) { +- sysfs_remove_link(&dev->kobj, "device"); +- sysfs_remove_link(&old_parent->kobj, class_name); +- } +- if (new_parent) { +- error = sysfs_create_link(&dev->kobj, &new_parent->kobj, +- "device"); +- if (error) +- goto out; +- error = sysfs_create_link(&new_parent->kobj, &dev->kobj, +- class_name); +- if (error) +- sysfs_remove_link(&dev->kobj, "device"); +- } else +- error = 0; +-out: +- kfree(class_name); +- return error; +-#else + if (old_parent) + sysfs_remove_link(&dev->kobj, "device"); + if (new_parent) + error = sysfs_create_link(&dev->kobj, &new_parent->kobj, + "device"); + return error; +-#endif + } + + /** +--- a/drivers/scsi/hosts.c ++++ b/drivers/scsi/hosts.c +@@ -411,9 +411,7 @@ struct Scsi_Host *scsi_host_alloc(struct + + device_initialize(&shost->shost_gendev); + dev_set_name(&shost->shost_gendev, "host%d", shost->host_no); +-#ifndef CONFIG_SYSFS_DEPRECATED + shost->shost_gendev.bus = &scsi_bus_type; +-#endif + shost->shost_gendev.type = &scsi_host_type; + + device_initialize(&shost->shost_dev); +--- a/drivers/scsi/scsi_scan.c ++++ b/drivers/scsi/scsi_scan.c +@@ -417,9 +417,7 @@ static struct scsi_target *scsi_alloc_ta + starget->reap_ref = 1; + dev->parent = get_device(parent); + dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id); +-#ifndef CONFIG_SYSFS_DEPRECATED + dev->bus = &scsi_bus_type; +-#endif + dev->type = &scsi_target_type; + starget->id = id; + starget->channel = channel; +--- a/include/sound/core.h ++++ b/include/sound/core.h +@@ -133,9 +133,7 @@ struct snd_card { + int free_on_last_close; /* free in context of file_release */ + wait_queue_head_t shutdown_sleep; + struct device *dev; /* device assigned to this card */ +-#ifndef CONFIG_SYSFS_DEPRECATED + struct device *card_dev; /* cardX object for sysfs */ +-#endif + + #ifdef CONFIG_PM + unsigned int power_state; /* power state */ +@@ -196,11 +194,7 @@ struct snd_minor { + /* return a device pointer linked to each sound device as a parent */ + static inline struct device *snd_card_get_device_link(struct snd_card *card) + { +-#ifdef CONFIG_SYSFS_DEPRECATED +- return card ? card->dev : NULL; +-#else + return card ? card->card_dev : NULL; +-#endif + } + + /* sound.c */ +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -656,40 +656,24 @@ config MM_OWNER + bool + + config SYSFS_DEPRECATED +- bool +- +-config SYSFS_DEPRECATED_V2 + bool "enable deprecated sysfs features to support old userspace tools" + depends on SYSFS + default n +- select SYSFS_DEPRECATED + help +- This option switches the layout of sysfs to the deprecated +- version. Do not use it on recent distributions. +- +- The current sysfs layout features a unified device tree at +- /sys/devices/, which is able to express a hierarchy between +- class devices. If the deprecated option is set to Y, the +- unified device tree is split into a bus device tree at +- /sys/devices/ and several individual class device trees at +- /sys/class/. The class and bus devices will be connected by +- "<subsystem>:<name>" and the "device" links. The "block" +- class devices, will not show up in /sys/class/block/. Some +- subsystems will suppress the creation of some devices which +- depend on the unified device tree. +- +- This option is not a pure compatibility option that can +- be safely enabled on newer distributions. It will change the +- layout of sysfs to the non-extensible deprecated version, +- and disable some features, which can not be exported without +- confusing older userspace tools. Since 2007/2008 all major +- distributions do not enable this option, and ship no tools which +- depend on the deprecated layout or this option. ++ This option switches the layout of the "block" class devices, to not ++ show up in /sys/class/block/, but only in /sys/block/. + +- If you are using a new kernel on an older distribution, or use +- older userspace tools, you might need to say Y here. Do not say Y, +- if the original kernel, that came with your distribution, has +- this option set to N. ++ This option allows new kernels to run on old distributions and tools, ++ which might get confused by /sys/class/block/. Since 2007/2008 all ++ major distributions and tools handle this just fine. ++ ++ Recent distributions and userspace tools after 2009/2010 depend on ++ the existence of /sys/class/block/, and will not work with this ++ option enabled. ++ ++ Only if you are using a new kernel on an old distribution, you might ++ need to say Y here. Never say Y, if the original kernel, that came ++ with your distribution, has not set this option. + + config RELAY + bool "Kernel->user space relay support (formerly relayfs)" +--- a/sound/core/init.c ++++ b/sound/core/init.c +@@ -395,12 +395,10 @@ int snd_card_disconnect(struct snd_card + snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number); + + snd_info_card_disconnect(card); +-#ifndef CONFIG_SYSFS_DEPRECATED + if (card->card_dev) { + device_unregister(card->card_dev); + card->card_dev = NULL; + } +-#endif + #ifdef CONFIG_PM + wake_up(&card->power_sleep); + #endif +@@ -573,7 +571,6 @@ void snd_card_set_id(struct snd_card *ca + } + EXPORT_SYMBOL(snd_card_set_id); + +-#ifndef CONFIG_SYSFS_DEPRECATED + static ssize_t + card_id_show_attr(struct device *dev, + struct device_attribute *attr, char *buf) +@@ -630,7 +627,6 @@ card_number_show_attr(struct device *dev + + static struct device_attribute card_number_attrs = + __ATTR(number, S_IRUGO, card_number_show_attr, NULL); +-#endif /* CONFIG_SYSFS_DEPRECATED */ + + /** + * snd_card_register - register the soundcard +@@ -649,7 +645,7 @@ int snd_card_register(struct snd_card *c + + if (snd_BUG_ON(!card)) + return -EINVAL; +-#ifndef CONFIG_SYSFS_DEPRECATED ++ + if (!card->card_dev) { + card->card_dev = device_create(sound_class, card->dev, + MKDEV(0, 0), card, +@@ -657,7 +653,7 @@ int snd_card_register(struct snd_card *c + if (IS_ERR(card->card_dev)) + card->card_dev = NULL; + } +-#endif ++ + if ((err = snd_device_register_all(card)) < 0) + return err; + mutex_lock(&snd_card_mutex); +@@ -674,7 +670,6 @@ int snd_card_register(struct snd_card *c + if (snd_mixer_oss_notify_callback) + snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER); + #endif +-#ifndef CONFIG_SYSFS_DEPRECATED + if (card->card_dev) { + err = device_create_file(card->card_dev, &card_id_attrs); + if (err < 0) +@@ -683,7 +678,7 @@ int snd_card_register(struct snd_card *c + if (err < 0) + return err; + } +-#endif ++ + return 0; + } + @@ -19,6 +19,9 @@ tty.current/serial-fix-port-type-conflict-between-ns16550a-u6_16550a.patch tty.current/serial-bfin_sport_uart-restore-transmit-frame-sync-fix.patch tty.current/tty-fix-tty_line-must-not-be-equal-to-number-of-allocated-tty-pointers-in-tty-driver.patch +# after patches sent to linus +tty.current/serial-amba-pl010-fix-set_ldisc.patch + ################################# # USB patches for 2.6.36 @@ -59,6 +62,9 @@ staging.current/staging-spectra-depend-on-x86_mrst.patch staging.current/staging-octeon-depends-on-netdevices.patch staging.current/staging-wlan-ng-explicitly-set-some-fields-in-cfg80211-interface.patch +# after patches sent to linus +staging.current/revert-staging-batman-adv-adding-netfilter-bridge-hooks.patch + ##################################################################### # Stuff to be merged after 2.6.36 is out @@ -77,8 +83,8 @@ driver-core/driver-core-platform_bus-allow-runtime-override-of-dev_pm_ops.patch driver-core/add-packet-hub-driver-for-topcliff-platform-controller-hub.patch driver-core/pch_phub-fix-build-warnings.patch -# can we really drop it? (nope, not yet...) -#driver-core/driver-core-remove-config_sysfs_deprecated.patch +# can we really almost drop it? please let it happen this time... +driver-core/driver-core-remove-config_sysfs_deprecated_v2-but-keep-it-for-block-devices.patch ##################################### # TTY patches for after 2.6.36 is out @@ -101,6 +107,7 @@ tty/ioctl-use-asm-generic-ioctls-h-on-s390 tty/serial-core-skip-call-set_termios-console_start-when-no_console_suspend.patch tty/serial-core-restore-termios-settings-when-resume-console-ports.patch tty/add-ttyprintk-driver.patch +tty/char-mxser-call-pci_disable_device-from-probe-remove.patch ################################### @@ -132,6 +139,7 @@ usb/init.h-add-some-more-documentation-to-__ref-tags.patch usb/usb-gadget-amd5536udc.c-remove-double-test.patch usb/usb-output-an-error-message-when-the-pipe-type-doesn-t-match-the-endpoint-type.patch usb/usb-langwell-remove-unnecessary-return-s-from-void-functions.patch +usb/usb-g_file_storage-don-t-generate-automatic-serial-string.patch # staging stuff for next is now in the staging-next tree on git.kernel.org diff --git a/staging.current/revert-staging-batman-adv-adding-netfilter-bridge-hooks.patch b/staging.current/revert-staging-batman-adv-adding-netfilter-bridge-hooks.patch new file mode 100644 index 00000000000000..735aabe54259d3 --- /dev/null +++ b/staging.current/revert-staging-batman-adv-adding-netfilter-bridge-hooks.patch @@ -0,0 +1,88 @@ +From sven.eckelmann@gmx.de Sun Sep 5 00:23:24 2010 +From: Sven Eckelmann <sven.eckelmann@gmx.de> +Date: Sun, 5 Sep 2010 01:58:18 +0200 +Subject: Revert: "Staging: batman-adv: Adding netfilter-bridge hooks" +To: greg@kroah.com +Cc: b.a.t.m.a.n@lists.open-mesh.net, Sven Eckelmann <sven.eckelmann@gmx.de> +Message-ID: <1283644718-653-2-git-send-email-sven.eckelmann@gmx.de> + + +This reverts commit 96d592ed599434d2d5f339a1d282871bc6377d2c. + +The netfilter hook seems to be misused and may leak skbs in situations +when NF_HOOK returns NF_STOLEN. It may not filter everything as +expected. Also the ethernet bridge tables are not yet capable to +understand batman-adv packet correctly. + +It was only added for testing purposes and can be removed again. + +Reported-by: Vasiliy Kulikov <segooon@gmail.com> +Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/batman-adv/hard-interface.c | 13 ------------- + drivers/staging/batman-adv/send.c | 8 ++------ + 2 files changed, 2 insertions(+), 19 deletions(-) + +--- a/drivers/staging/batman-adv/hard-interface.c ++++ b/drivers/staging/batman-adv/hard-interface.c +@@ -30,7 +30,6 @@ + #include "hash.h" + + #include <linux/if_arp.h> +-#include <linux/netfilter_bridge.h> + + #define MIN(x, y) ((x) < (y) ? (x) : (y)) + +@@ -431,11 +430,6 @@ out: + return NOTIFY_DONE; + } + +-static int batman_skb_recv_finish(struct sk_buff *skb) +-{ +- return NF_ACCEPT; +-} +- + /* receive a packet with the batman ethertype coming on a hard + * interface */ + int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, +@@ -456,13 +450,6 @@ int batman_skb_recv(struct sk_buff *skb, + if (atomic_read(&module_state) != MODULE_ACTIVE) + goto err_free; + +- /* if netfilter/ebtables wants to block incoming batman +- * packets then give them a chance to do so here */ +- ret = NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, dev, NULL, +- batman_skb_recv_finish); +- if (ret != 1) +- goto err_out; +- + /* packet should hold at least type and version */ + if (unlikely(skb_headlen(skb) < 2)) + goto err_free; +--- a/drivers/staging/batman-adv/send.c ++++ b/drivers/staging/batman-adv/send.c +@@ -29,7 +29,6 @@ + #include "vis.h" + #include "aggregation.h" + +-#include <linux/netfilter_bridge.h> + + static void send_outstanding_bcast_packet(struct work_struct *work); + +@@ -92,12 +91,9 @@ int send_skb_packet(struct sk_buff *skb, + + /* dev_queue_xmit() returns a negative result on error. However on + * congestion and traffic shaping, it drops and returns NET_XMIT_DROP +- * (which is > 0). This will not be treated as an error. +- * Also, if netfilter/ebtables wants to block outgoing batman +- * packets then giving them a chance to do so here */ ++ * (which is > 0). This will not be treated as an error. */ + +- return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, +- dev_queue_xmit); ++ return dev_queue_xmit(skb); + send_skb_err: + kfree_skb(skb); + return NET_XMIT_DROP; diff --git a/tty.current/serial-amba-pl010-fix-set_ldisc.patch b/tty.current/serial-amba-pl010-fix-set_ldisc.patch new file mode 100644 index 00000000000000..927dfd1f78c361 --- /dev/null +++ b/tty.current/serial-amba-pl010-fix-set_ldisc.patch @@ -0,0 +1,41 @@ +From mika.westerberg@iki.fi Sat Sep 4 21:04:11 2010 +From: Mika Westerberg <mika.westerberg@iki.fi> +Date: Sat, 4 Sep 2010 10:23:23 +0300 +Subject: serial: amba-pl010: fix set_ldisc +To: linux-kernel@vger.kernel.org +Cc: Alan Cox <alan@linux.intel.com>, Russell King <rmk+kernel@arm.linux.org.uk>, gregkh@suse.de +Message-ID: <20100904072323.GR25559@gw.healthdatacare.com> + + +Commit d87d9b7d1 ("tty: serial - fix tty referencing in set_ldisc") changed +set_ldisc to take ldisc number as parameter. This patch fixes AMBA PL010 driver +according the new prototype. + +Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> +Cc: Alan Cox <alan@linux.intel.com> +Cc: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/serial/amba-pl010.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +--- a/drivers/serial/amba-pl010.c ++++ b/drivers/serial/amba-pl010.c +@@ -472,14 +472,9 @@ pl010_set_termios(struct uart_port *port + spin_unlock_irqrestore(&uap->port.lock, flags); + } + +-static void pl010_set_ldisc(struct uart_port *port) ++static void pl010_set_ldisc(struct uart_port *port, int new) + { +- int line = port->line; +- +- if (line >= port->state->port.tty->driver->num) +- return; +- +- if (port->state->port.tty->ldisc->ops->num == N_PPS) { ++ if (new == N_PPS) { + port->flags |= UPF_HARDPPS_CD; + pl010_enable_ms(port); + } else diff --git a/tty/char-mxser-call-pci_disable_device-from-probe-remove.patch b/tty/char-mxser-call-pci_disable_device-from-probe-remove.patch new file mode 100644 index 00000000000000..aa14600c7f3b45 --- /dev/null +++ b/tty/char-mxser-call-pci_disable_device-from-probe-remove.patch @@ -0,0 +1,150 @@ +From jslaby@suse.cz Sat Sep 4 21:06:38 2010 +From: Jiri Slaby <jslaby@suse.cz> +Date: Fri, 3 Sep 2010 10:31:37 +0200 +Subject: Char: mxser, call pci_disable_device from probe/remove +To: gregkh@suse.de +Cc: linux-kernel@vger.kernel.org, jirislaby@gmail.com, Kulikov Vasiliy <segooon@gmail.com> +Message-ID: <1283502697-16068-1-git-send-email-jslaby@suse.cz> + + +Vasiliy found that pci_disable_device is not called on fail paths in +mxser_probe. Actually, it is called from nowhere in the driver. + +There are three changes needed: +1) don't use pseudo-generic mxser_release_res. Let's use it only from + ISA paths from now on. All the pci stuff is moved to probe and + remove PCI-related functions. +2) reorder fail-paths in the probe function so that it makes sense and + we can call them from the sequential code naturally (the further we + are the earlier label we go to). +3) add pci_disable_device both to mxser_probe and mxser_remove. + +There is a nit of adding CONFIG_PCI ifdef to mxser_remove. it is +because this driver supports ISA-only compilations and it would choke +up on the newly added calls now. + +Signed-off-by: Jiri Slaby <jslaby@suse.cz> +Cc: Kulikov Vasiliy <segooon@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/char/mxser.c | 47 ++++++++++++++++++++++------------------------- + 1 file changed, 22 insertions(+), 25 deletions(-) + +--- a/drivers/char/mxser.c ++++ b/drivers/char/mxser.c +@@ -2339,20 +2339,11 @@ struct tty_port_operations mxser_port_op + * The MOXA Smartio/Industio serial driver boot-time initialization code! + */ + +-static void mxser_release_res(struct mxser_board *brd, struct pci_dev *pdev, +- unsigned int irq) ++static void mxser_release_ISA_res(struct mxser_board *brd) + { +- if (irq) +- free_irq(brd->irq, brd); +- if (pdev != NULL) { /* PCI */ +-#ifdef CONFIG_PCI +- pci_release_region(pdev, 2); +- pci_release_region(pdev, 3); +-#endif +- } else { +- release_region(brd->ports[0].ioaddr, 8 * brd->info->nports); +- release_region(brd->vector, 1); +- } ++ free_irq(brd->irq, brd); ++ release_region(brd->ports[0].ioaddr, 8 * brd->info->nports); ++ release_region(brd->vector, 1); + } + + static int __devinit mxser_initbrd(struct mxser_board *brd, +@@ -2397,13 +2388,11 @@ static int __devinit mxser_initbrd(struc + + retval = request_irq(brd->irq, mxser_interrupt, IRQF_SHARED, "mxser", + brd); +- if (retval) { ++ if (retval) + printk(KERN_ERR "Board %s: Request irq failed, IRQ (%d) may " + "conflict with another device.\n", + brd->info->name, brd->irq); +- /* We hold resources, we need to release them. */ +- mxser_release_res(brd, pdev, 0); +- } ++ + return retval; + } + +@@ -2555,7 +2544,7 @@ static int __devinit mxser_probe(struct + ioaddress = pci_resource_start(pdev, 2); + retval = pci_request_region(pdev, 2, "mxser(IO)"); + if (retval) +- goto err; ++ goto err_dis; + + brd->info = &mxser_cards[ent->driver_data]; + for (i = 0; i < brd->info->nports; i++) +@@ -2565,7 +2554,7 @@ static int __devinit mxser_probe(struct + ioaddress = pci_resource_start(pdev, 3); + retval = pci_request_region(pdev, 3, "mxser(vector)"); + if (retval) +- goto err_relio; ++ goto err_zero; + brd->vector = ioaddress; + + /* irq */ +@@ -2608,7 +2597,7 @@ static int __devinit mxser_probe(struct + /* mxser_initbrd will hook ISR. */ + retval = mxser_initbrd(brd, pdev); + if (retval) +- goto err_null; ++ goto err_rel3; + + for (i = 0; i < brd->info->nports; i++) + tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev); +@@ -2616,10 +2605,13 @@ static int __devinit mxser_probe(struct + pci_set_drvdata(pdev, brd); + + return 0; +-err_relio: +- pci_release_region(pdev, 2); +-err_null: ++err_rel3: ++ pci_release_region(pdev, 3); ++err_zero: + brd->info = NULL; ++ pci_release_region(pdev, 2); ++err_dis: ++ pci_disable_device(pdev); + err: + return retval; + #else +@@ -2629,14 +2621,19 @@ err: + + static void __devexit mxser_remove(struct pci_dev *pdev) + { ++#ifdef CONFIG_PCI + struct mxser_board *brd = pci_get_drvdata(pdev); + unsigned int i; + + for (i = 0; i < brd->info->nports; i++) + tty_unregister_device(mxvar_sdriver, brd->idx + i); + +- mxser_release_res(brd, pdev, 1); ++ free_irq(pdev->irq, brd); ++ pci_release_region(pdev, 2); ++ pci_release_region(pdev, 3); ++ pci_disable_device(pdev); + brd->info = NULL; ++#endif + } + + static struct pci_driver mxser_driver = { +@@ -2741,7 +2738,7 @@ static void __exit mxser_module_exit(voi + + for (i = 0; i < MXSER_BOARDS; i++) + if (mxser_boards[i].info != NULL) +- mxser_release_res(&mxser_boards[i], NULL, 1); ++ mxser_release_ISA_res(&mxser_boards[i]); + } + + module_init(mxser_module_init); diff --git a/usb/usb-g_file_storage-don-t-generate-automatic-serial-string.patch b/usb/usb-g_file_storage-don-t-generate-automatic-serial-string.patch new file mode 100644 index 00000000000000..ab75dede050724 --- /dev/null +++ b/usb/usb-g_file_storage-don-t-generate-automatic-serial-string.patch @@ -0,0 +1,172 @@ +From stern@rowland.harvard.edu Sat Sep 4 21:05:49 2010 +From: Alan Stern <stern@rowland.harvard.edu> +Date: Fri, 3 Sep 2010 11:15:41 -0400 (EDT) +Subject: USB: g_file_storage: don't generate automatic serial string +To: Greg KH <greg@kroah.com> +Cc: David Brownell <david-b@pacbell.net>, Michal Nazarewicz <m.nazarewicz@samsung.com> +Message-ID: <Pine.LNX.4.44L0.1009031113540.1548-100000@iolanthe.rowland.org> + + +This patch (as1413) changes g_file_storage to avoid generating a bogus +automatic serial-number string descriptor. If the user doesn't provide +a valid serial number via a module parameter then a warning is logged +and the gadget won't have any serial string descriptor at all. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Acked-by: David Brownell <david-b@pacbell.net> +CC: Michal Nazarewicz <m.nazarewicz@samsung.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/file_storage.c | 48 ++++++++++-------------------------- + drivers/usb/gadget/storage_common.c | 3 -- + 2 files changed, 15 insertions(+), 36 deletions(-) + +--- a/drivers/usb/gadget/file_storage.c ++++ b/drivers/usb/gadget/file_storage.c +@@ -89,6 +89,7 @@ + * Required if "removable" is not set, names of + * the files or block devices used for + * backing storage ++ * serial=HHHH... Required serial number (string of hex chars) + * ro=b[,b...] Default false, booleans for read-only access + * removable Default false, boolean for removable media + * luns=N Default N = number of filenames, number of +@@ -108,12 +109,11 @@ + * vendor=0xVVVV Default 0x0525 (NetChip), USB Vendor ID + * product=0xPPPP Default 0xa4a5 (FSG), USB Product ID + * release=0xRRRR Override the USB release number (bcdDevice) +- * serial=HHHH... Override serial number (string of hex chars) + * buflen=N Default N=16384, buffer size used (will be + * rounded down to a multiple of + * PAGE_CACHE_SIZE) + * +- * If CONFIG_USB_FILE_STORAGE_TEST is not set, only the "file", "ro", ++ * If CONFIG_USB_FILE_STORAGE_TEST is not set, only the "file", "serial", "ro", + * "removable", "luns", "nofua", "stall", and "cdrom" options are available; + * default values are used for everything else. + * +@@ -273,13 +273,10 @@ + + #define DRIVER_DESC "File-backed Storage Gadget" + #define DRIVER_NAME "g_file_storage" +-/* DRIVER_VERSION must be at least 6 characters long, as it is used +- * to generate a fallback serial number. */ +-#define DRIVER_VERSION "20 November 2008" ++#define DRIVER_VERSION "1 September 2010" + + static char fsg_string_manufacturer[64]; + static const char fsg_string_product[] = DRIVER_DESC; +-static char fsg_string_serial[13]; + static const char fsg_string_config[] = "Self-powered"; + static const char fsg_string_interface[] = "Mass Storage"; + +@@ -305,6 +302,7 @@ MODULE_LICENSE("Dual BSD/GPL"); + + static struct { + char *file[FSG_MAX_LUNS]; ++ char *serial; + int ro[FSG_MAX_LUNS]; + int nofua[FSG_MAX_LUNS]; + unsigned int num_filenames; +@@ -321,7 +319,6 @@ static struct { + unsigned short vendor; + unsigned short product; + unsigned short release; +- char *serial; + unsigned int buflen; + + int transport_type; +@@ -346,6 +343,9 @@ module_param_array_named(file, mod_data. + S_IRUGO); + MODULE_PARM_DESC(file, "names of backing files or devices"); + ++module_param_named(serial, mod_data.serial, charp, S_IRUGO); ++MODULE_PARM_DESC(serial, "USB serial number"); ++ + module_param_array_named(ro, mod_data.ro, bool, &mod_data.num_ros, S_IRUGO); + MODULE_PARM_DESC(ro, "true to force read-only"); + +@@ -365,9 +365,6 @@ MODULE_PARM_DESC(stall, "false to preven + module_param_named(cdrom, mod_data.cdrom, bool, S_IRUGO); + MODULE_PARM_DESC(cdrom, "true to emulate cdrom instead of disk"); + +-module_param_named(serial, mod_data.serial, charp, S_IRUGO); +-MODULE_PARM_DESC(serial, "USB serial number"); +- + /* In the non-TEST version, only the module parameters listed above + * are available. */ + #ifdef CONFIG_USB_FILE_STORAGE_TEST +@@ -3214,7 +3211,6 @@ static int __init check_parameters(struc + { + int prot; + int gcnum; +- int i; + + /* Store the default values */ + mod_data.transport_type = USB_PR_BULK; +@@ -3310,38 +3306,22 @@ static int __init check_parameters(struc + if ((*ch < '0' || *ch > '9') && + (*ch < 'A' || *ch > 'F')) { /* not uppercase hex */ + WARNING(fsg, +- "Invalid serial string character: %c; " +- "Failing back to default\n", ++ "Invalid serial string character: %c\n", + *ch); +- goto fill_serial; ++ goto no_serial; + } + } + if (len > 126 || + (mod_data.transport_type == USB_PR_BULK && len < 12) || + (mod_data.transport_type != USB_PR_BULK && len > 12)) { +- WARNING(fsg, +- "Invalid serial string length; " +- "Failing back to default\n"); +- goto fill_serial; ++ WARNING(fsg, "Invalid serial string length!\n"); ++ goto no_serial; + } + fsg_strings[FSG_STRING_SERIAL - 1].s = mod_data.serial; + } else { +- WARNING(fsg, +- "Userspace failed to provide serial number; " +- "Failing back to default\n"); +-fill_serial: +- /* Serial number not specified or invalid, make our own. +- * We just encode it from the driver version string, +- * 12 characters to comply with both CB[I] and BBB spec. +- * Warning : Two devices running the same kernel will have +- * the same fallback serial number. */ +- for (i = 0; i < 12; i += 2) { +- unsigned char c = DRIVER_VERSION[i / 2]; +- +- if (!c) +- break; +- sprintf(&fsg_string_serial[i], "%02X", c); +- } ++ WARNING(fsg, "No serial-number string provided!\n"); ++ no_serial: ++ device_desc.iSerialNumber = 0; + } + + return 0; +--- a/drivers/usb/gadget/storage_common.c ++++ b/drivers/usb/gadget/storage_common.c +@@ -26,7 +26,6 @@ + * be defined (each of type pointer to char): + * - fsg_string_manufacturer -- name of the manufacturer + * - fsg_string_product -- name of the product +- * - fsg_string_serial -- product's serial + * - fsg_string_config -- name of the configuration + * - fsg_string_interface -- name of the interface + * The first four are only needed when FSG_DESCRIPTORS_DEVICE_STRINGS +@@ -552,7 +551,7 @@ static struct usb_string fsg_strings[] + #ifndef FSG_NO_DEVICE_STRINGS + {FSG_STRING_MANUFACTURER, fsg_string_manufacturer}, + {FSG_STRING_PRODUCT, fsg_string_product}, +- {FSG_STRING_SERIAL, fsg_string_serial}, ++ {FSG_STRING_SERIAL, ""}, + {FSG_STRING_CONFIG, fsg_string_config}, + #endif + {FSG_STRING_INTERFACE, fsg_string_interface}, |
