devusb: superspeed bandwidth allocation handled by controller, skip usbload() calculation

with xhci, bandwidth allocations are handled by the controller
and there are various speed settings possible that currently
not exposed in the Udev. so just keep usbload() as it is for
usb2 and keep ep->load as zero for superspeed.
This commit is contained in:
cinap_lenrek 2017-08-11 01:08:13 +02:00
parent 153793714e
commit 7dab492324

View file

@ -838,7 +838,6 @@ usbload(int speed, int maxpkt)
l = 0;
bs = 10UL * maxpkt;
switch(speed){
case Superspeed:
case Highspeed:
l = 55*8*2 + 2 * (3 + bs) + Hostns;
break;
@ -897,7 +896,7 @@ usbopen(Chan *c, int omode)
error(Enotconf);
ep->clrhalt = 0;
ep->rhrepl = -1;
if(ep->load == 0)
if(ep->load == 0 && ep->dev->speed != Superspeed)
ep->load = usbload(ep->dev->speed, ep->maxpkt);
ep->hp->epopen(ep);