patch-1.3.81 linux/include/asm-alpha/floppy.h

Next file: linux/include/asm-i386/bitops.h
Previous file: linux/include/asm-alpha/dma.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.80/linux/include/asm-alpha/floppy.h linux/include/asm-alpha/floppy.h
@@ -10,6 +10,8 @@
 #ifndef __ASM_ALPHA_FLOPPY_H
 #define __ASM_ALPHA_FLOPPY_H
 
+#include <linux/config.h>
+
 #define fd_inb(port)			inb_p(port)
 #define fd_outb(port,value)		outb_p(port,value)
 
@@ -47,8 +49,13 @@
 #define N_DRIVE 8
 
 /*
- * The Alpha has no problems with floppy DMA crossing 64k borders.
+ * Most Alphas have no problems with floppy DMA crossing 64k borders. Sigh...
  */
-#define CROSS_64KB(a,s)	(0)
+#ifdef CONFIG_ALPHA_XL
+#define CROSS_64KB(a,s) \
+    ((unsigned long)(a)/0x10000 != ((unsigned long)(a) + (s) - 1) / 0x10000)
+#else /* CONFIG_ALPHA_XL */
+#define CROSS_64KB(a,s) (0)
+#endif /* CONFIG_ALPHA_XL */
 
 #endif /* __ASM_ALPHA_FLOPPY_H */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this