#
af20bb73 |
| 29-Apr-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Add support for 32 byte CDBs
The driver's I/O path is updated to support 32 byte CDBs.
Changes to accommodate 32 byte CDBs include:
- Updating various size fields to allow for the lar
scsi: lpfc: Add support for 32 byte CDBs
The driver's I/O path is updated to support 32 byte CDBs.
Changes to accommodate 32 byte CDBs include:
- Updating various size fields to allow for the larger 32 byte CDB.
- Starting the FCP command payload at an earlier offset in WQE submission to fit the 32 byte CDB.
- Redefining relevant structs to __le32/__be32 data types for proper cpu endianness macro usage.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240429221547.6842-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
e780c942 |
| 29-Apr-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Change lpfc_hba hba_flag member into a bitmask
In attempt to reduce the amount of unnecessary phba->hbalock acquisitions in the lpfc driver, change hba_flag into an unsigned long bitmask
scsi: lpfc: Change lpfc_hba hba_flag member into a bitmask
In attempt to reduce the amount of unnecessary phba->hbalock acquisitions in the lpfc driver, change hba_flag into an unsigned long bitmask and use clear_bit/test_bit bitwise atomic APIs instead of reliance on phba->hbalock for synchronization.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240429221547.6842-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
5f800d72 |
| 29-Apr-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Introduce rrq_list_lock to protect active_rrq_list
Instead of using the generic object wide phba->hbalock, an explicit lock should be used to synchronize mutations to the phba->active_rr
scsi: lpfc: Introduce rrq_list_lock to protect active_rrq_list
Instead of using the generic object wide phba->hbalock, an explicit lock should be used to synchronize mutations to the phba->active_rrq_list.
Update all accesses to the phba->active_rrq_list with a new phba->rrq_list_lock.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240429221547.6842-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
bf81e9cd |
| 29-Apr-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Clear deferred RSCN processing flag when driver is unloading
Device recovery logic is skipped when the RSCN processing flag is set. However during rmmod, the flag is not cleared leading
scsi: lpfc: Clear deferred RSCN processing flag when driver is unloading
Device recovery logic is skipped when the RSCN processing flag is set. However during rmmod, the flag is not cleared leading to unnecessary delays in waiting for completions on a link that is being offlined.
Move clearing of the RSCN deferred flag to a refactored routine when called from device recovery, and set the IA flag when issuing an abort during unload.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240429221547.6842-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
85d77f91 |
| 05-Mar-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Define types in a union for generic void *context3 ptr
In LPFC_MBOXQ_t, the void *context3 ptr is used for various paths. It is treated as a generic pointer, and is type casted during i
scsi: lpfc: Define types in a union for generic void *context3 ptr
In LPFC_MBOXQ_t, the void *context3 ptr is used for various paths. It is treated as a generic pointer, and is type casted during its usage.
The issue with this is that it can sometimes get confusing when reading code as to what the context3 ptr is being used for and mistakenly be reused in a different context.
Rename context3 to ctx_u, and declare it as a union of defined ptr types. From now on, the ctx_u ptr may be used only if users define the use case type.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240305200503.57317-11-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
115d137a |
| 05-Mar-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
In LPFC_MBOXQ_t, the ctx_buf ptr shouldn't be defined as a generic void *ptr. It is named ctx_buf and it should only be used as an lpfc_dmabuf *p
scsi: lpfc: Define lpfc_dmabuf type for ctx_buf ptr
In LPFC_MBOXQ_t, the ctx_buf ptr shouldn't be defined as a generic void *ptr. It is named ctx_buf and it should only be used as an lpfc_dmabuf *ptr. Due to the void* declaration, there have been abuses of ctx_buf for things not related to lpfc_dmabuf.
So, set the ptr type for *ctx_buf as lpfc_dmabuf. Remove all type casts on ctx_buf because it is no longer a void *ptr. Convert the abuse of ctx_buf for something not related to lpfc_dmabuf to use the void *context3 ptr.
A particular abuse of the ctx_buf warranted a new void *ext_buf ptr. However, the usage of this new void *ext_buf is not generic. It is intended to only hold virtual addresses for extended mailbox commands.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240305200503.57317-10-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
18f7fe44 |
| 05-Mar-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Define lpfc_nodelist type for ctx_ndlp ptr
In LPFC_MBOXQ_t data structure, the ctx_ndlp ptr shouldn't be defined as a generic void *ptr. It is named ctx_ndlp and it should only be used
scsi: lpfc: Define lpfc_nodelist type for ctx_ndlp ptr
In LPFC_MBOXQ_t data structure, the ctx_ndlp ptr shouldn't be defined as a generic void *ptr. It is named ctx_ndlp and it should only be used as an lpfc_nodelist *ptr. Due to the void* declaration, there have been abuses of ctx_ndlp for things not related to ndlp.
So, set the ptr type for *ctx_ndlp as lpfc_nodelist. Remove all type casts on ctx_ndlp because it is no longer a void *ptr. Convert the abuse of ctx_ndlp for things not related to ndlps to use the void *context3 ptr.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240305200503.57317-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
f733a76e |
| 05-Mar-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Use a dedicated lock for ras_fwlog state
To reduce usage of and contention for hbalock, a separate dedicated lock is used to protect ras_fwlog state.
Signed-off-by: Justin Tee <justin.t
scsi: lpfc: Use a dedicated lock for ras_fwlog state
To reduce usage of and contention for hbalock, a separate dedicated lock is used to protect ras_fwlog state.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240305200503.57317-8-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
ded20192 |
| 05-Mar-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()
lpfc_worker_wake_up() calls the lpfc_work_done() routine, which takes the hbalock. Thus, lpfc_worker_wake_up() should not be called
scsi: lpfc: Release hbalock before calling lpfc_worker_wake_up()
lpfc_worker_wake_up() calls the lpfc_work_done() routine, which takes the hbalock. Thus, lpfc_worker_wake_up() should not be called while holding the hbalock to avoid potential deadlock.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240305200503.57317-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
ea4044e4 |
| 31-Jan-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Copyright updates for 14.4.0.0 patches
Update copyrights to 2024 for files modified in the 14.4.0.0 patch set.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.ker
scsi: lpfc: Copyright updates for 14.4.0.0 patches
Update copyrights to 2024 for files modified in the 14.4.0.0 patch set.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-18-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
e39811be |
| 31-Jan-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Change lpfc_vport load_flag member into a bitmask
In attempt to reduce the amount of unnecessary shost_lock acquisitions in the lpfc driver, change load_flag into an unsigned long bitmas
scsi: lpfc: Change lpfc_vport load_flag member into a bitmask
In attempt to reduce the amount of unnecessary shost_lock acquisitions in the lpfc driver, change load_flag into an unsigned long bitmask and use clear_bit/test_bit bitwise atomic APIs instead of reliance on shost_lock for synchronization.
Also, correct the test for FC_UNLOADING in lpfc_ct_handle_mibreq, which incorrectly tests vport->fc_flag rather than vport->load_flag.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-16-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
a645b8c1 |
| 31-Jan-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Change lpfc_vport fc_flag member into a bitmask
In attempt to reduce the amount of unnecessary shost_lock acquisitions in the lpfc driver, change fc_flag into an unsigned long bitmask an
scsi: lpfc: Change lpfc_vport fc_flag member into a bitmask
In attempt to reduce the amount of unnecessary shost_lock acquisitions in the lpfc driver, change fc_flag into an unsigned long bitmask and use clear_bit/test_bit bitwise atomic APIs instead of reliance on shost_lock for synchronization.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-15-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
900db34a |
| 31-Jan-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Add condition to delete ndlp object after sending BLS_RJT to an ABTS
The "Nodelist not empty" log message and an accompanying delay may be observed when deleting an NPIV port or unloadin
scsi: lpfc: Add condition to delete ndlp object after sending BLS_RJT to an ABTS
The "Nodelist not empty" log message and an accompanying delay may be observed when deleting an NPIV port or unloading the lpfc driver. This can occur due to receipt of an ABTS for which there is no corresponding login context or ndlp allocated. In such cases, the driver allocates a new ndlp object to send a BLS_RJT after which the ndlp object unintentionally remains in the NLP_STE_UNUSED_NODE state forever.
Add a check to conditionally remove ndlp's initial reference count when queuing a BLS response. If the initial reference is removed, then set the NLP_DROPPED flag to notify other code paths.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-9-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
3d0f9342 |
| 31-Jan-2024 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()
A static code analyzer tool indicates that the local variable called status in the lpfc_sli4_repost_sgl_list() routine cou
scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()
A static code analyzer tool indicates that the local variable called status in the lpfc_sli4_repost_sgl_list() routine could be used to print garbage uninitialized values in the routine's log message.
Fix by initializing to zero.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20240131185112.149731-2-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
420ac766 |
| 24-Nov-2023 |
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> |
scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal
Replace literal 0x80 with PCI_HEADER_TYPE_MFD.
Link: https://lore.kernel.org/r/20231124090919.23687-4-ilpo.jarvinen@linux.intel.com Signed-off
scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal
Replace literal 0x80 with PCI_HEADER_TYPE_MFD.
Link: https://lore.kernel.org/r/20231124090919.23687-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
show more ...
|
#
e6af4521 |
| 31-Oct-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Enhance driver logging for selected discovery events
Typically, debugging discovery issues requires the ndlp reference count, nlp flags, transport flags, and the io tag for root cause an
scsi: lpfc: Enhance driver logging for selected discovery events
Typically, debugging discovery issues requires the ndlp reference count, nlp flags, transport flags, and the io tag for root cause analysis.
Modify important discovery log messages to include one or more of these attributes to aid in debugging and support.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231031191224.150862-8-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
349b1e2c |
| 31-Oct-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Refactor and clean up mailbox command memory free
A lot of repeated clean up code exists when freeing mailbox commands in lpfc_mem_free_all().
Introduce a lpfc_mem_free_sli_mbox() helpe
scsi: lpfc: Refactor and clean up mailbox command memory free
A lot of repeated clean up code exists when freeing mailbox commands in lpfc_mem_free_all().
Introduce a lpfc_mem_free_sli_mbox() helper routine to refactor the copy-paste code. Additionally, reinitialize the mailbox command structure context pointers to NULL in lpfc_sli4_mbox_cmd_free().
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231031191224.150862-7-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
57ea41eb |
| 31-Oct-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Return early in lpfc_poll_eratt() when the driver is unloading
Add a check in lpfc_poll_eratt() when the driver is unloading. There is no point to check for error attention events if th
scsi: lpfc: Return early in lpfc_poll_eratt() when the driver is unloading
Add a check in lpfc_poll_eratt() when the driver is unloading. There is no point to check for error attention events if the driver is rmmod'ed.
If the driver is reloaded, as part of insmod initialization, then a fresh reset is always asserted to start clean and free of error attention events.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231031191224.150862-6-justintee8345@gmail.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
05068146 |
| 09-Oct-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Remove unnecessary zero return code assignment in lpfc_sli4_hba_setup
In order to enter the !rc if statement block in question, rc had to have been zero to begin with. Thus, the rc = 0
scsi: lpfc: Remove unnecessary zero return code assignment in lpfc_sli4_hba_setup
In order to enter the !rc if statement block in question, rc had to have been zero to begin with. Thus, the rc = 0 assignment is unnecessary and can be removed.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20231009161812.97232-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
089ea22e |
| 12-Jul-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected
A mailbox timeout error usually indicates something has gone wrong, and a follow up reset of the HBA is a typical recove
scsi: lpfc: Abort outstanding ELS cmds when mailbox timeout error is detected
A mailbox timeout error usually indicates something has gone wrong, and a follow up reset of the HBA is a typical recovery mechanism. Introduce a MBX_TMO_ERR flag to detect such cases and have lpfc_els_flush_cmd abort ELS commands if the MBX_TMO_ERR flag condition was set. This ensures all of the registered SGL resources meant for ELS traffic are not leaked after an HBA reset.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230712180522.112722-9-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
b9951e1c |
| 23-May-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Change firmware upgrade logging to KERN_NOTICE instead of TRACE_EVENT
A firmware upgrade does not necessitate dumping of phba->dbg_log[] to kmsg via LOG_TRACE_EVENT. A simple KERN_NOTIC
scsi: lpfc: Change firmware upgrade logging to KERN_NOTICE instead of TRACE_EVENT
A firmware upgrade does not necessitate dumping of phba->dbg_log[] to kmsg via LOG_TRACE_EVENT. A simple KERN_NOTICE log message should suffice to notify the user of successful or unsuccessful firmware upgrade. As such, firmware upgrade log messages are updated to use KERN_NOTICE instead of LOG_TRACE_EVENT. Additionally, in order to notify the user of reset type for instantiating newly downloaded firmware, lpfc_log_msg's default KERN_LEVEL is updated to 5 or KERN_NOTICE.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230523183206.7728-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
a7b94c15 |
| 17-Apr-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Replace blk_irq_poll intr handler with threaded IRQ
It has been determined that the threaded IRQ API accomplishes effectively the same performance metrics as blk_irq_poll. As blk_irq_po
scsi: lpfc: Replace blk_irq_poll intr handler with threaded IRQ
It has been determined that the threaded IRQ API accomplishes effectively the same performance metrics as blk_irq_poll. As blk_irq_poll is mostly scheduled by the softirqd and handled in softirq context, this is not entirely desired from a Fibre Channel driver context. A threaded IRQ model fits cleaner. This patch replaces the blk_irq_poll logic with threaded IRQ.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230417191558.83100-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
5fc849d8 |
| 17-Apr-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Add new RCQE status for handling DMA failures
A new RCQE status value indicating DMA failure when transferring asynchronously received data to an RQE is introduced. Such errors are unex
scsi: lpfc: Add new RCQE status for handling DMA failures
A new RCQE status value indicating DMA failure when transferring asynchronously received data to an RQE is introduced. Such errors are unexpected and handlers are updated to log KERN_ERR and dump lpfc's debug trace buffer to kmsg.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230417191558.83100-6-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
779d61df |
| 17-Apr-2023 |
Justin Tee <justin.tee@broadcom.com> |
scsi: lpfc: Update congestion warning notification period
The CMF_SYNC_WQE command is updated to use an 8-bit field sync period. All related variables used to calculate congestion warning notificat
scsi: lpfc: Update congestion warning notification period
The CMF_SYNC_WQE command is updated to use an 8-bit field sync period. All related variables used to calculate congestion warning notifications are updated to 8-bit fields accordingly.
Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230417191558.83100-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
e891681b |
| 07-Mar-2023 |
Bjorn Helgaas <bhelgaas@google.com> |
scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting()
pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting
scsi: lpfc: Drop redundant pci_enable_pcie_error_reporting()
pci_enable_pcie_error_reporting() enables the device to send ERR_* Messages. Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"), the PCI core does this for all devices during enumeration, so the driver doesn't need to do it itself.
Remove the redundant pci_enable_pcie_error_reporting() call from the driver. Also remove the corresponding pci_disable_pcie_error_reporting() from the driver .remove() path.
Note that this only controls ERR_* Messages from the device. An ERR_* Message may cause the Root Port to generate an interrupt, depending on the AER Root Error Command register managed by the AER service driver.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20230307182842.870378-8-helgaas@kernel.org Cc: James Smart <james.smart@broadcom.com> Cc: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|