From patchwork Mon Feb 9 08:16:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 5799081 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9723E9F36A for ; Mon, 9 Feb 2015 08:16:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CAB3E2010F for ; Mon, 9 Feb 2015 08:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E81502010E for ; Mon, 9 Feb 2015 08:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759837AbbBIIQi (ORCPT ); Mon, 9 Feb 2015 03:16:38 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:10868 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759833AbbBIIQh (ORCPT ); Mon, 9 Feb 2015 03:16:37 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie3.idc.renesas.com with ESMTP; 09 Feb 2015 17:16:36 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 4BD854F004; Mon, 9 Feb 2015 17:16:36 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 429F51806F; Mon, 9 Feb 2015 17:16:36 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id 3B0AE1800A; Mon, 9 Feb 2015 17:16:36 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id TAL26787; Mon, 9 Feb 2015 17:16:36 +0900 X-IronPort-AV: E=Sophos;i="5.09,542,1418050800"; d="scan'208";a="179460859" Received: from mail-hk1lp0123.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.123]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 09 Feb 2015 17:16:35 +0900 Received: from localhost (211.11.155.147) by HKNPR06MB324.apcprd06.prod.outlook.com (10.141.38.18) with Microsoft SMTP Server (TLS) id 15.1.81.19; Mon, 9 Feb 2015 08:16:34 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , , , Yoshihiro Shimoda Subject: [PATCH 3/4] usb: renesas_usbhs: fix the sequence in xfer_work() Date: Mon, 9 Feb 2015 17:16:13 +0900 Message-ID: <1423469774-6532-4-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1423469774-6532-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1423469774-6532-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.147] X-ClientProxiedBy: HKXPR03CA0047.apcprd03.prod.outlook.com (10.141.129.37) To HKNPR06MB324.apcprd06.prod.outlook.com (10.141.38.18) Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB324; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:HKNPR06MB324; X-Forefront-PRVS: 04825EA361 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(48376002)(19580405001)(19580395003)(50466002)(78352002)(50226001)(50986999)(76176999)(87976001)(42382002)(551934003)(46102003)(33646002)(122386002)(40100003)(76506005)(229853001)(92566002)(42186005)(77156002)(2950100001)(77096005)(66066001)(36756003)(47776003)(62966003); DIR:OUT; SFP:1102; SCL:1; SRVR:HKNPR06MB324; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:HKNPR06MB324; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2015 08:16:34.6291 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKNPR06MB324 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the setup sequence in xfer_work(). Otherwise, sometimes a usb transaction will get stuck. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/renesas_usbhs/fifo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 9fae14a..3b77a1b 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -822,10 +822,10 @@ static void xfer_work(struct work_struct *work) fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero); usbhs_pipe_running(pipe, 1); - usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans); - usbhs_pipe_enable(pipe); usbhsf_dma_start(pipe, fifo); + usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans); dma_async_issue_pending(chan); + usbhs_pipe_enable(pipe); } /*