Reporting a completion via usb_complete() will pass control outside the scope of xhci.c, and could potentially result in a further call to xhci_event_poll() before returning from usb_complete(). Since we currently update the event consumer counter only after calling usb_complete(), this can result in duplicate completions and consequent corruption of the submission TRB ring structures. Fix by updating the event ring consumer counter before passing control to usb_complete(). Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Tested-by: Andreas Hammarskjöld <junior@2PintSoftware.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
1711 |
|
1711 |
|
1712 |
|
1712 |
|
1713 |
|
1713 |
|
|
1714 |
|
|
|
1715 |
|
|
|
1716 |
|
|
1714 |
|
1717 |
|
1715 |
|
1718 |
|
1716 |
|
1719 |
|
|
|
||
1733 |
|
1736 |
|
1734 |
|
1737 |
|
1735 |
|
1738 |
|
1736 |
|
|
|
|
1739 |
|
|
1737 |
|
1740 |
|
1738 |
|
1741 |
|
1739 |
|
1742 |
|
1740 |
|
1743 |
|
1741 |
|
|
|
1742 |
|
|
|
1743 |
|
|
|
1744 |
|
1744 |
|
1745 |
|
1745 |
|
1746 |
|
1746 |
|