From owner-freebsd-hackers Sat Feb 25 10:22:38 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id KAA21929 for hackers-outgoing; Sat, 25 Feb 1995 10:22:38 -0800 Received: from inet-gw-2.pa.dec.com (inet-gw-2.pa.dec.com [16.1.0.23]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id KAA21921 for ; Sat, 25 Feb 1995 10:22:34 -0800 Received: from muggsy.lkg.dec.com by inet-gw-2.pa.dec.com (5.65/10Aug94) id AA09705; Sat, 25 Feb 95 10:16:03 -0800 Received: from whydos.lkg.dec.com by muggsy.lkg.dec.com (5.65/DEC-Ultrix/4.3) with SMTP id AA03393; Sat, 25 Feb 1995 13:16:01 -0500 Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.9/8.6.9) with SMTP id OAA22620 for ; Sat, 25 Feb 1995 14:18:56 GMT Message-Id: <199502251418.OAA22620@whydos.lkg.dec.com> X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO protocol To: freebsd-hackers@freefall.cdrom.com Subject: Ambidextrous Devices X-Mailer: exmh version 1.5omega 10/6/94 Date: Sat, 25 Feb 1995 14:18:55 +0000 From: Matt Thomas Sender: hackers-owner@FreeBSD.org Precedence: bulk I'm finishing a driver for the DEC DEFPA [PCI] and DEFEA [EISA] FDDI Controllers for FreeBSD. Though at the moment I'm stumped by a problem. Except for the probe and attach routines, the driver runs the exact code for either device. Should I use two separate device names as in: device fea0 at isa? bio irq ? vector fea_intr device fpa0 or should I use one device name to refer to both? device pdq0 at isa? bio irq ? vector fea_intr device pdq1 If the latter, how do I get the PCI code to start at unit 1? Can I set the pdq_count variable to a non-zero value [Hmmm. I should try that]? If the former, how do I distinguish between fea unit 0 and fpa unit 0 in the same driver? Do I really need separate init and reset routines (which would common routines)? Is config smart enough to understand that a source file could be used by two difference devices? Would separte device names be preferred by users or would a single one be best? Any ideas or feedback will be greatly appreciated, Matt Thomas Internet: matt@lkg.dec.com U*X Networking WWW URL: http://ftp.dec.com/%7Ethomas/ Digital Equipment Corporation Disclaimer: This message reflects my Littleton, MA own warped views, etc.