From b7fdcead5a738b986d74ba8c00be88fe7a44af74 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 27 Jan 2020 13:31:58 -0500 Subject: meta-agl-profile-core: update most recipe Update SRCREV in MOST driver recipe to pick up: e4dbbaf sound.c: Remove snd_pcm_lib_mmap_vmalloc As well, the following changes have been made to the bbappend: - the kernel version detection logic has been removed - the patch to support kernels older than 4.13 has been removed - the patch that was handling the snd_pcm_lib_mmap_vmalloc issue on kernels >= 4.19 has been reworked to add the required #ifdefs to support kernels < 4.19 for e.g. the rcar3 4.14-ltsi kernel. Bug-AGL: SPEC-2932 Change-Id: I388d186d04ccc017ff10b2024ae35ed22f7a8e36 Signed-off-by: Scott Murray --- ...0001-most-aim-network-backport-Kernel-API.patch | 43 ---------------------- ...1-handle-snd_pcm_lib_mmap_vmalloc-removal.patch | 22 ++++++++--- 2 files changed, 17 insertions(+), 48 deletions(-) delete mode 100644 meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch (limited to 'meta-agl-profile-core/recipes-kernel/most/files') diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch b/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch deleted file mode 100644 index d43b132f2..000000000 --- a/meta-agl-profile-core/recipes-kernel/most/files/0001-most-aim-network-backport-Kernel-API.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 383ffadd33f484ab4aaeb14fa109b61143d27d58 Mon Sep 17 00:00:00 2001 -From: Christian Gromm -Date: Thu, 7 Jun 2018 12:15:38 +0200 -Subject: [PATCH] most: aim-network: backport Kernel API - -This patch replaces the function calls skb_put_data with memcpy. It is -needed to have the module compiled for kernels prior to 4.13. - -Signed-off-by: Christian Gromm ---- - aim-network/networking.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/aim-network/networking.c b/aim-network/networking.c -index 936f013..4c259c2 100644 ---- a/aim-network/networking.c -+++ b/aim-network/networking.c -@@ -470,11 +470,11 @@ static int aim_rx_data(struct mbo *mbo) - ether_addr_copy(skb_put(skb, ETH_ALEN), dev->dev_addr); - - /* src */ -- skb_put_data(skb, &zero, 4); -- skb_put_data(skb, buf + 5, 2); -+ memcpy(skb_put(skb, 4), &zero, 4); -+ memcpy(skb_put(skb, 2), buf + 5, 2); - - /* eth type */ -- skb_put_data(skb, buf + 10, 2); -+ memcpy(skb_put(skb, 2), buf + 10, 2); - - buf += MDP_HDR_LEN; - len -= MDP_HDR_LEN; -@@ -483,7 +483,7 @@ static int aim_rx_data(struct mbo *mbo) - len -= MEP_HDR_LEN; - } - -- skb_put_data(skb, buf, len); -+ memcpy(skb_put(skb, len), buf, len); - skb->protocol = eth_type_trans(skb, dev); - skb_len = skb->len; - if (netif_rx(skb) == NET_RX_SUCCESS) { --- -2.11.0 diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch index 8f83dbab4..d4383c4f6 100644 --- a/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch +++ b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch @@ -1,18 +1,30 @@ Handle snd_pcm_lib_mmap_vmalloc removal in 4.19 -Upstream-Status: Pending +Add .mmap field back to pcm_ops for kernels older than 4.19. + +Upstream-Status: Inappropriate Signed-off-by: Scott Murray -diff --git a/driver/aim-sound/sound.c b/driver/aim-sound/sound.c -index 6a290ff..4b3329b 100644 +diff --git a/aim-sound/sound.c b/aim-sound/sound.c +index 4b3329b..c0a26be 100644 --- a/aim-sound/sound.c +++ b/aim-sound/sound.c -@@ -463,7 +463,6 @@ static const struct snd_pcm_ops pcm_ops = { +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -463,6 +464,9 @@ static const struct snd_pcm_ops pcm_ops = { .trigger = pcm_trigger, .pointer = pcm_pointer, .page = snd_pcm_lib_get_vmalloc_page, -- .mmap = snd_pcm_lib_mmap_vmalloc, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0) ++ .mmap = snd_pcm_lib_mmap_vmalloc, ++#endif }; static int split_arg_list(char *buf, char **card_name, u16 *ch_num, -- cgit 1.2.3-korg