From patchwork Fri May 19 13:27:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 9737239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A7F76020B for ; Fri, 19 May 2017 13:28:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1003A1FFAE for ; Fri, 19 May 2017 13:28:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03B1128911; Fri, 19 May 2017 13:28:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47DCF1FFAE for ; Fri, 19 May 2017 13:27:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751355AbdESN15 (ORCPT ); Fri, 19 May 2017 09:27:57 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:36845 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbdESN15 (ORCPT ); Fri, 19 May 2017 09:27:57 -0400 Received: by mail-wr0-f174.google.com with SMTP id l50so17415752wrc.3 for ; Fri, 19 May 2017 06:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=0TBLjtTRGZwBUntb05dtRZ1lnqYOU2g8Y+EjZpKfz7M=; b=wBetYPZiBP+ZqT7D72DMpH1yyf8zBAWFntfBFRhvwhW7jmP3TL3F/lI37tFQXGjgm9 D6pNXm2ObphbNxKIYF6mfQy80Q6PNTXGDkEY8DJh5SYz9g5N4shT0hK/QeQE/GzdnwgO c1CkPrSTDFsPTCXnvUmthFo0w97PsU3LQAPV0TbUr7TrS7+mNsInn9boowxxgONw8RAf chxO1POWYRImr3BcMoYpkIZV6wXRrlMrFP/Uq3M/QrjIoJjSkwZ1msrTI5LwCJZCzUDt LH0LQiqMFz0FldyVBqKsQj6/NqYALbOODYf27q99oJRXFzvxPFkjUfxtCO/RSxSn+Pjq 03xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0TBLjtTRGZwBUntb05dtRZ1lnqYOU2g8Y+EjZpKfz7M=; b=Xo54DBYQSru5dcNLb7z4vUVFB2y6d0sG5mCo8wVaiJZa4NQSJGkK2fsGWEzZniGr/W CMMmBEOfWoucXjxlEK7sIfTdyuZANVqL8TTtBm/v4JezJkKp16hQXz4ya6KnQM84AHsH r28EFBHYDSbNf2YHOx89tiIE79o7oRpxA6ydiVq4AWHm4y+FyhfSvep149PBRGJq4IQn LxqM7yh53bMyUAOhnsUuPLA6pgiyJ2QSwiKc/CwOxFHdsvEDiu3Ogd77as3H9VaTMM9o aHFFLQEiirErqziTDyL3XGU3BN8VQpu+O6OrnK3VBOt44hJb4iHUHf5AE8Hx0iY/hTVj +geg== X-Gm-Message-State: AODbwcBTm3mMsb0Xdn5cssiFpsw76txG6HSnb1Ir4d/CZ3qNtBizWZ8M DrJHUYH6c3C7T01Y X-Received: by 10.223.155.134 with SMTP id d6mr3511572wrc.157.1495200475700; Fri, 19 May 2017 06:27:55 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id y6sm3270639wrc.51.2017.05.19.06.27.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 May 2017 06:27:54 -0700 (PDT) From: Alexandre Bailon To: b-liu@ti.com Cc: linux-usb@vger.kernel.org, nsekhar@ti.com, ptitiano@baylibre.com, sergei.shtylyov@cogentembedded.com, linux-omap@vger.kernel.org, johan@kernel.org, Alexandre Bailon Subject: [PATCH v3] usb: musb: musb_cppi41: Update an error message Date: Fri, 19 May 2017 15:27:47 +0200 Message-Id: <20170519132747.4730-1-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If dma_request_slave_channel() failed to return a channel, then the driver will print an error and request to defer probe, regardless of the cause of the failure. Defer if the DMA is not ready yet otherwise print an error. Signed-off-by: Alexandre Bailon Reviewed-by: Johan Hovold --- drivers/usb/musb/musb_cppi41.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index e7c8b1b..2c6ad93 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -673,12 +673,14 @@ static int cppi41_dma_controller_start(struct cppi41_dma_controller *controller) musb_dma->status = MUSB_DMA_STATUS_FREE; musb_dma->max_len = SZ_4M; - dc = dma_request_slave_channel(dev->parent, str); - if (!dc) { - dev_err(dev, "Failed to request %s.\n", str); - ret = -EPROBE_DEFER; + dc = dma_request_chan(dev->parent, str); + if (IS_ERR(dc)) { + ret = PTR_ERR(dc); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to request %s.\n", str); goto err; } + cppi41_channel->dc = dc; } return 0;