From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] Miller's 9pi image (rpi4) problems
Date: Fri, 11 Jun 2021 10:05:29 +0100 [thread overview]
Message-ID: <6d2862b7d3797bb11f7a6bfe4ec23c28@hamnavoe.com> (raw)
In-Reply-To: <YMJhD8yRXYqw1Hvg@SDF.ORG>
To be pedantic, the troubles you describe are not strictly "9pi image problems",
you will likely find that 4e Plan 9 on any architecture will behave the same.
The usb subsystem is known to be pretty rudimentary, and indeed with respect
to power management /sys/src/cmd/usb/usbd/usbd.c:/^portattach is headed by
this comment:
* BUG: does not consider max. power avail.
Having said that, "It is impossible to use any usb disk" is possibly an
overstatement. Some disks will work, some won't. That's not necessarily
a power management problem. Steve Simon might want to comment here on
his experience with usb3 sata adapters. Some modern disks use the "UASP"
protocol in preference to the traditional bulk-only mass storage protocol
supported by the Plan 9 usbdisk driver. Even if the disk also supports
bulk-only, the existing driver won't try to pick an alternate configuration
to force the disk to fall back to that protocol. Below is a patch (tested on
only one drive, as far as I know) which will make it do that.
As for your reported problem with webfs:
> webfs: tlsClient: fd out of range or not open
what exactly did you do which raised this error? I don't usually use webfs, but
I've just tried it and made a successful tls connection to github with abaco.
--- /n/sources/plan9/sys/src/cmd/usb/lib/parse.c Fri Jan 8 18:00:43 2010
+++ ./parse.c Tue Mar 23 16:19:20 2021
@@ -66,6 +66,11 @@
}
if(c->iface[ifid] == nil)
c->iface[ifid] = emallocz(sizeof(Iface), 1);
+ else{
+ /* hack to avoid unsupported uasp disk interface */
+ if(dip->bInterfaceClass == Clstorage && dip->bInterfaceProtocol != 0x50)
+ return 0;
+ }
ip = c->iface[ifid];
class = dip->bInterfaceClass;
subclass = dip->bInterfaceSubClass;
@@ -164,6 +169,7 @@
Ep *ep;
Altc *altc;
char *hd;
+ int ok;
assert(d != nil && c != nil);
tot = 0;
@@ -174,6 +180,7 @@
if(d->ddesc[nd] == nil)
break;
+ ok = 1;
while(n > 2 && b[0] != 0 && b[0] <= n){
len = b[0];
if(usbdebug>1){
@@ -189,7 +196,7 @@
ddprint(2, "%s\tparsedesc: %r", argv0);
break;
case Diface:
- if(parseiface(d, c, b, n, &ip, &altc) < 0){
+ if((ok = parseiface(d, c, b, n, &ip, &altc)) < 0){
ddprint(2, "%s\tparsedesc: %r\n", argv0);
return -1;
}
@@ -199,6 +206,8 @@
werrstr("unexpected endpoint descriptor");
break;
}
+ if(!ok)
+ break;
if(parseendpt(d, c, ip, altc, b, n, &ep) < 0){
ddprint(2, "%s\tparsedesc: %r\n", argv0);
return -1;
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc5dcd85d69518168-M6dab6711f8f1fe8c3d355322
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
next prev parent reply other threads:[~2021-06-11 9:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 18:59 adr via 9fans
2021-06-11 9:05 ` Richard Miller [this message]
2021-06-11 9:14 ` Richard Miller
2021-06-11 14:38 ` adr via 9fans
2021-06-11 16:00 ` Richard Miller
2021-06-11 16:13 ` adr via 9fans
2021-06-11 16:26 ` Richard Miller
2021-06-11 17:57 ` adr via 9fans
2021-06-11 18:18 ` Richard Miller
2021-06-11 18:50 ` a
2021-06-11 19:10 ` hiro
2021-06-11 21:07 ` adr via 9fans
2021-06-13 17:22 ` [9fans] " adr via 9fans
2021-06-17 15:05 ` [9fans] " Steve Simon
2021-06-17 19:48 ` adr via 9fans
2021-06-19 11:41 ` adr via 9fans
2021-06-19 12:44 ` Richard Miller
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=6d2862b7d3797bb11f7a6bfe4ec23c28@hamnavoe.com \
--to=9fans@hamnavoe.com \
--cc=9fans@9fans.net \
/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).