Jmicron Tech Scsi Disk Device Not Working

0 views
Skip to first unread message

Teena Ruiter

unread,
Aug 4, 2024, 7:00:58 PM8/4/24
to pracniawhobar
WithoutUASP, a drive is mounted as a Mass Storage Device using Bulk Only Transport (or BOT), a protocol that was designed for transferring files way back in the USB 'Full speed' days, when the fastest speed you could get was a whopping 12 Mbps!

With USB 3.0, the BOT protocol cripples throughput. USB 3.0 has 5 Gbps of bandwidth, which is 400x more than USB 1.1. The old BOT protocol would transfer data in large chunks, and each chunk of data had to be delivered in order, without regard for buffering or multiple bits of data being able to transfer in parallel.


Around the time USB 3.0 was introduced, most USB storage devices and adapters for hard drives started adopting the standard. And some computers with only USB 2.0 ports could have their firmware updated to use UASP for newer drives, so some USB 2.0 connections got a speed boost.


The differences are only really apparent if you take the thing apart and look at the actual circuit board. The older non-UASP version is on the top left in the picture above, and the UASP version on the bottom right. The UASP version has a completely different layout, and uses a different controller chip.


If you have a USB drive and don't want to take it apart and look up the specs of the controller chip, the only reliable way to tell if it's being mounted with UASP support or not is to plug it into your Pi, then run the command lsusb -t:


This command lists all the USB devices in a tree, and for each of the hard drives, you should see a Driver listed. If it's uas (like in the above example), then your drive supports UASP and you'll get the best speed. If it's usb-storage, then it's using the older BOT protocol and you won't see the full potential.


I also had two other old SATA adapters that I've used over the years when doing computer repairs, when I would clone an old hard drive to a new one, or try to recover data from a hard drive in a broken computer.


I checked this inland adapter I bought from Micro Center, and it also supports UASP, which was a surprise since the specs on Micro Center's website showed the data transfer rate as "Up to 480Mbps", ha!


Then I checked this StarTech SATA adapter I bought in 2015 and it also supports UASP. So it looks like most newer USB 3.0 adapters do support it, but it's not always easy to see in the specs on Amazon or other retailers' websites.


Even though Raspberry Pis older than the Pi 4 only have USB 2.0 ports, I wanted to check if they might support UASP, because as we'll see in a minute, just having UASP versus the older BOT protocol makes a large difference in performance, which would help even on older USB 2.0 ports.


Alas, after testing with all my adapters, I found they all mounted the drive using the usb-storage driver. I was trying to find any official confirmation as to whether the Pi 3 B+ firmware could support UASP, but all I could find was a reference in this Pi Forum post to the Pi's dwc_otg driver not having support for a feature the UAS driver requires.


So if you have an older Raspberry Pi, your options for fast external storage are very limited. I'd stick with the Pi 4 if you want to do anything that requires data transfer like building a NAS, setting up Nextcloud, using it for backups, or media streaming.


At the bottom there are 4K random access benchmarks, which are a better measure of how the drive will perform doing typical computing tasks. And UASP still makes a big impact. Random reads are 35% faster, and random writes are 20% faster.


You can also see all the raw data and my methodology in this benchmarking issue on the turing-pi-cluster repository. If you run the same benchmarks, you may get slightly different results if you use a different SSD or enclosure.


My advice is always use UASP with USB 3.0 devices on the Pi 4, otherwise you're missing out on a pretty substantial performance gain. Also, remember to plug USB 3.0 devices into the blue USB 3.0 ports, not into the black USB 2.0 ports, otherwise you won't see any of the performance difference.


I have to run a Cron job at 5 minute intervals to check that the drive stays mounted. Otherwise it will randomly unmount and stop working. Using with a 1 TB Samsung EVO SSD. connected to Pi4B via a powered 3.0 USB hub.


Added "quirk" to the /boot/cmdline.txt file to revert to usb-storage BOT driver. dd write performance dropped a bit but the copy and read performance increased by 9X. And drive stays mounted over time.


This is because your device/bridge claims that it has UASP support, but it seems that your USB-SATA-bridge chipset does not properly pass SAT commands on to the SATA device when running in UAS mode. Enabling the NO_ATA_1X kernel flag reverts back to usb-storage for this device and restores stable communication.


Upon uas detection, explained in kernel src /drivers/usb/storage/uas-detect.h , there is a comment section in the middle mentioning ASMedia chipset detection based on deviceIDs. Line 80 states "ASM1153 - with working uas support"


