Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756605Ab0DNSkd (ORCPT ); Wed, 14 Apr 2010 14:40:33 -0400 Received: from sous-sol.org ([216.99.217.87]:55991 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756475Ab0DNSkb (ORCPT ); Wed, 14 Apr 2010 14:40:31 -0400 Date: Wed, 14 Apr 2010 11:38:26 -0700 From: Chris Wright To: Alan Stern Cc: Daniel Mack , David Woodhouse , Greg KH , USB list , Kernel development list , iommu@lists.linux-foundation.org, Andi Kleen , Pedro Ribeiro , Andrew Morton Subject: Re: USB transfer_buffer allocations on 64bit systems Message-ID: <20100414183826.GA25962@sequoia.sous-sol.org> References: <20100414163637.GV30807@buzzloop.caiaq.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1673 Lines: 41 * Alan Stern (stern@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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/