mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86
@ 2000-11-16  1:16 willy tarreau
  2000-11-16  4:08 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: willy tarreau @ 2000-11-16  1:16 UTC (permalink / raw)
  To: David S. Miller, adam; +Cc: willy, linux-kernel

Hello !

(thanks Dave for the quick patch)

I also had to move the #include <asm/uaccess.h>
out of the #ifdef __sparc__/#endif because
copy_{from|to}_user were left undefined (see
simple patch below).

Regards,
Willy


--- drivers/net/sunhme.c-orig   Wed Nov 15 12:56:33
2000
+++ drivers/net/sunhme.c        Wed Nov 15 12:59:35
2000
@@ -48,8 +48,8 @@
 #ifndef __sparc_v9__
 #include <asm/io-unit.h>
 #endif
-#include <asm/uaccess.h>
 #endif
+#include <asm/uaccess.h>
 
 #include <asm/pgtable.h>
 #include <asm/irq.h>


___________________________________________________________
Do You Yahoo!? -- Pour dialoguer en direct avec vos amis, 
Yahoo! Messenger : http://fr.messenger.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86
  2000-11-16  1:16 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86 willy tarreau
@ 2000-11-16  4:08 ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2000-11-16  4:08 UTC (permalink / raw)
  To: wtarreau; +Cc: adam, willy, linux-kernel

   Date: Thu, 16 Nov 2000 02:16:32 +0100 (CET)
   From: willy tarreau <wtarreau@yahoo.fr>

   I also had to move the #include <asm/uaccess.h>
   out of the #ifdef __sparc__/#endif because
   copy_{from|to}_user were left undefined (see
   simple patch below).

Applied, thanks.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86
@ 2000-11-16  0:44 Adam J. Richter
  2000-11-16  0:35 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Adam J. Richter @ 2000-11-16  0:44 UTC (permalink / raw)
  To: davem, willy; +Cc: linux-kernel

	linux-2.4.0-test11-pre5/drivers/net/sunhme.c fails to compile
on x86 because it uses the undefined symbols DMA_BURST{BITS,8,16,32,64},
which are not defined anywhere in include/asm-i386/*.h.  For sparc,
these symbols are defined in include/asm-sparc/dma.h, so I copied them
in sunhme.c and bracketted them if #ifndef DMA_BURSTBITS...#endif, which
made the code compile.  However, that is probably not exactly the cleanest
change (it should give correct behavior, however, since the PCI bus
behavior is just to set the mask in question to all ones, so that the
tests for different DMA types all succeed, if I understand correctly).

Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86
  2000-11-16  0:44 Adam J. Richter
@ 2000-11-16  0:35 ` David S. Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David S. Miller @ 2000-11-16  0:35 UTC (permalink / raw)
  To: adam; +Cc: willy, linux-kernel


This is a better fix:

--- drivers/net/sunhme.c.~1~	Sun Nov 12 02:23:30 2000
+++ drivers/net/sunhme.c	Wed Nov 15 16:34:44 2000
@@ -1600,6 +1600,10 @@
 	HMD(("happy_meal_init: old[%08x] bursts<",
 	     hme_read32(hp, gregs + GREG_CFG)));
 
+#ifndef __sparc__
+	/* It is always PCI and can handle 64byte bursts. */
+	hme_write32(hp, gregs + GREG_CFG, GREG_CFG_BURST64);
+#else
 	if ((hp->happy_bursts & DMA_BURST64) &&
 	    ((hp->happy_flags & HFLAG_PCI) != 0
 #ifdef CONFIG_SBUS
@@ -1633,6 +1637,7 @@
 		HMD(("XXX>"));
 		hme_write32(hp, gregs + GREG_CFG, 0);
 	}
+#endif /* __sparc__ */
 
 	/* Turn off interrupts we do not want to hear. */
 	HMD((", enable global interrupts, "));
@@ -2887,8 +2892,10 @@
 	/* And of course, indicate this is PCI. */
 	hp->happy_flags |= HFLAG_PCI;
 
+#ifdef __sparc__
 	/* Assume PCI happy meals can handle all burst sizes. */
 	hp->happy_bursts = DMA_BURSTBITS;
+#endif
 
 	hp->happy_block = (struct hmeal_init_block *)
 		pci_alloc_consistent(pdev, PAGE_SIZE, &hp->hblock_dvma);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-11-16  4:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-16  1:16 2.4.0-test11-pre5/drivers/net/sunhme.c compile failure on x86 willy tarreau
2000-11-16  4:08 ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2000-11-16  0:44 Adam J. Richter
2000-11-16  0:35 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®