From: Brian Norris <briannorris@chromium.org>
To: Xinming Hu <huxm@marvell.com>
Cc: Xinming Hu <huxinming820@gmail.com>,
Linux Wireless <linux-wireless@vger.kernel.org>,
Kalle Valo <kvalo@codeaurora.org>,
Dmitry Torokhov <dtor@google.com>,
"rajatja@google.com" <rajatja@google.com>,
Zhiyuan Yang <yangzy@marvell.com>, Tim Song <songtao@marvell.com>,
Cathy Luo <cluo@marvell.com>, Ganapathi Bhat <gbhat@marvell.com>,
James Cao <jcao@marvell.com>
Subject: Re: Re: Re: [PATCH 3/3] mwifiex: debugfs: trigger device dump for usb interface
Date: Fri, 1 Dec 2017 17:45:06 -0800 [thread overview]
Message-ID: <20171202014505.GA85160@google.com> (raw)
In-Reply-To: <ff513aca34c94c6cab0b4ff0408c7922@SC-EXCH02.marvell.com>
On Fri, Dec 01, 2017 at 08:36:01AM +0000, Xinming Hu wrote:
> Thanks for the suggestion, it sounds better than exporting
> mwifiex_send_cmd() directly.
> In addition to used as debugfs tirgger, the "defined point"
> if_ops.device_dump is only used in command timeout context.
> For sdio/pcie interface, register operation will be made to trigger
> firmware dump and get dump context under specific algorithm.
> For usb interface, however, this is not needed, since firmware will
> automatically send dump event to host without any trigger, and what's
> more , host is also not able to issue command in the situation.
>
> So per my understand, here we only need provide a simple way to
> trigger , instead of a totally functional complete dump entry point.
> Suppose if we make the command trigger a part of if_ops->device_dump,
> then we also need add check for "MWIFIEX_USB" in mwifiex_cmd_tmo_func.
Ah, I see. Your explanation makes some more sense then. It would be nice
if you could include some of this in
(a) the commit message
(b) the entry point in debugfs.c, where you trigger this
Something along the lines of "For command timeouts, USB firmware will
automatically emit firmware dump events, so we don't implement
device_dump(). For user-initiated dumps, we trigger it ourselves."
> it also looks inelegant, and what we did looks weird, they are
> (1) export a new kernel symbol, the wrapper of mwifiex_send_command
> (2) add usb if_ops->device_dump, it send the command in mwifiex_usb, instead of in mwifiex itself.
> (3) bypass above "if_ops->device_dump" in mwifiex_cmd_tmo_func, which is the mainly user case.
No, I'm not sure that solution would be much better. Your existing
solution with additional comments is probably fine.
> I am not sure whether there is a better way on this, perhaps we need a
> trade-off on different solutions, please let us know if you have more
> suggestions.
>
> Thanks & Regards,
> SImon
Brian
prev parent reply other threads:[~2017-12-02 1:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 8:36 Re: Re: [PATCH 3/3] mwifiex: debugfs: trigger device dump for usb interface Xinming Hu
2017-12-02 1:45 ` Brian Norris [this message]
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=20171202014505.GA85160@google.com \
--to=briannorris@chromium.org \
--cc=cluo@marvell.com \
--cc=dtor@google.com \
--cc=gbhat@marvell.com \
--cc=huxinming820@gmail.com \
--cc=huxm@marvell.com \
--cc=jcao@marvell.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rajatja@google.com \
--cc=songtao@marvell.com \
--cc=yangzy@marvell.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).