linux-uconsole/drivers/usb
Nagarjuna Kristam c6d779fd81 usb: host: xhci-tegra: Set DMA mask correctly
[ Upstream commit 993cc87534 ]

The Falcon microcontroller that runs the XUSB firmware and which is
responsible for exposing the XHCI interface can address only 40 bits of
memory. Typically that's not a problem because Tegra devices don't have
enough system memory to exceed those 40 bits.

However, if the ARM SMMU is enable on Tegra186 and later, the addresses
passed to the XUSB controller can be anywhere in the 48-bit IOV address
space of the ARM SMMU. Since the DMA/IOMMU API starts allocating from
the top of the IOVA space, the Falcon microcontroller is not able to
load the firmware successfully.

Fix this by setting the DMA mask to 40 bits, which will force the DMA
API to map the buffer for the firmware to an IOVA that is addressable by
the Falcon.

Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/1566989697-13049-1-git-send-email-nkristam@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-09-21 07:17:04 +02:00
..
atm
c67x00
chipidea usb: chipidea: udc: don't do hardware access if gadget has stopped 2019-09-06 10:22:15 +02:00
class USB: cdc-wdm: fix race between write and disconnect due to flag abuse 2019-09-06 10:22:14 +02:00
common usb: common: Consider only available nodes for dr_mode 2019-04-03 06:26:27 +02:00
core USB: usbcore: Fix slab-out-of-bounds bug during device reset 2019-09-21 07:16:42 +02:00
dwc2 usb: dwc2: Fix disable all EP's on disconnect 2019-08-04 09:30:52 +02:00
dwc3 usb: dwc3: Reset num_trbs after skipping 2019-07-03 13:14:49 +02:00
early
gadget usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt 2019-09-06 10:21:57 +02:00
host usb: host: xhci-tegra: Set DMA mask correctly 2019-09-21 07:17:04 +02:00
image
isp1760 usb: isp1760: remove redundant variable 'selector' 2018-07-13 15:41:56 +02:00
misc usb: yurex: Fix use-after-free in yurex_delete 2019-08-16 10:12:42 +02:00
mon USB: mon: use ktime_get_real_ts64 instead of getnstimeofday64 2018-06-25 21:58:26 +08:00
mtu3 usb: mtu3: fix EXTCON dependency 2019-04-03 06:26:27 +02:00
musb soc: sunxi: Fix missing dependency on REGMAP_MMIO 2019-05-10 17:54:10 +02:00
phy usb: phy: fix link errors 2019-03-13 14:02:34 -07:00
renesas_usbhs usb: renesas_usbhs: add a workaround for a race condition of workqueue 2019-07-14 08:11:20 +02:00
roles usb: roles: Add a description for the class to Kconfig 2019-01-09 17:38:40 +01:00
serial USB: serial: option: Add Motorola modem UARTs 2019-08-25 10:48:01 +02:00
storage USB: storage: ums-realtek: Whitelist auto-delink support 2019-09-06 10:22:16 +02:00
typec usb: typec: tcpm: Try PD-2.0 if sink does not respond to 3.0 source-caps 2019-09-16 08:22:09 +02:00
usbip usbip: usbip_host: fix stub_dev lock context imbalance regression 2019-06-09 09:17:11 +02:00
wusbcore usb: wusbcore: security: cast sizeof to int for comparison 2018-07-02 18:08:19 +02:00
Kconfig usb: roles: Add a description for the class to Kconfig 2019-01-09 17:38:40 +01:00
Makefile
README
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00

To understand all the Linux-USB framework, you'll use these resources:

    * This source code.  This is necessarily an evolving work, and
      includes kerneldoc that should help you get a current overview.
      ("make pdfdocs", and then look at "usb.pdf" for host side and
      "gadget.pdf" for peripheral side.)  Also, Documentation/usb has
      more information.

    * The USB 2.0 specification (from www.usb.org), with supplements
      such as those for USB OTG and the various device classes.
      The USB specification has a good overview chapter, and USB
      peripherals conform to the widely known "Chapter 9".

    * Chip specifications for USB controllers.  Examples include
      host controllers (on PCs, servers, and more); peripheral
      controllers (in devices with Linux firmware, like printers or
      cell phones); and hard-wired peripherals like Ethernet adapters.

    * Specifications for other protocols implemented by USB peripheral
      functions.  Some are vendor-specific; others are vendor-neutral
      but just standardized outside of the www.usb.org team.

Here is a list of what each subdirectory here is, and what is contained in
them.

core/		- This is for the core USB host code, including the
		  usbfs files and the hub class driver ("hub_wq").

host/		- This is for USB host controller drivers.  This
		  includes UHCI, OHCI, EHCI, and others that might
		  be used with more specialized "embedded" systems.

gadget/		- This is for USB peripheral controller drivers and
		  the various gadget drivers which talk to them.


Individual USB driver directories.  A new driver should be added to the
first subdirectory in the list below that it fits into.

image/		- This is for still image drivers, like scanners or
		  digital cameras.
../input/	- This is for any driver that uses the input subsystem,
		  like keyboard, mice, touchscreens, tablets, etc.
../media/	- This is for multimedia drivers, like video cameras,
		  radios, and any other drivers that talk to the v4l
		  subsystem.
../net/		- This is for network drivers.
serial/		- This is for USB to serial drivers.
storage/	- This is for USB mass-storage drivers.
class/		- This is for all USB device drivers that do not fit
		  into any of the above categories, and work for a range
		  of USB Class specified devices. 
misc/		- This is for all USB device drivers that do not fit
		  into any of the above categories.