From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 3/3] ath10k: create debugfs interface to trigger fw crash
Date: Fri, 14 Jun 2013 15:51:31 +0300 [thread overview]
Message-ID: <87txl0lusr.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <51BB1115.7010803@tieto.com> (Michal Kazior's message of "Fri, 14 Jun 2013 14:48:21 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 14/06/13 14:34, Kalle Valo wrote:
>> Michal Kazior <michal.kazior@tieto.com> writes:
>>
>>> This can be useful for testing.
>>>
>>> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
>>
>> This is handy.
>>
>>> +static ssize_t ath10k_read_simulate_fw_crash(struct file *file,
>>> + char __user *user_buf,
>>> + size_t count, loff_t *ppos)
>>> +{
>>> + const char buf[] = "To simulate firmware crash write anything to this"
>>> + " file.\nThis will force firmware to report a crash"
>>> + " to the host system.\n";
>>> + return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
>>> +}
>>
>> But I'm not sure if just writing something to the file is a good idea.
>> Should it have some sort of protection, for example that user needs to
>> write a keyword or something?
>
> There are a few types of firmware failures that can be triggered. And
> there's also a delay that can be specified. So in theory we could
> accept parameters.
>
> I wanted to keep things simple though. I didn't need anything more
> fancy than this to test firmware crashes/recovery.
Sorry, I wasn't clear above. I was just worried that a user might
accidentally crash the firmware through this interface by writing to a
wrong file. Not very likely scenario, but can happen anyway. Having some
sort of extra check (like a keyword) would avoid that case.
--
Kalle Valo
prev parent reply other threads:[~2013-06-14 12:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 13:10 [ath9k-devel] [PATCH 0/3] ath10k: hardware recovery Michal Kazior
2013-06-12 13:10 ` [ath9k-devel] [PATCH 1/3] ath10k: implement device recovery Michal Kazior
2013-06-14 12:32 ` Kalle Valo
2013-06-12 13:10 ` [ath9k-devel] [PATCH 2/3] ath10k: implement fw crash simulation command Michal Kazior
2013-06-12 13:10 ` [ath9k-devel] [PATCH 3/3] ath10k: create debugfs interface to trigger fw crash Michal Kazior
2013-06-14 12:34 ` Kalle Valo
2013-06-14 12:48 ` Michal Kazior
2013-06-14 12:51 ` Kalle Valo [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=87txl0lusr.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath9k-devel@lists.ath9k.org \
/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.