Date: Tue, 20 Jul 2004 00:45:08 +0100 From: Ian Dowse <iedowse@maths.tcd.ie> To: "M. Warner Losh" <imp@bsdimp.com> Cc: mycroft@netbsd.org Subject: Re: Unloading USB driver while device is attached. Message-ID: <200407200045.aa99979@salmon.maths.tcd.ie> In-Reply-To: Your message of "Mon, 19 Jul 2004 17:01:32 MDT." <20040719.170132.52458790.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20040719.170132.52458790.imp@bsdimp.com>, "M. Warner Losh" writes: >In message: <200407191950.aa12733@salmon.maths.tcd.ie> > Ian Dowse <iedowse@maths.tcd.ie> writes: >: http://people.freebsd.org/~iedowse/usb.diff >: >: but unfortunately I haven't had time to work on this lately (and >: there are all the problems of divergence from NetBSD etc. if bits >: of this get committed). The (small) uhub.c changes look like they >: might possibly help in your case. With the full patch I was able >: to `kldunload usb' without crashes a while ago, but there were still >: memory leaks. > >I'm going to start merging in some of these changes, if you don't >mind. If you have the time that would be great! FYI, here is a rough summary of the changes in no particular order: o Beginnings of interrupt pipe support for EHCI (very little done) o Support for unloading the usb driver (leaks some memory) o Support for removing cardbus USB controllers (also leaks memory) o Avoid most (but not all) uses of contigmalloc and data buffer copies by using bus_dmamap_load() and a new `struct usb_dma_mapping'. A few places marked `XXX' need to be checked for crossing DMA segment boundaries. This is probably the most important change, as it makes USB work much more reliably on low memory machines. o Attempt to follow the correct procedure for synchronising with the BIOS via SMM to take over control of the EHCI controller. This may fix problems when the BIOS is configured to emulate legacy devices, but is untested on any affected machines. o Try to make transfers reusable from the completion callback (some related changes went into NetBSD recently, but I haven't checked the overlap). There are probably a few other changes in there too - let me know if you find any stuff that doesn't make sense. Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407200045.aa99979>