shithub: riscv

Download patch

ref: a2d8dcfd8235547ca1e14dcca42de70e06a0ec96
parent: 56405e091963c8b2dc9d71aa624e33c582102949
author: aiju <devnull@localhost>
date: Wed Mar 7 05:04:27 EST 2018

usb lib: add maxpkt and ntds to Altc struct

--- a/sys/src/cmd/nusb/lib/parse.c
+++ b/sys/src/cmd/nusb/lib/parse.c
@@ -145,6 +145,8 @@
 	ep->maxpkt = GET2(dep->wMaxPacketSize);
 	ep->ntds = 1 + ((ep->maxpkt >> 11) & 3);
 	ep->maxpkt &= 0x7FF;
+	altc->maxpkt = ep->maxpkt;
+	altc->ntds = ep->ntds;
 	ep->addr = addr;
 	ep->type = type;
 	ep->isotype = (dep->bmAttributes>>2) & 0x03;
--- a/sys/src/cmd/nusb/lib/usb.h
+++ b/sys/src/cmd/nusb/lib/usb.h
@@ -221,6 +221,8 @@
 {
 	int	attrib;
 	int	interval;
+	int	maxpkt;
+	int	ntds;
 	void*	aux;		/* for the driver program */
 };