From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: "Linux-iSCSI.org Target Dev" <linux-iscsi-target-dev@googlegroups.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] [Target_Core_Mod 6/12]: Updates for target_core_hba.c
Date: Fri, 12 Dec 2008 01:32:44 -0800 [thread overview]
Message-ID: <1229074364.4153.648.camel@haakon2.linux-iscsi.org> (raw)
>From c5c8768f89ab4d419bff6f49edb59e7346a7cec7 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Fri, 12 Dec 2008 00:53:17 -0800
Subject: [PATCH] [Target_Core_Mod]: Updates for target_core_hba.c
This patch makes Core HBA code use TRANSPORT_MAX_GLOBAL_HBAS and
se_check_devices_access().
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
drivers/lio-core/target_core_hba.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/lio-core/target_core_hba.c b/drivers/lio-core/target_core_hba.c
index 1f99d3e..d2515aa 100644
--- a/drivers/lio-core/target_core_hba.c
+++ b/drivers/lio-core/target_core_hba.c
@@ -72,9 +72,9 @@ extern se_hba_t *core_get_hba_from_id (u32 hba_id, int addhba)
{
se_hba_t *hba;
- if (hba_id > (ISCSI_MAX_GLOBAL_HBAS-1)) {
- TRACE_ERROR("iSCSI HBA_ID: %u exceeds ISCSI_MAX_GLOBAL_HBAS-1: %u\n",
- hba_id, ISCSI_MAX_GLOBAL_HBAS-1);
+ if (hba_id > (TRANSPORT_MAX_GLOBAL_HBAS-1)) {
+ TRACE_ERROR("iSCSI HBA_ID: %u exceeds TRANSPORT_MAX_GLOBAL_HBAS-1: %u\n",
+ hba_id, TRANSPORT_MAX_GLOBAL_HBAS-1);
return(NULL);
}
@@ -94,7 +94,7 @@ extern se_hba_t *core_get_next_free_hba (void)
u32 i;
spin_lock(&se_global->hba_lock);
- for (i = 0; i < ISCSI_MAX_GLOBAL_HBAS; i++) {
+ for (i = 0; i < TRANSPORT_MAX_GLOBAL_HBAS; i++) {
hba = &se_global->hba_list[i];
if (hba->hba_status != HBA_STATUS_FREE)
continue;
@@ -182,7 +182,7 @@ extern int se_core_del_hba (
* Do not allow the se_hba_t to be released if references exist to
* from se_device_t->se_lun_t.
*/
- if (iscsi_check_devices_access(hba) < 0) {
+ if (se_check_devices_access(hba) < 0) {
TRACE_ERROR("CORE_HBA[%u] - **ERROR** - Unable to release HBA"
" with active LUNs\n", hba->hba_id);
return(-EINVAL);
@@ -232,14 +232,14 @@ extern void iscsi_disable_all_hbas (void)
se_hba_t *hba;
spin_lock(&se_global->hba_lock);
- for (i = 0; i < ISCSI_MAX_GLOBAL_HBAS; i++) {
+ for (i = 0; i < TRANSPORT_MAX_GLOBAL_HBAS; i++) {
hba = &se_global->hba_list[i];
if (!(hba->hba_status & HBA_STATUS_ACTIVE))
continue;
spin_unlock(&se_global->hba_lock);
- iscsi_disable_devices_for_hba(hba);
+ se_disable_devices_for_hba(hba);
spin_lock(&se_global->hba_lock);
}
spin_unlock(&se_global->hba_lock);
@@ -259,7 +259,7 @@ extern void iscsi_hba_del_all_hbas (void)
se_hba_t *hba;
spin_lock(&se_global->hba_lock);
- for (i = 0; i < ISCSI_MAX_GLOBAL_HBAS; i++) {
+ for (i = 0; i < TRANSPORT_MAX_GLOBAL_HBAS; i++) {
hba = &se_global->hba_list[i];
if (!(hba->hba_status & HBA_STATUS_ACTIVE))
--
1.5.4.1
reply other threads:[~2008-12-12 9:32 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=1229074364.4153.648.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=linux-iscsi-target-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®