Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion drivers/usb/gadget/function/f_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,17 @@ static enum hrtimer_restart ncm_tx_timeout(struct hrtimer *data)
*
* This will call directly into u_ether's eth_start_xmit()
*/
netdev->netdev_ops->ndo_start_xmit(NULL, netdev);
if (netdev->netdev_ops->ndo_start_xmit(NULL, netdev) == NETDEV_TX_BUSY &&
!ncm->port.is_suspend) {
/*
* All IN requests are in flight, so the pending NTB
* was not sent. The timer is only started for a new
* NTB, so nothing would send this one until it fills
* up: try again after another timeout.
*/
hrtimer_forward_now(data, TX_TIMEOUT_NSECS);
return HRTIMER_RESTART;
}
}
return HRTIMER_NORESTART;
}
Expand Down