rcraid-dkms icon indicating copy to clipboard operation
rcraid-dkms copied to clipboard

Update to kernel 5.17 and 5.18

Open Exioncore opened this issue 2 years ago • 18 comments

  • genhd.h header got removed as of kernel 5.18.
  • The sci_cmd interface has changed. The done variable became a method as of 5.16. Furthermore as of 5.18 the SCp scratchpad has been removed. https://elixir.bootlin.com/linux/v5.18.5/source/include/scsi/scsi_cmnd.h
  • Multiple pci methods have been removed and so I replaced them where it made sense with what they used to do which was mostly calling dma methods.

I have tested this on Fedora with kernerls 5.17.14-300.fc36.x86_64 and 5.18.5-200.fc36.x86_64

Exioncore avatar Jun 18 '22 08:06 Exioncore

I've tested (actually running) this on Arch with 5.19.11-zen1-1-zen - it works fine. The only one that is actually installable so far. Thank you!

furioness avatar Sep 30 '22 11:09 furioness

I can confirm it works on ubuntu 22.10 (x86_64 5.19.0-1005-lowlatency). Please merge this before the ubuntu's October release date!

achirkin avatar Oct 09 '22 09:10 achirkin

Using this on Arch with 6.0.2-zen1-1-zen, works like a charm. Thank you!

fabscav avatar Oct 25 '22 00:10 fabscav

Seems to work on KUBuntu 22.04 with 6.0.6 kernel here too!

@thopiekar Can we get this merged please?

Herrie82 avatar Nov 09 '22 11:11 Herrie82

Seems to work on KUBuntu 22.04 with 6.0.6 kernel here too!

@thopiekar Can we get this merged please?

did you have issues blacklisting ahci modules? i have the rcraid module compiled and install but ahci wont disable

Albinoman887 avatar Nov 19 '22 10:11 Albinoman887

Running in Debian Testing with 6.0.4 kernel, seens OK, with some warnings, No kernel update for now to test dkms.

RodriAndreotti avatar Dec 11 '22 23:12 RodriAndreotti

OK, guys! I had a kernel update yesterday and unfortunately the automatic dkms rebuild didn't work.

Running the ./install manually on the same branch everything went correctly, but the automatic build was not done.

Current kernel: 6.0.6

RodriAndreotti avatar Dec 20 '22 12:12 RodriAndreotti

Thanks very much for these patches! I have the rcraid 9.3.0 driver working on linux kernel 6.0.9 (w/ nvme raid0) after incorporating these changes ... and then messing with dkms for a long time. I made a repo for others too. Good luck!

xangma avatar Dec 28 '22 12:12 xangma

Thanks! worked for me on Arch linux kernel 6.1.8

altodd avatar Jan 28 '23 03:01 altodd

No longer works with Linux kernel >= 6.2, but I've had some luck with making a few changes of my own by forking your PR branch to make it work with newer kernels.

fabscav avatar Apr 04 '23 17:04 fabscav

No longer works with Linux kernel >= 6.2, but I've had some luck with making a few changes of my own by forking your PR branch to make it work with newer kernels.

This branch? https://github.com/fabscav/rcraid-dkms/tree/further_compatibility_updates

Oididoi avatar Apr 07 '23 01:04 Oididoi

No longer works with Linux kernel >= 6.2, but I've had some luck with making a few changes of my own by forking your PR branch to make it work with newer kernels.

This branch? https://github.com/fabscav/rcraid-dkms/tree/further_compatibility_updates

Yes that's the one. I've been using a build based on that branch for a few weeks without issues.

fabscav avatar Apr 07 '23 12:04 fabscav

Are there any dependencies I need to get before I run install?

Oididoi avatar Apr 08 '23 02:04 Oididoi

No longer works with Linux kernel >= 6.2, but I've had some luck with making a few changes of my own by forking your PR branch to make it work with newer kernels.

This branch? https://github.com/fabscav/rcraid-dkms/tree/further_compatibility_updates

Yes that's the one. I've been using a build based on that branch for a few weeks without issues.