Thanks for these infos, I am hosting Nextcloud on my Pi4 and I was looking for an external enclosure to use for my hard drives but I was looking for more info regarding performance differences between UASP and non UASP devices. It would be interesting to have a performance comparison between USB3 devices on the Pi4 and a regular computer and the performance differences between a Hard Drive inside a USB3 enclosure and the same Hard Driveconnected to a SATAIII port.


True... but by "if you do a lot of file transfers" I mean that if you have a Pi that's constantly doing things like storing or reading files from it's main drive (I have some Pis that do remote time-lapse photography where this is the case) then it could see the an 8% improvement, best case.


The Pi 4 is the first of the Raspberry Pis to support uasp. And that wasn't really directly disclosed to us! That's what the news is. The rest is basically testing uasp and seeing just what all the hubub was about!


I have a HDD enclosure with JMS567 chipset, which supports UASP, however, on my Pi 4 it's using the usb-storage driver. Anyone experiencing that with this chipset as well, or any suggestions on how to get it working with uasp?


check my comment from above about storage quirks. Your deviceId is in the kernel's internal quirks list. According to the src code, your chip doesnt handle FUA properly, which is required for uasp to work. If you still wanna try, you may have to recompile the kernel.


I had a lot of bad expirience with failing SD cards back in the days when the OS was there. So I strongly recommend you to leave only boot on SD and move whole OS on the USB drive, if it's applicable of coures. I guess depend on what is your use case. Some of my RPis are just for use when I travel so I leave all on SD card then.


Followed this guide and found that not all is cut and dry. I have a nvme enclosure that's marketed as UASP and USB 3.1 -S1201A-USB31-Gen2-Type-C-to-M2-SSD-PCIeNVMe but when plugged into rPi4 it will switch the port to much slower 480MB. It is mounted as a boot volume, so I don't know whether this is down to the kernel not supporting faster speeds form a USB device. I tried plugging the drive to the other blue port. But with the same results.


The culprit has been identified. It's very much down to a cable. Make sure you use a true USB3.1 cable that's fully internally connected. I was using a USB-A to USB-C cable that I discovered was only USB2.0 compatible.


Anybody with a JMicron chip (JMS583) able to get their enclosure to run USB3 (5Gb/s speed)? Mine keeps switching to 480Mb/s. I've tested the unit on rPi4 as well as MacBook, trying different cables but all with the same result. So apart from a larger capacity, completely pointless upgrade.


First, Jeff, this is the best post I've seen in a long time. Loved the video. Very informative. Now that I've buttered you up, I bought an ADATA SC680 specifically for Ubuntu Mate desktop. It came up as "Driver=uas" and I was tickled pink. However, tried to boot and it starts but fails ultimately with an 00000044 error. Tried quirks to no avail.


really interesting and well done article. I have to highlight, after tests, that if you use a USB3 hub probably also the hub has to support UAS.

Tried the same disk with same controller and I have got a UAS driver only if connected directly to the raspberry or the Mac, otherwise it doesn't use UAS driver.


a "safe" or "blessed" USB3-to-SSD/HDD adapter is the Startech USB3S2SAT3CB, amazon ASIN B00HJZJI84. Just giving the name so you can link with a affiliate code if you want and to cut down on it looking like I'm spamming :)


Be aware that the cable can't supply more than 900mA of current, because that's a USB3 limitation. Many users are writing negative reviews, seemingly because of this. Perhaps Raspberry Pi 4 can supply more? It might help to decouple the power from data by ripping off the cable and supplying 5V sideways, or making some Y passthru cable.


I was able to get almost 400MB/s running hdparm with RAID0 on 2 UASP attached SSDs, unfortunately the pi would drop both USB devices as soon as I tried to actually copy any data to the RAID. Switching to Y cables on the drives for extra power didn't help either.


I've had success upgrading firmware on a couple JMS567 cables. 1 wouldn't usb boot prior to upgrade of OEM firmware and both now reliable with UASP and TRIM enabled. I upgraded to v173.01.00.02 from " -xu4/software/jms578_fw_update".


I am late to the game, I know, but I just wanted to drop in a big "thanks" for this information. My data speed improvement on my pi4 is right in line with what is seen here. I used the Sabrent EC-SS31 adapter on Amazon. Now off to build a case out of Lego as with my Pi W Zero. :)


Got another one for the naughty list. I got it because I really liked the 6 inch cable, but doesn't appear to be UASP (can't confirm with lsusb since I'm on Alpine (HassOS), but hdparm results were disappointing)


Hello,i want too use a normal 2.5 hdd in Rpi4

I have the official Rpi4 psu,i get random errors in Raapian OS if i connect also a flash drive with the hdd connected,is there a command that i can put in config.txt to fix this problem?

Thanks

3a8082e126
Reply all
Reply to author
Forward
0 new messages