Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Jeff Garzik
Michael Chan wrote: [BNX2]: Add 40-bit DMA workaround for 5708. The internal PCIE-to-PCIX bridge of the 5708 has the same 40-bit DMA limitation as some of the tg3 chips. Use the same workaround used in tg3. On 64-bit systems without IOMMU, linearize the SKB if any address is 40-bit.

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread David Miller
From: Jeff Garzik [EMAIL PROTECTED] Date: Wed, 02 May 2007 03:06:43 -0400 Second, CONFIG_HIGHMEM is a bad test for IOMMU presence. I don't think you /can/ test for IOMMU presence. Maybe DaveM knows a way that I do not? You really can't. We have platforms that are both IOMMU and non-IOMMU

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Michael Chan
David Miller wrote: From: Jeff Garzik [EMAIL PROTECTED] Date: Wed, 02 May 2007 03:06:43 -0400 Second, CONFIG_HIGHMEM is a bad test for IOMMU presence. I don't think you /can/ test for IOMMU presence. Maybe DaveM knows a way that I do not? You really can't. We have platforms that

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Christoph Hellwig
On Wed, May 02, 2007 at 08:23:40AM -0700, Michael Chan wrote: A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? No. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Jeff Garzik
Michael Chan wrote: A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? No. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Michael Chan
On Wed, 2007-05-02 at 11:29 -0400, Jeff Garzik wrote: Michael Chan wrote: A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? No. May be I misunderstood the code in illegal_highdma() in net/core/dev.c where it is checking to see if it needs to linearize the

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Jeff Garzik
Michael Chan wrote: On Wed, 2007-05-02 at 11:29 -0400, Jeff Garzik wrote: Michael Chan wrote: A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? No. May be I misunderstood the code in illegal_highdma() in net/core/dev.c where it is checking to see if it needs

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread David Miller
From: Michael Chan [EMAIL PROTECTED] Date: Wed, 2 May 2007 08:23:40 -0700 A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? Nope, IA-64 is at least one example. IA-64 has both IOMMU and non-IOMMU configurations, and never sets HIGHMEM. - To unsubscribe from

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Michael Chan
On Wed, 2007-05-02 at 14:24 -0400, Jeff Garzik wrote: Michael Chan wrote: On Wed, 2007-05-02 at 11:29 -0400, Jeff Garzik wrote: Michael Chan wrote: A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? No. May be I misunderstood the code in

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Jeff Garzik
Michael Chan wrote: If CONFIG_HIGHMEM is not set, wouldn't the device get 32-bit DMA addresses that it cannot handle? No -- presuming your PCI device's DMA mask is set correctly. I know that there are 64-bit systems without IOMMUs. That's why we need [...] needed or not. These systems

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Michael Chan
On Wed, 2007-05-02 at 12:40 -0700, David Miller wrote: From: Michael Chan [EMAIL PROTECTED] Date: Wed, 2 May 2007 08:23:40 -0700 A non-IOMMU system using 64-bit dma_addr_t will always set CONFIG_HIGHMEM, right? Nope, IA-64 is at least one example. IA-64 has both IOMMU and non-IOMMU

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread David Miller
From: Michael Chan [EMAIL PROTECTED] Date: Wed, 02 May 2007 14:27:49 -0700 I see. So IA64 always uses the SWIOTLB when it doesn't have IOMMU then? I'm a bit confused. Is it enough to just set the DMA mask to 40-bit and forget about all this checking? I thought that wasn't enough. A tx

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Michael Chan
On Wed, 2007-05-02 at 14:45 -0700, David Miller wrote: From: Michael Chan [EMAIL PROTECTED] Date: Wed, 02 May 2007 14:27:49 -0700 I see. So IA64 always uses the SWIOTLB when it doesn't have IOMMU then? I'm a bit confused. Is it enough to just set the DMA mask to 40-bit and forget

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread David Miller
From: Michael Chan [EMAIL PROTECTED] Date: Wed, 02 May 2007 16:28:22 -0700 Is it correct to assume that all 64-bit systems using 64-bit dma_addr_t will either have real IOMMUs or will use SWIOTLB? If this is true, we can just set the DMA mask to what is supported by the hardware and let

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread Christoph Hellwig
On Wed, May 02, 2007 at 01:02:41PM -0700, Michael Chan wrote: Let's say I have a 32-bit card that cannot do dual address cycle on a 64-bit dma_addr_t system without IOMMU. If CONFIG_HIGHMEM is not set, wouldn't the device get 32-bit DMA addresses that it cannot handle? It needs to set it's

Re: [PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-02 Thread David Miller
From: Christoph Hellwig [EMAIL PROTECTED] Date: Wed, 2 May 2007 23:48:58 +0100 On Wed, May 02, 2007 at 01:02:41PM -0700, Michael Chan wrote: Let's say I have a 32-bit card that cannot do dual address cycle on a 64-bit dma_addr_t system without IOMMU. If CONFIG_HIGHMEM is not set, wouldn't

[PATCH 3/20][BNX2]: Add 40-bit DMA workaround for 5708.

2007-05-01 Thread Michael Chan
[BNX2]: Add 40-bit DMA workaround for 5708. The internal PCIE-to-PCIX bridge of the 5708 has the same 40-bit DMA limitation as some of the tg3 chips. Use the same workaround used in tg3. On 64-bit systems without IOMMU, linearize the SKB if any address is 40-bit. Signed-off-by: Michael Chan