1. 16 3月, 2022 3 次提交
  2. 25 8月, 2021 2 次提交
  3. 27 7月, 2021 1 次提交
  4. 19 7月, 2021 1 次提交
  5. 10 6月, 2021 1 次提交
  6. 22 5月, 2021 1 次提交
  7. 13 4月, 2021 3 次提交
  8. 16 3月, 2021 1 次提交
    • L
      scsi: lpfc: Fix formatting and misspelling issues · 964bc8c4
      Lee Jones 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'ct_req' not described in 'lpfc_ct_reject_event'
       drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'rx_id' not described in 'lpfc_ct_reject_event'
       drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'ox_id' not described in 'lpfc_ct_reject_event'
       drivers/scsi/lpfc/lpfc_ct.c:283: warning: Function parameter or member 'ctiocbq' not described in 'lpfc_ct_handle_mibreq'
       drivers/scsi/lpfc/lpfc_ct.c:283: warning: Excess function parameter 'ctiocb' description in 'lpfc_ct_handle_mibreq'
      
      Link: https://lore.kernel.org/r/20210303144631.3175331-26-lee.jones@linaro.org
      Cc: James Smart <james.smart@broadcom.com>
      Cc: Dick Kennedy <dick.kennedy@broadcom.com>
      Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: linux-scsi@vger.kernel.org
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      964bc8c4
  9. 20 11月, 2020 1 次提交
  10. 17 11月, 2020 3 次提交
  11. 27 10月, 2020 2 次提交
  12. 03 10月, 2020 1 次提交
  13. 24 8月, 2020 1 次提交
  14. 05 8月, 2020 1 次提交
  15. 25 7月, 2020 1 次提交
    • L
      scsi: lpfc: Fix-up formatting/docrot where appropriate · 6265bc4a
      Lee Jones 提交于
      Other headers have been demoted as they are too far out of sync and ideally
      require effort from the authors.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'usr_flg' not described in 'lpfc_gen_req'
       drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'num_entry' not described in 'lpfc_gen_req'
       drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'tmo' not described in 'lpfc_gen_req'
       drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'retry' not described in 'lpfc_gen_req'
       drivers/scsi/lpfc/lpfc_ct.c:413: warning: Function parameter or member 'rsp_size' not described in 'lpfc_ct_cmd'
       drivers/scsi/lpfc/lpfc_ct.c:413: warning: Function parameter or member 'retry' not described in 'lpfc_ct_cmd'
       drivers/scsi/lpfc/lpfc_ct.c:3030: warning: Function parameter or member 'cmdcode' not described in 'lpfc_fdmi_cmd'
       drivers/scsi/lpfc/lpfc_ct.c:3030: warning: Function parameter or member 'new_mask' not described in 'lpfc_fdmi_cmd'
       drivers/scsi/lpfc/lpfc_ct.c:3272: warning: Function parameter or member 't' not described in 'lpfc_delayed_disc_tmo'
      
      Link: https://lore.kernel.org/r/20200721164148.2617584-31-lee.jones@linaro.org
      Cc: James Smart <james.smart@broadcom.com>
      Cc: Dick Kennedy <dick.kennedy@broadcom.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      6265bc4a
  16. 03 7月, 2020 1 次提交
    • D
      scsi: lpfc: Add an internal trace log buffer · 372c187b
      Dick Kennedy 提交于
      The current logging methods typically end up requesting a reproduction with
      a different logging level set to figure out what happened. This was mainly
      by design to not clutter the kernel log messages with things that were
      typically not interesting and the messages themselves could cause other
      issues.
      
      When looking to make a better system, it was seen that in many cases when
      more data was wanted was when another message, usually at KERN_ERR level,
      was logged.  And in most cases, what the additional logging that was then
      enabled was typically. Most of these areas fell into the discovery machine.
      
      Based on this summary, the following design has been put in place: The
      driver will maintain an internal log (256 elements of 256 bytes).  The
      "additional logging" messages that are usually enabled in a reproduction
      will be changed to now log all the time to the internal log.  A new logging
      level is defined - LOG_TRACE_EVENT.  When this level is set (it is not by
      default) and a message marked as KERN_ERR is logged, all the messages in
      the internal log will be dumped to the kernel log before the KERN_ERR
      message is logged.
      
      There is a timestamp on each message added to the internal log. However,
      this timestamp is not converted to wall time when logged. The value of the
      timestamp is solely to give a crude time reference for the messages.
      
      Link: https://lore.kernel.org/r/20200630215001.70793-14-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>
      372c187b
  17. 10 5月, 2020 1 次提交
    • J
      lpfc: Refactor lpfc nvme headers · 2a1160a0
      James Smart 提交于
      A lot of files in lpfc include nvme headers, building up relationships that
      require a file to change for its headers when there is no other change
      necessary. It would be better to localize the nvme headers.
      
      There is also no need for separate nvme (initiator) and nvmet (tgt)
      header files.
      
      Refactor the inclusion of nvme headers so that all nvme items are
      included by lpfc_nvme.h
      
      Merge lpfc_nvmet.h into lpfc_nvme.h so that there is a single header used
      by both the nvme and nvmet sides. This prepares for structure sharing
      between the two roles. Prep to add shared function prototypes for upcoming
      shared routines.
      Signed-off-by: NPaul Ely <paul.ely@broadcom.com>
      Signed-off-by: NJames Smart <jsmart2021@gmail.com>
      Reviewed-by: NHannes Reinecke <hare@suse.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      2a1160a0
  18. 08 5月, 2020 1 次提交
  19. 11 2月, 2020 3 次提交
  20. 22 12月, 2019 2 次提交
  21. 25 10月, 2019 1 次提交
  22. 01 10月, 2019 1 次提交
    • J
      scsi: lpfc: Fix list corruption in lpfc_sli_get_iocbq · 15498dc1
      James Smart 提交于
      After study, it was determined there was a double free of a CT iocb during
      execution of lpfc_offline_prep and lpfc_offline.  The prep routine issued
      an abort for some CT iocbs, but the aborts did not complete fast enough for
      a subsequent routine that waits for completion. Thus the driver proceeded
      to lpfc_offline, which releases any pending iocbs. Unfortunately, the
      completions for the aborts were then received which re-released the ct
      iocbs.
      
      Turns out the issue for why the aborts didn't complete fast enough was not
      their time on the wire/in the adapter. It was the lpfc_work_done routine,
      which requires the adapter state to be UP before it calls
      lpfc_sli_handle_slow_ring_event() to process the completions. The issue is
      the prep routine takes the link down as part of it's processing.
      
      To fix, the following was performed:
      
       - Prevent the offline routine from releasing iocbs that have had aborts
         issued on them. Defer to the abort completions. Also means the driver
         fully waits for the completions.  Given this change, the recognition of
         "driver-generated" status which then releases the iocb is no longer
         valid. As such, the change made in the commit 29601228 is reverted.
         As recognition of "driver-generated" status is no longer valid, this
         patch reverts the changes made in
         commit 29601228 ("scsi: lpfc: Fix leak of ELS completions on adapter reset")
      
       - Modify lpfc_work_done to allow slow path completions so that the abort
         completions aren't ignored.
      
       - Updated the fdmi path to recognize a CT request that fails due to the
         port being unusable. This stops FDMI retries. FDMI will be restarted on
         next link up.
      
      Link: https://lore.kernel.org/r/20190922035906.10977-14-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>
      15498dc1
  23. 20 8月, 2019 6 次提交
    • J
      scsi: lpfc: Migrate to %px and %pf in kernel print calls · 32350664
      James Smart 提交于
      In order to see real addresses, convert %p with %px for kernel addresses
      and replace %p with %pf for functions.
      
      While converting, standardize on "x%px" throughout (not %px or 0x%px).
      Signed-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>
      32350664
    • J
      scsi: lpfc: Fix Max Frame Size value shown in fdmishow output · f98b2fd7
      James Smart 提交于
      Max Frame Size value is shown as 34816 in fdmishow from Switch.
      
      The driver uses bbRcvSize in common service param which is obtained from
      the READ_SPARM mailbox command. The bbRcvSize field which is displayed is a
      three nibble field but the driver is printing a full four nibbles.
      
      Fix by masking off the upper nibble.
      Signed-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>
      f98b2fd7
    • J
      scsi: lpfc: Fix loss of remote port after devloss due to lack of RPIs · b95b2119
      James Smart 提交于
      In tests with remote ports contantly logging out/logging coupled with
      occassional local link bounce, if a remote port is disocnnected for longer
      than devloss_tmo and then subsequently reconnected, eventually the test
      will fail to login with the remote port and remote port connectivity is
      lost.
      
      When devloss_tmo expires, the driver does not free the node struct until
      the port or npiv instances is being deleted. The node is left allocated but
      the state set to UNUSED. If the node was in the process of logging in when
      the local link drop occurred, meaning the RPI was allocated for the node in
      order to send the ELS, but not yet registered which comes after successful
      login, the node is moved to the NPR state, and if devloss expires, to
      UNUSED state.  If the remote port comes back, the node associated with it
      is restarted and this path happens to allocate a new RPI and overwrites the
      prior RPI value. In the cases where the port was logged in and loggs out,
      the path did release the RPI but did not set the node rpi value.  In the
      cases where the remote port never finished logging in, the path never did
      the call to release the rpi. In this latter case, when the node is
      subsequently restore, the new rpi allocation overwrites the rpi that was
      not released, and the rpi is now leaked.  Eventually the port will run out
      of RPI resources to log into new remote ports.
      
      Fix by following changes:
      
       - When an rpi is released, do so under locks and ensure the node rpi value
         is set to a non-allocated value (LPFC_RPI_ALLOC_ERROR).  Note:
         refactored to a small service routine to avoid indentation issues.
      
       - When re-enabling a node, check the rpi value to determine if a new
         allocation is necessary. If already set, use the prior rpi.
      
      Enhanced logging to help in the future.
      Signed-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>
      b95b2119
    • J
      scsi: lpfc: Fix devices that don't return after devloss followed by rediscovery · 96d156f9
      James Smart 提交于
      If a remote port is removed and remains removed for devloss_tmo, if an RSCN
      is subsequently received indicating the presence of the remte port, the
      driver does not login to and rediscovery the remote port.
      
      Currently, in order to for a port to be rediscovered post an RSCN, the node
      state must be NPR to reflect not logged in. When devloss expires, the node
      state is marked UNUSED. When an RSCN occurs, the nodes referenced by the
      RSCN will have a NPR_2B_DISC flag set, but the re-login will only be
      attempted if the node is in NPR_NODE state.  Thus the node is skipped over.
      
      Fix by recognizing the NPR_2B_DISC and UNUSED and transition the node back
      to NPR state to allow the re-login to take place.
      Signed-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>
      96d156f9
    • J
      scsi: lpfc: Fix discovery when target has no GID_FT information · 7f20c1cb
      James Smart 提交于
      Some remote ports may be slow in registering their GID_FT protocol
      information with the fabric. If the remote port is an initiator, it may
      send PLOGI to the port before the GID_FT logic is complete. Meaning, after
      accepting the PLOGI, when the driver may see no response to the GID_FT that
      is issued after the login to determine the protocols supported so that
      proper PRLI's may be transmit. If the driver has no fc4 information, it
      currently stops and the remote port is not discovered.
      
      Fix by issuing a LOGO when there is no GID_FT information.  The LOGO
      completion handling will attempt to re-login if the nport_id is still
      present.
      Signed-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>
      7f20c1cb
    • J
      scsi: lpfc: Fix port relogin failure due to GID_FT interaction · 57178b92
      James Smart 提交于
      In cases of remote-port-side cable pull/replug, there happens to be a
      target that upon replug will send the port a PLOGI, a PRLI, and a LOGO.
      When this sequence is received by the driver, the PLOGI accepted and a
      GFT_ID is issued to find the protocol support for the remote port. While
      the GFT_ID is outstanding, a LOGO is received. The driver logs the remote
      port out and unregisters the RPI and schedules a new PLOGI transmission.
      However, the GFT_ID was not terminated. When it completed, the driver
      attempted to transition the remote port to PRLI transmission, which cancels
      the PLOGI scheduling. The PRLI transmit attempt is rejected by the adapter
      as the remote port is not logged in. No retry is attempted as it's expected
      the logout is noted and the supposedly scheduled PLOGI should address the
      state. As there is no PLOGI, the remote port does not get re-discovered.
      
      Fix by aborting the outstanding GFT_ID if the related remote port is logged
      out.
      
      Ensure a PRLI transmit attempt only occurs if the remote port is logging
      in. This avoids the incorrect attempt while logged out.
      Signed-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>
      57178b92
  24. 19 6月, 2019 1 次提交