Date: Mon, 11 Mar 1996 19:54:06 -0500 (EST) From: "Yaser K. Doleh" <yaser@doleh.com> To: msmith@atrad.adelaide.edu.au (Michael Smith) Cc: freebsd-hackers@FreeBSD.org Subject: Re: First attempt to write a device driver Message-ID: <199603120054.TAA05485@doleh.com> In-Reply-To: <199603120016.KAA24351@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Mar 12, 96 10:46:43 am
next in thread | previous in thread | raw e-mail | index | archive | help
I have one more questions which I could not figure out by looking at the source. The card have 64K shared memory which can be mapped into the machine address space. I can map 16K, 32K or the whole 64K into the address space. My question is how can I find an empty slot in the area 640 - 1MB that I can map this memory into. The driver must choose the location and set a register in the Token Ring card to tell it where to map the memory. My second question is "Do I use pmap_mapdev function ?" Michael Smith said in a letter > > Make sure the above is in your config, make sure you have interrupts > enabled on the card. > It must be the card not sending any interrupts. I guess I have to RTFM that IBM manual again. > You mean the 'visual' mode doesn't know your driver? That's because there's > no way for it to find all the names of drivers installed itself, so that > information is in the table at the top of /sys/i386/i386/userconfig.c. > Look for the string "EDIT THIS LIST", and create an entry like the other > network devices. > Yes, that's what I was looking for. Thank you. > Looks like you've got the rest of the skeleton working fine. > Yes, most of it is there. > > 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. > > Um, that's an interesting approach. I'd be inclined to seperate the two so > that the token-specific code could be reused for other hardware though. > That was a suggestion of somebody else which made me think "This is a good idea, I can get the Hardware driver working first and test it this way then I can worry about the higher layer later". I am not at that point yet, I just wanted to see what people will think about this approach. If I decide to take this approach, I will definitly seperate the driver from the conversion routines. I also have been looking at if_ethersubr.c and if_fddisubr.c files to see how easy will it be to write similar functions to handle Token Ring. > Have a look at /sys/net/if_ether.c. There's already code in there to handle > LLC (look for "LLC" 8) which I believe is the major obstacle. Your driver > shouldn't try to interpret the contents of packets itself. Thanks, I'll check it out. 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?199603120054.TAA05485>
