2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-23 10:01:47 +00:00

[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>
This commit is contained in:
Thomas Miletich 2010-04-16 18:11:39 +02:00 committed by Marty Connor
parent 70537cbe35
commit 2a36703af2
2 changed files with 1 additions and 48 deletions

View File

@ -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;
@ -568,45 +562,6 @@ static void ifec_init_eeprom ( struct net_device *netdev )
init_at93c66 ( &priv->eeprom, 16 );
}
/*
* 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
*

View File

@ -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);