From: Saurav Kashyap <saurav.kashyap@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, saurav.kashyap@qlogic.com,
andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 10/22] qla2xxx: Fix issue with not displaying node name after system reboot.
Date: Wed, 30 Oct 2013 03:38:17 -0400 [thread overview]
Message-ID: <1383118709-5569-11-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1383118709-5569-1-git-send-email-saurav.kashyap@qlogic.com>
From: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
drivers/scsi/qla2xxx/qla_def.h | 1 +
drivers/scsi/qla2xxx/qla_mr.c | 18 ++++++++++++++++++
drivers/scsi/qla2xxx/qla_mr.h | 3 +++
drivers/scsi/qla2xxx/qla_os.c | 10 ++++++++++
5 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 149a1b5..66f6597 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -26,7 +26,7 @@
* | | | 0x302d,0x3033 |
* | | | 0x3036,0x3038 |
* | | | 0x303a |
- * | DPC Thread | 0x4022 | 0x4002,0x4013 |
+ * | DPC Thread | 0x4023 | 0x4002,0x4013 |
* | Async Events | 0x5087 | 0x502b-0x502f |
* | | | 0x5047,0x5052 |
* | | | 0x5084,0x5075 |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 0fb01e1..ac62bca 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -3370,6 +3370,7 @@ typedef struct scsi_qla_host {
#define FX00_RESET_RECOVERY 23
#define FX00_TARGET_SCAN 24
#define FX00_CRITEMP_RECOVERY 25
+#define FX00_HOST_INFO_RESEND 26
uint32_t device_flags;
#define SWITCH_FOUND BIT_0
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index 4e418fc..3ac835e 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -1612,6 +1612,22 @@ qlafx00_timer_routine(scsi_qla_host_t *vha)
ha->mr.fw_critemp_timer_tick--;
}
}
+ if (ha->mr.host_info_resend) {
+ /*
+ * Incomplete host info might be sent to firmware
+ * durinng system boot - info should be resend
+ */
+ if (ha->mr.hinfo_resend_timer_tick == 0) {
+ ha->mr.host_info_resend = false;
+ set_bit(FX00_HOST_INFO_RESEND, &vha->dpc_flags);
+ ha->mr.hinfo_resend_timer_tick =
+ QLAFX00_HINFO_RESEND_INTERVAL;
+ qla2xxx_wake_dpc(vha);
+ } else {
+ ha->mr.hinfo_resend_timer_tick--;
+ }
+ }
+
}
/*
@@ -1890,6 +1906,8 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type)
p_sysid->sysname, SYSNAME_LENGTH);
strncpy(phost_info->nodename,
p_sysid->nodename, NODENAME_LENGTH);
+ if (!strcmp(phost_info->nodename, "(none)"))
+ ha->mr.host_info_resend = true;
strncpy(phost_info->release,
p_sysid->release, RELEASE_LENGTH);
strncpy(phost_info->version,
diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h
index 79a93c5..a5ddea6 100644
--- a/drivers/scsi/qla2xxx/qla_mr.h
+++ b/drivers/scsi/qla2xxx/qla_mr.h
@@ -511,6 +511,8 @@ struct mr_data_fx00 {
uint32_t old_aenmbx0_state;
uint32_t critical_temperature;
bool extended_io_enabled;
+ bool host_info_resend;
+ uint8_t hinfo_resend_timer_tick;
};
#define QLAFX00_EXTENDED_IO_EN_MASK 0x20
@@ -537,6 +539,7 @@ struct mr_data_fx00 {
#define QLAFX00_RESET_INTERVAL 120 /* number of seconds */
#define QLAFX00_MAX_RESET_INTERVAL 600 /* number of seconds */
#define QLAFX00_CRITEMP_INTERVAL 60 /* number of seconds */
+#define QLAFX00_HINFO_RESEND_INTERVAL 60 /* number of seconds */
#define QLAFX00_CRITEMP_THRSHLD 80 /* Celsius degrees */
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 9c5070e..ae447d9 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2499,6 +2499,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL;
ha->mr.fw_critemp_timer_tick = QLAFX00_CRITEMP_INTERVAL;
ha->mr.fw_hbt_en = 1;
+ ha->mr.host_info_resend = false;
+ ha->mr.hinfo_resend_timer_tick = QLAFX00_HINFO_RESEND_INTERVAL;
}
ql_dbg_pci(ql_dbg_init, pdev, 0x001e,
@@ -4872,6 +4874,14 @@ qla2x00_do_dpc(void *data)
ql_dbg(ql_dbg_dpc, base_vha, 0x401f,
"ISPFx00 Target Scan End\n");
}
+ if (test_and_clear_bit(FX00_HOST_INFO_RESEND,
+ &base_vha->dpc_flags)) {
+ ql_dbg(ql_dbg_dpc, base_vha, 0x4023,
+ "ISPFx00 Host Info resend scheduled\n");
+ qlafx00_fx_disc(base_vha,
+ &base_vha->hw->mr.fcport,
+ FXDISC_REG_HOST_INFO);
+ }
}
if (test_and_clear_bit(ISP_ABORT_NEEDED,
--
1.7.7
next prev parent reply other threads:[~2013-10-30 8:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 7:38 [PATCH 00/22] qla2xxx: Patches for 3.13 scsi "misc" branch Saurav Kashyap
2013-10-30 7:38 ` [PATCH 01/22] qla2xxx: Print proper QLAFX00 product name at probe Saurav Kashyap
2013-10-30 7:38 ` [PATCH 02/22] qla2xxx: Honor execute firmware failures Saurav Kashyap
2013-10-30 7:38 ` [PATCH 03/22] qla2xxx: Disable INTx interrupt for ISP82XX Saurav Kashyap
2013-10-30 7:38 ` [PATCH 04/22] qla2xxx: Correctly set mailboxes for extended init control block Saurav Kashyap
2013-10-30 7:38 ` [PATCH 05/22] qla2xxx: Add BPM support for ISP25xx Saurav Kashyap
2013-10-30 7:38 ` [PATCH 06/22] qla2xxx: Don't consider the drivers knocked out of IDC participation for future reset recovery process Saurav Kashyap
2013-10-30 7:38 ` [PATCH 07/22] Revert "qla2xxx: Ramp down queue depth for attached SCSI devices when driver resources are low." Saurav Kashyap
2013-10-30 7:38 ` [PATCH 08/22] qla2xxx: Refactor shutdown code so some functionality can be reused Saurav Kashyap
2013-10-30 7:38 ` [PATCH 09/22] qla2xxx: Disable adapter when we encounter a PCI disconnect Saurav Kashyap
2013-10-30 7:38 ` Saurav Kashyap [this message]
2013-10-30 7:38 ` [PATCH 11/22] qla2xxx: Add BSG interface for read/write serdes register Saurav Kashyap
2013-10-30 7:38 ` [PATCH 12/22] qla2xxx: Fix undefined behavior in call to snprintf() Saurav Kashyap
2013-10-30 7:38 ` [PATCH 13/22] qla2xxx: Clear RISC INT reg only for an event and not always while polling Saurav Kashyap
2013-10-30 7:38 ` [PATCH 14/22] qla2xxx: Add logic to abort BSG commands for ISPFX00 Saurav Kashyap
2013-10-30 7:38 ` [PATCH 15/22] qla2xxx: Add changes to obtain ISPFX00 adapters product information in accordance with firmware update Saurav Kashyap
2013-10-30 7:38 ` [PATCH 16/22] qla2xxx: Use the correct mailbox registers when acknowledging an IDC request on ISP8044 Saurav Kashyap
2013-10-30 7:38 ` [PATCH 17/22] qla2xxx: Use scnprintf() instead of snprintf() in the sysfs handlers Saurav Kashyap
2013-10-30 7:38 ` [PATCH 18/22] qla2xxx: Only complete dcbx_comp and lb_portup_comp for virtual port index 0 Saurav Kashyap
2013-10-30 7:38 ` [PATCH 19/22] qla2xxx: Reset nic_core_reset_owner on moving from COLD to READY for ISP8044 Saurav Kashyap
2013-10-30 7:38 ` [PATCH 20/22] qla2xxx: Replace a constant with a macro definition for host->canqueue assigmnment Saurav Kashyap
2013-10-30 7:38 ` [PATCH 21/22] qla2xxx: Adding MAINTAINERS for qla2xxx FC-SCSI driver Saurav Kashyap
2013-10-30 7:38 ` [PATCH 22/22] qla2xxx: Update the driver version to 8.06.00.12-k Saurav Kashyap
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=1383118709-5569-11-git-send-email-saurav.kashyap@qlogic.com \
--to=saurav.kashyap@qlogic.com \
--cc=andrew.vasquez@qlogic.com \
--cc=giridhar.malavali@qlogic.com \
--cc=jbottomley@parallels.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).