Date: Wed, 11 Mar 2020 08:21:05 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358874 - in stable/11/sys/dev/usb: . controller Message-ID: <202003110821.02B8L5pC058849@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Mar 11 08:21:04 2020 New Revision: 358874 URL: https://svnweb.freebsd.org/changeset/base/358874 Log: MFC r358738: Remove the power bit from the super speed root hub port status register because it clobbers the super speed link status when a device is in super speed mode. Currently the power bit is not needed for anything in the USB hub driver. This fixes USB warm reset for super speed devices. Tested by: Shichun.Ma@dell.com Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/controller/xhci.c stable/11/sys/dev/usb/usb_hub.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci.c Wed Mar 11 08:20:14 2020 (r358873) +++ stable/11/sys/dev/usb/controller/xhci.c Wed Mar 11 08:21:04 2020 (r358874) @@ -3588,13 +3588,10 @@ xhci_roothub_exec(struct usb_device *udev, i |= UPS_OVERCURRENT_INDICATOR; if (v & XHCI_PS_PR) i |= UPS_RESET; - if (v & XHCI_PS_PP) { - /* - * The USB 3.0 RH is using the - * USB 2.0's power bit - */ - i |= UPS_PORT_POWER; - } +#if 0 + if (v & XHCI_PS_PP) + /* XXX undefined */ +#endif USETW(sc->sc_hub_desc.ps.wPortStatus, i); i = 0; Modified: stable/11/sys/dev/usb/usb_hub.c ============================================================================== --- stable/11/sys/dev/usb/usb_hub.c Wed Mar 11 08:20:14 2020 (r358873) +++ stable/11/sys/dev/usb/usb_hub.c Wed Mar 11 08:21:04 2020 (r358874) @@ -689,7 +689,7 @@ repeat: break; case USB_SPEED_SUPER: if (udev->parent_hub == NULL) - power_mask = UPS_PORT_POWER; + power_mask = 0; /* XXX undefined */ else power_mask = UPS_PORT_POWER_SS; break; @@ -697,7 +697,7 @@ repeat: power_mask = 0; break; } - if (!(sc->sc_st.port_status & power_mask)) { + if ((sc->sc_st.port_status & power_mask) != power_mask) { DPRINTF("WARNING: strange, connected port %d " "has no power\n", portno); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003110821.02B8L5pC058849>