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