From: David Vrabel <david.vrabel@csr.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Greg KH <greg@kroah.com>,
linux-next@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: linux-next: usb/sparc build failure
Date: Tue, 27 May 2008 18:41:39 +0100 [thread overview]
Message-ID: <483C47D3.2090705@csr.com> (raw)
In-Reply-To: <20080527202630.6352736d.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2676 bytes --]
Stephen Rothwell wrote:
> Hi Greg,
>
> Today's (though it is not new) linux-next build (spac allmodconfig) fails
> like this:
>
> drivers/uwb/whci.c:166: error: `DMA_64BIT_MASK' undeclared (first use in this function)
> drivers/uwb/whci.c:166: error: (Each undeclared identifier is reported only once
> drivers/uwb/whci.c:166: error: for each function it appears in.)
> drivers/uwb/whci.c:168: error: `DMA_32BIT_MASK' undeclared (first use in this function)
> drivers/uwb/whc-rc.c:268: error: implicit declaration of function `dma_alloc_coherent'
> drivers/uwb/whc-rc.c:286: error: implicit declaration of function `dma_free_coherent'
> drivers/usb/host/whci/pzl.c:372: error: implicit declaration of function `dma_alloc_coherent'
> drivers/usb/host/whci/pzl.c:395: error: implicit declaration of function `dma_free_coherent'
> drivers/usb/host/whci/init.c:132: error: implicit declaration of function `dma_alloc_coherent'
> drivers/usb/host/whci/init.c:162: error: implicit declaration of function `dma_free_coherent'
> drivers/usb/host/whci/hw.c:48: error: implicit declaration of function `dma_map_single'
> drivers/usb/host/whci/hw.c:48: error: `DMA_TO_DEVICE' undeclared (first use in this function)
> drivers/usb/host/whci/hw.c:48: error: (Each undeclared identifier is reported only once
> drivers/usb/host/whci/hw.c:48: error: for each function it appears in.)
> drivers/usb/host/whci/hw.c:78: error: implicit declaration of function `dma_unmap_single'
> drivers/usb/host/whci/qset.c:274: error: implicit declaration of function `dma_unmap_single'
> drivers/usb/host/whci/qset.c:276: error: `DMA_TO_DEVICE' undeclared (first use in this function)
> drivers/usb/host/whci/qset.c:276: error: (Each undeclared identifier is reported only once
> drivers/usb/host/whci/qset.c:276: error: for each function it appears in.)
> drivers/usb/host/whci/qset.c:326: error: implicit declaration of function `dma_map_single'
> drivers/usb/host/whci/qset.c:326: error: `DMA_TO_DEVICE' undeclared (first use in this function)
>
> I suspect that these files should include linux/dma-mapping.h directly
> since it uses things from there.
How odd. Looking at my local patch set this has been fixed but looking
at the patches Greg has and I see it's not. Try this.
I also note that some architectures (sparc amongst them) will BUG with
these drivers as the DMA API is only available to PCI devices. The
whc-rc and whci-hcd drivers use umc devices which are children of a PCI
device.
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
[-- Attachment #2: whci-include-linux-dma-mapping.h.patch --]
[-- Type: text/x-patch, Size: 4186 bytes --]
UWB/WUSB: WHCI drivers should include linux/dma-mapping.h
The WHCI HCD and RC drivers use the DMA API and should include
linux/dma-mapping.h.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
---
drivers/usb/host/whci/asl.c | 1 +
drivers/usb/host/whci/hw.c | 3 +--
drivers/usb/host/whci/init.c | 3 +--
drivers/usb/host/whci/pzl.c | 1 +
drivers/usb/host/whci/qset.c | 1 +
drivers/uwb/whc-rc.c | 1 +
drivers/uwb/whci.c | 1 +
7 files changed, 7 insertions(+), 4 deletions(-)
Index: linux-next/drivers/usb/host/whci/asl.c
===================================================================
--- linux-next.orig/drivers/usb/host/whci/asl.c 2008-05-27 18:12:59.000000000 +0100
+++ linux-next/drivers/usb/host/whci/asl.c 2008-05-27 18:13:08.000000000 +0100
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/umc.h>
#include <linux/usb.h>
#define D_LOCAL 0
Index: linux-next/drivers/usb/host/whci/hw.c
===================================================================
--- linux-next.orig/drivers/usb/host/whci/hw.c 2008-05-27 18:14:09.000000000 +0100
+++ linux-next/drivers/usb/host/whci/hw.c 2008-05-27 18:14:24.000000000 +0100
@@ -15,9 +15,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <linux/version.h>
#include <linux/kernel.h>
-#include <linux/init.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/umc.h>
#include "../../wusbcore/wusbhc.h"
Index: linux-next/drivers/usb/host/whci/init.c
===================================================================
--- linux-next.orig/drivers/usb/host/whci/init.c 2008-05-27 18:13:28.000000000 +0100
+++ linux-next/drivers/usb/host/whci/init.c 2008-05-27 18:13:56.000000000 +0100
@@ -15,9 +15,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <linux/version.h>
#include <linux/kernel.h>
-#include <linux/init.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/umc.h>
#include "../../wusbcore/wusbhc.h"
Index: linux-next/drivers/usb/host/whci/pzl.c
===================================================================
--- linux-next.orig/drivers/usb/host/whci/pzl.c 2008-05-27 18:12:31.000000000 +0100
+++ linux-next/drivers/usb/host/whci/pzl.c 2008-05-27 18:12:54.000000000 +0100
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/umc.h>
#include <linux/usb.h>
#define D_LOCAL 0
Index: linux-next/drivers/usb/host/whci/qset.c
===================================================================
--- linux-next.orig/drivers/usb/host/whci/qset.c 2008-05-27 18:13:12.000000000 +0100
+++ linux-next/drivers/usb/host/whci/qset.c 2008-05-27 18:13:21.000000000 +0100
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/kernel.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/umc.h>
#include <linux/usb.h>
Index: linux-next/drivers/uwb/whci.c
===================================================================
--- linux-next.orig/drivers/uwb/whci.c 2008-05-27 18:12:06.000000000 +0100
+++ linux-next/drivers/uwb/whci.c 2008-05-27 18:12:18.000000000 +0100
@@ -8,6 +8,7 @@
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/pci.h>
+#include <linux/dma-mapping.h>
#include <linux/uwb/whci.h>
#include <linux/uwb/umc.h>
#define D_LOCAL 0
Index: linux-next/drivers/uwb/whc-rc.c
===================================================================
--- linux-next.orig/drivers/uwb/whc-rc.c 2008-05-27 18:39:20.000000000 +0100
+++ linux-next/drivers/uwb/whc-rc.c 2008-05-27 18:39:34.000000000 +0100
@@ -43,6 +43,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
#include <linux/uwb.h>
next prev parent reply other threads:[~2008-05-27 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 10:26 linux-next: usb/sparc build failure Stephen Rothwell
2008-05-27 16:50 ` Greg KH
2008-05-27 23:19 ` Stephen Rothwell
2008-05-27 17:41 ` David Vrabel [this message]
2008-05-27 18:02 ` Greg KH
2008-05-27 23:25 ` Stephen Rothwell
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=483C47D3.2090705@csr.com \
--to=david.vrabel@csr.com \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.