1. 21 6月, 2019 1 次提交
  2. 09 4月, 2019 2 次提交
  3. 04 4月, 2019 3 次提交
  4. 26 3月, 2019 1 次提交
    • A
      scsi: lpfc: avoid uninitialized variable warning · faf5a744
      Arnd Bergmann 提交于
      clang -Wuninitialized incorrectly sees a variable being used without
      initialization:
      
      drivers/scsi/lpfc/lpfc_nvme.c:2102:37: error: variable 'localport' is uninitialized when used here
            [-Werror,-Wuninitialized]
                      lport = (struct lpfc_nvme_lport *)localport->private;
                                                        ^~~~~~~~~
      drivers/scsi/lpfc/lpfc_nvme.c:2059:38: note: initialize the variable 'localport' to silence this warning
              struct nvme_fc_local_port *localport;
                                                  ^
                                                   = NULL
      1 error generated.
      
      This is clearly in dead code, as the condition leading up to it is always
      false when CONFIG_NVME_FC is disabled, and the variable is always
      initialized when nvme_fc_register_localport() got called successfully.
      
      Change the preprocessor conditional to the equivalent C construct, which
      makes the code more readable and gets rid of the warning.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      faf5a744
  5. 20 3月, 2019 1 次提交
  6. 07 3月, 2019 1 次提交
    • A
      scsi: lpfc: fix unused variable warning · 352b205a
      Arnd Bergmann 提交于
      The newly introduced 'cpu' variable is only used inside of an optional
      block, so we get a warning without CONFIG_SCSI_LPFC_DEBUG_FS:
      
      drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_io_cmd_wqe_cmpl':
      drivers/scsi/lpfc/lpfc_nvme.c:968:30: error: unused variable 'cpu' [-Werror=unused-variable]
        uint32_t code, status, idx, cpu;
      
      Move the declaration into the same block to avoid the warning.
      
      Fixes: 63df6d63 ("scsi: lpfc: Adapt cpucheck debugfs logic to Hardware Queues")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      352b205a
  7. 06 2月, 2019 13 次提交
  8. 23 1月, 2019 1 次提交
  9. 08 12月, 2018 1 次提交
  10. 21 9月, 2018 1 次提交
  11. 17 9月, 2018 1 次提交
  12. 12 9月, 2018 2 次提交
  13. 03 8月, 2018 2 次提交
    • J
      scsi: lpfc: Limit tracking of tgt queue depth in fast path · 2a5b7d62
      James Smart 提交于
      Performance is affected when target queue depth is tracked.  An atomic
      counter is incremented on the submission path which competes with it being
      decremented on the completion path.  In addition, multiple CPUs can
      simultaniously be manipulating this counter for the same ndlp.
      
      Reduce the overhead by only performing the target increment/decrement when
      the target queue depth is less than the overall adapter depth, thus is
      actually meaningful.
      Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      2a5b7d62
    • J
      scsi: lpfc: Fix driver crash when re-registering NVME rports. · 93a3922d
      James Smart 提交于
      During remote port loss fault testing, the driver crashed with the
      following trace:
      
      general protection fault: 0000 [#1] SMP
      RIP: ... lpfc_nvme_register_port+0x250/0x480 [lpfc]
      Call Trace:
       lpfc_nlp_state_cleanup+0x1b3/0x7a0 [lpfc]
       lpfc_nlp_set_state+0xa6/0x1d0 [lpfc]
       lpfc_cmpl_prli_prli_issue+0x213/0x440
       lpfc_disc_state_machine+0x7e/0x1e0 [lpfc]
       lpfc_cmpl_els_prli+0x18a/0x200 [lpfc]
       lpfc_sli_sp_handle_rspiocb+0x3b5/0x6f0 [lpfc]
       lpfc_sli_handle_slow_ring_event_s4+0x161/0x240 [lpfc]
       lpfc_work_done+0x948/0x14c0 [lpfc]
       lpfc_do_work+0x16f/0x180 [lpfc]
       kthread+0xc9/0xe0
       ret_from_fork+0x55/0x80
      
      After registering a new remoteport, the driver is pulling an ndlp pointer
      from the lpfc rport associated with the private area of a newly registered
      remoteport. The private area is uninitialized, so it's garbage.
      
      Correct by pulling the the lpfc rport pointer from the entering ndlp point,
      then ndlp value from at rport. Note the entering ndlp may be replacing by
      the rport->ndlp due to an address change swap.
      Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      93a3922d
  14. 11 7月, 2018 2 次提交
  15. 29 5月, 2018 2 次提交
  16. 08 5月, 2018 3 次提交
  17. 19 4月, 2018 3 次提交