1. 16 3月, 2018 9 次提交
    • B
      net: macb: Add phy-handle DT support · 2105a5d3
      Brad Mouring 提交于
      This optional binding (as described in the ethernet DT bindings doc)
      directs the netdev to the phydev to use. This is useful for a phy
      chip that has >1 phy in it, and two netdevs are using the same phy
      chip (i.e. the second mac's phy lives on the first mac's MDIO bus)
      
      The devicetree snippet would look something like this:
      
      ethernet@feedf00d {
      	...
      	phy-handle = <&phy0> // the first netdev is physically wired to phy0
      	...
      	phy0: phy@0 {
      		...
      		reg = <0x0> // MDIO address 0
      		...
      	}
      	phy1: phy@1 {
      		...
      		reg = <0x1> // MDIO address 1
      		...
      	}
      ...
      }
      
      ethernet@deadbeef {
      	...
      	phy-handle = <&phy1> // tells the driver to use phy1 on the
      						 // first mac's mdio bus (it's wired thusly)
      	...
      }
      
      The work done to add the phy_node in the first place (dacdbb4d:
      "net: macb: add fixed-link node support") will consume the
      device_node (if found).
      Signed-off-by: NBrad Mouring <brad.mouring@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2105a5d3
    • B
      net: macb: Remove redundant poll irq assignment · cb732e9a
      Brad Mouring 提交于
      In phy_device's general probe, this device will already be set for
      phy register polling, rendering this code redundant.
      Signed-off-by: NBrad Mouring <brad.mouring@ni.com>
      Suggested-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb732e9a
    • B
      net: macb: Reorganize macb_mii bringup · 739de9a1
      Brad Mouring 提交于
      The macb mii setup (mii_probe() and mii_init()) previously was
      somewhat interspersed, likely a result of organic growth and hacking.
      
      This change moves mii bus registration into mii_init and probing the
      bus for devices into mii_probe.
      Signed-off-by: NBrad Mouring <brad.mouring@ni.com>
      Suggested-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      739de9a1
    • S
      doc: remove out of date links and info from packet mmap · 2b221d20
      Stephen Hemminger 提交于
      The packet_mmap documentation had links to no longer existing web
      sites; replace with other site which has similar example.
      
      Support for packet mmap has been in mainline versions of libpcap
      for several years.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b221d20
    • G
      enic: drop IP proto check for vxlan tunnel delete · ce3db6aa
      Govindarajulu Varadarajan 提交于
      Commit d1179094 ("enic: Add vxlan offload support for IPv6 pkts")
      added vxlan offload support for IPv6 pkts. Required change in
      enic_udp_tunnel_del was not made. This creates a bug where once user
      adds IPv6 tunnel, hw offload for that cannot be deleted.
      
      This patch removes check for IP proto in tunnel delete path. Driver need
      not check for IP proto since same UDP port cannot be used to create two
      tunnels.
      
      Fixes: d1179094 ("enic: Add vxlan offload support for IPv6 pkts")
      Signed-off-by: NGovindarajulu Varadarajan <gvaradar@cisco.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce3db6aa
    • C
      rxrpc: remove redundant initialization of variable 'len' · 650b4eca
      Colin Ian King 提交于
      The variable 'len' is being initialized with a value that is never
      read and it is re-assigned later, hence the initialization is redundant
      and can be removed.
      
      Cleans up clang warning:
      net/rxrpc/recvmsg.c:275:15: warning: Value stored to 'len' during its
      initialization is never read
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      650b4eca
    • N
      sctp: Fix double free in sctp_sendmsg_to_asoc · 0aee4c25
      Neil Horman 提交于
      syzbot/kasan detected a double free in sctp_sendmsg_to_asoc:
      BUG: KASAN: use-after-free in sctp_association_free+0x7b7/0x930
      net/sctp/associola.c:332
      Read of size 8 at addr ffff8801d8006ae0 by task syzkaller914861/4202
      
      CPU: 1 PID: 4202 Comm: syzkaller914861 Not tainted 4.16.0-rc4+ #258
      Hardware name: Google Google Compute Engine/Google Compute Engine
      01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:17 [inline]
       dump_stack+0x194/0x24d lib/dump_stack.c:53
       print_address_description+0x73/0x250 mm/kasan/report.c:256
       kasan_report_error mm/kasan/report.c:354 [inline]
       kasan_report+0x23c/0x360 mm/kasan/report.c:412
       __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
       sctp_association_free+0x7b7/0x930 net/sctp/associola.c:332
       sctp_sendmsg+0xc67/0x1a80 net/sctp/socket.c:2075
       inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763
       sock_sendmsg_nosec net/socket.c:629 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:639
       SYSC_sendto+0x361/0x5c0 net/socket.c:1748
       SyS_sendto+0x40/0x50 net/socket.c:1716
       do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
       entry_SYSCALL_64_after_hwframe+0x42/0xb7
      
      This was introduced by commit:
      f84af331 sctp: factor out sctp_sendmsg_to_asoc from sctp_sendmsg
      
      As the newly refactored function moved the wait_for_sndbuf call to a
      point after the association was connected, allowing for peeloff events
      to occur, which in turn caused wait_for_sndbuf to return -EPIPE which
      was not caught by the logic that determines if an association should be
      freed or not.
      
      Fix it the easy way by returning the ordering of
      sctp_primitive_ASSOCIATE and sctp_wait_for_sndbuf to the old order, to
      ensure that EPIPE will not happen.
      
      Tested by myself using the syzbot reproducers with positive results
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: davem@davemloft.net
      CC: Xin Long <lucien.xin@gmail.com>
      Reported-by: syzbot+a4e4112c3aff00c8cfd8@syzkaller.appspotmail.com
      Reviewed-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0aee4c25
    • J
      net: drivers/net: Remove unnecessary skb_copy_expand OOM messages · 0c3d5a96
      Joe Perches 提交于
      skb_copy_expand without __GFP_NOWARN already does a dump_stack
      on OOM so these messages are redundant.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c3d5a96
    • D
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 80d9f3a0
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2018-03-14
      
      This series contains updates to i40e and i40evf only.
      
      Corentin Labbe cleans up the left over FCoE files in the i40e driver.
      
      Gustavo A R Silva fixes a cut and paste error.
      
      Paweł fixes a race condition when the VF driver is loaded on a host and
      virsh is trying to attach it to the virtual machine and set a MAC
      address.  Resolve the issue by adding polling in i40e_ndo_set_vf_mac()
      when the VF is in reset mode.
      
      Jake cleans up i40e_vlan_rx_register() since this only used in a single
      location, so just inline the contents of the function.  Created a helper
      function to proper update the per-filter statistics when we delete it.
      Factored out the re-enabling ATR and SB rules.  Fixed an issue when
      re-enabling ATR after the last TCPv4 filter is removed and ntuple is
      still active, we were not restoring the TCPv4 filter input set.
      
      Filip modifies the permission check function to ensure that it knows how
      many filters are being requested, which allows the check to ensure that
      the total number of filters in a single request does not cause us to go
      over the limit.
      
      Mariusz fixed an issue where the wrong calculation of partition id was
      being done on OCP PHY mezzanine cards, which in turn caused wake on LAN
      to be disabled on certain ports.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      80d9f3a0
  2. 15 3月, 2018 26 次提交
  3. 14 3月, 2018 3 次提交
  4. 13 3月, 2018 2 次提交