public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Maxey <dwm@enoyolf.org>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Ravi Anand <ravi.anand@qlogic.com>,
	David Somayajulu <david.somayajulu@qlogic.com>,
	open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org
Subject: [PATCH 2/3] qla4xxx: really move free_adapter
Date: Wed, 09 Aug 2006 13:42:32 -0500	[thread overview]
Message-ID: <20060809184232.2021.12800.stgit@bebe.enoyolf.org> (raw)
In-Reply-To: <20060809182406.2021.90492.stgit@bebe.enoyolf.org>

From: Doug Maxey <dwm@enoyolf.org>

Ok.  This one got away.  Really move defn to before callers.

Signed-off-by: Doug Maxey <dwm@enoyolf.org>
---

 drivers/scsi/qla4xxx/ql4_os.c |   69 ++++++++++++++++++++---------------------
 1 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index b14e63a..f656fb3 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -47,7 +47,6 @@ MODULE_PARM_DESC(extended_error_logging,
 void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha);
 
 static int qla4xxx_iospace_config(struct scsi_qla_host *ha);
-static void qla4xxx_free_adapter(struct scsi_qla_host *ha);
 
 /*
  * iSCSI template entry points
@@ -1106,6 +1105,40 @@ static void qla4xxx_do_dpc(void *data)
 }
 
 /**
+ * qla4xxx_free_adapter - release the adapter
+ * @ha: pointer to adapter structure
+ **/
+static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
+{
+
+	if (test_bit(AF_INTERRUPTS_ON, &ha->flags)) {
+		/* Turn-off interrupts on the card. */
+		qla4xxx_disable_intrs(ha);
+	}
+
+	/* Kill the kernel thread for this host */
+	if (ha->dpc_thread)
+		destroy_workqueue(ha->dpc_thread);
+
+	/* Issue Soft Reset to put firmware in unknown state */
+	qla4xxx_soft_reset(ha);
+
+	/* Remove timer thread, if present */
+	if (ha->timer_active)
+		qla4xxx_stop_timer(ha);
+
+	/* free extra memory */
+	qla4xxx_mem_free(ha);
+
+	/* Detach interrupts */
+	if (test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags))
+		free_irq(ha->pdev->irq, ha);
+
+	pci_disable_device(ha->pdev);
+
+}
+
+/**
  * qla4xxx_probe_adapter - callback function to probe HBA
  * @pdev: pointer to pci_dev structure
  * @pci_device_id: pointer to pci_device entry
@@ -1288,40 +1321,6 @@ static void __devexit qla4xxx_remove_ada
 	pci_set_drvdata(pdev, NULL);
 }
 
-/**
- * qla4xxx_free_adapter - release the adapter
- * @ha: pointer to adapter structure
- **/
-static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
-{
-
-	if (test_bit(AF_INTERRUPTS_ON, &ha->flags)) {
-		/* Turn-off interrupts on the card. */
-		qla4xxx_disable_intrs(ha);
-	}
-
-	/* Kill the kernel thread for this host */
-	if (ha->dpc_thread)
-		destroy_workqueue(ha->dpc_thread);
-
-	/* Issue Soft Reset to put firmware in unknown state */
-	qla4xxx_soft_reset(ha);
-
-	/* Remove timer thread, if present */
-	if (ha->timer_active)
-		qla4xxx_stop_timer(ha);
-
-	/* free extra memory */
-	qla4xxx_mem_free(ha);
-
-	/* Detach interrupts */
-	if (test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags))
-		free_irq(ha->pdev->irq, ha);
-
-	pci_disable_device(ha->pdev);
-
-}
-
 /***
  * qla4xxx_iospace_config - maps registers
  * @ha: pointer to adapter structure

  parent reply	other threads:[~2006-08-09 18:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-09 18:24 [PATCHSET] qla4xxx: more qla4xxx cleanup Doug Maxey
2006-08-09 18:42 ` [PATCH 1/3] qla4xxx: clarify doc for probe_adapter Doug Maxey
2006-08-09 18:42 ` Doug Maxey [this message]
2006-08-09 18:42 ` [PATCH 3/3] qla4xxx: iospace_config move defn Doug Maxey
2006-08-09 17:56   ` Mike Christie
2006-08-09 18:03     ` Mike Christie
2006-08-09 20:38       ` Doug Maxey
2006-08-09 19:23     ` David C Somayajulu
2006-08-09 20:15       ` Andrew Vasquez
2006-08-09 20:21         ` James Bottomley
2006-08-09 22:16           ` David C Somayajulu

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=20060809184232.2021.12800.stgit@bebe.enoyolf.org \
    --to=dwm@enoyolf.org \
    --cc=david.somayajulu@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=open-iscsi@googlegroups.com \
    --cc=ravi.anand@qlogic.com \
    /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