Browse Source

[eepro100] Remove link-state checking

Christopher Armenio reported link detection problems with an
integrated eepro100 NIC.  Thomas Miletich removed link detection code
from the eepro100 driver and verified that the driver continued to
function.  Christopher verified Thomas' patch on his integrated
eepro100 NIC.

Reported-by: Christopher Armenio <christopher.armenio@resquared.com>
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
tags/v1.20.1
Thomas Miletich 14 years ago
parent
commit
2a36703af2
2 changed files with 1 additions and 48 deletions
  1. 1
    46
      src/drivers/net/eepro100.c
  2. 0
    2
      src/drivers/net/eepro100.h

+ 1
- 46
src/drivers/net/eepro100.c View File

@@ -209,7 +209,7 @@ static int ifec_pci_probe ( struct pci_device *pci,
209 209
 	nvs_read ( &priv->eeprom.nvs, EEPROM_ADDR_MDIO_REGISTER,
210 210
 		   &priv->mdio_register, 2 );
211 211
 
212
-	ifec_link_update ( netdev );	/* Update link state */
212
+	netdev_link_up ( netdev );
213 213
 
214 214
 	if ( ( rc = register_netdev ( netdev ) ) != 0 )
215 215
 		goto error;
@@ -400,7 +400,6 @@ error:
400 400
 static void ifec_net_poll ( struct net_device *netdev )
401 401
 {
402 402
 	struct ifec_private *priv = netdev->priv;
403
-	static int linkpoll = 0;
404 403
 	unsigned short intr_status;
405 404
 
406 405
 	DBGP ( "ifec_net_poll\n" );
@@ -412,11 +411,6 @@ static void ifec_net_poll ( struct net_device *netdev )
412 411
 
413 412
 	DBG2 ( "poll - status: 0x%04X\n", intr_status );
414 413
 
415
-	if ( ++linkpoll > LINK_CHECK_PERIOD ) {
416
-		linkpoll = 0;
417
-		ifec_link_update ( netdev );	/* Update link state */
418
-	}
419
-
420 414
 	/* anything to do here? */
421 415
 	if ( ( intr_status & ( ~INTERRUPT_MASK ) ) == 0 )
422 416
 		return;
@@ -568,45 +562,6 @@ static void ifec_init_eeprom ( struct net_device *netdev )
568 562
 		init_at93c66 ( &priv->eeprom, 16 );
569 563
 }
570 564
 
571
-/*
572
- * Check if the network cable is plugged in.
573
- *
574
- * @v netdev  		Network device to check.
575
- * @ret retval		greater 0 if linkup.
576
- */
577
-static int ifec_link_check ( struct net_device *netdev )
578
-{
579
-	struct ifec_private *priv = netdev->priv;
580
-	unsigned short mdio_register = priv->mdio_register;
581
-
582
-	DBGP ( "ifec_link_check\n" );
583
-
584
-	/* Read the status register once to discard stale data */
585
-	ifec_mdio_read ( netdev, mdio_register & 0x1f, 1 );
586
-	/* Check to see if network cable is plugged in. */
587
-	if ( ! ( ifec_mdio_read ( netdev, mdio_register & 0x1f, 1 )
588
-		  & ( 1 << 2 ) ) ) {
589
-		return 0;
590
-	}
591
-	return 1;
592
-}
593
-
594
-/*
595
- * Check network cable link, inform gPXE as appropriate.
596
- *
597
- * @v netdev  		Network device to check.
598
- */
599
-static void ifec_link_update ( struct net_device *netdev )
600
-{
601
-	DBGP ( "ifec_link_update\n" );
602
-
603
-	/* Update link state */
604
-	if ( ifec_link_check ( netdev ) )
605
-		netdev_link_up ( netdev );
606
-	else
607
-		netdev_link_down ( netdev );
608
-}
609
-
610 565
 /*
611 566
  * Support function: ifec_mdio_read
612 567
  *

+ 0
- 2
src/drivers/net/eepro100.h View File

@@ -183,8 +183,6 @@ static int  ifec_net_transmit ( struct net_device*, struct io_buffer *iobuf );
183 183
 
184 184
 /* Local function prototypes */
185 185
 static void ifec_init_eeprom     ( struct net_device * );
186
-static int  ifec_link_check      ( struct net_device * );
187
-static void ifec_link_update     ( struct net_device * );
188 186
 static int  ifec_mdio_read       ( struct net_device *, int phy, int location );
189 187
 static void ifec_mdio_setup      ( struct net_device *, int options );
190 188
 static int  ifec_mdio_write      ( struct net_device *, int phy, int loc, int val);

Loading…
Cancel
Save