1. 09 Nov, 2022 9 commits
  2. 08 Nov, 2022 13 commits
  3. 07 Nov, 2022 13 commits
  4. 05 Nov, 2022 5 commits
    • Sean Anderson's avatar
      net: fman: Unregister ethernet device on removal · b7cbc674
      Sean Anderson authored
      When the mac device gets removed, it leaves behind the ethernet device.
      This will result in a segfault next time the ethernet device accesses
      mac_dev. Remove the ethernet device when we get removed to prevent
      this. This is not completely reversible, since some resources aren't
      cleaned up properly, but that can be addressed later.
      
      Fixes: 39339616 ("fsl/fman: Add FMan MAC driver")
      Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
      Link: https://lore.kernel.org/r/20221103182831.2248833-1-sean.anderson@seco.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b7cbc674
    • Jakub Kicinski's avatar
      Merge branch 'bnxt_en-bug-fixes' · c3812c95
      Jakub Kicinski authored
      Michael Chan says:
      
      ====================
      bnxt_en: Bug fixes
      
      This bug fix series includes fixes for PCIE AER, a crash that may occur
      when doing ethtool -C in the middle of error recovery, and aRFS.
      ====================
      
      Link: https://lore.kernel.org/r/1667518407-15761-1-git-send-email-michael.chan@broadcom.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c3812c95
    • Alex Barba's avatar
      bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer · 02597d39
      Alex Barba authored
      In the bnxt_en driver ndo_rx_flow_steer returns '0' whenever an entry
      that we are attempting to steer is already found.  This is not the
      correct behavior.  The return code should be the value/index that
      corresponds to the entry.  Returning zero all the time causes the
      RFS records to be incorrect unless entry '0' is the correct one.  As
      flows migrate to different cores this can create entries that are not
      correct.
      
      Fixes: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.")
      Reported-by: default avatarAkshay Navgire <anavgire@purestorage.com>
      Signed-off-by: default avatarAlex Barba <alex.barba@broadcom.com>
      Signed-off-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      02597d39
    • Michael Chan's avatar
      bnxt_en: Fix possible crash in bnxt_hwrm_set_coal() · 6d81ea37
      Michael Chan authored
      During the error recovery sequence, the rtnl_lock is not held for the
      entire duration and some datastructures may be freed during the sequence.
      Check for the BNXT_STATE_OPEN flag instead of netif_running() to ensure
      that the device is fully operational before proceeding to reconfigure
      the coalescing settings.
      
      This will fix a possible crash like this:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
      PGD 0 P4D 0
      Oops: 0000 [#1] SMP NOPTI
      CPU: 10 PID: 181276 Comm: ethtool Kdump: loaded Tainted: G          IOE    --------- -  - 4.18.0-348.el8.x86_64 #1
      Hardware name: Dell Inc. PowerEdge R740/0F9N89, BIOS 2.3.10 08/15/2019
      RIP: 0010:bnxt_hwrm_set_coal+0x1fb/0x2a0 [bnxt_en]
      Code: c2 66 83 4e 22 08 66 89 46 1c e8 10 cb 00 00 41 83 c6 01 44 39 b3 68 01 00 00 0f 8e a3 00 00 00 48 8b 93 c8 00 00 00 49 63 c6 <48> 8b 2c c2 48 8b 85 b8 02 00 00 48 85 c0 74 2e 48 8b 74 24 08 f6
      RSP: 0018:ffffb11c8dcaba50 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff8d168a8b0ac0 RCX: 00000000000000c5
      RDX: 0000000000000000 RSI: ffff8d162f72c000 RDI: ffff8d168a8b0b28
      RBP: 0000000000000000 R08: b6e1f68a12e9a7eb R09: 0000000000000000
      R10: 0000000000000001 R11: 0000000000000037 R12: ffff8d168a8b109c
      R13: ffff8d168a8b10aa R14: 0000000000000000 R15: ffffffffc01ac4e0
      FS:  00007f3852e4c740(0000) GS:ffff8d24c0080000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000000 CR3: 000000041b3ee003 CR4: 00000000007706e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      PKRU: 55555554
      Call Trace:
       ethnl_set_coalesce+0x3ce/0x4c0
       genl_family_rcv_msg_doit.isra.15+0x10f/0x150
       genl_family_rcv_msg+0xb3/0x160
       ? coalesce_fill_reply+0x480/0x480
       genl_rcv_msg+0x47/0x90
       ? genl_family_rcv_msg+0x160/0x160
       netlink_rcv_skb+0x4c/0x120
       genl_rcv+0x24/0x40
       netlink_unicast+0x196/0x230
       netlink_sendmsg+0x204/0x3d0
       sock_sendmsg+0x4c/0x50
       __sys_sendto+0xee/0x160
       ? syscall_trace_enter+0x1d3/0x2c0
       ? __audit_syscall_exit+0x249/0x2a0
       __x64_sys_sendto+0x24/0x30
       do_syscall_64+0x5b/0x1a0
       entry_SYSCALL_64_after_hwframe+0x65/0xca
      RIP: 0033:0x7f38524163bb
      
      Fixes: 2151fe08 ("bnxt_en: Handle RESET_NOTIFY async event from firmware.")
      Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6d81ea37
    • Vikas Gupta's avatar
      bnxt_en: fix the handling of PCIE-AER · 0cf736a1
      Vikas Gupta authored
      Fix the sequence required for PCIE-AER. While slot reset occurs, firmware
      might not be ready and the driver needs to check for its recovery.  We
      also need to remap the health registers for some chips and clear the
      resource reservations.  The resources will be allocated again during
      bnxt_io_resume().
      
      Fixes: fb1e6e56 ("bnxt_en: Fix AER recovery.")
      Signed-off-by: default avatarVikas Gupta <vikas.gupta@broadcom.com>
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0cf736a1