1. 18 6月, 2020 3 次提交
  2. 16 6月, 2020 13 次提交
  3. 15 6月, 2020 3 次提交
  4. 14 6月, 2020 3 次提交
    • G
      net: ethernet: ti: ale: fix allmulti for nu type ale · bc139119
      Grygorii Strashko 提交于
      On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow
      unregistered mcast packets to pass.
      
      This happens, because ALE VLAN entries on these SoCs do not contain port
      masks for reg/unreg mcast packets, but instead store indexes of
      ALE_VLAN_MASK_MUXx_REG registers which intended for store port masks for
      reg/unreg mcast packets.
      This path was missed by commit 9d1f6447 ("net: ethernet: ti: ale: fix
      seeing unreg mcast packets with promisc and allmulti disabled").
      
      Hence, fix it by taking into account ALE type in cpsw_ale_set_allmulti().
      
      Fixes: 9d1f6447 ("net: ethernet: ti: ale: fix seeing unreg mcast packets with promisc and allmulti disabled")
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc139119
    • G
      net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init · 2074f9ea
      Grygorii Strashko 提交于
      The ALE parameters structure is created on stack, so it has to be reset
      before passing to cpsw_ale_create() to avoid garbage values.
      
      Fixes: 93a76530 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2074f9ea
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  5. 13 6月, 2020 1 次提交
  6. 12 6月, 2020 17 次提交
    • A
      net: ipa: header pad field only valid for AP->modem endpoint · f330fda3
      Alex Elder 提交于
      Only QMAP endpoints should be configured to find a pad size field
      within packet headers.  They are found in the first byte of the QMAP
      header (and the hardware fills only the 6 bits in that byte that
      constitute the pad_len field).
      
      The RMNet driver assumes the pad_len field is valid for received
      packets, so we want to ensure the pad_len field is filled in that
      case.  That driver also assumes the length in the QMAP header
      includes the pad bytes.
      
      The RMNet driver does *not* pad the packets it sends, so the pad_len
      field can be ignored.
      
      Fix ipa_endpoint_init_hdr_ext() so it only marks the pad field
      offset valid for QMAP RX endpoints, and in that case indicates
      that the length field in the header includes the pad bytes.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f330fda3
    • A
      net: ipa: program upper nibbles of sequencer type · 636edeaa
      Alex Elder 提交于
      The upper two nibbles of the sequencer type were not used for
      SDM845, and were assumed to be 0.  But for SC7180 they are used, and
      so they must be programmed by ipa_endpoint_init_seq().  Fix this bug.
      
      IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP doesn't have a descriptive
      comment, so add one.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      636edeaa
    • A
      net: ipa: fix modem LAN RX endpoint id · 9b8ad8da
      Alex Elder 提交于
      The endpoint id assigned to the modem LAN RX endpoint for the SC7180 SoC
      is incorrect.  The erroneous value might have been copied from SDM845 and
      never updated.  The correct endpoint id to use for this SoC is 11.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b8ad8da
    • A
      net: ipa: program metadata mask differently · 8730f45d
      Alex Elder 提交于
      The way the mask value is programmed for QMAP RX endpoints was based
      on some wrong assumptions about the way metadata containing the QMAP
      mux_id value is formatted.  The metadata value supplied by the
      modem is *not* in QMAP format, and in fact contains the mux_id we
      want in its (big endian) low-order byte.  That byte must be written
      by the IPA into offset 1 of the QMAP header it inserts before the
      received packet.
      
      QMAP TX endpoints *do* use a QMAP header as the metadata sent with
      each packet.  The modem assumes this, and based on that assumes the
      mux_id is in the second byte.  To match those assumptions we must
      program the modem TX (QMAP) endpoint HDR register to indicate the
      metadata will be found at offset 0 in the message header.
      
      The previous configuration managed to work, but it was not working
      correctly.  This patch fixes a bug whose symptom was receipt of
      messages containing the wrong QMAP mux_id.
      
      In fixing this, get rid of ipa_rmnet_mux_id_metadata_mask(), which
      was more or less defined so there was a separate place to explain
      what was happening as we generated the mask value.  Instead, put a
      longer description of how this works above ipa_endpoint_init_hdr(),
      and define the metadata mask to use as a simple constant.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8730f45d
    • S
      ionic: add pcie_print_link_status · c25cba36
      Shannon Nelson 提交于
      Print the PCIe link information for our device.
      
      Fixes: 77f972a7 ("ionic: remove support for mgmt device")
      Signed-off-by: NShannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c25cba36
    • C
      amdgpu: a NULL ->mm does not mean a thread is a kthread · 8449d150
      Christoph Hellwig 提交于
      Use the proper API instead.
      
      Fixes: 70539bd7 ("drm/amd: Update MEC HQD loading code for KFD")
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Tested-by: NJens Axboe <axboe@kernel.dk>
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Reviewed-by: NJens Axboe <axboe@kernel.dk>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Cc: Felipe Balbi <balbi@kernel.org>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Link: http://lkml.kernel.org/r/20200404094101.672954-1-hch@lst.de
      Link: http://lkml.kernel.org/r/20200404094101.672954-2-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8449d150
    • D
      net/mlx5: E-Switch, Fix some error pointer dereferences · 09a92975
      Dan Carpenter 提交于
      We can't leave "counter" set to an error pointer.  Otherwise either it
      will lead to an error pointer dereference later in the function or it
      leads to an error pointer dereference when we call mlx5_fc_destroy().
      
      Fixes: 07bab950 ("net/mlx5: E-Switch, Refactor eswitch ingress acl codes")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      09a92975
    • L
      net/mlx5: Don't fail driver on failure to create debugfs · 17e73d47
      Leon Romanovsky 提交于
      Clang warns:
      
      drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:6: warning: variable
      'err' is used uninitialized whenever 'if' condition is true
      [-Wsometimes-uninitialized]
              if (!priv->dbg_root) {
                  ^~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/main.c:1303:9: note:
      uninitialized use occurs here
              return err;
                     ^~~
      drivers/net/ethernet/mellanox/mlx5/core/main.c:1278:2: note: remove the
      'if' if its condition is always false
              if (!priv->dbg_root) {
              ^~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/mellanox/mlx5/core/main.c:1259:9: note: initialize
      the variable 'err' to silence this warning
              int err;
                     ^
                      = 0
      1 warning generated.
      
      The check of returned value of debugfs_create_dir() is wrong because
      by the design debugfs failures should never fail the driver and the
      check itself was wrong too. The kernel compiled without CONFIG_DEBUG_FS
      will return ERR_PTR(-ENODEV) and not NULL as expected.
      
      Fixes: 11f3b84d ("net/mlx5: Split mdev init and pci init")
      Link: https://github.com/ClangBuiltLinux/linux/issues/1042Reported-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      17e73d47
    • O
      net/mlx5e: CT: Fix ipv6 nat header rewrite actions · 0d156f2d
      Oz Shlomo 提交于
      Set the ipv6 word fields according to the hardware definitions.
      
      Fixes: ac991b48 ("net/mlx5e: CT: Offload established flows")
      Signed-off-by: NOz Shlomo <ozsh@mellanox.com>
      Reviewed-by: NRoi Dayan <roid@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      0d156f2d
    • P
      net/mlx5: Fix devlink objects and devlink device unregister sequence · 98f91c45
      Parav Pandit 提交于
      Current below problems exists.
      
      1. devlink device is registered by mlx5_load_one(). But it is
      not unregistered by mlx5_unload_one(). This is incorrect.
      
      2. Above issue leads to,
      When mlx5 PCI device is removed, currently devlink device is
      unregistered before devlink ports are unregistered in below ladder
      diagram.
      
      remove_one()
        mlx5_devlink_unregister()
          [..]
          devlink_unregister() <- ports are still registered!
        mlx5_unload_one()
          mlx5_unregister_device()
            mlx5_remove_device()
              mlx5e_remove()
                mlx5e_devlink_port_unregister()
                  devlink_port_unregister()
      
      3. Condition checking for registering and unregister device are not
      symmetric either in these routines.
      
      Hence, fix the sequence by having load and unload routines symmetric
      and in right order.
      i.e.
      (a) register devlink device followed by registering devlink ports
      (b) unregister devlink ports followed by devlink device
      
      Do this based on boot and cleanup flags instead of different
      conditions.
      
      Fixes: c6acd629 ("net/mlx5e: Add support for devlink-port in non-representors mode")
      Fixes: f60f315d ("net/mlx5e: Register devlink ports for physical link, PCI PF, VFs")
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      98f91c45
    • P
      net/mlx5: Disable reload while removing the device · 60904cd3
      Parav Pandit 提交于
      While unregistration is in progress, user might be reloading the
      interface.
      This can race with unregistration in below flow which uses the
      resources which are getting disabled by reload flow.
      
      Hence, disable the devlink reloading first when removing the device.
      
           CPU0                                   CPU1
           ----                                   ----
      local_pci_remove()                  devlink_mutex
        remove_one()                       devlink_nl_cmd_reload()
          mlx5_unregister_device()           devlink_reload()
                                             ops->reload_down()
                                               mlx5_unload_one()
      
      Fixes: 4383cfcc ("net/mlx5: Add devlink reload")
      Signed-off-by: NParav Pandit <parav@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      60904cd3
    • A
      net/mlx5e: Fix ethtool hfunc configuration change · 5f1572e6
      Aya Levin 提交于
      Changing RX hash function requires rearranging of RQT internal indexes,
      the user isn't exposed to such changes and these changes do not affect
      the user configured indirection table. Rebuild RQ table on hfunc change.
      
      Fixes: bdfc028d ("net/mlx5e: Fix ethtool RX hash func configuration change")
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      5f1572e6
    • M
      net/mlx5e: Fix repeated XSK usage on one channel · 36d45fb9
      Maxim Mikityanskiy 提交于
      After an XSK is closed, the relevant structures in the channel are not
      zeroed. If an XSK is opened the second time on the same channel without
      recreating channels, the stray values in the structures will lead to
      incorrect operation of queues, which causes CQE errors, and the new
      socket doesn't work at all.
      
      This patch fixes the issue by explicitly zeroing XSK-related structs in
      the channel on XSK close. Note that those structs are zeroed on channel
      creation, and usually a configuration change (XDP program is set)
      happens on XSK open, which leads to recreating channels, so typical XSK
      usecases don't suffer from this issue. However, if XSKs are opened and
      closed on the same channel without removing the XDP program, this bug
      reproduces.
      
      Fixes: db05815b ("net/mlx5e: Add XSK zero-copy support")
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      36d45fb9
    • D
      net/mlx5: DR, Fix freeing in dr_create_rc_qp() · 47a357de
      Denis Efremov 提交于
      Variable "in" in dr_create_rc_qp() is allocated with kvzalloc() and
      should be freed with kvfree().
      
      Fixes: 297ccceb ("net/mlx5: DR, Expose an internal API to issue RDMA operations")
      Cc: stable@vger.kernel.org
      Signed-off-by: NDenis Efremov <efremov@linux.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      47a357de
    • S
      net/mlx5: Fix fatal error handling during device load · b6e0b6be
      Shay Drory 提交于
      Currently, in case of fatal error during mlx5_load_one(), we cannot
      enter error state until mlx5_load_one() is finished, what can take
      several minutes until commands will get timeouts, because these commands
      can't be processed due to the fatal error.
      Fix it by setting dev->state as MLX5_DEVICE_STATE_INTERNAL_ERROR before
      requesting the lock.
      
      Fixes: c1d4d2e9 ("net/mlx5: Avoid calling sleeping function by the health poll thread")
      Signed-off-by: NShay Drory <shayd@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      b6e0b6be
    • S
      net/mlx5: drain health workqueue in case of driver load error · 42ea9f1b
      Shay Drory 提交于
      In case there is a work in the health WQ when we teardown the driver,
      in driver load error flow, the health work will try to read dev->iseg,
      which was already unmap in mlx5_pci_close().
      Fix it by draining the health workqueue first thing in mlx5_pci_close().
      
      Trace of the error:
      BUG: unable to handle page fault for address: ffffb5b141c18014
      PF: supervisor read access in kernel mode
      PF: error_code(0x0000) - not-present page
      PGD 1fe95d067 P4D 1fe95d067 PUD 1fe95e067 PMD 1b7823067 PTE 0
      Oops: 0000 [#1] SMP PTI
      CPU: 3 PID: 6755 Comm: kworker/u128:2 Not tainted 5.2.0-net-next-mlx5-hv_stats-over-last-worked-hyperv #1
      Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  04/28/2016
      Workqueue: mlx5_healtha050:00:02.0 mlx5_fw_fatal_reporter_err_work [mlx5_core]
      RIP: 0010:ioread32be+0x30/0x40
      Code: 00 77 27 48 81 ff 00 00 01 00 76 07 0f b7 d7 ed 0f c8 c3 55 48 c7 c6 3b ee d5 9f 48 89 e5 e8 67 fc ff ff b8 ff ff ff ff 5d c3 <8b> 07 0f c8 c3 66 66 2e 0f 1f 84 00 00 00 00 00 48 81 fe ff ff 03
      RSP: 0018:ffffb5b14c56fd78 EFLAGS: 00010292
      RAX: ffffb5b141c18000 RBX: ffff8e9f78a801c0 RCX: 0000000000000000
      RDX: 0000000000000001 RSI: ffff8e9f7ecd7628 RDI: ffffb5b141c18014
      RBP: ffffb5b14c56fd90 R08: 0000000000000001 R09: 0000000000000000
      R10: ffff8e9f372a2c30 R11: ffff8e9f87f4bc40 R12: ffff8e9f372a1fc0
      R13: ffff8e9f78a80000 R14: ffffffffc07136a0 R15: ffff8e9f78ae6f20
      FS:  0000000000000000(0000) GS:ffff8e9f7ecc0000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffffb5b141c18014 CR3: 00000001c8f82006 CR4: 00000000003606e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       ? mlx5_health_try_recover+0x4d/0x270 [mlx5_core]
       mlx5_fw_fatal_reporter_recover+0x16/0x20 [mlx5_core]
       devlink_health_reporter_recover+0x1c/0x50
       devlink_health_report+0xfb/0x240
       mlx5_fw_fatal_reporter_err_work+0x65/0xd0 [mlx5_core]
       process_one_work+0x1fb/0x4e0
       ? process_one_work+0x16b/0x4e0
       worker_thread+0x4f/0x3d0
       kthread+0x10d/0x140
       ? process_one_work+0x4e0/0x4e0
       ? kthread_cancel_delayed_work_sync+0x20/0x20
       ret_from_fork+0x1f/0x30
      Modules linked in: nfsv3 rpcsec_gss_krb5 nfsv4 nfs fscache 8021q garp mrp stp llc ipmi_devintf ipmi_msghandler rpcrdma rdma_ucm ib_iser rdma_cm ib_umad iw_cm ib_ipoib libiscsi scsi_transport_iscsi ib_cm mlx5_ib ib_uverbs ib_core mlx5_core sb_edac crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 mlxfw crypto_simd cryptd glue_helper input_leds hyperv_fb intel_rapl_perf joydev serio_raw pci_hyperv pci_hyperv_mini mac_hid hv_balloon nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel ip_tables x_tables autofs4 hv_utils hid_generic hv_storvsc ptp hid_hyperv hid hv_netvsc hyperv_keyboard pps_core scsi_transport_fc psmouse hv_vmbus i2c_piix4 floppy pata_acpi
      CR2: ffffb5b141c18014
      ---[ end trace b12c5503157cad24 ]---
      RIP: 0010:ioread32be+0x30/0x40
      Code: 00 77 27 48 81 ff 00 00 01 00 76 07 0f b7 d7 ed 0f c8 c3 55 48 c7 c6 3b ee d5 9f 48 89 e5 e8 67 fc ff ff b8 ff ff ff ff 5d c3 <8b> 07 0f c8 c3 66 66 2e 0f 1f 84 00 00 00 00 00 48 81 fe ff ff 03
      RSP: 0018:ffffb5b14c56fd78 EFLAGS: 00010292
      RAX: ffffb5b141c18000 RBX: ffff8e9f78a801c0 RCX: 0000000000000000
      RDX: 0000000000000001 RSI: ffff8e9f7ecd7628 RDI: ffffb5b141c18014
      RBP: ffffb5b14c56fd90 R08: 0000000000000001 R09: 0000000000000000
      R10: ffff8e9f372a2c30 R11: ffff8e9f87f4bc40 R12: ffff8e9f372a1fc0
      R13: ffff8e9f78a80000 R14: ffffffffc07136a0 R15: ffff8e9f78ae6f20
      FS:  0000000000000000(0000) GS:ffff8e9f7ecc0000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffffb5b141c18014 CR3: 00000001c8f82006 CR4: 00000000003606e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:38
      in_atomic(): 0, irqs_disabled(): 1, pid: 6755, name: kworker/u128:2
      INFO: lockdep is turned off.
      CPU: 3 PID: 6755 Comm: kworker/u128:2 Tainted: G      D           5.2.0-net-next-mlx5-hv_stats-over-last-worked-hyperv #1
      Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  04/28/2016
      Workqueue: mlx5_healtha050:00:02.0 mlx5_fw_fatal_reporter_err_work [mlx5_core]
      Call Trace:
       dump_stack+0x63/0x88
       ___might_sleep+0x10a/0x130
       __might_sleep+0x4a/0x80
       exit_signals+0x33/0x230
       ? blocking_notifier_call_chain+0x16/0x20
       do_exit+0xb1/0xc30
       ? kthread+0x10d/0x140
       ? process_one_work+0x4e0/0x4e0
      
      Fixes: 52c368dc ("net/mlx5: Move health and page alloc init to mdev_init")
      Signed-off-by: NShay Drory <shayd@mellanox.com>
      Reviewed-by: NMoshe Shemesh <moshe@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      42ea9f1b
    • P
      iavf: increase reset complete wait time · 8e3e4b9d
      Paul Greenwalt 提交于
      With an increased number of VFs, it's possible to encounter the following
      issue during reset.
      
          iavf b8d4:00:02.0: Hardware reset detected
          iavf b8d4:00:02.0: Reset never finished (0)
          iavf b8d4:00:02.0: Reset task did not complete, VF disabled
      
      Increase the reset complete wait count to allow for 128 VFs to complete
      reset.
      Signed-off-by: NPaul Greenwalt <paul.greenwalt@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      8e3e4b9d