All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <se@simonwunderlich.de>
To: ih@simonwunderlich.de, Issam Hamdi <ih@simonwunderlich.de>,
	sw@simonwunderlich.de
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
	mathias.kretschmer@fit.fraunhofer.de
Subject: Re: [PATCH v2 2/2] wifi: ath9k: Reset chip on potential deaf state
Date: Wed, 06 Nov 2024 11:05:57 +0100	[thread overview]
Message-ID: <865447434.0ifERbkFSE@ripper> (raw)
In-Reply-To: <20241106090439.3487958-2-ih@simonwunderlich.de>

On Wednesday, 6 November 2024 10:04:39 CET Issam Hamdi wrote:
[...]
> This patch originally developed by "Simon Wunderlich <simon.wunderlich@open-mesh.com>"
> and "Sven Eckelmann <sven.eckelmann@open-mesh.com>"

Am I the only person which finds this style of adding information about "Co-
authors" weird?

[...]
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Sven Eckelmann <se@simonwunderlich.de>
> Signed-off-by: Issam Hamdi <ih@simonwunderlich.de>
> ---
> v2: change the "Co-developed-by" to "Signed-off-by", remove the dependency

I think Kalle meant that "Co-developed-by" should be followed by a 
"Signed-off-by" - not that "Co-developed-by" should be removed.

I was not part of the delivery path for this version of the patch. But
current Signed-off-by seem to suggest this.

> on CONFIG_ATH9K_DEBUGFS and add more information in the commit description

And please don't reply to the old thread when sending a new patchset - this 
becomes really unreadable after a while. You can simply use the method which 
b4 uses and just reference the old thread in your mail. Something like:

Changes in v2:
- change the "Co-developed-by" to "Signed-off-by"
- remove the dependency on CONFIG_ATH9K_DEBUGFS
- add more information in the commit description
- Link to v1: https://lore.kernel.org/r/20241104171627.3789199-1-ih@simonwunderlich.de

[...]
> +static bool ath_hw_hang_deaf(struct ath_softc *sc)
> +{
> +#ifdef CONFIG_ATH9K_TX99
> +	return false;
> +#else
> +	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
> +	u32 interrupts, interrupt_per_s;
> +	unsigned int interval;
> +
> +	/* get historic data */
> +	interval = jiffies_to_msecs(jiffies - sc->last_check_time);
> +	if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
> +		interrupts = sc->debug.stats.istats.rxlp;
> +	else
> +		interrupts = sc->debug.stats.istats.rxok;

You can't simply access sc->debug.stats.istats. sc->debug is only available 
when building with CONFIG_ATH9K_DEBUGFS. See ath9k.c

struct ath_softc {
[...]
#ifdef CONFIG_ATH9K_DEBUGFS
	struct ath9k_debug debug;
#endif
[...]
}

> +       /* sanity check, should be 4 seconds */
> +       if (interval > 10000 || interval < 1000)

Here you have hardcoded values but the actual interval is hidden behind 
ATH_HANG_WORK_INTERVAL. Two things which now are rather disconnected and might 
cause problems in the future (when somebody fiddles around with 
ATH_HANG_WORK_INTERVAL).

Overall, the proposal from Toke seems to be a lot better integrated in the HW 
check style which was introduced by Felix in the beginning of 2017 [1].

At the same time there was a proposal by Felix [2] - which diverged too much 
from our original patch (and as a result caused too many resets) [3]. I would 
therefore propose to check Toke's version and test handles the problem 
correctly.

Kind regards,
	Sven

[1] https://github.com/openwrt/openwrt/commit/b94177e10fc72f9309eae7459c3570e5c080e960
[2] https://patchwork.kernel.org/project/linux-wireless/patch/20170125163654.66431-3-nbd@nbd.name/
[3] https://lore.kernel.org/all/2081606.z26xgMiW1A@prime/



  reply	other threads:[~2024-11-06 10:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 17:16 [PATCH 1/2] wifi: ath9k: work around AR_CFG 0xdeadbeef chip hang Issam Hamdi
2024-11-04 17:16 ` [PATCH 2/2] wifi: ath9k: Reset chip on potential deaf state Issam Hamdi
2024-11-05 10:53   ` Kalle Valo
2024-11-05 13:02   ` Toke Høiland-Jørgensen
2024-11-05 13:30     ` Simon Wunderlich
2024-11-05 15:10       ` Toke Høiland-Jørgensen
2024-11-06 10:05         ` Hamdi Issam
2024-11-05 13:34     ` Simon Wunderlich
2024-11-05 10:49 ` [PATCH 1/2] wifi: ath9k: work around AR_CFG 0xdeadbeef chip hang Kalle Valo
2024-11-05 12:31 ` Toke Høiland-Jørgensen
2024-11-06  9:04 ` [PATCH v2 " Issam Hamdi
2024-11-06  9:04   ` [PATCH v2 2/2] wifi: ath9k: Reset chip on potential deaf state Issam Hamdi
2024-11-06 10:05     ` Sven Eckelmann [this message]
2024-11-06 12:41       ` Toke Høiland-Jørgensen
2024-11-07  8:03       ` Kalle Valo
2024-11-06 10:06   ` [PATCH v2 1/2] wifi: ath9k: work around AR_CFG 0xdeadbeef chip hang Sven Eckelmann

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=865447434.0ifERbkFSE@ripper \
    --to=se@simonwunderlich.de \
    --cc=ih@simonwunderlich.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mathias.kretschmer@fit.fraunhofer.de \
    --cc=sw@simonwunderlich.de \
    /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.