From patchwork Thu Mar 12 06:35:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 5990931 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 31660BF90F for ; Thu, 12 Mar 2015 06:35:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5648020375 for ; Thu, 12 Mar 2015 06:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86E1920374 for ; Thu, 12 Mar 2015 06:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753084AbbCLGfv (ORCPT ); Thu, 12 Mar 2015 02:35:51 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:20683 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753122AbbCLGfp (ORCPT ); Thu, 12 Mar 2015 02:35:45 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 12 Mar 2015 15:35:44 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 60FD8402EB; Thu, 12 Mar 2015 15:35:44 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 512C82806E; Thu, 12 Mar 2015 15:35:44 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 4B1312806D; Thu, 12 Mar 2015 15:35:44 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id RAK03640; Thu, 12 Mar 2015 15:35:44 +0900 X-IronPort-AV: E=Sophos;i="5.11,387,1422889200"; d="scan'208";a="181770025" Received: from mail-sg1lp0085.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.85]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 12 Mar 2015 15:35:43 +0900 Received: from localhost (211.11.155.147) by SINPR06MB329.apcprd06.prod.outlook.com (10.141.110.15) with Microsoft SMTP Server (TLS) id 15.1.106.15; Thu, 12 Mar 2015 06:35:42 +0000 From: Yoshihiro Shimoda To: , , , , , , CC: , , , Yoshihiro Shimoda Subject: [PATCH v3 2/3] usb: renesas_usbhs: fix the sequence in xfer_work() Date: Thu, 12 Mar 2015 15:35:19 +0900 Message-ID: <1426142120-5072-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.4.msysgit.1 In-Reply-To: <1426142120-5072-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1426142120-5072-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.147] X-ClientProxiedBy: OS2PR01CA0013.jpnprd01.prod.outlook.com (25.161.74.151) To SINPR06MB329.apcprd06.prod.outlook.com (10.141.110.15) Authentication-Results: linuxfoundation.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SINPR06MB329; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(6069001)(36756003)(42186005)(551934003)(48376002)(229853001)(19580395003)(46102003)(50986999)(76176999)(77096005)(33646002)(40100003)(87976001)(66066001)(122386002)(78352002)(62966003)(50466002)(50226001)(2950100001)(19580405001)(42382002)(92566002)(47776003)(77156002)(76506005); DIR:OUT; SFP:1102; SCL:1; SRVR:SINPR06MB329; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002009); SRVR:SINPR06MB329; BCL:0; PCL:0; RULEID:; SRVR:SINPR06MB329; X-Forefront-PRVS: 05134F8B4F X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2015 06:35:42.3412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SINPR06MB329 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 28d10eb..b737661 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); } /*