diff --git a/doc/spec-sw.in b/doc/spec-sw.in index aa222053c796d8f3ccb59df2d9d7168c2588a3be..5e3d7f1258a11c6f556bb888393bbb05b0ce9a8d 100644 --- a/doc/spec-sw.in +++ b/doc/spec-sw.in @@ -1261,6 +1261,32 @@ be made safer. @end itemize +@c ########################################################################## +@node Portability +@chapter Portability + +This package should be portable. However I didn't test it on a wide +variety of systems. I used the core @code{spec.ko} on a 32-bit x86 +host, running version 2.6.32 and 3.4 of the kernel. + +The complete package compiles without any warning from version 2.6.37 +up to 3.5 (I didn't try later versions, yet). Frame timestamping +changed seriously after 2.6.36, so the @code{wr-nic.ko} driver is not +easily backward portable. + +To allow use of the core @i{spec} driver, to drive custom mezzanines, +the @i{Makefile} supports the configuration variable +@code{CONFIG_WR_NIC}, which you may set to @code{n} before compiling: + +@smallexample + export CONFIG_WR_NIC=n +@end smallexample + +With this in place, the package compiles without any warning on a +32-bit PC from version 2.6.30 onwards, and I tested up to 3.5. +If you remove MSI code, you can compile back to version 2.6.27; earlier +than that, the backporting effort increases seriously. + @c ########################################################################## @bye diff --git a/kernel/Makefile b/kernel/Makefile index 13cb91ebfdc445dd64f29ecec6c0adcd7daa68d4..6265ecc696ac08805800fdd9340dc1b3ff008344 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -9,8 +9,13 @@ KBUILD_EXTRA_SYMBOLS := $(FMC_DRV)/Module.symvers ccflags-y += -I$M/include -I$(FMC_DRV)/include ccflags-y += $(WR_NIC_CFLAGS) +# this is a bad hack. Sometimes we are a submodule, and wr-nic can +# only compile with recent versions, so let the caller disable it +# FIXME: this is incorrect if we get copied to the kernel proper. +CONFIG_WR_NIC ?= m + obj-m += spec.o -obj-m += wr-nic.o +obj-$(CONFIG_WR_NIC) += wr-nic.o spec-y = spec-pci.o spec-y += spec-fmc.o