Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp759631ybx; Wed, 30 Oct 2019 04:41:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwJLWN2rlQcdZDvtbdqkeI12Sd3+1WS7u0SMJ2Wvqyc+/mlhFN/3o0bOs4xoZWcd0ECFyK X-Received: by 2002:a17:906:f2d4:: with SMTP id gz20mr8440118ejb.215.1572435697009; Wed, 30 Oct 2019 04:41:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572435697; cv=none; d=google.com; s=arc-20160816; b=KFOq51B8UR7JxF4lM3qIrQsPfr5lseHAajoPBooU7eHt2IutosGJPm9xwFoNfI7YbA IyH10hGbwG8nh6bLNNm+DVP35l0atBSv+YVkJ9TsKo+/zzi73L5VXp2wAD+7S4N2dMK1 rZypF/2CIVDKrU5majMRNkjoc1V952hNoc+6dW5OBCpuqQ6G6Ui1sBXaQZeY4GRcXU7c JJIc1LtXeusnZy143G1y+LI7WsM++cQLdCdlSZOGVskKD210tEKkTRchzTxQVn3BUZa0 yC57UNk47oq2p9FUilax+zu9qMdhrPfX29juO+knKkugj+RdzrKDIE8vIP1bAUeLkPK7 xcBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=Iga1bxNHXLFlq45LBwYcEE+hMCnAYIYNF7MP1MkoqRg=; b=epngG1GOBYzYkPlxH8ESXEJoe01h/UIvwRwvLQwkjT0ytDTg4TIE+BCM4ejhwAcLpn j2VKIvPHHVo4e5oDUDsFT3skpSyTIuAXD7r9sdGptMt29BK/W1a3B/bqLeaFxNU5GTpe ILmKMzR05cPZQxDdq1Lx/83iN59wU04u8+MsJrBA+FU3XQOSKW8yFQLrxU+YNGGolRi1 syKLQy8oQ3lmQ+SL7X8kyFMSm1NEvbplxV43xPWxKsL1s9L5qWMNgE7tdAgG0n3Ov1H2 tQiM3NcPMz1umDx68SXU7HzmsBsnw1DxbH4L/FXdwShHAf1s+uiFNteLTU3Jt5Wtxybk WGrA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si1613277edc.146.2019.10.30.04.41.13; Wed, 30 Oct 2019 04:41:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbfJ3LkJ (ORCPT + 99 others); Wed, 30 Oct 2019 07:40:09 -0400 Received: from mga02.intel.com ([134.134.136.20]:19024 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfJ3LkJ (ORCPT ); Wed, 30 Oct 2019 07:40:09 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 04:40:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="205765879" Received: from pipin.fi.intel.com (HELO pipin) ([10.237.72.175]) by FMSMGA003.fm.intel.com with ESMTP; 30 Oct 2019 04:40:06 -0700 From: Felipe Balbi To: Sanket Parmar , gregkh@linuxfoundation.org Cc: sparmar@cadence.com, pawell@cadence.com, linux-usb@vger.kernel.org, rogerq@ti.com, linux-kernel@vger.kernel.org, kurahul@cadence.com, peter.chen@nxp.com, nsekhar@ti.com Subject: Re: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading In-Reply-To: <20191029122441.5816-1-sparmar@cadence.com> References: <20191029122441.5816-1-sparmar@cadence.com> Date: Wed, 30 Oct 2019 13:40:05 +0200 Message-ID: <8736fafomi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Greg, Sanket Parmar writes: > EP_CLAIMED flag is used to track the claimed endpoints. While unloading the > module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be > reused. > > Signed-off-by: Sanket Parmar if you want to take this as a patch: Acked-by: Felipe Balbi > --- > Hi Greg/Felipe, > > This can be used for -rc as it is bug fix. > > Regards, > Sanket > > drivers/usb/cdns3/gadget.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c > index 9050b380ab83..2fb78322ed3c 100644 > --- a/drivers/usb/cdns3/gadget.c > +++ b/drivers/usb/cdns3/gadget.c > @@ -2381,6 +2381,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget) > writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd); > readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val, > !(val & EP_CMD_EPRST), 1, 100); > + > + priv_ep->flags &= ~EP_CLAIMED; > } > > /* disable interrupt for device */ > -- > 2.17.1 > -- balbi