diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-06-02 07:28:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-03 05:46:33 -0400 |
commit | 2adc55c959940fc680074392eddbd5585a76f3d9 (patch) | |
tree | bf5050070f1f0ef3dd6d1f951d0a50c7ac8aa161 /drivers/net/e1000e/82571.c | |
parent | 3ec2a2b80f3eb53851fe4cef9e65b5d33376ef89 (diff) |
e1000e: specify max supported frame size in adapter struct
By putting the maximum frame size supported by the hardware into the
adapter structure, the change_mtu entry point function can be cleaned
up of checks for all the different max frame sizes supported by
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e1000e/82571.c')
-rw-r--r-- | drivers/net/e1000e/82571.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 6c01a2072c87..8203964373ce 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -341,8 +341,10 @@ static s32 e1000_get_variants_82571(struct e1000_adapter *adapter) | |||
341 | if (e1000_read_nvm(&adapter->hw, NVM_INIT_3GIO_3, 1, | 341 | if (e1000_read_nvm(&adapter->hw, NVM_INIT_3GIO_3, 1, |
342 | &eeprom_data) < 0) | 342 | &eeprom_data) < 0) |
343 | break; | 343 | break; |
344 | if (eeprom_data & NVM_WORD1A_ASPM_MASK) | 344 | if (!(eeprom_data & NVM_WORD1A_ASPM_MASK)) { |
345 | adapter->flags &= ~FLAG_HAS_JUMBO_FRAMES; | 345 | adapter->flags |= FLAG_HAS_JUMBO_FRAMES; |
346 | adapter->max_hw_frame_size = DEFAULT_JUMBO; | ||
347 | } | ||
346 | } | 348 | } |
347 | break; | 349 | break; |
348 | default: | 350 | default: |
@@ -1672,6 +1674,7 @@ struct e1000_info e1000_82571_info = { | |||
1672 | | FLAG_TARC_SPEED_MODE_BIT /* errata */ | 1674 | | FLAG_TARC_SPEED_MODE_BIT /* errata */ |
1673 | | FLAG_APME_CHECK_PORT_B, | 1675 | | FLAG_APME_CHECK_PORT_B, |
1674 | .pba = 38, | 1676 | .pba = 38, |
1677 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
1675 | .get_variants = e1000_get_variants_82571, | 1678 | .get_variants = e1000_get_variants_82571, |
1676 | .mac_ops = &e82571_mac_ops, | 1679 | .mac_ops = &e82571_mac_ops, |
1677 | .phy_ops = &e82_phy_ops_igp, | 1680 | .phy_ops = &e82_phy_ops_igp, |
@@ -1688,6 +1691,7 @@ struct e1000_info e1000_82572_info = { | |||
1688 | | FLAG_HAS_CTRLEXT_ON_LOAD | 1691 | | FLAG_HAS_CTRLEXT_ON_LOAD |
1689 | | FLAG_TARC_SPEED_MODE_BIT, /* errata */ | 1692 | | FLAG_TARC_SPEED_MODE_BIT, /* errata */ |
1690 | .pba = 38, | 1693 | .pba = 38, |
1694 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
1691 | .get_variants = e1000_get_variants_82571, | 1695 | .get_variants = e1000_get_variants_82571, |
1692 | .mac_ops = &e82571_mac_ops, | 1696 | .mac_ops = &e82571_mac_ops, |
1693 | .phy_ops = &e82_phy_ops_igp, | 1697 | .phy_ops = &e82_phy_ops_igp, |
@@ -1706,6 +1710,7 @@ struct e1000_info e1000_82573_info = { | |||
1706 | | FLAG_HAS_ERT | 1710 | | FLAG_HAS_ERT |
1707 | | FLAG_HAS_SWSM_ON_LOAD, | 1711 | | FLAG_HAS_SWSM_ON_LOAD, |
1708 | .pba = 20, | 1712 | .pba = 20, |
1713 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | ||
1709 | .get_variants = e1000_get_variants_82571, | 1714 | .get_variants = e1000_get_variants_82571, |
1710 | .mac_ops = &e82571_mac_ops, | 1715 | .mac_ops = &e82571_mac_ops, |
1711 | .phy_ops = &e82_phy_ops_m88, | 1716 | .phy_ops = &e82_phy_ops_m88, |
@@ -1724,6 +1729,7 @@ struct e1000_info e1000_82574_info = { | |||
1724 | | FLAG_HAS_AMT | 1729 | | FLAG_HAS_AMT |
1725 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 1730 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
1726 | .pba = 20, | 1731 | .pba = 20, |
1732 | .max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN, | ||
1727 | .get_variants = e1000_get_variants_82571, | 1733 | .get_variants = e1000_get_variants_82571, |
1728 | .mac_ops = &e82571_mac_ops, | 1734 | .mac_ops = &e82571_mac_ops, |
1729 | .phy_ops = &e82_phy_ops_bm, | 1735 | .phy_ops = &e82_phy_ops_bm, |
@@ -1740,6 +1746,7 @@ struct e1000_info e1000_82583_info = { | |||
1740 | | FLAG_HAS_AMT | 1746 | | FLAG_HAS_AMT |
1741 | | FLAG_HAS_CTRLEXT_ON_LOAD, | 1747 | | FLAG_HAS_CTRLEXT_ON_LOAD, |
1742 | .pba = 20, | 1748 | .pba = 20, |
1749 | .max_hw_frame_size = DEFAULT_JUMBO, | ||
1743 | .get_variants = e1000_get_variants_82571, | 1750 | .get_variants = e1000_get_variants_82571, |
1744 | .mac_ops = &e82571_mac_ops, | 1751 | .mac_ops = &e82571_mac_ops, |
1745 | .phy_ops = &e82_phy_ops_bm, | 1752 | .phy_ops = &e82_phy_ops_bm, |