From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3831 invoked from network); 10 Feb 2021 19:18:07 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 10 Feb 2021 19:18:07 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Wed Feb 10 14:11:00 -0500 2021 Message-ID: <3B1469EE2DD79F42095548A2DBAAD554@felloff.net> Date: Wed, 10 Feb 2021 20:10:49 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: information hosting reduce/map reduce/map solution Subject: Re: [9front] USB isochronous endpoint with feedback Reply-To: 9front@9front.org Precedence: bulk applied. you forgot to submit the patches for the header with the addition of isousage attribute and the constants. approximated it. thank you very mutch :-) changeset: 8331:09bb715f9ccb tag: tip user: cinap_lenrek@felloff.net date: Wed Feb 10 20:08:13 2021 +0100 summary: nusb: don't create rw iso endpoints (by Michael Forney) diff -r ce38dd881b90 -r 09bb715f9ccb sys/src/cmd/nusb/lib/parse.c --- a/sys/src/cmd/nusb/lib/parse.c Wed Feb 10 19:52:00 2021 +0100 +++ b/sys/src/cmd/nusb/lib/parse.c Wed Feb 10 20:08:13 2021 +0100 @@ -111,8 +111,6 @@ return -1; } dep = (DEp *)b; - altc->attrib = dep->bmAttributes; /* here? */ - altc->interval = dep->bInterval; type = dep->bmAttributes & 0x03; addr = dep->bEndpointAddress; @@ -145,13 +143,18 @@ 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; + ep->isousage = (dep->bmAttributes>>4) & 0x03; ep->conf = c; ep->iface = ip; + if(ep->type != Eiso || ep->isousage == Edata || ep->isousage == Eimplicit){ + altc->attrib = dep->bmAttributes; + altc->interval = dep->bInterval; + altc->maxpkt = ep->maxpkt; + altc->ntds = ep->ntds; + } for(i = 0; i < nelem(ip->ep); i++) if(ip->ep[i] == nil) break; diff -r ce38dd881b90 -r 09bb715f9ccb sys/src/cmd/nusb/lib/usb.h --- a/sys/src/cmd/nusb/lib/usb.h Wed Feb 10 19:52:00 2021 +0100 +++ b/sys/src/cmd/nusb/lib/usb.h Wed Feb 10 20:08:13 2021 +0100 @@ -116,6 +116,11 @@ Eadapt = 2, Esync = 3, + /* endpoint isousage */ + Edata = 0, + Efeedback = 1, + Eimplicit = 2, + /* config attrib */ Cbuspowered = 1<<7, Cselfpowered = 1<<6, @@ -209,7 +214,9 @@ uchar addr; /* endpt address, 0-15 (|0x80 if Ein) */ uchar dir; /* direction, Ein/Eout */ uchar type; /* Econtrol, Eiso, Ebulk, Eintr */ - uchar isotype; /* Eunknown, Easync, Eadapt, Esync */ + uchar isotype; /* Eunknown, Easync, Eadapt, Esync */ + uchar isousage; /* Edata, Efeedback, Eimplicit */ + int id; int maxpkt; /* max. packet size */ int ntds; /* nb. of Tds per µframe */ changeset: 8330:ce38dd881b90 user: cinap_lenrek@felloff.net date: Wed Feb 10 19:52:00 2021 +0100 summary: nusb: don't create rw iso endpoints (by Michael Forney) diff -r 2363b5489377 -r ce38dd881b90 sys/src/cmd/nusb/lib/parse.c --- a/sys/src/cmd/nusb/lib/parse.c Wed Feb 10 10:21:06 2021 -0800 +++ b/sys/src/cmd/nusb/lib/parse.c Wed Feb 10 19:52:00 2021 +0100 @@ -127,7 +127,7 @@ ep = mkep(d, epid); ep->dir = dir; }else if((ep->addr & 0x80) != (addr & 0x80)){ - if(ep->type == type) + if(ep->type == type && type != Eiso) ep->dir = Eboth; else { /* -- cinap