Closed
Conversation
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Refactor the nvme_fc_fpin_li_lport_update function and provide an API to clear the NVME_CTRL_MARGINAL flag. Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Added new nvme_fc_fpin_set_state() function Replaced duplicated code with function calls Removed unused attached_rport variable Added EXPORT_SYMBOL_GPL() for global availability include/linux/nvme-fc-driver.h: Added forward declaration for struct nvme_fc_lport Added function declaration for nvme_fc_fpin_set_state() Signed-off-by: John Meneghini <jmeneghi@redhat.com>
We don't want to set the state on the attached_wwpn Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Summary of Changes 1. Modified fc_rport_set_marginal_state Function File: drivers/scsi/scsi_transport_fc.c Added calls to nvme_fc_fpin_set_state() when FC port state changes When FC_PORTSTATE_ONLINE → FC_PORTSTATE_MARGINAL: calls with marginal = true When FC_PORTSTATE_MARGINAL → FC_PORTSTATE_ONLINE: calls with marginal = false All calls properly bracketed with #if (IS_ENABLED(CONFIG_NVME_FC)) Added required include: #include <linux/nvme-fc-driver.h> 2. Created Helper Function nvme_fc_lport_from_wwpn File: drivers/nvme/host/fc.c struct nvme_fc_lport *nvme_fc_lport_from_wwpn(u64 wwpn) Searches global nvme_fc_lport_list for matching WWPN Returns lport with incremented reference count (caller must call nvme_fc_lport_put()) Thread-safe with proper spinlock protection Exported with EXPORT_SYMBOL_GPL() 3. Enhanced nvme_fc_fpin_set_state Function File: drivers/nvme/host/fc.c Now supports both setting (marginal = true) and clearing (marginal = false) the NVME_CTRL_MARGINAL bit Uses set_bit() when marginal = true Uses clear_bit() when marginal = false Exported with EXPORT_SYMBOL_GPL() 4. Exported nvme_fc_lport_put Function File: drivers/nvme/host/fc.c Made the previously static function available to external callers Added EXPORT_SYMBOL_GPL(nvme_fc_lport_put) Enables proper reference count management from SCSI transport layer 5. Added Function Declarations File: include/linux/nvme-fc-driver.h struct nvme_fc_lport; struct nvme_fc_lport *nvme_fc_lport_from_wwpn(u64 wwpn); void nvme_fc_lport_put(struct nvme_fc_lport *lport); void nvme_fc_fpin_set_state(struct nvme_fc_lport *lport, u64 wwpn, bool marginal); Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Add the files: fc_portstate_marginal_call_graph.md lpfc_nvme_info_show_call_graph.md Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
This function automatically sets FC_PORTSTATE_MARGINAL state on remote ports based on FPIN ELS message. Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Set the FC_PORTSTATE_MARGINAL state on all remote rports when an FPIN ELS message is received. Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: John Meneghini <jmeneghi@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compare branches