From: "adr via 9fans" <9fans@9fans.net>
To: 9fans@9fans.net
Subject: [9fans] Re: Miller's 9pi image (rpi4) problems
Date: Sun, 13 Jun 2021 17:22:21 +0000 [thread overview]
Message-ID: <YMY+zdzIpnrEXyS0@SDF.ORG> (raw)
In-Reply-To: <YMJhD8yRXYqw1Hvg@SDF.ORG>
> The biggest problem to me is the usb code.
>
> First I'm using a kvm switch so there are a lot of attachments-detachments.
> At a certain point it will end with "No slots available" and the
> usb will became unusable. For me is a labyrinth, but I'm pretty sure
> someone with more experience with the system could fix it.
I found how 9front fixed this:
--- /n/sources/contrib/miller/9/bcm/devusb.c Wed Sep 18 16:02:39 2019
+++ devusb.c Sun Jun 13 16:21:28 2021
@@ -389,6 +389,10 @@
if(ep->ep0 != ep){
putep(ep->ep0);
ep->ep0 = nil;
+ } else if(d != nil){
+ if(d->free != nil)
+ (*d->free)(d->aux);
+ free(d);
}
free(ep->info);
free(ep->name);
I can't understand the code yet, but my impression is that the
original intention was to not free the slot by default when a device
is detached, not allocate a new one if the same device is reconnected
but reused the old one, and free the unused slots when some time
has passed or if there is no one available. But what the code is
doing is allocating a new slot every time a new device is attached
and what this hack does is free the corresponded slot every time
a device is detached.
Regards,
adr.
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tc5dcd85d69518168-M5713a1f8ec63663d9aeae58e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription
next prev parent reply other threads:[~2021-06-13 17:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 18:59 [9fans] " adr via 9fans
2021-06-11 9:05 ` Richard Miller
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 ` adr via 9fans [this message]
2021-06-17 15:05 ` 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=YMY+zdzIpnrEXyS0@SDF.ORG \
--to=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).