From a5249adb56a98219870aa18fe62ac5e1c8b61823 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 Aug 2017 15:33:04 -0700 Subject: [PATCH] 4.9-stable patches added patches: alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch arm64-mm-fix-show_pte-kern_cont-fallout.patch asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch asoc-intel-skylake-release-fw-ctx-in-cleanup.patch hid-ignore-petzl-usb-headlamp.patch net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch nvmem-imx-ocotp-fix-wrong-register-size.patch perf-symbols-robustify-reading-of-build-id-from-sysfs.patch perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch perf-x86-set-pmu-module-in-intel-pmu-modules.patch scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch scsi-snic-return-error-code-on-memory-allocation-failure.patch sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch vfio-pci-handle-error-from-pci_iomap.patch video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch --- ...st-ep_flag_running-at-urb-completion.patch | 35 ++++ ...nctions-for-chained-handlers-in-mcip.patch | 45 ++++++ ...64-mm-fix-show_pte-kern_cont-fallout.patch | 61 +++++++ ...ate-to-stop-when-fe-stream-is-paused.patch | 39 +++++ ...ifo-watermark-to-more-reliable-value.patch | 145 +++++++++++++++++ ...-fix-settings-in-internal-clock-mode.patch | 33 ++++ ...el-skylake-release-fw-ctx-in-cleanup.patch | 34 ++++ queue-4.9/hid-ignore-petzl-usb-headlamp.patch | 44 +++++ ...devices-add-.reset_resume-for-usb-pm.patch | 34 ++++ ...em-imx-ocotp-fix-wrong-register-size.patch | 45 ++++++ ...stify-reading-of-build-id-from-sysfs.patch | 44 +++++ ...-traceevent-plugins-with-install-bin.patch | 43 +++++ ...-set-pmu-module-in-intel-pmu-modules.patch | 85 ++++++++++ ...equested-firmware-version-to-3.2.5.1.patch | 85 ++++++++++ ...re-when-another-reset-is-in-progress.patch | 65 ++++++++ ...or-code-on-memory-allocation-failure.patch | 54 +++++++ queue-4.9/series | 20 +++ ...rx-descriptor-word-0-shift-on-sh7734.patch | 33 ++++ ...vfio-pci-handle-error-from-pci_iomap.patch | 34 ++++ ...-return-null-error-from-devm_ioremap.patch | 37 +++++ ...el-mid-rename-spidev-to-mrfld_spidev.patch | 150 ++++++++++++++++++ 21 files changed, 1165 insertions(+) create mode 100644 queue-4.9/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch create mode 100644 queue-4.9/arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch create mode 100644 queue-4.9/arm64-mm-fix-show_pte-kern_cont-fallout.patch create mode 100644 queue-4.9/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch create mode 100644 queue-4.9/asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch create mode 100644 queue-4.9/asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch create mode 100644 queue-4.9/asoc-intel-skylake-release-fw-ctx-in-cleanup.patch create mode 100644 queue-4.9/hid-ignore-petzl-usb-headlamp.patch create mode 100644 queue-4.9/net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch create mode 100644 queue-4.9/nvmem-imx-ocotp-fix-wrong-register-size.patch create mode 100644 queue-4.9/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch create mode 100644 queue-4.9/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch create mode 100644 queue-4.9/perf-x86-set-pmu-module-in-intel-pmu-modules.patch create mode 100644 queue-4.9/scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch create mode 100644 queue-4.9/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch create mode 100644 queue-4.9/scsi-snic-return-error-code-on-memory-allocation-failure.patch create mode 100644 queue-4.9/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch create mode 100644 queue-4.9/vfio-pci-handle-error-from-pci_iomap.patch create mode 100644 queue-4.9/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch create mode 100644 queue-4.9/x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch diff --git a/queue-4.9/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch b/queue-4.9/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch new file mode 100644 index 00000000000..aab4c2233ca --- /dev/null +++ b/queue-4.9/alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch @@ -0,0 +1,35 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Ioan-Adrian Ratiu +Date: Thu, 5 Jan 2017 00:37:47 +0200 +Subject: ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion + +From: Ioan-Adrian Ratiu + + +[ Upstream commit 13a6c8328e6056932dc680e447d4c5e8ad9add17 ] + +Testing EP_FLAG_RUNNING in snd_complete_urb() before running the completion +logic allows us to save a few cpu cycles by returning early, skipping the +pending urb in case the stream was stopped; the stop logic handles the urb +and sets the completion callbacks to NULL. + +Signed-off-by: Ioan-Adrian Ratiu +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/endpoint.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/usb/endpoint.c ++++ b/sound/usb/endpoint.c +@@ -384,6 +384,9 @@ static void snd_complete_urb(struct urb + if (unlikely(atomic_read(&ep->chip->shutdown))) + goto exit_clear; + ++ if (unlikely(!test_bit(EP_FLAG_RUNNING, &ep->flags))) ++ goto exit_clear; ++ + if (usb_pipeout(ep->pipe)) { + retire_outbound_urb(ep, ctx); + /* can be stopped during retire callback */ diff --git a/queue-4.9/arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch b/queue-4.9/arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch new file mode 100644 index 00000000000..ceb8c87c979 --- /dev/null +++ b/queue-4.9/arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch @@ -0,0 +1,45 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Yuriy Kolerov +Date: Wed, 28 Dec 2016 11:46:25 +0300 +Subject: ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP + +From: Yuriy Kolerov + + +[ Upstream commit e51d5d02f688c45b6f644f472f0c80fdfa73f0cb ] + +It is necessary to call entry/exit functions for parent interrupt +controllers for proper masking/unmasking of interrupt lines. + +Signed-off-by: Yuriy Kolerov +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arc/kernel/mcip.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arc/kernel/mcip.c ++++ b/arch/arc/kernel/mcip.c +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -221,10 +222,13 @@ static irq_hw_number_t idu_first_hwirq; + static void idu_cascade_isr(struct irq_desc *desc) + { + struct irq_domain *idu_domain = irq_desc_get_handler_data(desc); ++ struct irq_chip *core_chip = irq_desc_get_chip(desc); + irq_hw_number_t core_hwirq = irqd_to_hwirq(irq_desc_get_irq_data(desc)); + irq_hw_number_t idu_hwirq = core_hwirq - idu_first_hwirq; + ++ chained_irq_enter(core_chip, desc); + generic_handle_irq(irq_find_mapping(idu_domain, idu_hwirq)); ++ chained_irq_exit(core_chip, desc); + } + + static int idu_irq_map(struct irq_domain *d, unsigned int virq, irq_hw_number_t hwirq) diff --git a/queue-4.9/arm64-mm-fix-show_pte-kern_cont-fallout.patch b/queue-4.9/arm64-mm-fix-show_pte-kern_cont-fallout.patch new file mode 100644 index 00000000000..7524e067802 --- /dev/null +++ b/queue-4.9/arm64-mm-fix-show_pte-kern_cont-fallout.patch @@ -0,0 +1,61 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Mark Rutland +Date: Tue, 3 Jan 2017 14:27:26 +0000 +Subject: arm64: mm: fix show_pte KERN_CONT fallout + +From: Mark Rutland + + +[ Upstream commit 6ef4fb387d50fa8f3bffdffc868b57e981cdd709 ] + +Recent changes made KERN_CONT mandatory for continued lines. In the +absence of KERN_CONT, a newline may be implicit inserted by the core +printk code. + +In show_pte, we (erroneously) use printk without KERN_CONT for continued +prints, resulting in output being split across a number of lines, and +not matching the intended output, e.g. + +[ff000000000000] *pgd=00000009f511b003 +, *pud=00000009f4a80003 +, *pmd=0000000000000000 + +Fix this by using pr_cont() for all the continuations. + +Acked-by: Will Deacon +Signed-off-by: Mark Rutland +Signed-off-by: Catalin Marinas +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/mm/fault.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/arm64/mm/fault.c ++++ b/arch/arm64/mm/fault.c +@@ -101,21 +101,21 @@ void show_pte(struct mm_struct *mm, unsi + break; + + pud = pud_offset(pgd, addr); +- printk(", *pud=%016llx", pud_val(*pud)); ++ pr_cont(", *pud=%016llx", pud_val(*pud)); + if (pud_none(*pud) || pud_bad(*pud)) + break; + + pmd = pmd_offset(pud, addr); +- printk(", *pmd=%016llx", pmd_val(*pmd)); ++ pr_cont(", *pmd=%016llx", pmd_val(*pmd)); + if (pmd_none(*pmd) || pmd_bad(*pmd)) + break; + + pte = pte_offset_map(pmd, addr); +- printk(", *pte=%016llx", pte_val(*pte)); ++ pr_cont(", *pte=%016llx", pte_val(*pte)); + pte_unmap(pte); + } while(0); + +- printk("\n"); ++ pr_cont("\n"); + } + + #ifdef CONFIG_ARM64_HW_AFDBM diff --git a/queue-4.9/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch b/queue-4.9/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch new file mode 100644 index 00000000000..8ae5c5f7e21 --- /dev/null +++ b/queue-4.9/asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch @@ -0,0 +1,39 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Patrick Lai +Date: Sat, 31 Dec 2016 22:44:39 -0800 +Subject: ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused + +From: Patrick Lai + + +[ Upstream commit 9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b ] + +When multiple front-ends are using the same back-end, putting state of a +front-end to STOP state upon receiving pause command will result in backend +stream getting released by DPCM framework unintentionally. In order to +avoid backend to be released when another active front-end stream is +present, put the stream state to PAUSED state instead of STOP state. + +Signed-off-by: Patrick Lai +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/soc-pcm.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/sound/soc/soc-pcm.c ++++ b/sound/soc/soc-pcm.c +@@ -2184,9 +2184,11 @@ static int dpcm_fe_dai_do_trigger(struct + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: +- case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + fe->dpcm[stream].state = SND_SOC_DPCM_STATE_STOP; + break; ++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ++ fe->dpcm[stream].state = SND_SOC_DPCM_STATE_PAUSED; ++ break; + } + + out: diff --git a/queue-4.9/asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch b/queue-4.9/asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch new file mode 100644 index 00000000000..de2727a9f7a --- /dev/null +++ b/queue-4.9/asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch @@ -0,0 +1,145 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Caleb Crome +Date: Tue, 3 Jan 2017 10:22:57 -0800 +Subject: ASoC: fsl_ssi: set fifo watermark to more reliable value + +From: Caleb Crome + + +[ Upstream commit 4ee437fbf626b5ad756889d8bc0fcead3d66dde7 ] + +The fsl_ssi fifo watermark is by default set to 2 free spaces (i.e. +activate DMA on FIFO when only 2 spaces are left.) This means the +DMA must service the fifo within 2 audio samples, which is just not +enough time for many use cases with high data rate. In many +configurations the audio channel slips (causing l/r swap in stereo +configurations, or channel slipping in multi-channel configurations). + +This patch gives more breathing room and allows the SSI to operate +reliably by changing the fifio refill watermark to 8. + +There is no change in behavior for older chips (with an 8-deep fifo). +Only the newer chips with a 15-deep fifo get the new behavior. I +suspect a new fifo depth setting could be optimized on the older +chips too, but I have not tested. + +Signed-off-by: Caleb Crome +Reviewed-by: Fabio Estevam +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/fsl/fsl_ssi.c | 74 ++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 53 insertions(+), 21 deletions(-) + +--- a/sound/soc/fsl/fsl_ssi.c ++++ b/sound/soc/fsl/fsl_ssi.c +@@ -224,6 +224,12 @@ struct fsl_ssi_soc_data { + * @dbg_stats: Debugging statistics + * + * @soc: SoC specific data ++ * ++ * @fifo_watermark: the FIFO watermark setting. Notifies DMA when ++ * there are @fifo_watermark or fewer words in TX fifo or ++ * @fifo_watermark or more empty words in RX fifo. ++ * @dma_maxburst: max number of words to transfer in one go. So far, ++ * this is always the same as fifo_watermark. + */ + struct fsl_ssi_private { + struct regmap *regs; +@@ -263,6 +269,9 @@ struct fsl_ssi_private { + + const struct fsl_ssi_soc_data *soc; + struct device *dev; ++ ++ u32 fifo_watermark; ++ u32 dma_maxburst; + }; + + /* +@@ -1051,21 +1060,7 @@ static int _fsl_ssi_set_dai_fmt(struct d + regmap_write(regs, CCSR_SSI_SRCR, srcr); + regmap_write(regs, CCSR_SSI_SCR, scr); + +- /* +- * Set the watermark for transmit FIFI 0 and receive FIFO 0. We don't +- * use FIFO 1. We program the transmit water to signal a DMA transfer +- * if there are only two (or fewer) elements left in the FIFO. Two +- * elements equals one frame (left channel, right channel). This value, +- * however, depends on the depth of the transmit buffer. +- * +- * We set the watermark on the same level as the DMA burstsize. For +- * fiq it is probably better to use the biggest possible watermark +- * size. +- */ +- if (ssi_private->use_dma) +- wm = ssi_private->fifo_depth - 2; +- else +- wm = ssi_private->fifo_depth; ++ wm = ssi_private->fifo_watermark; + + regmap_write(regs, CCSR_SSI_SFCSR, + CCSR_SSI_SFCSR_TFWM0(wm) | CCSR_SSI_SFCSR_RFWM0(wm) | +@@ -1373,12 +1368,8 @@ static int fsl_ssi_imx_probe(struct plat + dev_dbg(&pdev->dev, "could not get baud clock: %ld\n", + PTR_ERR(ssi_private->baudclk)); + +- /* +- * We have burstsize be "fifo_depth - 2" to match the SSI +- * watermark setting in fsl_ssi_startup(). +- */ +- ssi_private->dma_params_tx.maxburst = ssi_private->fifo_depth - 2; +- ssi_private->dma_params_rx.maxburst = ssi_private->fifo_depth - 2; ++ ssi_private->dma_params_tx.maxburst = ssi_private->dma_maxburst; ++ ssi_private->dma_params_rx.maxburst = ssi_private->dma_maxburst; + ssi_private->dma_params_tx.addr = ssi_private->ssi_phys + CCSR_SSI_STX0; + ssi_private->dma_params_rx.addr = ssi_private->ssi_phys + CCSR_SSI_SRX0; + +@@ -1543,6 +1534,47 @@ static int fsl_ssi_probe(struct platform + /* Older 8610 DTs didn't have the fifo-depth property */ + ssi_private->fifo_depth = 8; + ++ /* ++ * Set the watermark for transmit FIFO 0 and receive FIFO 0. We don't ++ * use FIFO 1 but set the watermark appropriately nontheless. ++ * We program the transmit water to signal a DMA transfer ++ * if there are N elements left in the FIFO. For chips with 15-deep ++ * FIFOs, set watermark to 8. This allows the SSI to operate at a ++ * high data rate without channel slipping. Behavior is unchanged ++ * for the older chips with a fifo depth of only 8. A value of 4 ++ * might be appropriate for the older chips, but is left at ++ * fifo_depth-2 until sombody has a chance to test. ++ * ++ * We set the watermark on the same level as the DMA burstsize. For ++ * fiq it is probably better to use the biggest possible watermark ++ * size. ++ */ ++ switch (ssi_private->fifo_depth) { ++ case 15: ++ /* ++ * 2 samples is not enough when running at high data ++ * rates (like 48kHz @ 16 bits/channel, 16 channels) ++ * 8 seems to split things evenly and leave enough time ++ * for the DMA to fill the FIFO before it's over/under ++ * run. ++ */ ++ ssi_private->fifo_watermark = 8; ++ ssi_private->dma_maxburst = 8; ++ break; ++ case 8: ++ default: ++ /* ++ * maintain old behavior for older chips. ++ * Keeping it the same because I don't have an older ++ * board to test with. ++ * I suspect this could be changed to be something to ++ * leave some more space in the fifo. ++ */ ++ ssi_private->fifo_watermark = ssi_private->fifo_depth - 2; ++ ssi_private->dma_maxburst = ssi_private->fifo_depth - 2; ++ break; ++ } ++ + dev_set_drvdata(&pdev->dev, ssi_private); + + if (ssi_private->soc->imx) { diff --git a/queue-4.9/asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch b/queue-4.9/asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch new file mode 100644 index 00000000000..139bca520f8 --- /dev/null +++ b/queue-4.9/asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch @@ -0,0 +1,33 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Pierre-Louis Bossart +Date: Wed, 4 Jan 2017 15:44:52 -0600 +Subject: ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode + +From: Pierre-Louis Bossart + + +[ Upstream commit 60448b077ed93d227e6c117a9e87db76ff0c1911 ] + +Frequency value of zero did not make sense, use same 24.576MHz +setting and only change the clock source in idle mode + +Suggested-by: Bard Liao +Signed-off-by: Pierre-Louis Bossart +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/boards/bytcr_rt5640.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -142,7 +142,7 @@ static int platform_clock_control(struct + * for Jack detection and button press + */ + ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_RCCLK, +- 0, ++ 48000 * 512, + SND_SOC_CLOCK_IN); + if (!ret) { + if ((byt_rt5640_quirk & BYT_RT5640_MCLK_EN) && priv->mclk) diff --git a/queue-4.9/asoc-intel-skylake-release-fw-ctx-in-cleanup.patch b/queue-4.9/asoc-intel-skylake-release-fw-ctx-in-cleanup.patch new file mode 100644 index 00000000000..9b5425a21a6 --- /dev/null +++ b/queue-4.9/asoc-intel-skylake-release-fw-ctx-in-cleanup.patch @@ -0,0 +1,34 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Jeeja KP +Date: Mon, 2 Jan 2017 09:50:05 +0530 +Subject: ASoC: Intel: Skylake: Release FW ctx in cleanup + +From: Jeeja KP + + +[ Upstream commit bc65a326c579e93a5c2120a65ede72f11369ee5a ] + +Saved firmware ctx was not never released, so release Firmware +ctx in cleanup routine. + +Signed-off-by: Jeeja KP +Acked-by: Vinod Koul +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/intel/skylake/skl-sst.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/soc/intel/skylake/skl-sst.c ++++ b/sound/soc/intel/skylake/skl-sst.c +@@ -515,6 +515,9 @@ EXPORT_SYMBOL_GPL(skl_sst_init_fw); + + void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx) + { ++ ++ if (ctx->dsp->fw) ++ release_firmware(ctx->dsp->fw); + skl_clear_module_table(ctx->dsp); + skl_freeup_uuid_list(ctx); + skl_ipc_free(&ctx->ipc); diff --git a/queue-4.9/hid-ignore-petzl-usb-headlamp.patch b/queue-4.9/hid-ignore-petzl-usb-headlamp.patch new file mode 100644 index 00000000000..9c44575215e --- /dev/null +++ b/queue-4.9/hid-ignore-petzl-usb-headlamp.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Jiri Kosina +Date: Thu, 5 Jan 2017 14:25:59 +0100 +Subject: HID: ignore Petzl USB headlamp + +From: Jiri Kosina + + +[ Upstream commit 08f9572671c8047e7234cbf150869aa3c3d59a97 ] + +This headlamp contains a dummy HID descriptor which pretends to be +a mouse-like device, but can't be used as a mouse at all. + +Reported-by: Lukas Ocilka +Signed-off-by: Jiri Kosina +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-core.c | 1 + + drivers/hid/hid-ids.h | 3 +++ + 2 files changed, 4 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -2484,6 +2484,7 @@ static const struct hid_device_id hid_ig + { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0002) }, + { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0003) }, + { HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_PETZL, USB_DEVICE_ID_PETZL_HEADLAMP) }, + { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) }, + #if IS_ENABLED(CONFIG_MOUSE_SYNAPTICS_USB) +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -819,6 +819,9 @@ + #define USB_VENDOR_ID_PETALYNX 0x18b1 + #define USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE 0x0037 + ++#define USB_VENDOR_ID_PETZL 0x2122 ++#define USB_DEVICE_ID_PETZL_HEADLAMP 0x1234 ++ + #define USB_VENDOR_ID_PHILIPS 0x0471 + #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617 + diff --git a/queue-4.9/net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch b/queue-4.9/net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch new file mode 100644 index 00000000000..6a2a8b506a3 --- /dev/null +++ b/queue-4.9/net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch @@ -0,0 +1,34 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Peter Chen +Date: Tue, 3 Jan 2017 17:22:20 +0800 +Subject: net: usb: asix_devices: add .reset_resume for USB PM + +From: Peter Chen + + +[ Upstream commit 63dfb0dac9055145db85ce764355aef2f563739a ] + +The USB core may call reset_resume when it fails to resume asix device. +And USB core can recovery this abnormal resume at low level driver, +the same .resume at asix driver can work too. Add .reset_resume can +avoid disconnecting after backing from system resume, and NFS can +still be mounted after this commit. + +Signed-off-by: Peter Chen +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/usb/asix_devices.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/usb/asix_devices.c ++++ b/drivers/net/usb/asix_devices.c +@@ -1369,6 +1369,7 @@ static struct usb_driver asix_driver = { + .probe = usbnet_probe, + .suspend = asix_suspend, + .resume = asix_resume, ++ .reset_resume = asix_resume, + .disconnect = usbnet_disconnect, + .supports_autosuspend = 1, + .disable_hub_initiated_lpm = 1, diff --git a/queue-4.9/nvmem-imx-ocotp-fix-wrong-register-size.patch b/queue-4.9/nvmem-imx-ocotp-fix-wrong-register-size.patch new file mode 100644 index 00000000000..e4d5d9ed4c1 --- /dev/null +++ b/queue-4.9/nvmem-imx-ocotp-fix-wrong-register-size.patch @@ -0,0 +1,45 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Daniel Schultz +Date: Wed, 4 Jan 2017 16:18:10 +0000 +Subject: nvmem: imx-ocotp: Fix wrong register size + +From: Daniel Schultz + + +[ Upstream commit 14ba972842f9e84e6d3264bc0302101b8a792288 ] + +All i.MX6 SoCs have an OCOTP Controller with 4kbit fuses. The i.MX6SL is +an exception and has only 2kbit fuses. + +In the TRM for the i.MX6DQ (IMX6QDRM - Rev 2, 06/2014) the fuses size is +described in chapter 46.1.1 with: +"32-bit word restricted program and read to 4Kbits of eFuse OTP(512x8)." + +In the TRM for the i.MX6SL (IMX6SLRM - Rev 2, 06/2015) the fuses size is +described in chapter 34.1.1 with: +"32-bit word restricted program and read to 2 kbit of eFuse OTP(128x8)." + +Since the Freescale Linux kernel OCOTP driver works with a fuses size of +2 kbit for the i.MX6SL, it looks like the TRM is wrong and the formula +to calculate the correct fuses size has to be 256x8. + +Signed-off-by: Daniel Schultz +Signed-off-by: Srinivas Kandagatla +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvmem/imx-ocotp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/nvmem/imx-ocotp.c ++++ b/drivers/nvmem/imx-ocotp.c +@@ -71,7 +71,7 @@ static struct nvmem_config imx_ocotp_nvm + + static const struct of_device_id imx_ocotp_dt_ids[] = { + { .compatible = "fsl,imx6q-ocotp", (void *)128 }, +- { .compatible = "fsl,imx6sl-ocotp", (void *)32 }, ++ { .compatible = "fsl,imx6sl-ocotp", (void *)64 }, + { .compatible = "fsl,imx6sx-ocotp", (void *)128 }, + { }, + }; diff --git a/queue-4.9/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch b/queue-4.9/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch new file mode 100644 index 00000000000..651384b7f8f --- /dev/null +++ b/queue-4.9/perf-symbols-robustify-reading-of-build-id-from-sysfs.patch @@ -0,0 +1,44 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Arnaldo Carvalho de Melo +Date: Tue, 3 Jan 2017 15:19:21 -0300 +Subject: perf symbols: Robustify reading of build-id from sysfs + +From: Arnaldo Carvalho de Melo + + +[ Upstream commit 7934c98a6e04028eb34c1293bfb5a6b0ab630b66 ] + +Markus reported that perf segfaults when reading /sys/kernel/notes from +a kernel linked with GNU gold, due to what looks like a gold bug, so do +some bounds checking to avoid crashing in that case. + +Reported-by: Markus Trippelsdorf +Report-Link: http://lkml.kernel.org/r/20161219161821.GA294@x4 +Cc: Adrian Hunter +Cc: David Ahern +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: Wang Nan +Link: http://lkml.kernel.org/n/tip-ryhgs6a6jxvz207j2636w31c@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/symbol-elf.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/tools/perf/util/symbol-elf.c ++++ b/tools/perf/util/symbol-elf.c +@@ -537,6 +537,12 @@ int sysfs__read_build_id(const char *fil + break; + } else { + int n = namesz + descsz; ++ ++ if (n > (int)sizeof(bf)) { ++ n = sizeof(bf); ++ pr_debug("%s: truncating reading of build id in sysfs file %s: n_namesz=%u, n_descsz=%u.\n", ++ __func__, filename, nhdr.n_namesz, nhdr.n_descsz); ++ } + if (read(fd, bf, n) != n) + break; + } diff --git a/queue-4.9/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch b/queue-4.9/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch new file mode 100644 index 00000000000..a4ecb9cd1a8 --- /dev/null +++ b/queue-4.9/perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch @@ -0,0 +1,43 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Arnaldo Carvalho de Melo +Date: Tue, 3 Jan 2017 12:03:59 -0300 +Subject: perf tools: Install tools/lib/traceevent plugins with install-bin + +From: Arnaldo Carvalho de Melo + + +[ Upstream commit 30a9c6444810429aa2b7cbfbd453ce339baaadbf ] + +Those are binaries as well, so should be installed by: + + make -C tools/perf install-bin' + +too. + +Cc: Alexander Shishkin +Cc: Daniel Bristot de Oliveira +Cc: Jiri Olsa +Cc: Peter Zijlstra +Cc: Steven Rostedt +Link: http://lkml.kernel.org/n/tip-3841b37u05evxrs1igkyu6ks@git.kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/Makefile.perf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -729,9 +729,9 @@ install-tests: all install-gtk + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \ + $(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr' + +-install-bin: install-tools install-tests ++install-bin: install-tools install-tests install-traceevent-plugins + +-install: install-bin try-install-man install-traceevent-plugins ++install: install-bin try-install-man + + install-python_ext: + $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)' diff --git a/queue-4.9/perf-x86-set-pmu-module-in-intel-pmu-modules.patch b/queue-4.9/perf-x86-set-pmu-module-in-intel-pmu-modules.patch new file mode 100644 index 00000000000..0c6a2d0d3a1 --- /dev/null +++ b/queue-4.9/perf-x86-set-pmu-module-in-intel-pmu-modules.patch @@ -0,0 +1,85 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: David Carrillo-Cisneros +Date: Thu, 22 Dec 2016 17:17:40 -0800 +Subject: perf/x86: Set pmu->module in Intel PMU modules + +From: David Carrillo-Cisneros + + +[ Upstream commit 74545f63890e38520eb4d1dbedcadaa9c0dbc824 ] + +The conversion of Intel PMU drivers into modules did not include reference +counting. The machine will crash when attempting to access deleted code +if an event from a module PMU is started and the module removed before the +event is destroyed. + +i.e. this crashes the machine: + + $ insmod intel-rapl-perf.ko + $ perf stat -e power/energy-cores/ -C 0 & + $ rmmod intel-rapl-perf.ko + +Set THIS_MODULE to pmu->module in Intel module PMUs so that generic code +can handle reference counting and deny rmmod while an event still exists. + +Signed-off-by: David Carrillo-Cisneros +Cc: Alexander Shishkin +Cc: Arnaldo Carvalho de Melo +Cc: Borislav Petkov +Cc: Dave Hansen +Cc: Jiri Olsa +Cc: Kan Liang +Cc: Linus Torvalds +Cc: Paul Turner +Cc: Peter Zijlstra +Cc: Srinivas Pandruvada +Cc: Stephane Eranian +Cc: Thomas Gleixner +Link: http://lkml.kernel.org/r/1482455860-116269-1-git-send-email-davidcc@google.com +Signed-off-by: Ingo Molnar +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/events/intel/cstate.c | 2 ++ + arch/x86/events/intel/rapl.c | 1 + + arch/x86/events/intel/uncore.c | 1 + + 3 files changed, 4 insertions(+) + +--- a/arch/x86/events/intel/cstate.c ++++ b/arch/x86/events/intel/cstate.c +@@ -434,6 +434,7 @@ static struct pmu cstate_core_pmu = { + .stop = cstate_pmu_event_stop, + .read = cstate_pmu_event_update, + .capabilities = PERF_PMU_CAP_NO_INTERRUPT, ++ .module = THIS_MODULE, + }; + + static struct pmu cstate_pkg_pmu = { +@@ -447,6 +448,7 @@ static struct pmu cstate_pkg_pmu = { + .stop = cstate_pmu_event_stop, + .read = cstate_pmu_event_update, + .capabilities = PERF_PMU_CAP_NO_INTERRUPT, ++ .module = THIS_MODULE, + }; + + static const struct cstate_model nhm_cstates __initconst = { +--- a/arch/x86/events/intel/rapl.c ++++ b/arch/x86/events/intel/rapl.c +@@ -697,6 +697,7 @@ static int __init init_rapl_pmus(void) + rapl_pmus->pmu.start = rapl_pmu_event_start; + rapl_pmus->pmu.stop = rapl_pmu_event_stop; + rapl_pmus->pmu.read = rapl_pmu_event_read; ++ rapl_pmus->pmu.module = THIS_MODULE; + return 0; + } + +--- a/arch/x86/events/intel/uncore.c ++++ b/arch/x86/events/intel/uncore.c +@@ -733,6 +733,7 @@ static int uncore_pmu_register(struct in + .start = uncore_pmu_event_start, + .stop = uncore_pmu_event_stop, + .read = uncore_pmu_event_read, ++ .module = THIS_MODULE, + }; + } else { + pmu->pmu = *pmu->type->pmu; diff --git a/queue-4.9/scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch b/queue-4.9/scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch new file mode 100644 index 00000000000..ec699f754a1 --- /dev/null +++ b/queue-4.9/scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch @@ -0,0 +1,85 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Benjamin Poirier +Date: Fri, 23 Dec 2016 20:40:19 -0800 +Subject: scsi: bfa: Increase requested firmware version to 3.2.5.1 + +From: Benjamin Poirier + + +[ Upstream commit 2d1148f0f45079d25a0fa0d67e4fdb2a656d12fb ] + +bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on +Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR +Series Adapter Firmware"). + +bna was updated to use the newer firmware on Feb 19 16:02:32 2015 -0500 in +3f307c3d70 ("bna: Update the Driver and Firmware Version") + +bfa was not updated. I presume this was an oversight but it broke support +for bfa+bna cards such as the following + 04:00.0 Fibre Channel [0c04]: Brocade Communications Systems, Inc. + 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01) + 04:00.1 Fibre Channel [0c04]: Brocade Communications Systems, Inc. + 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01) + 04:00.2 Ethernet controller [0200]: Brocade Communications Systems, + Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01) + 04:00.3 Ethernet controller [0200]: Brocade Communications Systems, + Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01) + +Currently, if the bfa module is loaded first, bna fails to probe the +respective devices with +[ 215.026787] bna: QLogic BR-series 10G Ethernet driver - version: 3.2.25.1 +[ 215.043707] bna 0000:04:00.2: bar0 mapped to ffffc90001fc0000, len 262144 +[ 215.060656] bna 0000:04:00.2: initialization failed err=1 +[ 215.073893] bna 0000:04:00.3: bar0 mapped to ffffc90002040000, len 262144 +[ 215.090644] bna 0000:04:00.3: initialization failed err=1 + +Whereas if bna is loaded first, bfa fails with +[ 249.592109] QLogic BR-series BFA FC/FCOE SCSI driver - version: 3.2.25.0 +[ 249.610738] bfa 0000:04:00.0: Running firmware version is incompatible with the driver version +[ 249.833513] bfa 0000:04:00.0: bfa init failed +[ 249.833919] scsi host6: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.0 driver: 3.2.25.0 +[ 249.841446] bfa 0000:04:00.1: Running firmware version is incompatible with the driver version +[ 250.045449] bfa 0000:04:00.1: bfa init failed +[ 250.045962] scsi host7: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.1 driver: 3.2.25.0 + +Increase bfa's requested firmware version. Also increase the driver +version. I only tested that all of the devices probe without error. + +Reported-by: Tim Ehlers +Signed-off-by: Benjamin Poirier +Acked-by: Rasesh Mody +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/bfa/bfad.c | 6 +++--- + drivers/scsi/bfa/bfad_drv.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/bfa/bfad.c ++++ b/drivers/scsi/bfa/bfad.c +@@ -64,9 +64,9 @@ int max_rport_logins = BFA_FCS_MAX_RPOR + u32 bfi_image_cb_size, bfi_image_ct_size, bfi_image_ct2_size; + u32 *bfi_image_cb, *bfi_image_ct, *bfi_image_ct2; + +-#define BFAD_FW_FILE_CB "cbfw-3.2.3.0.bin" +-#define BFAD_FW_FILE_CT "ctfw-3.2.3.0.bin" +-#define BFAD_FW_FILE_CT2 "ct2fw-3.2.3.0.bin" ++#define BFAD_FW_FILE_CB "cbfw-3.2.5.1.bin" ++#define BFAD_FW_FILE_CT "ctfw-3.2.5.1.bin" ++#define BFAD_FW_FILE_CT2 "ct2fw-3.2.5.1.bin" + + static u32 *bfad_load_fwimg(struct pci_dev *pdev); + static void bfad_free_fwimg(void); +--- a/drivers/scsi/bfa/bfad_drv.h ++++ b/drivers/scsi/bfa/bfad_drv.h +@@ -58,7 +58,7 @@ + #ifdef BFA_DRIVER_VERSION + #define BFAD_DRIVER_VERSION BFA_DRIVER_VERSION + #else +-#define BFAD_DRIVER_VERSION "3.2.25.0" ++#define BFAD_DRIVER_VERSION "3.2.25.1" + #endif + + #define BFAD_PROTO_NAME FCPI_NAME diff --git a/queue-4.9/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch b/queue-4.9/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch new file mode 100644 index 00000000000..1786031e55e --- /dev/null +++ b/queue-4.9/scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch @@ -0,0 +1,65 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Satish Kharat +Date: Wed, 14 Dec 2016 13:20:41 -0800 +Subject: scsi: fnic: Avoid sending reset to firmware when another reset is in progress + +From: Satish Kharat + + +[ Upstream commit 9698b6f473555a722bf81a3371998427d5d27bde ] + +This fix is to avoid calling fnic_fw_reset_handler through +fnic_host_reset when a finc reset is alreay in progress. + +Signed-off-by: Satish Kharat +Signed-off-by: Sesidhar Baddela +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/fnic/fnic.h | 1 + + drivers/scsi/fnic/fnic_scsi.c | 16 ++++++++++++++++ + 2 files changed, 17 insertions(+) + +--- a/drivers/scsi/fnic/fnic.h ++++ b/drivers/scsi/fnic/fnic.h +@@ -248,6 +248,7 @@ struct fnic { + struct completion *remove_wait; /* device remove thread blocks */ + + atomic_t in_flight; /* io counter */ ++ bool internal_reset_inprogress; + u32 _reserved; /* fill hole */ + unsigned long state_flags; /* protected by host lock */ + enum fnic_state state; +--- a/drivers/scsi/fnic/fnic_scsi.c ++++ b/drivers/scsi/fnic/fnic_scsi.c +@@ -2573,6 +2573,19 @@ int fnic_host_reset(struct scsi_cmnd *sc + unsigned long wait_host_tmo; + struct Scsi_Host *shost = sc->device->host; + struct fc_lport *lp = shost_priv(shost); ++ struct fnic *fnic = lport_priv(lp); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&fnic->fnic_lock, flags); ++ if (fnic->internal_reset_inprogress == 0) { ++ fnic->internal_reset_inprogress = 1; ++ } else { ++ spin_unlock_irqrestore(&fnic->fnic_lock, flags); ++ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host, ++ "host reset in progress skipping another host reset\n"); ++ return SUCCESS; ++ } ++ spin_unlock_irqrestore(&fnic->fnic_lock, flags); + + /* + * If fnic_reset is successful, wait for fabric login to complete +@@ -2593,6 +2606,9 @@ int fnic_host_reset(struct scsi_cmnd *sc + } + } + ++ spin_lock_irqsave(&fnic->fnic_lock, flags); ++ fnic->internal_reset_inprogress = 0; ++ spin_unlock_irqrestore(&fnic->fnic_lock, flags); + return ret; + } + diff --git a/queue-4.9/scsi-snic-return-error-code-on-memory-allocation-failure.patch b/queue-4.9/scsi-snic-return-error-code-on-memory-allocation-failure.patch new file mode 100644 index 00000000000..1fb605180f8 --- /dev/null +++ b/queue-4.9/scsi-snic-return-error-code-on-memory-allocation-failure.patch @@ -0,0 +1,54 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Burak Ok +Date: Wed, 21 Dec 2016 14:45:53 +0100 +Subject: scsi: snic: Return error code on memory allocation failure + +From: Burak Ok + + +[ Upstream commit 0371adcdaca92912baaa3256ed13e058a016e62d ] + +If a call to mempool_create_slab_pool() in snic_probe() returns NULL, +return -ENOMEM to indicate failure. mempool_creat_slab_pool() only fails +if it cannot allocate memory. + +https://bugzilla.kernel.org/show_bug.cgi?id=189061 + +Reported-by: bianpan2010@ruc.edu.cn +Signed-off-by: Burak Ok +Signed-off-by: Andreas Schaertl +Acked-by: Narsimhulu Musini +Reviewed-by: Ewan D. Milne +Signed-off-by: Martin K. Petersen +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/snic/snic_main.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/scsi/snic/snic_main.c ++++ b/drivers/scsi/snic/snic_main.c +@@ -591,6 +591,7 @@ snic_probe(struct pci_dev *pdev, const s + if (!pool) { + SNIC_HOST_ERR(shost, "dflt sgl pool creation failed\n"); + ++ ret = -ENOMEM; + goto err_free_res; + } + +@@ -601,6 +602,7 @@ snic_probe(struct pci_dev *pdev, const s + if (!pool) { + SNIC_HOST_ERR(shost, "max sgl pool creation failed\n"); + ++ ret = -ENOMEM; + goto err_free_dflt_sgl_pool; + } + +@@ -611,6 +613,7 @@ snic_probe(struct pci_dev *pdev, const s + if (!pool) { + SNIC_HOST_ERR(shost, "snic tmreq info pool creation failed.\n"); + ++ ret = -ENOMEM; + goto err_free_max_sgl_pool; + } + diff --git a/queue-4.9/series b/queue-4.9/series index dedfb407bbd..b8a0c3a361a 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -83,3 +83,23 @@ btrfs-adjust-outstanding_extents-counter-properly-when-dio-write-is-split.patch xen-arm-zero-reserved-fields-of-xatp-before-making-hypervisor-call.patch tools-lib-traceevent-fix-prev-next_prio-for-deadline-tasks.patch xfrm-don-t-use-sk_family-for-socket-policy-lookups.patch +perf-tools-install-tools-lib-traceevent-plugins-with-install-bin.patch +perf-symbols-robustify-reading-of-build-id-from-sysfs.patch +video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch +vfio-pci-handle-error-from-pci_iomap.patch +arm64-mm-fix-show_pte-kern_cont-fallout.patch +nvmem-imx-ocotp-fix-wrong-register-size.patch +net-usb-asix_devices-add-.reset_resume-for-usb-pm.patch +asoc-fsl_ssi-set-fifo-watermark-to-more-reliable-value.patch +sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch +arcv2-irq-call-entry-exit-functions-for-chained-handlers-in-mcip.patch +alsa-usb-audio-test-ep_flag_running-at-urb-completion.patch +x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch +perf-x86-set-pmu-module-in-intel-pmu-modules.patch +asoc-intel-bytcr-rt5640-fix-settings-in-internal-clock-mode.patch +hid-ignore-petzl-usb-headlamp.patch +scsi-fnic-avoid-sending-reset-to-firmware-when-another-reset-is-in-progress.patch +scsi-snic-return-error-code-on-memory-allocation-failure.patch +scsi-bfa-increase-requested-firmware-version-to-3.2.5.1.patch +asoc-intel-skylake-release-fw-ctx-in-cleanup.patch +asoc-dpcm-avoid-putting-stream-state-to-stop-when-fe-stream-is-paused.patch diff --git a/queue-4.9/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch b/queue-4.9/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch new file mode 100644 index 00000000000..3eacf865ea2 --- /dev/null +++ b/queue-4.9/sh_eth-enable-rx-descriptor-word-0-shift-on-sh7734.patch @@ -0,0 +1,33 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Sergei Shtylyov +Date: Wed, 4 Jan 2017 23:10:23 +0300 +Subject: sh_eth: enable RX descriptor word 0 shift on SH7734 + +From: Sergei Shtylyov + + +[ Upstream commit 71eae1ca77fd6be218d8a952d97bba827e56516d ] + +The RX descriptor word 0 on SH7734 has the RFS[9:0] field in bits 16-25 +(bits 0-15 usually used for that are occupied by the packet checksum). +Thus we need to set the 'shift_rd0' field in the SH7734 SoC data... + +Fixes: f0e81fecd4f8 ("net: sh_eth: Add support SH7734") +Signed-off-by: Sergei Shtylyov +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/renesas/sh_eth.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/ethernet/renesas/sh_eth.c ++++ b/drivers/net/ethernet/renesas/sh_eth.c +@@ -819,6 +819,7 @@ static struct sh_eth_cpu_data sh7734_dat + .tsu = 1, + .hw_crc = 1, + .select_mii = 1, ++ .shift_rd0 = 1, + }; + + /* SH7763 */ diff --git a/queue-4.9/vfio-pci-handle-error-from-pci_iomap.patch b/queue-4.9/vfio-pci-handle-error-from-pci_iomap.patch new file mode 100644 index 00000000000..713841d7f92 --- /dev/null +++ b/queue-4.9/vfio-pci-handle-error-from-pci_iomap.patch @@ -0,0 +1,34 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Arvind Yadav +Date: Tue, 3 Jan 2017 17:26:46 +0530 +Subject: vfio-pci: Handle error from pci_iomap + +From: Arvind Yadav + + +[ Upstream commit e19f32da5ded958238eac1bbe001192acef191a2 ] + +Here, pci_iomap can fail, handle this case release selected +pci regions and return -ENOMEM. + +Signed-off-by: Arvind Yadav +Signed-off-by: Alex Williamson +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/vfio/pci/vfio_pci.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/vfio/pci/vfio_pci.c ++++ b/drivers/vfio/pci/vfio_pci.c +@@ -1173,6 +1173,10 @@ static int vfio_pci_mmap(void *device_da + return ret; + + vdev->barmap[index] = pci_iomap(pdev, index, 0); ++ if (!vdev->barmap[index]) { ++ pci_release_selected_regions(pdev, 1 << index); ++ return -ENOMEM; ++ } + } + + vma->vm_private_data = vdev; diff --git a/queue-4.9/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch b/queue-4.9/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch new file mode 100644 index 00000000000..dacf6f82fb6 --- /dev/null +++ b/queue-4.9/video-fbdev-cobalt_lcdfb-handle-return-null-error-from-devm_ioremap.patch @@ -0,0 +1,37 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Arvind Yadav +Date: Tue, 13 Dec 2016 13:50:52 +0530 +Subject: video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap + +From: Arvind Yadav + + +[ Upstream commit 4dcd19bfabaee8f9f4bcf203afba09b98ccbaf76 ] + +Here, If devm_ioremap will fail. It will return NULL. +Kernel can run into a NULL-pointer dereference. +This error check will avoid NULL pointer dereference. + +Signed-off-by: Arvind Yadav +Acked-by: Yoichi Yuasa +Signed-off-by: Bartlomiej Zolnierkiewicz +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/video/fbdev/cobalt_lcdfb.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/video/fbdev/cobalt_lcdfb.c ++++ b/drivers/video/fbdev/cobalt_lcdfb.c +@@ -308,6 +308,11 @@ static int cobalt_lcdfb_probe(struct pla + info->screen_size = resource_size(res); + info->screen_base = devm_ioremap(&dev->dev, res->start, + info->screen_size); ++ if (!info->screen_base) { ++ framebuffer_release(info); ++ return -ENOMEM; ++ } ++ + info->fbops = &cobalt_lcd_fbops; + info->fix = cobalt_lcdfb_fix; + info->fix.smem_start = res->start; diff --git a/queue-4.9/x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch b/queue-4.9/x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch new file mode 100644 index 00000000000..997d6d421a8 --- /dev/null +++ b/queue-4.9/x86-platform-intel-mid-rename-spidev-to-mrfld_spidev.patch @@ -0,0 +1,150 @@ +From foo@baz Fri Aug 4 15:30:10 PDT 2017 +From: Andy Shevchenko +Date: Mon, 2 Jan 2017 11:24:50 +0200 +Subject: x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev' + +From: Andy Shevchenko + + +[ Upstream commit 159d3726db12b3476bc59ea0ab0a702103d466b5 ] + +The current implementation supports only Intel Merrifield platforms. Don't mess +with the rest of the Intel MID family by not registering device with wrong +properties. + +Signed-off-by: Andy Shevchenko +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Link: http://lkml.kernel.org/r/20170102092450.87229-1-andriy.shevchenko@linux.intel.com +Signed-off-by: Ingo Molnar +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/platform/intel-mid/device_libs/Makefile | 2 + arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c | 54 ++++++++++ + arch/x86/platform/intel-mid/device_libs/platform_spidev.c | 50 --------- + 3 files changed, 55 insertions(+), 51 deletions(-) + rename arch/x86/platform/intel-mid/device_libs/{platform_spidev.c => platform_mrfld_spidev.c} (91%) + +--- a/arch/x86/platform/intel-mid/device_libs/Makefile ++++ b/arch/x86/platform/intel-mid/device_libs/Makefile +@@ -15,7 +15,7 @@ obj-$(subst m,y,$(CONFIG_INTEL_MID_POWER + obj-$(subst m,y,$(CONFIG_GPIO_INTEL_PMIC)) += platform_pmic_gpio.o + obj-$(subst m,y,$(CONFIG_INTEL_MFLD_THERMAL)) += platform_msic_thermal.o + # SPI Devices +-obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_spidev.o ++obj-$(subst m,y,$(CONFIG_SPI_SPIDEV)) += platform_mrfld_spidev.o + # I2C Devices + obj-$(subst m,y,$(CONFIG_SENSORS_EMC1403)) += platform_emc1403.o + obj-$(subst m,y,$(CONFIG_SENSORS_LIS3LV02D)) += platform_lis331.o +--- /dev/null ++++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c +@@ -0,0 +1,54 @@ ++/* ++ * spidev platform data initilization file ++ * ++ * (C) Copyright 2014, 2016 Intel Corporation ++ * Authors: Andy Shevchenko ++ * Dan O'Donovan ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; version 2 ++ * of the License. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#define MRFLD_SPI_DEFAULT_DMA_BURST 8 ++#define MRFLD_SPI_DEFAULT_TIMEOUT 500 ++ ++/* GPIO pin for spidev chipselect */ ++#define MRFLD_SPIDEV_GPIO_CS 111 ++ ++static struct pxa2xx_spi_chip spidev_spi_chip = { ++ .dma_burst_size = MRFLD_SPI_DEFAULT_DMA_BURST, ++ .timeout = MRFLD_SPI_DEFAULT_TIMEOUT, ++ .gpio_cs = MRFLD_SPIDEV_GPIO_CS, ++}; ++ ++static void __init *spidev_platform_data(void *info) ++{ ++ struct spi_board_info *spi_info = info; ++ ++ if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER) ++ return ERR_PTR(-ENODEV); ++ ++ spi_info->mode = SPI_MODE_0; ++ spi_info->controller_data = &spidev_spi_chip; ++ ++ return NULL; ++} ++ ++static const struct devs_id spidev_dev_id __initconst = { ++ .name = "spidev", ++ .type = SFI_DEV_TYPE_SPI, ++ .delay = 0, ++ .get_platform_data = &spidev_platform_data, ++}; ++ ++sfi_device(spidev_dev_id); +--- a/arch/x86/platform/intel-mid/device_libs/platform_spidev.c ++++ /dev/null +@@ -1,50 +0,0 @@ +-/* +- * spidev platform data initilization file +- * +- * (C) Copyright 2014, 2016 Intel Corporation +- * Authors: Andy Shevchenko +- * Dan O'Donovan +- * +- * This program is free software; you can redistribute it and/or +- * modify it under the terms of the GNU General Public License +- * as published by the Free Software Foundation; version 2 +- * of the License. +- */ +- +-#include +-#include +-#include +-#include +- +-#include +- +-#define MRFLD_SPI_DEFAULT_DMA_BURST 8 +-#define MRFLD_SPI_DEFAULT_TIMEOUT 500 +- +-/* GPIO pin for spidev chipselect */ +-#define MRFLD_SPIDEV_GPIO_CS 111 +- +-static struct pxa2xx_spi_chip spidev_spi_chip = { +- .dma_burst_size = MRFLD_SPI_DEFAULT_DMA_BURST, +- .timeout = MRFLD_SPI_DEFAULT_TIMEOUT, +- .gpio_cs = MRFLD_SPIDEV_GPIO_CS, +-}; +- +-static void __init *spidev_platform_data(void *info) +-{ +- struct spi_board_info *spi_info = info; +- +- spi_info->mode = SPI_MODE_0; +- spi_info->controller_data = &spidev_spi_chip; +- +- return NULL; +-} +- +-static const struct devs_id spidev_dev_id __initconst = { +- .name = "spidev", +- .type = SFI_DEV_TYPE_SPI, +- .delay = 0, +- .get_platform_data = &spidev_platform_data, +-}; +- +-sfi_device(spidev_dev_id); -- 2.47.3