Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7f9696b authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

xhci: xhci_ring_device: Ring stream ring bells for endpoints with streams

parent 14e61a1b
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -319,12 +319,19 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
 */
 */
void xhci_ring_device(struct xhci_hcd *xhci, int slot_id)
void xhci_ring_device(struct xhci_hcd *xhci, int slot_id)
{
{
	int i;
	int i, s;
	struct xhci_virt_ep *ep;

	for (i = 0; i < LAST_EP_INDEX + 1; i++) {
		ep = &xhci->devs[slot_id]->eps[i];


	for (i = 0; i < LAST_EP_INDEX + 1; i++)
		if (ep->ep_state & EP_HAS_STREAMS) {
		if (xhci->devs[slot_id]->eps[i].ring &&
			for (s = 1; s < ep->stream_info->num_streams; s++)
		    xhci->devs[slot_id]->eps[i].ring->dequeue)
				xhci_ring_ep_doorbell(xhci, slot_id, i, s);
		} else if (ep->ring && ep->ring->dequeue) {
			xhci_ring_ep_doorbell(xhci, slot_id, i, 0);
			xhci_ring_ep_doorbell(xhci, slot_id, i, 0);
		}
	}


	return;
	return;
}
}