linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath11k: Fix QCN9074 firmware boot on x86
@ 2022-10-22  4:27 Tyler J. Stachecki
  2022-11-01 14:46 ` Kalle Valo
  2022-11-02 17:15 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Tyler J. Stachecki @ 2022-10-22  4:27 UTC (permalink / raw)
  Cc: Tyler J. Stachecki, Kalle Valo, David S. Miller, Jakub Kicinski,
	open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER,
	open list:NETWORKING DRIVERS (WIRELESS),
	open list:NETWORKING DRIVERS, open list

The 2.7.0 series of QCN9074's firmware requests 5 segments
of memory instead of 3 (as in the 2.5.0 series).

The first segment (11M) is too large to be kalloc'd in one
go on x86 and requires piecemeal 1MB allocations, as was
the case with the prior public firmware (2.5.0, 15M).

Since f6f92968e1e5, ath11k will break the memory requests,
but only if there were fewer than 3 segments requested by
the firmware. It seems that 5 segments works fine and
allows QCN9074 to boot on x86 with firmware 2.7.0, so
change things accordingly.

Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
---
 drivers/net/wireless/ath/ath11k/qmi.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h
index 2ec56a34fa81..0909d53cefeb 100644
--- a/drivers/net/wireless/ath/ath11k/qmi.h
+++ b/drivers/net/wireless/ath/ath11k/qmi.h
@@ -27,7 +27,7 @@
 #define ATH11K_QMI_WLANFW_MAX_NUM_MEM_SEG_V01	52
 #define ATH11K_QMI_CALDB_SIZE			0x480000
 #define ATH11K_QMI_BDF_EXT_STR_LENGTH		0x20
-#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT	3
+#define ATH11K_QMI_FW_MEM_REQ_SEGMENT_CNT	5
 
 #define QMI_WLFW_REQUEST_MEM_IND_V01		0x0035
 #define QMI_WLFW_FW_MEM_READY_IND_V01		0x0037
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath11k: Fix QCN9074 firmware boot on x86
  2022-10-22  4:27 [PATCH] ath11k: Fix QCN9074 firmware boot on x86 Tyler J. Stachecki
@ 2022-11-01 14:46 ` Kalle Valo
  2022-11-02  0:51   ` Tyler Stachecki
  2022-11-02 17:15 ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2022-11-01 14:46 UTC (permalink / raw)
  To: Tyler J. Stachecki
  Cc: David S. Miller, Jakub Kicinski,
	open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER,
	open list:NETWORKING DRIVERS (WIRELESS),
	open list:NETWORKING DRIVERS, open list

"Tyler J. Stachecki" <stachecki.tyler@gmail.com> writes:

> The 2.7.0 series of QCN9074's firmware requests 5 segments
> of memory instead of 3 (as in the 2.5.0 series).
>
> The first segment (11M) is too large to be kalloc'd in one
> go on x86 and requires piecemeal 1MB allocations, as was
> the case with the prior public firmware (2.5.0, 15M).
>
> Since f6f92968e1e5, ath11k will break the memory requests,
> but only if there were fewer than 3 segments requested by
> the firmware. It seems that 5 segments works fine and
> allows QCN9074 to boot on x86 with firmware 2.7.0, so
> change things accordingly.
>
> Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>

Ouch, that's pretty bad. Thanks for fixing this!

Does the 2.5.0.1 firmware branch still work with this patch? It's
important that we don't break the old firmware.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath11k: Fix QCN9074 firmware boot on x86
  2022-11-01 14:46 ` Kalle Valo
@ 2022-11-02  0:51   ` Tyler Stachecki
  2022-11-02  5:45     ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Tyler Stachecki @ 2022-11-02  0:51 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Jakub Kicinski,
	open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER,
	open list:NETWORKING DRIVERS (WIRELESS),
	open list:NETWORKING DRIVERS, open list

On Tue, Nov 1, 2022 at 10:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>
> "Tyler J. Stachecki" <stachecki.tyler@gmail.com> writes:
>
> > The 2.7.0 series of QCN9074's firmware requests 5 segments
> > of memory instead of 3 (as in the 2.5.0 series).
> >
> > The first segment (11M) is too large to be kalloc'd in one
> > go on x86 and requires piecemeal 1MB allocations, as was
> > the case with the prior public firmware (2.5.0, 15M).
> >
> > Since f6f92968e1e5, ath11k will break the memory requests,
> > but only if there were fewer than 3 segments requested by
> > the firmware. It seems that 5 segments works fine and
> > allows QCN9074 to boot on x86 with firmware 2.7.0, so
> > change things accordingly.
> >
> > Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
>
> Ouch, that's pretty bad. Thanks for fixing this!
>
> Does the 2.5.0.1 firmware branch still work with this patch? It's
> important that we don't break the old firmware.
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Yep, tested the patch with all 3 combinations, below:

QCN9074:
WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1

WCN6855:
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.16

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath11k: Fix QCN9074 firmware boot on x86
  2022-11-02  0:51   ` Tyler Stachecki