assume im like, a very dumb 5 year old. how exactly do i install this? cause i genuinely cant figure it out, everything seems to be going wrong

Joshinken avatar Jul 15 '23 19:07 Joshinken

You will need to source your distro's basic set of build tools and the headers for all the installed versions of the kernel you plan to run. Pull his fork down: git clone https://github.com/fabscav/rcraid-dkms.git -b further_compatibility_updates Navigate into the folder: cd rcraid-dkms If the install script isn't executable, make it so: chmod +x install Execute the script, with sudo: sudo ./install Watch the build process, this may or may not be successful if you didn't have all the build tools and the headers for your specific kernel. You can then verify success if you have an rcraid.ko file built for all your installed kernels by looking in /lib/modules/$(KVERS)/kernel/drivers/scsi/ for a rcraid.ko file. If you have any problems with the driver, uninstalling is as simple as removing all the built modules from the above paths.

Also, you will need to blacklist the ahci module from loading at boot-time. This can be done many ways, but you can add modprobe.blacklist=ahci to your /etc/default/grub config file's GRUB_CMDLINE_LINUX_DEFAULT= line.

Don't forget to generate a new grub.cfg file before rebooting. grub2-mkconfig -o /boot/grub2/grub.cfg should work for all distro's, but look for your distro's specific method since some use grub and grub2 interchangeably.

This all assumes you can actually boot into the target system. Look for 'chroot' instructions if you need to do this to a system that can't boot.

0xFADDAD avatar Aug 08 '23 23:08 0xFADDAD

Does anyone use the driver in conjunction with any optical drive? In my case, my unit ends up blocking the boot for some time until it gives a timeout and becomes inaccessible in Linux. Everything else works great except the optical drive. It's not something I use a lot, but I'd like to have it available, has anyone experienced this?

RodriAndreotti avatar Aug 11 '23 21:08 RodriAndreotti

You will need to source your distro's basic set of build tools and the headers for all the installed versions of the kernel you plan to run. Pull his fork down: git clone https://github.com/fabscav/rcraid-dkms.git -b further_compatibility_updates Navigate into the folder: cd rcraid-dkms If the install script isn't executable, make it so: chmod +x install Execute the script, with sudo: sudo ./install Watch the build process, this may or may not be successful if you didn't have all the build tools and the headers for your specific kernel. You can then verify success if you have an rcraid.ko file built for all your installed kernels by looking in /lib/modules/$(KVERS)/kernel/drivers/scsi/ for a rcraid.ko file. If you have any problems with the driver, uninstalling is as simple as removing all the built modules from the above paths.

Also, you will need to blacklist the ahci module from loading at boot-time. This can be done many ways, but you can add modprobe.blacklist=ahci to your /etc/default/grub config file's GRUB_CMDLINE_LINUX_DEFAULT= line.

Don't forget to generate a new grub.cfg file before rebooting. grub2-mkconfig -o /boot/grub2/grub.cfg should work for all distro's, but look for your distro's specific method since some use grub and grub2 interchangeably.

This all assumes you can actually boot into the target system. Look for 'chroot' instructions if you need to do this to a system that can't boot.

i still get /home/joshinken/rcraid-dkms/src/rc_msg_platform.h:30:10: fatal error: linux/stdarg.h: No such file or directory 30 | #include <linux/stdarg.h>

Joshinken avatar Aug 12 '23 17:08 Joshinken

What does locate stdarg.h output? I may be wrong, but I think the code uses the path from your kernel's headers, make sure you have them installed. One of the lines should be: /usr/src/linux-headers-5.15.0-78/include**/linux/stdarg.h** The important part is the part in double-stars. The stdarg.h file needs to come from a linux sub-folder. Part of the original problem is that stdarg.h was moved into this new sub-directory instead of being in /usr/src/linux-headers-5.15.0-78/include/ if all looks well, you might have a linker issue, and need to redirect it to a version of stdarg.h you have on your system.

0xFADDAD avatar Aug 13 '23 17:08 0xFADDAD