I had to build and test 12 firmwares!
Only after that began to partially localize the problem described above.
Guilty turned out to be parameter CONFIG_USB_UAS=m
Now I'm trying to understand what it is....
For a temporary fix, I had to comment two lines in the file package/kernel/linux/modules/usb.mk:
define KernelPackage/usb-storage-uas
SUBMENU:=$(USB_MENU)
TITLE:=USB Attached SCSI (UASP) support
DEPENDS:=+kmod-usb-storage
#KCONFIG:=CONFIG_USB_UAS
FILES:=$(LINUX_DIR)/drivers/usb/storage/uas.ko
AUTOLOAD:=$(call AutoProbe,uas,1)
endef
define KernelPackage/usb-storage-uas/description
Say Y here if you want to include support for
USB Attached SCSI (UAS/UASP), a higher
performance protocol available on many
newer USB 3.0 storage devices
endef
#$(eval $(call KernelPackage,usb-storage-uas))
Here is a more correct way to fix the described troubles.
You need to add an additional kernel module kmod-usb-storage-uas (autoload list) in the file target/linux/ipq806x/Makefile:
It turns out that when specifying the CONFIG_USB_UAS=m option, nonsense is obtained, because this module must either be absent or always present in the kernel.
Take a look at the code from file linux/drivers/usb/storafe/usb.c:
/* The main probe routine for standard devices */
static int storage_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct us_unusual_dev *unusual_dev;
struct us_data *us;
int result;
int size;
/* If uas is enabled and this device can do uas then ignore it. */
#if IS_ENABLED(CONFIG_USB_UAS)
if (uas_use_uas_driver(intf, id, NULL))
return -ENXIO;
#endif
3. Some USB storage devices may require the UAS driver:
I have an ipq8064 device that apparently does need kmod uas. I avoid the issue it looks you ran into by using custom .config's specific for my device and what i'm trying to do with the build (i.e. i don't use options like CONFIG_ALL_KMODS=y).
Alternatively, I use a custom script for imagebuilder for "production" builds (which is really nice - if you don't need to build it).
It's good if you can make it the build system better for all devices. Will you be able to test that?
You're right. I overlooked such an important thing.
But at the same time, 2 more people were looking for a solution for 2 days and did not find this method.
Apparently you have not tried to connect exactly USB 3.x devices.
I have; however, the one usb 3.x device i have is a piece of junk so perhaps i need to look further. Hope you find a resolution (I empathise with your pain).
EDIT: if there is a bug, this is what i see with a usb 3.0 device (sandisk cruzer glide 3.0 256 gb purchased several years ago now) connected:
r7500v2 # lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
r7500v2 # block info | grep "/dev/sd"
/dev/sda1: UUID="1DCF6BA32DC52940" MOUNT="/mnt/sda1" TYPE="ntfs"
Please excuse the following rant: the usb device above is a piece of crap, don't every buy one. It claims to be usb 3.0 but writes slower than usb 2.0 - it's useless.
As such, there is no error.
It's just that when implementing this kernel module, it was necessary to add warning output to the kernel log: WARN: For this USB device, module "usb-storage-uas" must be installed!