diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/net/eepro100.c | 47 | ||||
-rw-r--r-- | src/drivers/net/eepro100.h | 2 |
2 files changed, 1 insertions, 48 deletions
diff --git a/src/drivers/net/eepro100.c b/src/drivers/net/eepro100.c index 8a75608..3ad45bf 100644 --- a/src/drivers/net/eepro100.c +++ b/src/drivers/net/eepro100.c @@ -209,7 +209,7 @@ static int ifec_pci_probe ( struct pci_device *pci, nvs_read ( &priv->eeprom.nvs, EEPROM_ADDR_MDIO_REGISTER, &priv->mdio_register, 2 ); - ifec_link_update ( netdev ); /* Update link state */ + netdev_link_up ( netdev ); if ( ( rc = register_netdev ( netdev ) ) != 0 ) goto error; @@ -400,7 +400,6 @@ error: static void ifec_net_poll ( struct net_device *netdev ) { struct ifec_private *priv = netdev->priv; - static int linkpoll = 0; unsigned short intr_status; DBGP ( "ifec_net_poll\n" ); @@ -412,11 +411,6 @@ static void ifec_net_poll ( struct net_device *netdev ) DBG2 ( "poll - status: 0x%04X\n", intr_status ); - if ( ++linkpoll > LINK_CHECK_PERIOD ) { - linkpoll = 0; - ifec_link_update ( netdev ); /* Update link state */ - } - /* anything to do here? */ if ( ( intr_status & ( ~INTERRUPT_MASK ) ) == 0 ) return; @@ -569,45 +563,6 @@ static void ifec_init_eeprom ( struct net_device *netdev ) } /* - * Check if the network cable is plugged in. - * - * @v netdev Network device to check. - * @ret retval greater 0 if linkup. - */ -static int ifec_link_check ( struct net_device *netdev ) -{ - struct ifec_private *priv = netdev->priv; - unsigned short mdio_register = priv->mdio_register; - - DBGP ( "ifec_link_check\n" ); - - /* Read the status register once to discard stale data */ - ifec_mdio_read ( netdev, mdio_register & 0x1f, 1 ); - /* Check to see if network cable is plugged in. */ - if ( ! ( ifec_mdio_read ( netdev, mdio_register & 0x1f, 1 ) - & ( 1 << 2 ) ) ) { - return 0; - } - return 1; -} - -/* - * Check network cable link, inform gPXE as appropriate. - * - * @v netdev Network device to check. - */ -static void ifec_link_update ( struct net_device *netdev ) -{ - DBGP ( "ifec_link_update\n" ); - - /* Update link state */ - if ( ifec_link_check ( netdev ) ) - netdev_link_up ( netdev ); - else - netdev_link_down ( netdev ); -} - -/* * Support function: ifec_mdio_read * * This probably reads a register in the "physical media interface chip". diff --git a/src/drivers/net/eepro100.h b/src/drivers/net/eepro100.h index 17a22df..1592c63 100644 --- a/src/drivers/net/eepro100.h +++ b/src/drivers/net/eepro100.h @@ -183,8 +183,6 @@ static int ifec_net_transmit ( struct net_device*, struct io_buffer *iobuf ); /* Local function prototypes */ static void ifec_init_eeprom ( struct net_device * ); -static int ifec_link_check ( struct net_device * ); -static void ifec_link_update ( struct net_device * ); static int ifec_mdio_read ( struct net_device *, int phy, int location ); static void ifec_mdio_setup ( struct net_device *, int options ); static int ifec_mdio_write ( struct net_device *, int phy, int loc, int val); |