1. 21 10月, 2016 13 次提交
    • J
      s390/net: use net core MTU range checking · 46b3ef4c
      Jarod Wilson 提交于
      ctcm:
      - min_mtu = 576, max_mtu = 65527
      
      netiucv:
      - min_mtu = 576, max_mtu = 65535
      
      qeth:
      - min_mtu = 64, max_mtu = 65535
      
      CC: netdev@vger.kernel.org
      CC: linux-s390@vger.kernel.org
      CC: Ursula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46b3ef4c
    • J
      net: use core MTU range checking in misc drivers · b3e3893e
      Jarod Wilson 提交于
      firewire-net:
      - set min/max_mtu
      - remove fwnet_change_mtu
      
      nes:
      - set max_mtu
      - clean up nes_netdev_change_mtu
      
      xpnet:
      - set min/max_mtu
      - remove xpnet_dev_change_mtu
      
      hippi:
      - set min/max_mtu
      - remove hippi_change_mtu
      
      batman-adv:
      - set max_mtu
      - remove batadv_interface_change_mtu
      - initialization is a little async, not 100% certain that max_mtu is set
        in the optimal place, don't have hardware to test with
      
      rionet:
      - set min/max_mtu
      - remove rionet_change_mtu
      
      slip:
      - set min/max_mtu
      - streamline sl_change_mtu
      
      um/net_kern:
      - remove pointless ndo_change_mtu
      
      hsi/clients/ssi_protocol:
      - use core MTU range checking
      - remove now redundant ssip_pn_set_mtu
      
      ipoib:
      - set a default max MTU value
      - Note: ipoib's actual max MTU can vary, depending on if the device is in
        connected mode or not, so we'll just set the max_mtu value to the max
        possible, and let the ndo_change_mtu function continue to validate any new
        MTU change requests with checks for CM or not. Note that ipoib has no
        min_mtu set, and thus, the network core's mtu > 0 check is the only lower
        bounds here.
      
      mptlan:
      - use net core MTU range checking
      - remove now redundant mpt_lan_change_mtu
      
      fddi:
      - min_mtu = 21, max_mtu = 4470
      - remove now redundant fddi_change_mtu (including export)
      
      fjes:
      - min_mtu = 8192, max_mtu = 65536
      - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to
        get past the core net MTU range checks so fjes_change_mtu can validate a
        new MTU against what it supports (see fjes_support_mtu in fjes_hw.c)
      
      hsr:
      - min_mtu = 0 (calls ether_setup, max_mtu is 1500)
      
      f_phonet:
      - min_mtu = 6, max_mtu = 65541
      
      u_ether:
      - min_mtu = 14, max_mtu = 15412
      
      phonet/pep-gprs:
      - min_mtu = 576, max_mtu = 65530
      - remove redundant gprs_set_mtu
      
      CC: netdev@vger.kernel.org
      CC: linux-rdma@vger.kernel.org
      CC: Stefan Richter <stefanr@s5r6.in-berlin.de>
      CC: Faisal Latif <faisal.latif@intel.com>
      CC: linux-rdma@vger.kernel.org
      CC: Cliff Whickman <cpw@sgi.com>
      CC: Robin Holt <robinmholt@gmail.com>
      CC: Jes Sorensen <jes@trained-monkey.org>
      CC: Marek Lindner <mareklindner@neomailbox.ch>
      CC: Simon Wunderlich <sw@simonwunderlich.de>
      CC: Antonio Quartulli <a@unstable.cc>
      CC: Sathya Prakash <sathya.prakash@broadcom.com>
      CC: Chaitra P B <chaitra.basappa@broadcom.com>
      CC: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
      CC: MPT-FusionLinux.pdl@broadcom.com
      CC: Sebastian Reichel <sre@kernel.org>
      CC: Felipe Balbi <balbi@kernel.org>
      CC: Arvid Brodin <arvid.brodin@alten.se>
      CC: Remi Denis-Courmont <courmisch@gmail.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3e3893e
    • J
      net: use core MTU range checking in virt drivers · d0c2c997
      Jarod Wilson 提交于
      hyperv_net:
      - set min/max_mtu, per Haiyang, after rndis_filter_device_add
      
      virtio_net:
      - set min/max_mtu
      - remove virtnet_change_mtu
      
      vmxnet3:
      - set min/max_mtu
      
      xen-netback:
      - min_mtu = 0, max_mtu = 65517
      
      xen-netfront:
      - min_mtu = 0, max_mtu = 65535
      
      unisys/visor:
      - clean up defines a little to not clash with network core or add
        redundat definitions
      
      CC: netdev@vger.kernel.org
      CC: virtualization@lists.linux-foundation.org
      CC: "K. Y. Srinivasan" <kys@microsoft.com>
      CC: Haiyang Zhang <haiyangz@microsoft.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Shrikrishna Khare <skhare@vmware.com>
      CC: "VMware, Inc." <pv-drivers@vmware.com>
      CC: Wei Liu <wei.liu2@citrix.com>
      CC: Paul Durrant <paul.durrant@citrix.com>
      CC: David Kershner <david.kershner@unisys.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Reviewed-by: NHaiyang Zhang <haiyangz@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0c2c997
    • J
      net: use core MTU range checking in core net infra · 91572088
      Jarod Wilson 提交于
      geneve:
      - Merge __geneve_change_mtu back into geneve_change_mtu, set max_mtu
      - This one isn't quite as straight-forward as others, could use some
        closer inspection and testing
      
      macvlan:
      - set min/max_mtu
      
      tun:
      - set min/max_mtu, remove tun_net_change_mtu
      
      vxlan:
      - Merge __vxlan_change_mtu back into vxlan_change_mtu
      - Set max_mtu to IP_MAX_MTU and retain dynamic MTU range checks in
        change_mtu function
      - This one is also not as straight-forward and could use closer inspection
        and testing from vxlan folks
      
      bridge:
      - set max_mtu of IP_MAX_MTU and retain dynamic MTU range checks in
        change_mtu function
      
      openvswitch:
      - set min/max_mtu, remove internal_dev_change_mtu
      - note: max_mtu wasn't checked previously, it's been set to 65535, which
        is the largest possible size supported
      
      sch_teql:
      - set min/max_mtu (note: max_mtu previously unchecked, used max of 65535)
      
      macsec:
      - min_mtu = 0, max_mtu = 65535
      
      macvlan:
      - min_mtu = 0, max_mtu = 65535
      
      ntb_netdev:
      - min_mtu = 0, max_mtu = 65535
      
      veth:
      - min_mtu = 68, max_mtu = 65535
      
      8021q:
      - min_mtu = 0, max_mtu = 65535
      
      CC: netdev@vger.kernel.org
      CC: Nicolas Dichtel <nicolas.dichtel@6wind.com>
      CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
      CC: Tom Herbert <tom@herbertland.com>
      CC: Daniel Borkmann <daniel@iogearbox.net>
      CC: Alexander Duyck <alexander.h.duyck@intel.com>
      CC: Paolo Abeni <pabeni@redhat.com>
      CC: Jiri Benc <jbenc@redhat.com>
      CC: WANG Cong <xiyou.wangcong@gmail.com>
      CC: Roopa Prabhu <roopa@cumulusnetworks.com>
      CC: Pravin B Shelar <pshelar@ovn.org>
      CC: Sabrina Dubroca <sd@queasysnail.net>
      CC: Patrick McHardy <kaber@trash.net>
      CC: Stephen Hemminger <stephen@networkplumber.org>
      CC: Pravin Shelar <pshelar@nicira.com>
      CC: Maxim Krasnyansky <maxk@qti.qualcomm.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91572088
    • J
      net: use core MTU range checking in WAN drivers · 8b6b4135
      Jarod Wilson 提交于
      - set min/max_mtu in all hdlc drivers, remove hdlc_change_mtu
      - sent max_mtu in lec driver, remove lec_change_mtu
      - set min/max_mtu in x25_asy driver
      
      CC: netdev@vger.kernel.org
      CC: Krzysztof Halasa <khc@pm.waw.pl>
      CC: Krzysztof Halasa <khalasa@piap.pl>
      CC: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
      CC: Francois Romieu <romieu@fr.zoreil.com>
      CC: Kevin Curtis <kevin.curtis@farsite.co.uk>
      CC: Zhao Qiang <qiang.zhao@nxp.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b6b4135
    • J
      net: use core MTU range checking in wireless drivers · 9c22b4a3
      Jarod Wilson 提交于
      - set max_mtu in wil6210 driver
      - set max_mtu in atmel driver
      - set min/max_mtu in cisco airo driver, remove airo_change_mtu
      - set min/max_mtu in ipw2100/ipw2200 drivers, remove libipw_change_mtu
      - set min/max_mtu in p80211netdev, remove wlan_change_mtu
      - set min/max_mtu in net/mac80211/iface.c and remove ieee80211_change_mtu
      - set min/max_mtu in wimax/i2400m and remove i2400m_change_mtu
      - set min/max_mtu in intersil/hostap and remove prism2_change_mtu
      - set min/max_mtu in intersil/orinoco
      - set min/max_mtu in tty/n_gsm and remove gsm_change_mtu
      
      CC: netdev@vger.kernel.org
      CC: linux-wireless@vger.kernel.org
      CC: Maya Erez <qca_merez@qca.qualcomm.com>
      CC: Simon Kelley <simon@thekelleys.org.uk>
      CC: Stanislav Yakovlev <stas.yakovlev@gmail.com>
      CC: Johannes Berg <johannes@sipsolutions.net>
      CC: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9c22b4a3
    • J
      net: use core MTU range checking in USB NIC drivers · f77f0aee
      Jarod Wilson 提交于
      usbnet:
      - Remove stale new_mtu <= 0 check in usbnet.c
      - Set min_mtu = 0, max_mtu = 65535 (sub-drivers must set their own
        max_mtu and/or min_mtu as needed)
      
      r8152:
      - Set appropriate max_mtu for different variants (1500 or 9194)
      
      lan78xx:
      - Set max_mtu = 9000
      
      asix_driver:
      - max_mtu = 16384 for ax88178 variant
      
      ax88179:
      - max_mtu = 4088
      
      cdc_ncm:
      - max_mtu from hardware
      
      cdc-phonet:
      - min_mtu = 6, max_mtu = 65541
      
      sierra_net:
      - max_mtu = 1500, call usbnet_change_mtu directly
      - sierra_net_change_mtu checked for MTU > 1500, then called
        usbnet_change_mtu, but if we set max_mtu to let the network core handle
        the range check, then we can simply call usbnet_change_mtu directly
      
      smsc75xx:
      - max_mtu = 9000
      
      CC: netdev@vger.kernel.org
      CC: Woojung Huh <woojung.huh@microchip.com>
      CC: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
      CC: Hayes Wang <hayeswang@realtek.com>
      CC: Oliver Neukum <oneukum@suse.com>
      CC: Steve Glendinning <steve.glendinning@shawell.net>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f77f0aee
    • J
      ethernet: use net core MTU range checking in more drivers · d894be57
      Jarod Wilson 提交于
      Somehow, I missed a healthy number of ethernet drivers in the last pass.
      Most of these drivers either were in need of an updated max_mtu to make
      jumbo frames possible to enable again. In a few cases, also setting a
      different min_mtu to match previous lower bounds. There are also a few
      drivers that had no upper bounds checking, so they're getting a brand new
      ETH_MAX_MTU that is identical to IP_MAX_MTU, but accessible by includes
      all ethernet and ethernet-like drivers all have already.
      
      acenic:
      - min_mtu = 0, max_mtu = 9000
      
      amazon/ena:
      - min_mtu = 128, max_mtu = adapter->max_mtu
      
      amd/xgbe:
      - min_mtu = 0, max_mtu = 9000
      
      sb1250:
      - min_mtu = 0, max_mtu = 1518
      
      cxgb3:
      - min_mtu = 81, max_mtu = 65535
      
      cxgb4:
      - min_mtu = 81, max_mtu = 9600
      
      cxgb4vf:
      - min_mtu = 81, max_mtu = 65535
      
      benet:
      - min_mtu = 256, max_mtu = 9000
      
      ibmveth:
      - min_mtu = 68, max_mtu = 65535
      
      ibmvnic:
      - min_mtu = adapter->min_mtu, max_mtu = adapter->max_mtu
      - remove now redundant ibmvnic_change_mtu
      
      jme:
      - min_mtu = 1280, max_mtu = 9202
      
      mv643xx_eth:
      - min_mtu = 64, max_mtu = 9500
      
      mlxsw:
      - min_mtu = 0, max_mtu = 65535
      - Basically bypassing the core checks, and instead relying on dynamic
        checks in the respective switch drivers' ndo_change_mtu functions
      
      ns83820:
      - min_mtu = 0
      - remove redundant ns83820_change_mtu, only checked for mtu > 1500
      
      netxen:
      - min_mtu = 0, max_mtu = 8000 (P2), max_mtu = 9600 (P3)
      
      qlge:
      - min_mtu = 1500, max_mtu = 9000
      - driver only supports setting mtu to 1500 or 9000, so the core check only
        rules out < 1500 and > 9000, qlge_change_mtu still needs to check that
        the value is 1500 or 9000
      
      qualcomm/emac:
      - min_mtu = 46, max_mtu = 9194
      
      xilinx_axienet:
      - min_mtu = 64, max_mtu = 9000
      
      Fixes: 61e84623 ("net: centralize net_device min/max MTU checking")
      CC: netdev@vger.kernel.org
      CC: Jes Sorensen <jes@trained-monkey.org>
      CC: Netanel Belgazal <netanel@annapurnalabs.com>
      CC: Tom Lendacky <thomas.lendacky@amd.com>
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Hariprasad S <hariprasad@chelsio.com>
      CC: Sathya Perla <sathya.perla@broadcom.com>
      CC: Ajit Khaparde <ajit.khaparde@broadcom.com>
      CC: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
      CC: Somnath Kotur <somnath.kotur@broadcom.com>
      CC: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
      CC: John Allen <jallen@linux.vnet.ibm.com>
      CC: Guo-Fu Tseng <cooldavid@cooldavid.org>
      CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      CC: Jiri Pirko <jiri@mellanox.com>
      CC: Ido Schimmel <idosch@mellanox.com>
      CC: Manish Chopra <manish.chopra@qlogic.com>
      CC: Sony Chacko <sony.chacko@qlogic.com>
      CC: Rajesh Borundia <rajesh.borundia@qlogic.com>
      CC: Timur Tabi <timur@codeaurora.org>
      CC: Anirudha Sarangi <anirudh@xilinx.com>
      CC: John Linn <John.Linn@xilinx.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d894be57
    • W
      myri10ge: fix typo in parameter description · 1a61a8f1
      Wei Yongjun 提交于
      Fix typo in parameter description.
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a61a8f1
    • W
      net: ethernet: mediatek: use dev_kfree_skb_any instead of dev_kfree_skb · 81ad2b7d
      Wei Yongjun 提交于
      Replace dev_kfree_skb with dev_kfree_skb_any in mtk_start_xmit()
      which can be called from hard irq context (netpoll) and from
      other contexts. mtk_start_xmit() only frees skbs that it has
      dropped.
      
      This is detected by Coccinelle semantic patch.
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      81ad2b7d
    • W
      dwc_eth_qos: use dev_kfree_skb_any instead of dev_kfree_skb · d80f45ff
      Wei Yongjun 提交于
      Replace dev_kfree_skb with dev_kfree_skb_any in dwceqos_start_xmit()
      which can be called from hard irq context (netpoll) and from
      other contexts. dwceqos_start_xmit() only frees skbs that it has
      dropped.
      
      This is detected by Coccinelle semantic patch.
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d80f45ff
    • S
      net: phy: aquantia: add PHY ID of AQR106 and AQR107 · 547412fe
      Shaohui Xie 提交于
      The AQR106 and AQR107 can use the existing driver.
      Signed-off-by: NShaohui Xie <Shaohui.Xie@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      547412fe
    • U
      net: fec: drop check for clk==NULL before calling clk_* · 01e5943a
      Uwe Kleine-König 提交于
      clk_prepare, clk_enable and their counterparts (at least the common clk
      ones, but also most others) do check for the clk being NULL anyhow (and
      return 0 then), so there is no gain when the caller checks, too.
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      01e5943a
  2. 20 10月, 2016 10 次提交
  3. 19 10月, 2016 12 次提交
  4. 18 10月, 2016 5 次提交
    • D
      Merge branch 'phy-led-triggers' · a8446676
      David S. Miller 提交于
      Zach Brown says:
      
      ====================
      Add support for led triggers on phy link state change
      
      Fix skge driver that declared enum contants that conflicted with enum
      constants in linux/leds.h
      
      Create function that encapsulates actions taken during the adjust phy link step
      of phy state changes.
      
      Create function that provides list of speeds currently supported by the phy.
      
      Add support for led triggers on phy link state changes by adding
      a config option. When set the config option will create a set of led triggers
      for each phy device. Users can use the led triggers to represent link state
      changes on the phy.
      
      v2:
       * New patch that creates phy_adjust_link function to encapsulate actions taken
         when adjusting phy link during phy state changes
       * led trigger speed strings changed to match existing phy speed strings
       * New function that maps speeds to led triggers
       * Replace magic constants with definitions when declaring trigger name
         buffer and number of triggers.
      v3:
       * Changed LED_ON to LED_REG_ON in skge driver to avoid possible future
         conflict and improve consistency.
       * Dropped rtl8712 patch that was accepted separately.
      v4:
       * tweaked commit message
      v5
       * Changed commit message to explain relationship between the new triggers and
         leds driven by phys.
       * Added new patch that creates phy_supported_speeds function.
       * Moved phy_leds_triggers_register and phy_leds_triggers_unregister to
         phy_attach and phy_detach respectively. This change is so the
         phydev->supported field will be filled by the time the triggers are
         registered.
       * Changed hardcoded list of triggers to dynamic list determined by speeds
         return by phy_supported_speeds.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8446676
    • Z
      net: phy: leds: add support for led triggers on phy link state change · 2e0bc452
      Zach Brown 提交于
      Create an option CONFIG_LED_TRIGGER_PHY (default n), which will create a
      set of led triggers for each instantiated PHY device. There is one LED
      trigger per link-speed, per-phy.
      The triggers are registered during phy_attach and unregistered during
      phy_detach.
      
      This allows for a user to configure their system to allow a set of LEDs
      not controlled by the phy to represent link state changes on the phy.
      LEDS controlled by the phy are unaffected.
      
      For example, we have a board where some of the leds in the
      RJ45 socket are controlled by the phy, but others are not. Using the
      triggers provided by this patch the leds not controlled by the phy can
      be configured to show the current speed of the ethernet connection. The
      leds controlled by the phy are unaffected.
      Signed-off-by: NJosh Cartwright <josh.cartwright@ni.com>
      Signed-off-by: NNathan Sullivan <nathan.sullivan@ni.com>
      Signed-off-by: NZach Brown <zach.brown@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e0bc452
    • Z
      net: phy: Create phy_supported_speeds function which lists speeds currently... · 1f9127ca
      Zach Brown 提交于
      net: phy: Create phy_supported_speeds function which lists speeds currently supported by a phydevice
      
      phy_supported_speeds provides a means to get a list of all the speeds a
      phy device currently supports.
      Signed-off-by: NZach Brown <zach.brown@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f9127ca
    • Z
      net: phy: Encapsulate actions performed during link state changes into function phy_adjust_link · 61a17965
      Zach Brown 提交于
      During phy state machine state transitions some set of actions should
      occur whenever the link state changes. These actions should be
      encapsulated into a single function
      
      This patch adds the phy_adjust_link function, which is called whenever
      phydev->adjust_link would have been called before. Actions that should
      occur whenever the phy link is adjusted can now be added to the
      phy_adjust_link function.
      Signed-off-by: NZach Brown <zach.brown@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61a17965
    • Z
      skge: Rename LED_OFF and LED_ON in marvel skge driver to avoid conflicts with leds namespace · 0e0f27dd
      Zach Brown 提交于
      Adding led support for phy causes namespace conflicts for some
      phy drivers.
      
      The marvel skge driver declared an enum for representing the states of
      Link LED Register. The enum contained constant LED_OFF which conflicted
      with declartation found in linux/leds.h.
      LED_OFF changed to LED_REG_OFF
      Also changed LED_ON to LED_REG_ON to avoid possible future conflict and
      for consistency.
      Signed-off-by: NZach Brown <zach.brown@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e0f27dd