diff options
-rw-r--r-- | drivers/net/pasemi_mac.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 8892b658655c..643fce860e5c 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -786,14 +786,6 @@ static int pasemi_mac_open(struct net_device *dev) | |||
786 | 786 | ||
787 | write_mac_reg(mac, PAS_MAC_CFG_TXP, flags); | 787 | write_mac_reg(mac, PAS_MAC_CFG_TXP, flags); |
788 | 788 | ||
789 | flags = PAS_MAC_CFG_PCFG_S1 | PAS_MAC_CFG_PCFG_PE | | ||
790 | PAS_MAC_CFG_PCFG_PR | PAS_MAC_CFG_PCFG_CE; | ||
791 | |||
792 | if (mac->type == MAC_TYPE_GMAC) | ||
793 | flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G; | ||
794 | else | ||
795 | flags |= PAS_MAC_CFG_PCFG_TSR_10G | PAS_MAC_CFG_PCFG_SPD_10G; | ||
796 | |||
797 | write_iob_reg(mac, PAS_IOB_DMA_RXCH_CFG(mac->dma_rxch), | 789 | write_iob_reg(mac, PAS_IOB_DMA_RXCH_CFG(mac->dma_rxch), |
798 | PAS_IOB_DMA_RXCH_CFG_CNTTH(0)); | 790 | PAS_IOB_DMA_RXCH_CFG_CNTTH(0)); |
799 | 791 | ||
@@ -808,8 +800,6 @@ static int pasemi_mac_open(struct net_device *dev) | |||
808 | write_iob_reg(mac, PAS_IOB_DMA_COM_TIMEOUTCFG, | 800 | write_iob_reg(mac, PAS_IOB_DMA_COM_TIMEOUTCFG, |
809 | PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0xffffff)); | 801 | PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0xffffff)); |
810 | 802 | ||
811 | write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); | ||
812 | |||
813 | ret = pasemi_mac_setup_rx_resources(dev); | 803 | ret = pasemi_mac_setup_rx_resources(dev); |
814 | if (ret) | 804 | if (ret) |
815 | goto out_rx_resources; | 805 | goto out_rx_resources; |
@@ -837,6 +827,17 @@ static int pasemi_mac_open(struct net_device *dev) | |||
837 | 827 | ||
838 | pasemi_mac_replenish_rx_ring(dev); | 828 | pasemi_mac_replenish_rx_ring(dev); |
839 | 829 | ||
830 | flags = PAS_MAC_CFG_PCFG_S1 | PAS_MAC_CFG_PCFG_PE | | ||
831 | PAS_MAC_CFG_PCFG_PR | PAS_MAC_CFG_PCFG_CE; | ||
832 | |||
833 | if (mac->type == MAC_TYPE_GMAC) | ||
834 | flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G; | ||
835 | else | ||
836 | flags |= PAS_MAC_CFG_PCFG_TSR_10G | PAS_MAC_CFG_PCFG_SPD_10G; | ||
837 | |||
838 | /* Enable interface in MAC */ | ||
839 | write_mac_reg(mac, PAS_MAC_CFG_PCFG, flags); | ||
840 | |||
840 | ret = pasemi_mac_phy_init(dev); | 841 | ret = pasemi_mac_phy_init(dev); |
841 | /* Some configs don't have PHYs (XAUI etc), so don't complain about | 842 | /* Some configs don't have PHYs (XAUI etc), so don't complain about |
842 | * failed init due to -ENODEV. | 843 | * failed init due to -ENODEV. |