stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 25/40] usb: dwc3: gadget: dont enable interrupt when disabling endpoint
Date: Mon, 20 Apr 2020 14:39:35 +0200	[thread overview]
Message-ID: <20200420121501.489818182@linuxfoundation.org> (raw)
In-Reply-To: <20200420121444.178150063@linuxfoundation.org>

[ Upstream commit c5353b225df9b2d0cf881873eef6f680e43c9aa2 ]

Since we're disabling the endpoint anyway, we don't worry about
getting endpoint command completion interrupt.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/dwc3/gadget.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 7b8b463676ad6..019aee3a79568 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -688,12 +688,13 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action)
 	return 0;
 }
 
-static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force);
+static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
+		bool interrupt);
 static void dwc3_remove_requests(struct dwc3 *dwc, struct dwc3_ep *dep)
 {
 	struct dwc3_request		*req;
 
-	dwc3_stop_active_transfer(dep, true);
+	dwc3_stop_active_transfer(dep, true, false);
 
 	/* - giveback all requests to gadget driver */
 	while (!list_empty(&dep->started_list)) {
@@ -1416,7 +1417,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
 		}
 		if (r == req) {
 			/* wait until it is processed */
-			dwc3_stop_active_transfer(dep, true);
+			dwc3_stop_active_transfer(dep, true, true);
 
 			if (!r->trb)
 				goto out0;
@@ -2366,7 +2367,7 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
 	dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
 
 	if (stop) {
-		dwc3_stop_active_transfer(dep, true);
+		dwc3_stop_active_transfer(dep, true, true);
 		dep->flags = DWC3_EP_ENABLED;
 	}
 
@@ -2488,7 +2489,8 @@ static void dwc3_reset_gadget(struct dwc3 *dwc)
 	}
 }
 
-static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
+static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force,
+	bool interrupt)
 {
 	struct dwc3 *dwc = dep->dwc;
 	struct dwc3_gadget_ep_cmd_params params;
@@ -2532,7 +2534,7 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
 
 	cmd = DWC3_DEPCMD_ENDTRANSFER;
 	cmd |= force ? DWC3_DEPCMD_HIPRI_FORCERM : 0;
-	cmd |= DWC3_DEPCMD_CMDIOC;
+	cmd |= interrupt ? DWC3_DEPCMD_CMDIOC : 0;
 	cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
 	memset(&params, 0, sizeof(params));
 	ret = dwc3_send_gadget_ep_cmd(dep, cmd, &params);
-- 
2.20.1




  parent reply	other threads:[~2020-04-20 12:50 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 12:39 [PATCH 4.19 00/40] 4.19.117-rc1 review Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 01/40] amd-xgbe: Use __napi_schedule() in BH context Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 02/40] hsr: check protocol version in hsr_newlink() Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 03/40] net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 04/40] net: ipv6: do not consider routes via gateways for anycast address check Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 05/40] net: qrtr: send msgs from local of same id as broadcast Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 06/40] net: revert default NAPI poll timeout to 2 jiffies Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 07/40] net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 08/40] net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 09/40] ovl: fix value of i_ino for lower hardlink corner case Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 10/40] scsi: ufs: Fix ufshcd_hold() caused scheduling while atomic Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 11/40] jbd2: improve comments about freeing data buffers whose page mapping is NULL Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 12/40] pwm: pca9685: Fix PWM/GPIO inter-operation Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 13/40] ext4: fix incorrect group count in ext4_fill_super error message Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 14/40] ext4: fix incorrect inodes per group in " Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 15/40] ASoC: Intel: mrfld: fix incorrect check on p->sink Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 16/40] ASoC: Intel: mrfld: return error codes when an error occurs Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 17/40] ALSA: usb-audio: Filter error from connector kctl ops, too Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 18/40] ALSA: usb-audio: Dont override ignore_ctl_error value from the map Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 19/40] ALSA: usb-audio: Dont create jack controls for PCM terminals Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 20/40] ALSA: usb-audio: Check mapping at creating connector controls, too Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 21/40] keys: Fix proc_keys_next to increase position index Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 22/40] tracing: Fix the race between registering snapshot event trigger and triggering snapshot operation Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 23/40] btrfs: check commit root generation in should_ignore_root Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 24/40] mac80211_hwsim: Use kstrndup() in place of kasprintf() Greg Kroah-Hartman
2020-04-20 12:39 ` Greg Kroah-Hartman [this message]
2020-04-20 12:39 ` [PATCH 4.19 26/40] usb: dwc3: gadget: Dont clear flags before transfer ended Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 27/40] drm/amd/powerplay: force the trim of the mclk dpm_levels if OD is enabled Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 28/40] ext4: do not zeroout extents beyond i_disksize Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 29/40] kvm: x86: Host feature SSBD doesnt imply guest feature SPEC_CTRL_SSBD Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 30/40] scsi: target: remove boilerplate code Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 31/40] scsi: target: fix hang when multiple threads try to destroy the same iscsi session Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 32/40] x86/microcode/AMD: Increase microcode PATCH_MAX_SIZE Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 33/40] x86/resctrl: Preserve CDP enable over CPU hotplug Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 34/40] x86/resctrl: Fix invalid attempt at removing the default resource group Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 35/40] wil6210: check rx_buff_mgmt before accessing it Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 36/40] wil6210: ignore HALP ICR if already handled Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 37/40] wil6210: add general initialization/size checks Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 38/40] wil6210: make sure Rx ring sizes are correlated Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 39/40] wil6210: remove reset file from debugfs Greg Kroah-Hartman
2020-04-20 12:39 ` [PATCH 4.19 40/40] mm/vmalloc.c: move area->pages after if statement Greg Kroah-Hartman
2020-04-20 14:17 ` [PATCH 4.19 00/40] 4.19.117-rc1 review Chris Paterson
2020-04-21  9:55   ` Greg Kroah-Hartman
2020-04-20 19:51 ` Guenter Roeck
2020-04-20 22:24 ` Naresh Kamboju
2020-04-21  9:56   ` Greg Kroah-Hartman
2020-04-22 17:53   ` Ben Hutchings
2020-04-21  9:52 ` Jon Hunter
2020-04-21 20:04 ` shuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420121501.489818182@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).