From: Greg Kroah-Hartman Date: Wed, 27 Aug 2014 23:14:29 +0000 (-0700) Subject: 3.16-stable patches X-Git-Tag: v3.10.54~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be1996fa6f17cf28e71051b546a13bc2c56fbaeb;p=thirdparty%2Fkernel%2Fstable-queue.git 3.16-stable patches added patches: alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch alsa-hda-restore-the-gpio-led-after-resume.patch alsa-usb-audio-adjust-gamecom-780-volume-level.patch alsa-usb-audio-fix-boss-me-25-midi-regression.patch alsa-virtuoso-add-xonar-essence-stx-ii-support.patch arm-8097-1-unistd.h-relocate-comments-back-to-place.patch arm-dts-am4372-correct-mailbox-node-data.patch arm-omap3-fix-choice-of-omap3_restore_es-function-in-omap34xx-rev3.1.2-case.patch arm64-don-t-call-break-hooks-for-brk-exceptions-from-el0.patch arm64-fix-barriers-used-for-page-table-modifications.patch drm-omapdrm-fix-compiler-errors.patch efi-arm64-store-runtime-services-revision.patch isofs-fix-unbounded-recursion-when-processing-relocated-directories.patch mei-don-t-schedule-suspend-in-pm-idle.patch mei-fix-return-value-on-disconnect-timeout.patch mei-reset-client-connection-state-on-timeout.patch mei-start-disconnect-request-timer-consistently.patch mmc-mmci-move-all-cmd-irq-handling-to-mmci_cmd_irq.patch mmc-mmci-remove-redundant-check-of-status-for-data-irq.patch sched-fix-sched_setparam-policy-1-logic.patch uas-limit-qdepth-to-32-when-connected-over-usb-2.patch usb-devio-fix-issue-with-log-flooding.patch usb-ehci-pci-usb-host-controller-support-for-intel-quark-x1000.patch usb-fix-persist-resume-of-some-ss-usb-devices.patch usb-ohci-don-t-lose-track-of-eds-when-a-controller-dies.patch usb-ohci-fix-bugs-in-debug-routines.patch usb-serial-ftdi_sio-add-support-for-new-xsens-devices.patch usb-serial-ftdi_sio-annotate-the-current-xsens-pid-assignments.patch usbcore-don-t-log-on-consecutive-debounce-failures-of-the-same-port.patch xhci-blacklist-using-streams-on-the-etron-ej168-controller.patch --- diff --git a/queue-3.16/alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch b/queue-3.16/alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch new file mode 100644 index 00000000000..89f904d52dc --- /dev/null +++ b/queue-3.16/alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch @@ -0,0 +1,31 @@ +From 423044744aa4c250058e976474856a7a41972182 Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Tue, 22 Jul 2014 11:42:17 +0200 +Subject: ALSA: hda - Add mute LED pin quirk for HP 15 touchsmart + +From: David Henningsson + +commit 423044744aa4c250058e976474856a7a41972182 upstream. + +This makes the mute LED work on a HP 15 touchsmart machine. + +BugLink: https://bugs.launchpad.net/bugs/1334950 +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -4782,6 +4782,8 @@ static const struct snd_pci_quirk alc269 + SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), + SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), + /* ALC282 */ ++ SND_PCI_QUIRK(0x103c, 0x2191, "HP Touchsmart 14", ALC269_FIXUP_HP_MUTE_LED_MIC1), ++ SND_PCI_QUIRK(0x103c, 0x2192, "HP Touchsmart 15", ALC269_FIXUP_HP_MUTE_LED_MIC1), + SND_PCI_QUIRK(0x103c, 0x220d, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), + SND_PCI_QUIRK(0x103c, 0x220e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), + SND_PCI_QUIRK(0x103c, 0x220f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), diff --git a/queue-3.16/alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch b/queue-3.16/alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch new file mode 100644 index 00000000000..50878277f49 --- /dev/null +++ b/queue-3.16/alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch @@ -0,0 +1,58 @@ +From e24aa0a4c5ac92a171d9dd74a8d3dbf652990d36 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sun, 10 Aug 2014 13:30:08 +0200 +Subject: ALSA: hda/ca0132 - Don't try loading firmware at resume when already failed + +From: Takashi Iwai + +commit e24aa0a4c5ac92a171d9dd74a8d3dbf652990d36 upstream. + +CA0132 driver tries to reload the firmware at resume. Usually this +works since the firmware loader core caches the firmware contents by +itself. However, if the driver failed to load the firmwares +(e.g. missing files), reloading the firmware at resume goes through +the actual file loading code path, and triggers a kernel WARNING like: + + WARNING: CPU: 10 PID:11371 at drivers/base/firmware_class.c:1105 _request_firmware+0x9ab/0x9d0() + +For avoiding this situation, this patch makes CA0132 skipping the f/w +loading at resume when it failed at probe time. + +Reported-and-tested-by: Janek Kozicki +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_ca0132.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_ca0132.c ++++ b/sound/pci/hda/patch_ca0132.c +@@ -4376,6 +4376,9 @@ static void ca0132_download_dsp(struct h + return; /* NOP */ + #endif + ++ if (spec->dsp_state == DSP_DOWNLOAD_FAILED) ++ return; /* don't retry failures */ ++ + chipio_enable_clocks(codec); + spec->dsp_state = DSP_DOWNLOADING; + if (!ca0132_download_dsp_images(codec)) +@@ -4552,7 +4555,8 @@ static int ca0132_init(struct hda_codec + struct auto_pin_cfg *cfg = &spec->autocfg; + int i; + +- spec->dsp_state = DSP_DOWNLOAD_INIT; ++ if (spec->dsp_state != DSP_DOWNLOAD_FAILED) ++ spec->dsp_state = DSP_DOWNLOAD_INIT; + spec->curr_chip_addx = INVALID_CHIP_ADDRESS; + + snd_hda_power_up(codec); +@@ -4663,6 +4667,7 @@ static int patch_ca0132(struct hda_codec + codec->spec = spec; + spec->codec = codec; + ++ spec->dsp_state = DSP_DOWNLOAD_INIT; + spec->num_mixers = 1; + spec->mixers[0] = ca0132_mixer; + diff --git a/queue-3.16/alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch b/queue-3.16/alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch new file mode 100644 index 00000000000..af328734619 --- /dev/null +++ b/queue-3.16/alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch @@ -0,0 +1,66 @@ +From 7440850c20b69658f322119d20a94dc914127cc7 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Wed, 30 Jul 2014 11:11:48 +0800 +Subject: ALSA: hda - fix an external mic jack problem on a HP machine + +From: Hui Wang + +commit 7440850c20b69658f322119d20a94dc914127cc7 upstream. + +ON the machine, two pin complex (0xb and 0xe) are both routed to +the same external right-side mic jack, this makes the jack can't work. + +To fix this problem, set the 0xe to "not connected". + +BugLink: https://bugs.launchpad.net/bugs/1350148 +Tested-by: Franz Hsieh +Signed-off-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_sigmatel.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/sound/pci/hda/patch_sigmatel.c ++++ b/sound/pci/hda/patch_sigmatel.c +@@ -84,6 +84,7 @@ enum { + STAC_DELL_EQ, + STAC_ALIENWARE_M17X, + STAC_92HD89XX_HP_FRONT_JACK, ++ STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK, + STAC_92HD73XX_MODELS + }; + +@@ -1809,6 +1810,11 @@ static const struct hda_pintbl stac92hd8 + {} + }; + ++static const struct hda_pintbl stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs[] = { ++ { 0x0e, 0x400000f0 }, ++ {} ++}; ++ + static void stac92hd73xx_fixup_ref(struct hda_codec *codec, + const struct hda_fixup *fix, int action) + { +@@ -1931,6 +1937,10 @@ static const struct hda_fixup stac92hd73 + [STAC_92HD89XX_HP_FRONT_JACK] = { + .type = HDA_FIXUP_PINS, + .v.pins = stac92hd89xx_hp_front_jack_pin_configs, ++ }, ++ [STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK] = { ++ .type = HDA_FIXUP_PINS, ++ .v.pins = stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs, + } + }; + +@@ -1991,6 +2001,8 @@ static const struct snd_pci_quirk stac92 + "Alienware M17x", STAC_ALIENWARE_M17X), + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, + "Alienware M17x R3", STAC_DELL_EQ), ++ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1927, ++ "HP Z1 G2", STAC_92HD89XX_HP_Z1_G2_RIGHT_MIC_JACK), + SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17, + "unknown HP", STAC_92HD89XX_HP_FRONT_JACK), + {} /* terminator */ diff --git a/queue-3.16/alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch b/queue-3.16/alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch new file mode 100644 index 00000000000..687598f7940 --- /dev/null +++ b/queue-3.16/alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch @@ -0,0 +1,85 @@ +From f3ee07d8b6e061bf34a7167c3f564e8da4360a99 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 15 Aug 2014 17:35:00 +0200 +Subject: ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co + +From: Takashi Iwai + +commit f3ee07d8b6e061bf34a7167c3f564e8da4360a99 upstream. + +ALC269 & co have many vendor-specific setups with COEF verbs. +However, some verbs seem specific to some codec versions and they +result in the codec stalling. Typically, such a case can be avoided +by checking the return value from reading a COEF. If the return value +is -1, it implies that the COEF is invalid, thus it shouldn't be +written. + +This patch adds the invalid COEF checks in appropriate places +accessing ALC269 and its variants. The patch actually fixes the +resume problem on Acer AO725 laptop. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181 +Tested-by: Francesco Muzio +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -180,6 +180,8 @@ static void alc_fix_pll(struct hda_codec + spec->pll_coef_idx); + val = snd_hda_codec_read(codec, spec->pll_nid, 0, + AC_VERB_GET_PROC_COEF, 0); ++ if (val == -1) ++ return; + snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_COEF_INDEX, + spec->pll_coef_idx); + snd_hda_codec_write(codec, spec->pll_nid, 0, AC_VERB_SET_PROC_COEF, +@@ -2784,6 +2786,8 @@ static int alc269_parse_auto_config(stru + static void alc269vb_toggle_power_output(struct hda_codec *codec, int power_up) + { + int val = alc_read_coef_idx(codec, 0x04); ++ if (val == -1) ++ return; + if (power_up) + val |= 1 << 11; + else +@@ -5133,27 +5137,30 @@ static void alc269_fill_coef(struct hda_ + if ((alc_get_coef0(codec) & 0x00ff) == 0x017) { + val = alc_read_coef_idx(codec, 0x04); + /* Power up output pin */ +- alc_write_coef_idx(codec, 0x04, val | (1<<11)); ++ if (val != -1) ++ alc_write_coef_idx(codec, 0x04, val | (1<<11)); + } + + if ((alc_get_coef0(codec) & 0x00ff) == 0x018) { + val = alc_read_coef_idx(codec, 0xd); +- if ((val & 0x0c00) >> 10 != 0x1) { ++ if (val != -1 && (val & 0x0c00) >> 10 != 0x1) { + /* Capless ramp up clock control */ + alc_write_coef_idx(codec, 0xd, val | (1<<10)); + } + val = alc_read_coef_idx(codec, 0x17); +- if ((val & 0x01c0) >> 6 != 0x4) { ++ if (val != -1 && (val & 0x01c0) >> 6 != 0x4) { + /* Class D power on reset */ + alc_write_coef_idx(codec, 0x17, val | (1<<7)); + } + } + + val = alc_read_coef_idx(codec, 0xd); /* Class D */ +- alc_write_coef_idx(codec, 0xd, val | (1<<14)); ++ if (val != -1) ++ alc_write_coef_idx(codec, 0xd, val | (1<<14)); + + val = alc_read_coef_idx(codec, 0x4); /* HP */ +- alc_write_coef_idx(codec, 0x4, val | (1<<11)); ++ if (val != -1) ++ alc_write_coef_idx(codec, 0x4, val | (1<<11)); + } + + /* diff --git a/queue-3.16/alsa-hda-restore-the-gpio-led-after-resume.patch b/queue-3.16/alsa-hda-restore-the-gpio-led-after-resume.patch new file mode 100644 index 00000000000..2433390a76a --- /dev/null +++ b/queue-3.16/alsa-hda-restore-the-gpio-led-after-resume.patch @@ -0,0 +1,52 @@ +From f475371aa65de84fa483a998ab7594531026b9d9 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Tue, 19 Aug 2014 12:07:03 +0800 +Subject: ALSA: hda - restore the gpio led after resume + +From: Hui Wang + +commit f475371aa65de84fa483a998ab7594531026b9d9 upstream. + +On some HP laptops, the mute led is controlled by codec gpio. + +When some machine resume from s3/s4, the codec gpio data will be +cleared to 0 by BIOS: +Before suspend: + IO[3]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0 +After resume: + IO[3]: enable=1, dir=1, wake=0, sticky=0, data=0, unsol=0 + +To skip the AFG node to enter D3 can't fix this problem. + +A workaround is to restore the gpio data when the system resume +back from s3/s4. It is safe even on the machines without this +problem. + +BugLink: https://bugs.launchpad.net/bugs/1358116 +Tested-by: Franz Hsieh +Signed-off-by: Hui Wang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -3242,6 +3242,15 @@ static int alc269_resume(struct hda_code + snd_hda_codec_resume_cache(codec); + alc_inv_dmic_sync(codec, true); + hda_call_check_power_status(codec, 0x01); ++ ++ /* on some machine, the BIOS will clear the codec gpio data when enter ++ * suspend, and won't restore the data after resume, so we restore it ++ * in the driver. ++ */ ++ if (spec->gpio_led) ++ snd_hda_codec_write(codec, codec->afg, 0, AC_VERB_SET_GPIO_DATA, ++ spec->gpio_led); ++ + if (spec->has_alc5505_dsp) + alc5505_dsp_resume(codec); + diff --git a/queue-3.16/alsa-usb-audio-adjust-gamecom-780-volume-level.patch b/queue-3.16/alsa-usb-audio-adjust-gamecom-780-volume-level.patch new file mode 100644 index 00000000000..b6d422b99b9 --- /dev/null +++ b/queue-3.16/alsa-usb-audio-adjust-gamecom-780-volume-level.patch @@ -0,0 +1,34 @@ +From 542baf94ec3c5526955b4c9fd899c7f30fae4ebe Mon Sep 17 00:00:00 2001 +From: Paul S McSpadden +Date: Sun, 3 Aug 2014 17:47:36 -0500 +Subject: ALSA: usb-audio: Adjust Gamecom 780 volume level + +From: Paul S McSpadden + +commit 542baf94ec3c5526955b4c9fd899c7f30fae4ebe upstream. + +Original patch fixed the original problem, but the sound was far too low +for most users. This patch references a compare matrix to allow the +volume levels to act normally. I personally tested this patch myself, +and volume levels returned to normal. Please see this discussion for +more details: https://bugzilla.kernel.org/show_bug.cgi?id=65251 + +Signed-off-by: Paul S McSpadden +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -670,7 +670,7 @@ static int snd_usb_gamecon780_boot_quirk + /* set the initial volume and don't change; other values are either + * too loud or silent due to firmware bug (bko#65251) + */ +- u8 buf[2] = { 0x74, 0xdc }; ++ u8 buf[2] = { 0x74, 0xe3 }; + return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR, + USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_OUT, + UAC_FU_VOLUME << 8, 9 << 8, buf, 2); diff --git a/queue-3.16/alsa-usb-audio-fix-boss-me-25-midi-regression.patch b/queue-3.16/alsa-usb-audio-fix-boss-me-25-midi-regression.patch new file mode 100644 index 00000000000..83e746cd97a --- /dev/null +++ b/queue-3.16/alsa-usb-audio-fix-boss-me-25-midi-regression.patch @@ -0,0 +1,60 @@ +From 53da5ebfef66ea6e478ad9c6add3781472b79475 Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Sat, 9 Aug 2014 17:19:41 +0200 +Subject: ALSA: usb-audio: fix BOSS ME-25 MIDI regression + +From: Clemens Ladisch + +commit 53da5ebfef66ea6e478ad9c6add3781472b79475 upstream. + +The BOSS ME-25 turns out not to have any useful descriptors in its MIDI +interface, so its needs a quirk entry after all. + +Reported-and-tested-by: Kees van Veen +Fixes: 8e5ced83dd1c ("ALSA: usb-audio: remove superfluous Roland quirks") +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/quirks-table.h | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -1581,6 +1581,35 @@ YAMAHA_DEVICE(0x7010, "UB99"), + } + }, + { ++ /* BOSS ME-25 */ ++ USB_DEVICE(0x0582, 0x0113), ++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { ++ .ifnum = QUIRK_ANY_INTERFACE, ++ .type = QUIRK_COMPOSITE, ++ .data = (const struct snd_usb_audio_quirk[]) { ++ { ++ .ifnum = 0, ++ .type = QUIRK_AUDIO_STANDARD_INTERFACE ++ }, ++ { ++ .ifnum = 1, ++ .type = QUIRK_AUDIO_STANDARD_INTERFACE ++ }, ++ { ++ .ifnum = 2, ++ .type = QUIRK_MIDI_FIXED_ENDPOINT, ++ .data = & (const struct snd_usb_midi_endpoint_info) { ++ .out_cables = 0x0001, ++ .in_cables = 0x0001 ++ } ++ }, ++ { ++ .ifnum = -1 ++ } ++ } ++ } ++}, ++{ + /* only 44.1 kHz works at the moment */ + USB_DEVICE(0x0582, 0x0120), + .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { diff --git a/queue-3.16/alsa-virtuoso-add-xonar-essence-stx-ii-support.patch b/queue-3.16/alsa-virtuoso-add-xonar-essence-stx-ii-support.patch new file mode 100644 index 00000000000..6be2e09048a --- /dev/null +++ b/queue-3.16/alsa-virtuoso-add-xonar-essence-stx-ii-support.patch @@ -0,0 +1,89 @@ +From f42bb22243d2ae264d721b055f836059fe35321f Mon Sep 17 00:00:00 2001 +From: Clemens Ladisch +Date: Mon, 4 Aug 2014 15:17:55 +0200 +Subject: ALSA: virtuoso: add Xonar Essence STX II support + +From: Clemens Ladisch + +commit f42bb22243d2ae264d721b055f836059fe35321f upstream. + +Just add the PCI ID for the STX II. It appears to work the same as the +STX, except for the addition of the not-yet-supported daughterboard. + +Tested-by: Mario +Tested-by: corubba +Signed-off-by: Clemens Ladisch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/sound/alsa/ALSA-Configuration.txt | 4 ++-- + sound/pci/Kconfig | 4 ++-- + sound/pci/oxygen/virtuoso.c | 1 + + sound/pci/oxygen/xonar_pcm179x.c | 12 ++++++++++-- + 4 files changed, 15 insertions(+), 6 deletions(-) + +--- a/Documentation/sound/alsa/ALSA-Configuration.txt ++++ b/Documentation/sound/alsa/ALSA-Configuration.txt +@@ -2026,8 +2026,8 @@ Prior to version 0.9.0rc4 options had a + ------------------- + + Module for sound cards based on the Asus AV66/AV100/AV200 chips, +- i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX, +- HDAV1.3 (Deluxe), and HDAV1.3 Slim. ++ i.e., Xonar D1, DX, D2, D2X, DS, DSX, Essence ST (Deluxe), ++ Essence STX (II), HDAV1.3 (Deluxe), and HDAV1.3 Slim. + + This module supports autoprobe and multiple cards. + +--- a/sound/pci/Kconfig ++++ b/sound/pci/Kconfig +@@ -858,8 +858,8 @@ config SND_VIRTUOSO + select SND_JACK if INPUT=y || INPUT=SND + help + Say Y here to include support for sound cards based on the +- Asus AV66/AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X, DS, +- Essence ST (Deluxe), and Essence STX. ++ Asus AV66/AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X, DS, DSX, ++ Essence ST (Deluxe), and Essence STX (II). + Support for the HDAV1.3 (Deluxe) and HDAV1.3 Slim is experimental; + for the Xense, missing. + +--- a/sound/pci/oxygen/virtuoso.c ++++ b/sound/pci/oxygen/virtuoso.c +@@ -53,6 +53,7 @@ static DEFINE_PCI_DEVICE_TABLE(xonar_ids + { OXYGEN_PCI_SUBID(0x1043, 0x835e) }, + { OXYGEN_PCI_SUBID(0x1043, 0x838e) }, + { OXYGEN_PCI_SUBID(0x1043, 0x8522) }, ++ { OXYGEN_PCI_SUBID(0x1043, 0x85f4) }, + { OXYGEN_PCI_SUBID_BROKEN_EEPROM }, + { } + }; +--- a/sound/pci/oxygen/xonar_pcm179x.c ++++ b/sound/pci/oxygen/xonar_pcm179x.c +@@ -100,8 +100,8 @@ + */ + + /* +- * Xonar Essence ST (Deluxe)/STX +- * ----------------------------- ++ * Xonar Essence ST (Deluxe)/STX (II) ++ * ---------------------------------- + * + * CMI8788: + * +@@ -1137,6 +1137,14 @@ int get_xonar_pcm179x_model(struct oxyge + chip->model.init = xonar_stx_init; + chip->model.resume = xonar_stx_resume; + chip->model.set_dac_params = set_pcm1796_params; ++ break; ++ case 0x85f4: ++ chip->model = model_xonar_st; ++ /* TODO: daughterboard support */ ++ chip->model.shortname = "Xonar STX II"; ++ chip->model.init = xonar_stx_init; ++ chip->model.resume = xonar_stx_resume; ++ chip->model.set_dac_params = set_pcm1796_params; + break; + default: + return -EINVAL; diff --git a/queue-3.16/arm-8097-1-unistd.h-relocate-comments-back-to-place.patch b/queue-3.16/arm-8097-1-unistd.h-relocate-comments-back-to-place.patch new file mode 100644 index 00000000000..796ec0ad7e6 --- /dev/null +++ b/queue-3.16/arm-8097-1-unistd.h-relocate-comments-back-to-place.patch @@ -0,0 +1,70 @@ +From bc994c77ce82576209dcf08f71de9ae51b0b100f Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 9 Jul 2014 13:33:13 +0100 +Subject: ARM: 8097/1: unistd.h: relocate comments back to place + +From: Baruch Siach + +commit bc994c77ce82576209dcf08f71de9ae51b0b100f upstream. + +Commit cb8db5d45 (UAPI: (Scripted) Disintegrate arch/arm/include/asm) moved +these syscall comments out of their context into the UAPI headers. Fix this. + +Fixes: cb8db5d4578a ("UAPI: (Scripted) Disintegrate arch/arm/include/asm") + +Signed-off-by: Baruch Siach +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/include/asm/unistd.h | 10 ++++++++++ + arch/arm/include/uapi/asm/unistd.h | 11 ----------- + 2 files changed, 10 insertions(+), 11 deletions(-) + +--- a/arch/arm/include/asm/unistd.h ++++ b/arch/arm/include/asm/unistd.h +@@ -15,7 +15,17 @@ + + #include + ++/* ++ * This may need to be greater than __NR_last_syscall+1 in order to ++ * account for the padding in the syscall table ++ */ + #define __NR_syscalls (384) ++ ++/* ++ * *NOTE*: This is a ghost syscall private to the kernel. Only the ++ * __kuser_cmpxchg code in entry-armv.S should be aware of its ++ * existence. Don't ever use this from user code. ++ */ + #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) + + #define __ARCH_WANT_STAT64 +--- a/arch/arm/include/uapi/asm/unistd.h ++++ b/arch/arm/include/uapi/asm/unistd.h +@@ -411,11 +411,6 @@ + #define __NR_renameat2 (__NR_SYSCALL_BASE+382) + + /* +- * This may need to be greater than __NR_last_syscall+1 in order to +- * account for the padding in the syscall table +- */ +- +-/* + * The following SWIs are ARM private. + */ + #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) +@@ -426,12 +421,6 @@ + #define __ARM_NR_set_tls (__ARM_NR_BASE+5) + + /* +- * *NOTE*: This is a ghost syscall private to the kernel. Only the +- * __kuser_cmpxchg code in entry-armv.S should be aware of its +- * existence. Don't ever use this from user code. +- */ +- +-/* + * The following syscalls are obsolete and no longer available for EABI. + */ + #if !defined(__KERNEL__) diff --git a/queue-3.16/arm-dts-am4372-correct-mailbox-node-data.patch b/queue-3.16/arm-dts-am4372-correct-mailbox-node-data.patch new file mode 100644 index 00000000000..bd9d4e45c9c --- /dev/null +++ b/queue-3.16/arm-dts-am4372-correct-mailbox-node-data.patch @@ -0,0 +1,33 @@ +From 44e6ab1b619853f05bf7250e55a6d82864e340d7 Mon Sep 17 00:00:00 2001 +From: Suman Anna +Date: Fri, 11 Jul 2014 16:44:37 -0500 +Subject: ARM: dts: AM4372: Correct mailbox node data + +From: Suman Anna + +commit 44e6ab1b619853f05bf7250e55a6d82864e340d7 upstream. + +The mailbox DT node for AM4372 is enabled and is corrected to +remove some properties that have crept in by mistake. + +Fixes: 9e3269b (ARM: dts: AM4372: Add L2, EDMA, mailbox, MMC and SHAM nodes) +Signed-off-by: Suman Anna +Signed-off-by: Tony Lindgren +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/am4372.dtsi | 3 --- + 1 file changed, 3 deletions(-) + +--- a/arch/arm/boot/dts/am4372.dtsi ++++ b/arch/arm/boot/dts/am4372.dtsi +@@ -168,9 +168,6 @@ + ti,hwmods = "mailbox"; + ti,mbox-num-users = <4>; + ti,mbox-num-fifos = <8>; +- ti,mbox-names = "wkup_m3"; +- ti,mbox-data = <0 0 0 0>; +- status = "disabled"; + }; + + timer1: timer@44e31000 { diff --git a/queue-3.16/arm-omap3-fix-choice-of-omap3_restore_es-function-in-omap34xx-rev3.1.2-case.patch b/queue-3.16/arm-omap3-fix-choice-of-omap3_restore_es-function-in-omap34xx-rev3.1.2-case.patch new file mode 100644 index 00000000000..ee28c45e152 --- /dev/null +++ b/queue-3.16/arm-omap3-fix-choice-of-omap3_restore_es-function-in-omap34xx-rev3.1.2-case.patch @@ -0,0 +1,36 @@ +From 9b5f7428f8b16bd8980213f2b70baf1dd0b9e36c Mon Sep 17 00:00:00 2001 +From: Jeremy Vial +Date: Thu, 31 Jul 2014 15:10:33 +0200 +Subject: ARM: OMAP3: Fix choice of omap3_restore_es function in OMAP34XX rev3.1.2 case. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jeremy Vial + +commit 9b5f7428f8b16bd8980213f2b70baf1dd0b9e36c upstream. + +According to the comment “restore_es3: applies to 34xx >= ES3.0" in +"arch/arm/mach-omap2/sleep34xx.S”, omap3_restore_es3 should be used +if the revision of an OMAP34xx is ES3.1.2. + +Signed-off-by: Jeremy Vial +Signed-off-by: Tony Lindgren +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mach-omap2/control.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/arm/mach-omap2/control.c ++++ b/arch/arm/mach-omap2/control.c +@@ -314,7 +314,8 @@ void omap3_save_scratchpad_contents(void + scratchpad_contents.public_restore_ptr = + virt_to_phys(omap3_restore_3630); + else if (omap_rev() != OMAP3430_REV_ES3_0 && +- omap_rev() != OMAP3430_REV_ES3_1) ++ omap_rev() != OMAP3430_REV_ES3_1 && ++ omap_rev() != OMAP3430_REV_ES3_1_2) + scratchpad_contents.public_restore_ptr = + virt_to_phys(omap3_restore); + else diff --git a/queue-3.16/arm64-don-t-call-break-hooks-for-brk-exceptions-from-el0.patch b/queue-3.16/arm64-don-t-call-break-hooks-for-brk-exceptions-from-el0.patch new file mode 100644 index 00000000000..85755d7880b --- /dev/null +++ b/queue-3.16/arm64-don-t-call-break-hooks-for-brk-exceptions-from-el0.patch @@ -0,0 +1,58 @@ +From c878e0cff5c5e56b216951cbe75f7a3dd500a736 Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Thu, 31 Jul 2014 11:36:08 +0100 +Subject: arm64: don't call break hooks for BRK exceptions from EL0 + +From: Will Deacon + +commit c878e0cff5c5e56b216951cbe75f7a3dd500a736 upstream. + +Our break hooks are used to handle brk exceptions from kgdb (and potentially +kprobes if that code ever resurfaces), so don't bother calling them if +the BRK exception comes from userspace. + +This prevents userspace from trapping to a kdb shell on systems where +kgdb is enabled and active. + +Reported-by: Omar Sandoval +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kernel/debug-monitors.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +--- a/arch/arm64/kernel/debug-monitors.c ++++ b/arch/arm64/kernel/debug-monitors.c +@@ -315,20 +315,20 @@ static int brk_handler(unsigned long add + { + siginfo_t info; + +- if (call_break_hook(regs, esr) == DBG_HOOK_HANDLED) +- return 0; ++ if (user_mode(regs)) { ++ info = (siginfo_t) { ++ .si_signo = SIGTRAP, ++ .si_errno = 0, ++ .si_code = TRAP_BRKPT, ++ .si_addr = (void __user *)instruction_pointer(regs), ++ }; + +- if (!user_mode(regs)) ++ force_sig_info(SIGTRAP, &info, current); ++ } else if (call_break_hook(regs, esr) != DBG_HOOK_HANDLED) { ++ pr_warning("Unexpected kernel BRK exception at EL1\n"); + return -EFAULT; ++ } + +- info = (siginfo_t) { +- .si_signo = SIGTRAP, +- .si_errno = 0, +- .si_code = TRAP_BRKPT, +- .si_addr = (void __user *)instruction_pointer(regs), +- }; +- +- force_sig_info(SIGTRAP, &info, current); + return 0; + } + diff --git a/queue-3.16/arm64-fix-barriers-used-for-page-table-modifications.patch b/queue-3.16/arm64-fix-barriers-used-for-page-table-modifications.patch new file mode 100644 index 00000000000..9094940c614 --- /dev/null +++ b/queue-3.16/arm64-fix-barriers-used-for-page-table-modifications.patch @@ -0,0 +1,124 @@ +From 7f0b1bf04511348995d6fce38c87c98a3b5cb781 Mon Sep 17 00:00:00 2001 +From: Catalin Marinas +Date: Mon, 9 Jun 2014 11:55:03 +0100 +Subject: arm64: Fix barriers used for page table modifications + +From: Catalin Marinas + +commit 7f0b1bf04511348995d6fce38c87c98a3b5cb781 upstream. + +The architecture specification states that both DSB and ISB are required +between page table modifications and subsequent memory accesses using the +corresponding virtual address. When TLB invalidation takes place, the +tlb_flush_* functions already have the necessary barriers. However, there are +other functions like create_mapping() for which this is not the case. + +The patch adds the DSB+ISB instructions in the set_pte() function for +valid kernel mappings. The invalid pte case is handled by tlb_flush_* +and the user mappings in general have a corresponding update_mmu_cache() +call containing a DSB. Even when update_mmu_cache() isn't called, the +kernel can still cope with an unlikely spurious page fault by +re-executing the instruction. + +In addition, the set_pmd, set_pud() functions gain an ISB for +architecture compliance when block mappings are created. + +Signed-off-by: Catalin Marinas +Reported-by: Leif Lindholm +Acked-by: Steve Capper +Cc: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/include/asm/cacheflush.h | 11 +---------- + arch/arm64/include/asm/pgtable.h | 13 +++++++++++++ + arch/arm64/include/asm/tlbflush.h | 5 +++-- + 3 files changed, 17 insertions(+), 12 deletions(-) + +--- a/arch/arm64/include/asm/cacheflush.h ++++ b/arch/arm64/include/asm/cacheflush.h +@@ -138,19 +138,10 @@ static inline void __flush_icache_all(vo + #define flush_icache_page(vma,page) do { } while (0) + + /* +- * flush_cache_vmap() is used when creating mappings (eg, via vmap, +- * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT +- * caches, since the direct-mappings of these pages may contain cached +- * data, we need to do a full cache flush to ensure that writebacks +- * don't corrupt data placed into these pages via the new mappings. ++ * Not required on AArch64 (PIPT or VIPT non-aliasing D-cache). + */ + static inline void flush_cache_vmap(unsigned long start, unsigned long end) + { +- /* +- * set_pte_at() called from vmap_pte_range() does not +- * have a DSB after cleaning the cache line. +- */ +- dsb(ish); + } + + static inline void flush_cache_vunmap(unsigned long start, unsigned long end) +--- a/arch/arm64/include/asm/pgtable.h ++++ b/arch/arm64/include/asm/pgtable.h +@@ -138,6 +138,8 @@ extern struct page *empty_zero_page; + + #define pte_valid_user(pte) \ + ((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER)) ++#define pte_valid_not_user(pte) \ ++ ((pte_val(pte) & (PTE_VALID | PTE_USER)) == PTE_VALID) + + static inline pte_t pte_wrprotect(pte_t pte) + { +@@ -184,6 +186,15 @@ static inline pte_t pte_mkspecial(pte_t + static inline void set_pte(pte_t *ptep, pte_t pte) + { + *ptep = pte; ++ ++ /* ++ * Only if the new pte is valid and kernel, otherwise TLB maintenance ++ * or update_mmu_cache() have the necessary barriers. ++ */ ++ if (pte_valid_not_user(pte)) { ++ dsb(ishst); ++ isb(); ++ } + } + + extern void __sync_icache_dcache(pte_t pteval, unsigned long addr); +@@ -303,6 +314,7 @@ static inline void set_pmd(pmd_t *pmdp, + { + *pmdp = pmd; + dsb(ishst); ++ isb(); + } + + static inline void pmd_clear(pmd_t *pmdp) +@@ -333,6 +345,7 @@ static inline void set_pud(pud_t *pudp, + { + *pudp = pud; + dsb(ishst); ++ isb(); + } + + static inline void pud_clear(pud_t *pudp) +--- a/arch/arm64/include/asm/tlbflush.h ++++ b/arch/arm64/include/asm/tlbflush.h +@@ -122,6 +122,7 @@ static inline void flush_tlb_kernel_rang + for (addr = start; addr < end; addr += 1 << (PAGE_SHIFT - 12)) + asm("tlbi vaae1is, %0" : : "r"(addr)); + dsb(ish); ++ isb(); + } + + /* +@@ -131,8 +132,8 @@ static inline void update_mmu_cache(stru + unsigned long addr, pte_t *ptep) + { + /* +- * set_pte() does not have a DSB, so make sure that the page table +- * write is visible. ++ * set_pte() does not have a DSB for user mappings, so make sure that ++ * the page table write is visible. + */ + dsb(ishst); + } diff --git a/queue-3.16/drm-omapdrm-fix-compiler-errors.patch b/queue-3.16/drm-omapdrm-fix-compiler-errors.patch new file mode 100644 index 00000000000..c049772cf58 --- /dev/null +++ b/queue-3.16/drm-omapdrm-fix-compiler-errors.patch @@ -0,0 +1,115 @@ +From 2d31ca3ad7d5d44c8adc7f253c96ce33f3a2e931 Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 12 Jul 2014 10:53:41 +0100 +Subject: drm: omapdrm: fix compiler errors + +From: Russell King + +commit 2d31ca3ad7d5d44c8adc7f253c96ce33f3a2e931 upstream. + +Regular randconfig nightly testing has detected problems with omapdrm. + +omapdrm fails to build when the kernel is built to support 64-bit DMA +addresses and/or 64-bit physical addresses due to an assumption about +the width of these types. + +Use %pad to print DMA addresses, rather than %x or %Zx (which is even +more wrong than %x). Avoid passing a uint32_t pointer into a function +which expects dma_addr_t pointer. + +drivers/gpu/drm/omapdrm/omap_plane.c: In function 'omap_plane_pre_apply': +drivers/gpu/drm/omapdrm/omap_plane.c:145:2: error: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t' [-Werror=format] +drivers/gpu/drm/omapdrm/omap_plane.c:145:2: error: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'dma_addr_t' [-Werror=format] +make[5]: *** [drivers/gpu/drm/omapdrm/omap_plane.o] Error 1 +drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_get_paddr': +drivers/gpu/drm/omapdrm/omap_gem.c:794:4: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t' [-Werror=format] +drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_describe': +drivers/gpu/drm/omapdrm/omap_gem.c:991:4: error: format '%Zx' expects argument of type 'size_t', but argument 7 has type 'dma_addr_t' [-Werror=format] +drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_init': +drivers/gpu/drm/omapdrm/omap_gem.c:1470:4: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'dma_addr_t' [-Werror=format] +make[5]: *** [drivers/gpu/drm/omapdrm/omap_gem.o] Error 1 +drivers/gpu/drm/omapdrm/omap_dmm_tiler.c: In function 'dmm_txn_append': +drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:226:2: error: passing argument 3 of 'alloc_dma' from incompatible pointer type [-Werror] +make[5]: *** [drivers/gpu/drm/omapdrm/omap_dmm_tiler.o] Error 1 +make[5]: Target `__build' not remade because of errors. +make[4]: *** [drivers/gpu/drm/omapdrm] Error 2 + +Signed-off-by: Russell King +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 6 ++++-- + drivers/gpu/drm/omapdrm/omap_gem.c | 10 +++++----- + drivers/gpu/drm/omapdrm/omap_plane.c | 4 ++-- + 3 files changed, 11 insertions(+), 9 deletions(-) + +--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c ++++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +@@ -199,7 +199,7 @@ static struct dmm_txn *dmm_txn_init(stru + static void dmm_txn_append(struct dmm_txn *txn, struct pat_area *area, + struct page **pages, uint32_t npages, uint32_t roll) + { +- dma_addr_t pat_pa = 0; ++ dma_addr_t pat_pa = 0, data_pa = 0; + uint32_t *data; + struct pat *pat; + struct refill_engine *engine = txn->engine_handle; +@@ -223,7 +223,9 @@ static void dmm_txn_append(struct dmm_tx + .lut_id = engine->tcm->lut_id, + }; + +- data = alloc_dma(txn, 4*i, &pat->data_pa); ++ data = alloc_dma(txn, 4*i, &data_pa); ++ /* FIXME: what if data_pa is more than 32-bit ? */ ++ pat->data_pa = data_pa; + + while (i--) { + int n = i + roll; +--- a/drivers/gpu/drm/omapdrm/omap_gem.c ++++ b/drivers/gpu/drm/omapdrm/omap_gem.c +@@ -791,7 +791,7 @@ int omap_gem_get_paddr(struct drm_gem_ob + omap_obj->paddr = tiler_ssptr(block); + omap_obj->block = block; + +- DBG("got paddr: %08x", omap_obj->paddr); ++ DBG("got paddr: %pad", &omap_obj->paddr); + } + + omap_obj->paddr_cnt++; +@@ -985,9 +985,9 @@ void omap_gem_describe(struct drm_gem_ob + + off = drm_vma_node_start(&obj->vma_node); + +- seq_printf(m, "%08x: %2d (%2d) %08llx %08Zx (%2d) %p %4d", ++ seq_printf(m, "%08x: %2d (%2d) %08llx %pad (%2d) %p %4d", + omap_obj->flags, obj->name, obj->refcount.refcount.counter, +- off, omap_obj->paddr, omap_obj->paddr_cnt, ++ off, &omap_obj->paddr, omap_obj->paddr_cnt, + omap_obj->vaddr, omap_obj->roll); + + if (omap_obj->flags & OMAP_BO_TILED) { +@@ -1467,8 +1467,8 @@ void omap_gem_init(struct drm_device *de + entry->paddr = tiler_ssptr(block); + entry->block = block; + +- DBG("%d:%d: %dx%d: paddr=%08x stride=%d", i, j, w, h, +- entry->paddr, ++ DBG("%d:%d: %dx%d: paddr=%pad stride=%d", i, j, w, h, ++ &entry->paddr, + usergart[i].stride_pfn << PAGE_SHIFT); + } + } +--- a/drivers/gpu/drm/omapdrm/omap_plane.c ++++ b/drivers/gpu/drm/omapdrm/omap_plane.c +@@ -142,8 +142,8 @@ static void omap_plane_pre_apply(struct + DBG("%dx%d -> %dx%d (%d)", info->width, info->height, + info->out_width, info->out_height, + info->screen_width); +- DBG("%d,%d %08x %08x", info->pos_x, info->pos_y, +- info->paddr, info->p_uv_addr); ++ DBG("%d,%d %pad %pad", info->pos_x, info->pos_y, ++ &info->paddr, &info->p_uv_addr); + + /* TODO: */ + ilace = false; diff --git a/queue-3.16/efi-arm64-store-runtime-services-revision.patch b/queue-3.16/efi-arm64-store-runtime-services-revision.patch new file mode 100644 index 00000000000..8bf78c261ca --- /dev/null +++ b/queue-3.16/efi-arm64-store-runtime-services-revision.patch @@ -0,0 +1,36 @@ +From 6a7519e81321343165f89abb8b616df186d3e57a Mon Sep 17 00:00:00 2001 +From: Semen Protsenko +Date: Fri, 15 Aug 2014 16:22:44 +0300 +Subject: efi/arm64: Store Runtime Services revision + +From: Semen Protsenko + +commit 6a7519e81321343165f89abb8b616df186d3e57a upstream. + +"efi" global data structure contains "runtime_version" field which must +be assigned in order to use it later in Runtime Services virtual calls +(virt_efi_* functions). + +Before this patch "runtime_version" was unassigned (0), so each +Runtime Service virtual call that checks revision would fail. + +Signed-off-by: Semen Protsenko +Acked-by: Ard Biesheuvel +Signed-off-by: Matt Fleming +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/kernel/efi.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/kernel/efi.c ++++ b/arch/arm64/kernel/efi.c +@@ -464,6 +464,8 @@ static int __init arm64_enter_virtual_mo + + set_bit(EFI_RUNTIME_SERVICES, &efi.flags); + ++ efi.runtime_version = efi.systab->hdr.revision; ++ + return 0; + } + early_initcall(arm64_enter_virtual_mode); diff --git a/queue-3.16/isofs-fix-unbounded-recursion-when-processing-relocated-directories.patch b/queue-3.16/isofs-fix-unbounded-recursion-when-processing-relocated-directories.patch new file mode 100644 index 00000000000..2ca83cec279 --- /dev/null +++ b/queue-3.16/isofs-fix-unbounded-recursion-when-processing-relocated-directories.patch @@ -0,0 +1,202 @@ +From 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Sun, 17 Aug 2014 11:49:57 +0200 +Subject: isofs: Fix unbounded recursion when processing relocated directories + +From: Jan Kara + +commit 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 upstream. + +We did not check relocated directory in any way when processing Rock +Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL +entry pointing to another CL entry leading to possibly unbounded +recursion in kernel code and thus stack overflow or deadlocks (if there +is a loop created from CL entries). + +Fix the problem by not allowing CL entry to point to a directory entry +with CL entry (such use makes no good sense anyway) and by checking +whether CL entry doesn't point to itself. + +Reported-by: Chris Evans +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/isofs/inode.c | 15 ++++++++------- + fs/isofs/isofs.h | 23 +++++++++++++++++++---- + fs/isofs/rock.c | 39 ++++++++++++++++++++++++++++----------- + 3 files changed, 55 insertions(+), 22 deletions(-) + +--- a/fs/isofs/inode.c ++++ b/fs/isofs/inode.c +@@ -61,7 +61,7 @@ static void isofs_put_super(struct super + return; + } + +-static int isofs_read_inode(struct inode *); ++static int isofs_read_inode(struct inode *, int relocated); + static int isofs_statfs (struct dentry *, struct kstatfs *); + + static struct kmem_cache *isofs_inode_cachep; +@@ -1259,7 +1259,7 @@ out_toomany: + goto out; + } + +-static int isofs_read_inode(struct inode *inode) ++static int isofs_read_inode(struct inode *inode, int relocated) + { + struct super_block *sb = inode->i_sb; + struct isofs_sb_info *sbi = ISOFS_SB(sb); +@@ -1404,7 +1404,7 @@ static int isofs_read_inode(struct inode + */ + + if (!high_sierra) { +- parse_rock_ridge_inode(de, inode); ++ parse_rock_ridge_inode(de, inode, relocated); + /* if we want uid/gid set, override the rock ridge setting */ + if (sbi->s_uid_set) + inode->i_uid = sbi->s_uid; +@@ -1483,9 +1483,10 @@ static int isofs_iget5_set(struct inode + * offset that point to the underlying meta-data for the inode. The + * code below is otherwise similar to the iget() code in + * include/linux/fs.h */ +-struct inode *isofs_iget(struct super_block *sb, +- unsigned long block, +- unsigned long offset) ++struct inode *__isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset, ++ int relocated) + { + unsigned long hashval; + struct inode *inode; +@@ -1507,7 +1508,7 @@ struct inode *isofs_iget(struct super_bl + return ERR_PTR(-ENOMEM); + + if (inode->i_state & I_NEW) { +- ret = isofs_read_inode(inode); ++ ret = isofs_read_inode(inode, relocated); + if (ret < 0) { + iget_failed(inode); + inode = ERR_PTR(ret); +--- a/fs/isofs/isofs.h ++++ b/fs/isofs/isofs.h +@@ -107,7 +107,7 @@ extern int iso_date(char *, int); + + struct inode; /* To make gcc happy */ + +-extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *); ++extern int parse_rock_ridge_inode(struct iso_directory_record *, struct inode *, int relocated); + extern int get_rock_ridge_filename(struct iso_directory_record *, char *, struct inode *); + extern int isofs_name_translate(struct iso_directory_record *, char *, struct inode *); + +@@ -118,9 +118,24 @@ extern struct dentry *isofs_lookup(struc + extern struct buffer_head *isofs_bread(struct inode *, sector_t); + extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long); + +-extern struct inode *isofs_iget(struct super_block *sb, +- unsigned long block, +- unsigned long offset); ++struct inode *__isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset, ++ int relocated); ++ ++static inline struct inode *isofs_iget(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset) ++{ ++ return __isofs_iget(sb, block, offset, 0); ++} ++ ++static inline struct inode *isofs_iget_reloc(struct super_block *sb, ++ unsigned long block, ++ unsigned long offset) ++{ ++ return __isofs_iget(sb, block, offset, 1); ++} + + /* Because the inode number is no longer relevant to finding the + * underlying meta-data for an inode, we are free to choose a more +--- a/fs/isofs/rock.c ++++ b/fs/isofs/rock.c +@@ -288,12 +288,16 @@ eio: + goto out; + } + ++#define RR_REGARD_XA 1 ++#define RR_RELOC_DE 2 ++ + static int + parse_rock_ridge_inode_internal(struct iso_directory_record *de, +- struct inode *inode, int regard_xa) ++ struct inode *inode, int flags) + { + int symlink_len = 0; + int cnt, sig; ++ unsigned int reloc_block; + struct inode *reloc; + struct rock_ridge *rr; + int rootflag; +@@ -305,7 +309,7 @@ parse_rock_ridge_inode_internal(struct i + + init_rock_state(&rs, inode); + setup_rock_ridge(de, inode, &rs); +- if (regard_xa) { ++ if (flags & RR_REGARD_XA) { + rs.chr += 14; + rs.len -= 14; + if (rs.len < 0) +@@ -485,12 +489,22 @@ repeat: + "relocated directory\n"); + goto out; + case SIG('C', 'L'): +- ISOFS_I(inode)->i_first_extent = +- isonum_733(rr->u.CL.location); +- reloc = +- isofs_iget(inode->i_sb, +- ISOFS_I(inode)->i_first_extent, +- 0); ++ if (flags & RR_RELOC_DE) { ++ printk(KERN_ERR ++ "ISOFS: Recursive directory relocation " ++ "is not supported\n"); ++ goto eio; ++ } ++ reloc_block = isonum_733(rr->u.CL.location); ++ if (reloc_block == ISOFS_I(inode)->i_iget5_block && ++ ISOFS_I(inode)->i_iget5_offset == 0) { ++ printk(KERN_ERR ++ "ISOFS: Directory relocation points to " ++ "itself\n"); ++ goto eio; ++ } ++ ISOFS_I(inode)->i_first_extent = reloc_block; ++ reloc = isofs_iget_reloc(inode->i_sb, reloc_block, 0); + if (IS_ERR(reloc)) { + ret = PTR_ERR(reloc); + goto out; +@@ -637,9 +651,11 @@ static char *get_symlink_chunk(char *rpn + return rpnt; + } + +-int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode) ++int parse_rock_ridge_inode(struct iso_directory_record *de, struct inode *inode, ++ int relocated) + { +- int result = parse_rock_ridge_inode_internal(de, inode, 0); ++ int flags = relocated ? RR_RELOC_DE : 0; ++ int result = parse_rock_ridge_inode_internal(de, inode, flags); + + /* + * if rockridge flag was reset and we didn't look for attributes +@@ -647,7 +663,8 @@ int parse_rock_ridge_inode(struct iso_di + */ + if ((ISOFS_SB(inode->i_sb)->s_rock_offset == -1) + && (ISOFS_SB(inode->i_sb)->s_rock == 2)) { +- result = parse_rock_ridge_inode_internal(de, inode, 14); ++ result = parse_rock_ridge_inode_internal(de, inode, ++ flags | RR_REGARD_XA); + } + return result; + } diff --git a/queue-3.16/mei-don-t-schedule-suspend-in-pm-idle.patch b/queue-3.16/mei-don-t-schedule-suspend-in-pm-idle.patch new file mode 100644 index 00000000000..f8bf3ff3b01 --- /dev/null +++ b/queue-3.16/mei-don-t-schedule-suspend-in-pm-idle.patch @@ -0,0 +1,50 @@ +From d5d83f8abea13d0b50ee762276c6c900d1946264 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Thu, 17 Jul 2014 10:53:36 +0300 +Subject: mei: don't schedule suspend in pm idle + +From: Alexander Usyskin + +commit d5d83f8abea13d0b50ee762276c6c900d1946264 upstream. + +Calling pm_schedule_suspend from the runtime pm idle callback +may reschedule existing timer, thus in case of frequent runtime +rpm idle call the suspend maybe starved. +Instead we call pm_runtime_autosuspend which is checking if the +timer is already charged. + +An example is monitoring device pci config space. +Pci config sysfs handlers calls pci_config_pm_runtime_put/get +helpers which in turns calls to device idle callback + +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/pci-me.c | 2 +- + drivers/misc/mei/pci-txe.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/misc/mei/pci-me.c ++++ b/drivers/misc/mei/pci-me.c +@@ -369,7 +369,7 @@ static int mei_me_pm_runtime_idle(struct + if (!dev) + return -ENODEV; + if (mei_write_is_idle(dev)) +- pm_schedule_suspend(device, MEI_ME_RPM_TIMEOUT * 2); ++ pm_runtime_autosuspend(device); + + return -EBUSY; + } +--- a/drivers/misc/mei/pci-txe.c ++++ b/drivers/misc/mei/pci-txe.c +@@ -306,7 +306,7 @@ static int mei_txe_pm_runtime_idle(struc + if (!dev) + return -ENODEV; + if (mei_write_is_idle(dev)) +- pm_schedule_suspend(device, MEI_TXI_RPM_TIMEOUT * 2); ++ pm_runtime_autosuspend(device); + + return -EBUSY; + } diff --git a/queue-3.16/mei-fix-return-value-on-disconnect-timeout.patch b/queue-3.16/mei-fix-return-value-on-disconnect-timeout.patch new file mode 100644 index 00000000000..bdb6b328267 --- /dev/null +++ b/queue-3.16/mei-fix-return-value-on-disconnect-timeout.patch @@ -0,0 +1,59 @@ +From fe2f17eb3da38ac0d5a00c511255bf3a33d16d24 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Thu, 17 Jul 2014 10:53:38 +0300 +Subject: mei: fix return value on disconnect timeout + +From: Alexander Usyskin + +commit fe2f17eb3da38ac0d5a00c511255bf3a33d16d24 upstream. + +wait_event_timeout can return 0 or the remaining jiffies +so return -ETIME if disconnected state not reached. + +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/client.c | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +--- a/drivers/misc/mei/client.c ++++ b/drivers/misc/mei/client.c +@@ -459,7 +459,7 @@ int mei_cl_disconnect(struct mei_cl *cl) + { + struct mei_device *dev; + struct mei_cl_cb *cb; +- int rets, err; ++ int rets; + + if (WARN_ON(!cl || !cl->dev)) + return -ENODEV; +@@ -501,23 +501,18 @@ int mei_cl_disconnect(struct mei_cl *cl) + } + mutex_unlock(&dev->device_lock); + +- err = wait_event_timeout(dev->wait_recvd_msg, ++ wait_event_timeout(dev->wait_recvd_msg, + MEI_FILE_DISCONNECTED == cl->state, + mei_secs_to_jiffies(MEI_CL_CONNECT_TIMEOUT)); + + mutex_lock(&dev->device_lock); ++ + if (MEI_FILE_DISCONNECTED == cl->state) { + rets = 0; + cl_dbg(dev, cl, "successfully disconnected from FW client.\n"); + } else { +- rets = -ENODEV; +- if (MEI_FILE_DISCONNECTED != cl->state) +- cl_err(dev, cl, "wrong status client disconnect.\n"); +- +- if (err) +- cl_dbg(dev, cl, "wait failed disconnect err=%d\n", err); +- +- cl_err(dev, cl, "failed to disconnect from FW client.\n"); ++ cl_dbg(dev, cl, "timeout on disconnect from FW client.\n"); ++ rets = -ETIME; + } + + mei_io_list_flush(&dev->ctrl_rd_list, cl); diff --git a/queue-3.16/mei-reset-client-connection-state-on-timeout.patch b/queue-3.16/mei-reset-client-connection-state-on-timeout.patch new file mode 100644 index 00000000000..0b6af46827c --- /dev/null +++ b/queue-3.16/mei-reset-client-connection-state-on-timeout.patch @@ -0,0 +1,33 @@ +From 3e37ebb7183f0c4eb92a88c60657ac319c01b3e9 Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Thu, 17 Jul 2014 10:53:34 +0300 +Subject: mei: reset client connection state on timeout + +From: Alexander Usyskin + +commit 3e37ebb7183f0c4eb92a88c60657ac319c01b3e9 upstream. + +On connection timeout we leave the connecting client in +connecting state. Since a new connection is stalled till +previous connection is completed in this case no new connection +is possible till the user space does release the file handle. +Therefore on timeout we move the client to disconnected state. + +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/client.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/misc/mei/client.c ++++ b/drivers/misc/mei/client.c +@@ -616,6 +616,7 @@ int mei_cl_connect(struct mei_cl *cl, st + mutex_lock(&dev->device_lock); + + if (cl->state != MEI_FILE_CONNECTED) { ++ cl->state = MEI_FILE_DISCONNECTED; + /* something went really wrong */ + if (!cl->status) + cl->status = -EFAULT; diff --git a/queue-3.16/mei-start-disconnect-request-timer-consistently.patch b/queue-3.16/mei-start-disconnect-request-timer-consistently.patch new file mode 100644 index 00000000000..e6495fbe412 --- /dev/null +++ b/queue-3.16/mei-start-disconnect-request-timer-consistently.patch @@ -0,0 +1,32 @@ +From 22b987a325701223f9a37db700c6eb20b9924c6f Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Thu, 17 Jul 2014 10:53:35 +0300 +Subject: mei: start disconnect request timer consistently + +From: Alexander Usyskin + +commit 22b987a325701223f9a37db700c6eb20b9924c6f upstream. + +Link must be reset in case the fw doesn't +respond to client disconnect request. +We did charge the timer only in irq path +from mei_cl_irq_close and not in mei_cl_disconnect + +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/client.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/misc/mei/client.c ++++ b/drivers/misc/mei/client.c +@@ -491,6 +491,7 @@ int mei_cl_disconnect(struct mei_cl *cl) + cl_err(dev, cl, "failed to disconnect.\n"); + goto free; + } ++ cl->timer_count = MEI_CONNECT_TIMEOUT; + mdelay(10); /* Wait for hardware disconnection ready */ + list_add_tail(&cb->list, &dev->ctrl_rd_list.list); + } else { diff --git a/queue-3.16/mmc-mmci-move-all-cmd-irq-handling-to-mmci_cmd_irq.patch b/queue-3.16/mmc-mmci-move-all-cmd-irq-handling-to-mmci_cmd_irq.patch new file mode 100644 index 00000000000..c113a7bff6a --- /dev/null +++ b/queue-3.16/mmc-mmci-move-all-cmd-irq-handling-to-mmci_cmd_irq.patch @@ -0,0 +1,70 @@ +From ad82bfea44835da9633548e2031a1af4a9965c14 Mon Sep 17 00:00:00 2001 +From: Ulf Hansson +Date: Thu, 12 Jun 2014 15:01:57 +0200 +Subject: mmc: mmci: Move all CMD irq handling to mmci_cmd_irq() + +From: Ulf Hansson + +commit ad82bfea44835da9633548e2031a1af4a9965c14 upstream. + +This patch won't change the behavior of how mmci deals with CMD irqs. +By moving code from mmci_irq() to mmci_cmd_irq(), we getter a better +overview of what going on. + +Cc: Peter Maydell +Cc: John Stultz +Cc: Russell King +Tested-by: Kees Cook +Tested-by: John Stultz +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/mmci.c | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +--- a/drivers/mmc/host/mmci.c ++++ b/drivers/mmc/host/mmci.c +@@ -906,9 +906,17 @@ mmci_cmd_irq(struct mmci_host *host, str + unsigned int status) + { + void __iomem *base = host->base; +- bool sbc = (cmd == host->mrq->sbc); +- bool busy_resp = host->variant->busy_detect && +- (cmd->flags & MMC_RSP_BUSY); ++ bool sbc, busy_resp; ++ ++ if (!cmd) ++ return; ++ ++ sbc = (cmd == host->mrq->sbc); ++ busy_resp = host->variant->busy_detect && (cmd->flags & MMC_RSP_BUSY); ++ ++ if (!((status|host->busy_status) & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT| ++ MCI_CMDSENT|MCI_CMDRESPEND))) ++ return; + + /* Check if we need to wait for busy completion. */ + if (host->busy_status && (status & MCI_ST_CARDBUSY)) +@@ -1136,8 +1144,6 @@ static irqreturn_t mmci_irq(int irq, voi + spin_lock(&host->lock); + + do { +- struct mmc_command *cmd; +- + status = readl(host->base + MMCISTATUS); + + if (host->singleirq) { +@@ -1157,11 +1163,7 @@ static irqreturn_t mmci_irq(int irq, voi + + dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status); + +- cmd = host->cmd; +- if ((status|host->busy_status) & (MCI_CMDCRCFAIL|MCI_CMDTIMEOUT| +- MCI_CMDSENT|MCI_CMDRESPEND) && cmd) +- mmci_cmd_irq(host, cmd, status); +- ++ mmci_cmd_irq(host, host->cmd, status); + mmci_data_irq(host, host->data, status); + + /* Don't poll for busy completion in irq context. */ diff --git a/queue-3.16/mmc-mmci-remove-redundant-check-of-status-for-data-irq.patch b/queue-3.16/mmc-mmci-remove-redundant-check-of-status-for-data-irq.patch new file mode 100644 index 00000000000..7b7809bdd28 --- /dev/null +++ b/queue-3.16/mmc-mmci-remove-redundant-check-of-status-for-data-irq.patch @@ -0,0 +1,59 @@ +From 1cb9da502835dad73dda772b20c1e792f4e71589 Mon Sep 17 00:00:00 2001 +From: Ulf Hansson +Date: Thu, 12 Jun 2014 14:42:23 +0200 +Subject: mmc: mmci: Remove redundant check of status for DATA irq + +From: Ulf Hansson + +commit 1cb9da502835dad73dda772b20c1e792f4e71589 upstream. + +We don't need to verify the content of the status register twice, while +we are about to handle a DATA irq. Instead let's leave all verification +to be handled by mmci_data_irq(). + +Cc: Peter Maydell +Cc: John Stultz +Cc: Russell King +Tested-by: Kees Cook +Tested-by: John Stultz +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mmc/host/mmci.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/drivers/mmc/host/mmci.c ++++ b/drivers/mmc/host/mmci.c +@@ -834,6 +834,10 @@ static void + mmci_data_irq(struct mmci_host *host, struct mmc_data *data, + unsigned int status) + { ++ /* Make sure we have data to handle */ ++ if (!data) ++ return; ++ + /* First check for errors */ + if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| + MCI_TXUNDERRUN|MCI_RXOVERRUN)) { +@@ -1133,7 +1137,6 @@ static irqreturn_t mmci_irq(int irq, voi + + do { + struct mmc_command *cmd; +- struct mmc_data *data; + + status = readl(host->base + MMCISTATUS); + +@@ -1159,11 +1162,7 @@ static irqreturn_t mmci_irq(int irq, voi + MCI_CMDSENT|MCI_CMDRESPEND) && cmd) + mmci_cmd_irq(host, cmd, status); + +- data = host->data; +- if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR| +- MCI_TXUNDERRUN|MCI_RXOVERRUN|MCI_DATAEND| +- MCI_DATABLOCKEND) && data) +- mmci_data_irq(host, data, status); ++ mmci_data_irq(host, host->data, status); + + /* Don't poll for busy completion in irq context. */ + if (host->busy_status) diff --git a/queue-3.16/sched-fix-sched_setparam-policy-1-logic.patch b/queue-3.16/sched-fix-sched_setparam-policy-1-logic.patch new file mode 100644 index 00000000000..8c778397cd2 --- /dev/null +++ b/queue-3.16/sched-fix-sched_setparam-policy-1-logic.patch @@ -0,0 +1,66 @@ +From d8d28c8f00e84a72e8bee39a85835635417bee49 Mon Sep 17 00:00:00 2001 +From: Daniel Bristot de Oliveira +Date: Tue, 22 Jul 2014 23:27:41 -0300 +Subject: sched: Fix sched_setparam() policy == -1 logic + +From: Daniel Bristot de Oliveira + +commit d8d28c8f00e84a72e8bee39a85835635417bee49 upstream. + +The scheduler uses policy == -1 to preserve the current policy state to +implement sched_setparam(). But, as (int) -1 is equals to 0xffffffff, +it's matching the if (policy & SCHED_RESET_ON_FORK) on +_sched_setscheduler(). This match changes the policy value to an +invalid value, breaking the sched_setparam() syscall. + +This patch checks policy == -1 before check the SCHED_RESET_ON_FORK flag. + +The following program shows the bug: + +int main(void) +{ + struct sched_param param = { + .sched_priority = 5, + }; + + sched_setscheduler(0, SCHED_FIFO, ¶m); + param.sched_priority = 1; + sched_setparam(0, ¶m); + param.sched_priority = 0; + sched_getparam(0, ¶m); + if (param.sched_priority != 1) + printf("failed priority setting (found %d instead of 1)\n", + param.sched_priority); + else + printf("priority setting fine\n"); +} + +Signed-off-by: Daniel Bristot de Oliveira +Signed-off-by: Peter Zijlstra +Reviewed-by: Steven Rostedt +Cc: Linus Torvalds +Cc: linux-kernel@vger.kernel.org +Fixes: 7479f3c9cf67 "sched: Move SCHED_RESET_ON_FORK into attr::sched_flags" +Link: http://lkml.kernel.org/r/9ebe0566a08dbbb3999759d3f20d6004bb2dbcfa.1406079891.git.bristot@redhat.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched/core.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -3558,9 +3558,10 @@ static int _sched_setscheduler(struct ta + }; + + /* +- * Fixup the legacy SCHED_RESET_ON_FORK hack ++ * Fixup the legacy SCHED_RESET_ON_FORK hack, except if ++ * the policy=-1 was passed by sched_setparam(). + */ +- if (policy & SCHED_RESET_ON_FORK) { ++ if ((policy != -1) && (policy & SCHED_RESET_ON_FORK)) { + attr.sched_flags |= SCHED_FLAG_RESET_ON_FORK; + policy &= ~SCHED_RESET_ON_FORK; + attr.sched_policy = policy; diff --git a/queue-3.16/series b/queue-3.16/series index df127cfae1a..588be545504 100644 --- a/queue-3.16/series +++ b/queue-3.16/series @@ -3,3 +3,36 @@ mips-math-emu-fix-instruction-decoding.patch hid-logitech-fix-bounds-checking-on-led-report-size.patch hid-logitech-perform-bounds-checking-on-device_id-early-enough.patch hid-fix-a-couple-of-off-by-ones.patch +isofs-fix-unbounded-recursion-when-processing-relocated-directories.patch +uas-limit-qdepth-to-32-when-connected-over-usb-2.patch +usb-ohci-fix-bugs-in-debug-routines.patch +usb-ohci-don-t-lose-track-of-eds-when-a-controller-dies.patch +usbcore-don-t-log-on-consecutive-debounce-failures-of-the-same-port.patch +usb-devio-fix-issue-with-log-flooding.patch +usb-serial-ftdi_sio-annotate-the-current-xsens-pid-assignments.patch +usb-serial-ftdi_sio-add-support-for-new-xsens-devices.patch +usb-ehci-pci-usb-host-controller-support-for-intel-quark-x1000.patch +usb-fix-persist-resume-of-some-ss-usb-devices.patch +alsa-hda-fix-an-external-mic-jack-problem-on-a-hp-machine.patch +alsa-usb-audio-adjust-gamecom-780-volume-level.patch +alsa-virtuoso-add-xonar-essence-stx-ii-support.patch +alsa-hda-ca0132-don-t-try-loading-firmware-at-resume-when-already-failed.patch +alsa-usb-audio-fix-boss-me-25-midi-regression.patch +alsa-hda-add-mute-led-pin-quirk-for-hp-15-touchsmart.patch +alsa-hda-restore-the-gpio-led-after-resume.patch +alsa-hda-realtek-avoid-setting-wrong-coef-on-alc269-co.patch +mei-reset-client-connection-state-on-timeout.patch +mei-start-disconnect-request-timer-consistently.patch +mei-don-t-schedule-suspend-in-pm-idle.patch +mei-fix-return-value-on-disconnect-timeout.patch +xhci-blacklist-using-streams-on-the-etron-ej168-controller.patch +sched-fix-sched_setparam-policy-1-logic.patch +arm64-fix-barriers-used-for-page-table-modifications.patch +arm64-don-t-call-break-hooks-for-brk-exceptions-from-el0.patch +efi-arm64-store-runtime-services-revision.patch +arm-dts-am4372-correct-mailbox-node-data.patch +arm-8097-1-unistd.h-relocate-comments-back-to-place.patch +arm-omap3-fix-choice-of-omap3_restore_es-function-in-omap34xx-rev3.1.2-case.patch +drm-omapdrm-fix-compiler-errors.patch +mmc-mmci-remove-redundant-check-of-status-for-data-irq.patch +mmc-mmci-move-all-cmd-irq-handling-to-mmci_cmd_irq.patch diff --git a/queue-3.16/uas-limit-qdepth-to-32-when-connected-over-usb-2.patch b/queue-3.16/uas-limit-qdepth-to-32-when-connected-over-usb-2.patch new file mode 100644 index 00000000000..eaf98919616 --- /dev/null +++ b/queue-3.16/uas-limit-qdepth-to-32-when-connected-over-usb-2.patch @@ -0,0 +1,36 @@ +From e2875c33787ebda21aeecc1a9d3ff52b3aa413ec Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 1 Aug 2014 17:33:08 +0200 +Subject: uas: Limit qdepth to 32 when connected over usb-2 + +From: Hans de Goede + +commit e2875c33787ebda21aeecc1a9d3ff52b3aa413ec upstream. + +Some jmicron uas chipsets act up (they disconnect from the bus) when sending +more then 32 commands to them at once. + +Rather then building an ever growing list with usb-id based quirks for +devices using this chipset, simply reduce the qdepth to 32 when connected +over usb-2. 32 should be plenty to keep things close to maximum +possible throughput on usb-2. + +Tested-and-reported-by: Laszlo T. +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/uas.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/storage/uas.c ++++ b/drivers/usb/storage/uas.c +@@ -1026,7 +1026,7 @@ static int uas_configure_endpoints(struc + usb_endpoint_num(&eps[3]->desc)); + + if (udev->speed != USB_SPEED_SUPER) { +- devinfo->qdepth = 256; ++ devinfo->qdepth = 32; + devinfo->use_streams = 0; + } else { + devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, diff --git a/queue-3.16/usb-devio-fix-issue-with-log-flooding.patch b/queue-3.16/usb-devio-fix-issue-with-log-flooding.patch new file mode 100644 index 00000000000..1b8ac655ba8 --- /dev/null +++ b/queue-3.16/usb-devio-fix-issue-with-log-flooding.patch @@ -0,0 +1,35 @@ +From d310d05f1225d1f6f2bf505255fdf593bfbb3051 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Fri, 1 Aug 2014 09:55:20 +0200 +Subject: USB: devio: fix issue with log flooding + +From: Oliver Neukum + +commit d310d05f1225d1f6f2bf505255fdf593bfbb3051 upstream. + +usbfs allows user space to pass down an URB which sets URB_SHORT_NOT_OK +for output URBs. That causes usbcore to log messages without limit +for a nonsensical disallowed combination. The fix is to silently drop +the attribute in usbfs. +The problem is reported to exist since 3.14 +https://www.virtualbox.org/ticket/13085 + +Signed-off-by: Oliver Neukum +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/devio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -1509,7 +1509,7 @@ static int proc_do_submiturb(struct usb_ + u = (is_in ? URB_DIR_IN : URB_DIR_OUT); + if (uurb->flags & USBDEVFS_URB_ISO_ASAP) + u |= URB_ISO_ASAP; +- if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK) ++ if (uurb->flags & USBDEVFS_URB_SHORT_NOT_OK && is_in) + u |= URB_SHORT_NOT_OK; + if (uurb->flags & USBDEVFS_URB_NO_FSBR) + u |= URB_NO_FSBR; diff --git a/queue-3.16/usb-ehci-pci-usb-host-controller-support-for-intel-quark-x1000.patch b/queue-3.16/usb-ehci-pci-usb-host-controller-support-for-intel-quark-x1000.patch new file mode 100644 index 00000000000..7102f116ce9 --- /dev/null +++ b/queue-3.16/usb-ehci-pci-usb-host-controller-support-for-intel-quark-x1000.patch @@ -0,0 +1,69 @@ +From 6e693739e9b603b3ca9ce0d4f4178f0633458465 Mon Sep 17 00:00:00 2001 +From: Bryan O'Donoghue +Date: Wed, 2 Jul 2014 01:58:18 -0700 +Subject: USB: ehci-pci: USB host controller support for Intel Quark X1000 + +From: Bryan O'Donoghue + +commit 6e693739e9b603b3ca9ce0d4f4178f0633458465 upstream. + +The EHCI packet buffer in/out threshold is programmable for Intel Quark X1000 +USB host controller, and the default value is 0x20 dwords. The in/out threshold +can be programmed to 0x80 dwords (512 Bytes) to maximize the perfomrance, +but only when isochronous/interrupt transactions are not initiated by the USB +host controller. This patch is to reconfigure the packet buffer in/out +threshold as maximal as possible to maximize the performance, and 0x7F dwords +(508 Bytes) should be used because the USB host controller initiates +isochronous/interrupt transactions. + +Signed-off-by: Bryan O'Donoghue +Signed-off-by: Alvin (Weike) Chen +Acked-by: Alan Stern +Reviewed-by: Jingoo Han +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ehci-pci.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +--- a/drivers/usb/host/ehci-pci.c ++++ b/drivers/usb/host/ehci-pci.c +@@ -35,6 +35,21 @@ static const char hcd_name[] = "ehci-pci + #define PCI_DEVICE_ID_INTEL_CE4100_USB 0x2e70 + + /*-------------------------------------------------------------------------*/ ++#define PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC 0x0939 ++static inline bool is_intel_quark_x1000(struct pci_dev *pdev) ++{ ++ return pdev->vendor == PCI_VENDOR_ID_INTEL && ++ pdev->device == PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC; ++} ++ ++/* ++ * 0x84 is the offset of in/out threshold register, ++ * and it is the same offset as the register of 'hostpc'. ++ */ ++#define intel_quark_x1000_insnreg01 hostpc ++ ++/* Maximum usable threshold value is 0x7f dwords for both IN and OUT */ ++#define INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD 0x007f007f + + /* called after powerup, by probe or system-pm "wakeup" */ + static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) +@@ -50,6 +65,16 @@ static int ehci_pci_reinit(struct ehci_h + if (!retval) + ehci_dbg(ehci, "MWI active\n"); + ++ /* Reset the threshold limit */ ++ if (is_intel_quark_x1000(pdev)) { ++ /* ++ * For the Intel QUARK X1000, raise the I/O threshold to the ++ * maximum usable value in order to improve performance. ++ */ ++ ehci_writel(ehci, INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD, ++ ehci->regs->intel_quark_x1000_insnreg01); ++ } ++ + return 0; + } + diff --git a/queue-3.16/usb-fix-persist-resume-of-some-ss-usb-devices.patch b/queue-3.16/usb-fix-persist-resume-of-some-ss-usb-devices.patch new file mode 100644 index 00000000000..0373cbd83a2 --- /dev/null +++ b/queue-3.16/usb-fix-persist-resume-of-some-ss-usb-devices.patch @@ -0,0 +1,139 @@ +From a40178b2fa6ad87670fb1e5fa4024db00c149629 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand +Date: Fri, 18 Jul 2014 12:37:10 +0530 +Subject: USB: Fix persist resume of some SS USB devices + +From: Pratyush Anand + +commit a40178b2fa6ad87670fb1e5fa4024db00c149629 upstream. + +Problem Summary: Problem has been observed generally with PM states +where VBUS goes off during suspend. There are some SS USB devices which +take longer time for link training compared to many others. Such +devices fail to reconnect with same old address which was associated +with it before suspend. + +When system resumes, at some point of time (dpm_run_callback-> +usb_dev_resume->usb_resume->usb_resume_both->usb_resume_device-> +usb_port_resume) SW reads hub status. If device is present, +then it finishes port resume and re-enumerates device with same +address. If device is not present then, SW thinks that device was +removed during suspend and therefore does logical disconnection +and removes all the resource allocated for this device. + +Now, if I put sufficient delay just before root hub status read in +usb_resume_device then, SW sees always that device is present. In normal +course(without any delay) SW sees that no device is present and then SW +removes all resource associated with the device at this port. In the +latter case, after sometime, device says that hey I am here, now host +enumerates it, but with new address. + +Problem had been reproduced when I connect verbatim USB3.0 hard disc +with my STiH407 XHCI host running with 3.10 kernel. + +I see that similar problem has been reported here. +https://bugzilla.kernel.org/show_bug.cgi?id=53211 +Reading above it seems that bug was not in 3.6.6 and was present in 3.8 +and again it was not present for some in 3.12.6, while it was present +for few others. I tested with 3.13-FC19 running at i686 desktop, problem +was still there. However, I was failed to reproduce it with 3.16-RC4 +running at same i686 machine. I would say it is just a random +observation. Problem for few devices is always there, as I am unable to +find a proper fix for the issue. + +So, now question is what should be the amount of delay so that host is +always able to recognize suspended device after resume. + +XHCI specs 4.19.4 says that when Link training is successful, port sets +CSC bit to 1. So if SW reads port status before successful link +training, then it will not find device to be present. USB Analyzer log +with such buggy devices show that in some cases device switch on the +RX termination after long delay of host enabling the VBUS. In few other +cases it has been seen that device fails to negotiate link training in +first attempt. It has been reported till now that few devices take as +long as 2000 ms to train the link after host enabling its VBUS and +RX termination. This patch implements a 2000 ms timeout for CSC bit to set +ie for link training. If in a case link trains before timeout, loop will +exit earlier. + +This patch implements above delay, but only for SS device and when +persist is enabled. + +So, for the good device overhead is almost none. While for the bad +devices penalty could be the time which it take for link training. +But, If a device was connected before suspend, and was removed +while system was asleep, then the penalty would be the timeout ie +2000 ms. + +Results: + +Verbatim USB SS hard disk connected with STiH407 USB host running 3.10 +Kernel resumes in 461 msecs without this patch, but hard disk is +assigned a new device address. Same system resumes in 790 msecs with +this patch, but with old device address. + +Signed-off-by: Pratyush Anand +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/hub.c | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -3264,6 +3264,43 @@ static int finish_port_resume(struct usb + } + + /* ++ * There are some SS USB devices which take longer time for link training. ++ * XHCI specs 4.19.4 says that when Link training is successful, port ++ * sets CSC bit to 1. So if SW reads port status before successful link ++ * training, then it will not find device to be present. ++ * USB Analyzer log with such buggy devices show that in some cases ++ * device switch on the RX termination after long delay of host enabling ++ * the VBUS. In few other cases it has been seen that device fails to ++ * negotiate link training in first attempt. It has been ++ * reported till now that few devices take as long as 2000 ms to train ++ * the link after host enabling its VBUS and termination. Following ++ * routine implements a 2000 ms timeout for link training. If in a case ++ * link trains before timeout, loop will exit earlier. ++ * ++ * FIXME: If a device was connected before suspend, but was removed ++ * while system was asleep, then the loop in the following routine will ++ * only exit at timeout. ++ * ++ * This routine should only be called when persist is enabled for a SS ++ * device. ++ */ ++static int wait_for_ss_port_enable(struct usb_device *udev, ++ struct usb_hub *hub, int *port1, ++ u16 *portchange, u16 *portstatus) ++{ ++ int status = 0, delay_ms = 0; ++ ++ while (delay_ms < 2000) { ++ if (status || *portstatus & USB_PORT_STAT_CONNECTION) ++ break; ++ msleep(20); ++ delay_ms += 20; ++ status = hub_port_status(hub, *port1, portstatus, portchange); ++ } ++ return status; ++} ++ ++/* + * usb_port_resume - re-activate a suspended usb device's upstream port + * @udev: device to re-activate, not a root hub + * Context: must be able to sleep; device not locked; pm locks held +@@ -3359,6 +3396,10 @@ int usb_port_resume(struct usb_device *u + } + } + ++ if (udev->persist_enabled && hub_is_superspeed(hub->hdev)) ++ status = wait_for_ss_port_enable(udev, hub, &port1, &portchange, ++ &portstatus); ++ + status = check_port_resume_type(udev, + hub, port1, status, portchange, portstatus); + if (status == 0) diff --git a/queue-3.16/usb-ohci-don-t-lose-track-of-eds-when-a-controller-dies.patch b/queue-3.16/usb-ohci-don-t-lose-track-of-eds-when-a-controller-dies.patch new file mode 100644 index 00000000000..de408a66b95 --- /dev/null +++ b/queue-3.16/usb-ohci-don-t-lose-track-of-eds-when-a-controller-dies.patch @@ -0,0 +1,114 @@ +From 977dcfdc60311e7aa571cabf6f39c36dde13339e Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Thu, 17 Jul 2014 16:34:29 -0400 +Subject: USB: OHCI: don't lose track of EDs when a controller dies + +From: Alan Stern + +commit 977dcfdc60311e7aa571cabf6f39c36dde13339e upstream. + +This patch fixes a bug in ohci-hcd. When an URB is unlinked, the +corresponding Endpoint Descriptor is added to the ed_rm_list and taken +off the hardware schedule. Once the ED is no longer visible to the +hardware, finish_unlinks() handles the URBs that were unlinked or have +completed. If any URBs remain attached to the ED, the ED is added +back to the hardware schedule -- but only if the controller is +running. + +This fails when a controller dies. A non-empty ED does not get added +back to the hardware schedule and does not remain on the ed_rm_list; +ohci-hcd loses track of it. The remaining URBs cannot be unlinked, +which causes the USB stack to hang. + +The patch changes finish_unlinks() so that non-empty EDs remain on +the ed_rm_list if the controller isn't running. This requires moving +some of the existing code around, to avoid modifying the ED's hardware +fields more than once. + +Signed-off-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-q.c | 46 +++++++++++++++++++++++++++++----------------- + 1 file changed, 29 insertions(+), 17 deletions(-) + +--- a/drivers/usb/host/ohci-q.c ++++ b/drivers/usb/host/ohci-q.c +@@ -311,8 +311,7 @@ static void periodic_unlink (struct ohci + * - ED_OPER: when there's any request queued, the ED gets rescheduled + * immediately. HC should be working on them. + * +- * - ED_IDLE: when there's no TD queue. there's no reason for the HC +- * to care about this ED; safe to disable the endpoint. ++ * - ED_IDLE: when there's no TD queue or the HC isn't running. + * + * When finish_unlinks() runs later, after SOF interrupt, it will often + * complete one or more URB unlinks before making that state change. +@@ -926,6 +925,10 @@ rescan_all: + int completed, modified; + __hc32 *prev; + ++ /* Is this ED already invisible to the hardware? */ ++ if (ed->state == ED_IDLE) ++ goto ed_idle; ++ + /* only take off EDs that the HC isn't using, accounting for + * frame counter wraps and EDs with partially retired TDs + */ +@@ -955,12 +958,20 @@ skip_ed: + } + } + ++ /* ED's now officially unlinked, hc doesn't see */ ++ ed->state = ED_IDLE; ++ if (quirk_zfmicro(ohci) && ed->type == PIPE_INTERRUPT) ++ ohci->eds_scheduled--; ++ ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_H); ++ ed->hwNextED = 0; ++ wmb(); ++ ed->hwINFO &= ~cpu_to_hc32(ohci, ED_SKIP | ED_DEQUEUE); ++ed_idle: ++ + /* reentrancy: if we drop the schedule lock, someone might + * have modified this list. normally it's just prepending + * entries (which we'd ignore), but paranoia won't hurt. + */ +- *last = ed->ed_next; +- ed->ed_next = NULL; + modified = 0; + + /* unlink urbs as requested, but rescan the list after +@@ -1018,19 +1029,20 @@ rescan_this: + if (completed && !list_empty (&ed->td_list)) + goto rescan_this; + +- /* ED's now officially unlinked, hc doesn't see */ +- ed->state = ED_IDLE; +- if (quirk_zfmicro(ohci) && ed->type == PIPE_INTERRUPT) +- ohci->eds_scheduled--; +- ed->hwHeadP &= ~cpu_to_hc32(ohci, ED_H); +- ed->hwNextED = 0; +- wmb (); +- ed->hwINFO &= ~cpu_to_hc32 (ohci, ED_SKIP | ED_DEQUEUE); +- +- /* but if there's work queued, reschedule */ +- if (!list_empty (&ed->td_list)) { +- if (ohci->rh_state == OHCI_RH_RUNNING) +- ed_schedule (ohci, ed); ++ /* ++ * If no TDs are queued, take ED off the ed_rm_list. ++ * Otherwise, if the HC is running, reschedule. ++ * If not, leave it on the list for further dequeues. ++ */ ++ if (list_empty(&ed->td_list)) { ++ *last = ed->ed_next; ++ ed->ed_next = NULL; ++ } else if (ohci->rh_state == OHCI_RH_RUNNING) { ++ *last = ed->ed_next; ++ ed->ed_next = NULL; ++ ed_schedule(ohci, ed); ++ } else { ++ last = &ed->ed_next; + } + + if (modified) diff --git a/queue-3.16/usb-ohci-fix-bugs-in-debug-routines.patch b/queue-3.16/usb-ohci-fix-bugs-in-debug-routines.patch new file mode 100644 index 00000000000..cfd70d05186 --- /dev/null +++ b/queue-3.16/usb-ohci-fix-bugs-in-debug-routines.patch @@ -0,0 +1,95 @@ +From 256dbcd80f1ccf8abf421c1d72ba79a4e29941dd Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Thu, 17 Jul 2014 16:32:26 -0400 +Subject: USB: OHCI: fix bugs in debug routines + +From: Alan Stern + +commit 256dbcd80f1ccf8abf421c1d72ba79a4e29941dd upstream. + +The debug routine fill_async_buffer() in ohci-hcd is buggy: It never +produces any output because it forgets to initialize the output buffer +size. Also, the debug routine ohci_dump() has an unused argument. + +This patch adds the correct initialization and removes the unused +argument. + +Signed-off-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/ohci-dbg.c | 9 +++++---- + drivers/usb/host/ohci-hcd.c | 10 +++++----- + 2 files changed, 10 insertions(+), 9 deletions(-) + +--- a/drivers/usb/host/ohci-dbg.c ++++ b/drivers/usb/host/ohci-dbg.c +@@ -236,7 +236,7 @@ ohci_dump_roothub ( + } + } + +-static void ohci_dump (struct ohci_hcd *controller, int verbose) ++static void ohci_dump(struct ohci_hcd *controller) + { + ohci_dbg (controller, "OHCI controller state\n"); + +@@ -464,15 +464,16 @@ show_list (struct ohci_hcd *ohci, char * + static ssize_t fill_async_buffer(struct debug_buffer *buf) + { + struct ohci_hcd *ohci; +- size_t temp; ++ size_t temp, size; + unsigned long flags; + + ohci = buf->ohci; ++ size = PAGE_SIZE; + + /* display control and bulk lists together, for simplicity */ + spin_lock_irqsave (&ohci->lock, flags); +- temp = show_list(ohci, buf->page, buf->count, ohci->ed_controltail); +- temp += show_list(ohci, buf->page + temp, buf->count - temp, ++ temp = show_list(ohci, buf->page, size, ohci->ed_controltail); ++ temp += show_list(ohci, buf->page + temp, size - temp, + ohci->ed_bulktail); + spin_unlock_irqrestore (&ohci->lock, flags); + +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -76,8 +76,8 @@ static const char hcd_name [] = "ohci_hc + #include "ohci.h" + #include "pci-quirks.h" + +-static void ohci_dump (struct ohci_hcd *ohci, int verbose); +-static void ohci_stop (struct usb_hcd *hcd); ++static void ohci_dump(struct ohci_hcd *ohci); ++static void ohci_stop(struct usb_hcd *hcd); + + #include "ohci-hub.c" + #include "ohci-dbg.c" +@@ -744,7 +744,7 @@ retry: + ohci->ed_to_check = NULL; + } + +- ohci_dump (ohci, 1); ++ ohci_dump(ohci); + + return 0; + } +@@ -825,7 +825,7 @@ static irqreturn_t ohci_irq (struct usb_ + usb_hc_died(hcd); + } + +- ohci_dump (ohci, 1); ++ ohci_dump(ohci); + ohci_usb_reset (ohci); + } + +@@ -925,7 +925,7 @@ static void ohci_stop (struct usb_hcd *h + { + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + +- ohci_dump (ohci, 1); ++ ohci_dump(ohci); + + if (quirk_nec(ohci)) + flush_work(&ohci->nec_work); diff --git a/queue-3.16/usb-serial-ftdi_sio-add-support-for-new-xsens-devices.patch b/queue-3.16/usb-serial-ftdi_sio-add-support-for-new-xsens-devices.patch new file mode 100644 index 00000000000..e5fe85fa814 --- /dev/null +++ b/queue-3.16/usb-serial-ftdi_sio-add-support-for-new-xsens-devices.patch @@ -0,0 +1,44 @@ +From 4bdcde358b4bda74e356841d351945ca3f2245dd Mon Sep 17 00:00:00 2001 +From: Patrick Riphagen +Date: Thu, 24 Jul 2014 09:09:50 +0200 +Subject: USB: serial: ftdi_sio: Add support for new Xsens devices + +From: Patrick Riphagen + +commit 4bdcde358b4bda74e356841d351945ca3f2245dd upstream. + +This adds support for new Xsens devices, using Xsens' own Vendor ID. + +Signed-off-by: Patrick Riphagen +Signed-off-by: Frans Klaver +Cc: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio_ids.h | 3 +++ + 2 files changed, 5 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -673,6 +673,8 @@ static const struct usb_device_id id_tab + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) }, ++ { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) }, ++ { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, + { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID) }, +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -140,6 +140,9 @@ + /* + * Xsens Technologies BV products (http://www.xsens.com). + */ ++#define XSENS_VID 0x2639 ++#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */ ++#define XSENS_MTW_PID 0x0200 /* Xsens MTw */ + #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */ + #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */ + #define XSENS_CONVERTER_2_PID 0xD38A diff --git a/queue-3.16/usb-serial-ftdi_sio-annotate-the-current-xsens-pid-assignments.patch b/queue-3.16/usb-serial-ftdi_sio-annotate-the-current-xsens-pid-assignments.patch new file mode 100644 index 00000000000..0044cbfa953 --- /dev/null +++ b/queue-3.16/usb-serial-ftdi_sio-annotate-the-current-xsens-pid-assignments.patch @@ -0,0 +1,41 @@ +From 9273b8a270878906540349422ab24558b9d65716 Mon Sep 17 00:00:00 2001 +From: Patrick Riphagen +Date: Thu, 24 Jul 2014 09:12:52 +0200 +Subject: USB: serial: ftdi_sio: Annotate the current Xsens PID assignments + +From: Patrick Riphagen + +commit 9273b8a270878906540349422ab24558b9d65716 upstream. + +The converters are used in specific products. It can be useful to know +which they are exactly. + +Signed-off-by: Patrick Riphagen +Signed-off-by: Frans Klaver +Cc: Johan Hovold +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio_ids.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/usb/serial/ftdi_sio_ids.h ++++ b/drivers/usb/serial/ftdi_sio_ids.h +@@ -140,12 +140,12 @@ + /* + * Xsens Technologies BV products (http://www.xsens.com). + */ +-#define XSENS_CONVERTER_0_PID 0xD388 +-#define XSENS_CONVERTER_1_PID 0xD389 ++#define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */ ++#define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */ + #define XSENS_CONVERTER_2_PID 0xD38A +-#define XSENS_CONVERTER_3_PID 0xD38B +-#define XSENS_CONVERTER_4_PID 0xD38C +-#define XSENS_CONVERTER_5_PID 0xD38D ++#define XSENS_CONVERTER_3_PID 0xD38B /* Xsens USB-serial converter */ ++#define XSENS_CONVERTER_4_PID 0xD38C /* Xsens Wireless Receiver */ ++#define XSENS_CONVERTER_5_PID 0xD38D /* Xsens Awinda Station */ + #define XSENS_CONVERTER_6_PID 0xD38E + #define XSENS_CONVERTER_7_PID 0xD38F + diff --git a/queue-3.16/usbcore-don-t-log-on-consecutive-debounce-failures-of-the-same-port.patch b/queue-3.16/usbcore-don-t-log-on-consecutive-debounce-failures-of-the-same-port.patch new file mode 100644 index 00000000000..d87ace9e92e --- /dev/null +++ b/queue-3.16/usbcore-don-t-log-on-consecutive-debounce-failures-of-the-same-port.patch @@ -0,0 +1,48 @@ +From 5ee0f803cc3a0738a63288e4a2f453c85889fbda Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Mon, 14 Jul 2014 15:39:49 +0200 +Subject: usbcore: don't log on consecutive debounce failures of the same port + +From: Oliver Neukum + +commit 5ee0f803cc3a0738a63288e4a2f453c85889fbda upstream. + +Some laptops have an internal port for a BT device which picks +up noise when the kill switch is used, but not enough to trigger +printk_rlimit(). So we shouldn't log consecutive faults of this kind. + +Signed-off-by: Oliver Neukum +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/hub.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -4550,6 +4550,7 @@ static void hub_port_connect(struct usb_ + struct usb_hcd *hcd = bus_to_hcd(hdev->bus); + struct usb_port *port_dev = hub->ports[port1 - 1]; + struct usb_device *udev = port_dev->child; ++ static int unreliable_port = -1; + + /* Disconnect any existing devices under this port */ + if (udev) { +@@ -4570,10 +4571,14 @@ static void hub_port_connect(struct usb_ + USB_PORT_STAT_C_ENABLE)) { + status = hub_port_debounce_be_stable(hub, port1); + if (status < 0) { +- if (status != -ENODEV && printk_ratelimit()) +- dev_err(&port_dev->dev, +- "connect-debounce failed\n"); ++ if (status != -ENODEV && ++ port1 != unreliable_port && ++ printk_ratelimit()) ++ dev_err(&udev->dev, "connect-debounce failed, port %d disabled\n", ++ port1); ++ + portstatus &= ~USB_PORT_STAT_CONNECTION; ++ unreliable_port = port1; + } else { + portstatus = status; + } diff --git a/queue-3.16/xhci-blacklist-using-streams-on-the-etron-ej168-controller.patch b/queue-3.16/xhci-blacklist-using-streams-on-the-etron-ej168-controller.patch new file mode 100644 index 00000000000..6aa2e11799d --- /dev/null +++ b/queue-3.16/xhci-blacklist-using-streams-on-the-etron-ej168-controller.patch @@ -0,0 +1,92 @@ +From 8f873c1ff4ca034626093d03b254e7cb8bb782dd Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 25 Jul 2014 22:01:18 +0200 +Subject: xhci: Blacklist using streams on the Etron EJ168 controller + +From: Hans de Goede + +commit 8f873c1ff4ca034626093d03b254e7cb8bb782dd upstream. + +Streams on the EJ168 do not work as they should. I've spend 2 days trying +to get them to work, but without success. + +The first problem is that when ever you ring the stream-ring doorbell, the +controller starts executing trbs at the beginning of the first ring segment, +event if it ended somewhere else previously. This can be worked around by +allowing enqueing only one td (not a problem with how streams are typically +used) and then resetting our copies of the enqueueing en dequeueing pointers +on a td completion to match what the controller seems to be doing. + +This way things seem to start working with uas and instead of being able +to complete only the very first scsi command, the scsi core can probe the disk. + +But then things break later on when td-s get enqueued with more then one +trb. The controller does seem to increase its dequeue pointer while executing +a stream-ring (data transfer events I inserted for debugging do trigger). +However execution seems to stop at the final normal trb of a multi trb td, +even if there is a data transfer event inserted after the final trb. + +The first problem alone is a serious deviation from the spec, and esp. +dealing with cancellation would have been very tricky if not outright +impossible, but the second problem simply is a deal breaker altogether, +so this patch simply disables streams. + +Note this will cause the usb-storage + uas driver pair to automatically switch +to using usb-storage instead of uas on these devices, essentially reverting +to the 3.14 and earlier behavior when uas was marked CONFIG_BROKEN. + +https://bugzilla.redhat.com/show_bug.cgi?id=1121288 +https://bugzilla.kernel.org/show_bug.cgi?id=80101 + +Signed-off-by: Hans de Goede +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-pci.c | 4 +++- + drivers/usb/host/xhci.c | 3 ++- + drivers/usb/host/xhci.h | 2 ++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -143,6 +143,7 @@ static void xhci_pci_quirks(struct devic + pdev->device == PCI_DEVICE_ID_ASROCK_P67) { + xhci->quirks |= XHCI_RESET_ON_RESUME; + xhci->quirks |= XHCI_TRUST_TX_LENGTH; ++ xhci->quirks |= XHCI_BROKEN_STREAMS; + } + if (pdev->vendor == PCI_VENDOR_ID_RENESAS && + pdev->device == 0x0015) +@@ -230,7 +231,8 @@ static int xhci_pci_probe(struct pci_dev + goto put_usb3_hcd; + /* Roothub already marked as USB 3.0 speed */ + +- if (HCC_MAX_PSA(xhci->hcc_params) >= 4) ++ if (!(xhci->quirks & XHCI_BROKEN_STREAMS) && ++ HCC_MAX_PSA(xhci->hcc_params) >= 4) + xhci->shared_hcd->can_do_streams = 1; + + /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */ +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -3163,7 +3163,8 @@ int xhci_alloc_streams(struct usb_hcd *h + num_streams); + + /* MaxPSASize value 0 (2 streams) means streams are not supported */ +- if (HCC_MAX_PSA(xhci->hcc_params) < 4) { ++ if ((xhci->quirks & XHCI_BROKEN_STREAMS) || ++ HCC_MAX_PSA(xhci->hcc_params) < 4) { + xhci_dbg(xhci, "xHCI controller does not support streams.\n"); + return -ENOSYS; + } +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -1558,6 +1558,8 @@ struct xhci_hcd { + #define XHCI_PLAT (1 << 16) + #define XHCI_SLOW_SUSPEND (1 << 17) + #define XHCI_SPURIOUS_WAKEUP (1 << 18) ++/* For controllers with a broken beyond repair streams implementation */ ++#define XHCI_BROKEN_STREAMS (1 << 19) + unsigned int num_active_eps; + unsigned int limit_active_eps; + /* There are two roothubs to keep track of bus suspend info for */