From b651473651e44c1f64092f643c4791f35598bb28 Mon Sep 17 00:00:00 2001 From: dniwelive Date: Thu, 15 Aug 2019 12:43:07 +0300 Subject: [PATCH 1/2] fix main.c for kernel 5 --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index b35dc93..ab21e9b 100644 --- a/main.c +++ b/main.c @@ -660,10 +660,10 @@ static int alx_alloc_rings(struct alx_priv *alx) alx->num_txq + sizeof(struct alx_rrd) * alx->rx_ringsz + sizeof(struct alx_rfd) * alx->rx_ringsz; - alx->descmem.virt = dma_zalloc_coherent(&alx->hw.pdev->dev, - alx->descmem.size, - &alx->descmem.dma, - GFP_KERNEL); + alx->descmem.virt = dma_alloc_coherent(&alx->hw.pdev->dev, + alx->descmem.size, + &alx->descmem.dma, + GFP_KERNEL); if (!alx->descmem.virt) return -ENOMEM; From 116f9881c6ea997c6515233e5f371cb45304aaf4 Mon Sep 17 00:00:00 2001 From: dniwelive Date: Thu, 15 Aug 2019 12:54:01 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe76a5d..06d3022 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ sudo depmod Tun and done! -The above sources were taken from kernel version 4.12 +The above sources were taken from kernel version 4.12 and slightly modified for newer kernel -They appear to work fine on 4.17.2 as well +They appear to work fine on 5.0.0 as well And here is the faulty commit: