From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:44065 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754839AbeFYJpi (ORCPT ); Mon, 25 Jun 2018 05:45:38 -0400 From: Felipe Balbi To: liangshengjun Cc: "stable\@vger.kernel.org" , "linux-usb\@vger.kernel.org" , Alan Stern Subject: Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid] In-Reply-To: <84923CA334DF85428B9ADCEC0F3CE864BA19A3@dggemm510-mbx.china.huawei.com> References: <84923CA334DF85428B9ADCEC0F3CE864BA19A3@dggemm510-mbx.china.huawei.com> Date: Mon, 25 Jun 2018 12:43:04 +0300 Message-ID: <876027urpz.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, please don't top-post and break your emails at 80 columns liangshengjun writes: > Hi balbi, > > Thanks for reponse. Now I fixed this case without check STALL > status when clear-Halt request. > > BDW, I have meet other case: > > Run dwc3 for uvc function, the uvc video show video overlapping when > windows 7 restart camera app. > > I debug the dwc3 drivers ,found : > > 1. when camera app close, the dwc3 ep_dequeue is call. Then > giveback request with status: -ECONNRESET to uvc function layer. > dep->trb_dequeue keep stable > > 2.when camera app reopen ,the dwc3 ep_queue is call. Then kick a > transfer, fetch a new trb to dwc3 core. dep->trb_enqueue > increment. > > 3.when one trb tranfter complete, handle event process function > fetch one frb by current dep->trb_dequeue, and uvc function > would get one request complete giveback, which have been > dequeue. > > But in fact, current dep->trb_dequeue pointer buffer is > "old", because stp1 have been dequeue it. > > Current dwc3 drivers: the correct enqueue req process is " ep > enqueue > fetch a new trb by trb_enqueue > increase > trb_enqueue > pack trb to dwc3 core", Right? > > For dequeue request process, now is " ep dequeue > stop > started_list request > giveback request with -ECONNRESET > status" Right ? > > To avoid getting a older request which has been dequeued, I think > dequeue process necessary sync the trb_dequeue to trb_enqueue. Right? no, this is not the right fix. I think thkis has been fixed recently, though. Check if current mainline still has the issue. If it doesn, collect tracepoint data (see [1] below) and let me know how you reproduce it. [1] https://www.kernel.org/doc/html/latest/driver-api/usb/dwc3.html#reporti= ng-bugs =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAlswuSgACgkQzL64meEa mQY6GQ//XMNIiUkFmIsultYF+tv5pcy4vkaRHIEU7tCP3idTILXetKsD8a37JN89 pM8luxLhq8d3siugCzbkIx5CT5HQe/Lles4N3Be8ypOgaqOXF+XxRFHiD+cX8W+x fy0jYvJJNWlejA6i+M2Db8v2dyGwNVQyji9hI99soIQa5jU05//CMAnS909ZQghy 1Xw4ZsuF5XEd0eRPpIPVCgnBt4dbqmKy2AkxIQRtu4UpTYdBLXnXuYXCr6OD6Yqu w7Vdm9xHZSLOvnzRuaQFKfKqTKuEZOGjCQ6E6G3XLLBarMzsSUhWNpa06DROzxa4 getFMCvqaoZR8O0I2/xYRoTCXxnTholrUsZzYIMIU6wduXqd0vgP02Vq6pqOi+kf qnNjMhVR7m+BMruGb4Bs+kQUUKRB355az8JStDSncLB93/2fmcxXccoKTEsgmokw BldPWFabpRiV2JIrlLzYjVUzzmIx6HyIer6HLc3CA8Uf2pCTktXtkjEbwz3NN5Yz QPXG//SAGx7olx+vWcd2hAKeGSB70L1W0/1MlLzTYfGuJa4FIMPkHaDf9Lq1UbJM 7MzrSFJscyWVBDqIKFAoArbOXUWtOwhgrZJcMMf7kj2WqAnQ6vuVLna4OJjFJncG q6rtxhy4aocpRrh/URN0gsBUR/g4je1QDEBq6XJHOrfYLeiA0EQ= =p/dQ -----END PGP SIGNATURE----- --=-=-=--