@ 2022-11-02  5:45     ` Kalle Valo
  2022-11-02 10:37       ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2022-11-02  5:45 UTC (permalink / raw)
  To: Tyler Stachecki
  Cc: David S. Miller, Jakub Kicinski,
	open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER,
	open list:NETWORKING DRIVERS (WIRELESS),
	open list:NETWORKING DRIVERS, open list

Tyler Stachecki <stachecki.tyler@gmail.com> writes:

> On Tue, Nov 1, 2022 at 10:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>>
>> "Tyler J. Stachecki" <stachecki.tyler@gmail.com> writes:
>>
>> > The 2.7.0 series of QCN9074's firmware requests 5 segments
>> > of memory instead of 3 (as in the 2.5.0 series).
>> >
>> > The first segment (11M) is too large to be kalloc'd in one
>> > go on x86 and requires piecemeal 1MB allocations, as was
>> > the case with the prior public firmware (2.5.0, 15M).
>> >
>> > Since f6f92968e1e5, ath11k will break the memory requests,
>> > but only if there were fewer than 3 segments requested by
>> > the firmware. It seems that 5 segments works fine and
>> > allows QCN9074 to boot on x86 with firmware 2.7.0, so
>> > change things accordingly.
>> >
>> > Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
>>
>> Ouch, that's pretty bad. Thanks for fixing this!
>>
>> Does the 2.5.0.1 firmware branch still work with this patch? It's
>> important that we don't break the old firmware.
>>
>> --
>> https://patchwork.kernel.org/project/linux-wireless/list/
>>
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
> Yep, tested the patch with all 3 combinations, below:
>
> QCN9074:
> WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
> WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
>
> WCN6855:
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.16

Excellent, I'll add Tested-on tags for these. Thank you again.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath11k: Fix QCN9074 firmware boot on x86
  2022-11-02  5:45     ` Kalle Valo
@ 2022-11-02 10:37       ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-11-02 10:37 UTC (permalink / raw)
  To: Tyler Stachecki
  Cc: David S. Miller, Jakub Kicinski,
	open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER,
	open list:NETWORKING DRIVERS (WIRELESS),
	open list:NETWORKING DRIVERS, open list

Kalle Valo <kvalo@kernel.org> writes:

> Tyler Stachecki <stachecki.tyler@gmail.com> writes:
>
>> On Tue, Nov 1, 2022 at 10:46 AM Kalle Valo <kvalo@kernel.org> wrote:
>>>
>>> "Tyler J. Stachecki" <stachecki.tyler@gmail.com> writes:
>>>
>>> > The 2.7.0 series of QCN9074's firmware requests 5 segments
>>> > of memory instead of 3 (as in the 2.5.0 series).
>>> >
>>> > The first segment (11M) is too large to be kalloc'd in one
>>> > go on x86 and requires piecemeal 1MB allocations, as was
>>> > the case with the prior public firmware (2.5.0, 15M).
>>> >
>>> > Since f6f92968e1e5, ath11k will break the memory requests,
>>> > but only if there were fewer than 3 segments requested by
>>> > the firmware. It seems that 5 segments works fine and
>>> > allows QCN9074 to boot on x86 with firmware 2.7.0, so
>>> > change things accordingly.
>>> >
>>> > Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
>>>
>>> Ouch, that's pretty bad. Thanks for fixing this!
>>>
>>> Does the 2.5.0.1 firmware branch still work with this patch? It's
>>> important that we don't break the old firmware.
>>>
>>> --
>>> https://patchwork.kernel.org/project/linux-wireless/list/
>>>
>>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>>
>> Yep, tested the patch with all 3 combinations, below:
>>
>> QCN9074:
>> WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
>> WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
>>
>> WCN6855:
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.16
>
> Excellent, I'll add Tested-on tags for these. Thank you again.

I'll think I'll queue this to v6.1, it's an important fix to have.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath11k: Fix QCN9074 firmware boot on x86
  2022-10-22  4:27 [PATCH] ath11k: Fix QCN9074 firmware boot on x86 Tyler J. Stachecki
  2022-11-01 14:46 ` Kalle Valo
@ 2022-11-02 17:15 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-11-02 17:15 UTC (permalink / raw)
  To: Tyler J. Stachecki

"Tyler J. Stachecki" <stachecki.tyler@gmail.com> wrote:

> The 2.7.0 series of QCN9074's firmware requests 5 segments
> of memory instead of 3 (as in the 2.5.0 series).
> 
> The first segment (11M) is too large to be kalloc'd in one
> go on x86 and requires piecemeal 1MB allocations, as was
> the case with the prior public firmware (2.5.0, 15M).
> 
> Since f6f92968e1e5, ath11k will break the memory requests,
> but only if there were fewer than 3 segments requested by
> the firmware. It seems that 5 segments works fine and
> allows QCN9074 to boot on x86 with firmware 2.7.0, so
> change things accordingly.
> 
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.16
> 
> Signed-off-by: Tyler J. Stachecki <stachecki.tyler@gmail.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-current branch of ath.git, thanks.

3a89b6dec992 wifi: ath11k: Fix QCN9074 firmware boot on x86

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221022042728.43015-1-stachecki.tyler@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-02 17:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-22  4:27 [PATCH] ath11k: Fix QCN9074 firmware boot on x86 Tyler J. Stachecki
2022-11-01 14:46 ` Kalle Valo
2022-11-02  0:51   ` Tyler Stachecki
2022-11-02  5:45     ` Kalle Valo
2022-11-02 10:37       ` Kalle Valo
2022-11-02 17:15 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).