1. 30 May, 2017 10 commits
  2. 27 May, 2017 6 commits
    • Florian Fainelli's avatar
      net: phy: Relax error checking on sysfs_create_link() · a3995460
      Florian Fainelli authored
      Some Ethernet drivers will attach/connect to a PHY device before calling
      register_netdevice() which is responsible for calling netdev_register_kobject()
      which would do the network device's kobject initialization. In such a case,
      sysfs_create_link() would return -ENOENT because the network device's kobject
      is not ready yet, and we would fail to connect to the PHY device.
      
      In order to keep things simple and symetrical, we just take the success path as
      indicative of the ability to access the network device's kobject, and create
      the second link if that's the case.
      
      Fixes: 5568363f ("net: phy: Create sysfs reciprocal links for attached_dev/phydev")
      Reported-by: default avatarWoojung Hung <Woojung.Huh@microchip.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a3995460
    • Vivien Didelot's avatar
      net: dsa: mv88e6xxx: handle SERDES error appropriately · 523a8904
      Vivien Didelot authored
      mv88e6xxx_serdes_power returns an error, so no need to print an error
      message inside of it. Rather print it in its caller when the error is
      ignored, which is in the mv88e6xxx_port_disable void function.
      
      Catch and return its error in the counterpart mv88e6xxx_port_enable.
      
      Fixes: 04aca993 ("dsa: mv88e6xxx: Enable/Disable SERDES on port enable/disable")
      Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      523a8904
    • David S. Miller's avatar
      Merge branch 'rtnetlink-Updates-to-rtnetlink_event' · 5f1d258d
      David S. Miller authored
      Vladislav Yasevich says:
      
      ====================
      rtnetlink: Updates to rtnetlink_event()
      
      First is the patch to add IFLA_EVENT attribute to the netlink message.  It
      supports only currently white-listed events.
      Like before, this is just an attribute that gets added to the rtnetlink
      message only when the messaged was generated as a result of a netdev event.
      In my case, this is necessary since I want to trap NETDEV_NOTIFY_PEERS
      event (also possibly NETDEV_RESEND_IGMP event) and perform certain actions
      in user space.  This is not possible since the messages generated as
      a result of netdev events do not usually contain any changed data.  They
      are just notifications.  This patch exposes this notification type to
      userspace.
      
      Second, I remove duplicate messages that a result of a change to bonding
      options.  If netlink is used to configure bonding options, 2 messages
      are generated, one as a result NETDEV_CHANGEINFODATA event triggered by
      bonding code and one a result of device state changes triggered by
      netdev_state_change (called from do_setlink).
      
      V6: Updated names and refactored to make it less tied to netdev events.
          (From David Ahern)
      V5: Rebased.  Added iproute2 patch to the series.
      V4:
        * Removed the patch the removed NETDEV_CHANGENAME from event whitelist.
          It doesn't trigger duplicate messages since name changes can only be
          done while device is down and netdev_state_change() doesn't report
          changes while device is down.
        * Added a patch to clean-up duplicate messages on bonding option changes.
      
      V3: Rebased.  Cleaned-up duplicate event.
      
      V2: Added missed events (from David Ahern)
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f1d258d
    • Vlad Yasevich's avatar
      bonding: Prevent duplicate userspace notification · 7a7e96e0
      Vlad Yasevich authored
      Whenever a user changes bonding options, a NETDEV_CHANGEINFODATA
      notificatin is generated which results in a rtnelink message to
      be sent.  While runnig 'ip monitor', we can actually see 2 messages,
      one a result of the event, and the other a result of state change
      that is generated bo netdev_state_change().  However, this is not
      always the case. If bonding changes were done via sysfs or ifenslave
      (old ioctl interface), then only 1 message is seen.
      
      This patch removes duplicate messages in the case of using netlink
      to configure bonding.  It introduceds a separte function that
      triggers a netdev event and uses that function in the syfs and ioctl
      cases.
      
      This was discovered while auditing all the different envents and
      continues the effort of cleaning up duplicated netlink messages.
      
      CC: David Ahern <dsa@cumulusnetworks.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a7e96e0
    • Vlad Yasevich's avatar
      rtnl: Add support for netdev event to link messages · 3d3ea5af
      Vlad Yasevich authored
      When netdev events happen, a rtnetlink_event() handler will send
      messages for every event in it's white list.  These messages contain
      current information about a particular device, but they do not include
      the iformation about which event just happened.  So, it is impossible
      to tell what just happend for these events.
      
      This patch adds a new extension to RTM_NEWLINK message called IFLA_EVENT
      that would have an encoding of event that triggered this
      message.  This would allow the the message consumer to easily determine
      if it needs to perform certain actions.
      Signed-off-by: default avatarVladislav Yasevich <vyasevic@redhat.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d3ea5af
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 34aa83c2
      David S. Miller authored
      Overlapping changes in drivers/net/phy/marvell.c, bug fix in 'net'
      restricting a HW workaround alongside cleanups in 'net-next'.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34aa83c2
  3. 26 May, 2017 24 commits