1. 20 7月, 2020 26 次提交
  2. 18 7月, 2020 14 次提交
    • A
      ne2k-pci: Use netif_msg_init to initialize msg_enable bits · a050d82f
      Armin Wolf 提交于
      Use netif_msg_enable() to process param settings.
      Signed-off-by: NArmin Wolf <W_Armin@gmx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a050d82f
    • D
      Merge branch 'net-atlantic-add-support-for-FW-4-x' · 1143fede
      David S. Miller 提交于
      Mark Starovoytov says:
      
      ====================
      net: atlantic: add support for FW 4.x
      
      This patch set adds support for FW 4.x, which is about to get into the
      production for some products.
      4.x is mostly compatible with 3.x, save for soft reset, which requires
      the acquisition of 2 additional semaphores.
      Other differences (e.g. absence of PTP support) are handled via
      capabilities.
      
      Note: 4.x targets specific products only. 3.x is still the main firmware
      branch, which should be used by most users (at least for now).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1143fede
    • D
      net: atlantic: add support for FW 4.x · 0044b1e1
      Dmitry Bogdanov 提交于
      This patch adds support for FW 4.x, which is about to get into the
      production for some products.
      4.x is mostly compatible with 3.x, save for soft reset, which requires
      the acquisition of 2 additional semaphores.
      Other differences (e.g. absence of PTP support) are handled via
      capabilities.
      
      Note: 4.x targets specific products only. 3.x is still the main firmware
      branch, which should be used by most users (at least for now).
      Signed-off-by: NDmitry Bogdanov <dbogdanov@marvell.com>
      Signed-off-by: NMark Starovoytov <mstarovoitov@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0044b1e1
    • M
      net: atlantic: align return value of ver_match function with function name · b567edbf
      Mark Starovoytov 提交于
      This patch aligns the return value of hw_atl_utils_ver_match function with
      its name.
      Change the return type to bool, because it's better aligned with the actual
      usage. Return true when the version matches, false otherwise.
      Signed-off-by: NMark Starovoytov <mstarovoitov@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b567edbf
    • M
      net: ethernet: et131x: Remove redundant register read · 11f3c1f5
      Mark Einon 提交于
      Following the removal of an unused variable assignment (remove
      unused variable 'pm_csr') the associated register read can also go,
      as the read also occurs in the subsequent et1310_in_phy_coma()
      call.
      Signed-off-by: NMark Einon <mark.einon@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11f3c1f5
    • Z
      net: ethernet: et131x: Remove unused variable 'pm_csr' · eacc43d2
      Zhang Changzhong 提交于
      Gcc report warning as follows:
      
      drivers/net/ethernet/agere/et131x.c:953:6: warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
        953 |  u32 pm_csr;
            |      ^~~~~~
      drivers/net/ethernet/agere/et131x.c:1002:6:warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
       1002 |  u32 pm_csr;
            |      ^~~~~~
      drivers/net/ethernet/agere/et131x.c:3446:8: warning:
       variable 'pm_csr' set but not used [-Wunused-but-set-variable]
       3446 |    u32 pm_csr;
            |        ^~~~~~
      
      After commit 38df6492 ("et131x: Add PCIe gigabit ethernet driver
      et131x to drivers/net"), 'pm_csr' is never used in these functions,
      so removing it to avoid build warning.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Acked-by: NMark Einon <mark.einon@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eacc43d2
    • Z
      net: bna: Remove unused variable 't' · 5686b109
      Zhang Changzhong 提交于
      Gcc report warning as follows:
      
      drivers/net/ethernet/brocade/bna/bfa_ioc.c:1538:6: warning:
       variable 't' set but not used [-Wunused-but-set-variable]
       1538 |  u32 t;
            |      ^
      
      After commit c107ba17 ("bna: Firmware Patch Simplification"),
      't' is never used, so removing it to avoid build warning.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NZhang Changzhong <zhangchangzhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5686b109
    • J
      net: bnxt: don't complain if TC flower can't be supported · 18c7015c
      Jakub Kicinski 提交于
      The fact that NETIF_F_HW_TC is not set should be a sufficient
      indication to the user that TC offloads are not supported.
      No need to bother users of older firmware versions with
      pointless warnings on every boot.
      
      Also, since the support is optional, bnxt_init_tc() should not
      return an error in case FW is old, similarly to how error
      is not returned when CONFIG_BNXT_FLOWER_OFFLOAD is not set.
      
      With that we can add an error message to the caller, to warn
      about actual unexpected failures.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Reviewed-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      18c7015c
    • D
      Merge tag 'mlx5-updates-2020-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · d44a919a
      David S. Miller 提交于
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2020-07-16
      
      Fixes:
      1) Fix build break when CONFIG_XPS is not set
      2) Fix missing switch_id for representors
      
      Updates:
      1) IPsec XFRM RX offloads from Raed and Huy.
        - Added IPSec RX steering flow tables to NIC RX
        - Refactoring of the existing FPGA IPSec, to add support
          for ConnectX IPsec.
        - RX data path handling for IPSec traffic
        - Synchronize offloading device ESN with xfrm received SN
      
      2) Parav allows E-Switch to siwtch to switchdev mode directly without
         the need to go through legacy mode first.
      
      3) From Tariq, Misc updates including:
         3.1) indirect calls for RX and XDP handlers
         3.2) Make MLX5_EN_TLS non-prompt as it should always be enabled when
              TLS and MLX5_EN are selected.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d44a919a
    • C
      net: alteon: Avoid some useless memset · 721dab2b
      Christophe JAILLET 提交于
      Avoid a memset after a call to 'dma_alloc_coherent()'.
      This is useless since
      commit 518a2f19 ("dma-mapping: zero memory returned from dma_alloc_*")
      
      Replace a kmalloc+memset with a corresponding kzalloc.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      721dab2b
    • C
      net: alteon: switch from 'pci_' to 'dma_' API · f4079e5d
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'ace_allocate_descriptors()' and
      'ace_init()' GFP_KERNEL can be used because both functions are called from
      the probe function and no lock is acquired.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4079e5d
    • C
      net: sungem: switch from 'pci_' to 'dma_' API · 8d4f62ca
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'gem_init_one()', GFP_KERNEL can be used
      because it is a probe function and no lock is acquired.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d4f62ca
    • S
      net: decnet: af_decnet: Simplify goto loop. · e0c3f4c4
      Suraj Upadhyay 提交于
      Replace goto loop with while loop.
      Signed-off-by: NSuraj Upadhyay <usuraj35@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0c3f4c4
    • D
      Merge branch 'tcp-dsack-multi-seg' · c4fefd5a
      David S. Miller 提交于
      Priyaranjan Jha says:
      
      ====================
      tcp: improve handling of DSACK covering multiple segments
      
      Currently, while processing DSACK, we assume DSACK covers only one
      segment. This leads to significant underestimation of no. of duplicate
      segments with LRO/GRO. Also, the existing SNMP counters, TCPDSACKRecv
      and TCPDSACKOfoRecv, make similar assumption for DSACK, which makes them
      unusable for estimating spurious retransmit rates.
      
      This patch series fixes the segment accounting with DSACK, by estimating
      number of duplicate segments based on: (DSACKed sequence range) / MSS.
      It also introduces a new SNMP counter, TCPDSACKRecvSegs, which tracks
      the estimated number of duplicate segments.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4fefd5a