All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: ath10k <ath10k@lists.infradead.org>
Subject: Re: Firmware debugging patches?
Date: Mon, 02 Jun 2014 09:40:36 -0700	[thread overview]
Message-ID: <538CA904.4000508@candelatech.com> (raw)
In-Reply-To: <87wqczz3h9.fsf@kamboji.qca.qualcomm.com>

On 06/02/2014 09:21 AM, Kalle Valo wrote:
> Ben Greear <greearb@candelatech.com> writes:
> 
>> I have a bunch of patches that can dump some firmware debug logs,
>> stack, and exception stacks as ascii hex. Ath10k firmware-having folks
>> can use private tools to extract and decode useful info from this.
> 
> You mean via printk? That sounds ugly.

It is fairly ugly, but it is easy to ask someone to just email you
a snippet of /var/log/messages.  I am certainly open to suggestions
for how to do it better.

And, even if it is ugly, hopefully the firmware crashes will become
more rare and so most folks won't see so much of this.

> There was talk on linux-wireless about how to handle firmware crash
> dumps in a generic way. One proposal was to use ethtool and an event for
> this. Before that I was thinking of using trace points. Maybe we should
> support both?

I think it must not be anything that has to be turned on by users,
otherwise we will not see a lot of useful reports from any
normal-ish users, and so we will lose a great deal of coverage.

Perhaps the more verbose dump info could be disabled by default,
and enabled with a debug-level setting (which even relatively
unsophisticated, or just folks that can't be bothered to jump
through hoops) could enable on their systems.

Trace points do not meet this level of simplicity in my experience.

> We should come up with an extensible format how to provide the firmware
> crash logs to user space, for example using some TLV based format, which
> contain all the necessary information (hw details, firmware version,
> memory dumps and whatnot). But ath10k should not have any parsing of the
> dumps, that should happen in user space.

Actually decoding ath10k firmware (and probably every other close-sourced
firmware is necessarily going to be something unique for that firmware),
so aside from transporting the data to user-space, there is probably
very little that can be shared.

Also, for the ath10k debug-log WMI messages, you often need to see what
comes before the crash to be useful.  If we are printing this to logs
in ascii hex (enabled by an ath10k debug-level setting), then we can easily
get that info from /var/log/messages or equivalent.  Putting the firmware
dumps in the same file seems logical to me.  You also get to see the
context of the rest of the kernel logs, including wifi stack prints,
other kernel warnings/errors, etc.

And, I have some pretty well tested patches and user-space tools
already written to support this, so we could have this feature
in ath10k almost immediately...  I have already send my user-space
decode app to QCA, so they can freely propagate it to anyone they wish
(typically just those under NDA I assume).


So, I think that 'ugliness' of seeing a lot of ascii hex in
/var/log/messages is a fairly small price to pay.  I will post some
patches for consideration and suggestions for improvement when I get
my changes properly rebased onto your latest tree and get some
minimal testing done on the rebase...

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2014-06-02 16:40 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <53891ACD.7070902@candelatech.com>
2014-06-02 16:21 ` Firmware debugging patches? Kalle Valo
2014-06-02 16:40   ` Ben Greear [this message]
2014-06-02 17:08     ` Kalle Valo
2014-06-02 17:42       ` Ben Greear
2014-06-02 17:42         ` Ben Greear
2014-06-02 18:46         ` Emmanuel Grumbach
2014-06-02 18:46           ` Emmanuel Grumbach
2014-06-02 18:58           ` Ben Greear
2014-06-02 18:58             ` Ben Greear
2014-06-02 19:29             ` Emmanuel Grumbach
2014-06-02 19:29               ` Emmanuel Grumbach
2014-06-02 19:48               ` Ben Greear
2014-06-02 19:48                 ` Ben Greear
2014-06-04 19:23                 ` Emmanuel Grumbach
2014-06-04 19:23                   ` Emmanuel Grumbach
2014-06-04 19:29                   ` Ben Greear
2014-06-04 19:29                     ` Ben Greear
2014-06-05 11:10                     ` Kalle Valo
2014-06-05 11:10                       ` Kalle Valo
2014-06-05 15:51                       ` Ben Greear
2014-06-05 15:51                         ` Ben Greear
2014-06-05 11:06                 ` Kalle Valo
2014-06-05 11:06                   ` Kalle Valo
2014-06-05 15:57                   ` Ben Greear
2014-06-05 15:57                     ` Ben Greear
2014-06-06  6:51                     ` Kalle Valo
2014-06-06  6:51                       ` Kalle Valo
2014-06-06 16:02                       ` Ben Greear
2014-06-06 16:02                         ` Ben Greear
2014-06-07 13:03                         ` Kalle Valo
2014-06-07 13:03                           ` Kalle Valo
2014-06-07 15:27                           ` Ben Greear
2014-06-07 15:27                             ` Ben Greear
2014-06-08  8:35                             ` Kalle Valo
2014-06-08  8:35                               ` Kalle Valo
2014-06-08  9:13                               ` Johannes Berg
2014-06-08  9:13                                 ` Johannes Berg
2014-06-08 16:01                                 ` Emmanuel Grumbach
2014-06-08 16:01                                   ` Emmanuel Grumbach
2014-06-08 15:39                               ` Ben Greear
2014-06-08 15:39                                 ` Ben Greear
2014-06-09  8:17                                 ` Kalle Valo
2014-06-09  8:17                                   ` Kalle Valo
2014-06-09 15:09                                   ` Ben Greear
2014-06-09 15:09                                     ` Ben Greear
2014-06-09 15:47                                     ` Ben Greear
2014-06-09 15:47                                       ` Ben Greear
2014-06-09 16:27                                       ` Ben Greear
2014-06-09 16:27                                         ` Ben Greear
2014-06-10  6:05                                         ` Kalle Valo
2014-06-10  6:05                                           ` Kalle Valo
2014-06-10 15:06                                           ` Ben Greear
2014-06-10 15:06                                             ` Ben Greear
2014-06-26 15:26                                           ` Ben Greear
2014-06-26 15:26                                             ` Ben Greear
2014-06-26 16:01                                             ` Kalle Valo
2014-06-26 16:01                                               ` Kalle Valo
2014-06-05 10:58             ` Kalle Valo
2014-06-05 10:58               ` Kalle Valo
2014-06-05 15:59               ` Ben Greear
2014-06-05 15:59                 ` Ben Greear
2014-06-05 10:51         ` Kalle Valo
2014-06-05 10:51           ` Kalle Valo
2014-06-05 16:03           ` Ben Greear
2014-06-05 16:03             ` Ben Greear
2014-06-02 21:21   ` Ben Greear
2014-06-06  9:43     ` Kalle Valo

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=538CA904.4000508@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.