git: 9front

Download patch

ref: 96b205aff56ce62b9d8c79d0bf2e518801c421e2
parent: 3e482eed4003685fccde1a453c673f52d3e87320
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 */
 };
 
--