From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: USB/swiotlb failure on arm64/RPi3
Date: Wed, 25 Jan 2017 12:28:20 +0100 [thread overview]
Message-ID: <18757304.xCyYfrPYKi@wuerfel> (raw)
In-Reply-To: <20170124225200.a7qioswpxzh6agvd@raspberrypi-2.musicnaut.iki.fi>
On Wednesday, January 25, 2017 12:52:00 AM CET Aaro Koskinen wrote:
>
> Boot hangs and I/O does not recover.
>
> I first suspected the dwc2 driver, but the cause turns out to be DMA
> mapping error in usb_hcd_map_urb_for_dma(). This will cause usb_sg_wait()
> to loop forever trying to re-try. On RPi3 dma_mapping_error() is:
Do you know why usb_hcd_map_urb_for_dma() fails here? Are we running
out of swiotlb bounce buffer space, or is there some other problem?
> int
> swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr)
> {
> return (dma_addr == phys_to_dma(hwdev, io_tlb_overflow_buffer));
> }
>
> On arm64, swiotlb is not initialized by default, so io_tlb_overflow_buffer
> is 0. But phys_to_dma(hwdev, 0) should be a valid DMA address and not
> be rejected. I tested this by initializing io_tlb_overflow_buffer with
> INVALID_PHYS_ADDR, and then the boot passes and system runs fine.
>
> Any ideas how this should be fixed properly?
Why is swiotlb not initialized?
Arnd
next prev parent reply other threads:[~2017-01-25 11:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 22:52 USB/swiotlb failure on arm64/RPi3 Aaro Koskinen
2017-01-25 8:05 ` Stefan Wahren
2017-01-25 11:28 ` Arnd Bergmann [this message]
2017-01-25 12:03 ` [PATCH] arm64: dma-mapping: Fix dma_mapping_error() when bypassing SWIOTLB Robin Murphy
2017-01-25 12:37 ` Michael Zoran
2017-01-25 12:46 ` Robin Murphy
2017-01-25 12:51 ` Arnd Bergmann
2017-01-25 12:54 ` Robin Murphy
2017-01-25 13:35 ` Michael Zoran
2017-01-25 18:31 ` [PATCH v2] " Robin Murphy
2017-01-25 19:14 ` Robin Murphy
2017-01-25 19:31 ` Michael Zoran
2017-01-25 21:49 ` Aaro Koskinen
2017-01-26 12:52 ` Will Deacon
2017-01-26 13:04 ` Michael Zoran
2017-01-26 15:20 ` Robin Murphy
2017-01-26 20:35 ` Aaro Koskinen
2017-01-27 9:53 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18757304.xCyYfrPYKi@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).