Date: Mon, 11 Mar 1996 13:29:30 -0500 (EST) From: "Yaser K. Doleh" <yaser@doleh.com> To: freebsd-hackers@FreeBSD.org Subject: First attempt to write a device driver Message-ID: <199603111829.NAA03888@doleh.com>
next in thread | raw e-mail | index | archive | help
I started writting a device driver for an IBM Token Ring card. I am doing this just to learn how to write a device driver nothing more. here are some of the problems I ran into and I was wordering if somebody can point me to the write direction of where to find more information. When I put an entry in the kernel config like device tr0 at isa? port 0xA20 net irq 11 iomem 0xde000 vector trintr Does this means the routine "trintr" will called when the card generate an interrupt ? I don't seem to be able to get this routine called. I think I followed what the IBM manual says but no interrupts. So from the BSD kernel point of view what is my check list to make sure my "trintr" gets called. How can I tell the kernel that this is a network device ? The kernel does not seem to recongnize the device as a network device ? i.e. when I boot with -c the device is not listed under network devices. I used the ix driver as a starting point and basicly changed what the functions do. I even attached the driver to the ethernet code just to experiment. I can ifconfig the interface, my ioctl function is called and I can ping the interface itself (normal since this has nothing to do with my driver). I am also thinking of really hooking the driver to the ethernet code and just convert tokenring<->ethernet in my driver. So to the machine it will look like this is an ethernet driver but to the network it will look like its a tokenring. Any hints of comments are really appreciated. Very truly yours Yaser Doleh Yaser@Doleh.Com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603111829.NAA03888>