Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7749915ybl; Thu, 16 Jan 2020 05:06:41 -0800 (PST) X-Google-Smtp-Source: APXvYqzPS8GfWWYVMfNaeNTD6G886TJZUK1HdBRhQKXwhzojybwMW8Uxv3qxHisH4aWoZKYq7/6e X-Received: by 2002:aca:b1d4:: with SMTP id a203mr3904078oif.150.1579180001147; Thu, 16 Jan 2020 05:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579180001; cv=none; d=google.com; s=arc-20160816; b=GBDewcqdEbcDv1czsz5DxYu0LCuUqyUpP/UFjckO+lXg7AM5RhiQ1Nr97yoJmpBWac JTrbGTYpL+zjBU16kUQJ9AFoqxUXKLTNS9EBBJNLyk5IYMO4PKvZMw/4TdFe1YjLgg3D +7iSP/fdtvEfc6A9n7zID/Cj9fUi89Pbgkd5Q3S4iJ9idKwJiXgTmB3pvh44KJf29SnO YpGmh4kdxRQ3s28XGakKsthDJK+4r/EVPWrFKKhGJJAjIDYQjmknxHr0ZruqJydKX/8U SGWWEN2bL+fWD4YWwt6BJsgUqZ3dl5yXYvHY9SLoMySzazOLKACNRQn0HOxF6nH3aGiJ JZ4A== 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:dkim-signature; bh=oHRvLFsSZO6m5OUuYzRooxxwNZyNse+CVWLNaVKCMQQ=; b=MOCe2pJHXqNdC1p3Hh2oILkQlcyUiST82ILfKvMLBootpoU+d455byrb3sW39p1va6 i+rcF4BngKLFC3KELnT1H3t4mJ+7HyHKGF7y//LDFMzVpO89ovzOWpVNjPXf6SxUT/Wy DQ/W6QJbtmyikWrQPyyHIy3vlkf8YfWUtcUmIPYzqtc0SamwolUgLpz68w7Clo6Hdwms rZh7GP+7+iuR1YhkOk+VdUDM0kMVSfE4xXtAaV5j59qoC54YQ5WkONi06H5zBnLr4fGv 4wtNeiJN/jzmgB/9+Qr+mlMcdgGoBJDxAblO2NzwV7dyRz/liNh1SBqsRuLDhAOECpjK fpPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=KhIVuR+g; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si11229857oij.118.2020.01.16.05.06.28; Thu, 16 Jan 2020 05:06:41 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=KhIVuR+g; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbgAPNE5 (ORCPT + 99 others); Thu, 16 Jan 2020 08:04:57 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45336 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbgAPNE5 (ORCPT ); Thu, 16 Jan 2020 08:04:57 -0500 Received: by mail-lj1-f196.google.com with SMTP id j26so22516635ljc.12; Thu, 16 Jan 2020 05:04:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=oHRvLFsSZO6m5OUuYzRooxxwNZyNse+CVWLNaVKCMQQ=; b=KhIVuR+gxWcwLJ11YF7kRi4tbGlMNWp6VSAL3G8rxgw4ld0+ahnopyFBMnawRh57dY QGQOgxjFPdOY8xqgCCTy9z7tZjVDXJRClUKZN+mWAQxUAwiS/T1g/VjuuPxXsyzWwfTR sDntahJ+pzCEqFFl+uT65etVw9Z5kuIu8jmSeuNBUBFg+hJsEw0Qy2oqi3sbJkXckvLt U+rf11i1fbsW6bwoudDVzHDVrZTHRfJj90C6S5gS+kxvPAWiNR0uLzwnVK96NRr+8F4E hp5QQagpjmXXy+mRgcTxjzvfTevL7unn/FnKglCD5Wouas9j0A5huVPLVgsUlk76gKBN Xsyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=oHRvLFsSZO6m5OUuYzRooxxwNZyNse+CVWLNaVKCMQQ=; b=UcQQL7K41cZOTJ1Nkj3owO2zhO0lXctZYTf7NSl4mopT4UOfuM7Sj6Jg1Euu9QefS5 QLmyHdGZjvCG6uEdRZ51FydSKCC0hVpaCkRjVBKHYBphfTaoKvfjlZ3upkT46uZB33O8 mMcuExGcxTq7sEAifbmxipRWC+/fc3EIYujyhgEIS6hYqSI8B4RaoHCfMIpziK3kawrt UfLUWNTIkWwy1Xn2IhPmlqkY065tF/9lUDJFZ18r7eAPqY/RozTiMZ64LtkcluBVDT5s aOhwZe3vYGaUIq1m24puSJTh6zCKJESQ4gLgtajL2BNoB/AYpY9ALOpNJkmpgLWv93cJ nrQg== X-Gm-Message-State: APjAAAUVdEU718sn3k9pPV5E0xG/q3XHfnVP29QcwpqBQ+yQTb7zLijA yGBTCRT98j7E/Umdfa21T6a/wV69kbYcrQ== X-Received: by 2002:a2e:990e:: with SMTP id v14mr2098350lji.23.1579179895377; Thu, 16 Jan 2020 05:04:55 -0800 (PST) Received: from saruman (88-113-215-33.elisa-laajakaista.fi. [88.113.215.33]) by smtp.gmail.com with ESMTPSA id g15sm10634929ljl.10.2020.01.16.05.04.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Jan 2020 05:04:54 -0800 (PST) From: Felipe Balbi To: "Ardelean\, Alexandru" , "m.olbrich\@pengutronix.de" Cc: "gregkh\@linuxfoundation.org" , "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , "bigeasy\@linutronix.de" , "lars\@metafoo.de" Subject: Re: [PATCH] usb: dwc3: gadget: Handle dequeuing of non queued URB gracefully In-Reply-To: <9d6ec804e3f1f462e5c6a43d19c83ff3493e3727.camel@analog.com> References: <20191106144553.16956-1-alexandru.ardelean@analog.com> <20191112144108.GA1859@pengutronix.de> <9d6ec804e3f1f462e5c6a43d19c83ff3493e3727.camel@analog.com> Date: Thu, 16 Jan 2020 15:05:54 +0200 Message-ID: <87ftgf5z65.fsf@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, "Ardelean, Alexandru" writes: > On Tue, 2019-11-12 at 15:41 +0100, Michael Olbrich wrote: >> [External] >>=20 >> On Wed, Nov 06, 2019 at 04:45:53PM +0200, Alexandru Ardelean wrote: >> > From: Lars-Peter Clausen >> >=20 >> > Trying to dequeue and URB that is currently not queued should be a no- >> > op >> > and be handled gracefully. >> >=20 >> > Use the list field of the URB to indicate whether it is queued or not >> > by >> > setting it to the empty list when it is not queued. >> >=20 >> > Handling this gracefully allows for race condition free synchronization >> > between the complete callback being called to to a completed transfer >> > and >> > trying to call usb_ep_dequeue() at the same time. >> >=20 >> > Signed-off-by: Lars-Peter Clausen >> > Signed-off-by: Alexandru Ardelean >>=20 >> Thanks, no more "dwc3 fe200000.usb: request 00000000cdd42e4a was not >> queued >> to ep2in" messages with this patch applied. >>=20 >> Tested-by: Michael Olbrich >>=20 > > I thought I replied here, but I guess I never hit the Send button. > Many thanks @Michael for testing this. > > I'd also use the opportunity to make this a patch-ping message. https://lore.kernel.org/linux-usb/875zhd6pw0.fsf@kernel.org/T/#u =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl4gX7IACgkQzL64meEa mQbl/xAAxg29eDM+Ua+CWApxRhTmdYgTlYT5XRtQFBHBwhuRjqVtDLVx0dQsTM9d +GAd0dJSWYIfYGKdNcs8F0QP+WGVd7iaW0XbtxoVQOyYA9fPyKrAuRZJ0cyB5oYP dFBzXHtKihWnYhYDO/vpUxv0pq8f++3ulrPMyuL3ASgzo21aiGYhSYkw0A+K7lW5 xZhtOeEYTGtTtBm1KbT8Nf36e1Y7MNERLnswDIf/G/Mf9eZYvBChM7NldgWI0aBM 2eZlxWfd+G2pNWuEqmSs9pccLp/iqry4m1nh6sPj3CYVRTG1fYiBs8LK/DMhkW7N SXaMzWfTnuyMaSpVDAKi8nS1IaZ+rbx8lqvUW58tlh19CIkljctu2MCGD87W2xEM g2tXDEpJQl/EpDuHqBIB65JI73JiLHML70OUUxlaJkItM2IjpDd6qVRtIdQDQGIh omebx8yY45K9ogM1ZmJTN87vm/ZNnSisdPZazOfWh6oD1ZnEGB5TNtRhN1ZFYMvt 56DntYRDF9vao7UoKeTIs8IiZjaQTtf9YByQLQ7e3J5x2IjcTEQFcpDZA92QpF/V 6iGNKJB3yInOAI5xHiEwHG5nOPUfnh/9ExqDRjzl83eooYyO9d0tb0NpdVE7mgFK PN0t/WDQombAOaoVYun0PREpAlLSxKGlk0gY/nXASOofBuqXglM= =hRcu -----END PGP SIGNATURE----- --=-=-=--