From patchwork Fri Oct 17 17:16:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 38925 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DF992202DB for ; Fri, 17 Oct 2014 17:17:53 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf793699wiv.8 for ; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=gMSUQRiopQwBynvrKj2u9qRUWymcnk0cE0hzIi0Epv4=; b=L0O8jXj3Ja7f8j9//K+b7Tdj/s78dCqjaHs6EbOcOdYHnt8Mup9EcULDSdWGumTaON N9Vqn88PA0+MyxWly4rXC/ufIqklezM/NfWd9ynA/UOF2id5V1f/UM95TvInvAUUlKLZ FFK1y9HjQFOZy5DgMspSmhfO1GArE5/4fJ/kFKJOYZFZiABtV4uJVCDTnGyiUmCxdPOa pUhmGfkV54/D+v5gcHWw7ieNiHyCk6B8UL7I0JrwfuM8biR+/pDcbnupZkFisq1VebyZ 0DdKZ+dpamIFN0E3XtjmM/koUIoO6vmJ0hOBYTwFXb6BRUqpFadXBt2F8YX3hXpYSIIS taQw== X-Gm-Message-State: ALoCoQkbJmkY6UmhuoqtxauXNqM8YOFEl2+cg2XbIGUX7rLo9vUMc24psC9XVXTOY6bjlwjtk3t7 X-Received: by 10.112.190.5 with SMTP id gm5mr20690lbc.18.1413566272744; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.74 with SMTP id w10ls291321laj.99.gmail; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) X-Received: by 10.152.22.74 with SMTP id b10mr10285272laf.16.1413566272506; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id ps4si3039072lbb.16.2014.10.17.10.17.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 10:17:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id gi9so1084190lab.33 for ; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr1960047lbw.66.1413566272348; Fri, 17 Oct 2014 10:17:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp268012lbz; Fri, 17 Oct 2014 10:17:51 -0700 (PDT) X-Received: by 10.66.66.193 with SMTP id h1mr9934320pat.103.1413566270009; Fri, 17 Oct 2014 10:17:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si1686618pdm.75.2014.10.17.10.17.49 for ; Fri, 17 Oct 2014 10:17:50 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753193AbaJQRRl (ORCPT + 3 others); Fri, 17 Oct 2014 13:17:41 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55933 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752781AbaJQRRk (ORCPT ); Fri, 17 Oct 2014 13:17:40 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9HHHTg6028968; Fri, 17 Oct 2014 12:17:29 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHT3O000629; Fri, 17 Oct 2014 12:17:29 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 17 Oct 2014 12:17:29 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9HHHSfl029814; Fri, 17 Oct 2014 12:17:29 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Greg KH , , Paul Zimmerman , , , , , , , Heikki Krogerus , Felipe Balbi Subject: [PATCH 04/67] usb: dwc3: core: only setting the dma_mask when needed Date: Fri, 17 Oct 2014 12:16:11 -0500 Message-ID: <1413566234-13537-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.1.0.GIT In-Reply-To: <1413566234-13537-1-git-send-email-balbi@ti.com> References: <1413566234-13537-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Heikki Krogerus If the probe drivers have already set the dma_mask, not replacing the value. Signed-off-by: Heikki Krogerus Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index ddfe771..1384300 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -715,9 +715,11 @@ static int dwc3_probe(struct platform_device *pdev) spin_lock_init(&dwc->lock); platform_set_drvdata(pdev, dwc); - dev->dma_mask = dev->parent->dma_mask; - dev->dma_parms = dev->parent->dma_parms; - dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); + if (!dev->dma_mask) { + dev->dma_mask = dev->parent->dma_mask; + dev->dma_parms = dev->parent->dma_parms; + dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask); + } pm_runtime_enable(dev); pm_runtime_get_sync(dev);