Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1667545ybb; Sun, 29 Mar 2020 10:22:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvo0uLGY4xyLfLgAaUsYM60cvAq1UC+VJrM4kjnMtIewbgaNMfOSaSrpdNXPma44gqquu7E X-Received: by 2002:a9d:264a:: with SMTP id a68mr6190089otb.176.1585502523647; Sun, 29 Mar 2020 10:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585502523; cv=none; d=google.com; s=arc-20160816; b=lPor1Fcp2OUlnljNN8/0JmbzQOqSp4imr3bfKOcdAsjF+9jWdaZZ7KhPVTqGRXSzmr H1ZPWqfldSRnQ46uMDr5AJx/c8XeDPbI1KdGmIWovfSCabttrxN1xMrMoSSocKiEQmGx i04YgFIn98L5H+l4MaLeZ2FRpdRp2LD02zP06IrGzrzOyqEgMF8j5moZtfTDPQANjuiy jSgBG8zzJrkazxtKfQO79axn5dSXieAK/VILiBocIWyUVSRoubzEnsS1sgpUQKfZi4ZA 89Qpi8BdH7bTeLW2h0/E3MjNxWZ4OFz3D+UKsgrbD4Lf9izhXhI0RX/QiLdOX7UI7oEw OIbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1VdjSPPRhlOBu7W9s+NexDovrzvWntWGJmIdhHoxZAQ=; b=JjC5GSpUwM9zf2O4jDHUezdzTyzAH7IENX2zTQmRrL4J7T9nGc/SWuXobCGIDfLiyX tvMwCjS04plEO1sigaEWH0oUmeFeX6fJni42oHTGYx5snYHrVVWgFyJVgB0Kn2JuPEbt 5tigaXp7LoAWPuqnsjJPlv0oc7vbNyYbjEvJ1hkVzsk7IK5VsrY5LTnyx26IA9vicgZO W1jk9VwUYTKpJ1zE3vMoqNgmd/GCPWpdK/A1k6F5OIINlVKi3rJ6BqJH2pqiQbFCY86x vPRE7ABUoRJM2QCh1k44uas+oVL2JggrDiisox073OWyAVJP5TzVOHht8k/WjiB8eVnj VAKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=a4VluhOb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j69si4815162oib.93.2020.03.29.10.21.49; Sun, 29 Mar 2020 10:22:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=a4VluhOb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728401AbgC2RSB (ORCPT + 99 others); Sun, 29 Mar 2020 13:18:01 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:39399 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728379AbgC2RSB (ORCPT ); Sun, 29 Mar 2020 13:18:01 -0400 Received: by mail-pj1-f65.google.com with SMTP id z3so5751833pjr.4 for ; Sun, 29 Mar 2020 10:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1VdjSPPRhlOBu7W9s+NexDovrzvWntWGJmIdhHoxZAQ=; b=a4VluhObQuJFb8SVMTjUUnyaHON/TeGQbbeStEeHeBcJegBh1n4OVsHdtsIfVjvse5 IbvBFPybuUVOSQC5Fxd7Qc5iEqcrp89RD74YyUyxSTdpfuKOOp0DVATyIlxcyzQfmBWr zEFxYeTsBKcYbSpW7IIWW+VqW4tsstUSA4qE0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1VdjSPPRhlOBu7W9s+NexDovrzvWntWGJmIdhHoxZAQ=; b=eJTTIcn39fopeVdskzOd2H3W94BKyCMvb6MmbaRDk5Xz5Q0egAXEbva+49kIHiMIHg rJKrwNL6m+ISXvWDCYI/tuKJ0OcgcICKfKOAv2IkMh9Vzu2AmNYo/AaNw+F8F0VyeLNq bkY7pIAJ/2TSJvvXhykEFtHJg8t+Z6opg4ot9tryvgo17UHUNZnUsLHVO5az94cYLnuC FCKXMhPPWNiMMzhkD7pdECiHWM4bszN/REeD6VBcR7yAEvYx+1eByieEKbFOyQjwK9M1 RDme8/9UzUnLPD6k6L03S6rrOZMQs5iyI3KqT8HND2MFhg1Xj2AYuVV/rhV8t5KYzZcd tDzg== X-Gm-Message-State: ANhLgQ2alG+b1OI5dHwi8mgZWHKxX/GE3Vmcqgq1iEe5K27U2vyoiL28 u/TGJy1FtJ/a4BM2wLRI7oOVuQ== X-Received: by 2002:a17:90a:b702:: with SMTP id l2mr11203973pjr.22.1585502280189; Sun, 29 Mar 2020 10:18:00 -0700 (PDT) Received: from localhost ([2620:15c:202:1:4fff:7a6b:a335:8fde]) by smtp.gmail.com with ESMTPSA id t2sm4016414pfh.157.2020.03.29.10.17.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Mar 2020 10:17:59 -0700 (PDT) Date: Sun, 29 Mar 2020 10:17:56 -0700 From: Matthias Kaehlcke To: Sandeep Maheswaram , Felipe Balbi Cc: Andy Gross , Bjorn Andersson , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Felipe Balbi , Stephen Boyd , Doug Anderson , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manu Gautam , Chandana Kishori Chiluveru Subject: Re: [PATCH v6 2/4] usb: dwc3: qcom: Add interconnect support in dwc3 driver Message-ID: <20200329171756.GA199755@google.com> References: <1585302203-11008-1-git-send-email-sanm@codeaurora.org> <1585302203-11008-3-git-send-email-sanm@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1585302203-11008-3-git-send-email-sanm@codeaurora.org> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Mar 27, 2020 at 03:13:21PM +0530, Sandeep Maheswaram wrote: > Add interconnect support in dwc3-qcom driver to vote for bus > bandwidth. > > This requires for two different paths - from USB master to > DDR slave. The other is from APPS master to USB slave. > > Signed-off-by: Sandeep Maheswaram > Signed-off-by: Chandana Kishori Chiluveru > Reviewed-by: Matthias Kaehlcke > --- > drivers/usb/dwc3/dwc3-qcom.c | 128 ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 126 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index 1dfd024..7e85fe6 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > > ... > > +/* To disable an interconnect, we just set its bandwidth to 0 */ > +static int dwc3_qcom_interconnect_disable(struct dwc3_qcom *qcom) > +{ > + int ret; > + > + ret = icc_set_bw(qcom->usb_ddr_icc_path, 0, 0); > + if (ret) > + return ret; > + > + ret = icc_set_bw(qcom->apps_usb_icc_path, 0, 0); > + if (ret) > + goto err_reenable_memory_path; > + > + return 0; > + > + /* Re-enable things in the event of an error */ > +err_reenable_memory_path: > + ret = dwc3_qcom_interconnect_enable(qcom); This overwrites the error that led to the execution of this code path. The function should return original error, not the result of the _interconnect_enable() call. I saw Felipe queued the patch for v5.8. I think the main options to fix this are: - a v6 of this patch to replace v5 in Felipe's tree (which IIUC will be rebased anyway once there is a v5.7-rc) - send the fix as a separate patch - Felipe amends the patch in his tree Felipe, what would work best for you? Thanks Matthias