Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262495AbUCCPd2 (ORCPT ); Wed, 3 Mar 2004 10:33:28 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262489AbUCCPad (ORCPT ); Wed, 3 Mar 2004 10:30:33 -0500 Received: from jaguar.mkp.net ([192.139.46.146]:2255 "EHLO jaguar.mkp.net") by vger.kernel.org with ESMTP id S262490AbUCCP3s (ORCPT ); Wed, 3 Mar 2004 10:29:48 -0500 To: James Bottomley Cc: Andrew Morton , Linus Torvalds , willy@debian.org, Linux Kernel Subject: Re: [PATCH] move dma_consistent_dma_mask to the generic device References: <1077759287.14081.24.camel@mulgrave> From: Jes Sorensen Date: 03 Mar 2004 10:29:40 -0500 In-Reply-To: <1077759287.14081.24.camel@mulgrave> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1492 Lines: 38 >>>>> "James" == James Bottomley writes: James> pci_dev.consistent_dma_mask was introduced to get around James> problems in the IA64 Altix machine. James> Now, we have a use for it in x86: the aacraid needs coherent James> memory in a 31 bit address range (2GB). Unfortunately, x86 is James> converted to the dma model, so it can't see the pci_dev by the James> time coherent memory is allocated. James, Could you add this one to your patchset, it fixes the sn2 code to work with the new location of the mask. Thanks, Jes --- arch/ia64/sn/io/machvec/pci_dma.c~ Wed Mar 3 06:47:36 2004 +++ arch/ia64/sn/io/machvec/pci_dma.c Wed Mar 3 07:23:34 2004 @@ -152,7 +152,7 @@ * pcibr_dmatrans_addr ignores a missing PCIIO_DMA_A64 flag on * PCI-X buses. */ - if (hwdev->consistent_dma_mask == ~0UL) + if (hwdev->dev.coherent_dma_mask == ~0UL) *dma_handle = pcibr_dmatrans_addr(vhdl, NULL, phys_addr, size, PCIIO_DMA_CMD | PCIIO_DMA_A64); else { @@ -169,7 +169,7 @@ } } - if (!*dma_handle || *dma_handle > hwdev->consistent_dma_mask) { + if (!*dma_handle || *dma_handle > hwdev->dev.coherent_dma_mask) { if (dma_map) { pcibr_dmamap_done(dma_map); pcibr_dmamap_free(dma_map); - 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/