Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 847154

Summary: net-misc/r8168: error: implicit declaration of function 'pci_dma_sync_single_for_device'
Product: Gentoo Linux Reporter: Peter Levine <plevine457>
Component: Current packagesAssignee: Pacho Ramos <pacho>
Status: RESOLVED FIXED    
Severity: normal CC: plevine457
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: r8168-8.050.00-kernel-5.18.patch

Description Peter Levine 2022-05-24 00:54:39 UTC
Building against linux kernel 5.18.0 fails with:

> ../../portage/net-misc/r8168-8.050.00/work/r8168-8.050.00/src/r8168_n.c: In function 'rtl8168_mac_loopback_test':
> ../../portage/net-misc/r8168-8.050.00/work/r8168-8.050.00/src/r8168_n.c:3701:17: error: implicit declaration of function 'pci_dma_sync_single_for_device'; did you mean 'dma_sync_single_for_device'? [-Werror=implicit-function-declaration]
>  3701 |                 pci_dma_sync_single_for_device(tp->pci_dev,
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       |                 dma_sync_single_for_device
> ../../portage/net-misc/r8168-8.050.00/work/r8168-8.050.00/src/r8168_n.c: In function 'rtl8168_init_board':
> ../../portage/net-misc/r8168-8.050.00/work/r8168-8.050.00> /src/r8168_n.c:26406:14: error: implicit declaration of function 'pci_set_dma_mask' [-Werror=implicit-function-declaration]
> 26406 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
>       |              ^~~~~~~~~~~~~~~~
> ../../portage/net-misc/r8168-8.050.00/work/r8168-8.050.00/src/r8168_n.c:26407:14: error: implicit declaration of function 'pci_set_consistent_dma_mask' [-Werror=implicit-function-declaration]
> 26407 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Peter Levine 2022-05-24 00:56:00 UTC
Created attachment 780455 [details, diff]
r8168-8.050.00-kernel-5.18.patch

Fixes building against Linux kernel 5.18.0+.
Comment 2 Larry the Git Cow gentoo-dev 2022-05-26 09:44:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae9bc85fa88f2bbd5e806d623a2bb902987f744b

commit ae9bc85fa88f2bbd5e806d623a2bb902987f744b
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2022-05-26 09:23:50 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2022-05-26 09:43:52 +0000

    net-misc/r8168: add 8.050.02
    
    Also fix build with kernel 5.18
    
    Thanks-to: Peter Levine
    Closes: https://bugs.gentoo.org/847154
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-misc/r8168/Manifest                            |  1 +
 net-misc/r8168/files/r8168-8.050.02-5.18-fix.patch | 51 ++++++++++++++++++++++
 net-misc/r8168/r8168-8.050.02.ebuild               | 40 +++++++++++++++++
 3 files changed, 92 insertions(+)