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 ver3 1/4] qla4xxx: Remove funcs with no callers in ql4_init.c
Date: Sat, 05 Aug 2006 17:52:07 -0500 [thread overview]
Message-ID: <20060805225207.9557.93705.stgit@bebe.enoyolf.org> (raw)
In-Reply-To: <20060805225156.9557.99072.stgit@bebe.enoyolf.org>
From: Doug Maxey <dwm@enoyolf.org>
These can be added later when a caller exists.
qla4xxx_login_device()
qla4xxx_logout_device()
qla4xxx_delete_device()
Signed-off-by: Doug Maxey <dwm@enoyolf.org>
---
drivers/scsi/qla4xxx/ql4_init.c | 163 +--------------------------------------
1 files changed, 5 insertions(+), 158 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 1e55e42..8608106 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -41,7 +41,7 @@ static void ql4xxx_set_mac_number(struct
}
/**
- * qla4xxx_free_ddb - deallocate ddb
+ * qla4xxx_free_ddb - deallocate ddb
* @ha: pointer to host adapter structure.
* @ddb_entry: pointer to device database entry
*
@@ -376,7 +376,7 @@ static struct ddb_entry* qla4xxx_get_ddb
*
* This routine updates the driver's internal device database entry
* with information retrieved from the firmware's device database
- * entry for the specified device. The ddb_entry->fw_ddb_index field
+ * entry for the specified device. The ddb_entry->fw_ddb_index field
* must be initialized prior to calling this routine
*
**/
@@ -494,7 +494,7 @@ struct ddb_entry * qla4xxx_alloc_ddb(str
* @ha: Pointer to host adapter structure.
*
* This routine searches for all valid firmware ddb entries and builds
- * an internal ddb list. Ddbs that are considered valid are those with
+ * an internal ddb list. Ddbs that are considered valid are those with
* a device state of SESSION_ACTIVE.
**/
static int qla4xxx_build_ddb_list(struct scsi_qla_host *ha)
@@ -540,7 +540,7 @@ static int qla4xxx_build_ddb_list(struct
qla4xxx_set_ddb_entry(ha, fw_ddb_index, 0);
}
- if (ddb_state != DDB_DS_SESSION_ACTIVE)
+ if (ddb_state != DDB_DS_SESSION_ACTIVE)
goto next_one;
/*
* if fw_ddb with session active state found,
@@ -1134,7 +1134,7 @@ static int qla4xxx_start_firmware(struct
* @renew_ddb_list: Indicates what to do with the adapter's ddb list
* after adapter recovery has completed.
* 0=preserve ddb list, 1=destroy and rebuild ddb list
- *
+ *
* This routine parforms all of the steps necessary to initialize the adapter.
*
**/
@@ -1340,156 +1340,3 @@ int qla4xxx_process_ddb_changed(struct s
return QLA_SUCCESS;
}
-/**
- * qla4xxx_login_device - login to target device
- * @ha: Pointer to host adapter structure.
- * @fw_ddb_index: Index of the device to login
- * @connection_id: Connection ID of the device to login
- *
- * This routine is called by the login IOCTL to log in the specified device.
- **/
-int qla4xxx_login_device(struct scsi_qla_host *ha, uint16_t fw_ddb_index,
- uint16_t connection_id)
-{
- struct ddb_entry * ddb_entry;
- int status = QLA_ERROR;
-
- ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
- if (ddb_entry == NULL)
- goto exit_login_device;
-
- if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
- &ddb_entry->fw_ddb_device_state, NULL,
- NULL, NULL) == QLA_ERROR)
- goto exit_login_device;
-
- if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) {
- status = QLA_SUCCESS;
- goto exit_login_device;
- }
-
- if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
- LOGOUT_OPTION_RELOGIN)
- != QLA_SUCCESS)
- goto exit_login_device;
-
- status = QLA_SUCCESS;
-
-exit_login_device:
- return status;
-}
-
-/**
- * qla4xxx_logout_device - logout target device
- * @ha: Pointer to host adapter structure.
- * @fw_ddb_index: Index of the device to logout
- * @connection_id: Connection ID of the device to logout
- *
- * This support routine is called by the logout IOCTL to log out
- * the specified device.
- **/
-int qla4xxx_logout_device(struct scsi_qla_host *ha, uint16_t fw_ddb_index,
- uint16_t connection_id)
-{
- int status = QLA_ERROR;
- struct ddb_entry * ddb_entry;
- uint32_t old_fw_ddb_device_state;
-
- ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
- if (ddb_entry == NULL)
- goto exit_logout_device;
-
- if (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
- &old_fw_ddb_device_state, NULL, NULL,
- NULL) != QLA_SUCCESS)
- goto exit_logout_device;
-
- set_bit(DF_NO_RELOGIN, &ddb_entry->flags);
- if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
- LOGOUT_OPTION_CLOSE_SESSION)
- != QLA_SUCCESS)
- goto exit_logout_device;
-
- status = QLA_SUCCESS;
-
-exit_logout_device:
- return status;
-}
-
-/**
- * qla4xxx_delete_device - delete specified ddb entry
- * @ha: Pointer to host adapter structure.
- * @fw_ddb_index: Index of the device to delete
- * @connection_id: Connection ID of the device to delete
- *
- * This routine is called by the logout IOCTL to delete the specified
- * device. Send the LOGOUT and DELETE_DDB commands for the specified
- * target, even if it's not in our internal database.
- **/
-int qla4xxx_delete_device(struct scsi_qla_host *ha, uint16_t fw_ddb_index,
- uint16_t connection_id)
-{
- int status = QLA_ERROR;
- uint32_t fw_ddb_device_state = 0xFFFF;
- u_long wait_count;
- struct ddb_entry * ddb_entry;
-
- /* If the device is in our internal tables, set the NO_RELOGIN bit. */
- ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, fw_ddb_index);
- if (ddb_entry != NULL)
- set_bit(DF_NO_RELOGIN, &ddb_entry->flags);
-
- /*
- * If the device state is already one that we can delete, bypass the
- * logout command.
- */
- qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
- &fw_ddb_device_state, NULL, NULL, NULL);
- if (fw_ddb_device_state == DDB_DS_UNASSIGNED ||
- fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE ||
- fw_ddb_device_state == DDB_DS_SESSION_FAILED)
- goto delete_ddb;
-
- /* First logout index */
- if (qla4xxx_conn_close_sess_logout(ha, fw_ddb_index, connection_id,
- LOGOUT_OPTION_CLOSE_SESSION) !=
- QLA_SUCCESS) {
- DEBUG2(printk("scsi%ld: %s: LOGOUT_OPTION_CLOSE_SESSION "
- "failed index [%d]\n", ha->host_no, __func__,
- fw_ddb_index));
- goto exit_delete_ddb;
- }
-
- /* Wait enough time to complete logout */
- wait_count = jiffies + LOGOUT_TOV * HZ;
- while (qla4xxx_get_fwddb_entry(ha, fw_ddb_index, NULL, 0, NULL, NULL,
- &fw_ddb_device_state, NULL, NULL, NULL)
- == QLA_SUCCESS) {
- if (time_after_eq(jiffies, wait_count))
- goto exit_delete_ddb;
- if (fw_ddb_device_state == DDB_DS_UNASSIGNED ||
- fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE ||
- fw_ddb_device_state == DDB_DS_SESSION_FAILED)
- break;
- udelay(50);
- }
-
-delete_ddb:
- /* Now delete index */
- if (qla4xxx_clear_database_entry(ha, fw_ddb_index) == QLA_SUCCESS) {
- status = QLA_SUCCESS;
-
- if (!ddb_entry)
- goto exit_delete_ddb;
-
- atomic_set(&ddb_entry->state, DDB_STATE_DEAD);
- DEBUG(printk("scsi%ld: %s: removing index %d.\n", ha->host_no,
- __func__, fw_ddb_index));
- ha->fw_ddb_index_map[fw_ddb_index] =
- (struct ddb_entry *)INVALID_ENTRY;
- }
-
-exit_delete_ddb:
- return status;
-
-}
next parent reply other threads:[~2006-08-05 22:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060805225156.9557.99072.stgit@bebe.enoyolf.org>
2006-08-05 22:52 ` Doug Maxey [this message]
2006-08-05 22:52 ` [PATCH ver3 2/4] qla4xxx: Add a timeout period and return status from ql4xxx_lock_drvr_wait() Doug Maxey
2006-08-05 22:52 ` [PATCH ver3 3/4] qla4xxx: use dev_xxx on some pci/dma resource alloc warning and error printks Doug Maxey
2006-08-09 17:52 ` Mike Christie
2006-08-09 19:03 ` Doug Maxey
2006-08-09 23:05 ` Doug Maxey
2006-08-09 23:36 ` Ravi Anand
2006-08-10 9:52 ` Mike Christie
2006-08-10 10:18 ` Mike Christie
2006-08-10 13:59 ` James Bottomley
2006-08-05 22:52 ` [PATCH ver3 4/4] qla4xxx: improve symmetry in buffer codepaths Doug Maxey
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=20060805225207.9557.93705.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