Deleted Added
full compact
1c1
< /* $FreeBSD: head/sys/dev/usb/usb_request.c 230032 2012-01-12 21:21:20Z hselasky $ */
---
> /* $FreeBSD: head/sys/dev/usb/usb_request.c 230091 2012-01-13 22:26:13Z hselasky $ */
787a788,789
> uint16_t status;
> uint16_t change;
793a796,798
>
> DPRINTF("\n");
>
820,822d824
< uint16_t status;
< uint16_t change;
<
833c835
< if (err) {
---
> if (err)
835c837
< }
---
>
865c867
< if (err) {
---
> if (err)
867c869
< }
---
>
901c903,904
< usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port)
---
> usbd_req_warm_reset_port(struct usb_device *udev, struct mtx *mtx,
> uint8_t port)
905a909,910
> uint16_t status;
> uint16_t change;
912,913c917,921
< err = usbd_req_set_port_feature(udev, mtx, port, UHF_BH_PORT_RESET);
< if (err) {
---
>
> DPRINTF("\n");
>
> err = usbd_req_get_port_status(udev, mtx, &ps, port);
> if (err)
914a923,934
>
> status = UGETW(ps.wPortStatus);
>
> switch (UPS_PORT_LINK_STATE_GET(status)) {
> case UPS_PORT_LS_U3:
> case UPS_PORT_LS_COMP_MODE:
> case UPS_PORT_LS_LOOPBACK:
> case UPS_PORT_LS_SS_INA:
> break;
> default:
> DPRINTF("Wrong state for warm reset\n");
> return (0);
915a936,946
>
> /* clear any leftover warm port reset changes first */
> usbd_req_clear_port_feature(udev, mtx,
> port, UHF_C_BH_PORT_RESET);
>
> /* set warm port reset */
> err = usbd_req_set_port_feature(udev, mtx,
> port, UHF_BH_PORT_RESET);
> if (err)
> goto done;
>
941c972
< if (err) {
---
> if (err)
943c974,977
< }
---
>
> status = UGETW(ps.wPortStatus);
> change = UGETW(ps.wPortChange);
>
945c979
< if (!(UGETW(ps.wPortStatus) & UPS_CURRENT_CONNECT_STATUS)) {
---
> if (!(status & UPS_CURRENT_CONNECT_STATUS))
947c981
< }
---
>
949c983
< if (UGETW(ps.wPortChange) & UPS_C_BH_PORT_RESET) {
---
> if (change & UPS_C_BH_PORT_RESET)
951c985
< }
---
>
962c996
< if (err) {
---
> if (err)
964c998
< }
---
>
2006a2041,2044
> /* Try to warm reset first */
> if (parent_hub->speed == USB_SPEED_SUPER)
> usbd_req_warm_reset_port(parent_hub, mtx, udev->port_no);
>