From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] USB isochronous endpoint with feedback
Date: Wed, 10 Feb 2021 20:10:49 +0100 [thread overview]
Message-ID: <3B1469EE2DD79F42095548A2DBAAD554@felloff.net> (raw)
In-Reply-To: <C016A9C7EB8B270313CD4BB2FB7FFC2C@arrow.hsd1.ca.comcast.net>
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
next prev parent reply other threads:[~2021-02-10 19:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 2:02 Michael Forney
2021-02-09 2:31 ` cinap_lenrek
2021-02-10 19:10 ` cinap_lenrek [this message]
2021-02-10 20:55 ` Michael Forney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B1469EE2DD79F42095548A2DBAAD554@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).