pasemi_mac: set interface speed correctly on XAUI ports
authorOlof Johansson <olof@lixom.net>
Wed, 26 Sep 2007 21:23:31 +0000 (16:23 -0500)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:53:42 +0000 (16:53 -0700)
pasemi_mac: set interface speed correctly on XAUI ports

Set interface speed for XAUI to 10G per default, not 1G.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/pasemi_mac.c

index 912bc5d33d289797aabff743536d73a87faa458a..daba11062d3bd9eab410d91af3f51b4e1d7b3b25 100644 (file)
@@ -789,7 +789,10 @@ static int pasemi_mac_open(struct net_device *dev)
        flags = PAS_MAC_CFG_PCFG_S1 | PAS_MAC_CFG_PCFG_PE |
                PAS_MAC_CFG_PCFG_PR | PAS_MAC_CFG_PCFG_CE;
 
-       flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G;
+       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));