mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From 56ef76e7bb4dd6074b9586cc3be42b9d6affb25e Mon Sep 17 00:00:00 2001
|
|
From: Double Lo <double.lo@cypress.com>
|
|
Date: Wed, 24 Feb 2021 04:34:37 -0600
|
|
Subject: [PATCH 073/179] brcmfmac: Fix for skbuf allocation failure in memory
|
|
limited system
|
|
|
|
While downloading the 4343W WLAN firmware, observed the error below:
|
|
|
|
brcmfmac: brcmf_sdiod_ramrw: dev_alloc_skb failed: len 32768
|
|
brcmf_sdio_download_code_file: error -5 on writing 397444 membytes
|
|
at 0x00000000
|
|
|
|
It is randomly caused because of the limited memory.
|
|
The pkt = dev_alloc_skb(dsize) tries to allocate memory with GFP_ATOMIC
|
|
set.As a result, it will fail instantly with the above error if memory is
|
|
not available at that time.
|
|
|
|
Use __dev_alloc_skb(dsize, GFP_KERNEL) to allocate this memory.
|
|
|
|
Signed-off-by: Double Lo <Double.Lo@infineon.com>
|
|
Signed-off-by: Chung-Hsien Hsu <chung-hsien.hsu@infineon.com>
|
|
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@infineon.com>
|
|
---
|
|
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
|
index 48f1198a617c..df4fd7837b6d 100644
|
|
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
|
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
|
@@ -671,7 +671,7 @@ brcmf_sdiod_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
|
|
uint dsize;
|
|
|
|
dsize = min_t(uint, SBSDIO_SB_OFT_ADDR_LIMIT, size);
|
|
- pkt = dev_alloc_skb(dsize);
|
|
+ pkt = __dev_alloc_skb(dsize, GFP_KERNEL);
|
|
if (!pkt) {
|
|
brcmf_err("dev_alloc_skb failed: len %d\n", dsize);
|
|
return -EIO;
|
|
--
|
|
2.17.1
|
|
|