Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!agate!tfs.com!tfs.com!julian From: julian@tfs.com (Julian Elischer) Subject: eisa_configure.c (New file) Ideas? Message-ID: <1992Sep29.030348.14686@tfs.com> Organization: TRW Financial Systems Date: Tue, 29 Sep 1992 03:03:48 GMT Lines: 77 I am today, abiut half way through writing my second EISA scsi controller driver for 386bsd and MACH. What is becoming apparent is that there needs to be an EISA version of the routine isa_configure(). Background: Each slot in an EISA machine decodes out to different addresses for EISA Extended Registers, e.g. the EER ID registers will appear at location 0x1C80 for the first slot, 0x2C80 for the second 0x3C80 for the third 0x4C80 for the forth etc. ================The ideal way of configuring the system========== If I know there are drivers for 3 cards A,B and C in the kernel, I can step through the slots, reading the ID ports for each slot and doing an 'attach' on the correct driver. If a slot has no EISA card, or one I don't recognise, I just move on to the next. The eisa_config table would appear as: struct eisa_config{ (*int)() fn; char manufacturer[4]; int productnum; }eisa_config[] = { {ahbattach,"ADP",0} /*adaptec 174[02]*/ ,{ahbattach,"ADP",1} /*adaptec 1744*/ ,{btattach,"BTK",0} /*bustek 742*/ (just a guess) ,{lneattch,"MLX",0} /*mylex lne enet*/ }; This does not fit in well with the present ISA configuration methods. ===============What I am implimenting for now================= What I am going to do for the first version of these cards, is to allow the isa_configure() to call my probe routines as normal, and the probe routine will move up through the slots looking for an instance of the board it knows, and then write the port number (0x1000 or 0x2000 etc) to the isa_device structure along with the interrupt vector and dma info. This info will then be present when isa_configure() validates it as not clashing with another device. If The device has been configured a second time, slot scanning will resume at the next slot after the last board found. note that in this method the config file need not specify a dma,vector or port because the probe routine will find this information and write it into the isa_device structure at boot time. The values will be as selected by the user in the EISA CONFIGURE (DOS) program. While the second method will work, I would prefer the first. =================The third alternative=================== pretend they are ISA devices and specify the port address fully in the config, i.e. they will only be found if they are in the right slot. This sounds like trouble to me. I would like feedback on this issue, particularly from the likes of bill and lynne, the crowd at CSRG, or the lynux crowd. But don't feel shy if you're just joe random-hacker. I'd like to know where we're going on EISA support. julian +----------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / On assignment | / \ julian@tfs.com +------>x USA \ in a very strange | ( OZ ) 2118 Milvia st. Berkeley CA. \___ ___ | country ! +- X_.---._/ USA+(510) 704-3137(wk) \_/ \\ v