2.3.51 tulip broken

B. James Phillippe bryan@terran.org
Thu Mar 16 05:38:05 2000


On Thu, 16 Mar 2000, Jeff Garzik wrote:

> On Tue, 14 Mar 2000, Michael Chaney wrote:
> 
> > [snip]
> > > The biggest obstacle to this task is the
> > > above -- someone needs to go through the Tulip spec(s), and replace
> > > magic numbers with constants.
> > 
> > Ah, so replacing raw numbers with a defined constant, and thus adding yet
> > another layer of complexity, will fix all your programming problems?
> 
> In this particular case, no, apparently the values are dependent on each
> other.
> 
> However, in general the approach is correct, as it results in easier
> code maintenance over the long term.  Basic software engineering.

Having spent a lot of time working with (and on) the tulip.c driver, I'm
not sure symbolic constants would help much.  At least, compare the design
of de4x5.c and tulip.c; the former of which uses symbolic constants
everywhere and it's just as hard to read. :-)

Symbolic or numeric constants aside, one readability issue with tulip.c is
that there could be better inline documentation in some of the tough spots
(such as when we are dealing with media negotiation; command-status
registers are written with hard constants logically masked with some other
hard constants).

Without the databook handy, you have no hope.  Not that inline docs would
help that, but inline docs might at least get you started on the right
chapter faster. 8-)

-bp
--
# bryan at terran dot org
# http://www.terran.org/~bryan

-------------------------------------------------------------------
To unsubscribe send a message body containing "unsubscribe"
to linux-tulip-request@beowulf.org