From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: v3.13-rc1: USB regression
Date: Sun, 24 Nov 2013 22:43:59 +0000 [thread overview]
Message-ID: <20131124224359.GE25039@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20131124222247.GC24645@blackmetal.musicnaut.iki.fi>
On Mon, Nov 25, 2013 at 12:22:47AM +0200, Aaro Koskinen wrote:
> Hi,
>
> With 3.13-rc1, the USB OHCI probe fails on Amstrad E3 (ARM/OMAP1)
> as follows:
>
> [ 33.814705] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [ 33.821482] ohci-omap: OHCI OMAP driver
> [ 33.925153] ohci ohci: OMAP OHCI
> [ 33.929087] ohci ohci: new USB bus registered, assigned bus number 1
> [ 33.967324] ohci ohci: Coherent DMA mask 0xffffffff (pfn 0xe0000-0xe0000) covers a smaller range of system memory than the DMA zone pfn 0x0-0x100000
> [ 33.982292] ohci ohci: can't setup: -12
> [ 33.987898] ohci ohci: USB bus 1 deregistered
> [ 33.992984] ohci: probe of ohci failed with error -12
>
> I bisected this to 4dcfa60071b3d23f0181f27d8519f12e37cefbb9 (ARM: DMA-API:
> better handing of DMA masks for coherent allocations). Reverting that
> commit makes the USB work again fine.
This is because of this:
#define __arch_dma_to_pfn(dev, addr) \
({ dma_addr_t __dma = addr; \
if (is_lbus_device(dev)) \
__dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \
__phys_to_pfn(__dma); \
})
dma_addr_t is 32-bit. PHYS_OFFSET - OMAP1510_LB_OFFSET is 0xe0000000.
Consider what the result of passing 0xffffffff as addr into this is.
Better would be:
#define __arch_dma_to_pfn(dev, addr) \
({ unsigned long pfn = (addr) >> PAGE_SHIFT; \
if (is_lbus_device(dev)) \
pfn += PHYS_PFN_OFFSET - \
(OMAP1510_LB_OFFSET >> PAGE_SHIFT); \
pfn; \
})
Can you try that in arch/arm/mach-omap1/include/mach/memory.h please?
next prev parent reply other threads:[~2013-11-24 22:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 22:22 ARM: v3.13-rc1: USB regression Aaro Koskinen
2013-11-24 22:43 ` Russell King - ARM Linux [this message]
2013-11-25 16:33 ` Aaro Koskinen
2013-11-25 17:18 ` Russell King - ARM Linux
2013-11-25 21:12 ` Aaro Koskinen
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=20131124224359.GE25039@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).