Date: Sun, 7 Jul 2019 20:27:18 +0200 From: Hans Petter Selasky <hps@selasky.org> To: sgk@troutmask.apl.washington.edu Cc: Ian Lepore <ian@freebsd.org>, freebsd-current@freebsd.org, takawata@freebsd.org Subject: Re: Someone broke USB Message-ID: <99a61cc8-495f-a333-b4bc-46fc929bae37@selasky.org> In-Reply-To: <025dfdc1-b2d2-ef88-c2d6-32d8f3620a9d@selasky.org> References: <20190706182301.GA45149@troutmask.apl.washington.edu> <770bc251-7d0f-d56f-6b86-89245b79945f@selasky.org> <20190706194124.GA45536@troutmask.apl.washington.edu> <8ccf4066-7edc-e8c3-d669-16f649ec03c2@selasky.org> <20190706210613.GA45709@troutmask.apl.washington.edu> <4d866257df0aa0a671973555b4a9a0eb27088d5c.camel@freebsd.org> <20190706231453.GA46470@troutmask.apl.washington.edu> <20190707080510.GA48223@troutmask.apl.washington.edu> <ff363616-37e2-8a90-7b3a-9eb18c51ba82@selasky.org> <20190707165429.GA50543@troutmask.apl.washington.edu> <025dfdc1-b2d2-ef88-c2d6-32d8f3620a9d@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-07-07 18:58, Hans Petter Selasky wrote:
> On 2019-07-07 18:54, Steve Kargl wrote:
>> This a 7720 line, 262KB file, do you want me to send it
>> to you in private email or put in my home directory on
>> freefall (i.e.,kargl@freefall.freebsd.org).
>
> Send it to the people CC'ed, except the list.
>
Hi,
I'm wondering if there is a race by default, that wee need to explore
the root HUBs in a certain order?
Can you try to reverse the order in usb_needs_explore_all() in
sys/dev/usb and put a pause("W", hz); call between each iteration?
--HPS
> void
> usb_needs_explore_all(void)
> {
> struct usb_bus *bus;
> devclass_t dc;
> device_t dev;
> int max;
>
> DPRINTFN(3, "\n");
>
> dc = usb_devclass_ptr;
> if (dc == NULL) {
> DPRINTFN(0, "no devclass\n");
> return;
> }
> /*
> * Explore all USB buses in parallel.
> */
> max = devclass_get_maxunit(dc);
> while (max >= 0) {
> dev = devclass_get_device(dc, max);
> if (dev) {
> bus = device_get_softc(dev);
> if (bus) {
> usb_needs_explore(bus, 1);
> }
> }
> max--;
> }
> }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99a61cc8-495f-a333-b4bc-46fc929bae37>
