aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-10-29 02:37:08 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-30 01:57:29 -0400
commit877c8570fb00ad0529b07f8193cc098ac0193d03 (patch)
tree9818c059ea5f070db511331a89f6fc3de9393ff9
parentd6b54d241c558483302616ac1d997806795513e4 (diff)
sky2: workarounds for Yukon-2 supreme
Changes related to support of Yukon supreme chip. Don't have this chip version to test on, these are reverse engineered from the vendor (GPL) driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/sky2.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 70524f2658dd..3387a2f80dad 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -787,8 +787,7 @@ static void sky2_set_tx_stfwd(struct sky2_hw *hw, unsigned port)
787 787
788 if ( (hw->chip_id == CHIP_ID_YUKON_EX && 788 if ( (hw->chip_id == CHIP_ID_YUKON_EX &&
789 hw->chip_rev != CHIP_REV_YU_EX_A0) || 789 hw->chip_rev != CHIP_REV_YU_EX_A0) ||
790 hw->chip_id == CHIP_ID_YUKON_FE_P || 790 hw->chip_id >= CHIP_ID_YUKON_FE_P) {
791 hw->chip_id == CHIP_ID_YUKON_SUPR) {
792 /* Yukon-Extreme B0 and further Extreme devices */ 791 /* Yukon-Extreme B0 and further Extreme devices */
793 /* enable Store & Forward mode for TX */ 792 /* enable Store & Forward mode for TX */
794 793
@@ -1404,6 +1403,31 @@ static int sky2_rx_start(struct sky2_port *sky2)
1404 1403
1405 /* Tell chip about available buffers */ 1404 /* Tell chip about available buffers */
1406 sky2_rx_update(sky2, rxq); 1405 sky2_rx_update(sky2, rxq);
1406
1407 if (hw->chip_id == CHIP_ID_YUKON_EX ||
1408 hw->chip_id == CHIP_ID_YUKON_SUPR) {
1409 /*
1410 * Disable flushing of non ASF packets;
1411 * must be done after initializing the BMUs;
1412 * drivers without ASF support should do this too, otherwise
1413 * it may happen that they cannot run on ASF devices;
1414 * remember that the MAC FIFO isn't reset during initialization.
1415 */
1416 sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_MACSEC_FLUSH_OFF);
1417 }
1418
1419 if (hw->chip_id >= CHIP_ID_YUKON_SUPR) {
1420 /* Enable RX Home Address & Routing Header checksum fix */
1421 sky2_write16(hw, SK_REG(sky2->port, RX_GMF_FL_CTRL),
1422 RX_IPV6_SA_MOB_ENA | RX_IPV6_DA_MOB_ENA);
1423
1424 /* Enable TX Home Address & Routing Header checksum fix */
1425 sky2_write32(hw, Q_ADDR(txqaddr[sky2->port], Q_TEST),
1426 TBMU_TEST_HOME_ADD_FIX_EN | TBMU_TEST_ROUTING_ADD_FIX_EN);
1427 }
1428
1429
1430
1407 return 0; 1431 return 0;
1408nomem: 1432nomem:
1409 sky2_rx_clean(sky2); 1433 sky2_rx_clean(sky2);
@@ -2992,6 +3016,12 @@ static void sky2_reset(struct sky2_hw *hw)
2992 sky2_write16(hw, SK_REG(i, GMAC_CTRL), 3016 sky2_write16(hw, SK_REG(i, GMAC_CTRL),
2993 GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON 3017 GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON
2994 | GMC_BYP_RETR_ON); 3018 | GMC_BYP_RETR_ON);
3019
3020 }
3021
3022 if (hw->chip_id == CHIP_ID_YUKON_SUPR && hw->chip_rev > CHIP_REV_YU_SU_B0) {
3023 /* enable MACSec clock gating */
3024 sky2_pci_write32(hw, PCI_DEV_REG3, P_CLK_MACSEC_DIS);
2995 } 3025 }
2996 3026
2997 /* Clear I2C IRQ noise */ 3027 /* Clear I2C IRQ noise */