1. 19 1月, 2018 3 次提交
  2. 18 1月, 2018 2 次提交
    • R
      Net: ethernet: ti: netcp: Fix inbound ping crash if MTU size is greater than 1500 · 5a717843
      Rex Chang 提交于
      In the receive queue for 4096 bytes fragments, the page address
      set in the SW data0 field of the descriptor is not the one we got
      when doing the reassembly in receive. The page structure was retrieved
      from the wrong descriptor into SW data0 which is then causing a
      page fault when UDP checksum is accessing data above 1500.
      Signed-off-by: NRex Chang <rchang@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a717843
    • C
      net: fs_enet: do not call phy_stop() in interrupts · f8b39039
      Christophe Leroy 提交于
      In case of TX timeout, fs_timeout() calls phy_stop(), which
      triggers the following BUG_ON() as we are in interrupt.
      
      [92708.199889] kernel BUG at drivers/net/phy/mdio_bus.c:482!
      [92708.204985] Oops: Exception in kernel mode, sig: 5 [#1]
      [92708.210119] PREEMPT
      [92708.212107] CMPC885
      [92708.214216] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G        W       4.9.61 #39
      [92708.223227] task: c60f0a40 task.stack: c6104000
      [92708.227697] NIP: c02a84bc LR: c02a947c CTR: c02a93d8
      [92708.232614] REGS: c6105c70 TRAP: 0700   Tainted: G        W        (4.9.61)
      [92708.241193] MSR: 00021032 <ME,IR,DR,RI>[92708.244818]   CR: 24000822  XER: 20000000
      [92708.248767]
      GPR00: c02a947c c6105d20 c60f0a40 c62b4c00 00000005 0000001f c069aad8 0001a688
      GPR08: 00000007 00000100 c02a93d8 00000000 000005fc 00000000 c6213240 c06338e4
      GPR16: 00000001 c06330d4 c0633094 00000000 c0680000 c6104000 c6104000 00000000
      GPR24: 00000200 00000000 ffffffff 00000004 00000078 00009032 00000000 c62b4c00
      NIP [c02a84bc] mdiobus_read+0x20/0x74
      [92708.281517] LR [c02a947c] kszphy_config_intr+0xa4/0xc4
      [92708.286547] Call Trace:
      [92708.288980] [c6105d20] [c6104000] 0xc6104000 (unreliable)
      [92708.294339] [c6105d40] [c02a947c] kszphy_config_intr+0xa4/0xc4
      [92708.300098] [c6105d50] [c02a5330] phy_stop+0x60/0x9c
      [92708.305007] [c6105d60] [c02c84d0] fs_timeout+0xdc/0x110
      [92708.310197] [c6105d80] [c035cd48] dev_watchdog+0x268/0x2a0
      [92708.315593] [c6105db0] [c0060288] call_timer_fn+0x34/0x17c
      [92708.321014] [c6105dd0] [c00605f0] run_timer_softirq+0x21c/0x2e4
      [92708.326887] [c6105e50] [c001e19c] __do_softirq+0xf4/0x2f4
      [92708.332207] [c6105eb0] [c001e3c8] run_ksoftirqd+0x2c/0x40
      [92708.337560] [c6105ec0] [c003b420] smpboot_thread_fn+0x1f0/0x258
      [92708.343405] [c6105ef0] [c003745c] kthread+0xbc/0xd0
      [92708.348217] [c6105f40] [c000c400] ret_from_kernel_thread+0x5c/0x64
      [92708.354275] Instruction dump:
      [92708.357207] 7c0803a6 bbc10018 38210020 4e800020 7c0802a6 9421ffe0 54290024 bfc10018
      [92708.364865] 90010024 7c7f1b78 81290008 552902ee <0f090000> 3bc3002c 7fc3f378 90810008
      [92708.372711] ---[ end trace 42b05441616fafd7 ]---
      
      This patch moves fs_timeout() actions into an async worker.
      
      Fixes: commit 48257c4f ("Add fs_enet ethernet network driver, for several embedded platforms")
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8b39039
  3. 17 1月, 2018 3 次提交
  4. 16 1月, 2018 2 次提交
  5. 12 1月, 2018 10 次提交
  6. 11 1月, 2018 4 次提交
  7. 09 1月, 2018 3 次提交
  8. 06 1月, 2018 2 次提交
  9. 05 1月, 2018 2 次提交
  10. 04 1月, 2018 9 次提交
    • N
      3c59x: fix missing dma_mapping_error check and bad ring refill logic · ee4aa8df
      Neil Horman 提交于
      A few spots in 3c59x missed calls to dma_mapping_error checks, casuing
      WARN_ONS to trigger.  Clean those up.  While we're at it, refactor the
      refill code a bit so that if skb allocation or dma mapping fails, we
      recycle the existing buffer.  This prevents holes in the rx ring, and
      makes for much simpler logic
      
      Note: This is compile only tested.  Ted, if you could run this and
      confirm that it continues to work properly, I would appreciate it, as I
      currently don't have access to this hardware
      Signed-off-by: NNeil Horman <nhorman@redhat.com>
      CC: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
      CC: "David S. Miller" <davem@davemloft.net>
      Reported-by: tedheadster@gmail.com
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee4aa8df
    • N
      net: ena: fix error handling in ena_down() sequence · ee4552aa
      Netanel Belgazal 提交于
      ENA admin command queue errors are not handled as part of ena_down().
      As a result, in case of error admin queue transitions to non-running
      state and aborts all subsequent commands including those coming from
      ena_up(). Reset scheduled by the driver from the timer service
      context would not proceed due to sharing rtnl with ena_up()/ena_down()
      Signed-off-by: NNetanel Belgazal <netanel@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee4552aa
    • N
      net: ena: unmask MSI-X only after device initialization is completed · 7853b49c
      Netanel Belgazal 提交于
      Under certain conditions MSI-X interrupt might arrive right after it
      was unmasked in ena_up(). There is a chance it would be processed by
      the driver before device ENA_FLAG_DEV_UP flag is set. In such a case
      the interrupt is ignored.
      ENA device operates in auto-masked mode, therefore ignoring
      interrupt leaves it masked for good.
      Moving unmask of interrupt to be the last step in ena_up().
      Signed-off-by: NNetanel Belgazal <netanel@amazon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7853b49c
    • A
      cxgb4: Fix FW flash errors · 15962a18
      Arjun Vynipadath 提交于
      commit 96ac18f1 ("cxgb4: Add support for new flash parts")
      removed initialization of adapter->params.sf_fw_start causing issues
      while flashing firmware to card. We no longer need sf_fw_start
      in adapter->params as we already have macros defined for FW flash
      addresses.
      
      Fixes: 96ac18f1 ("cxgb4: Add support for new flash parts")
      Signed-off-by: NArjun Vynipadath <arjun@chelsio.com>
      Signed-off-by: NCasey Leedom <leedom@chelsio.com>
      Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      15962a18
    • J
      i40e: flower: Fix return value for unsupported offload · bc4244c6
      Jiri Pirko 提交于
      When filter configuration is not supported, drivers should return
      -EOPNOTSUPP so the core can react correctly.
      
      Fixes: 2f4b411a ("i40e: Enable cloud filters via tc-flower")
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      bc4244c6
    • J
      i40e: don't remove netdev->dev_addr when syncing uc list · 458867b2
      Jacob Keller 提交于
      In some circumstances, such as with bridging, it is possible that the
      stack will add a devices own MAC address to its unicast address list.
      
      If, later, the stack deletes this address, then the i40e driver will
      receive a request to remove this address.
      
      The driver stores its current MAC address as part of the MAC/VLAN hash
      array, since it is convenient and matches exactly how the hardware
      expects to be told which traffic to receive.
      
      This causes a problem, since for more devices, the MAC address is stored
      separately, and requests to delete a unicast address should not have the
      ability to remove the filter for the MAC address.
      
      Fix this by forcing a check on every address sync to ensure we do not
      remove the device address.
      
      There is a very narrow possibility of a race between .set_mac and
      .set_rx_mode, if we don't change netdev->dev_addr before updating our
      internal MAC list in .set_mac. This might be possible if .set_rx_mode is
      going to remove MAC "XYZ" from the list, at the same time as .set_mac
      changes our dev_addr to MAC "XYZ", we might possibly queue a delete,
      then an add in .set_mac, then queue a delete in .set_rx_mode's
      dev_uc_sync and then update netdev->dev_addr. We can avoid this by
      moving the copy into dev_addr prior to the changes to the MAC filter
      list.
      
      A similar race on the other side does not cause problems, as if we're
      changing our MAC form A to B, and we race with .set_rx_mode, it could
      queue a delete from A, we'd update our address, and allow the delete.
      This seems like a race, but in reality we're about to queue a delete of
      A anyways, so it would not cause any issues.
      
      A race in the initialization code is unlikely because the netdevice has
      not yet been fully initialized and the stack should not be adding or
      removing addresses yet.
      
      Note that we don't (yet) need similar code for the VF driver because it
      does not make use of __dev_uc_sync and __dev_mc_sync, but instead roles
      its own method for handling updates to the MAC/VLAN list, which already
      has code to protect against removal of the hardware address.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      458867b2
    • A
      i40e/i40evf: Account for frags split over multiple descriptors in check linearize · 248de22e
      Alexander Duyck 提交于
      The original code for __i40e_chk_linearize didn't take into account the
      fact that if a fragment is 16K in size or larger it has to be split over 2
      descriptors and the smaller of those 2 descriptors will be on the trailing
      edge of the transmit. As a result we can get into situations where we didn't
      catch requests that could result in a Tx hang.
      
      This patch takes care of that by subtracting the length of all but the
      trailing edge of the stale fragment before we test for sum. By doing this
      we can guarantee that we have all cases covered, including the case of a
      fragment that spans multiple descriptors. We don't need to worry about
      checking the inner portions of this since 12K is the maximum aligned DMA
      size and that is larger than any MSS will ever be since the MTU limit for
      jumbos is something on the order of 9K.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      248de22e
    • F
      net: fec: defer probe if regulator is not ready · 3f38c683
      Fugang Duan 提交于
      Defer probe if regulator is not ready. E.g. some regulator is fixed
      regulator controlled by i2c expander gpio, the i2c device may be probed
      after the driver, then it should handle the case of defer probe error.
      Signed-off-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f38c683
    • F
      net: fec: restore dev_id in the cases of probe error · e90f686b
      Fugang Duan 提交于
      The static variable dev_id always plus one before netdev registerred.
      It should restore the dev_id value in the cases of probe error.
      Signed-off-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e90f686b