diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2022-02-08 21:09:47 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-03-14 10:39:04 +0100 |
commit | f97ec5d75e9261a5da78dc28a8955b7cc0c4468b (patch) | |
tree | db761c2a913842c3ecb9ca7f96f892e628852ae9 /drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | |
parent | fe23b6bbeac40de957724b90a88d46fb336e29a9 (diff) | |
download | linux-stable-f97ec5d75e9261a5da78dc28a8955b7cc0c4468b.tar.gz linux-stable-f97ec5d75e9261a5da78dc28a8955b7cc0c4468b.tar.bz2 linux-stable-f97ec5d75e9261a5da78dc28a8955b7cc0c4468b.zip |
HID: intel-ish-hid: Use dma_alloc_coherent for firmware update
Allocating memory with kmalloc and GPF_DMA32 is not allowed, the
allocator will ignore the attribute.
Instead, use dma_alloc_coherent() API as we allocate a small amount of
memory to transfer firmware fragment to the ISH.
On Arcada chromebook, after the patch the warning:
"Unexpected gfp: 0x4 (GFP_DMA32). Fixing up to gfp: 0xcc0 (GFP_KERNEL). Fix your code!"
is gone. The ISH firmware is loaded properly and we can interact with
the ISH:
> ectool --name cros_ish version
...
Build info: arcada_ish_v2.0.3661+3c1a1c1ae0 2022-02-08 05:37:47 @localhost
Tool version: v2.0.12300-900b03ec7f 2022-02-08 10:01:48 @localhost
Fixes: commit 91b228107da3 ("HID: intel-ish-hid: ISH firmware loader client driver")
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/amd-sfh-hid/amd_sfh_pcie.c')
0 files changed, 0 insertions, 0 deletions