Date: Sat, 25 Feb 1995 14:18:55 +0000 From: Matt Thomas <matt@lkg.dec.com> To: freebsd-hackers@freefall.cdrom.com Subject: Ambidextrous Devices Message-ID: <199502251418.OAA22620@whydos.lkg.dec.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502251418.OAA22620>