Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66833
b: refs/heads/master
c: 3603376
h: refs/heads/master
i:
  66831: 76cde67
v: v3
  • Loading branch information
Olof Johansson authored and David S. Miller committed Oct 10, 2007
1 parent 8ea5c3b commit 75feee9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: ca7e235f5eb960d83b45cef4384b490672538cd9
refs/heads/master: 36033766533176d61ba15793d8ef219775499c2f
21 changes: 11 additions & 10 deletions trunk/drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,14 +786,6 @@ static int pasemi_mac_open(struct net_device *dev)

write_mac_reg(mac, PAS_MAC_CFG_TXP, flags);

flags = PAS_MAC_CFG_PCFG_S1 | PAS_MAC_CFG_PCFG_PE |
PAS_MAC_CFG_PCFG_PR | PAS_MAC_CFG_PCFG_CE;

if (mac->type == MAC_TYPE_GMAC)
flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G;
else
flags |= PAS_MAC_CFG_PCFG_TSR_10G | PAS_MAC_CFG_PCFG_SPD_10G;

write_iob_reg(mac, PAS_IOB_DMA_RXCH_CFG(mac->dma_rxch),
PAS_IOB_DMA_RXCH_CFG_CNTTH(0));

Expand All @@ -808,8 +800,6 @@ static int pasemi_mac_open(struct net_device *dev)
write_iob_reg(mac, PAS_IOB_DMA_COM_TIMEOUTCFG,
PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0xffffff));

write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags);

ret = pasemi_mac_setup_rx_resources(dev);
if (ret)
goto out_rx_resources;
Expand Down Expand Up @@ -837,6 +827,17 @@ static int pasemi_mac_open(struct net_device *dev)

pasemi_mac_replenish_rx_ring(dev);

flags = PAS_MAC_CFG_PCFG_S1 | PAS_MAC_CFG_PCFG_PE |
PAS_MAC_CFG_PCFG_PR | PAS_MAC_CFG_PCFG_CE;

if (mac->type == MAC_TYPE_GMAC)
flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G;
else
flags |= PAS_MAC_CFG_PCFG_TSR_10G | PAS_MAC_CFG_PCFG_SPD_10G;

/* Enable interface in MAC */
write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags);

ret = pasemi_mac_phy_init(dev);
/* Some configs don't have PHYs (XAUI etc), so don't complain about
* failed init due to -ENODEV.
Expand Down

0 comments on commit 75feee9

Please sign in to comment.