Enable USB attach SCSI Module in Kernel


Recommended Posts

Would it be possible to add a module for USB Attached SCSI (CONFIG_USB_UAS) protocol?  This is required to support a card like the StarTech PEXUSB3S44V.  There are a number of users trying to get this card working.  The UnRaid kernel enumerates the card but it does not actually work.  This card has 4 independant USB3 controllers and it looks as if you could pass each controller to a different virtual machine.

 

UASP Information

 

On this thread @Siberys details his issue with the StarTech PEXUSB3S44V USB3 card with 4 separate USB3 controllers that needs UASP support to function.  

 

08:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) (A)

09:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) (B)

0a:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) ©

0b:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller [1912:0015] (rev 02) (D)

 

/sys/kernel/iommu_groups/42/devices/0000:08:00.0

/sys/kernel/iommu_groups/43/devices/0000:09:00.0

/sys/kernel/iommu_groups/44/devices/0000:0a:00.0

/sys/kernel/iommu_groups/45/devices/0000:0b:00.0

 

Post 1

 

Post 2

 

UPDATE:  I have built a unRaid 6.4 rc6 test kernel with USB Attached SCSI enabled and have a card to test with on the way.  I will hopefully have and update after July 1.

 

Thanks

Edited by csmccarron
  • Upvote 4
Link to comment
  • 4 weeks later...

It did not.  I cannot even get 1 of the 4 ports to recognize a USB device in unRaid.  This module could still be usefull for USB cards that support the protocol but it did not fix the issue with the StarTech PEXUSB3S44V card.  Once the next RC comes out I am going to do some more experimenting with the card.  Basically, the kernel enumerates the card but it does not actually see devices attached to the card.

Link to comment
  • 3 weeks later...

Does anyone know why I would be getting the errors below in my log file when I try to plug a device into 1 of the 4 usb3 ports on my StarTech PEXUSB3S44V card?

 

Partial Log File

Aug  7 16:14:19 mccserverur01 kernel: traps: emhttpd[7524] trap divide error ip:418e6a sp:2b2684beade0 error:0 in emhttpd[400000+24000]
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: Abort failed to stop command ring: -110
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: xHCI host controller not responding, assume dead
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: HC died; cleaning up
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: WARNING: Host System Error
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: Error while assigning device slot ID
Aug  7 16:14:28 mccserverur01 kernel: xhci_hcd 0000:84:00.0: Max number of devices this xHCI host supports is 32.
Aug  7 16:14:28 mccserverur01 kernel: usb usb3-port1: couldn't allocate usb_device

 

USB Devices

00:1a.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 (rev 06)
00:1d.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1 (rev 06)
84:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
85:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
86:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
87:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)
89:00.0 USB controller: Etron Technology, Inc. EJ188/EJ198 USB 3.0 Host Controller

 

Device 89 is assigned to my virtual machine, 00:1a & 1d are used by the host.

Link to comment

About a month ago, I had two more of my original 8 gskill memory sticks go bad, 4 have failed out of 8.  I woke up one morning and the system had crashed hard!  I then start figuring out which sticks were bad and eventually got the system to boot on 6 sticks of memory.  Ran the memory test and it appeared to be stable.  After that I returned those to gskill which replaced them.  

 

I ordered 64 gb of ECC REG memory that is compatible with my ASUS Z9PE-D16 motherboard that is guaranteed for life.  Everything has been stable until I updated to rc7a.  This particular card has never worked in unRaid.  A couple of other users have tried but also failed.  It works when the BIOS is controlling it but the moment the kernel takes over it goes to shit fast!  Right now I put my original USB 3 Etron controller back in the server and all is well.  There just seems to be no interest in getting this card working but it would be perfect for virtual machines.  According to Startech it works on RedHat and Ubuntu LTS versions.  Why it will not work on unRaid is still a mystery.   I am about to perform a firmware update on the card to see if that will allow it to work any better.

Link to comment
  • 1 month later...
On 8/8/2017 at 3:09 AM, saarg said:

You seem to be having alot of different problems lately. Might look like you have a hardware problem with your rig.

 

@saarg my system finally stabilized, not really sure what I changed to fix the issue but I am sure it was one of the following:

 

changed a few BIOS settings

removed the StarTech PEXUSB3S44V USB3 card from my system, this car will work when in the computer BIOS but as soon as the kernel loads it goes to shit.

turned off Enable PCIe ACS Override under VM Manager

removed vfio_iommu_type1.allow_unsafe_interrupts=1 from the append line in syslinux.cfg

Link to comment
8 hours ago, csmccarron said:

 

@saarg my system finally stabilized, not really sure what I changed to fix the issue but I am sure it was one of the following:

 

changed a few BIOS settings

removed the StarTech PEXUSB3S44V USB3 card from my system, this car will work when in the computer BIOS but as soon as the kernel loads it goes to shit.

turned off Enable PCIe ACS Override under VM Manager

removed vfio_iommu_type1.allow_unsafe_interrupts=1 from the append line in syslinux.cfg

 

Good to hear you got it sorted. 

Now you just have to enable one by one so we know which of the changes worked :P

  • Upvote 1
Link to comment
  • 1 month later...
  • 4 months later...

My system has been very stable on the latest version of unRaid 6.4.1.  I do not remember what BIOS settings I changed.  I have not tried my USB cards with 4 USB3 controllers on them yet.  It stable so I do not want to mess with it.

 

On another post I noted that I did the following:

remove/change the following in syslinux.cfg append line:

remove:  vfio_iommu_type1.allow_unsafe_interrupts=1

change:  pci-stub-ids to vfio-pci.ids

 

syslinux.cfg

  append vfio-pci.ids=10de:1b81,10de:10f0,10de:13c2,10de:0fbb intel_iommu=on iommu=pt initrd=/bzroot,/bzroot-gui
 

vfio-pci.ids are my two GTX1070 gpus.

IOMMU group 17: [10de:1b81] 03:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
  [10de:10f0] 03:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
 
IOMMU group 18: [10de:1b81] 04:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)
  [10de:10f0] 04:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

 

USB Cards for virtual machines - I found that the two usb3 cards work better if I do not add them to the vfio-pci.ids list

IOMMU group 20: [8086:1521] 06:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
IOMMU group 21: [8086:1521] 06:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)

 

 

 

 

 

Edited by csmccarron
Link to comment
  • 5 years later...
On 9/11/2023 at 2:26 AM, rheumatoid-programme6086 said:

Wondering if there has been any progress on UASP support? With USB speeds now surpassing SATA and the availability of several high-quality USB SSDs (and USB NVMe adapters), USB has become an interesting option for cache on NVMe and PCIe slot constrained systems ... but without UASP, USB SSDs cannot be TRIMed, negating all of their benefits.

 

To clarify what I meant by "negating all of their [usb SSDs] benefits" -- The USB SSDs I have see a 5-10X reduction in performance after they become fully 'dirty' as compared to an Ubuntu system that supports UASP and has been configured to properly TRIM them. While UASP support might not have been a big deal performance-wise for HDDs six years ago when this feature request was originally written, it's a huge deal for SSDs in the present era.

Link to comment
  • 4 months later...

I am still facing this frustrating problem months later. The only solution I have is to remove the drives from the unraid box and TRIM them on another machine, which is a huge pain and just a ludicrously bad solution. Does anyone know if it's possible to build a custom kernel with UASP support? Considering that UASP is needed to TRIM both SSDs and SMR drives, and significantly enhances the performance of UASP-capable DAS enclosures, I'm really surprised that this relatively simple change (enabling UASP in the kernel build) has not been made.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.