Re: device attached to USB 3.0 hub port doesn't respond address device command after resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Feb 2012, Elric Fu wrote:

> @@ -709,6 +709,16 @@ static void hub_activate(struct usb_hub *hub,
> enum hub_activation_type type)
>  	 * For any other type of activation, turn it on.
>  	 */

You need to update this comment to match the new code.

>  	if (type != HUB_RESUME) {
> +                if (hdev->parent && hub_is_superspeed(hdev) &&
> +                                hdev->state == USB_STATE_CONFIGURED) {

The hdev->state test isn't needed.  This code doesn't run if the state
isn't USB_STATE_CONFIGURED.

> +                        ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
> +                                        HUB_SET_DEPTH, USB_RT_HUB,
> +                                        hdev->level - 1, 0, NULL, 0,
> +                                        USB_CTRL_SET_TIMEOUT);
> +                        if (ret < 0)
> +                                dev_err(hub->intfdev,
> +                                        "set hub depth failed\n");
> +                }

Otherwise okay.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux