Re: [PATCH] via-rhine PCI fast ethernet driver in 2.3.19

Jeff Garzik (jgarzik@pobox.com)
Sat, 09 Oct 1999 15:20:05 -0400


Florent Villard wrote:
>
> Hello,
>
> It seems that the test to define ioremap and iounmap in the 2.3.19 linux
> kernel change and that the version test does not exist any more, but IIRC
> ioremap and ioumap definition are only needed in 2.0.x kernel, so it may
> be usefull to apply following patch (it works fine for me).
>
> bye,
>
> --- /usr/src/linux/drivers/net/via-rhine.c Sat Oct 9 15:39:14 1999
> +++ via-rhine.c Sat Oct 9 15:38:42 1999
> @@ -113,8 +113,10 @@
> char kernel_version[] = UTS_RELEASE;
> #else
> #ifndef __alpha__
> +#if (LINUX_VERSION_CODE >= 0x20100)
> #define ioremap vremap
> #define iounmap vfree
> +#endif
> #endif
> #endif
> #if defined(MODULE) && LINUX_VERSION_CODE > 0x20115

In recent kernels you _should_ be using ioremap and iounmap for all
MMIO. See linux/Documentation/IO-mapping.txt.

Since Linus has said he doesn't like version checking code, IMHO the
correct change to the patch above [without actually looking at the code]
should simply remove everything inside the #else...#endif

Regards,

Jeff

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

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