Commit Graph

5744 Commits

Author SHA1 Message Date
Colin Cross
17a2400a98 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-03-31 17:42:16 -07:00
Venkata (Muni) Anda
db8872556e usb: host: ehci-tegra: Wait for SOF before resume
Wait for Start Of Frame interrupt, then wait 20 us, before starting
port resume.  Workaround for hardware issue that can cause the SOF to
be sent out at the same time as the phy speed change.

Change-Id: I91ccbd2902448e87aa3cdf1970305de22efa1c10
Signed-off-by: Colin Cross <ccross@android.com>
2011-03-29 17:50:19 -07:00
Rebecca Schultz Zavin
c93a3daa85 Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36 2011-03-15 16:51:19 -07:00
Colin Cross
4f72bb8edd Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-03-01 17:26:56 -08:00
Benoit Goby
58570bc0c4 usb: host: Renamed USB_TEGRA_HCD -> USB_EHCI_TEGRA
Change-Id: I2eec79186d6dc258caa2f3c8f3cd071222d1c5c7
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:34 -08:00
Benoit Goby
bca6fceaeb usb: do not force select has_ehci for tegra
Change-Id: If6219a3ba9671a2c4c10b35461e1cc2ffe50ab0a
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:33 -08:00
Benoit Goby
406248bb21 usb: otg: Add ulpi viewport access ops
Add generic access ops for controllers with a ulpi viewport register
(e.g. Chipidea based controller).

Change-Id: I53d50857d4716f8df708af199ad1def1ff9d4beb
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:32 -08:00
Benoit Goby
54463de0ff usb: host: tegra: Cleanup before sending upstream
Change-Id: I846d43b1ecbe6c726f024b6a0fb318d6300a3746
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:31 -08:00
Benoit Goby
79c37f0193 usb: otg: tegra: Moved tegra_usb.h to include/linux/platform_data
Change-Id: I201b6476979f6e1ef8ffadb4398b99a1728f3083
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:30 -08:00
Benoit Goby
adbe9c4871 usb: host: Moved tegra_usb.h to include/linux/platform_data
Change-Id: Ic093d07858eb6e27aae9cd04d4c59407b5b1d76d
Signed-off-by: Benoit Goby <benoit@android.com>
2011-03-01 17:13:29 -08:00
Benoit Goby
730a86cc35 Revert "usb: host: ehci-hcd: add controller_resets_phy quirk"
This reverts commit 2c7d591aa1.

Change-Id: Ic9994dafc424e16d5d8251c287f8be65832b611b
2011-03-01 17:11:56 -08:00
Mike Lockwood
29b2c49152 USB: gadget: f_mtp: dequeue request on error in mtp_read
In mtp_read(), if wait_event_interruptible() returns an error, we need to
remove the request from the EP queue.  Else, on the next call to mtp_read(), we
will attempt to enqueue the request again, potentially corrupting the
queue.  This is what happens with musb_gadget_queue(), which does not check for
duplicate requests.

Based on a similar change to f_adb.c

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-25 20:25:14 -08:00
Rebecca Schultz Zavin
a5856ce006 Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36 2011-02-24 11:47:42 -08:00
Mike Lockwood
70ee83c5d1 USB: gadget: android: Fix problem switching vendor IDs
We need to update the vendor ID in the composite driver as well

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-19 15:24:11 -05:00
Colin Cross
5a7997f3fb Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-02-12 14:13:29 -08:00
Colin Cross
87666eb18a Merge branch 'android-2.6.36' into android-tegra-2.6.36 2011-02-12 14:13:19 -08:00
Mike Lockwood
f35c505ce3 USB: gadget: f_mtp: Don't block in mtp_send_event
We used to wait for the previous interrupt packet to complete before sending
the next packet.  But unfortunately the previous packet will not complete
until USB is disconnected if the host is not listening on the interrupt
endpoint (which is the case with libmtp on Linux and Mac).
To avoid hanging indefinitely in this case, we now simply return -EBUSY
if the previous interrupt packet has not completed yet.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-10 12:21:02 -05:00
Mike Lockwood
99648ea95e USB: gadget: android: Support switching vendor ID when configuration changes
Based on the list of enabled USB functions, we can now switch the vendor ID
as well as the product ID.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-09 13:01:05 -05:00
Robert Morell
da0fbc7f9b USB: ehci: tegra: Align DMA transfers to 32 bytes
The Tegra2 USB controller doesn't properly deal with misaligned DMA
buffers, causing corruption.  This is especially prevalent with USB
network adapters, where skbuff alignment is often in the middle of a
4-byte dword.

