From owner-cvs-all Wed Sep 8 1:48:48 1999 Delivered-To: cvs-all@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id A23AC14CE7; Wed, 8 Sep 1999 01:48:05 -0700 (PDT) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 8DA8A1CA9; Wed, 8 Sep 1999 16:45:46 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.0.2 2/24/98 To: Bruce Evans Cc: "Matthew N. Dodd" , Bruce Evans , dfr@nlsystems.com, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/conf files.alpha src/sys/i386/conf files.i386 src/sys/conf files src/sys/dev/sio sio.c src/sys/isa sio.c sioreg.h In-reply-to: Your message of "Wed, 08 Sep 1999 14:50:49 +1000." Date: Wed, 08 Sep 1999 16:45:46 +0800 From: Peter Wemm Message-Id: <19990908084546.8DA8A1CA9@overcee.netplex.com.au> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Bruce Evans wrote: > > On Tue, 7 Sep 1999, Bruce Evans wrote: > > > Right now I'm only objecting to the misorganisation in /dev. I have > > > objected to it before :-). I don't want directories with 1 or 2 files > > > in them. The bus-independent part of the sio driver probably needs 2 > > > files, sio.c and siovar.h (not the existing sioreg.h). > > > > Right now sys/dev/sio has 1 or 2 files. > > > > In the future it will have as many as 10. > > > > sio_isa.c > > sio_pci.c > > sio_mca.c > > sio_eisa.c > > > > etc... > > I hope not. At the moment there are things like this: com->loses_outints = COM_LOSESOUTINTS(flags) != 0; com->no_irq = isa_get_irq(dev) < 0; # <<<<< com->tx_fifo_size = 1; which are scattered throughout the probe/attach code. Would you rather: com->loses_outints = COM_LOSESOUTINTS(flags) != 0; #if NISA > 0 if (com->busmode == COM_ISA) com->no_irq = isa_get_irq(dev) < 0; #endif #if NEISA > 0 if (com->busmode == COM_EISA) com->no_irq = rman_get_start(com->irqres) < 0; #endif #if NPCI > 0 if (com->busmode == COM_PCI) .... #endif .. NMCA .. NPCCARD .. etc. com->tx_fifo_size = 1; .. or would you prefer it being done properly? > > Keeping all the files for a particular driver in 1 place and not all > > spread out makes propogating changes to the various files a little easier > > to manage no? > > No :-). > > Changes should rarely need to be propagated if the core is properly > designed. E.g., in my cy driver, which is similar to sio, I rarely > had to even look at cy_pci.c. .. cy.c/cy_pci.c are are a near perfect example of what we want to do. Things like com_addr() etc would be fixed to not call external functions, the newbus stuff wouldn't intrude on the probe/attach code and so on. > Bruce Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message