diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 157 |
1 files changed, 135 insertions, 22 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 6a10d7ba5877..3943d89afb2b 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include "sky2.h" | 50 | #include "sky2.h" |
51 | 51 | ||
52 | #define DRV_NAME "sky2" | 52 | #define DRV_NAME "sky2" |
53 | #define DRV_VERSION "1.25" | 53 | #define DRV_VERSION "1.26" |
54 | #define PFX DRV_NAME " " | 54 | #define PFX DRV_NAME " " |
55 | 55 | ||
56 | /* | 56 | /* |
@@ -102,6 +102,7 @@ MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); | |||
102 | static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = { | 102 | static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = { |
103 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */ | 103 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */ |
104 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */ | 104 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */ |
105 | { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E01) }, /* SK-9E21M */ | ||
105 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, /* DGE-560T */ | 106 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4b00) }, /* DGE-560T */ |
106 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4001) }, /* DGE-550SX */ | 107 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4001) }, /* DGE-550SX */ |
107 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4B02) }, /* DGE-560SX */ | 108 | { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4B02) }, /* DGE-560SX */ |
@@ -139,6 +140,7 @@ static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = { | |||
139 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436D) }, /* 88E8055 */ | 140 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x436D) }, /* 88E8055 */ |
140 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4370) }, /* 88E8075 */ | 141 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4370) }, /* 88E8075 */ |
141 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4380) }, /* 88E8057 */ | 142 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4380) }, /* 88E8057 */ |
143 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4381) }, /* 88E8059 */ | ||
142 | { 0 } | 144 | { 0 } |
143 | }; | 145 | }; |
144 | 146 | ||
@@ -372,8 +374,8 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
372 | ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO); | 374 | ctrl |= PHY_M_PC_MDI_XMODE(PHY_M_PC_ENA_AUTO); |
373 | 375 | ||
374 | /* downshift on PHY 88E1112 and 88E1149 is changed */ | 376 | /* downshift on PHY 88E1112 and 88E1149 is changed */ |
375 | if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) | 377 | if ( (sky2->flags & SKY2_FLAG_AUTO_SPEED) && |
376 | && (hw->flags & SKY2_HW_NEWER_PHY)) { | 378 | (hw->flags & SKY2_HW_NEWER_PHY)) { |
377 | /* set downshift counter to 3x and enable downshift */ | 379 | /* set downshift counter to 3x and enable downshift */ |
378 | ctrl &= ~PHY_M_PC_DSC_MSK; | 380 | ctrl &= ~PHY_M_PC_DSC_MSK; |
379 | ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA; | 381 | ctrl |= PHY_M_PC_DSC(2) | PHY_M_PC_DOWN_S_ENA; |
@@ -602,13 +604,23 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port) | |||
602 | /* apply workaround for integrated resistors calibration */ | 604 | /* apply workaround for integrated resistors calibration */ |
603 | gm_phy_write(hw, port, PHY_MARV_PAGE_ADDR, 17); | 605 | gm_phy_write(hw, port, PHY_MARV_PAGE_ADDR, 17); |
604 | gm_phy_write(hw, port, PHY_MARV_PAGE_DATA, 0x3f60); | 606 | gm_phy_write(hw, port, PHY_MARV_PAGE_DATA, 0x3f60); |
607 | } else if (hw->chip_id == CHIP_ID_YUKON_OPT && hw->chip_rev == 0) { | ||
608 | /* apply fixes in PHY AFE */ | ||
609 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0x00ff); | ||
610 | |||
611 | /* apply RDAC termination workaround */ | ||
612 | gm_phy_write(hw, port, 24, 0x2800); | ||
613 | gm_phy_write(hw, port, 23, 0x2001); | ||
614 | |||
615 | /* set page register back to 0 */ | ||
616 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0); | ||
605 | } else if (hw->chip_id != CHIP_ID_YUKON_EX && | 617 | } else if (hw->chip_id != CHIP_ID_YUKON_EX && |
606 | hw->chip_id < CHIP_ID_YUKON_SUPR) { | 618 | hw->chip_id < CHIP_ID_YUKON_SUPR) { |
607 | /* no effect on Yukon-XL */ | 619 | /* no effect on Yukon-XL */ |
608 | gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); | 620 | gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); |
609 | 621 | ||
610 | if ( !(sky2->flags & SKY2_FLAG_AUTO_SPEED) | 622 | if (!(sky2->flags & SKY2_FLAG_AUTO_SPEED) || |
611 | || sky2->speed == SPEED_100) { | 623 | sky2->speed == SPEED_100) { |
612 | /* turn on 100 Mbps LED (LED_LINK100) */ | 624 | /* turn on 100 Mbps LED (LED_LINK100) */ |
613 | ledover |= PHY_M_LED_MO_100(MO_LED_ON); | 625 | ledover |= PHY_M_LED_MO_100(MO_LED_ON); |
614 | } | 626 | } |
@@ -786,8 +798,7 @@ static void sky2_set_tx_stfwd(struct sky2_hw *hw, unsigned port) | |||
786 | 798 | ||
787 | if ( (hw->chip_id == CHIP_ID_YUKON_EX && | 799 | if ( (hw->chip_id == CHIP_ID_YUKON_EX && |
788 | hw->chip_rev != CHIP_REV_YU_EX_A0) || | 800 | hw->chip_rev != CHIP_REV_YU_EX_A0) || |
789 | hw->chip_id == CHIP_ID_YUKON_FE_P || | 801 | hw->chip_id >= CHIP_ID_YUKON_FE_P) { |
790 | hw->chip_id == CHIP_ID_YUKON_SUPR) { | ||
791 | /* Yukon-Extreme B0 and further Extreme devices */ | 802 | /* Yukon-Extreme B0 and further Extreme devices */ |
792 | /* enable Store & Forward mode for TX */ | 803 | /* enable Store & Forward mode for TX */ |
793 | 804 | ||
@@ -925,8 +936,14 @@ static void sky2_mac_init(struct sky2_hw *hw, unsigned port) | |||
925 | 936 | ||
926 | /* On chips without ram buffer, pause is controled by MAC level */ | 937 | /* On chips without ram buffer, pause is controled by MAC level */ |
927 | if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { | 938 | if (!(hw->flags & SKY2_HW_RAM_BUFFER)) { |
928 | sky2_write8(hw, SK_REG(port, RX_GMF_LP_THR), 768/8); | 939 | /* Pause threshold is scaled by 8 in bytes */ |
929 | sky2_write8(hw, SK_REG(port, RX_GMF_UP_THR), 1024/8); | 940 | if (hw->chip_id == CHIP_ID_YUKON_FE_P && |
941 | hw->chip_rev == CHIP_REV_YU_FE2_A0) | ||
942 | reg = 1568 / 8; | ||
943 | else | ||
944 | reg = 1024 / 8; | ||
945 | sky2_write16(hw, SK_REG(port, RX_GMF_UP_THR), reg); | ||
946 | sky2_write16(hw, SK_REG(port, RX_GMF_LP_THR), 768 / 8); | ||
930 | 947 | ||
931 | sky2_set_tx_stfwd(hw, port); | 948 | sky2_set_tx_stfwd(hw, port); |
932 | } | 949 | } |
@@ -1336,8 +1353,8 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
1336 | /* These chips have no ram buffer? | 1353 | /* These chips have no ram buffer? |
1337 | * MAC Rx RAM Read is controlled by hardware */ | 1354 | * MAC Rx RAM Read is controlled by hardware */ |
1338 | if (hw->chip_id == CHIP_ID_YUKON_EC_U && | 1355 | if (hw->chip_id == CHIP_ID_YUKON_EC_U && |
1339 | (hw->chip_rev == CHIP_REV_YU_EC_U_A1 | 1356 | (hw->chip_rev == CHIP_REV_YU_EC_U_A1 || |
1340 | || hw->chip_rev == CHIP_REV_YU_EC_U_B0)) | 1357 | hw->chip_rev == CHIP_REV_YU_EC_U_B0)) |
1341 | sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS); | 1358 | sky2_write32(hw, Q_ADDR(rxq, Q_TEST), F_M_RX_RAM_DIS); |
1342 | 1359 | ||
1343 | sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); | 1360 | sky2_prefetch_init(hw, rxq, sky2->rx_le_map, RX_LE_SIZE - 1); |
@@ -1397,6 +1414,31 @@ static int sky2_rx_start(struct sky2_port *sky2) | |||
1397 | 1414 | ||
1398 | /* Tell chip about available buffers */ | 1415 | /* Tell chip about available buffers */ |
1399 | sky2_rx_update(sky2, rxq); | 1416 | sky2_rx_update(sky2, rxq); |
1417 | |||
1418 | if (hw->chip_id == CHIP_ID_YUKON_EX || | ||
1419 | hw->chip_id == CHIP_ID_YUKON_SUPR) { | ||
1420 | /* | ||
1421 | * Disable flushing of non ASF packets; | ||
1422 | * must be done after initializing the BMUs; | ||
1423 | * drivers without ASF support should do this too, otherwise | ||
1424 | * it may happen that they cannot run on ASF devices; | ||
1425 | * remember that the MAC FIFO isn't reset during initialization. | ||
1426 | */ | ||
1427 | sky2_write32(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), RX_MACSEC_FLUSH_OFF); | ||
1428 | } | ||
1429 | |||
1430 | if (hw->chip_id >= CHIP_ID_YUKON_SUPR) { | ||
1431 | /* Enable RX Home Address & Routing Header checksum fix */ | ||
1432 | sky2_write16(hw, SK_REG(sky2->port, RX_GMF_FL_CTRL), | ||
1433 | RX_IPV6_SA_MOB_ENA | RX_IPV6_DA_MOB_ENA); | ||
1434 | |||
1435 | /* Enable TX Home Address & Routing Header checksum fix */ | ||
1436 | sky2_write32(hw, Q_ADDR(txqaddr[sky2->port], Q_TEST), | ||
1437 | TBMU_TEST_HOME_ADD_FIX_EN | TBMU_TEST_ROUTING_ADD_FIX_EN); | ||
1438 | } | ||
1439 | |||
1440 | |||
1441 | |||
1400 | return 0; | 1442 | return 0; |
1401 | nomem: | 1443 | nomem: |
1402 | sky2_rx_clean(sky2); | 1444 | sky2_rx_clean(sky2); |
@@ -1518,8 +1560,8 @@ static int sky2_up(struct net_device *dev) | |||
1518 | sky2_write32(hw, Q_ADDR(txqaddr[port], Q_TEST), F_TX_CHK_AUTO_OFF); | 1560 | sky2_write32(hw, Q_ADDR(txqaddr[port], Q_TEST), F_TX_CHK_AUTO_OFF); |
1519 | 1561 | ||
1520 | /* Set almost empty threshold */ | 1562 | /* Set almost empty threshold */ |
1521 | if (hw->chip_id == CHIP_ID_YUKON_EC_U | 1563 | if (hw->chip_id == CHIP_ID_YUKON_EC_U && |
1522 | && hw->chip_rev == CHIP_REV_YU_EC_U_A0) | 1564 | hw->chip_rev == CHIP_REV_YU_EC_U_A0) |
1523 | sky2_write16(hw, Q_ADDR(txqaddr[port], Q_AL), ECU_TXFF_LEV); | 1565 | sky2_write16(hw, Q_ADDR(txqaddr[port], Q_AL), ECU_TXFF_LEV); |
1524 | 1566 | ||
1525 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, | 1567 | sky2_prefetch_init(hw, txqaddr[port], sky2->tx_le_map, |
@@ -1865,8 +1907,8 @@ static int sky2_down(struct net_device *dev) | |||
1865 | sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); | 1907 | sky2_write8(hw, SK_REG(port, GPHY_CTRL), GPC_RST_SET); |
1866 | 1908 | ||
1867 | /* Workaround shared GMAC reset */ | 1909 | /* Workaround shared GMAC reset */ |
1868 | if (!(hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 | 1910 | if (!(hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0 && |
1869 | && port == 0 && hw->dev[1] && netif_running(hw->dev[1]))) | 1911 | port == 0 && hw->dev[1] && netif_running(hw->dev[1]))) |
1870 | sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); | 1912 | sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); |
1871 | 1913 | ||
1872 | sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); | 1914 | sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); |
@@ -2043,8 +2085,8 @@ static int sky2_autoneg_done(struct sky2_port *sky2, u16 aux) | |||
2043 | sky2->flow_status = FC_TX; | 2085 | sky2->flow_status = FC_TX; |
2044 | } | 2086 | } |
2045 | 2087 | ||
2046 | if (sky2->duplex == DUPLEX_HALF && sky2->speed < SPEED_1000 | 2088 | if (sky2->duplex == DUPLEX_HALF && sky2->speed < SPEED_1000 && |
2047 | && !(hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX)) | 2089 | !(hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX)) |
2048 | sky2->flow_status = FC_NONE; | 2090 | sky2->flow_status = FC_NONE; |
2049 | 2091 | ||
2050 | if (sky2->flow_status & FC_TX) | 2092 | if (sky2->flow_status & FC_TX) |
@@ -2096,6 +2138,25 @@ out: | |||
2096 | spin_unlock(&sky2->phy_lock); | 2138 | spin_unlock(&sky2->phy_lock); |
2097 | } | 2139 | } |
2098 | 2140 | ||
2141 | /* Special quick link interrupt (Yukon-2 Optima only) */ | ||
2142 | static void sky2_qlink_intr(struct sky2_hw *hw) | ||
2143 | { | ||
2144 | struct sky2_port *sky2 = netdev_priv(hw->dev[0]); | ||
2145 | u32 imask; | ||
2146 | u16 phy; | ||
2147 | |||
2148 | /* disable irq */ | ||
2149 | imask = sky2_read32(hw, B0_IMSK); | ||
2150 | imask &= ~Y2_IS_PHY_QLNK; | ||
2151 | sky2_write32(hw, B0_IMSK, imask); | ||
2152 | |||
2153 | /* reset PHY Link Detect */ | ||
2154 | phy = sky2_pci_read16(hw, PSM_CONFIG_REG4); | ||
2155 | sky2_pci_write16(hw, PSM_CONFIG_REG4, phy | 1); | ||
2156 | |||
2157 | sky2_link_up(sky2); | ||
2158 | } | ||
2159 | |||
2099 | /* Transmit timeout is only called if we are running, carrier is up | 2160 | /* Transmit timeout is only called if we are running, carrier is up |
2100 | * and tx queue is full (stopped). | 2161 | * and tx queue is full (stopped). |
2101 | */ | 2162 | */ |
@@ -2191,9 +2252,8 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, | |||
2191 | { | 2252 | { |
2192 | struct sk_buff *skb; | 2253 | struct sk_buff *skb; |
2193 | 2254 | ||
2194 | skb = netdev_alloc_skb(sky2->netdev, length + 2); | 2255 | skb = netdev_alloc_skb_ip_align(sky2->netdev, length); |
2195 | if (likely(skb)) { | 2256 | if (likely(skb)) { |
2196 | skb_reserve(skb, 2); | ||
2197 | pci_dma_sync_single_for_cpu(sky2->hw->pdev, re->data_addr, | 2257 | pci_dma_sync_single_for_cpu(sky2->hw->pdev, re->data_addr, |
2198 | length, PCI_DMA_FROMDEVICE); | 2258 | length, PCI_DMA_FROMDEVICE); |
2199 | skb_copy_from_linear_data(re->skb, skb->data, length); | 2259 | skb_copy_from_linear_data(re->skb, skb->data, length); |
@@ -2766,6 +2826,9 @@ static int sky2_poll(struct napi_struct *napi, int work_limit) | |||
2766 | if (status & Y2_IS_IRQ_PHY2) | 2826 | if (status & Y2_IS_IRQ_PHY2) |
2767 | sky2_phy_intr(hw, 1); | 2827 | sky2_phy_intr(hw, 1); |
2768 | 2828 | ||
2829 | if (status & Y2_IS_PHY_QLNK) | ||
2830 | sky2_qlink_intr(hw); | ||
2831 | |||
2769 | while ((idx = sky2_read16(hw, STAT_PUT_IDX)) != hw->st_idx) { | 2832 | while ((idx = sky2_read16(hw, STAT_PUT_IDX)) != hw->st_idx) { |
2770 | work_done += sky2_status_intr(hw, work_limit - work_done, idx); | 2833 | work_done += sky2_status_intr(hw, work_limit - work_done, idx); |
2771 | 2834 | ||
@@ -2815,6 +2878,7 @@ static u32 sky2_mhz(const struct sky2_hw *hw) | |||
2815 | case CHIP_ID_YUKON_EX: | 2878 | case CHIP_ID_YUKON_EX: |
2816 | case CHIP_ID_YUKON_SUPR: | 2879 | case CHIP_ID_YUKON_SUPR: |
2817 | case CHIP_ID_YUKON_UL_2: | 2880 | case CHIP_ID_YUKON_UL_2: |
2881 | case CHIP_ID_YUKON_OPT: | ||
2818 | return 125; | 2882 | return 125; |
2819 | 2883 | ||
2820 | case CHIP_ID_YUKON_FE: | 2884 | case CHIP_ID_YUKON_FE: |
@@ -2904,6 +2968,7 @@ static int __devinit sky2_init(struct sky2_hw *hw) | |||
2904 | break; | 2968 | break; |
2905 | 2969 | ||
2906 | case CHIP_ID_YUKON_UL_2: | 2970 | case CHIP_ID_YUKON_UL_2: |
2971 | case CHIP_ID_YUKON_OPT: | ||
2907 | hw->flags = SKY2_HW_GIGABIT | 2972 | hw->flags = SKY2_HW_GIGABIT |
2908 | | SKY2_HW_ADV_POWER_CTL; | 2973 | | SKY2_HW_ADV_POWER_CTL; |
2909 | break; | 2974 | break; |
@@ -2986,6 +3051,52 @@ static void sky2_reset(struct sky2_hw *hw) | |||
2986 | sky2_write16(hw, SK_REG(i, GMAC_CTRL), | 3051 | sky2_write16(hw, SK_REG(i, GMAC_CTRL), |
2987 | GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | 3052 | GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON |
2988 | | GMC_BYP_RETR_ON); | 3053 | | GMC_BYP_RETR_ON); |
3054 | |||
3055 | } | ||
3056 | |||
3057 | if (hw->chip_id == CHIP_ID_YUKON_SUPR && hw->chip_rev > CHIP_REV_YU_SU_B0) { | ||
3058 | /* enable MACSec clock gating */ | ||
3059 | sky2_pci_write32(hw, PCI_DEV_REG3, P_CLK_MACSEC_DIS); | ||
3060 | } | ||
3061 | |||
3062 | if (hw->chip_id == CHIP_ID_YUKON_OPT) { | ||
3063 | u16 reg; | ||
3064 | u32 msk; | ||
3065 | |||
3066 | if (hw->chip_rev == 0) { | ||
3067 | /* disable PCI-E PHY power down (set PHY reg 0x80, bit 7 */ | ||
3068 | sky2_write32(hw, Y2_PEX_PHY_DATA, (0x80UL << 16) | (1 << 7)); | ||
3069 | |||
3070 | /* set PHY Link Detect Timer to 1.1 second (11x 100ms) */ | ||
3071 | reg = 10; | ||
3072 | } else { | ||
3073 | /* set PHY Link Detect Timer to 0.4 second (4x 100ms) */ | ||
3074 | reg = 3; | ||
3075 | } | ||
3076 | |||
3077 | reg <<= PSM_CONFIG_REG4_TIMER_PHY_LINK_DETECT_BASE; | ||
3078 | |||
3079 | /* reset PHY Link Detect */ | ||
3080 | sky2_pci_write16(hw, PSM_CONFIG_REG4, | ||
3081 | reg | PSM_CONFIG_REG4_RST_PHY_LINK_DETECT); | ||
3082 | sky2_pci_write16(hw, PSM_CONFIG_REG4, reg); | ||
3083 | |||
3084 | |||
3085 | /* enable PHY Quick Link */ | ||
3086 | msk = sky2_read32(hw, B0_IMSK); | ||
3087 | msk |= Y2_IS_PHY_QLNK; | ||
3088 | sky2_write32(hw, B0_IMSK, msk); | ||
3089 | |||
3090 | /* check if PSMv2 was running before */ | ||
3091 | reg = sky2_pci_read16(hw, PSM_CONFIG_REG3); | ||
3092 | if (reg & PCI_EXP_LNKCTL_ASPMC) { | ||
3093 | int cap = pci_find_capability(pdev, PCI_CAP_ID_EXP); | ||
3094 | /* restore the PCIe Link Control register */ | ||
3095 | sky2_pci_write16(hw, cap + PCI_EXP_LNKCTL, reg); | ||
3096 | } | ||
3097 | |||
3098 | /* re-enable PEX PM in PEX PHY debug reg. 8 (clear bit 12) */ | ||
3099 | sky2_write32(hw, Y2_PEX_PHY_DATA, PEX_DB_ACCESS | (0x08UL << 16)); | ||
2989 | } | 3100 | } |
2990 | 3101 | ||
2991 | /* Clear I2C IRQ noise */ | 3102 | /* Clear I2C IRQ noise */ |
@@ -3133,8 +3244,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
3133 | struct sky2_port *sky2 = netdev_priv(dev); | 3244 | struct sky2_port *sky2 = netdev_priv(dev); |
3134 | struct sky2_hw *hw = sky2->hw; | 3245 | struct sky2_hw *hw = sky2->hw; |
3135 | 3246 | ||
3136 | if ((wol->wolopts & ~sky2_wol_supported(sky2->hw)) | 3247 | if ((wol->wolopts & ~sky2_wol_supported(sky2->hw)) || |
3137 | || !device_can_wakeup(&hw->pdev->dev)) | 3248 | !device_can_wakeup(&hw->pdev->dev)) |
3138 | return -EOPNOTSUPP; | 3249 | return -EOPNOTSUPP; |
3139 | 3250 | ||
3140 | sky2->wol = wol->wolopts; | 3251 | sky2->wol = wol->wolopts; |
@@ -4406,9 +4517,11 @@ static const char *sky2_name(u8 chipid, char *buf, int sz) | |||
4406 | "FE+", /* 0xb8 */ | 4517 | "FE+", /* 0xb8 */ |
4407 | "Supreme", /* 0xb9 */ | 4518 | "Supreme", /* 0xb9 */ |
4408 | "UL 2", /* 0xba */ | 4519 | "UL 2", /* 0xba */ |
4520 | "Unknown", /* 0xbb */ | ||
4521 | "Optima", /* 0xbc */ | ||
4409 | }; | 4522 | }; |
4410 | 4523 | ||
4411 | if (chipid >= CHIP_ID_YUKON_XL && chipid < CHIP_ID_YUKON_UL_2) | 4524 | if (chipid >= CHIP_ID_YUKON_XL && chipid < CHIP_ID_YUKON_OPT) |
4412 | strncpy(buf, name[chipid - CHIP_ID_YUKON_XL], sz); | 4525 | strncpy(buf, name[chipid - CHIP_ID_YUKON_XL], sz); |
4413 | else | 4526 | else |
4414 | snprintf(buf, sz, "(chip %#x)", chipid); | 4527 | snprintf(buf, sz, "(chip %#x)", chipid); |