From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH v2 07/10] ath10k: add fw-powerup-fail to ethtool stats.
Date: Tue, 30 Sep 2014 08:53:20 -0700 [thread overview]
Message-ID: <542AD1F0.8070308@candelatech.com> (raw)
In-Reply-To: <CA+BoTQ=NG9to+Tv4Ci+Vu_dOGRgGVzxJUyb1bydWCc-EeWc_9g@mail.gmail.com>
On 09/30/2014 05:27 AM, Michal Kazior wrote:
> On 29 September 2014 18:05, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/29/2014 01:24 AM, Kalle Valo wrote:
>>> greearb@candelatech.com writes:
>>>
>>>> From: Ben Greear <greearb@candelatech.com>
>>>>
>>>> This gives user-space a normal-ish way to detect that
>>>> firmware has failed to start and that a reboot is
>>>> probably required.
>>>>
>>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
> [...]
>>>> - return 0;
>>>> +out:
>>>> + /* If we have failed to power-up, it may take a reboot to
>>>> + * get the NIC back online.
>>>> + * Set flag accordinly so that user-space can know.
>>>> + */
>>>> + ar->fw_powerup_failed = !!ret;
>>>> + return ret;
>>>> }
>>>
>>> Would it be better to use ATH10K_STATE_WEDGED for this and then just
>>> export the state value to user space? Or should we have two different
>>> states, like FW_WEDGED and HW_WEDGED?
>
> Current WEDGED state is more like ON. It assumes mac80211 will call
> ath10k_stop().
>
> Adding another state just for the sake of handling power up / reset
> issues seems like an overkill to me.
>
>
>> I didn't want to mess with the state machine. This counter
>> is just a clue to users that things might be badly wrong. Some systems
>> might recover with another hard reset, some will hang the entire
>> system hard, and some will just stick in this state unable to
>> recover. Some of my systems exhibit this last behaviour, so at
>> least with this patch I can warn the user that they need to
>> reboot to regain wifi functionality.
>
> If power up fails the error should propagate to `ifconfig wlanX up`
> (or whatever calling drv_start) eventually so I don't see the point in
> having this counter.
Supplicant manages this, and programatically it is not at all easy to
figure out that the network is failing to come up because the firmware
is broken-and-can't-be-fixed-without-reboot.
The counter I added can be queried by a management tool and propagate a
clear error to the end user.
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
WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [PATCH v2 07/10] ath10k: add fw-powerup-fail to ethtool stats.
Date: Tue, 30 Sep 2014 08:53:20 -0700 [thread overview]
Message-ID: <542AD1F0.8070308@candelatech.com> (raw)
In-Reply-To: <CA+BoTQ=NG9to+Tv4Ci+Vu_dOGRgGVzxJUyb1bydWCc-EeWc_9g@mail.gmail.com>
On 09/30/2014 05:27 AM, Michal Kazior wrote:
> On 29 September 2014 18:05, Ben Greear <greearb@candelatech.com> wrote:
>> On 09/29/2014 01:24 AM, Kalle Valo wrote:
>>> greearb@candelatech.com writes:
>>>
>>>> From: Ben Greear <greearb@candelatech.com>
>>>>
>>>> This gives user-space a normal-ish way to detect that
>>>> firmware has failed to start and that a reboot is
>>>> probably required.
>>>>
>>>> Signed-off-by: Ben Greear <greearb@candelatech.com>
> [...]
>>>> - return 0;
>>>> +out:
>>>> + /* If we have failed to power-up, it may take a reboot to
>>>> + * get the NIC back online.
>>>> + * Set flag accordinly so that user-space can know.
>>>> + */
>>>> + ar->fw_powerup_failed = !!ret;
>>>> + return ret;
>>>> }
>>>
>>> Would it be better to use ATH10K_STATE_WEDGED for this and then just
>>> export the state value to user space? Or should we have two different
>>> states, like FW_WEDGED and HW_WEDGED?
>
> Current WEDGED state is more like ON. It assumes mac80211 will call
> ath10k_stop().
>
> Adding another state just for the sake of handling power up / reset
> issues seems like an overkill to me.
>
>
>> I didn't want to mess with the state machine. This counter
>> is just a clue to users that things might be badly wrong. Some systems
>> might recover with another hard reset, some will hang the entire
>> system hard, and some will just stick in this state unable to
>> recover. Some of my systems exhibit this last behaviour, so at
>> least with this patch I can warn the user that they need to
>> reboot to regain wifi functionality.
>
> If power up fails the error should propagate to `ifconfig wlanX up`
> (or whatever calling drv_start) eventually so I don't see the point in
> having this counter.
Supplicant manages this, and programatically it is not at all easy to
figure out that the network is failing to come up because the firmware
is broken-and-can't-be-fixed-without-reboot.
The counter I added can be queried by a management tool and propagate a
clear error to the end user.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2014-09-30 15:53 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 21:17 [PATCH v2 01/10] ath10k: use 64-bit vdev map greearb
2014-09-23 21:17 ` greearb
2014-09-23 21:17 ` [PATCH v2 02/10] ath10k: add helper method to grab debug stats greearb
2014-09-23 21:17 ` greearb
2014-09-23 21:17 ` [PATCH v2 03/10] ath10k: support ethtool stats greearb
2014-09-23 21:17 ` greearb
2014-09-24 7:44 ` Michal Kazior
2014-09-24 7:44 ` Michal Kazior
2014-09-24 14:37 ` Ben Greear
2014-09-24 14:37 ` Ben Greear
2014-09-29 8:21 ` Kalle Valo
2014-09-29 8:21 ` Kalle Valo
2014-09-29 16:07 ` Ben Greear
2014-09-29 16:07 ` Ben Greear
2014-09-23 21:17 ` [PATCH v2 04/10] ath10k: make firmware text debug messages more verbose greearb
2014-09-23 21:17 ` greearb
2014-11-22 15:28 ` Kalle Valo
2014-11-22 15:28 ` Kalle Valo
2014-11-22 16:07 ` Ben Greear
2014-11-22 16:07 ` Ben Greear
2014-11-24 15:18 ` Kalle Valo
2014-11-24 15:18 ` Kalle Valo
2014-11-24 14:19 ` Kalle Valo
2014-11-24 14:19 ` Kalle Valo
2014-09-23 21:17 ` [PATCH v2 05/10] ath10k: apply chainmask settings to vdev on creation greearb
2014-09-23 21:17 ` greearb
2014-11-26 6:25 ` Kalle Valo
2014-11-26 6:25 ` Kalle Valo
2014-09-23 21:17 ` [PATCH v2 06/10] ath10k: use configured nss instead of max nss greearb
2014-09-23 21:17 ` greearb
2014-11-04 19:55 ` Ben Greear
2014-11-04 19:55 ` Ben Greear
2014-11-13 13:22 ` Kalle Valo
2014-11-13 13:22 ` Kalle Valo
2014-11-26 6:26 ` Kalle Valo
2014-11-26 6:26 ` Kalle Valo
2014-09-23 21:17 ` [PATCH v2 07/10] ath10k: add fw-powerup-fail to ethtool stats greearb
2014-09-23 21:17 ` greearb
2014-09-29 8:24 ` Kalle Valo
2014-09-29 8:24 ` Kalle Valo
2014-09-29 16:05 ` Ben Greear
2014-09-29 16:05 ` Ben Greear
2014-09-30 12:27 ` Michal Kazior
2014-09-30 12:27 ` Michal Kazior
2014-09-30 15:53 ` Ben Greear [this message]
2014-09-30 15:53 ` Ben Greear
2014-09-23 21:17 ` [PATCH v2 08/10] ath10k: support CT firmware flag greearb
2014-09-23 21:17 ` greearb
2014-09-23 21:17 ` [PATCH v2 09/10] ath10k: always request htc tx replenishment greearb
2014-09-23 21:17 ` greearb
2014-09-23 21:17 ` [PATCH v2 10/10] ath10k: request firmware flush in ath10k_flush greearb
2014-09-23 21:17 ` greearb
2014-10-01 8:22 ` [PATCH v2 01/10] ath10k: use 64-bit vdev map Kalle Valo
2014-10-01 8:22 ` 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=542AD1F0.8070308@candelatech.com \
--to=greearb@candelatech.com \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=michal.kazior@tieto.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.