]> git.baikalelectronics.ru Git - kernel.git/commit
USB: atmel_usba_udc fixes, mostly disconnect()
authorDavid Brownell <david-b@pacbell.net>
Sun, 11 May 2008 05:46:38 +0000 (22:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 14 May 2008 17:00:30 +0000 (10:00 -0700)
commit9da027ae8b6cee6d8172ef0949f49ad2f52215eb
tree5e021454bd6027ad7289b6a7cc206ee95386f3e5
parent58ee44b26265867c4dc3b924ca5a88bf91936a6f
USB: atmel_usba_udc fixes, mostly disconnect()

Various fixes to Atmel's high speed UDC driver.

  * Issue some missing disconnect() calls.  Currently they are only made
    when VBUS power goes away (on boards where the driver can sense such
    changes), but that's not enough for gadget drivers to clean out all
    the state that's needed.  Missing calls were:

      - After USB reset, before starting enumeration.
      - When unregistering a gadget driver, before unbind().

  * Don't assume gadget drivers provide disconnect callbacks; make sure
    to not call through a null pointer!

  * When the driver doesn't provide an unbind() callback, refuse to
    unregister it.

Also remove two bogus "error" messages:

  * Related to mis-handling of disconnect() ... don't emit error messages
    for disconnect() handlers that disable endpoints.  All of them should
    be doing that; the problem is (unfixed) oddness in atmel_usba_udc.

  * Don't emit a diagnostic for a curious and transient nonfatal error
    that shows up sometimes with EP0.

Those messages spammed syslog, for no good reason.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/atmel_usba_udc.c