From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:49181 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756008AbcGGApK (ORCPT ); Wed, 6 Jul 2016 20:45:10 -0400 Subject: Patch "usb: musb: only restore devctl when session was set in backup" has been added to the 4.4-stable tree To: b-liu@ti.com, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 06 Jul 2016 17:45:18 -0700 Message-ID: <146785231866167@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled usb: musb: only restore devctl when session was set in backup to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-musb-only-restore-devctl-when-session-was-set-in-backup.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 84ac5d1140f716a616522f952734e850448d2556 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Tue, 31 May 2016 10:05:24 -0500 Subject: usb: musb: only restore devctl when session was set in backup From: Bin Liu commit 84ac5d1140f716a616522f952734e850448d2556 upstream. If the session bit was not set in the backup of devctl register, restoring devctl would clear the session bit. Therefor, only restore devctl register when the session bit was set in the backup. This solves the device enumeration failure in otg mode exposed by commit 56f487c (PM / Runtime: Update last_busy in rpm_resume). Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2401,7 +2401,8 @@ static void musb_restore_context(struct musb_writew(musb_base, MUSB_INTRTXE, musb->intrtxe); musb_writew(musb_base, MUSB_INTRRXE, musb->intrrxe); musb_writeb(musb_base, MUSB_INTRUSBE, musb->context.intrusbe); - musb_writeb(musb_base, MUSB_DEVCTL, musb->context.devctl); + if (musb->context.devctl & MUSB_DEVCTL_SESSION) + musb_writeb(musb_base, MUSB_DEVCTL, musb->context.devctl); for (i = 0; i < musb->config->num_eps; ++i) { struct musb_hw_ep *hw_ep; Patches currently in stable-queue which might be from b-liu@ti.com are queue-4.4/usb-gadget-fix-spinlock-dead-lock-in-gadgetfs.patch queue-4.4/usb-musb-stop-bulk-endpoint-while-queue-is-rotated.patch queue-4.4/usb-musb-ensure-rx-reinit-occurs-for-shared_fifo-endpoints.patch queue-4.4/usb-musb-host-correct-cppi-dma-channel-for-isoch-transfer.patch queue-4.4/usb-musb-only-restore-devctl-when-session-was-set-in-backup.patch