Subject: Ariadne Ethernet driver
To: None <port-amiga@netbsd.org>
From: ali (Anders Lindgren) <dat94ali@ludat.lth.se>
List: port-amiga
Date: 11/26/1999 04:12:20
I needed (need) to figure out how to write an ethernet-driver for the
ariadne (and how to find it on the zbus), so I grabbed zbus.c/zbusvar.h
and if_le.c/if_levar.h off of /pub/NetBSD-current/sys/arch/amiga...
and had a look. Considering I've never written a device-driver
in my life and have no idea what the netbsd devicedriver-api
looks like, I was positively surprised to understand most of
what was going on (or so I believe). A bunch of questions, still:

o It seems there are only functions for reading and writing words
  from/to the card? I don't really know what else there should be,
  I suppose I just expected some frame-related stuff.

o Related to my above expectation: if the card sends stuff when
  it feels like it, doesn't that mean that theoretically the
  IP-layer (let's say it decided an IP packet needed to be frag-
  mented into three parts) could start writing a packet, be
  slow at it (interrupted in some way/heavy load/<whatever here>),
  and suddenly the ethernet-board decides it's waited long enough
  for a complete frame and then sends a fragment of an  IP-frag?
  I mean the board doesn't wait for a complete frame to be filled
  (do correct me if I'm wrong... hrrm redundant request.. :) ) and
  there's no knowing when the board wants to write/tell it you're
  done writing this frame, right? Does the IP-layer take care of
  "putting together fragments of IP-fragments" (since it knows the
  size of IP-headers, it should be able to) if this occurs, or
  what happens here? :)

o Knowing something is available on the card is of course triggered
  by some interrupt somewhere. I'd like to check that part of the
  kernel out. (How to determine what device generated what and how
  it's handled down to the reading from the card); what other source
  does that mean ploughing through?

o Insert any other questions I should've asked in order to understand
  how the kernel reads and writes from the interface here. :)

I guess I'm on my way over to the library looking for "The design
and implementation of the 4.4BSD operating system", seeing how
vast an area of kernel design these questions ended up spanning,
but if someone could help me with the ethernet-interface stuff
(esp. the amiga, zorro-bus and ariadne specifics) I'd appreciate it
a lot. :-)

Thanks in advance everyone.

-- 
/ali: Computer Science Major and aspiring cartoonist. :-) 
(dept) dat94ali@ludat.lth.se - http://www.ludat.lth.se/~dat94ali
(home) ali@h543.sparta.lu.se - http://h543.sparta.lu.se/
* a4000/040/18M/AmigaOS3.0 - NetBSD-1.4.1 - cogito, amiga sum *