storage: accept some UAS devices if streams are unavailable
On some older XHCIs streams are not supported and the UAS driver will fail at probe time. For those devices storage should try to bind to UAS devices. This patch adds a flag for stream support to HCDs and evaluates it. [Note: Sarah fixed a bug where the USB 2.0 root hub, not USB 3.0 root hub would get marked as being able to support streams.] Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
21d0e51bfb
commit
14aec58932
|
@ -222,6 +222,9 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||||
goto put_usb3_hcd;
|
goto put_usb3_hcd;
|
||||||
/* Roothub already marked as USB 3.0 speed */
|
/* Roothub already marked as USB 3.0 speed */
|
||||||
|
|
||||||
|
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
||||||
|
xhci->shared_hcd->can_do_streams = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
put_usb3_hcd:
|
put_usb3_hcd:
|
||||||
|
|
|
@ -158,6 +158,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
||||||
*/
|
*/
|
||||||
*((struct xhci_hcd **) xhci->shared_hcd->hcd_priv) = xhci;
|
*((struct xhci_hcd **) xhci->shared_hcd->hcd_priv) = xhci;
|
||||||
|
|
||||||
|
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
||||||
|
xhci->shared_hcd->can_do_streams = 1;
|
||||||
|
|
||||||
ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
|
ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto put_usb3_hcd;
|
goto put_usb3_hcd;
|
||||||
|
|
|
@ -72,6 +72,7 @@ static int uas_use_uas_driver(struct usb_interface *intf,
|
||||||
{
|
{
|
||||||
struct usb_host_endpoint *eps[4] = { };
|
struct usb_host_endpoint *eps[4] = { };
|
||||||
struct usb_device *udev = interface_to_usbdev(intf);
|
struct usb_device *udev = interface_to_usbdev(intf);
|
||||||
|
struct usb_hcd *hcd = bus_to_hcd(udev->bus);
|
||||||
unsigned long flags = id->driver_info;
|
unsigned long flags = id->driver_info;
|
||||||
int r, alt;
|
int r, alt;
|
||||||
|
|
||||||
|
@ -80,6 +81,9 @@ 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;
|
||||||
|
|
|
@ -143,6 +143,7 @@ struct usb_hcd {
|
||||||
unsigned authorized_default:1;
|
unsigned authorized_default:1;
|
||||||
unsigned has_tt:1; /* Integrated TT in root hub */
|
unsigned has_tt:1; /* Integrated TT in root hub */
|
||||||
unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */
|
unsigned amd_resume_bug:1; /* AMD remote wakeup quirk */
|
||||||
|
unsigned can_do_streams:1; /* HC supports streams */
|
||||||
|
|
||||||
unsigned int irq; /* irq allocated */
|
unsigned int irq; /* irq allocated */
|
||||||
void __iomem *regs; /* device memory/io */
|
void __iomem *regs; /* device memory/io */
|
||||||
|
|
Loading…
Reference in a new issue