From: Greg Kroah-Hartman Date: Mon, 9 Jun 2014 21:29:05 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.14.7~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6de7e98e32f10d971fd3162123fd8a6b9c5a4de3;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: alsa-hda-realtek-correction-of-fixup-codes-for-pb-v7900-laptop.patch alsa-hda-realtek-fix-coef-widget-nid-for-alc260-replacer-fixup.patch md-always-set-md_recovery_intr-when-aborting-a-reshape-or-other-resync.patch md-always-set-md_recovery_intr-when-interrupting-a-reshape-thread.patch staging-comedi-ni_daq_700-add-mux-settling-delay.patch staging-speakup-move-pasting-into-a-work-item.patch usb-avoid-runtime-suspend-loops-for-hcds-that-can-t-handle-suspend-resume.patch usb-cdc-wdm-export-cdc-wdm-uapi-header.patch usb-cdc-wdm-properly-include-types.h.patch usb-ftdi_sio-add-novatech-orionlxm-product-id.patch usb-io_ti-fix-firmware-download-on-big-endian-machines-part-2.patch usb-serial-option-add-support-for-novatel-e371-pcie-card.patch xhci-delete-endpoints-from-bandwidth-list-before-freeing-whole-device.patch --- diff --git a/queue-3.10/alsa-hda-realtek-correction-of-fixup-codes-for-pb-v7900-laptop.patch b/queue-3.10/alsa-hda-realtek-correction-of-fixup-codes-for-pb-v7900-laptop.patch new file mode 100644 index 00000000000..c66516902df --- /dev/null +++ b/queue-3.10/alsa-hda-realtek-correction-of-fixup-codes-for-pb-v7900-laptop.patch @@ -0,0 +1,43 @@ +From e30cf2d2bed3aed74a651c64de323ba26e4ff7d0 Mon Sep 17 00:00:00 2001 +From: Ronan Marquet +Date: Sun, 1 Jun 2014 18:38:53 +0200 +Subject: ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop + +From: Ronan Marquet + +commit e30cf2d2bed3aed74a651c64de323ba26e4ff7d0 upstream. + +Correcion of wrong fixup entries add in commit ca8f0424 to replace +static model quirk for PB V7900 laptop (will model). + +[note: the removal of ALC260_FIXUP_HP_PIN_0F chain is also needed as a + part of the fix; otherwise the pin is set up wrongly as a headphone, + and user-space (PulseAudio) may be wrongly trying to detect the jack + state -- tiwai] + +Fixes: ca8f04247eaa ('ALSA: hda/realtek - Add the fixup codes for ALC260 model=will') +Signed-off-by: Ronan Marquet +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -1590,12 +1590,10 @@ static const struct hda_fixup alc260_fix + [ALC260_FIXUP_COEF] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { +- { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, +- { 0x20, AC_VERB_SET_PROC_COEF, 0x3040 }, ++ { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, ++ { 0x1a, AC_VERB_SET_PROC_COEF, 0x3040 }, + { } + }, +- .chained = true, +- .chain_id = ALC260_FIXUP_HP_PIN_0F, + }, + [ALC260_FIXUP_GPIO1] = { + .type = HDA_FIXUP_VERBS, diff --git a/queue-3.10/alsa-hda-realtek-fix-coef-widget-nid-for-alc260-replacer-fixup.patch b/queue-3.10/alsa-hda-realtek-fix-coef-widget-nid-for-alc260-replacer-fixup.patch new file mode 100644 index 00000000000..ef59c58a8ff --- /dev/null +++ b/queue-3.10/alsa-hda-realtek-fix-coef-widget-nid-for-alc260-replacer-fixup.patch @@ -0,0 +1,35 @@ +From 192a98e280e560510a62aca8cfa83b4ae7c095bb Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 2 Jun 2014 15:16:07 +0200 +Subject: ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup + +From: Takashi Iwai + +commit 192a98e280e560510a62aca8cfa83b4ae7c095bb upstream. + +The conversion to a fixup table for Replacer model with ALC260 in +commit 20f7d928 took the wrong widget NID for COEF setups. Namely, +NID 0x1a should have been used instead of NID 0x20, which is the +common node for all Realtek codecs but ALC260. + +Fixes: 20f7d928fa6e ('ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parser') +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -1608,8 +1608,8 @@ static const struct hda_fixup alc260_fix + [ALC260_FIXUP_REPLACER] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb[]) { +- { 0x20, AC_VERB_SET_COEF_INDEX, 0x07 }, +- { 0x20, AC_VERB_SET_PROC_COEF, 0x3050 }, ++ { 0x1a, AC_VERB_SET_COEF_INDEX, 0x07 }, ++ { 0x1a, AC_VERB_SET_PROC_COEF, 0x3050 }, + { } + }, + .chained = true, diff --git a/queue-3.10/md-always-set-md_recovery_intr-when-aborting-a-reshape-or-other-resync.patch b/queue-3.10/md-always-set-md_recovery_intr-when-aborting-a-reshape-or-other-resync.patch new file mode 100644 index 00000000000..7949b5c2a88 --- /dev/null +++ b/queue-3.10/md-always-set-md_recovery_intr-when-aborting-a-reshape-or-other-resync.patch @@ -0,0 +1,45 @@ +From 3991b31ea072b070081ca3bfa860a077eda67de5 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 28 May 2014 13:39:23 +1000 +Subject: md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync". + +From: NeilBrown + +commit 3991b31ea072b070081ca3bfa860a077eda67de5 upstream. + +If mddev->ro is set, md_to_sync will (correctly) abort. +However in that case MD_RECOVERY_INTR isn't set. + +If a RESHAPE had been requested, then ->finish_reshape() will be +called and it will think the reshape was successful even though +nothing happened. + +Normally a resync will not be requested if ->ro is set, but if an +array is stopped while a reshape is on-going, then when the array is +started, the reshape will be restarted. If the array is also set +read-only at this point, the reshape will instantly appear to success, +resulting in data corruption. + +Consequently, this patch is suitable for any -stable kernel. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -7338,8 +7338,10 @@ void md_do_sync(struct md_thread *thread + /* just incase thread restarts... */ + if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) + return; +- if (mddev->ro) /* never try to sync a read-only array */ ++ if (mddev->ro) {/* never try to sync a read-only array */ ++ set_bit(MD_RECOVERY_INTR, &mddev->recovery); + return; ++ } + + if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { + if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) diff --git a/queue-3.10/md-always-set-md_recovery_intr-when-interrupting-a-reshape-thread.patch b/queue-3.10/md-always-set-md_recovery_intr-when-interrupting-a-reshape-thread.patch new file mode 100644 index 00000000000..8965fda36e2 --- /dev/null +++ b/queue-3.10/md-always-set-md_recovery_intr-when-interrupting-a-reshape-thread.patch @@ -0,0 +1,49 @@ +From 2ac295a544dcae9299cba13ce250419117ae7fd1 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Thu, 29 May 2014 11:40:03 +1000 +Subject: md: always set MD_RECOVERY_INTR when interrupting a reshape thread. + +From: NeilBrown + +commit 2ac295a544dcae9299cba13ce250419117ae7fd1 upstream. + +Commit 8313b8e57f55b15e5b7f7fc5d1630bbf686a9a97 + md: fix problem when adding device to read-only array with bitmap. + +added a called to md_reap_sync_thread() which cause a reshape thread +to be interrupted (in particular, it could cause md_thread() to never even +call md_do_sync()). +However it didn't set MD_RECOVERY_INTR so ->finish_reshape() would not +know that the reshape didn't complete. + +This only happens when mddev->ro is set and normally reshape threads +don't run in that situation. But raid5 and raid10 can start a reshape +thread during "run" is the array is in the middle of a reshape. +They do this even if ->ro is set. + +So it is best to set MD_RECOVERY_INTR before abortingg the +sync thread, just in case. + +Though it rare for this to trigger a problem it can cause data corruption +because the reshape isn't finished properly. +So it is suitable for any stable which the offending commit was applied to. +(3.2 or later) + +Fixes: 8313b8e57f55b15e5b7f7fc5d1630bbf686a9a97 +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -7790,6 +7790,7 @@ void md_check_recovery(struct mddev *mdd + /* There is no thread, but we need to call + * ->spare_active and clear saved_raid_disk + */ ++ set_bit(MD_RECOVERY_INTR, &mddev->recovery); + md_reap_sync_thread(mddev); + clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); + goto unlock; diff --git a/queue-3.10/series b/queue-3.10/series index 4a1643c699a..cc2ceaed874 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -18,3 +18,16 @@ arm-8051-1-put_user-fix-possible-data-corruption-in-put_user.patch dm-cache-always-split-discards-on-cache-block-boundaries.patch sched-fix-hotplug-vs.-set_cpus_allowed_ptr.patch drm-i915-only-copy-back-the-modified-fields-to-userspace-from-execbuffer.patch +md-always-set-md_recovery_intr-when-aborting-a-reshape-or-other-resync.patch +md-always-set-md_recovery_intr-when-interrupting-a-reshape-thread.patch +xhci-delete-endpoints-from-bandwidth-list-before-freeing-whole-device.patch +staging-speakup-move-pasting-into-a-work-item.patch +staging-comedi-ni_daq_700-add-mux-settling-delay.patch +alsa-hda-realtek-correction-of-fixup-codes-for-pb-v7900-laptop.patch +alsa-hda-realtek-fix-coef-widget-nid-for-alc260-replacer-fixup.patch +usb-ftdi_sio-add-novatech-orionlxm-product-id.patch +usb-cdc-wdm-export-cdc-wdm-uapi-header.patch +usb-cdc-wdm-properly-include-types.h.patch +usb-serial-option-add-support-for-novatel-e371-pcie-card.patch +usb-io_ti-fix-firmware-download-on-big-endian-machines-part-2.patch +usb-avoid-runtime-suspend-loops-for-hcds-that-can-t-handle-suspend-resume.patch diff --git a/queue-3.10/staging-comedi-ni_daq_700-add-mux-settling-delay.patch b/queue-3.10/staging-comedi-ni_daq_700-add-mux-settling-delay.patch new file mode 100644 index 00000000000..555c0dc5a96 --- /dev/null +++ b/queue-3.10/staging-comedi-ni_daq_700-add-mux-settling-delay.patch @@ -0,0 +1,32 @@ +From ffed54dced86723f352323f15789d9ad6bee25e1 Mon Sep 17 00:00:00 2001 +From: Ian Abbott +Date: Mon, 19 May 2014 11:29:04 +0100 +Subject: staging: comedi: ni_daq_700: add mux settling delay + +From: Ian Abbott + +commit ffed54dced86723f352323f15789d9ad6bee25e1 upstream. + +I got a patch from the original author, Fred Brooks, to add a small +settling delay after setting the AI channel multiplexor. The lack of +delay resulted in unstable or scrambled data on faster processors. + +Signed-off-by: Ian Abbott +Reported-by: Fred Brooks +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/comedi/drivers/ni_daq_700.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/staging/comedi/drivers/ni_daq_700.c ++++ b/drivers/staging/comedi/drivers/ni_daq_700.c +@@ -127,6 +127,8 @@ static int daq700_ai_rinsn(struct comedi + /* write channel to multiplexer */ + /* set mask scan bit high to disable scanning */ + outb(chan | 0x80, dev->iobase + CMD_R1); ++ /* mux needs 2us to really settle [Fred Brooks]. */ ++ udelay(2); + + /* convert n samples */ + for (n = 0; n < insn->n; n++) { diff --git a/queue-3.10/staging-speakup-move-pasting-into-a-work-item.patch b/queue-3.10/staging-speakup-move-pasting-into-a-work-item.patch new file mode 100644 index 00000000000..90e05d9b83e --- /dev/null +++ b/queue-3.10/staging-speakup-move-pasting-into-a-work-item.patch @@ -0,0 +1,123 @@ +From d7500135802ca55b3f4e01a16544e8b34082f8c3 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Mon, 19 May 2014 00:56:22 +0100 +Subject: Staging: speakup: Move pasting into a work item + +From: Ben Hutchings + +commit d7500135802ca55b3f4e01a16544e8b34082f8c3 upstream. + +Input is handled in softirq context, but when pasting we may +need to sleep. speakup_paste_selection() currently tries to +bodge this by busy-waiting if in_atomic(), but that doesn't +help because the ldisc may also sleep. + +For bonus breakage, speakup_paste_selection() changes the +state of current, even though it's not running in process +context. + +Move it into a work item and make sure to cancel it on exit. + +References: https://bugs.debian.org/735202 +References: https://bugs.debian.org/744015 +Reported-by: Paul Gevers +Reported-and-tested-by: Jarek Czekalski +Signed-off-by: Ben Hutchings +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/speakup/main.c | 1 + drivers/staging/speakup/selection.c | 40 +++++++++++++++++++++++++++++------- + drivers/staging/speakup/speakup.h | 1 + 3 files changed, 35 insertions(+), 7 deletions(-) + +--- a/drivers/staging/speakup/main.c ++++ b/drivers/staging/speakup/main.c +@@ -2219,6 +2219,7 @@ static void __exit speakup_exit(void) + unregister_keyboard_notifier(&keyboard_notifier_block); + unregister_vt_notifier(&vt_notifier_block); + speakup_unregister_devsynth(); ++ speakup_cancel_paste(); + del_timer(&cursor_timer); + kthread_stop(speakup_task); + speakup_task = NULL; +--- a/drivers/staging/speakup/selection.c ++++ b/drivers/staging/speakup/selection.c +@@ -4,6 +4,8 @@ + #include + #include /* for dev_warn */ + #include ++#include ++#include + + #include "speakup.h" + +@@ -121,20 +123,24 @@ int speakup_set_selection(struct tty_str + return 0; + } + +-/* TODO: move to some helper thread, probably. That'd fix having to check for +- * in_atomic(). */ +-int speakup_paste_selection(struct tty_struct *tty) +-{ ++struct speakup_paste_work { ++ struct work_struct work; ++ struct tty_struct *tty; ++}; ++ ++static void __speakup_paste_selection(struct work_struct *work) ++{ ++ struct speakup_paste_work *spw = ++ container_of(work, struct speakup_paste_work, work); ++ struct tty_struct *tty = xchg(&spw->tty, NULL); + struct vc_data *vc = (struct vc_data *) tty->driver_data; + int pasted = 0, count; + DECLARE_WAITQUEUE(wait, current); ++ + add_wait_queue(&vc->paste_wait, &wait); + while (sel_buffer && sel_buffer_lth > pasted) { + set_current_state(TASK_INTERRUPTIBLE); + if (test_bit(TTY_THROTTLED, &tty->flags)) { +- if (in_atomic()) +- /* if we are in an interrupt handler, abort */ +- break; + schedule(); + continue; + } +@@ -146,6 +152,26 @@ int speakup_paste_selection(struct tty_s + } + remove_wait_queue(&vc->paste_wait, &wait); + current->state = TASK_RUNNING; ++ tty_kref_put(tty); ++} ++ ++static struct speakup_paste_work speakup_paste_work = { ++ .work = __WORK_INITIALIZER(speakup_paste_work.work, ++ __speakup_paste_selection) ++}; ++ ++int speakup_paste_selection(struct tty_struct *tty) ++{ ++ if (cmpxchg(&speakup_paste_work.tty, NULL, tty) != NULL) ++ return -EBUSY; ++ ++ tty_kref_get(tty); ++ schedule_work_on(WORK_CPU_UNBOUND, &speakup_paste_work.work); + return 0; + } + ++void speakup_cancel_paste(void) ++{ ++ cancel_work_sync(&speakup_paste_work.work); ++ tty_kref_put(speakup_paste_work.tty); ++} +--- a/drivers/staging/speakup/speakup.h ++++ b/drivers/staging/speakup/speakup.h +@@ -77,6 +77,7 @@ extern void synth_buffer_clear(void); + extern void speakup_clear_selection(void); + extern int speakup_set_selection(struct tty_struct *tty); + extern int speakup_paste_selection(struct tty_struct *tty); ++extern void speakup_cancel_paste(void); + extern void speakup_register_devsynth(void); + extern void speakup_unregister_devsynth(void); + extern void synth_write(const char *buf, size_t count); diff --git a/queue-3.10/usb-avoid-runtime-suspend-loops-for-hcds-that-can-t-handle-suspend-resume.patch b/queue-3.10/usb-avoid-runtime-suspend-loops-for-hcds-that-can-t-handle-suspend-resume.patch new file mode 100644 index 00000000000..ec01fc861bd --- /dev/null +++ b/queue-3.10/usb-avoid-runtime-suspend-loops-for-hcds-that-can-t-handle-suspend-resume.patch @@ -0,0 +1,85 @@ +From 8ef42ddd9a53b73e6fc3934278710c27f80f324f Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Fri, 23 May 2014 10:45:54 -0400 +Subject: USB: Avoid runtime suspend loops for HCDs that can't handle suspend/resume + +From: Alan Stern + +commit 8ef42ddd9a53b73e6fc3934278710c27f80f324f upstream. + +Not all host controller drivers have bus-suspend and bus-resume +methods. When one doesn't, it will cause problems if runtime PM is +enabled in the kernel. The PM core will attempt to suspend the +controller's root hub, the suspend will fail because there is no +bus-suspend routine, and a -EBUSY error code will be returned to the +PM core. This will cause the suspend attempt to be repeated shortly +thereafter, in a never-ending loop. + +Part of the problem is that the original error code -ENOENT gets +changed to -EBUSY in usb_runtime_suspend(), on the grounds that the PM +core will interpret -ENOENT as meaning that the root hub has gotten +into a runtime-PM error state. While this change is appropriate for +real USB devices, it's not such a good idea for a root hub. In fact, +considering the root hub to be in a runtime-PM error state would not +be far from the truth. Therefore this patch updates +usb_runtime_suspend() so that it adjusts error codes only for +non-root-hub devices. + +Furthermore, the patch attempts to prevent the problem from occurring +in the first place by not enabling runtime PM by default for root hubs +whose host controller driver doesn't have bus_suspend and bus_resume +methods. + +Signed-off-by: Alan Stern +Reported-by: Will Deacon +Tested-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/driver.c | 9 ++++++--- + drivers/usb/core/hub.c | 15 +++++++++++++-- + 2 files changed, 19 insertions(+), 5 deletions(-) + +--- a/drivers/usb/core/driver.c ++++ b/drivers/usb/core/driver.c +@@ -1754,10 +1754,13 @@ int usb_runtime_suspend(struct device *d + if (status == -EAGAIN || status == -EBUSY) + usb_mark_last_busy(udev); + +- /* The PM core reacts badly unless the return code is 0, +- * -EAGAIN, or -EBUSY, so always return -EBUSY on an error. ++ /* ++ * The PM core reacts badly unless the return code is 0, ++ * -EAGAIN, or -EBUSY, so always return -EBUSY on an error ++ * (except for root hubs, because they don't suspend through ++ * an upstream port like other USB devices). + */ +- if (status != 0) ++ if (status != 0 && udev->parent) + return -EBUSY; + return status; + } +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -1683,8 +1683,19 @@ static int hub_probe(struct usb_interfac + */ + pm_runtime_set_autosuspend_delay(&hdev->dev, 0); + +- /* Hubs have proper suspend/resume support. */ +- usb_enable_autosuspend(hdev); ++ /* ++ * Hubs have proper suspend/resume support, except for root hubs ++ * where the controller driver doesn't have bus_suspend and ++ * bus_resume methods. ++ */ ++ if (hdev->parent) { /* normal device */ ++ usb_enable_autosuspend(hdev); ++ } else { /* root hub */ ++ const struct hc_driver *drv = bus_to_hcd(hdev->bus)->driver; ++ ++ if (drv->bus_suspend && drv->bus_resume) ++ usb_enable_autosuspend(hdev); ++ } + + if (hdev->level == MAX_TOPO_LEVEL) { + dev_err(&intf->dev, diff --git a/queue-3.10/usb-cdc-wdm-export-cdc-wdm-uapi-header.patch b/queue-3.10/usb-cdc-wdm-export-cdc-wdm-uapi-header.patch new file mode 100644 index 00000000000..6867fa12bea --- /dev/null +++ b/queue-3.10/usb-cdc-wdm-export-cdc-wdm-uapi-header.patch @@ -0,0 +1,33 @@ +From 7d1896360f4d055d68565ef8ed56a677580f1a39 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= +Date: Sat, 10 May 2014 16:31:40 +0200 +Subject: usb: cdc-wdm: export cdc-wdm uapi header +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= + +commit 7d1896360f4d055d68565ef8ed56a677580f1a39 upstream. + +The include/uapi/linux/usb/cdc-wdm.h header defines cdc-wdm +userspace APIs and should be exported by make headers_install. + +Fixes: 3edce1cf813a ("USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND") +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + include/uapi/linux/usb/Kbuild | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/uapi/linux/usb/Kbuild ++++ b/include/uapi/linux/usb/Kbuild +@@ -1,6 +1,7 @@ + # UAPI Header export list + header-y += audio.h + header-y += cdc.h ++header-y += cdc-wdm.h + header-y += ch11.h + header-y += ch9.h + header-y += functionfs.h diff --git a/queue-3.10/usb-cdc-wdm-properly-include-types.h.patch b/queue-3.10/usb-cdc-wdm-properly-include-types.h.patch new file mode 100644 index 00000000000..9e231858fbe --- /dev/null +++ b/queue-3.10/usb-cdc-wdm-properly-include-types.h.patch @@ -0,0 +1,34 @@ +From 7ac3764fcafc06e72e1a79a9d998b9fdd900b2a6 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 27 May 2014 16:32:10 -0700 +Subject: USB: cdc-wdm: properly include types.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Greg Kroah-Hartman + +commit 7ac3764fcafc06e72e1a79a9d998b9fdd900b2a6 upstream. + +The file include/uapi/linux/usb/cdc-wdm.h uses a __u16 so it needs to +include types.h as well to make the build system happy. + +Fixes: 3edce1cf813a ("USB: cdc-wdm: implement IOCTL_WDM_MAX_COMMAND") +Cc: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + include/uapi/linux/usb/cdc-wdm.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/uapi/linux/usb/cdc-wdm.h ++++ b/include/uapi/linux/usb/cdc-wdm.h +@@ -9,6 +9,8 @@ + #ifndef _UAPI__LINUX_USB_CDC_WDM_H + #define _UAPI__LINUX_USB_CDC_WDM_H + ++#include ++ + /* + * This IOCTL is used to retrieve the wMaxCommand for the device, + * defining the message limit for both reading and writing. diff --git a/queue-3.10/usb-ftdi_sio-add-novatech-orionlxm-product-id.patch b/queue-3.10/usb-ftdi_sio-add-novatech-orionlxm-product-id.patch new file mode 100644 index 00000000000..b913ba210fa --- /dev/null +++ b/queue-3.10/usb-ftdi_sio-add-novatech-orionlxm-product-id.patch @@ -0,0 +1,50 @@ +From d0839d757e6294921c31b1c4ca4f1dcc5df63bcd Mon Sep 17 00:00:00 2001 +From: George McCollister +Date: Sat, 26 Apr 2014 12:04:47 +0200 +Subject: USB: ftdi_sio: add NovaTech OrionLXm product ID + +From: George McCollister + +commit d0839d757e6294921c31b1c4ca4f1dcc5df63bcd upstream. + +The NovaTech OrionLXm uses an onboard FTDI serial converter for JTAG and +console access. + +Here is the lsusb output: +Bus 004 Device 123: ID 0403:7c90 Future Technology Devices +International, Ltd + +Signed-off-by: George McCollister +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio_ids.h | 5 +++++ + 2 files changed, 7 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -583,6 +583,8 @@ static struct usb_device_id id_table_com + { USB_DEVICE(FTDI_VID, FTDI_TAVIR_STK500_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_TIAO_UMPA_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, ++ { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + /* + * ELV devices: + */ +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -538,6 +538,11 @@ + */ + #define FTDI_TIAO_UMPA_PID 0x8a98 /* TIAO/DIYGADGET USB Multi-Protocol Adapter */ + ++/* ++ * NovaTech product ids (FTDI_VID) ++ */ ++#define FTDI_NT_ORIONLXM_PID 0x7c90 /* OrionLXm Substation Automation Platform */ ++ + + /********************************/ + /** third-party VID/PID combos **/ diff --git a/queue-3.10/usb-io_ti-fix-firmware-download-on-big-endian-machines-part-2.patch b/queue-3.10/usb-io_ti-fix-firmware-download-on-big-endian-machines-part-2.patch new file mode 100644 index 00000000000..d205b676bd6 --- /dev/null +++ b/queue-3.10/usb-io_ti-fix-firmware-download-on-big-endian-machines-part-2.patch @@ -0,0 +1,57 @@ +From c03890ff5e24a4bf59059f2d179f427559b7330a Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Sat, 26 Apr 2014 11:53:44 +0200 +Subject: USB: io_ti: fix firmware download on big-endian machines (part 2) + +From: Johan Hovold + +commit c03890ff5e24a4bf59059f2d179f427559b7330a upstream. + +A recent patch that purported to fix firmware download on big-endian +machines failed to add the corresponding sparse annotation to the +i2c-header. This was reported by the kbuild test robot. + +Adding the appropriate annotation revealed another endianess bug related +to the i2c-header Size-field in a code path that is exercised when the +firmware is actually being downloaded (and not just verified and left +untouched unless older than the firmware at hand). + +This patch adds the required sparse annotation to the i2c-header and +makes sure that the Size-field is sent in little-endian byte order +during firmware download also on big-endian machines. + +Note that this patch is only compile-tested, but that there is no +functional change for little-endian systems. + +Reported-by: kbuild test robot +Cc: Ludovic Drolez +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/io_ti.c | 2 +- + drivers/usb/serial/io_usbvend.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/io_ti.c ++++ b/drivers/usb/serial/io_ti.c +@@ -835,7 +835,7 @@ static int build_i2c_fw_hdr(__u8 *header + firmware_rec = (struct ti_i2c_firmware_rec*)i2c_header->Data; + + i2c_header->Type = I2C_DESC_TYPE_FIRMWARE_BLANK; +- i2c_header->Size = (__u16)buffer_size; ++ i2c_header->Size = cpu_to_le16(buffer_size); + i2c_header->CheckSum = cs; + firmware_rec->Ver_Major = OperationalMajorVersion; + firmware_rec->Ver_Minor = OperationalMinorVersion; +--- a/drivers/usb/serial/io_usbvend.h ++++ b/drivers/usb/serial/io_usbvend.h +@@ -594,7 +594,7 @@ struct edge_boot_descriptor { + + struct ti_i2c_desc { + __u8 Type; // Type of descriptor +- __u16 Size; // Size of data only not including header ++ __le16 Size; // Size of data only not including header + __u8 CheckSum; // Checksum (8 bit sum of data only) + __u8 Data[0]; // Data starts here + } __attribute__((packed)); diff --git a/queue-3.10/usb-serial-option-add-support-for-novatel-e371-pcie-card.patch b/queue-3.10/usb-serial-option-add-support-for-novatel-e371-pcie-card.patch new file mode 100644 index 00000000000..1afbbe43cde --- /dev/null +++ b/queue-3.10/usb-serial-option-add-support-for-novatel-e371-pcie-card.patch @@ -0,0 +1,57 @@ +From 8a61ba3a47ac39f660702aa66a172185dd605a86 Mon Sep 17 00:00:00 2001 +From: Alexej Starschenko +Date: Wed, 7 May 2014 10:43:29 +0200 +Subject: USB: serial: option: add support for Novatel E371 PCIe card + +From: Alexej Starschenko + +commit 8a61ba3a47ac39f660702aa66a172185dd605a86 upstream. + +Adds product ID for the Novatel E371 PCI Express Mini Card. + +$ lsusb +Bus 001 Device 024: ID 1410:9011 Novatel Wireless + +$ usb-devices +T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 24 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=1410 ProdID=9011 Rev=00.03 +S: Manufacturer=Novatel Wireless, Inc. +S: Product=Novatel Wireless HSPA +S: SerialNumber=012773002115811 +C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether +I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether + +Tested with kernel 3.2.0. + +Signed-off-by: Alexej Starschenko +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -161,6 +161,7 @@ static void option_instat_callback(struc + #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_FULLSPEED 0x9000 + #define NOVATELWIRELESS_PRODUCT_HSPA_EMBEDDED_HIGHSPEED 0x9001 + #define NOVATELWIRELESS_PRODUCT_E362 0x9010 ++#define NOVATELWIRELESS_PRODUCT_E371 0x9011 + #define NOVATELWIRELESS_PRODUCT_G2 0xA010 + #define NOVATELWIRELESS_PRODUCT_MC551 0xB001 + +@@ -1012,6 +1013,7 @@ static const struct usb_device_id option + /* Novatel Ovation MC551 a.k.a. Verizon USB551L */ + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC551, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E362, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E371, 0xff, 0xff, 0xff) }, + + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01) }, + { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_H01A) }, diff --git a/queue-3.10/xhci-delete-endpoints-from-bandwidth-list-before-freeing-whole-device.patch b/queue-3.10/xhci-delete-endpoints-from-bandwidth-list-before-freeing-whole-device.patch new file mode 100644 index 00000000000..006b02325c8 --- /dev/null +++ b/queue-3.10/xhci-delete-endpoints-from-bandwidth-list-before-freeing-whole-device.patch @@ -0,0 +1,64 @@ +From 5dc2808c4729bf080487e61b80ee04e0fdb12a37 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Wed, 28 May 2014 23:51:13 +0300 +Subject: xhci: delete endpoints from bandwidth list before freeing whole device +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Mathias Nyman + +commit 5dc2808c4729bf080487e61b80ee04e0fdb12a37 upstream. + +Lists of endpoints are stored for bandwidth calculation for roothub ports. +Make sure we remove all endpoints from the list before the whole device, +containing its endpoints list_head stuctures, is freed. + +This used to be done in the wrong order in xhci_mem_cleanup(), +and triggered an oops in resume from S4 (hibernate). + +Tested-by: Ville Syrjälä +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-mem.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/drivers/usb/host/xhci-mem.c ++++ b/drivers/usb/host/xhci-mem.c +@@ -1794,6 +1794,16 @@ void xhci_mem_cleanup(struct xhci_hcd *x + kfree(cur_cd); + } + ++ num_ports = HCS_MAX_PORTS(xhci->hcs_params1); ++ for (i = 0; i < num_ports; i++) { ++ struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; ++ for (j = 0; j < XHCI_MAX_INTERVAL; j++) { ++ struct list_head *ep = &bwt->interval_bw[j].endpoints; ++ while (!list_empty(ep)) ++ list_del_init(ep->next); ++ } ++ } ++ + for (i = 1; i < MAX_HC_SLOTS; ++i) + xhci_free_virt_device(xhci, i); + +@@ -1834,16 +1844,6 @@ void xhci_mem_cleanup(struct xhci_hcd *x + if (!xhci->rh_bw) + goto no_bw; + +- num_ports = HCS_MAX_PORTS(xhci->hcs_params1); +- for (i = 0; i < num_ports; i++) { +- struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; +- for (j = 0; j < XHCI_MAX_INTERVAL; j++) { +- struct list_head *ep = &bwt->interval_bw[j].endpoints; +- while (!list_empty(ep)) +- list_del_init(ep->next); +- } +- } +- + for (i = 0; i < num_ports; i++) { + struct xhci_tt_bw_info *tt, *n; + list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) {