linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 11/29] qla2xxx: Notify ISPFX00 firmware when driver is unloaded or system is shut down.
Date: Tue, 27 Aug 2013 01:37:37 -0400	[thread overview]
Message-ID: <1377581875-8574-12-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1377581875-8574-1-git-send-email-saurav.kashyap@qlogic.com>

From: Armen Baloyan <armen.baloyan@qlogic.com>

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_gbl.h |    1 +
 drivers/scsi/qla2xxx/qla_mr.c  |    2 +-
 drivers/scsi/qla2xxx/qla_os.c  |    7 +++++++
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index d03b15d..9a80c49 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -594,6 +594,7 @@ extern int qlafx00_start_scsi(srb_t *);
 extern int qlafx00_abort_isp(scsi_qla_host_t *);
 extern int qlafx00_iospace_config(struct qla_hw_data *);
 extern int qlafx00_init_firmware(scsi_qla_host_t *, uint16_t);
+extern int qlafx00_driver_shutdown(scsi_qla_host_t *, int);
 extern int qlafx00_fw_ready(scsi_qla_host_t *);
 extern int qlafx00_configure_devices(scsi_qla_host_t *);
 extern int qlafx00_reset_initialize(scsi_qla_host_t *);
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index e087a49..ab2ae8e 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -294,7 +294,7 @@ premature_exit:
  * Context:
  *	Kernel context.
  */
-static int
+int
 qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo)
 {
 	int rval;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3f53151..17a86b6 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -3006,6 +3006,10 @@ qla2x00_shutdown(struct pci_dev *pdev)
 	vha = pci_get_drvdata(pdev);
 	ha = vha->hw;
 
+	/* Notify ISPFX00 firmware */
+	if (IS_QLAFX00(ha))
+		qlafx00_driver_shutdown(vha, 20);
+
 	/* Turn-off FCE trace */
 	if (ha->flags.fce_enabled) {
 		qla2x00_disable_fce_trace(vha, NULL, NULL);
@@ -3053,6 +3057,9 @@ qla2x00_remove_one(struct pci_dev *pdev)
 	ha->flags.host_shutting_down = 1;
 
 	set_bit(UNLOADING, &base_vha->dpc_flags);
+	if (IS_QLAFX00(ha))
+		qlafx00_driver_shutdown(base_vha, 20);
+
 	mutex_lock(&ha->vport_lock);
 	while (ha->cur_vport_count) {
 		spin_lock_irqsave(&ha->vport_slock, flags);
-- 
1.7.7


  parent reply	other threads:[~2013-08-27  6:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27  5:37 [PATCH 00/29] Update driver to 8.06.00.08-k Saurav Kashyap
2013-08-27  5:37 ` [PATCH 01/29] qla2xxx: Print some variables to hexadecimal string via %*phN format Saurav Kashyap
2013-08-27  5:37 ` [PATCH 02/29] qla2xxx: Add support for ISP8044 Saurav Kashyap
2013-08-28  7:15   ` James Bottomley
2013-08-28 13:33     ` Saurav Kashyap
2013-08-27  5:37 ` [PATCH 03/29] qla2xxx: Fix incorrect test after list_for_each_entry() exits Saurav Kashyap
2013-08-27  5:37 ` [PATCH 04/29] qla2xxx: Correct multiqueue offset calculations Saurav Kashyap
2013-08-27  5:37 ` [PATCH 05/29] qla2xxx: Set factory reset recovery timeout to 10 min. for ISPFX00 Saurav Kashyap
2013-08-27  5:37 ` [PATCH 06/29] qla2xxx: Perform warm reset every 2 minutes if firmware load fails " Saurav Kashyap
2013-08-27  5:37 ` [PATCH 07/29] qla2xxx: Add ISPFX00 specific bus reset routine Saurav Kashyap
2013-08-27  5:37 ` [PATCH 08/29] qla2xxx: Remove QL_DEBUG_LEVEL_17 defines from qla_nx.c Saurav Kashyap
2013-08-27  5:37 ` [PATCH 09/29] qla2xxx: Add setting of driver version string for vendor application Saurav Kashyap
2013-08-27  5:37 ` [PATCH 10/29] qla2xxx: Reconfigure thermal temperature Saurav Kashyap
2013-08-27  5:37 ` Saurav Kashyap [this message]
2013-08-27  5:37 ` [PATCH 12/29] qla2xxx: Add critical temperature handling for ISPFX00 Saurav Kashyap
2013-08-27  5:37 ` [PATCH 13/29] qla2xxx: Make log message that prints when a completion status requires a port down more readable Saurav Kashyap
2013-08-27  5:37 ` [PATCH 14/29] qla2xxx: Add missing FCP statistics to sysfs interface Saurav Kashyap
2013-08-27  5:37 ` [PATCH 15/29] qla2xxx: Add changes to support extended IOs for ISPFX00 Saurav Kashyap
2013-08-27  5:37 ` [PATCH 16/29] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS Saurav Kashyap
2013-08-27  5:37 ` [PATCH 17/29] qla2xxx: Send all AENs for ISPFx00 to above layers Saurav Kashyap
2013-08-27  5:37 ` [PATCH 18/29] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen() Saurav Kashyap
2013-08-27  5:37 ` [PATCH 19/29] qla2xxx: Correct Interrupt Register offset for ISPFX00 Saurav Kashyap
2013-08-27  5:37 ` [PATCH 20/29] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN Saurav Kashyap
2013-08-27  5:37 ` [PATCH 21/29] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware doesn't provide it Saurav Kashyap
2013-08-27  5:37 ` [PATCH 22/29] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support Saurav Kashyap
2013-08-27  5:37 ` [PATCH 23/29] qla2xxx: Select link initialization option bits from current operating mode Saurav Kashyap
2013-08-27  5:37 ` [PATCH 24/29] qla2xxx: Move queue depth ramp down message to i/o debug level Saurav Kashyap
2013-08-27  5:37 ` [PATCH 25/29] qla2xxx: Add a new interface to update versions Saurav Kashyap
2013-08-27  5:37 ` [PATCH 26/29] qla2xxx: Correctly print out/in mailbox registers Saurav Kashyap
2013-08-27  5:37 ` [PATCH 27/29] qla2xxx: Correction to message ids Saurav Kashyap
2013-08-27  5:37 ` [PATCH 28/29] qla2xxx: print MAC via %pMR Saurav Kashyap
2013-08-27  5:37 ` [PATCH 29/29] qla2xxx: Update the driver version to 8.06.00.08-k Saurav Kashyap
2013-08-28  3:24 ` [PATCH 00/29] Update driver " James Bottomley
2013-08-28  4:31   ` 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=1377581875-8574-12-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).