1. 09 2月, 2019 19 次提交
  2. 08 2月, 2019 10 次提交
    • A
      net: dsa: b53: Fix for failure when irq is not defined in dt · 39841cc1
      Arun Parameswaran 提交于
      Fixes the issues with non BCM58XX chips in the b53 driver
      failing, when the irq is not specified in the device tree.
      
      Removed the check for BCM58XX in b53_srab_prepare_irq(),
      so the 'port->irq' will be set to '-EXIO' if the irq is not
      specified in the device tree.
      
      Fixes: 16994374 ("net: dsa: b53: Make SRAB driver manage port interrupts")
      Fixes: b2ddc48a ("net: dsa: b53: Do not fail when IRQ are not initialized")
      Signed-off-by: NArun Parameswaran <arun.parameswaran@broadcom.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39841cc1
    • H
      net: phy: let genphy_c45_read_link manage the devices to check · 998a8a83
      Heiner Kallweit 提交于
      Let genphy_c45_read_link manage the devices to check, this removes
      overhead from callers. Add C22EXT to the list of excluded devices
      because it doesn't implement the status register. According to the
      802.3 clause 45 spec registers 29.0 - 29.4 are reserved.
      
      At the moment we have very few clause 45 PHY drivers, so we are
      lacking experience whether other drivers will have to exclude further
      devices, or may need to check PHY XS. If we should figure out that
      list of devices to check needs to be configurable, I think best will
      be to add a device list member to struct phy_driver.
      
      v2:
      - adjusted commit message
      - exclude also device C22EXT from link checking
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      998a8a83
    • M
      net: fixed-phy: Add fixed_phy_register_with_gpiod() API · 71bd106d
      Moritz Fischer 提交于
      Add fixed_phy_register_with_gpiod() API. It lets users create a
      fixed_phy instance that uses a GPIO descriptor which was obtained
      externally e.g. through platform data.
      This enables platform devices (non-DT based) to use GPIOs for link
      status.
      Signed-off-by: NMoritz Fischer <mdf@kernel.org>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      71bd106d
    • R
      net: marvell: neta: add comphy support · a10c1c81
      Russell King 提交于
      Add support for the common phy binding, so that we can reconfigure the
      comphy according to the desired ethernet speed.  This will allow us to
      support 1000base-X and 2500base-X SFPs dynamically on SolidRun Clearfog.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a10c1c81
    • R
      phy: armada38x: add common phy support · 14dc100b
      Russell King 提交于
      Add support for the Armada 38x common phy to allow us to change the
      speed of the Ethernet serdes lane.  This driver only supports
      manipulation of the speed, it does not support configuration of the
      common phy.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14dc100b
    • P
      net: vxlan: Free a leaked vetoed multicast rdst · fc4aa1ca
      Petr Machata 提交于
      When an rdst is rejected by a driver, the current code removes it from
      the remote list, but neglects to free it. This is triggered by
      tools/testing/selftests/drivers/net/mlxsw/vxlan_fdb_veto.sh and shows as
      the following kmemleak trace:
      
      unreferenced object 0xffff88817fa3d888 (size 96):
        comm "softirq", pid 0, jiffies 4372702718 (age 165.252s)
        hex dump (first 32 bytes):
          02 00 00 00 c6 33 64 03 80 f5 a2 61 81 88 ff ff  .....3d....a....
          06 df 71 ae ff ff ff ff 0c 00 00 00 04 d2 6a 6b  ..q...........jk
        backtrace:
          [<00000000296b27ac>] kmem_cache_alloc_trace+0x1ae/0x370
          [<0000000075c86dc6>] vxlan_fdb_append.part.12+0x62/0x3b0 [vxlan]
          [<00000000e0414b63>] vxlan_fdb_update+0xc61/0x1020 [vxlan]
          [<00000000f330c4bd>] vxlan_fdb_add+0x2e8/0x3d0 [vxlan]
          [<0000000008f81c2c>] rtnl_fdb_add+0x4c2/0xa10
          [<00000000bdc4b270>] rtnetlink_rcv_msg+0x6dd/0x970
          [<000000006701f2ce>] netlink_rcv_skb+0x290/0x410
          [<00000000c08a5487>] rtnetlink_rcv+0x15/0x20
          [<00000000d5f54b1e>] netlink_unicast+0x43f/0x5e0
          [<00000000db4336bb>] netlink_sendmsg+0x789/0xcd0
          [<00000000e1ee26b6>] sock_sendmsg+0xba/0x100
          [<00000000ba409802>] ___sys_sendmsg+0x631/0x960
          [<000000003c332113>] __sys_sendmsg+0xea/0x180
          [<00000000f4139144>] __x64_sys_sendmsg+0x78/0xb0
          [<000000006d1ddc59>] do_syscall_64+0x94/0x410
          [<00000000c8defa9a>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Move vxlan_dst_free() up and schedule a call thereof to plug this leak.
      
      Fixes: 61f46fe8 ("vxlan: Allow vetoing of FDB notifications")
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fc4aa1ca
    • H
      geneve: should not call rt6_lookup() when ipv6 was disabled · c0a47e44
      Hangbin Liu 提交于
      When we add a new GENEVE device with IPv6 remote, checking only for
      IS_ENABLED(CONFIG_IPV6) is not enough as we may disable IPv6 in the
      kernel command line (ipv6.disable=1), and calling rt6_lookup() would
      cause a NULL pointer dereference.
      
      v2:
      - don't mix declarations and code (reported by Stefano Brivio, Eric Dumazet)
      - there's no need to use in6_dev_get() as we only need to check that
        idev exists (reported by David Ahern). This is under RTNL, so we can
        simply use __in6_dev_get() instead (Stefano, Eric).
      Reported-by: NJianlin Shi <jishi@redhat.com>
      Fixes: c40e89fd ("geneve: configure MTU based on a lower device")
      Cc: Alexey Kodanev <alexey.kodanev@oracle.com>
      Signed-off-by: NHangbin Liu <liuhangbin@gmail.com>
      Reviewed-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0a47e44
    • E
      net/mlx5e: Add tx timeout support for mlx5e tx reporter · 7d91126b
      Eran Ben Elisha 提交于
      With this patch, ndo_tx_timeout callback will be redirected to the tx
      reporter in order to detect a tx timeout error and report it to the
      devlink health. (The watchdog detects tx timeouts, but the driver verify
      the issue still exists before launching any recover method).
      
      In addition, recover from tx timeout in case of lost interrupt was added
      to the tx reporter recover method. The tx timeout recover from lost
      interrupt is not a new feature in the driver, this patch re-organize the
      functionality and move it to the tx reporter recovery flow.
      
      tx timeout example:
      (with auto_recover set to false, if set to true, the manual recover and
      diagnose sections are irrelevant)
      
      $cat /sys/kernel/debug/tracing/trace
      ...
      devlink_health_report: bus_name=pci dev_name=0000:00:09.0
      driver_name=mlx5_core reporter_name=tx: TX timeout on queue: 0, SQ: 0x8a,
      CQ: 0x35, SQ Cons: 0x2 SQ Prod: 0x2, usecs since last trans: 14912000
      
      $devlink health show
      pci/0000:00:09.0:
        name tx
          state healthy #err 1 #recover 0 last_dump_ts N/A
          parameters:
            grace_period 500 auto_recover false
      
      $devlink health diagnose pci/0000:00:09.0 reporter tx -j -p
      {
          "SQs": [ {
                  "sqn": 138,
                  "HW state": 1,
                  "stopped": true
              },{
                  "sqn": 142,
                  "HW state": 1,
                  "stopped": false
              } ]
      }
      
      $devlink health diagnose pci/0000:00:09.0 reporter tx
      SQs:
        sqn: 138 HW state: 1 stopped: true
        sqn: 142 HW state: 1 stopped: false
      
      $devlink health recover pci/0000:00:09 reporter tx
      $devlink health show
      pci/0000:00:09.0:
        name tx
          state healthy #err 1 #recover 1 last_dump_ts N/A
          parameters:
            grace_period 500 auto_recover false
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Acked-by: NSaeed Mahameed <saeedm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d91126b
    • E
      net/mlx5e: Add tx reporter support · de8650a8
      Eran Ben Elisha 提交于
      Add mlx5e tx reporter to devlink health reporters. This reporter will be
      responsible for diagnosing, reporting and recovering of tx errors.
      This patch declares the TX reporter operations and creates it using the
      devlink health API. Currently, this reporter supports reporting and
      recovering from send error CQE only. In addition, it adds diagnose
      information for the open SQs.
      
      For a local SQ recover (due to driver error report), in case of SQ recover
      failure, the recover operation will be considered as a failure.
      For a full tx recover, an attempt to close and open the channels will be
      done. If this one passed successfully, it will be considered as a
      successful recover.
      
      The SQ recover from error CQE flow is not a new feature in the driver,
      this patch re-organize the functions and adapt them for the devlink
      health API. For this purpose, move code from en_main.c to a new file
      named reporter_tx.c.
      
      Diagnose output:
      $devlink health diagnose pci/0000:00:09.0 reporter tx -j -p
      {
          "SQs": [ {
                  "sqn": 138,
                  "HW state": 1,
                  "stopped": false
              },{
                  "sqn": 142,
                  "HW state": 1,
                  "stopped": false
              } ]
      }
      
      $devlink health diagnose pci/0000:00:09.0 reporter tx
      SQs:
        sqn: 138 HW state: 1 stopped: false
        sqn: 142 HW state: 1 stopped: false
      Signed-off-by: NEran Ben Elisha <eranbe@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Acked-by: NSaeed Mahameed <saeedm@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de8650a8
    • M
      net: phy: fixed_phy: Fix fixed_phy not checking GPIO · 8f289805
      Moritz Fischer 提交于
      Fix fixed_phy not checking GPIO if no link_update callback
      is registered.
      
      In the original version all users registered a link_update
      callback so the issue was masked.
      
      Fixes: a5597008 ("phy: fixed_phy: Add gpio to determine link up/down.")
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NMoritz Fischer <mdf@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f289805
  3. 07 2月, 2019 11 次提交