Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267636
b: refs/heads/master
c: c922d12
h: refs/heads/master
v: v3
  • Loading branch information
Mark Einon authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent a088a08 commit b324a26
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10f00a49b048abf759b789a84c4c3431360aa38f
refs/heads/master: c922d1241ff37ab2db0f1a29e4b043fe1d8a8e8c
26 changes: 1 addition & 25 deletions trunk/drivers/staging/et131x/et1310_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,16 +737,6 @@ void et131x_mii_check(struct et131x_adapter *adapter,
if (bmsr_ints & MI_BMSR_LINK_STATUS) {
if (bmsr & MI_BMSR_LINK_STATUS) {
adapter->boot_coma = 20;

/* Update our state variables and indicate the
* connected state
*/
spin_lock_irqsave(&adapter->lock, flags);

adapter->media_state = NETIF_STATUS_MEDIA_CONNECT;

spin_unlock_irqrestore(&adapter->lock, flags);

netif_carrier_on(adapter->netdev);
} else {
dev_warn(&adapter->pdev->dev,
Expand All @@ -768,21 +758,7 @@ void et131x_mii_check(struct et131x_adapter *adapter,
et131x_mii_write(adapter, 0x12, register18);
}

/* For the first N seconds of life, we are in "link
* detection" When we are in this state, we should
* only report "connected". When the LinkDetection
* Timer expires, we can report disconnected (handled
* in the LinkDetectionDPC).
*/
if (adapter->media_state == NETIF_STATUS_MEDIA_DISCONNECT) {
spin_lock_irqsave(&adapter->lock, flags);
adapter->media_state =
NETIF_STATUS_MEDIA_DISCONNECT;
spin_unlock_irqrestore(&adapter->lock,
flags);

netif_carrier_off(adapter->netdev);
}
netif_carrier_off(adapter->netdev);

adapter->linkspeed = 0;
adapter->duplex_mode = 0;
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/staging/et131x/et131x_adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ struct et131x_adapter {
u8 ai_force_duplex; /* duplex setting */
u16 ai_force_speed; /* 'Speed', user over-ride of line speed */
u8 flowcontrol; /* flow control validated by the far-end */
enum {
NETIF_STATUS_INVALID = 0,
NETIF_STATUS_MEDIA_CONNECT,
NETIF_STATUS_MEDIA_DISCONNECT,
NETIF_STATUS_MAX
} media_state;

/* Minimize init-time */
struct timer_list error_timer;
Expand Down
23 changes: 1 addition & 22 deletions trunk/drivers/staging/et131x/et131x_initpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,6 @@ void et131x_error_timer_handler(unsigned long data)
TX_ERROR_PERIOD * HZ / 1000);
}

/**
* et131x_link_detection_handler
*
* Timer function for link up at driver load time
*/
void et131x_link_detection_handler(unsigned long data)
{
struct et131x_adapter *adapter = (struct et131x_adapter *) data;
unsigned long flags;

if (adapter->media_state == 0) {
spin_lock_irqsave(&adapter->lock, flags);

adapter->media_state = NETIF_STATUS_MEDIA_DISCONNECT;

spin_unlock_irqrestore(&adapter->lock, flags);

netif_carrier_off(adapter->netdev);
}
}

/**
* et131x_configure_global_regs - configure JAGCore global regs
* @adapter: pointer to our adapter structure
Expand Down Expand Up @@ -718,7 +697,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
adapter->error_timer.data = (unsigned long)adapter;

/* Initialize link state */
et131x_link_detection_handler((unsigned long)adapter);
netif_carrier_off(adapter->netdev);

/* Initialize variable for counting how long we do not have
link status */
Expand Down

0 comments on commit b324a26

Please sign in to comment.