linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thinh Nguyen <thinh.nguyen@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	John Youn <john.youn@synopsys.com>
Subject: usb: dwc3: debugfs: Dump internal states
Date: Wed, 07 Nov 2018 12:45:50 +0200	[thread overview]
Message-ID: <87o9b1tbc1.fsf@linux.intel.com> (raw)

Hi,

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
>> Thinh Nguyen <thinh.nguyen@synopsys.com> writes:
>> >>>>> +static ssize_t dwc3_internal_states_write(struct file *file,
>> >>>>> +		const char __user *ubuf, size_t count, loff_t *ppos)
>> >>>> why is this necessary? Seems like it would be nicer to create a
>> >>>> directory structure if the current operating mode is host so that we
>> >>>> don't need to write anything.
>> >>> Can you clarify more about the directory structure? Actually, I was
>> >>> wondering what's the best way to do this also. The reason I want to
>> >>> write to it is because the LSP selection for host is quite large (2^14).
>> >> right, turn each of those into a directory of its own. If you don't want
>> >> to or can't disclose proper names for those directories, just call them
>> >> lsp0, lsp1, lsp2, and so on. Then a read of the file under lsp1
>> >> directory would write and read the correct registers.
>> >>
>> >> Everything remains read-only.
>> >
>> > This means that there will be 16384 + 256 files create for host. It also
>> > means that we need to kmalloc at least (16384 + 256) * (size of each
>> > selection) so that each file knows what to print. On top of that, when
>> > we change mode of operation (e.g. device->host), then we need to
>> > create/destroy all these files. Is this the way to do it?
>> 
>> Hmm... indeed that's a lot. But since this is used only for debugging I
>> wonder if we should care. Greg, Alan, what do you guys think? Do we
>> create 16k files under debugfs or single file that needs to be written
>> to before being read?
>
> 16k files under debugfs is crazy, don't do that :)

one file with write followed by read it is then :-p

> What type of interface would ever want such a thing?  I have not been
> paying attention, but what is the end goal here?  What do you want to
> expose in debugfs that is actually going to be useful?

internal debug information from dwc3's list processor (the HW
itself). It's only useful for synopsys, really, as the content of such
registers lacks documentation about how to decode it.

             reply	other threads:[~2018-11-07 10:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 10:45 Felipe Balbi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-07 10:54 usb: dwc3: debugfs: Dump internal states Greg Kroah-Hartman
2018-11-07  9:22 Greg Kroah-Hartman
2018-11-07  4:01 Thinh Nguyen
2018-11-06  7:35 Felipe Balbi
2018-11-05 19:07 Thinh Nguyen
2018-11-05 12:16 Felipe Balbi
2018-11-03  1:38 Thinh Nguyen

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=87o9b1tbc1.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.youn@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=thinh.nguyen@synopsys.com \
    /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).