patch-1.3.50 linux/include/asm-alpha/lca.h
Next file: linux/include/asm-alpha/param.h
Previous file: linux/include/asm-alpha/io.h
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Fri Dec 22 08:22:06 1995
- Orig file:
v1.3.49/linux/include/asm-alpha/lca.h
- Orig date:
Wed Nov 8 07:11:41 1995
diff -u --recursive --new-file v1.3.49/linux/include/asm-alpha/lca.h linux/include/asm-alpha/lca.h
@@ -143,6 +143,14 @@
extern inline void * bus_to_virt(unsigned long address)
{
+ /*
+ * This check is a sanity check but also ensures that bus
+ * address 0 maps to virtual address 0 which is useful to
+ * detect null "pointers" (the NCR driver is much simpler if
+ * NULL pointers are preserved).
+ */
+ if (address < LCA_DMA_WIN_BASE)
+ return 0;
return phys_to_virt(address - LCA_DMA_WIN_BASE);
}
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