]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/usb/host/ehci-hcd.c
USB: ehci tdi : let's tdi_reset set host mode
authorMatthieu CASTET <matthieu.castet@parrot.com>
Mon, 6 Sep 2010 16:26:56 +0000 (18:26 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:21:29 +0000 (10:21 -0700)
commit65fd42724aee31018b0bb53f4cb04971423be664
tree54fa9d5551875be65d979ea34d58e8313461d6f5
parenteabf0f5f09b1f1538d22c14aa0a703c11791bd1e
USB: ehci tdi : let's tdi_reset set host mode

tdi_reset is already taking care of setting host mode for tdi devices.
Don't duplicate code in platform driver.

Make ehci_halt a nop if the controller is not in host mode (otherwise it
will fail), and let's ehci_reset do the tdi_reset.
We need to move hcd->has_tt flags before ehci_halt, in order ehci_halt
knows we are a tdi device.

Before the setup routine was doing :
- put controller in host mode
- ehci_halt
- ehci_init
- hcd->has_tt = 1;
- ehci_reset

Now we do :
- hcd->has_tt = 1;
- ehci_halt
- ehci_init
- ehci_reset

PS : now we handle correctly the device -> host transition.

Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-fsl.h
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-mxc.c