Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5539
b: refs/heads/master
c: d8a0994
h: refs/heads/master
i:
  5537: e98905a
  5535: bfda5ba
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Jul 31, 2005
1 parent b402f53 commit 86c2223
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 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: 2c66851460c9438823e39b76887376d1511fb67c
refs/heads/master: d8a09943ebbaca9befd995d8fe10dd9885256dbf
17 changes: 10 additions & 7 deletions trunk/drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,8 +1818,8 @@ static void yukon_stop(struct skge_port *skge)
gma_read16(hw, port, GM_GP_CTRL);

/* set GPHY Control reset */
gma_write32(hw, port, GPHY_CTRL, GPC_RST_SET);
gma_write32(hw, port, GMAC_CTRL, GMC_RST_SET);
skge_write32(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET);
skge_write32(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET);
}

static void yukon_get_stats(struct skge_port *skge, u64 *data)
Expand Down Expand Up @@ -1850,11 +1850,12 @@ static void yukon_mac_intr(struct skge_hw *hw, int port)

if (status & GM_IS_RX_FF_OR) {
++skge->net_stats.rx_fifo_errors;
gma_write8(hw, port, RX_GMF_CTRL_T, GMF_CLI_RX_FO);
skge_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_CLI_RX_FO);
}

if (status & GM_IS_TX_FF_UR) {
++skge->net_stats.tx_fifo_errors;
gma_write8(hw, port, TX_GMF_CTRL_T, GMF_CLI_TX_FU);
skge_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_CLI_TX_FU);
}

}
Expand Down Expand Up @@ -1898,12 +1899,14 @@ static void yukon_link_down(struct skge_port *skge)
{
struct skge_hw *hw = skge->hw;
int port = skge->port;
u16 ctrl;

pr_debug("yukon_link_down\n");
gm_phy_write(hw, port, PHY_MARV_INT_MASK, 0);
gm_phy_write(hw, port, GM_GP_CTRL,
gm_phy_read(hw, port, GM_GP_CTRL)
& ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA));

ctrl = gma_read16(hw, port, GM_GP_CTRL);
ctrl &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
gma_write16(hw, port, GM_GP_CTRL, ctrl);

if (skge->flow_control == FLOW_MODE_REM_SEND) {
/* restore Asymmetric Pause bit */
Expand Down
11 changes: 0 additions & 11 deletions trunk/drivers/net/skge.h
Original file line number Diff line number Diff line change
Expand Up @@ -2606,17 +2606,6 @@ static inline void gma_write16(const struct skge_hw *hw, int port, int r, u16 v)
skge_write16(hw, SK_GMAC_REG(port,r), v);
}

static inline void gma_write32(const struct skge_hw *hw, int port, int r, u32 v)
{
skge_write16(hw, SK_GMAC_REG(port, r), (u16) v);
skge_write32(hw, SK_GMAC_REG(port, r+4), (u16)(v >> 16));
}

static inline void gma_write8(const struct skge_hw *hw, int port, int r, u8 v)
{
skge_write8(hw, SK_GMAC_REG(port,r), v);
}

static inline void gma_set_addr(struct skge_hw *hw, int port, int reg,
const u8 *addr)
{
Expand Down

0 comments on commit 86c2223

Please sign in to comment.