diff options
author | Noe Rubinstein <nrubinstein@avencall.com> | 2012-04-13 11:11:58 +0200 |
---|---|---|
committer | Noe Rubinstein <nrubinstein@avencall.com> | 2012-04-24 17:49:40 +0200 |
commit | eca9a4602ba3e50cb9df41194a7d55fd4433bb3a (patch) | |
tree | b7ff2355c42b51d2bbc040ddbf3b224ce86ee72c | |
parent | 38750e7b5456dbe680fd556c701ff4e7212471c7 (diff) |
e1000: misc trivial cleanups
- remove unused spinlocks
- fix indent
- replace "E1000_SUCCESS" with "E1000_NOT_IMPLEMENTED" when it makes sense
-rw-r--r-- | src/drivers/net/e1000/e1000.h | 2 | ||||
-rw-r--r-- | src/drivers/net/e1000/e1000_api.c | 4 | ||||
-rw-r--r-- | src/drivers/net/e1000/e1000_phy.c | 20 |
3 files changed, 12 insertions, 14 deletions
diff --git a/src/drivers/net/e1000/e1000.h b/src/drivers/net/e1000/e1000.h index 31dbb859..c22f6dfc 100644 --- a/src/drivers/net/e1000/e1000.h +++ b/src/drivers/net/e1000/e1000.h @@ -131,7 +131,6 @@ struct e1000_tx_ring { /* array of buffer information structs */ struct e1000_buffer *buffer_info; - spinlock_t tx_lock; u16 tdh; u16 tdt; @@ -200,7 +199,6 @@ struct e1000_adapter { u32 en_mng_pt; u16 link_speed; u16 link_duplex; - spinlock_t stats_lock; unsigned int total_tx_bytes; unsigned int total_tx_packets; unsigned int total_rx_bytes; diff --git a/src/drivers/net/e1000/e1000_api.c b/src/drivers/net/e1000/e1000_api.c index d887aded..232dc3ec 100644 --- a/src/drivers/net/e1000/e1000_api.c +++ b/src/drivers/net/e1000/e1000_api.c @@ -783,7 +783,7 @@ s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 offset, u16 *data) if (hw->phy.ops.read_reg) return hw->phy.ops.read_reg(hw, offset, data); - return E1000_SUCCESS; + return E1000_NOT_IMPLEMENTED; } /** @@ -800,7 +800,7 @@ s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 offset, u16 data) if (hw->phy.ops.write_reg) return hw->phy.ops.write_reg(hw, offset, data); - return E1000_SUCCESS; + return E1000_NOT_IMPLEMENTED; } /** diff --git a/src/drivers/net/e1000/e1000_phy.c b/src/drivers/net/e1000/e1000_phy.c index db80eb28..7b8b3baa 100644 --- a/src/drivers/net/e1000/e1000_phy.c +++ b/src/drivers/net/e1000/e1000_phy.c @@ -167,18 +167,18 @@ s32 e1000_get_phy_id(struct e1000_hw *hw) if (!(phy->ops.read_reg)) goto out; - ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); - if (ret_val) - goto out; + ret_val = phy->ops.read_reg(hw, PHY_ID1, &phy_id); + if (ret_val) + goto out; - phy->id = (u32)(phy_id << 16); - usec_delay(20); - ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); - if (ret_val) - goto out; + phy->id = (u32)(phy_id << 16); + udelay(20); + ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id); + if (ret_val) + goto out; - phy->id |= (u32)(phy_id & PHY_REVISION_MASK); - phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); + phy->id |= (u32)(phy_id & PHY_REVISION_MASK); + phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK); out: return ret_val; |