To avoid this, allocate a temporary buffer for the DMA if the provided
buffer isn't sufficiently aligned.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
2011-02-08 15:18:24 -08:00
Robert Morell
a0d7774b25 USB: HCD: Add driver hooks for (un)?map_urb_for_dma
Provide optional hooks for the host controller driver to override the
default DMA mapping and unmapping routines.  In general, these shouldn't
be necessary unless the host controller has special DMA requirements,
such as alignment contraints.  If these are not specified, the
general usb_hcd_(un)?map_urb_for_dma functions will be used instead.
Also, pass the status to unmap_urb_for_dma so it can know whether the
DMA buffer has been overwritten.

Finally, add a flag to be used by these implementations if they
allocated a temporary buffer so it can be freed properly when unmapping.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:16 -08:00
Robert Morell
736268d863 USB: HCD: Add usb_hcd prefix to exported functions
The convention is to prefix symbols exported from the USB HCD core with
"usb_hcd".  This change makes unmap_urb_setup_for_dma() and
unmap_urb_for_dma() consistent with that.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:11 -08:00
Mike Lockwood
7fe4e995cc USB: gadget: f_mtp: Fix problems transferring files from device to host
Exit from send_file_work immediately when a cancel request is received.

Only busy status if there is a cancel pending that has not been repoorted to userspace.
This avoids a race condition that can occur when mtp_read resets the state
to STATE_BUSY before we report status OK back to the host.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-07 11:59:43 -05:00
Rebecca Schultz Zavin
ed23bf7bfc Merge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36 2011-01-25 17:56:50 -08:00
Benoit Goby
3f0fad7ec4 usb: host: tegra: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I9977224601e715e950284708958be98d37b3e6b1
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:56 -08:00
Benoit Goby
2418fe42cc usb: gadget: tegra_udc: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I7ad8ebfa2d802f91b81839e14fde906da1a0569e
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:50 -08:00
Colin Cross
52cb8859b6 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-01-21 00:33:14 -08:00
Benoit Goby
66eaaf9564 usb: gadget: tegra: Enable emc clock while usb is connected
Change-Id: Icb94c516a580e29b42b1899e622c9b91f8701dd2
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:42:52 -08:00
Benoit Goby
1b02fb1f5c usb: host: tegra: Enable emc clock while usb is resumed
Change-Id: I03a102f40134686fabbd5cfa1830816a691cf876
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:19:33 -08:00
Rebecca Schultz Zavin
01b536d221 Merge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36 2011-01-18 21:37:12 -08:00
Benoit Goby
ba487c7c5e usb: host: tegra: Fix SetPortFeature PORT_SUSPEND
This fixes a regression where hubs cannot detect new devices once they
have been auto-suspended.

Change-Id: I4b3efcaa9634b9a912060e438527000bbc83dc32
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 19:40:17 -08:00
Benoit Goby
b3328e4c67 usb: host: tegra: Fix resuming low speed devices from lp0
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 17:14:04 -08:00
Colin Cross
61327f2aa0 Merge branch 'android-2.6.36' into android-tegra-2.6.36 2011-01-14 17:32:17 -08:00
Mike Lockwood
cd02d2ba93 USB: gadget: f_mtp: Make sure request is dequeued if transfer is canceled
If the host cancels a file transfer while we have a read request pending,
call usb_ep_dequeue to cancel the read.
Also return -ECANCELED from mtp_ioctl if we are canceled in MTP_RECEIVE_FILE

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-13 16:24:22 -05:00
Colin Cross
b99662a653 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-01-09 19:20:14 -08:00
Jay Cheng
e750de624e usb: ehci: tegra: continues driving FS-J during resume
To prevent USB glitch.
Also only program PTC bits when resume from LP0

Change-Id: Iced668e33f986828d3a483b411055948b5b257e1
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09 17:41:59 -08:00
Jay Cheng
edd66078f5 usb: ehci: tegra: remove reschedule rh_timer
Reschedule rh_timer may cause usb device resume fail, as rh_timer may be
timeout and send USB_REQ_GET_STATUS SETUP control transfer by the time when
the device is handling clear suspend feature, which in turn the device may
drop clear suspend feature request.

Actually on port resume case, the host driver don't need to reschedule
rh_timer to check port status. The host driver will check port status right
after suspend feature is cleared.

Change-Id: I6205e97af49ed4349b6215b851f6b5f1394258d8
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-09 17:21:58 -08:00
Colin Cross
3515161181 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Conflicts:
	arch/arm/mm/cache-v6.S

