From: Greg Kroah-Hartman Date: Fri, 2 May 2014 03:37:39 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.89~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d407ef9f786f33048566eaa247de6291e8b6264;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: reiserfs-fix-race-in-readdir.patch usb-dwc3-fix-wrong-bit-mask-in-dwc3_event_devt.patch usb-musb-set-txmaxp-and-autoset-for-full-speed-bulk-in-device-mode.patch usb-xhci-fix-compilation-warning-when-config_pci-config_pm.patch xhci-extend-quirk-for-renesas-cards.patch --- diff --git a/queue-3.4/reiserfs-fix-race-in-readdir.patch b/queue-3.4/reiserfs-fix-race-in-readdir.patch new file mode 100644 index 00000000000..8e796b17486 --- /dev/null +++ b/queue-3.4/reiserfs-fix-race-in-readdir.patch @@ -0,0 +1,47 @@ +From 01d8885785a60ae8f4c37b0ed75bdc96d0fc6a44 Mon Sep 17 00:00:00 2001 +From: Jeff Mahoney +Date: Wed, 2 Apr 2014 14:40:26 -0400 +Subject: reiserfs: fix race in readdir + +From: Jeff Mahoney + +commit 01d8885785a60ae8f4c37b0ed75bdc96d0fc6a44 upstream. + +jdm-20004 reiserfs_delete_xattrs: Couldn't delete all xattrs (-2) + +The -ENOENT is due to readdir calling dir_emit on the same entry twice. + +If the dir_emit callback sleeps and the tree is changed underneath us, +we won't be able to trust deh_offset(deh) anymore. We need to save +next_pos before we might sleep so we can find the next entry. + +Signed-off-by: Jeff Mahoney +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/reiserfs/dir.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/fs/reiserfs/dir.c ++++ b/fs/reiserfs/dir.c +@@ -128,6 +128,7 @@ int reiserfs_readdir_dentry(struct dentr + char *d_name; + off_t d_off; + ino_t d_ino; ++ loff_t cur_pos = deh_offset(deh); + + if (!de_visible(deh)) + /* it is hidden entry */ +@@ -200,8 +201,9 @@ int reiserfs_readdir_dentry(struct dentr + if (local_buf != small_buf) { + kfree(local_buf); + } +- // next entry should be looked for with such offset +- next_pos = deh_offset(deh) + 1; ++ ++ /* deh_offset(deh) may be invalid now. */ ++ next_pos = cur_pos + 1; + + if (item_moved(&tmp_ih, &path_to_entry)) { + goto research; diff --git a/queue-3.4/series b/queue-3.4/series index 230d405d513..5412b7ba1f2 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -27,3 +27,8 @@ ib_srpt-use-correct-ib_sg_dma-primitives.patch scsi-arcmsr-upper-32-of-dma-address-lost.patch iscsi-target-fix-erl-2-async_event-connection-pointer-bug.patch target-tcm_fc-fix-use-after-free-of-ft_tpg.patch +reiserfs-fix-race-in-readdir.patch +usb-musb-set-txmaxp-and-autoset-for-full-speed-bulk-in-device-mode.patch +xhci-extend-quirk-for-renesas-cards.patch +usb-xhci-fix-compilation-warning-when-config_pci-config_pm.patch +usb-dwc3-fix-wrong-bit-mask-in-dwc3_event_devt.patch diff --git a/queue-3.4/usb-dwc3-fix-wrong-bit-mask-in-dwc3_event_devt.patch b/queue-3.4/usb-dwc3-fix-wrong-bit-mask-in-dwc3_event_devt.patch new file mode 100644 index 00000000000..e0689756c76 --- /dev/null +++ b/queue-3.4/usb-dwc3-fix-wrong-bit-mask-in-dwc3_event_devt.patch @@ -0,0 +1,58 @@ +From 06f9b6e59661cee510b04513b13ea7927727d758 Mon Sep 17 00:00:00 2001 +From: Huang Rui +Date: Tue, 7 Jan 2014 17:45:50 +0800 +Subject: usb: dwc3: fix wrong bit mask in dwc3_event_devt + +From: Huang Rui + +commit 06f9b6e59661cee510b04513b13ea7927727d758 upstream. + +Around DWC USB3 2.30a release another bit has been added to the +Device-Specific Event (DEVT) Event Information (EvtInfo) bitfield. + +Because of that, what used to be 8 bits long, has become 9 bits long. + +Per dwc3 2.30a+ spec in the Device-Specific Event (DEVT), the field of +Event Information Bits(EvtInfo) uses [24:16] bits, and it has 9 bits +not 8 bits. And the following reserved field uses [31:25] bits not +[31:24] bits, and it has 7 bits. + +So in dwc3_event_devt, the bit mask should be: +event_info [24:16] 9 bits +reserved31_25 [31:25] 7 bits + +This patch makes sure that newer core releases will work fine with +Linux and that we will decode the event information properly on new +core releases. + +[ balbi@ti.com : improve commit log a bit ] + +Signed-off-by: Huang Rui +Signed-off-by: Felipe Balbi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/dwc3/core.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/usb/dwc3/core.h ++++ b/drivers/usb/dwc3/core.h +@@ -719,15 +719,15 @@ struct dwc3_event_depevt { + * 12 - VndrDevTstRcved + * @reserved15_12: Reserved, not used + * @event_info: Information about this event +- * @reserved31_24: Reserved, not used ++ * @reserved31_25: Reserved, not used + */ + struct dwc3_event_devt { + u32 one_bit:1; + u32 device_event:7; + u32 type:4; + u32 reserved15_12:4; +- u32 event_info:8; +- u32 reserved31_24:8; ++ u32 event_info:9; ++ u32 reserved31_25:7; + } __packed; + + /** diff --git a/queue-3.4/usb-musb-set-txmaxp-and-autoset-for-full-speed-bulk-in-device-mode.patch b/queue-3.4/usb-musb-set-txmaxp-and-autoset-for-full-speed-bulk-in-device-mode.patch new file mode 100644 index 00000000000..28e7c404d60 --- /dev/null +++ b/queue-3.4/usb-musb-set-txmaxp-and-autoset-for-full-speed-bulk-in-device-mode.patch @@ -0,0 +1,77 @@ +From bb3a2ef2eb8cfaea335dcb3426350df7f3d48069 Mon Sep 17 00:00:00 2001 +From: supriya karanth +Date: Thu, 6 Dec 2012 11:12:48 +0530 +Subject: usb: musb: set TXMAXP and AUTOSET for full speed bulk in device mode + +From: supriya karanth + +commit bb3a2ef2eb8cfaea335dcb3426350df7f3d48069 upstream. + +The TXMAXP register is not set correctly for full speed bulk case +when the can_bulk_split() is used. Without this PIO transfers will +not take place correctly + +The "mult" factor needs to be updated correctly for the +can_bulk_split() case + +The AUTOSET bit in the TXCSR is not being set if the "mult" +factor is greater than 0 for the High Bandwidth ISO case. +But the "mult" factor is also greater than 0 in case of Full speed +bulk transfers with the packet splitting in TXMAXP register + +Without the AUTOSET the DMA transfers will not progress in mode1 + +[ balbi@ti.com : add braces to both branches ] + +Signed-off-by: supriya karanth +Signed-off-by: Praveena NADAHALLY +Acked-by: Linus Walleij +Signed-off-by: Felipe Balbi +Cc: ian coolidge +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/musb/musb_gadget.c | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +--- a/drivers/usb/musb/musb_gadget.c ++++ b/drivers/usb/musb/musb_gadget.c +@@ -401,7 +401,19 @@ static void txstate(struct musb *musb, s + csr |= (MUSB_TXCSR_DMAENAB + | MUSB_TXCSR_DMAMODE + | MUSB_TXCSR_MODE); +- if (!musb_ep->hb_mult) ++ /* ++ * Enable Autoset according to table ++ * below ++ * bulk_split hb_mult Autoset_Enable ++ * 0 0 Yes(Normal) ++ * 0 >0 No(High BW ISO) ++ * 1 0 Yes(HS bulk) ++ * 1 >0 Yes(FS bulk) ++ */ ++ if (!musb_ep->hb_mult || ++ (musb_ep->hb_mult && ++ can_bulk_split(musb, ++ musb_ep->type))) + csr |= MUSB_TXCSR_AUTOSET; + } + csr &= ~MUSB_TXCSR_P_UNDERRUN; +@@ -1100,11 +1112,15 @@ static int musb_gadget_enable(struct usb + /* Set TXMAXP with the FIFO size of the endpoint + * to disable double buffering mode. + */ +- if (musb->double_buffer_not_ok) ++ if (musb->double_buffer_not_ok) { + musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); +- else ++ } else { ++ if (can_bulk_split(musb, musb_ep->type)) ++ musb_ep->hb_mult = (hw_ep->max_packet_sz_tx / ++ musb_ep->packet_sz) - 1; + musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz + | (musb_ep->hb_mult << 11)); ++ } + + csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; + if (musb_readw(regs, MUSB_TXCSR) diff --git a/queue-3.4/usb-xhci-fix-compilation-warning-when-config_pci-config_pm.patch b/queue-3.4/usb-xhci-fix-compilation-warning-when-config_pci-config_pm.patch new file mode 100644 index 00000000000..ac59f799370 --- /dev/null +++ b/queue-3.4/usb-xhci-fix-compilation-warning-when-config_pci-config_pm.patch @@ -0,0 +1,55 @@ +From 01bb59ebffdec314da8da66266edf29529372f9b Mon Sep 17 00:00:00 2001 +From: David Cohen +Date: Fri, 25 Apr 2014 19:20:16 +0300 +Subject: usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: David Cohen + +commit 01bb59ebffdec314da8da66266edf29529372f9b upstream. + +When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this +warning: +drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined +but not used [-Wunused-function] + +Instead of creating nested #ifdefs, this patch fixes it by defining the +xHCI PCI stubs as inline. + +This warning has been in since 3.2 kernel and was +caused by commit 421aa841a134f6a743111cf44d0c6d3b45e3cf8c +"usb/xhci: hide MSI code behind PCI bars", but wasn't noticed +until 3.13 when a configuration with these options was tried + +Signed-off-by: David Cohen +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -394,16 +394,16 @@ static int xhci_try_enable_msi(struct us + + #else + +-static int xhci_try_enable_msi(struct usb_hcd *hcd) ++static inline int xhci_try_enable_msi(struct usb_hcd *hcd) + { + return 0; + } + +-static void xhci_cleanup_msix(struct xhci_hcd *xhci) ++static inline void xhci_cleanup_msix(struct xhci_hcd *xhci) + { + } + +-static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) ++static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci) + { + } + diff --git a/queue-3.4/xhci-extend-quirk-for-renesas-cards.patch b/queue-3.4/xhci-extend-quirk-for-renesas-cards.patch new file mode 100644 index 00000000000..eb5fc295ad3 --- /dev/null +++ b/queue-3.4/xhci-extend-quirk-for-renesas-cards.patch @@ -0,0 +1,47 @@ +From 6db249ebefc6bf5c39f35dfaacc046d8ad3ffd70 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Fri, 25 Apr 2014 19:20:15 +0300 +Subject: xhci: extend quirk for Renesas cards + +From: Igor Gnatenko + +commit 6db249ebefc6bf5c39f35dfaacc046d8ad3ffd70 upstream. + +After suspend another Renesas PCI-X USB 3.0 card doesn't work. +[root@fedora-20 ~]# lspci -vmnnd 1912: +Device: 03:00.0 +Class: USB controller [0c03] +Vendor: Renesas Technology Corp. [1912] +Device: uPD720202 USB 3.0 Host Controller [0015] +SVendor: Renesas Technology Corp. [1912] +SDevice: uPD720202 USB 3.0 Host Controller [0015] +Rev: 02 +ProgIf: 30 + +This patch should be applied to stable kernel 3.14 that contain +the commit 1aa9578c1a9450fb21501c4f549f5b1edb557e6d +"xhci: Fix resume issues on Renesas chips in Samsung laptops" + +Reported-and-tested-by: Anatoly Kharchenko +Reference: http://redmine.russianfedora.pro/issues/1315 +Signed-off-by: Igor Gnatenko +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci-pci.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -135,9 +135,7 @@ static void xhci_pci_quirks(struct devic + xhci->quirks |= XHCI_TRUST_TX_LENGTH; + } + if (pdev->vendor == PCI_VENDOR_ID_RENESAS && +- pdev->device == 0x0015 && +- pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG && +- pdev->subsystem_device == 0xc0cd) ++ pdev->device == 0x0015) + xhci->quirks |= XHCI_RESET_ON_RESUME; + if (pdev->vendor == PCI_VENDOR_ID_VIA) + xhci->quirks |= XHCI_RESET_ON_RESUME;