Hi Jeff! On Thursday 08 August 2002 22:36, Jeff Garzik wrote: > >>I'm currently working on epic100-fiber support for the SMC9432FTX-SC > >> cards using the LevelOne LXT970 transceiver (patch will follow in the > >> next days). > >> > >>I now added the necessary symbols to include/linux/mii.h as I think this > >> is better then coding the magic numbers in epic100.c. [...] > While the information does indeed look useful, we pretty much want to > follow the standard rule of information visibility: make symbols only > as visible as they need to be. Your initial comment indicates that the > LXT970-specific symbols would be applicable to epic100.c. If so, they > should go in there. > > The exception, of course, is that when these symbols would be needed in > multiple .c files. For that case, your patch would be correct. > > Comments? I had two reasons for including these symbols in the general mii.h file: a) Many of the registers which are defined already in mii.h (0x12-0x1c, see my comments in changed mii.h) are indeed for some special transceiver - I think for the DP83840 which is still mentioned at some places in mii.h. So I decided it can cause no harm to have special registers for a 2nd transceiver included in the file, too. Some short greps show that these DP83840-special symbols aren't used anywhere in the other network drivers. According to this rule, these symbols should be taken out of mii.h, too. b) Unfortunately, I've no overview which cards use which chipsets - but the LXT970 could be used in other network cards, too - so it could be useful for additional .c files in the future, too. For example, tlan.c mentions the LXT970, too... I don't know much of your rules (shame on me), but my suggestion would be: - take the DP83840 symbols out of mii.h into drivers/net/sunmeh.h - put the lxt970 symbols, preferably to lxt970.h (so another programmer who wants to support a card containing the LXT970 will find them) or to epic100.h What do you think? Just tell me your decision and I'll try to fulfill it ;-)) -- Ciao, Gernot - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html