3ware RAID controller not working with Ryzen on linux

I have home server with 3ware raid controller Model = 9650SE-16ML which works for many years on Xeon , later on desktop intel CPU but now I purchased Ryzen 3600 for it and Aorus B450 M motherboard and was welcomed by initramfs and no block devices.

In dmesg there were errors like these:

[    1.933113] 3w-9xxx: scsi0: ERROR: (0x06:0x000C): PCI Parity Error: clearing.
[    1.933117] 3w-9xxx: scsi0: ERROR: (0x06:0x000D): PCI Abort: clearing.
[    1.933119] 3w-9xxx: scsi0: ERROR: (0x06:0x000E): Controller Queue Error: clearing.
[    1.933120] 3w-9xxx: scsi0: ERROR: (0x06:0x0010): Microcontroller Error: clearing.
[    2.336598] 3w-9xxx: scsi0: ERROR: (0x06:0x000C): PCI Parity Error: clearing.
[    2.336599] 3w-9xxx: scsi0: ERROR: (0x06:0x000D): PCI Abort: clearing.

Found this issue https://bugzilla.kernel.org/show_bug.cgi?id=202425
which states that from kernel 4.11 The commit is: 60db3a4d8cc9073cf56264785197ba75ee1caca4 (“PCI: Enable PCIe Extended Tags if supported”) this is broken.

I confirmed by installing kernel 4.9 and it is running atm . Solution is to maintain own kernel with
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_3WARE, 0x1004, quirk_no_ext_tags);
But I am not sure how to do that , need to maintain pve kernel for proxmox.

EDIT : i did not compile kernel since ~2007

1 Like

did i write to wrong forum section ?

Hey, looks like the right section, just a super specific issue that not many people might have encountered.
Might want to bump in a couple of days, but might be that not many people have encountered the issue

Uf would be cool if someone can help :smiley:

Well just an update that i fixed all ryzen issues with (few patches inside pve kernel) and installation of zenpower for sensors.

Kernel build was difficult and was failing many times but in the end victory.

Will update the thread with procedure for patching the kernel later.

root@proxmara1:~# uname -a
Linux proxmara1 5.11.15-1 #1 SMP 5.11.15-1 (Fri, 16 Apr 2021 12:14:57 +0000) x86_64 GNU/Linux

Actual build needs ~40GB of space and ~4h on ryzen 3600

1 Like

Did you find some instructions to follow for building the custom kernel?

Well nothing in one place , had to read official documentation on patching, then separate threads on pve-kernel for dependencies .
That would be the end for this issue but since pve-kernel is missing also a lot of ryzen 3000 performance patches , had to read on those .

But if you only want to know how to patch kernel then short would be :

Install dependencies for kernel build.
Clone the kernel repo git://git.proxmox.com/git/pve-kernel.git
Prepare patch so that you create a diff file between original in repo and yours . for me file in question was “drivers/pci/quirks.c” and either put it in patches folder if in Makefile you have something like set -e; cd ${BUILD_DIR}/${KERNEL_SRC}; for patch in ${PVE_PATCHES}; do echo "applying PVE patch '$$patch'" && patch -p1 < ../../$${patch}; done
or do manual
patch -p1 < ../path-to-patch-diff/patch

My patch was

— a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5192,6 +5192,8 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0144, quirk_no_ext_tags);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0420, quirk_no_ext_tags);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);

+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_3WARE, 0x1004, quirk_no_ext_tags);
+
#ifdef CONFIG_PCI_ATS
/*

  • Some devices require additional driver setup to enable ATS. Don’t use

and after that make 2>&1 | tee build.log

But i had very old “dwarves” package which i had to compile and also change the “abi-checks” since it was failing on that place.

This is for 3ware fix.

1 Like