aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sky2.c20
-rw-r--r--drivers/net/sky2.h1
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index c91513ed7847..3fc8683b2ff0 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2996,7 +2996,8 @@ static int __devinit sky2_init(struct sky2_hw *hw)
2996 hw->flags = SKY2_HW_GIGABIT 2996 hw->flags = SKY2_HW_GIGABIT
2997 | SKY2_HW_NEWER_PHY 2997 | SKY2_HW_NEWER_PHY
2998 | SKY2_HW_NEW_LE 2998 | SKY2_HW_NEW_LE
2999 | SKY2_HW_ADV_POWER_CTL; 2999 | SKY2_HW_ADV_POWER_CTL
3000 | SKY2_HW_RSS_CHKSUM;
3000 3001
3001 /* New transmit checksum */ 3002 /* New transmit checksum */
3002 if (hw->chip_rev != CHIP_REV_YU_EX_B0) 3003 if (hw->chip_rev != CHIP_REV_YU_EX_B0)
@@ -3024,7 +3025,7 @@ static int __devinit sky2_init(struct sky2_hw *hw)
3024 3025
3025 /* The workaround for status conflicts VLAN tag detection. */ 3026 /* The workaround for status conflicts VLAN tag detection. */
3026 if (hw->chip_rev == CHIP_REV_YU_FE2_A0) 3027 if (hw->chip_rev == CHIP_REV_YU_FE2_A0)
3027 hw->flags |= SKY2_HW_VLAN_BROKEN; 3028 hw->flags |= SKY2_HW_VLAN_BROKEN | SKY2_HW_RSS_CHKSUM;
3028 break; 3029 break;
3029 3030
3030 case CHIP_ID_YUKON_SUPR: 3031 case CHIP_ID_YUKON_SUPR:
@@ -3033,6 +3034,9 @@ static int __devinit sky2_init(struct sky2_hw *hw)
3033 | SKY2_HW_NEW_LE 3034 | SKY2_HW_NEW_LE
3034 | SKY2_HW_AUTO_TX_SUM 3035 | SKY2_HW_AUTO_TX_SUM
3035 | SKY2_HW_ADV_POWER_CTL; 3036 | SKY2_HW_ADV_POWER_CTL;
3037
3038 if (hw->chip_rev == CHIP_REV_YU_SU_A0)
3039 hw->flags |= SKY2_HW_RSS_CHKSUM;
3036 break; 3040 break;
3037 3041
3038 case CHIP_ID_YUKON_UL_2: 3042 case CHIP_ID_YUKON_UL_2:
@@ -4176,8 +4180,18 @@ static u32 sky2_fix_features(struct net_device *dev, u32 features)
4176 /* In order to do Jumbo packets on these chips, need to turn off the 4180 /* In order to do Jumbo packets on these chips, need to turn off the
4177 * transmit store/forward. Therefore checksum offload won't work. 4181 * transmit store/forward. Therefore checksum offload won't work.
4178 */ 4182 */
4179 if (dev->mtu > ETH_DATA_LEN && hw->chip_id == CHIP_ID_YUKON_EC_U) 4183 if (dev->mtu > ETH_DATA_LEN && hw->chip_id == CHIP_ID_YUKON_EC_U) {
4184 netdev_info(dev, "checksum offload not possible with jumbo frames\n");
4180 features &= ~(NETIF_F_TSO|NETIF_F_SG|NETIF_F_ALL_CSUM); 4185 features &= ~(NETIF_F_TSO|NETIF_F_SG|NETIF_F_ALL_CSUM);
4186 }
4187
4188 /* Some hardware requires receive checksum for RSS to work. */
4189 if ( (features & NETIF_F_RXHASH) &&
4190 !(features & NETIF_F_RXCSUM) &&
4191 (sky2->hw->flags & SKY2_HW_RSS_CHKSUM)) {
4192 netdev_info(dev, "receive hashing forces receive checksum\n");
4193 features |= NETIF_F_RXCSUM;
4194 }
4181 4195
4182 return features; 4196 return features;
4183} 4197}
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 318c9ae7bf91..030221f4ea83 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -2281,6 +2281,7 @@ struct sky2_hw {
2281#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */ 2281#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
2282#define SKY2_HW_RSS_BROKEN 0x00000100 2282#define SKY2_HW_RSS_BROKEN 0x00000100
2283#define SKY2_HW_VLAN_BROKEN 0x00000200 2283#define SKY2_HW_VLAN_BROKEN 0x00000200
2284#define SKY2_HW_RSS_CHKSUM 0x00000400 /* RSS requires chksum */
2284 2285
2285 u8 chip_id; 2286 u8 chip_id;
2286 u8 chip_rev; 2287 u8 chip_rev;