提交 43508be5 编写于 作者: H Hans de Goede 提交者: Greg Kroah-Hartman

uas: Log a warning when we cannot use uas because the hcd lacks streams

So that an user who wants to use uas can see why he is not getting uas.

Also move the check down so that we don't warn if there are other reasons
why uas cannot work.
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 cc4deafc
...@@ -64,9 +64,6 @@ static int uas_use_uas_driver(struct usb_interface *intf, ...@@ -64,9 +64,6 @@ static int uas_use_uas_driver(struct usb_interface *intf,
if (flags & US_FL_IGNORE_UAS) if (flags & US_FL_IGNORE_UAS)
return 0; return 0;
if (udev->speed >= USB_SPEED_SUPER && !hcd->can_do_streams)
return 0;
alt = uas_find_uas_alt_setting(intf); alt = uas_find_uas_alt_setting(intf);
if (alt < 0) if (alt < 0)
return 0; return 0;
...@@ -84,5 +81,14 @@ static int uas_use_uas_driver(struct usb_interface *intf, ...@@ -84,5 +81,14 @@ static int uas_use_uas_driver(struct usb_interface *intf,
return 0; return 0;
} }
if (udev->speed >= USB_SPEED_SUPER && !hcd->can_do_streams) {
dev_warn(&udev->dev,
"USB controller %s does not support streams, which are required by the UAS driver.\n",
hcd_to_bus(hcd)->bus_name);
dev_warn(&udev->dev,
"Please try an other USB controller if you wish to use UAS.\n");
return 0;
}
return 1; return 1;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册