Bug 268354 - qlnxe(4) failed to build as kernel component
Summary: qlnxe(4) failed to build as kernel component
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-13 13:12 UTC by Stéphane D'Alu
Modified: 2023-07-01 17:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane D'Alu 2022-12-13 13:12:17 UTC
When adding to the kernel configuration file the line mentioned in the man page: 
   device qlnxe

The kernel fails to build with the following error:

In file included from /usr/src/sys/dev/qlnx/qlnxe/ecore_cxt.c:46:
/usr/src/sys/dev/qlnx/qlnxe/ecore.h:130:8: error: unknown type name 'OSAL_INLINE'
static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS)



When building qlnxe as a module, there is no build problem
Comment 1 Mark 2023-06-17 17:25:58 UTC
I have submitted a PR which fixes the compilation issues.
I am not in a position to test it, so please do so if you can

https://github.com/freebsd/freebsd-src/pull/779
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-07-01 17:11:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e4017d9b6913257b1ca6735ab1159f805419d2ec

commit e4017d9b6913257b1ca6735ab1159f805419d2ec
Author:     Mark O'Donovan <shiftee@posteo.net>
AuthorDate: 2023-07-01 17:06:51 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-07-01 17:06:59 +0000

    qlnxe: Fix building as in-kernel component

    Add some extra files for building the driver as part of the kernel.
    Change some #defines to match those used when building as a module.

    PR: 268354

    Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/779

 sys/conf/files.amd64       | 16 ++++++++++++++++
 sys/dev/qlnx/qlnxe/ecore.h |  5 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)