Change-Id: I1a2063218dd705a762a40f4a9dfe504ce1a1d491
2011-01-07 17:20:53 -08:00
Colin Cross
bd842b53fa Merge commit 'v2.6.36.3' into linux-tegra-2.6.36 2011-01-07 17:14:48 -08:00
Sarah Sharp
e67e86ead8 xhci: Fix issue with port array setup and buggy hosts.
commit f8bbeabc34 upstream.

Fix two bugs with the port array setup.

The first bug will only show up with broken xHCI hosts with Extended
Capabilities registers that have duplicate port speed entries for the same
port.  The idea with the original code was to set the port_array entry to
-1 if the duplicate port speed entry said the port was a different speed
than the original port speed entry.  That would mean that later, the port
would not be exposed to the USB core. Unfortunately, I forgot a continue
statement, and the port_array entry would just be overwritten in the next
line.

The second bug would happen if there are conflicting port speed registers
(so that some entry in port_array is -1), or one of the hardware port
registers was not described in the port speed registers (so that some
entry in port_array is 0).  The code that sets up the usb2_ports array
would accidentally claim those ports.  That wouldn't really cause any
user-visible issues, but it is a bug.

This patch should go into the stable trees that have the port array and
USB 3.0 port disabling prevention patches.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:37 -08:00
Greg Kroah-Hartman
ccb29760fe Revert "USB: gadget: Allow function access to device ID data during bind()"
commit dbb442b85a upstream.

This reverts commit 1ab8323874.

Turns out this doesn't allow for the device ids to be overridden
properly, so we need to revert the thing.

Reported-by: Jef Driesen <jefdriesen@telenet.be>
Cc: Robert Lukassen <Robert.Lukassen@tomtom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:36 -08:00
Vitaly Kuznetsov
91dbc8483e USB: usb-storage: unusual_devs entry for the Samsung YP-CP3
commit d73a9b3001 upstream.

Add an unusual_devs entry for the Samsung YP-CP3 MP4 player.

User was getting the following errors in dmesg:
 usb 2-6: reset high speed USB device using ehci_hcd and address 2
 usb 2-6: reset high speed USB device using ehci_hcd and address 2
 usb 2-6: reset high speed USB device using ehci_hcd and address 2
 usb 2-6: USB disconnect, address 2
 sd 3:0:0:0: [sdb] Assuming drive cache: write through
 sdb:<2>ldm_validate_partition_table(): Disk read failed.
 Dev sdb: unable to read RDB block 0
  unable to read partition table

Signed-off-by: Vitaly Kuznetsov <vitty@altlinux.ru>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:36 -08:00
Florian Faber
11183c5157 USB: ftdi_sio: Add D.O.Tec PID
commit 5363cdc3c5 upstream.

Add FTDI PID to identify D.O.Tec devices correctly.

Signed-off-by: Florian Faber <faberman@linuxproaudio.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:35 -08:00
Thomas Sailer
b38a49cb0d USB: misc: uss720.c: add another vendor/product ID
commit ecc1624a2f upstream.

Fabio Battaglia report that he has another cable that works with this
driver, so this patch adds its vendor/product ID.

Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-07 13:58:35 -08:00
Colin Cross
ab3fe23e4a Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2011-01-06 18:12:28 -08:00
Benoit Goby
7a2bd4d7ca usb: host: tegra: Fix enumeration after lp0
Fix enumeration when a device is plugged while the host is in lp0 state.

Change-Id: Idb491f347172daac8a5603ed098b422b15cc534e
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-06 15:16:18 -08:00
Benoit Goby
f2e67ec3c3 usb: host: tegra: Fix a possible int storm on resume from lp0
usbcore will reenable usb interrupts later once the bus has been
resumed.

Change-Id: If78088bc86710f50293d84234d764655f4bba979
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-04 17:54:44 -08:00
Colin Cross
4d86495ef9 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36 2010-12-29 16:15:17 -08:00
Benoit Goby
c901a0736a usb: ehci: tegra: Don't change the hcd state on restart
usbcore will change it once the bus has been resumed. This fixes
the "hub 3-0:1.0: activate --> -22" error on resume.

Change-Id: Icff283a60634b4d003e77aafb5a5127d415cbd3f
Signed-off-by: Benoit Goby <benoit@android.com>
2010-12-28 15:46:42 -08:00
Colin Cross
3f29a88349 Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Conflicts:
	drivers/usb/gadget/composite.c

Change-Id: I1a332ec21da62aea98912df9a01cf0282ed50ee1
2010-12-21 18:38:13 -08:00
Colin Cross
b104a07edb Merge commit 'v2.6.36.2' into linux-tegra-2.6.36 2010-12-21 18:34:37 -08:00