Would be technically possible that the function uas_use_uas_driver checks if the uas driver is loaded (not just configured) before telling the usb-storage to leave the device to the uas module? Bye 2018-03-22 16:16 GMT+01:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > On Wed, 21 Mar 2018, Menion wrote: > >> Well, still, my two cents here, is it really that if you have UAS in a >> module and you don't load it but connect an UAS capable device, this >> device is not enumerated rather than downgraded to usb-storage? > > Let's be precise. The device _is_ enumerated, because the kernel can't > tell what driver is appropriate without first reading the device's > descriptors, which happens during enumeration. Once the enumeration is > over, the kernel tries to bind the device to an appropriate driver; if > the binding fails then the device won't be used. > > If a device is UAS-capable and the kernel was built with UAS support, > then the appropriate driver is uas. In fact, there is a special check > inside usb-storage for precisely this situation: > > /* 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 > > There are some special cases embedded in the uas_use_uas_driver() > routine. For instance, if the US_FL_IGNORE_UAS quirk flag is set then > uas_use_uas_driver() will return 0, and then usb-storage will bind to > the device. > > But assuming none of the special cases apply, if the uas driver was > built as a module and the module can't be loaded then the binding to > uas will fail. As a result, the device will not be used. > > Alan Stern > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html