[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patching 2.2.19 drivers (was Re: EEpro100 ID2499)



Hi,

On Sun, Jul 29, 2001 at 03:47:53PM +0200, Ulrich Eckhardt wrote:
> You could do me (and possibly others) a favor: make some notes on how you 
> integrated that driver into gnumach. I also started something like that but 
> was stopped/confused by the strange source-tree.

About the driver tree. The linux drivers from 2.0.x sit in
gnumach-1.2/linux/src/drivers and the includes from that vintage are
in gnumach-1.2/linux/src/include. However, of late some of the 2.2.x
stuff which does not conflict with the 2.0.x stuff has also made it into
these places.

Attached are the notes. Not particularly verbose but I hope they help
anyway.

Kapil.

-- 
Always use GPG for privacy; finger -l kapil@imsc.ernet.in or
 http://www.imsc.ernet.in/~kapil/gpg.html for my Public Key.
------------------------------------------------------------------
 768D/FED1D08D 2000-02-19 Kapil Hari Paranjape <kapil@imsc.ernet.in>
1024g/CECEB39B 2000-02-19 Kapil Hari Paranjape <kapil@imsc.ernet.in>
Key fingerprint = B6D2 F4F2 A37C B887 DFA2  9100 5F22 0D1D FED1 D08D
--
1. I grabbed some of the include files based on the old eepro100.c
source and some on the basis of the tulip.c driver which has been
incorporated from linux 2.2.17 earlier by Jason Henry Parker
<jasonp@uq.net.au>.

2. The LINUX_VERSION based defines and includes were also taken from
this file (i.e. gnumach-1.2/linux/src/drivers/net/tulip.c).

3. The major difficulty in incorporating the 2.2.x drivers is that
the PCI stuff has many new functions. Some but not all are in
<linux/compatmac.h>. Thus we have no pcibios_find_slot function
which returns the pci_dev structure "pdev". We need to use the
pcibios_read_config_dword function and "fill" in the pdev structure with
"irq" info. We also need to use it to get the I/O address.

4. The statistics structure for the network devices in gnumach does
not have an entry to count bytes so updates for this have to be
commented out.

5. I had to define USE_IO. This was the last tweak required. (There is
perhaps no memory-mapped I/O in the gnumach?). In any case I was only
able to get the driver working by forcing the driver to use I/O ports.

6. You need to have a lot of patience/persistence to keep "debugging"
the gnumach kernel. The eepro100.c.2.2.19 driver has "kernel bloat"
in the form of debugging messages which are quite informative. If
such messages do not exist in the driver you are trying to port then
you may have to add them by hand.


Reply to: