Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to kernel 5.17 and 5.18 #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Exioncore
Copy link

  • 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

@furioness
Copy link

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!

@achirkin
Copy link

achirkin commented Oct 9, 2022

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!

@fabscav
Copy link

fabscav commented Oct 25, 2022

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

@Herrie82
Copy link
Contributor

Herrie82 commented Nov 9, 2022

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

@thopiekar Can we get this merged please?

@Albinoman887
Copy link

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

@RodriAndreotti
Copy link

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

@RodriAndreotti
Copy link

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

@xangma
Copy link

xangma commented Dec 28, 2022

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!

@altodd
Copy link

altodd commented Jan 28, 2023

Thanks! worked for me on Arch linux kernel 6.1.8

@fabscav
Copy link

fabscav commented Apr 4, 2023

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.

@Oididoi
Copy link

Oididoi commented Apr 7, 2023

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

@fabscav
Copy link

fabscav commented Apr 7, 2023

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.

@Oididoi
Copy link

Oididoi commented Apr 8, 2023

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

@Joshinken
Copy link

Joshinken commented Jul 15, 2023

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

@0xFADDAD
Copy link

0xFADDAD commented Aug 8, 2023

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.

@RodriAndreotti
Copy link

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?

@Joshinken
Copy link

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>

@0xFADDAD
Copy link

0xFADDAD commented Aug 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.