Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753826AbcDNLUo (ORCPT ); Thu, 14 Apr 2016 07:20:44 -0400 Received: from mga11.intel.com ([192.55.52.93]:18312 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbcDNLUn (ORCPT ); Thu, 14 Apr 2016 07:20:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,484,1455004800"; d="asc'?scan'208";a="945042686" From: Felipe Balbi To: "Du\, Changbin" Cc: "gregkh\@linuxfoundation.org" , "linux-usb\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: RE: [PATCH v4 2/2] usb: dwc3: add debugfs node to dump FIFO/Queue available space In-Reply-To: <0C18FE92A7765D4EB9EE5D38D86A563A05D09504@shsmsx102.ccr.corp.intel.com> References: <1460459419-9487-1-git-send-email-changbin.du@intel.com> <1460459419-9487-3-git-send-email-changbin.du@intel.com> <87shyok47z.fsf@intel.com> <0C18FE92A7765D4EB9EE5D38D86A563A05D09504@shsmsx102.ccr.corp.intel.com> User-Agent: Notmuch/0.21+96~g9bbc54b (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Thu, 14 Apr 2016 14:18:43 +0300 Message-ID: <87mvowjv58.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2372 Lines: 72 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, "Du, Changbin" writes: > Hi, Balbi. > > Feel free to change it, I may not have enough time on this currently. > "per-endpoint directory" is great idea, then we do not need find out > wanted info from one big file, but just go to specific dir.=20 that was the idea, glad you liked it ;-) > Btw, I'd mention that not all out ep has a rx fifo. So in my original pat= ch, yeah, rx fifos are dynamically allocated by the HW itself, AFAICT. > not all FIFO/Queue info are valid. We need pick out the real info we need. > And I didn't find any method to read the FIFO map. > > At last, comparing with the FIFO/Queue info, I think software transfer > Requests list, TRBs info, EVENTs history are much more useful for debuggi= ng > the driver. If you can also add these info to each EP folder, that is awe= some! > :) I'll think about adding these but for the lifetime of requests and trbs and events, etc, we have tracepoints for that. I usually do the following when debugging: # mount -t debugfs none /sys/kernel/debug # cd /sys/kernel/debug/tracing # echo 2048 > buffer_size_kb # echo 1 > events/dwc3/enable (do something to break it) # cp trace /mnt/sdcard # or something like that then read the file. You can make it as large or as small as you like (given some constraints, of course ;-) but I've had no issues allocating 128MiB in the past. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXD3yUAAoJEIaOsuA1yqREaGwP/RRyUuzZVhL8Ylrq1EFQVGpP NlPtka08F5CscS7y6Fhw+vcElygI1CNnUFO1EyQ6H7vuNshbs4PXaMCszByJZJ+W OyNPJ/Gh0kBcZ1QSFSHQ5q2a7xTVF5n+4a3+Vt/AzaPYuXOUFMUj/Bm5G23bZi8F 7+kiby5oSMRle4WelX2RFqEow4tIiW5mR7YdPfqFvAOvty5PRh8KHf55anxaCElV DqPmIyAnJq0+LZIduWiBi6HmnZ1TtdEj96GrCBDL0ao1sTG9huVxvHSJnlu0Lud/ tQyvAut5VzSYRfGIyT2JyLf4RlpYkH55fQZ0zZ7Z4ty9Qy/Eb9Hp2cPZsXPyRKnS JLXljOVxyKhelKGDSRUwjYBYuFcb1fP6zkDSKr7L4WG5Jf+oGE7VHc6fKoe+ZFLN NCmcAZIJdd44YS87lGaeqg3KTLpi/X/bFTYJR3IriTZkYuuNpDH5Nl/e2v+ZTl2Q gMqgR3uUpmrLP6fH0tPoJrZ9V+rFRn8/RoDD6b4zOijvcoRMMj/DeGgwRuvahcHC wfrGCD106CMIjdV/YMlE3rnpVywDvzX7uAwqGdsUbECUpTzDJ9nANRdgwShQOaZq 0Is5fQkc6QvoExBAfbtvHIYXqG/G7uMjbj3ln76ulW17G44YEGe3T1afXX0/GanS eKOMfCTVWqErEkO1l3fj =6F0k -----END PGP SIGNATURE----- --=-=-=--