1. 17 9月, 2020 1 次提交
  2. 16 9月, 2020 1 次提交
    • G
      chelsio/chtls: Re-add dependencies on CHELSIO_T4 to fix modular CHELSIO_T4 · e859536d
      Geert Uytterhoeven 提交于
      As CHELSIO_INLINE_CRYPTO is bool, and CHELSIO_T4 is tristate, the
      dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is not sufficient to
      protect CRYPTO_DEV_CHELSIO_TLS and CHELSIO_IPSEC_INLINE.  The latter two
      are also tristate, hence if CHELSIO_T4=n, they cannot be builtin, as
      that would lead to link failures like:
      
          drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c:259: undefined reference to `cxgb4_port_viid'
      
      and
      
          drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/chcr_ipsec.c:752: undefined reference to `cxgb4_reclaim_completed_tx'
      
      Fix this by re-adding dependencies on CHELSIO_T4 to tristate symbols.
      The dependency of CHELSIO_INLINE_CRYPTO on CHELSIO_T4 is kept to avoid
      asking the user.
      
      Fixes: 6bd860ac ("chelsio/chtls: CHELSIO_INLINE_CRYPTO should depend on CHELSIO_T4")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e859536d
  3. 15 9月, 2020 1 次提交
  4. 12 9月, 2020 1 次提交
  5. 11 9月, 2020 1 次提交
  6. 10 9月, 2020 1 次提交
  7. 04 9月, 2020 1 次提交
  8. 01 9月, 2020 1 次提交
    • P
      cxgb4: fix thermal zone device registration · 6b6382a8
      Potnuri Bharat Teja 提交于
      When multiple adapters are present in the system, pci hot-removing second
      adapter leads to the following warning as both the adapters registered
      thermal zone device with same thermal zone name/type.
      Therefore, use unique thermal zone name during thermal zone device
      initialization. Also mark thermal zone dev NULL once unregistered.
      
      [  414.370143] ------------[ cut here ]------------
      [  414.370944] sysfs group 'power' not found for kobject 'hwmon0'
      [  414.371747] WARNING: CPU: 9 PID: 2661 at fs/sysfs/group.c:281
       sysfs_remove_group+0x76/0x80
      [  414.382550] CPU: 9 PID: 2661 Comm: bash Not tainted 5.8.0-rc6+ #33
      [  414.383593] Hardware name: Supermicro X10SRA-F/X10SRA-F, BIOS 2.0a 06/23/2016
      [  414.384669] RIP: 0010:sysfs_remove_group+0x76/0x80
      [  414.385738] Code: 48 89 df 5b 5d 41 5c e9 d8 b5 ff ff 48 89 df e8 60 b0 ff ff
       eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 90 ae 13 bb e8 6a 27 d0 ff <0f> 0b 5b 5d
       41 5c c3 0f 1f 00 0f 1f 44 00 00 48 85 f6 74 31 41 54
      [  414.388404] RSP: 0018:ffffa22bc080fcb0 EFLAGS: 00010286
      [  414.389638] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      [  414.390829] RDX: 0000000000000001 RSI: ffff8ee2de3e9510 RDI: ffff8ee2de3e9510
      [  414.392064] RBP: ffffffffbaef2ee0 R08: 0000000000000000 R09: 0000000000000000
      [  414.393224] R10: 0000000000000000 R11: 000000002b30006c R12: ffff8ee260720008
      [  414.394388] R13: ffff8ee25e0a40e8 R14: ffffa22bc080ff08 R15: ffff8ee2c3be5020
      [  414.395661] FS:  00007fd2a7171740(0000) GS:ffff8ee2de200000(0000)
       knlGS:0000000000000000
      [  414.396825] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  414.398011] CR2: 00007f178ffe5020 CR3: 000000084c5cc003 CR4: 00000000003606e0
      [  414.399172] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  414.400352] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  414.401473] Call Trace:
      [  414.402685]  device_del+0x89/0x400
      [  414.403819]  device_unregister+0x16/0x60
      [  414.405024]  hwmon_device_unregister+0x44/0xa0
      [  414.406112]  thermal_remove_hwmon_sysfs+0x196/0x200
      [  414.407256]  thermal_zone_device_unregister+0x1b5/0x1f0
      [  414.408415]  cxgb4_thermal_remove+0x3c/0x4f [cxgb4]
      [  414.409668]  remove_one+0x212/0x290 [cxgb4]
      [  414.410875]  pci_device_remove+0x36/0xb0
      [  414.412004]  device_release_driver_internal+0xe2/0x1c0
      [  414.413276]  pci_stop_bus_device+0x64/0x90
      [  414.414433]  pci_stop_and_remove_bus_device_locked+0x16/0x30
      [  414.415609]  remove_store+0x75/0x90
      [  414.416790]  kernfs_fop_write+0x114/0x1b0
      [  414.417930]  vfs_write+0xcf/0x210
      [  414.419059]  ksys_write+0xa7/0xe0
      [  414.420120]  do_syscall_64+0x4c/0xa0
      [  414.421278]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      [  414.422335] RIP: 0033:0x7fd2a686afd0
      [  414.423396] Code: Bad RIP value.
      [  414.424549] RSP: 002b:00007fffc1446148 EFLAGS: 00000246 ORIG_RAX:
       0000000000000001
      [  414.425638] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fd2a686afd0
      [  414.426830] RDX: 0000000000000002 RSI: 00007fd2a7196000 RDI: 0000000000000001
      [  414.427927] RBP: 00007fd2a7196000 R08: 000000000000000a R09: 00007fd2a7171740
      [  414.428923] R10: 00007fd2a7171740 R11: 0000000000000246 R12: 00007fd2a6b43400
      [  414.430082] R13: 0000000000000002 R14: 0000000000000001 R15: 0000000000000000
      [  414.431027] irq event stamp: 76300
      [  414.435678] ---[ end trace 13865acb4d5ab00f ]---
      
      Fixes: b1871915 ("cxgb4: Add thermal zone support")
      Signed-off-by: NPotnuri Bharat Teja <bharat@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b6382a8
  9. 27 8月, 2020 1 次提交
  10. 25 8月, 2020 2 次提交
    • R
      cxgb4: add error handlers to LE intr_handler · cca85283
      Raju Rangoju 提交于
      cxgb4 does not look for HASHTBLMEMCRCERR and CMDTIDERR
      bits in LE_DB_INT_CAUSE register, but these are enabled
      in LE_DB_INT_ENABLE. So, add error handlers to LE
      interrupt handler to emit a warning or alert message
      for hash table mem crc and cmd tid errors
      Signed-off-by: NRaju Rangoju <rajur@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cca85283
    • C
      chelsio: switch from 'pci_' to 'dma_' API · 9ab90179
      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 'free_rx_resources()' and
      'alloc_tx_resources()' (sge.c) GFP_KERNEL can be used because it is
      already used in these functions.
      
      Moreover, they can only be called from a .ndo_open	function. So it is
      guarded by the 'rtnl_lock()', which is a mutex.
      
      While at it, a pr_err message in 'init_one()' has been updated accordingly
      (s/consistent/coherent).
      
      @@
      @@
      -    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>
      9ab90179
  11. 24 8月, 2020 1 次提交
  12. 22 8月, 2020 2 次提交
  13. 21 8月, 2020 1 次提交
  14. 19 8月, 2020 2 次提交
  15. 04 8月, 2020 3 次提交
  16. 24 7月, 2020 2 次提交
  17. 23 7月, 2020 1 次提交
  18. 15 7月, 2020 1 次提交
  19. 09 7月, 2020 1 次提交
  20. 01 7月, 2020 5 次提交
  21. 30 6月, 2020 1 次提交
  22. 29 6月, 2020 1 次提交
  23. 27 6月, 2020 1 次提交
  24. 24 6月, 2020 7 次提交
    • R
      cxgb4: move device dump arrays in header to C file · f35d2117
      Rahul Lakkireddy 提交于
      Move all arrays related to device dump in header file to C file.
      Also, move the function that shares the arrays to the same C file.
      
      Fixes following warnings reported by make W=1 in several places:
      cudbg_entity.h:513:18: warning: 't6_hma_ireg_array' defined but not
      used [-Wunused-const-variable=]
        513 | static const u32 t6_hma_ireg_array[][IREG_NUM_ELEM] = {
      
      Fixes: a7975a2f ("cxgb4: collect register dump")
      Fixes: 17b332f4 ("cxgb4: add support to read serial flash")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f35d2117
    • R
      cxgb4: always sync access when flashing PHY firmware · 5fff701c
      Rahul Lakkireddy 提交于
      Access to on-chip memory for flashing PHY firmware must always
      be synchronized. So, ensure the callers take on-chip memory lock.
      
      Also fixes following sparse warning:
      sge.c:1641:26: warning: context imbalance in 't4_load_phy_fw' -
      different lock contexts for basic block
      
      Fixes: 01b69614 ("cxgb4: Add PHY firmware support for T420-BT cards")
      Fixes: 4ee339e1 ("cxgb4: add support to flash PHY image")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5fff701c
    • R
      cxgb4vf: update kernel-doc line comments · 20bb0c8f
      Rahul Lakkireddy 提交于
      Update several kernel-doc line comments to fix warnings reported by
      make W=1.
      
      Fixes following class of warnings reported by make W=1 in several
      places:
      cxgb4vf_main.c:275: warning: Function parameter or member 'persistent'
      not described in 'cxgb4vf_change_mac'
      cxgb4vf_main.c:275: warning: Excess function parameter 'persist'
      description in 'cxgb4vf_change_mac'
      
      Fixes: 16f8bd4b ("cxgb4vf: Add core T4 PCI-E SR-IOV Virtual Function hardware definitions and device communication code")
      Fixes: c6e0d914 ("cxgb4vf: Add T4 Virtual Function Scatter-Gather Engine DMA code")
      Fixes: e0a8b34a ("cxgb4vf: Add and initialize some sge params for VF driver")
      Fixes: c3168cab ("cxgb4/cxgbvf: Handle 32-bit fw port capabilities")
      Fixes: 0e23daeb ("drivers/net: chelsio/cxgb*: Convert timers to use timer_setup()")
      Fixes: 3f8cfd0d ("cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20bb0c8f
    • R
      cxgb4: update kernel-doc line comments · 29bbf5d7
      Rahul Lakkireddy 提交于
      Update several kernel-doc line comments to fix warnings reported by
      make W=1.
      
      Fixes following class of warnings reported by make W=1 in several
      places:
      l2t.c:616: warning: Cannot understand  * @dev: net_device pointer
      t4_hw.c:3175: warning: Function parameter or member 'adap' not
      described in 't4_get_exprom_version'
      t4_hw.c:3175: warning: Excess function parameter 'adapter' description
      in 't4_get_exprom_version'
      
      Fixes: 56d36be4 ("cxgb4: Add HW and FW support code")
      Fixes: fd3a4790 ("cxgb4: Add packet queues and packet DMA code")
      Fixes: 26f7cbc0 ("cxgb4: Don't attempt to upgrade T4 firmware when cxgb4 will end up as a slave")
      Fixes: 793dad94 ("RDMA/cxgb4: Fix bug for active and passive LE hash collision path")
      Fixes: ba3f8cd5 ("cxgb4: Add support in cxgb4 to get expansion rom version via ethtool")
      Fixes: f7502659 ("cxgb4: Add API to alloc l2t entry; also update existing ones")
      Fixes: ddc7740d ("cxgb4: Decode link down reason code obtained from firmware")
      Fixes: 193c4c28 ("cxgb4: Update T6 Buffer Group and Channel Mappings")
      Fixes: 8f46d467 ("cxgb4: Use Firmware params to get buffer-group map")
      Fixes: a4569504 ("cxgb4: time stamping interface for PTP")
      Fixes: 9c33e420 ("cxgb4: Add PTP Hardware Clock (PHC) support")
      Fixes: c3168cab ("cxgb4/cxgbvf: Handle 32-bit fw port capabilities")
      Fixes: 5ccf9d04 ("cxgb4: update API for TP indirect register access")
      Fixes: 3bdb376e ("cxgb4: introduce SMT ops to prepare for SMAC rewrite support")
      Fixes: 736c3b94 ("cxgb4: collect egress and ingress SGE queue contexts")
      Fixes: f56ec676 ("cxgb4: Add support for ethtool i2c dump")
      Fixes: 9d5fd927 ("cxgb4/cxgb4vf: add support for ndo_set_vf_vlan")
      Fixes: 98f3697f ("cxgb4: add tc flower match support for tunnel VNI")
      Fixes: 02d805dc ("cxgb4: use new fw interface to get the VIN and smt index")
      Fixes: 3f8cfd0d ("cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()")
      Fixes: d429005f ("cxgb4/cxgb4vf: Add support for SGE doorbell queue timer")
      Fixes: 0e395b3c ("cxgb4: add FLOWC based QoS offload")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29bbf5d7
    • R
      cxgb4: fix set but unused variable when DCB is disabled · 00e31cfc
      Rahul Lakkireddy 提交于
      Remove the set but unused variable when DCB is disabled. Instead,
      do the calculation directly inline.
      
      Fixes following warning in make W=1:
      cxgb4_main.c: In function 'cfg_queues':
      cxgb4_main.c:5380:29: warning: variable 'n1g' set but not used
      [-Wunused-but-set-variable]
        u32 i, n10g = 0, qidx = 0, n1g = 0;
                                   ^
      
      Fixes: 116ca924 ("cxgb4: fix checks for max queues to allocate")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00e31cfc
    • R
      cxgb4: move DCB version extern to header file · bab3bcf3
      Rahul Lakkireddy 提交于
      Move the DCB version string array extern to header file.
      
      Fixes following sparse warning:
      cxgb4_dcb.c:13:12: warning: symbol 'dcb_ver_array' was not declared.
      Should it be static?
      
      Fixes: ebddd97a ("cxgb4: add support to display DCB info")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bab3bcf3
    • R
      cxgb4: remove cast when saving IPv4 partial checksum · 2f667016
      Rahul Lakkireddy 提交于
      The checksum field in IPv4 header is in __sum16 and ip_fast_csum()
      also returns __sum16. So, no need to cast it to u16.
      
      Fixes following sparse warning:
      sge.c:1539:47: warning: cast from restricted __sum16
      sge.c:1539:44: warning: incorrect type in assignment (different base types)
      sge.c:1539:44:    expected restricted __sum16 [usertype] check
      sge.c:1539:44:    got unsigned short [usertype]
      
      Fixes: d0a1299c ("cxgb4: add support for vxlan segmentation offload")
      Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f667016