staging: dwc2: optimize dwc2_hc_handle_tt_clear() a bit
Make dwc2_hc_handle_tt_clear() return early if the device is hi-speed. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c9e1c907ff
commit
399fdf9e57
|
@ -89,15 +89,20 @@ static void dwc2_hc_handle_tt_clear(struct dwc2_hsotg *hsotg,
|
||||||
{
|
{
|
||||||
struct urb *usb_urb;
|
struct urb *usb_urb;
|
||||||
|
|
||||||
if (!chan->qh || !qtd->urb)
|
if (!chan->qh)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (chan->qh->dev_speed == USB_SPEED_HIGH)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!qtd->urb)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
usb_urb = qtd->urb->priv;
|
usb_urb = qtd->urb->priv;
|
||||||
if (!usb_urb || !usb_urb->dev)
|
if (!usb_urb || !usb_urb->dev || !usb_urb->dev->tt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (chan->qh->dev_speed != USB_SPEED_HIGH &&
|
if (qtd->urb->status != -EPIPE && qtd->urb->status != -EREMOTEIO) {
|
||||||
qtd->urb->status != -EPIPE && qtd->urb->status != -EREMOTEIO) {
|
|
||||||
chan->qh->tt_buffer_dirty = 1;
|
chan->qh->tt_buffer_dirty = 1;
|
||||||
if (usb_hub_clear_tt_buffer(usb_urb))
|
if (usb_hub_clear_tt_buffer(usb_urb))
|
||||||
/* Clear failed; let's hope things work anyway */
|
/* Clear failed; let's hope things work anyway */
|
||||||
|
|
Loading…
Reference in New Issue