linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: usb/sparc build failure
@ 2008-05-27 10:26 Stephen Rothwell
  2008-05-27 16:50 ` Greg KH
  2008-05-27 17:41 ` David Vrabel
  0 siblings, 2 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-05-27 10:26 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, David Vrabel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 2186 bytes --]

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.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: usb/sparc build failure
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2008-05-27 16:50 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, David Vrabel, David S. Miller

On Tue, May 27, 2008 at 08:26:30PM +1000, 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)

Is this sparc64 or sparc32?  I don't seem to get these errors using the
sparc64 cross compiler tool chain.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: usb/sparc build failure
  2008-05-27 10:26 linux-next: usb/sparc build failure Stephen Rothwell
  2008-05-27 16:50 ` Greg KH
@ 2008-05-27 17:41 ` David Vrabel
  2008-05-27 18:02   ` Greg KH
  1 sibling, 1 reply; 6+ messages in thread
From: David Vrabel @ 2008-05-27 17:41 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, David S. Miller

[-- 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: usb/sparc build failure
  2008-05-27 17:41 ` David Vrabel
@ 2008-05-27 18:02   ` Greg KH
  2008-05-27 23:25     ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2008-05-27 18:02 UTC (permalink / raw)
  To: David Vrabel; +Cc: Stephen Rothwell, linux-next, David S. Miller

On Tue, May 27, 2008 at 06:41:39PM +0100, David Vrabel wrote:
> 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.

Thanks, I've now merged this in with my patch series.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: usb/sparc build failure
  2008-05-27 16:50 ` Greg KH
@ 2008-05-27 23:19   ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-05-27 23:19 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, David Vrabel, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]

Hi Greg,

On Tue, 27 May 2008 09:50:19 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Tue, May 27, 2008 at 08:26:30PM +1000, Stephen Rothwell wrote:
> > 
> > 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)
> 
> Is this sparc64 or sparc32?  I don't seem to get these errors using the
> sparc64 cross compiler tool chain.

http://kisskb.ellerman.id.au/kisskb/buildresult/29187/ (that's from the
day before yesterday, but it happened again yesterday). sparc32 build
using a biarch sparc64 cross compiler.

But it shouldn't matter.  If you use something from a header file,
include it (or something that is guaranteed to include it on all
architecture using all configs).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux-next: usb/sparc build failure
  2008-05-27 18:02   ` Greg KH
@ 2008-05-27 23:25     ` Stephen Rothwell
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2008-05-27 23:25 UTC (permalink / raw)
  To: Greg KH; +Cc: David Vrabel, linux-next, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

On Tue, 27 May 2008 11:02:36 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Tue, May 27, 2008 at 06:41:39PM +0100, David Vrabel wrote:
> > 
> > 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.
> 
> Thanks, I've now merged this in with my patch series.

Thanks guys.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-27 23:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2008-05-27 18:02   ` Greg KH
2008-05-27 23:25     ` Stephen Rothwell

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).