Re: Porting Linux v2.2.x Ethernet driver to v2.4.x?

Jeff Garzik
2000-11-09T18:11:21Z

Steven_Snyder@3com.com wrote:
>
> Hello.
>
> I am about to modify a Linux v2.2.x-compatible Ethernet driver to allow it to
> work in the new v2.4.x kernel. Are there any documents which describe the
> differences in the device driver models (particularly PCI and Ethernet) of the 2
> kernel versions? If so, where can I find them?

Not all in one place. Read:

Documentation/pci.txt
Documentation/DMA-mapping.txt
Documentation/IO-mapping.txt
and the attached document, regarding netdevice member locking rules.

Your best reference is other PCI ethernet drivers. grep for
'pci_module_init' in drivers/net/*.c of the most recent 2.4.x kernel,
for a good start.

Also... before you start thinking about gunking-up your driver with all
sorts of backwards-compatibility code... remember that most 2.4.x
drivers can easily be backported to 2.2.x with a few magic macros and
static inline functions. I have an example of this sort of thing at
http://gtf.org/garzik/drivers/kcompat24/

Jeff

--
Jeff Garzik |
Building 1024 | Would you like a Twinkie?
MandrakeSoft |