From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Michael Chan <mchan@broadcom.com>,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org
Cc: David Miller <davem@davemloft.net>,
Ian.Jackson@eu.citrix.com, prashant@broadcom.com,
cascardo@linux.vnet.ibm.com, boris.ostrovsky@oracle.com,
david.vrabel@citrix.com, vyasevich@gmail.com,
xen-devel@lists.xensource.com, netdev@vger.kernel.org,
siva.kallam@broadcom.com, sanjeevb@broadcom.com
Subject: Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]
Date: Fri, 17 Apr 2015 15:04:48 -0400 [thread overview]
Message-ID: <20150417190448.GA9462@l.oracle.com> (raw)
In-Reply-To: <1429292769.6668.7.camel@LTIRV-MCHAN1.corp.ad.broadcom.com>
On Fri, Apr 17, 2015 at 10:46:09AM -0700, Michael Chan wrote:
> On Fri, 2015-04-17 at 13:19 -0400, David Miller wrote:
> > So the gist of the situation is, that NEED_DMA_MAP_STATE can be 'n' in
> > situations where we might actually need it to be 'y' based upon kernel
> > comman line boot options given.
> >
> > Right?
>
> Yes.
Would this work ?
Peter, Ingo, Thomas, pls see Prashant's thread:
http://www.spinics.net/lists/netdev/msg325645.html
http://www.spinics.net/lists/netdev/msg325774.html
Thank you.
>From 9e417af099e3cee2b219ab28ffc1e96b0564b213 Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Fri, 17 Apr 2015 14:55:47 -0400
Subject: [PATCH] config: Enable NEED_DMA_MAP_STATE when SWIOTLB is selected
A huge amount of NIC drivers use the DMA API, however if compiled
under 32-bit an very important part of the DMA API can be ommitted leading
to the drivers not working at all (especially if used with
'swiotlb=force iommu=soft').
As Prashant Sreedharan explains it: "the driver [tg3] uses
DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of the dma
"mapping" and dma_unmap_addr() to get the "mapping" value. On most of
the platforms this is a no-op, but ... with "iommu=soft and
swiotlb=force" this house keeping is required, ... otherwise
we pass 0 while calling pci_unmap_/pci_dma_sync_ instead of the
DMA address."
As such enable this even when using 32-bit kernels.
Reported-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index b7d31ca..570c71d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -177,7 +177,7 @@ config SBUS
config NEED_DMA_MAP_STATE
def_bool y
- depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG
+ depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG || SWIOTLB
config NEED_SG_DMA_LENGTH
def_bool y
--
2.1.0
> >
> >
>
next prev parent reply other threads:[~2015-04-17 19:05 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 15:12 tg3 NIC driver bug in 3.14.x under Xen Ian Jackson
2015-04-07 15:37 ` Konrad Rzeszutek Wilk
2015-04-07 18:25 ` Ian Jackson
2015-04-07 16:55 ` Michael Chan
2015-04-07 17:58 ` Ian Jackson
2015-04-07 18:13 ` Ian Jackson
2015-04-07 23:21 ` Michael Chan
2015-04-07 23:22 ` Prashant Sreedharan
2015-04-08 13:59 ` tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages] Ian Jackson
2015-04-09 1:43 ` Prashant Sreedharan
2015-04-09 11:11 ` Ian Jackson
2015-04-09 16:10 ` Prashant Sreedharan
2015-04-09 16:57 ` Ian Jackson
2015-04-09 17:25 ` Ian Jackson
2015-04-09 18:08 ` Prashant Sreedharan
2015-04-10 15:06 ` Ian Jackson
2015-04-11 8:01 ` Prashant
2015-04-15 10:54 ` Ian Jackson
2015-04-16 2:53 ` Prashant
2015-04-16 10:18 ` Ian Jackson
2015-04-16 12:24 ` cascardo
2015-04-16 16:39 ` Michael Chan
2015-04-16 17:15 ` Ian Jackson
2015-04-16 22:51 ` Prashant Sreedharan
2015-04-17 16:29 ` Ian Jackson
2015-04-17 17:19 ` David Miller
2015-04-17 17:46 ` Michael Chan
2015-04-17 19:04 ` Konrad Rzeszutek Wilk [this message]
2015-04-17 19:12 ` David Miller
2015-04-17 18:52 ` Prashant Sreedharan
2015-04-21 15:05 ` Ian Jackson
2015-04-16 18:14 ` David Miller
2015-04-09 18:26 ` Michael Chan
2015-04-10 11:43 ` Ian Jackson
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=20150417190448.GA9462@l.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=cascardo@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=david.vrabel@citrix.com \
--cc=hpa@zytor.com \
--cc=mchan@broadcom.com \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=prashant@broadcom.com \
--cc=sanjeevb@broadcom.com \
--cc=siva.kallam@broadcom.com \
--cc=tglx@linutronix.de \
--cc=vyasevich@gmail.com \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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).