1. 18 10月, 2016 5 次提交
    • J
      ethernet/intel: use core min/max MTU checking · 91c527a5
      Jarod Wilson 提交于
      e100: min_mtu 68, max_mtu 1500
      - remove e100_change_mtu entirely, is identical to old eth_change_mtu,
        and no longer serves a purpose. No need to set min_mtu or max_mtu
        explicitly, as ether_setup() will already set them to 68 and 1500.
      
      e1000: min_mtu 46, max_mtu 16110
      
      e1000e: min_mtu 68, max_mtu varies based on adapter
      
      fm10k: min_mtu 68, max_mtu 15342
      - remove fm10k_change_mtu entirely, does nothing now
      
      i40e: min_mtu 68, max_mtu 9706
      
      i40evf: min_mtu 68, max_mtu 9706
      
      igb: min_mtu 68, max_mtu 9216
      - There are two different "max" frame sizes claimed and both checked in
        the driver, the larger value wasn't relevant though, so I've set max_mtu
        to the smaller of the two values here to retain identical behavior.
      
      igbvf: min_mtu 68, max_mtu 9216
      - Same issue as igb duplicated
      
      ixgb: min_mtu 68, max_mtu 16114
      - Also remove pointless old == new check, as that's done in dev_set_mtu
      
      ixgbe: min_mtu 68, max_mtu 9710
      
      ixgbevf: min_mtu 68, max_mtu dependent on hardware/firmware
      - Some hw can only handle up to max_mtu 1504 on a vf, others 9710
      
      CC: netdev@vger.kernel.org
      CC: intel-wired-lan@lists.osuosl.org
      CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91c527a5
    • J
      ethernet/broadcom: use core min/max MTU checking · e1c6dcca
      Jarod Wilson 提交于
      tg3: min_mtu 60, max_mtu 9000/1500
      
      bnxt: min_mtu 60, max_mtu 9000
      
      bnx2x: min_mtu 46, max_mtu 9600
      - Fix up ETH_OVREHEAD -> ETH_OVERHEAD while we're in here, remove
        duplicated defines from bnx2x_link.c.
      
      bnx2: min_mtu 46, max_mtu 9000
      - Use more standard ETH_* defines while we're at it.
      
      bcm63xx_enet: min_mtu 46, max_mtu 2028
      - compute_hw_mtu was made largely pointless, and thus merged back into
        bcm_enet_change_mtu.
      
      b44: min_mtu 60, max_mtu 1500
      
      CC: netdev@vger.kernel.org
      CC: Michael Chan <michael.chan@broadcom.com>
      CC: Sony Chacko <sony.chacko@qlogic.com>
      CC: Ariel Elior <ariel.elior@qlogic.com>
      CC: Dept-HSGLinuxNICDev@qlogic.com
      CC: Siva Reddy Kallam <siva.kallam@broadcom.com>
      CC: Prashant Sreedharan <prashant@broadcom.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1c6dcca
    • J
      ethernet/atheros: use core min/max MTU checking · 67bef942
      Jarod Wilson 提交于
      atl2: min_mtu 40, max_mtu 1504
      
      - Remove a few redundant defines that already have equivalents in
        if_ether.h.
      
      atl1: min_mtu 42, max_mtu 10218
      
      atl1e: min_mtu 42, max_mtu 8170
      
      atl1c: min_mtu 42, max_mtu 6122/1500
      
      - GbE hardware gets a max_mtu of 6122, slower hardware gets 1500.
      
      alx: min_mtu 34, max_mtu 9256
      
      - Not so sure that minimum MTU number is really what was intended, but
        that's what the math actually makes it out to be, due to max_frame
        manipulations and comparison in alx_change_mtu, rather than just
        comparing new_mtu. (I think 68 was the intended min_mtu value).
      
      CC: netdev@vger.kernel.org
      CC: Jay Cliburn <jcliburn@gmail.com>
      CC: Chris Snook <chris.snook@gmail.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67bef942
    • W
      fsl/fman: fix error return code in mac_probe() · 3f3177bb
      Wei Yongjun 提交于
      Fix to return a negative error code from the error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: 39339616 ("fsl/fman: Add FMan MAC driver")
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f3177bb
    • W
      net: ethernet: nb8800: fix error return code in nb8800_open() · ca8eddc2
      Wei Yongjun 提交于
      Fix to return error code -ENODEV from the of_phy_connect() error
      handling case instead of 0, as done elsewhere in this function.
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Acked-by: NMans Rullgard <mans@mansr.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca8eddc2
  2. 17 10月, 2016 1 次提交
  3. 14 10月, 2016 10 次提交
  4. 13 10月, 2016 7 次提交
    • G
      stmmac: fix error check when init ptp · 7086605a
      Giuseppe CAVALLARO 提交于
      This patch fixes a problem when propagated the
      failure of ptp_clock_register to open function.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre TORGUE <alexandre.torgue@st.com>
      Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7086605a
    • G
      stmmac: fix ptp init for gmac4 · be9b3174
      Giuseppe CAVALLARO 提交于
      The gmac 4.x version has not extended descriptors
      (that are available on 3.x instead of).
      While initializing the PTP module, the advanced PTP was
      enabled in case of extended descriptors. This cannot be
      applied for 4.x version where only the hardware capability
      register has to show if the feature is present.
      Patch also adds some extra netdev_(debug/inof) to better
      dump the configuration.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre TORGUE <alexandre.torgue@st.com>
      Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be9b3174
    • A
      qed: fix old-style function definition · d4e99131
      Arnd Bergmann 提交于
      The definition of qed_get_rdma_ops() is not a prototype unless
      we add 'void' here, as indicated by this W=1 warning:
      
      drivers/net/ethernet/qlogic/qed/qed_roce.c: In function ‘qed_get_rdma_ops’:
      drivers/net/ethernet/qlogic/qed/qed_roce.c:2950:28: error: old-style function definition [-Werror=old-style-definition]
      
      Fixes: abd49676 ("qed: Add RoCE ll2 & GSI support")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4e99131
    • T
      net/mlx5: Add MLX5_ARRAY_SET64 to fix BUILD_BUG_ON · b8a4ddb2
      Tom Herbert 提交于
      I am hitting this in mlx5:
      
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function
      reclaim_pages_cmd.clone.0:
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:346: error: call
      to __compiletime_assert_346 declared with attribute error:
      BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_out, pas[i]) % 64
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c: In function give_pages:
      drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:291: error: call
      to __compiletime_assert_291 declared with attribute error:
      BUILD_BUG_ON failed: __mlx5_bit_off(manage_pages_in, pas[i]) % 64
      
      Problem is that this is doing a BUILD_BUG_ON on a non-constant
      expression because of trying to take offset of pas[i] in the
      structure.
      
      Fix is to create MLX5_ARRAY_SET64 that takes an additional argument
      that is the field index to separate between BUILD_BUG_ON on the array
      constant field and the indexed field to assign the value to.
      There are two callers of MLX5_SET64 that are trying to get a variable
      offset, change those to call MLX5_ARRAY_SET64 passing 'pas' and 'i'
      as the arguments to use in the offset check and the indexed value
      assignment.
      
      Fixes: a533ed5e ("net/mlx5: Pages management commands via mlx5 ifc")
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8a4ddb2
    • W
      qed: Fix to use list_for_each_entry_safe() when delete items · 88a2428b
      Wei Yongjun 提交于
      Since we will remove items off the list using list_del() we need
      to use a safe version of the list_for_each_entry() macro aptly named
      list_for_each_entry_safe().
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Acked-by: NYuval Mintz <Yuval.Mintz@caviumnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88a2428b
    • A
      tlan: avoid unused label with PCI=n · 1e09c106
      Arnd Bergmann 提交于
      While build testing with randconfig on x86, I ran into this warning
      that appears to have been around forever
      
      drivers/net/ethernet/ti/tlan.c: In function ‘tlan_probe1’:
      drivers/net/ethernet/ti/tlan.c:614:1: error: label ‘err_out’ defined but not used [-Werror=unused-label]
      
      This can be trivially avoided by just moving the label into the
      existing #ifdef.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e09c106
    • J
      net: deprecate eth_change_mtu, remove usage · a52ad514
      Jarod Wilson 提交于
      With centralized MTU checking, there's nothing productive done by
      eth_change_mtu that isn't already done in dev_set_mtu, so mark it as
      deprecated and remove all usage of it in the kernel. All callers have been
      audited for calls to alloc_etherdev* or ether_setup directly, which means
      they all have a valid dev->min_mtu and dev->max_mtu. Now eth_change_mtu
      prints out a netdev_warn about being deprecated, for the benefit of
      out-of-tree drivers that might be utilizing it.
      
      Of note, dvb_net.c actually had dev->mtu = 4096, while using
      eth_change_mtu, meaning that if you ever tried changing it's mtu, you
      couldn't set it above 1500 anymore. It's now getting dev->max_mtu also set
      to 4096 to remedy that.
      
      v2: fix up lantiq_etop, missed breakage due to drive not compiling on x86
      
      CC: netdev@vger.kernel.org
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a52ad514
  5. 12 10月, 2016 9 次提交
  6. 09 10月, 2016 5 次提交
  7. 08 10月, 2016 3 次提交