1. 25 7月, 2020 1 次提交
  2. 16 7月, 2020 1 次提交
  3. 08 7月, 2020 2 次提交
  4. 03 7月, 2020 3 次提交
  5. 10 5月, 2020 3 次提交
  6. 08 5月, 2020 1 次提交
  7. 30 3月, 2020 1 次提交
  8. 27 3月, 2020 2 次提交
    • J
      scsi: lpfc: Fix scsi host template for SLI3 vports · c90b4480
      James Smart 提交于
      SCSI layer sends driver IOs with more s/g segments than driver can handle.
      This results in "Too many sg segments from dma_map_sg. Config 64, seg_cnt
      219" error messages from the lpfc_scsi_prep_dma_buf_s3() routine.
      
      The was due to use the driver using individual templates for pport and
      vport, host reset enabled or not, nvme vs scsi, etc. In the end, there was
      a combination for a vport that didn't match the pport.
      
      Rather than enumerating more templates and more discretionary assignments,
      revert to a base template that is copied to a template specific to the
      pport/vport. Then, based on role, attributes and sli type, modify the
      fields that are different for that port.  Added a log message to
      lpfc_create_port to validate values.
      
      Link: https://lore.kernel.org/r/20200322181304.37655-5-jsmart2021@gmail.comSigned-off-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      c90b4480
    • J
      scsi: lpfc: Fix lockdep error - register non-static key · f861f596
      James Smart 提交于
      The following lockdep error was reported when unloading the lpfc driver:
      
        INFO: trying to register non-static key.
        the code is fine but needs lockdep annotation.
        turning off the locking correctness validator.
        ...
        Call Trace:
        dump_stack+0x96/0xe0
        register_lock_class+0x8b8/0x8c0
        ? lockdep_hardirqs_on+0x190/0x280
        ? is_dynamic_key+0x150/0x150
        ? wait_for_completion_interruptible+0x2a0/0x2a0
        ? wake_up_q+0xd0/0xd0
        __lock_acquire+0xda/0x21a0
        ? register_lock_class+0x8c0/0x8c0
        ? synchronize_rcu_expedited+0x500/0x500
        ? __call_rcu+0x850/0x850
        lock_acquire+0xf3/0x1f0
        ? del_timer_sync+0x5/0xb0
        del_timer_sync+0x3c/0xb0
        ? del_timer_sync+0x5/0xb0
        lpfc_pci_remove_one.cold.102+0x8b7/0x935 [lpfc]
        ...
      
      Unloading the driver resulted in a call to del_timer_sync for the
      cpuhp_poll_timer. However the call to setup the timer had never been made,
      so the timer structures used by lockdep checking were not initialized.
      
      Unconditionally call setup_timer for the cpuhp_poll_timer during driver
      initialization. Calls to start the timer remain "as needed".
      
      Link: https://lore.kernel.org/r/20200322181304.37655-3-jsmart2021@gmail.comSigned-off-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      f861f596
  9. 11 2月, 2020 4 次提交
  10. 22 12月, 2019 3 次提交
  11. 20 12月, 2019 1 次提交
  12. 22 11月, 2019 1 次提交
  13. 13 11月, 2019 1 次提交
  14. 09 11月, 2019 2 次提交
    • B
      scsi: lpfc: Fix lpfc_cpumask_of_node_init() · 61951a6d
      Bart Van Assche 提交于
      Fix the following kernel warning:
      
      cpumask_of_node(-1): (unsigned)node >= nr_node_ids(1)
      
      Fixes: dcaa2136 ("scsi: lpfc: Change default IRQ model on AMD architectures")
      Link: https://lore.kernel.org/r/20191108225947.1395-1-jsmart2021@gmail.comSigned-off-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      61951a6d
    • B
      scsi: lpfc: Fix a kernel warning triggered by lpfc_sli4_enable_intr() · eea2d396
      Bart Van Assche 提交于
      Fix the following lockdep warning:
      
      ============================================
      WARNING: possible recursive locking detected
      5.4.0-rc6-dbg+ #2 Not tainted
      --------------------------------------------
      systemd-udevd/130 is trying to acquire lock:
      ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: irq_calc_affinity_vectors+0x63/0x90
      
      but task is already holding lock:
      
      ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: lpfc_sli4_enable_intr+0x422/0xd50 [lpfc]
      
      other info that might help us debug this:
      
       Possible unsafe locking scenario:
             CPU0
             ----
        lock(cpu_hotplug_lock.rw_sem);
        lock(cpu_hotplug_lock.rw_sem);
      
      *** DEADLOCK ***
       May be due to missing lock nesting notation
      2 locks held by systemd-udevd/130:
       #0: ffff8880d53fe210 (&dev->mutex){....}, at: __device_driver_lock+0x4a/0x70
       #1: ffffffff826b05d0 (cpu_hotplug_lock.rw_sem){++++}, at: lpfc_sli4_enable_intr+0x422/0xd50 [lpfc]
      
      stack backtrace:
      CPU: 1 PID: 130 Comm: systemd-udevd Not tainted 5.4.0-rc6-dbg+ #2
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      Call Trace:
       dump_stack+0xa5/0xe6
       __lock_acquire.cold+0xf7/0x23a
       lock_acquire+0x106/0x240
       cpus_read_lock+0x41/0xe0
       irq_calc_affinity_vectors+0x63/0x90
       __pci_enable_msix_range+0x10a/0x950
       pci_alloc_irq_vectors_affinity+0x144/0x210
       lpfc_sli4_enable_intr+0x4b2/0xd50 [lpfc]
       lpfc_pci_probe_one+0x1411/0x22b0 [lpfc]
       local_pci_probe+0x7c/0xc0
       pci_device_probe+0x25d/0x390
       really_probe+0x170/0x510
       driver_probe_device+0x127/0x190
       device_driver_attach+0x98/0xa0
       __driver_attach+0xb6/0x1a0
       bus_for_each_dev+0x100/0x150
       driver_attach+0x31/0x40
       bus_add_driver+0x246/0x300
       driver_register+0xe0/0x170
       __pci_register_driver+0xde/0xf0
       lpfc_init+0x134/0x1000 [lpfc]
       do_one_initcall+0xda/0x47e
       do_init_module+0x10a/0x3b0
       load_module+0x4318/0x47c0
       __do_sys_finit_module+0x134/0x1d0
       __x64_sys_finit_module+0x47/0x50
       do_syscall_64+0x6f/0x2e0
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: dcaa2136 ("scsi: lpfc: Change default IRQ model on AMD architectures")
      Link: https://lore.kernel.org/r/20191107052158.25788-4-bvanassche@acm.orgSigned-off-by: NBart Van Assche <bvanassche@acm.org>
      Reviewed-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      eea2d396
  15. 06 11月, 2019 2 次提交
    • J
      scsi: lpfc: Change default IRQ model on AMD architectures · dcaa2136
      James Smart 提交于
      The current driver attempts to allocate an interrupt vector per cpu using
      the systems managed IRQ allocator (flag PCI_IRQ_AFFINITY). The system IRQ
      allocator will either provide the per-cpu vector, or return fewer
      vectors. When fewer vectors, they are evenly spread between the numa nodes
      on the system.  When run on an AMD architecture, if interrupts occur to a
      cpu that is not in the same numa node as the adapter generating the
      interrupt, there are extreme costs and overheads in performance.  Thus, if
      1:1 vector allocation is used, or the "balanced" vectors in the other numa
      nodes, performance can be hit significantly.
      
      A much more performant model is to allocate interrupts only on the cpus
      that are in the numa node where the adapter resides.  I/O completion is
      still performed by the cpu where the I/O was generated. Unfortunately,
      there is no flag to request the managed IRQ subsystem allocate vectors only
      for the CPUs in the numa node as the adapter.
      
      On AMD architecture, revert the irq allocation to the normal style
      (non-managed) and then use irq_set_affinity_hint() to set the cpu
      affinity and disable user-space rebalancing.
      
      Tie the support into CPU offline/online. If the cpu being offlined owns a
      vector, the vector is re-affinitized to one of the other CPUs on the same
      numa node. If there are no more CPUs on the numa node, the vector has all
      affinity removed and lets the system determine where it's serviced.
      Similarly, when the cpu that owned a vector comes online, the vector is
      reaffinitized to the cpu.
      
      Link: https://lore.kernel.org/r/20191105005708.7399-10-jsmart2021@gmail.comSigned-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      dcaa2136
    • J
      scsi: lpfc: Add registration for CPU Offline/Online events · 93a4d6f4
      James Smart 提交于
      The recent affinitization didn't address cpu offlining/onlining.  If an
      interrupt vector is shared and the low order cpu owning the vector is
      offlined, as interrupts are managed, the vector is taken offline. This
      causes the other CPUs sharing the vector will hang as they can't get io
      completions.
      
      Correct by registering callbacks with the system for Offline/Online
      events. When a cpu is taken offline, its eq, which is tied to an interrupt
      vector is found. If the cpu is the "owner" of the vector and if the
      eq/vector is shared by other CPUs, the eq is placed into a polled mode.
      Additionally, code paths that perform io submission on the "sharing CPUs"
      will check the eq state and poll for completion after submission of new io
      to a wq that uses the eq.
      
      Similarly, when a cpu comes back online and owns an offlined vector, the eq
      is taken out of polled mode and rearmed to start driving interrupts for eq.
      
      Link: https://lore.kernel.org/r/20191105005708.7399-9-jsmart2021@gmail.comSigned-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NJames Smart <jsmart2021@gmail.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      93a4d6f4
  16. 29 10月, 2019 2 次提交
  17. 25 10月, 2019 6 次提交
  18. 18 10月, 2019 1 次提交
  19. 01 10月, 2019 3 次提交