Skip to content
Commit 40517707 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Acked-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5a59bc54
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment