~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/usb/core/hub.c

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2012-03-04 15:32:20 UTC
  • mto: (43.1.29 sid)
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20120304153220-z43emb9b8y0vpuf2
Tags: upstream-3.2.9
ImportĀ upstreamĀ versionĀ 3.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
705
705
        if (type == HUB_INIT3)
706
706
                goto init3;
707
707
 
708
 
        /* After a resume, port power should still be on.
 
708
        /* The superspeed hub except for root hub has to use Hub Depth
 
709
         * value as an offset into the route string to locate the bits
 
710
         * it uses to determine the downstream port number. So hub driver
 
711
         * should send a set hub depth request to superspeed hub after
 
712
         * the superspeed hub is set configuration in initialization or
 
713
         * reset procedure.
 
714
         *
 
715
         * After a resume, port power should still be on.
709
716
         * For any other type of activation, turn it on.
710
717
         */
711
718
        if (type != HUB_RESUME) {
 
719
                if (hdev->parent && hub_is_superspeed(hdev)) {
 
720
                        ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
 
721
                                        HUB_SET_DEPTH, USB_RT_HUB,
 
722
                                        hdev->level - 1, 0, NULL, 0,
 
723
                                        USB_CTRL_SET_TIMEOUT);
 
724
                        if (ret < 0)
 
725
                                dev_err(hub->intfdev,
 
726
                                                "set hub depth failed\n");
 
727
                }
712
728
 
713
729
                /* Speed up system boot by using a delayed_work for the
714
730
                 * hub's initial power-up delays.  This is pretty awkward
987
1003
                goto fail;
988
1004
        }
989
1005
 
990
 
        if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) {
991
 
                ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
992
 
                                HUB_SET_DEPTH, USB_RT_HUB,
993
 
                                hdev->level - 1, 0, NULL, 0,
994
 
                                USB_CTRL_SET_TIMEOUT);
995
 
 
996
 
                if (ret < 0) {
997
 
                        message = "can't set hub depth";
998
 
                        goto fail;
999
 
                }
1000
 
        }
1001
 
 
1002
1006
        /* Request the entire hub descriptor.
1003
1007
         * hub->descriptor can handle USB_MAXCHILDREN ports,
1004
1008
         * but the hub can/will return fewer bytes here.