From: Chris Wright on
* Alan Stern (stern(a)rowland.harvard.edu) wrote:
> Since using mem=4096M or GFP_DMA stopped the symptoms, it seems very
> likely that a buffer is getting allocated above the 4 GB line and not
> bounced or IOMMU-mapped correctly.
>
> David, do you have anything to suggest? Any ways to check for IOMMU or
> related errors?

Well if the IOMMU is enabled, dmesg will show you if you're getting DMA
faults due to IOMMU. Doesn't sound like that's the case.

> The problem, in short, is that USB audio doesn't work properly when
> Pedro boots a 64-bit kernel on his 4-GB machine. With a 32-bit kernel
> it works okay, and it also works if we use dma_alloc_coherent(). The
> host controller is limited to 32-bit DMA, and the DMA addresses
> generated by dma_map_single() appear to be normal.

So dma_map_single is the case that's failing, but you think the mask is
correct? What about the direction?

> At the moment we don't even know if this is caused by a bug in the
> kernel or a bug in Pedro's hardware. But he has observed the same
> problem on two different machines, both using the ICH9 chipset.

Is the IOMMU enabled?

$ dmesg | grep -e DMAR -e IOMMU

If it's on, you can boot w/out (intel_iommu=off) or in passthrough mode
(intel_iommu=on iommu=pt) and see if that makes a difference.

If it's not on (but there) you can enable it (intel_iommu=on) and look
for DMA faults (pointing to driver bug).

thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Alan Stern on
On Wed, 14 Apr 2010, Pedro Ribeiro wrote:

> On 14 April 2010 19:23, Alan Stern <stern(a)rowland.harvard.edu> wrote:
> > On Wed, 14 Apr 2010, Pedro Ribeiro wrote:
> >
> >> The best way to trigger the issue is to connect a dib0700 based DVB
> >> adapter. All you need is to connect it. Since it polls for the remote
> >> control every 50 msec, it causes a constant interference. Beware that
> >> on 2.6.34 this behaviour has been corrected. Other DVB adapters may
> >> trigger the same issue if they also poll constatly for the rc.
> >
> > Your computer has two EHCI controllers, doesn't it? �Can you plug the
> > DVB into a different USB bus from the audio device? �If you do, does
> > the interference still occur?
> >
> > Alan Stern
> >
> >
>
> It does not matter on which ports I plug into, even if in different
> buses not sharing IRQ's.

Okay, good. That's important. If the problem went away when the two
devices were on separate buses then it would have to be a bug in
ehci-hcd. But since it didn't go away, it must be a bug in the
memory/buffering code or in the hardware.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Alan Stern on
On Wed, 14 Apr 2010, Chris Wright wrote:

> So dma_map_single is the case that's failing, but you think the mask is
> correct? What about the direction?

The mask and direction are unquestionably correct. The mask is set up
by pci_setup_device() and not changed thereafter. Furthermore, the
audio works okay until another device (a DVB tuner) is plugged in.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Konrad Rzeszutek Wilk on
On Wed, Apr 14, 2010 at 04:29:22PM -0400, Alan Stern wrote:
> On Wed, 14 Apr 2010, Chris Wright wrote:
>
> > So dma_map_single is the case that's failing, but you think the mask is
> > correct? What about the direction?
>
> The mask and direction are unquestionably correct. The mask is set up
> by pci_setup_device() and not changed thereafter. Furthermore, the
> audio works okay until another device (a DVB tuner) is plugged in.

Could the driver for the DVB tuner change the PCI mask? That is, change
the pci mask way after it has been initialized (don't laugh, this did
happend - as I remember 4 months fix was posted on the DRM mailing list
for this).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Pedro Ribeiro on
On 14 April 2010 22:01, Konrad Rzeszutek Wilk <konrad.wilk(a)oracle.com> wrote:
> On Wed, Apr 14, 2010 at 04:29:22PM -0400, Alan Stern wrote:
>> On Wed, 14 Apr 2010, Chris Wright wrote:
>>
>> > So dma_map_single is the case that's failing, but you think the mask is
>> > correct? �What about the direction?
>>
>> The mask and direction are unquestionably correct. �The mask is set up
>> by pci_setup_device() and not changed thereafter. �Furthermore, the
>> audio works okay until another device (a DVB tuner) is plugged in.
>
> Could the driver for the DVB tuner change the PCI mask? That is, change
> the pci mask way after it has been initialized (don't laugh, this did
> happend - as I remember 4 months fix was posted on the DRM mailing list
> for this).
>

I can also trigger the bug on mount and unmount of a USB stick, albeit
its not as intensive.

Pedro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/