From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428317AbcBSQlL (ORCPT ); Fri, 19 Feb 2016 11:41:11 -0500 Received: from exsmtp03.microchip.com ([198.175.253.49]:55006 "EHLO email.microchip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1427393AbcBSQlG (ORCPT ); Fri, 19 Feb 2016 11:41:06 -0500 From: Joshua Henderson To: CC: Cristian Birsan , Joshua Henderson , Felipe Balbi , Greg Kroah-Hartman , Subject: [PATCH v4 2/2] usb: musb: Fix DMA desired mode for Mentor DMA engine Date: Fri, 19 Feb 2016 09:41:33 -0700 Message-ID: <1455900093-15577-2-git-send-email-joshua.henderson@microchip.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Cristian Birsan Commit 754fe4a92c07 ("usb: musb: Remove ifdefs for TX DMA for musb_host.c") introduces a problem setting the desired channel mode for the Mentor DMA engine. There is a case where an address is incorrectly assigned to the DMA channel desired mode when it should instead be assigned the actual mode value. This results in the value of channel->desired_mode not being correct. Signed-off-by: Cristian Birsan Signed-off-by: Joshua Henderson Tested-by: Ladislav Michl Acked-by: Sergei Shtylyov --- Changes since v3: None Changes since v2: - Fix wording in commit message. Changes since v1: - Fix commit comment citing the cause of the regression. --- drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 75c89b4..58487a4 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -662,7 +662,7 @@ static int musb_tx_dma_set_mode_mentor(struct dma_controller *dma, csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAMODE); csr |= MUSB_TXCSR_DMAENAB; /* against programmer's guide */ } - channel->desired_mode = mode; + channel->desired_mode = *mode; musb_writew(epio, MUSB_TXCSR, csr); return 0; -- 1.7.9.5