[PATCH 6/8] qla2xxx: Cleanup send and modify lun functions in qla_target.[ch].

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Madhuranath Iyengar <mni@xxxxxxxxxxxxxxx>

Signed-off-by: Madhuranath Iyengar <mni@xxxxxxxxxxxxxxx>
---
 drivers/scsi/qla2xxx/qla_target.c |   18 +++++++++---------
 drivers/scsi/qla2xxx/qla_target.h |   10 +++-------
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 585fbb52..be3f8ca 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -1224,8 +1224,10 @@ static int qla_tgt_sched_sess_work(struct qla_tgt *tgt, int type,
 
 /*
  * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire
+ * This function issues a modify LUN IOCB to ISP 2xxx to change or modify
+ * the command count.
  */
-static void qla_tgt_modify_command_count(struct scsi_qla_host *vha, int cmd_count,
+static void qla_tgt_2xxx_send_modify_lun(struct scsi_qla_host *vha, int cmd_count,
 	int imm_count)
 {
 	struct qla_hw_data *ha = vha->hw;
@@ -2835,7 +2837,7 @@ static int qla_tgt_term_ctio_exchange(struct scsi_qla_host *vha, void *ctio,
 		}
 	} else {
 		if (status != CTIO_SUCCESS)
-			qla_tgt_modify_command_count(vha, 1, 0);
+			qla_tgt_2xxx_send_modify_lun(vha, 1, 0);
 #if 0 /* seems, it isn't needed */
 		if (ctio != NULL) {
 			ctio_to_2xxx_entry_t *c = (ctio_to_2xxx_entry_t *)ctio;
@@ -5079,13 +5081,11 @@ qla_tgt_rff_id(struct scsi_qla_host *vha, struct ct_sns_req *ct_req)
 void
 qla_tgt_initialize_adapter(struct scsi_qla_host *vha, struct qla_hw_data *ha)
 {
-	if (IS_QLA24XX_TYPE(ha) || IS_QLA25XX(ha)) {
-		/* Enable target response to SCSI bus. */
-		if (qla_tgt_mode_enabled(vha))
-			qla_tgt_2xxx_send_enable_lun(vha, true);
-		else if (qla_ini_mode_enabled(vha))
-			qla_tgt_2xxx_send_enable_lun(vha, false);
-	}
+	/* Enable target response to SCSI bus. */
+	if (qla_tgt_mode_enabled(vha))
+		qla_tgt_2xxx_send_enable_lun(vha, true);
+	else if (qla_ini_mode_enabled(vha))
+		qla_tgt_2xxx_send_enable_lun(vha, false);
 }
 
 /*
diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index b4a6e7b..9ba2173 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -1067,7 +1067,8 @@ static inline void qla_reverse_ini_mode(struct scsi_qla_host *ha)
 
 /*
  * qla_tgt_2xxx_send_enable_lun
- *	Issue enable or disable LUN entry IOCB to the ISP.
+ *	Issue enable or disable LUN entry IOCB to ISP 2xxx.
+ *	NOTE: This IOCB is not available, and so not issued to ISPs >=24xx.
  *
  * Input:
  *	ha = adapter block pointer.
@@ -1079,9 +1080,6 @@ static inline void
 __qla_tgt_2xxx_send_enable_lun(struct scsi_qla_host *vha, int enable)
 {
 	elun_entry_t *pkt;
-	struct qla_hw_data *ha = vha->hw;
-
-	BUG_ON(IS_FWI2_CAPABLE(ha));
 
 	pkt = (elun_entry_t *)qla2x00_alloc_iocbs(vha, 0);
 	if (pkt != NULL) {
@@ -1101,10 +1099,8 @@ __qla_tgt_2xxx_send_enable_lun(struct scsi_qla_host *vha, int enable)
 
 	} else
 		qla_tgt_clear_mode(vha);
-#if defined(QL_DEBUG_LEVEL_2) || defined(QL_DEBUG_LEVEL_3)
 	if (!pkt)
-		printk(KERN_ERR "%s: **** FAILED ****\n", __func__);
-#endif
+		printk (KERN_ERR "%s: **** FAILED ****\n", __func__);
 
 	return;
 }
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux