Lines Matching refs:port

640 int ms_hub_port_status(struct usb_device *ms_dev, int port,  in ms_hub_port_status()  argument
648 USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port+1, in ms_hub_port_status()
649 &hub->status.port, sizeof(hub->status.port), HZ * USB_CTRL_GET_TIMEOUT); in ms_hub_port_status()
656 *status_r = hub->status.port.wPortStatus; in ms_hub_port_status()
657 *change_r = hub->status.port.wPortChange; in ms_hub_port_status()
673 static int ms_hub_port_wait_reset(struct usb_device *hub, int port, in ms_hub_port_wait_reset() argument
684 s32Ret = ms_hub_port_status(hub, port, &u16Portstatus, &u16Portchange); in ms_hub_port_wait_reset()
715 ms_usbhost_debug ("port %d not reset yet, waiting %dms\n", port + 1, delay); in ms_hub_port_wait_reset()
731 static int ms_hub_port_reset(struct usb_device *hub, int port, in ms_hub_port_reset() argument
755 USB_REQ_SET_FEATURE, USB_RT_PORT, USB_PORT_FEAT_RESET, port+1, NULL, 0, HZ); in ms_hub_port_reset()
757 status = ms_hub_port_wait_reset(hub, port, ms_dev, delay); in ms_hub_port_reset()
763 USB_REQ_CLEAR_FEATURE, USB_RT_PORT, USB_PORT_FEAT_C_RESET, port+1, NULL, 0, HZ); in ms_hub_port_reset()
770 ms_usbhost_debug("port %d not enabled, trying reset again...\n", port + 1); in ms_hub_port_reset()
774 ms_usbhost_err("Cannot enable port %d. Maybe the USB cable is bad?\n", port + 1); in ms_hub_port_reset()
787 int ms_hub_port_disable(struct usb_device *hub, int port) in ms_hub_port_disable() argument
793 USB_REQ_CLEAR_FEATURE, USB_RT_PORT, USB_PORT_FEAT_ENABLE, port+1, NULL, 0, HZ); in ms_hub_port_disable()
796 ms_usbhost_err("cannot disable port %d (err = %d)\n", port + 1, (int)s32Err); in ms_hub_port_disable()
839 static int ms_hub_port_debounce(struct usb_device *hub, int port) in ms_hub_port_debounce() argument
852 s32Err = ms_hub_port_status(hub, port, &u16Portstatus, &u16Portchange); in ms_hub_port_debounce()
874 … USB_REQ_CLEAR_FEATURE, USB_RT_PORT, USB_PORT_FEAT_C_CONNECTION, port+1, NULL, 0, HZ); in ms_hub_port_debounce()
879 port + 1, s32Dtime, s32Stable_count, u16Portstatus); in ms_hub_port_debounce()
895 struct usb_hub *hubstate, int port, U16 portstatus, U16 portchange) in ms_hub_port_connect_change() argument
907 port+1, portstatus, portchange); in ms_hub_port_connect_change()
928 if (pHub->children[port]) in ms_hub_port_connect_change()
929 ms_usb_disconnect(&pHub->children[port]); in ms_hub_port_connect_change()
934 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()
941 if (ms_hub_port_debounce(pHub, port)) in ms_hub_port_connect_change()
944 port+1); in ms_hub_port_connect_change()
945 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()
965 pHub->children[port] = pUdev; in ms_hub_port_connect_change()
983 if (ms_hub_port_reset(pHub, port, pUdev, u32Delay)) { in ms_hub_port_connect_change()
1016 pUdev->u32TTPort = port + 1; in ms_hub_port_connect_change()
1021 len = USB_sprintf (pUdev->devpath,"%s.%d", pdev->devpath, port + 1); in ms_hub_port_connect_change()
1023 len = USB_sprintf (pUdev->devpath,"%d", port + 1); in ms_hub_port_connect_change()
1038 ms_hub_port_disable(pHub, port); // patch from Linux code in ms_hub_port_connect_change()
1065 pHub->children[port] = NULL; in ms_hub_port_connect_change()
1066 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()
1122 S32 i, s32Err, port = -1; in ms_usb_physical_reset_device() local
1133 port = i; in ms_usb_physical_reset_device()
1137 if (port < 0) in ms_usb_physical_reset_device()
1147 s32Err = ms_hub_port_reset(parent, port, ms_dev, HUB_SHORT_RESET_TIME); in ms_usb_physical_reset_device()
1150 …ms_usbhost_err("hub port[%d] reset fail, to disable the port (error=%d)\n", (int)port, (int)s32Err… in ms_usb_physical_reset_device()
1151 ms_hub_port_disable(parent, port); in ms_usb_physical_reset_device()
1161 ms_hub_port_disable(parent, port); in ms_usb_physical_reset_device()