Commit f97ec5d
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 91b2281 ("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>1 parent fe23b6b commit f97ec5d
1 file changed
Lines changed: 3 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | 670 | | |
680 | 671 | | |
681 | 672 | | |
| |||
695 | 686 | | |
696 | 687 | | |
697 | 688 | | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
| 689 | + | |
706 | 690 | | |
707 | 691 | | |
708 | 692 | | |
| |||
725 | 709 | | |
726 | 710 | | |
727 | 711 | | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | 712 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
| 713 | + | |
737 | 714 | | |
738 | 715 | | |
739 | 716 | | |
| |||
0 commit comments