Re: Unloading USB driver while device is attached.

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 07/20/04

  • Next message: Daniel O'Connor: "Re: Excellent job on the firewire support!"
    Date: Mon, 19 Jul 2004 19:50:56 -0600 (MDT)
    To: iedowse@maths.tcd.ie
    
    

    In message: <200407200045.aa99979@salmon.maths.tcd.ie>
                Ian Dowse <iedowse@maths.tcd.ie> writes:
    : 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)

    cool.

    : o Support for unloading the usb driver (leaks some memory)
    : o Support for removing cardbus USB controllers (also leaks memory)

    These are my biggest goals of the moment.

    : 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.

    This would be nice.

    : 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.

    Docs on how to do this? I've not seen this info...

    : o Try to make transfers reusable from the completion callback (some
    : related changes went into NetBSD recently, but I haven't checked
    : the overlap).

    I saw that.

    : There are probably a few other changes in there too - let me know if
    : you find any stuff that doesn't make sense.

    OK. Will do.

    I think we need to look at radically updating the way we do
    compatibility between the different systems that the usb code runs
    on. But that's a good way to freak people out by saying such things
    in public :-)

    Warner
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Daniel O'Connor: "Re: Excellent job on the firewire support!"

    Relevant Pages

    • Re: XU1541 and more USB stuff
      ... memory. ... coming along nicely this week (FAT12/16/32/LFN support working for read ... for significantly more buffering reducing the overhead of the USB ... lots of flash and ram. ...
      (comp.sys.cbm)
    • Re: Unloading USB driver while device is attached.
      ... to `kldunload usb' without crashes a while ago, ... o Beginnings of interrupt pipe support for EHCI ... o Support for unloading the usb driver (leaks some memory) ... o Support for removing cardbus USB controllers ...
      (freebsd-current)
    • lock order reversal: devel/dbus causes a lock order reversal when it is started.
      ... # RAID controllers interfaced to the SCSI subsystem ... # PCMCIA and cardbus bridge support ... # PCI Ethernet NICs that use the common MII bus controller code. ... # USB Serial devices ...
      (freebsd-current)
    • Re: usb drive question
      ... i have a usb 2.0 memory stick with files i would like to put on the ... remove hardware" search with mem stick plugged in hoping laptop would ... I thought WIN95 didn't support USB2.0. ...
      (alt.sys.pc-clone.dell)
    • Re: OpenVMS Rolling Roadmaps (23-Oct-2003) and DCPS
      ... needed were changes in DCPS to take advantage of the driver. ... bad news is that all of these controllers are now at or near end of life. ... for the USB 1.1 part of the Philips ISP 1561 controller chip, ... still a ways out to add USB 2.0 support. ...
      (comp.os.vms)