From: James Smart <james.smart@emulex.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 5/7 V2] lpfc 8.3.44: Fixed incorrect allocation of iDiags directories/files in debugfs
Date: Tue, 17 Dec 2013 20:29:59 -0500 [thread overview]
Message-ID: <1387330199.1011.13.camel@myfc17> (raw)
Fixed incorrect allocation of iDiags directories/files in debugfs
Signed-off-by: James Smart <james.smart@emulex.com>
---
lpfc_debugfs.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff -upNr a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
--- a/drivers/scsi/lpfc/lpfc_debugfs.c 2013-11-26 21:45:44.000000000 -0500
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c 2013-12-02 11:52:17.571242177 -0500
@@ -3927,6 +3927,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
struct lpfc_hba *phba = vport->phba;
char name[64];
uint32_t num, i;
+ bool pport_setup = false;
if (!lpfc_debugfs_enable)
return;
@@ -3947,6 +3948,7 @@ lpfc_debugfs_initialize(struct lpfc_vpor
/* Setup funcX directory for specific HBA PCI function */
snprintf(name, sizeof(name), "fn%d", phba->brd_no);
if (!phba->hba_debugfs_root) {
+ pport_setup = true;
phba->hba_debugfs_root =
debugfs_create_dir(name, lpfc_debugfs_root);
if (!phba->hba_debugfs_root) {
@@ -4239,6 +4241,14 @@ lpfc_debugfs_initialize(struct lpfc_vpor
}
/*
+ * The following section is for additional directories/files for the
+ * physical port.
+ */
+
+ if (!pport_setup)
+ goto debug_failed;
+
+ /*
* iDiag debugfs root entry points for SLI4 device only
*/
if (phba->sli_rev < LPFC_SLI_REV4)
reply other threads:[~2013-12-18 1:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387330199.1011.13.camel@myfc17 \
--to=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).