hp100: Detect coax cabling
Hi!
This is only non-trivial patch from this series. It prints coax vs. 10baseT information to the user, and fixes indentation. Please apply,
Pavel
drivers/net/hp100.c +12 -4
@@ -356,8 +353,8 @@* address - Jean II */ static inline dma_addr_t virt_to_whatever (struct net_device *dev,u32 * ptr) { -return ((u_long ) ptr) + - ((struct hp100_private *) (dev->priv))->whatever_offset; +return ((u_long ) ptr) + + ((struct hp100_private *) (dev->priv))->whatever_offset; }/* TODO: This function should not really be needed in a good design... */
@@ -854,7 +849,10 @@printk ("100Mb/s Voice Grade AnyLAN network.\n" );break ;case HP100_LAN_10 : -printk ("10Mb/s network.\n" ); +printk ("10Mb/s network (10baseT).\n" ); +break ; +case HP100_LAN_COAX : +printk ("10Mb/s network (coax).\n" );break ;default :printk ("Warning! Link down.\n" );
@@ -2535,11 +2534,16 @@return HP100_LAN_10 ;if (val_10 &HP100_AUI_ST ) {/* have we BNC or AUI onboard? */ +/* +* This can be overriden by dos utility, so if this has no effect, +* perhaps you need to download that utility from HP and set card +* back to "auto detect". +*/ val_10 |=HP100_AUI_SEL |HP100_LOW_TH ;hp100_page (MAC_CTRL ); hp100_outb(val_10, 10_LAN_CFG_1);hp100_page (PERFORMANCE ); -return HP100_LAN_10 ; +return HP100_LAN_COAX ; } if ((lp->id->id == 0x02019F022) ||
drivers/net/hp100.h +1 -0
@@ -518,12 +518,13 @@*/ #define HP100_LAN_100 100/* lan_type value for VG */ #define HP100_LAN_10 10/* lan_type value for 10BaseT */ +#define HP100_LAN_COAX 9/* lan_type value for Coax */ #define HP100_LAN_ERR (-1)/* lan_type value for link down */ #define TRUE 1#define FALSE 0/* * Bus Master Data Structures ---------------------------------------------- */
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email?