[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172285012623.3144432.10455609105773618485.kvalo@kernel.org>
Date: Mon, 5 Aug 2024 09:28:48 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: Baochen Qiang <quic_bqiang@...cinc.com>
Cc: <ath12k@...ts.infradead.org>, <linux-wireless@...r.kernel.org>,
<quic_bqiang@...cinc.com>, <kernel@...cinc.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH] wifi: ath12k: use 128 bytes aligned iova in transmit path
for
WCN7850
Baochen Qiang <quic_bqiang@...cinc.com> wrote:
> In transmit path, it is likely that the iova is not aligned to PCIe TLP
> max payload size, which is 128 for WCN7850. Normally in such cases hardware
> is expected to split the packet into several parts in a manner such that
> they, other than the first one, have aligned iova. However due to hardware
> limitations, WCN7850 does not behave like that properly with some specific
> unaligned iova in transmit path. This easily results in target hang in a
> KPI transmit test: packet send/receive failure, WMI command send timeout
> etc. Also fatal error seen in PCIe level:
>
> ...
> Capabilities: ...
> ...
> DevSta: ... FatalErr+ ...
> ...
> ...
>
> Work around this by manually moving/reallocating payload buffer such that
> we can map it to a 128 bytes aligned iova. The moving requires sufficient
> head room or tail room in skb: for the former we can do ourselves a favor
> by asking some extra bytes when registering with mac80211, while for the
> latter we can do nothing.
>
> Moving/reallocating buffer consumes additional CPU cycles, but the good news
> is that an aligned iova increases PCIe efficiency. In my tests on some X86
> platforms the KPI results are almost consistent.
>
> Since this is seen only with WCN7850, add a new hardware parameter to
> differentiate from others.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Baochen Qiang <quic_bqiang@...cinc.com>
> Cc: <stable@...r.kernel.org>
> Tested-by: Mark Pearson <mpearson-lenovo@...ebb.ca>
> Signed-off-by: Kalle Valo <quic_kvalo@...cinc.com>
Patch applied to ath-current branch of ath.git, thanks.
38055789d151 wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240715023814.20242-1-quic_bqiang@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists