View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001560 | channel: elrepo/el10 | kmod-megaraid_mbox | public | 2025-08-29 19:27 | 2025-08-31 15:50 |
| Reporter | conathan | Assigned To | pperry | ||
| Priority | low | Severity | minor | Reproducibility | have not tried |
| Status | assigned | Resolution | open | ||
| Summary | 0001560: Requesting megaraid_mbox for x86_64 / x86_64-v2 | ||||
| Description | Requesting megaraid_mbox for ELREPO for AlmaLinux 10. * My use case will be AlmaLinux 86_64-v2 (May not be valid if elrepo has no el10- x86_64-v2 plans, - would be handy if it existed though as I could just rebuild it via mock) | ||||
| Additional Information | I started working on attempting to package myself (for our own use), First issue I ran into was asm/unaligned.h needed to be linux/unaligned.h, (megaraid_mbox.c) but then ran into:
gcc -Wp,-MMD,/builddir/build/BUILD/megaraid_mbox-2.20.5.1/.megaraid_mbox.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x8
6/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -
D__KERNEL__ -fmacro-prefix-map=./= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=branch -f
no-jump-tables -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare
-fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -mindirect-branch-cs-prefix -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatcha
ble-function-entry=16,16 -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -ftrivial-auto-var-init=zero -fno-stack-clash-protection -pg -mrecord-mcount
-mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -fmin-function-alignment=16 -fstrict-flex-arrays=3 -fno-strict-overflow -fno-stack-check -fconserve-stack -Wall -Wundef -Werror=im
plicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-d
eclarations -Wmissing-prototypes -Wframe-larger-than=2048 -Wno-main -Wno-dangling-pointer -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-stringop-overflow -Wno-array-bounds -Wno-alloc-size
-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wextra -Wunused -Wno-unused-but-set-variable -Wno-unused-
const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-type-limits -Wno-shift-nega
tive-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -DCONFIG_MEGARAID_MAILBOX -DMODULE -DKBUILD_BASENAME='"megaraid_mbox"' -DKBUILD_MODNAME='"megaraid_mbox"' -D__
KBUILD_MODNAME=kmod_megaraid_mbox -c -o /builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.o /builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c ; ./tools/objtool/objtool -
-hacks=jump_label --hacks=noinstr --hacks=skylake --ibt --orc --retpoline --rethunk --sls --static-call --uaccess --prefix=16 --link --module /builddir/build/BUILD/megaraid_mbox-2.20.5.1/me
garaid_mbox.o
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:334:10: error: ‘struct scsi_host_template’ has no member named ‘sdev_attrs’
334 | .sdev_attrs = megaraid_sdev_attrs,
| ^~~~~~~~~~
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:334:43: error: initialization of ‘unsigned char:1’ from ‘struct device_attribute **’ makes integer from pointer without a cast [-W
int-conversion]
334 | .sdev_attrs = megaraid_sdev_attrs,
| ^~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:334:43: note: (near initialization for ‘megaraid_template_g.host_tagset’)
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:334:43: error: initializer element is not computable at load time
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:334:43: note: (near initialization for ‘megaraid_template_g.host_tagset’)
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:335:10: error: ‘struct scsi_host_template’ has no member named ‘shost_attrs’
335 | .shost_attrs = megaraid_shost_attrs,
| ^~~~~~~~~~~
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:335:43: error: initialization of ‘unsigned char:1’ from ‘struct device_attribute **’ makes integer from pointer without a cast [-W
int-conversion]
335 | .shost_attrs = megaraid_shost_attrs,
| ^~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:335:43: note: (near initialization for ‘megaraid_template_g.queuecommand_may_block’)
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:335:43: error: initializer element is not computable at load time
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:335:43: note: (near initialization for ‘megaraid_template_g.queuecommand_may_block’)
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c: In function ‘megaraid_queue_command_lck’:
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:1443:12: error: ‘struct scsi_cmnd’ has no member named ‘scsi_done’
1443 | scp->scsi_done = done;
| ^~
In file included from /builddir/build/BUILD/megaraid_mbox-2.20.5.1/mega_common.h:30,
from /builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.h:15,
from /builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:70:
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c: In function ‘megaraid_queue_command’:
/builddir/build/BUILD/megaraid_mbox-2.20.5.1/megaraid_mbox.c:1465:22: error: too few arguments to function ‘megaraid_queue_command_lck’
1465 | static DEF_SCSI_QCMD(megaraid_queue_command)
| ^~~~~~~~~~~~~~~~~~~~~~
| ||||
| Tags | No tags attached. | ||||
|
|
UPDATE: Sorry I mistakenly thought you were asking for megaraid_sas. Please ignore my comment below. -- You don't need a kmod-megaraid_sas. AlmaLinux 10 already has re-enabled device ID's in several of the kernel's storage drivers. Look under "Deviations from RHEL 10": https://wiki.almalinux.org/release-notes/10.0.html The following device drivers were modified to re-add PCI IDs for hardware that was previously disabled in RHEL: aacraid - Dell PERC2, 2/Si, 3/Si, 3/Di, Adaptec Advanced Raid Products, HP NetRAID-4M, IBM ServeRAID & ICP SCSI be2iscsi - Emulex OneConnectOpen-iSCSI for BladeEngine 2 and 3 adapters be2net - Emulex BladeEngine 2 and 3 adapters * hpsa - HP Smart Array Controller lpfc - Emulex LightPulse Fibre Channel SCSI megaraid_sas - Broadcom MegaRAID SAS mlx4_core - Mellanox Gen2, ConnectX-2, ConnectX-3 adapters mpt3sas - LSI MPT Fusion SAS 3.0 mptsas - Fusion MPT SAS Host qla2xxx - QLogic Fibre Channel HBA qla4xxx - QLogic iSCSI HBA Specific device ID's are here: https://wiki.almalinux.org/release-notes/10.0.html#extended-hardware-support |
|
|
We have no specific plans to support x86_64-v2, but always happy to try to help on a case by case basis. As Alma are already building a x86_64-v2 kernel, and are also accepting/making changes rather than adhering to a strict rebuild of the RHEL kernel, I think the best solution would be a request to Alma to enable megaraid_mbox as a module in their kernel builds. |
|
|
Thank you both, and have just done so https://bugs.almalinux.org/view.php?id=558 Regardless if Alma or Elrepo takes it up, still going to see if I can get the AlmaLinux 9 srpm for this working on AlmaLinux 10. If I do so, any benefit in me posting my patches? (Some of what I am fixing looks to be due to it being for a older kernel and I gather if elrepo was to consider this they would be using a newer megaraid_mbox-2.20.5.1) Also if any relevance, lspci output (cut down version of lspci -v -v -v, with and without -m_ 04:0e.0 RAID bus controller: Broadcom / LSI MegaRAID (rev 07) 04:0e.0 0104: 1000:0408 (rev 07) Subsystem: Broadcom / LSI MegaRAID SCSI 320-2E RAID Controller Subsystem: 1000:0002 Kernel driver in use: megaraid Kernel modules: megaraid_mbox |
|
|
Don't use the el9 sources as a starting point for an el10 package. For source code, either install your ALMA el10 kernel source code and use the megaraid driver sources from that, or try the latest 6.12 LTS sources from kernel.org (from which the rhel10 kernel was forked), and use that as your starting point. Hopefully those sources will build cleanly, but if not there will be far fewer fixes required than starting with el9 sources. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-08-29 19:27 | conathan | New Issue | |
| 2025-08-29 19:27 | conathan | Status | new => assigned |
| 2025-08-29 19:27 | conathan | Assigned To | => pperry |
| 2025-08-29 20:14 | toracat | Project | channel: elrepo/el8 => channel: elrepo/el10 |
| 2025-08-30 08:03 | tqhoang | Note Added: 0010611 | |
| 2025-08-30 11:45 | pperry | Note Added: 0010612 | |
| 2025-08-30 12:39 | tqhoang | Note Edited: 0010611 | |
| 2025-08-30 12:40 | tqhoang | Note Edited: 0010611 | |
| 2025-08-30 12:40 | tqhoang | Note Edited: 0010611 | |
| 2025-08-31 00:51 | conathan | Note Added: 0010616 | |
| 2025-08-31 15:50 | pperry | Note Added: 0010617 |