All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] qla2xxx: Patches for 3.3-rc.
@ 2012-02-09 19:14 Chad Dupuis
  2012-02-09 19:14 ` [PATCH 01/11] qla2xxx: Propagate up abort failures Chad Dupuis
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

Hi James,

Please apply the following patches for 3.3-rc.

Thanks,
Chad

Andrew Vasquez (4):
  qla2xxx: Add an "is reset active" helper.
  qla2xxx: Clear options-flags while issuing stop-firmware mbx command.
  qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB
    processing.
  qla2xxx: Correct out of bounds read of ISP2200 mailbox registers.

Arun Easi (1):
  qla2xxx: Propagate up abort failures.

Chad Dupuis (2):
  qla2xxx: Add check for null fcport references in
    qla2xxx_queuecommand.
  qla2xxx: Update version number to 8.03.07.13-k.

Giridhar Malavali (2):
  qla2xxx: Complete mailbox command timedout to avoid initialization
    failures during next reset cycle.
  qla2xxx: Proper detection of firmware abort error code for ISP82xx.

Michael Christie (1):
  qla2xxx: Remove check for null fcport from host reset handler.

Shyam Sundar (1):
  qla2xxx: Remove resetting memory during device initialization for
    ISP82xx.

 drivers/scsi/qla2xxx/qla_attr.c    |   13 +++------
 drivers/scsi/qla2xxx/qla_bsg.c     |   50 ++++++-----------------------------
 drivers/scsi/qla2xxx/qla_dbg.c     |    3 +-
 drivers/scsi/qla2xxx/qla_def.h     |    1 +
 drivers/scsi/qla2xxx/qla_inline.h  |   13 +++++++++
 drivers/scsi/qla2xxx/qla_isr.c     |    1 -
 drivers/scsi/qla2xxx/qla_mbx.c     |    7 ++++-
 drivers/scsi/qla2xxx/qla_nx.c      |   15 +----------
 drivers/scsi/qla2xxx/qla_os.c      |   19 ++++++--------
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 10 files changed, 45 insertions(+), 79 deletions(-)



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 01/11] qla2xxx: Propagate up abort failures.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 02/11] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand Chad Dupuis
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Arun Easi <arun.easi@qlogic.com>

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 4ed1e4a..b4b185c 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -877,6 +877,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
 
 	spin_unlock_irqrestore(&ha->hardware_lock, flags);
 	if (ha->isp_ops->abort_command(sp)) {
+		ret = FAILED;
 		ql_dbg(ql_dbg_taskm, vha, 0x8003,
 		    "Abort command mbx failed cmd=%p.\n", cmd);
 	} else {
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 02/11] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
  2012-02-09 19:14 ` [PATCH 01/11] qla2xxx: Propagate up abort failures Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 03/11] qla2xxx: Add an "is reset active" helper Chad Dupuis
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index b4b185c..5fd89d7 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -625,6 +625,12 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
 			cmd->result = DID_NO_CONNECT << 16;
 			goto qc24_fail_command;
 	}
+
+	if (!fcport) {
+		cmd->result = DID_NO_CONNECT << 16;
+		goto qc24_fail_command;
+	}
+
 	if (atomic_read(&fcport->state) != FCS_ONLINE) {
 		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
 			atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 03/11] qla2xxx: Add an "is reset active" helper.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
  2012-02-09 19:14 ` [PATCH 01/11] qla2xxx: Propagate up abort failures Chad Dupuis
  2012-02-09 19:14 ` [PATCH 02/11] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 04/11] qla2xxx: Clear options-flags while issuing stop-firmware mbx command Chad Dupuis
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

Many locations within the driver would use an inconsistent set of
checks to determine ISP-reset state.  Consolidate the checks into
this inline-helper.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c   |   13 +++------
 drivers/scsi/qla2xxx/qla_bsg.c    |   50 ++++++------------------------------
 drivers/scsi/qla2xxx/qla_dbg.c    |    3 +-
 drivers/scsi/qla2xxx/qla_inline.h |   13 +++++++++
 4 files changed, 28 insertions(+), 51 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index a2f1b30..9f41b3b 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1036,8 +1036,7 @@ qla2x00_link_state_show(struct device *dev, struct device_attribute *attr,
 	    vha->device_flags & DFLG_NO_CABLE)
 		len = snprintf(buf, PAGE_SIZE, "Link Down\n");
 	else if (atomic_read(&vha->loop_state) != LOOP_READY ||
-	    test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-	    test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags))
+	    qla2x00_reset_active(vha))
 		len = snprintf(buf, PAGE_SIZE, "Unknown Link State\n");
 	else {
 		len = snprintf(buf, PAGE_SIZE, "Link Up - ");
@@ -1359,8 +1358,7 @@ qla2x00_thermal_temp_show(struct device *dev,
 		return snprintf(buf, PAGE_SIZE, "\n");
 
 	temp = frac = 0;
-	if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-	    test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags))
+	if (qla2x00_reset_active(vha))
 		ql_log(ql_log_warn, vha, 0x707b,
 		    "ISP reset active.\n");
 	else if (!vha->hw->flags.eeh_busy)
@@ -1379,8 +1377,7 @@ qla2x00_fw_state_show(struct device *dev, struct device_attribute *attr,
 	int rval = QLA_FUNCTION_FAILED;
 	uint16_t state[5];
 
-	if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags))
+	if (qla2x00_reset_active(vha))
 		ql_log(ql_log_warn, vha, 0x707c,
 		    "ISP reset active.\n");
 	else if (!vha->hw->flags.eeh_busy)
@@ -1693,9 +1690,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost)
 	if (IS_FWI2_CAPABLE(ha)) {
 		rval = qla24xx_get_isp_stats(base_vha, stats, stats_dma);
 	} else if (atomic_read(&base_vha->loop_state) == LOOP_READY &&
-		    !test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) &&
-		    !test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) &&
-		    !ha->dpc_active) {
+	    !qla2x00_reset_active(vha) && !ha->dpc_active) {
 		/* Must be in a 'READY' state for statistics retrieval. */
 		rval = qla2x00_get_link_status(base_vha, base_vha->loop_id,
 						stats, stats_dma);
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index b1d0f93..1682e2e 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -108,13 +108,6 @@ qla24xx_proc_fcp_prio_cfg_cmd(struct fc_bsg_job *bsg_job)
 		goto exit_fcp_prio_cfg;
 	}
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-		test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
-		ret = -EBUSY;
-		goto exit_fcp_prio_cfg;
-	}
-
 	/* Get the sub command */
 	oper = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
 
@@ -646,13 +639,6 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
 	dma_addr_t rsp_data_dma;
 	uint32_t rsp_data_len;
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-		test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
-		ql_log(ql_log_warn, vha, 0x7018, "Abort active or needed.\n");
-		return -EBUSY;
-	}
-
 	if (!vha->flags.online) {
 		ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n");
 		return -EIO;
@@ -874,13 +860,6 @@ qla84xx_reset(struct fc_bsg_job *bsg_job)
 	int rval = 0;
 	uint32_t flag;
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-	    test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-	    test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
-		ql_log(ql_log_warn, vha, 0x702e, "Abort active or needed.\n");
-		return -EBUSY;
-	}
-
 	if (!IS_QLA84XX(ha)) {
 		ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n");
 		return -EINVAL;
@@ -922,11 +901,6 @@ qla84xx_updatefw(struct fc_bsg_job *bsg_job)
 	uint32_t flag;
 	uint32_t fw_ver;
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-		test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_RETRY, &vha->dpc_flags))
-		return -EBUSY;
-
 	if (!IS_QLA84XX(ha)) {
 		ql_dbg(ql_dbg_user, vha, 0x7032,
 		    "Not 84xx, exiting.\n");
@@ -1036,14 +1010,6 @@ qla84xx_mgmt_cmd(struct fc_bsg_job *bsg_job)
 	uint32_t data_len = 0;
 	uint32_t dma_direction = DMA_NONE;
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-		test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
-		ql_log(ql_log_warn, vha, 0x7039,
-		    "Abort active or needed.\n");
-		return -EBUSY;
-	}
-
 	if (!IS_QLA84XX(ha)) {
 		ql_log(ql_log_warn, vha, 0x703a,
 		    "Not 84xx, exiting.\n");
@@ -1246,13 +1212,6 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job)
 
 	bsg_job->reply->reply_payload_rcv_len = 0;
 
-	if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
-		test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
-		test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
-		ql_log(ql_log_warn, vha, 0x7045, "abort active or needed.\n");
-		return -EBUSY;
-	}
-
 	if (!IS_IIDMA_CAPABLE(vha->hw)) {
 		ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n");
 		return -EINVAL;
@@ -1668,6 +1627,15 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
 		vha = shost_priv(host);
 	}
 
+	if (qla2x00_reset_active(vha)) {
+		ql_dbg(ql_dbg_user, vha, 0x709f,
+		    "BSG: ISP abort active/needed -- cmd=%d.\n",
+		    bsg_job->request->msgcode);
+		bsg_job->reply->result = (DID_ERROR << 16);
+		bsg_job->job_done(bsg_job);
+		return -EBUSY;
+	}
+
 	ql_dbg(ql_dbg_user, vha, 0x7000,
 	    "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode);
 
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 7c54624..45cbf0b 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -19,7 +19,8 @@
  * | DPC Thread                   |       0x401c       |		|
  * | Async Events                 |       0x5057       | 0x5052		|
  * | Timer Routines               |       0x6011       | 0x600e,0x600f  |
- * | User Space Interactions      |       0x709e       |		|
+ * | User Space Interactions      |       0x709e       | 0x7018,0x702e  |
+ * |                              |                    | 0x7039,0x7045  |
  * | Task Management              |       0x803c       | 0x8025-0x8026  |
  * |                              |                    | 0x800b,0x8039  |
  * | AER/EEH                      |       0x900f       |		|
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index 9902834..7cc4f36 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -131,3 +131,16 @@ qla2x00_hba_err_chk_enabled(srb_t *sp)
 	}
 	return 0;
 }
+
+static inline int
+qla2x00_reset_active(scsi_qla_host_t *vha)
+{
+	scsi_qla_host_t *base_vha = pci_get_drvdata(vha->hw->pdev);
+
+	/* Test appropriate base-vha and vha flags. */
+	return test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags) ||
+	    test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) ||
+	    test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) ||
+	    test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
+	    test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
+}
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 04/11] qla2xxx: Clear options-flags while issuing stop-firmware mbx command.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (2 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 03/11] qla2xxx: Add an "is reset active" helper Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 05/11] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing Chad Dupuis
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

Not clearing the options flags in mbx1 could lead the firmware
into interpreting old data in mbx1 through mbx8.  This could
lead to inadvertent DMA read/write operations to stale memory.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 34344d3..8635722 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2581,7 +2581,8 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha)
 	ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__);
 
 	mcp->mb[0] = MBC_STOP_FIRMWARE;
-	mcp->out_mb = MBX_0;
+	mcp->mb[1] = 0;
+	mcp->out_mb = MBX_1|MBX_0;
 	mcp->in_mb = MBX_0;
 	mcp->tov = 5;
 	mcp->flags = 0;
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 05/11] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (3 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 04/11] qla2xxx: Clear options-flags while issuing stop-firmware mbx command Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 06/11] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers Chad Dupuis
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

This can cause instability in mailbox command state machine handling.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index e804585..349843e 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -2090,7 +2090,6 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
 			break;
                 case CT_IOCB_TYPE:
 			qla24xx_els_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE);
-			clear_bit(MBX_INTERRUPT, &vha->hw->mbx_cmd_flags);
 			break;
                 case ELS_IOCB_TYPE:
 			qla24xx_els_ct_entry(vha, rsp->req, pkt, ELS_IOCB_TYPE);
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 06/11] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (4 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 05/11] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 07/11] qla2xxx: Remove check for null fcport from host reset handler Chad Dupuis
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

ISP2200 adapters only have 24 mailbox registers so read only that many.

Reported-by: Olatunji Ruwase <oor@cs.cmu.edu>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_def.h |    1 +
 drivers/scsi/qla2xxx/qla_os.c  |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index a6a4eeb..af1003f 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -44,6 +44,7 @@
  * ISP2100 HBAs.
  */
 #define MAILBOX_REGISTER_COUNT_2100	8
+#define MAILBOX_REGISTER_COUNT_2200	24
 #define MAILBOX_REGISTER_COUNT		32
 
 #define QLA2200A_RISC_ROM_VER	4
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 5fd89d7..7e617a6 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2054,7 +2054,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		ha->nvram_data_off = ~0;
 		ha->isp_ops = &qla2100_isp_ops;
 	} else if (IS_QLA2200(ha)) {
-		ha->mbx_count = MAILBOX_REGISTER_COUNT;
+		ha->mbx_count = MAILBOX_REGISTER_COUNT_2200;
 		req_length = REQUEST_ENTRY_CNT_2200;
 		rsp_length = RESPONSE_ENTRY_CNT_2100;
 		ha->max_loop_id = SNS_LAST_LOOP_ID_2100;
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 07/11] qla2xxx: Remove check for null fcport from host reset handler.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (5 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 06/11] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 08/11] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle Chad Dupuis
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Michael Christie <mchristi@redhat.com>

Remove the check for a NULL fcport so that the host reset will run
unconditionally to unwedge any commands before the device is offlined and to
prevent a quick runthrough of the SCSI error handling.

Signed-off-by: Michael Christie <mchristi@redhat.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 7e617a6..036030c 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1131,7 +1131,6 @@ static int
 qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
 {
 	scsi_qla_host_t *vha = shost_priv(cmd->device->host);
-	fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
 	struct qla_hw_data *ha = vha->hw;
 	int ret = FAILED;
 	unsigned int id, lun;
@@ -1140,15 +1139,6 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
 	id = cmd->device->id;
 	lun = cmd->device->lun;
 
-	if (!fcport) {
-		return ret;
-	}
-
-	ret = fc_block_scsi_eh(cmd);
-	if (ret != 0)
-		return ret;
-	ret = FAILED;
-
 	ql_log(ql_log_info, vha, 0x8018,
 	    "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun);
 
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 08/11] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (6 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 07/11] qla2xxx: Remove check for null fcport from host reset handler Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 09/11] qla2xxx: Remove resetting memory during device initialization for ISP82xx Chad Dupuis
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Giridhar Malavali <giridhar.malavali@qlogic.com>

Complete the mailbox command timed out before initiating another abort cycle
to recover so that mailbox commands issued during next reset cycle don't fail
due to pending mailbox access timeout.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 8635722..08f1d01 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -342,6 +342,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 
 				set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
 				clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
+				/* Allow next mbx cmd to come in. */
+				complete(&ha->mbx_cmd_comp);
 				if (ha->isp_ops->abort_isp(vha)) {
 					/* Failed. retry later. */
 					set_bit(ISP_ABORT_NEEDED,
@@ -350,6 +352,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 				clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
 				ql_dbg(ql_dbg_mbx, base_vha, 0x101f,
 				    "Finished abort_isp.\n");
+				goto mbx_done;
 			}
 		}
 	}
@@ -358,6 +361,7 @@ premature_exit:
 	/* Allow next mbx cmd to come in. */
 	complete(&ha->mbx_cmd_comp);
 
+mbx_done:
 	if (rval) {
 		ql_dbg(ql_dbg_mbx, base_vha, 0x1020,
 		    "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, cmd=%x ****.\n",
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 09/11] qla2xxx: Remove resetting memory during device initialization for ISP82xx.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (7 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 08/11] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 10/11] qla2xxx: Proper detection of firmware abort error code " Chad Dupuis
  2012-02-09 19:14 ` [PATCH 11/11] qla2xxx: Update version number to 8.03.07.13-k Chad Dupuis
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Shyam Sundar <shyam.sundar@qlogic.com>

With IOs running and PegHalt testing the system reboots when memory reset is
performed during device initialization.

Signed-off-by: Shyam Sundar <shyam.sundar@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_nx.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 1cd46cd..bb06c20 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1165,19 +1165,6 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
 		qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xfeffffff);
 	else
 		qla82xx_wr_32(ha, QLA82XX_ROMUSB_GLB_SW_RESET, 0xffffffff);
-
-	/* reset ms */
-	val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4);
-	val |= (1 << 1);
-	qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val);
-	msleep(20);
-
-	/* unreset ms */
-	val = qla82xx_rd_32(ha, QLA82XX_CRB_QDR_NET + 0xe4);
-	val &= ~(1 << 1);
-	qla82xx_wr_32(ha, QLA82XX_CRB_QDR_NET + 0xe4, val);
-	msleep(20);
-
 	qla82xx_rom_unlock(ha);
 
 	/* Read the signature value from the flash.
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 10/11] qla2xxx: Proper detection of firmware abort error code for ISP82xx.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (8 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 09/11] qla2xxx: Remove resetting memory during device initialization for ISP82xx Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  2012-02-09 19:14 ` [PATCH 11/11] qla2xxx: Update version number to 8.03.07.13-k Chad Dupuis
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

From: Giridhar Malavali <giridhar.malavali@qlogic.com>

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_nx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index bb06c20..270ba31 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3379,7 +3379,7 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
 					    QLA82XX_CRB_PEG_NET_3 + 0x3c),
 				    qla82xx_rd_32(ha,
 					    QLA82XX_CRB_PEG_NET_4 + 0x3c));
-				if (LSW(MSB(halt_status)) == 0x67)
+				if (((halt_status & 0x1fffff00) >> 8) == 0x67)
 					ql_log(ql_log_warn, vha, 0xb052,
 					    "Firmware aborted with "
 					    "error code 0x00006700. Device is "
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 11/11] qla2xxx: Update version number to 8.03.07.13-k.
  2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
                   ` (9 preceding siblings ...)
  2012-02-09 19:14 ` [PATCH 10/11] qla2xxx: Proper detection of firmware abort error code " Chad Dupuis
@ 2012-02-09 19:14 ` Chad Dupuis
  10 siblings, 0 replies; 12+ messages in thread
From: Chad Dupuis @ 2012-02-09 19:14 UTC (permalink / raw)
  To: jbottomley; +Cc: giridhar.malavali, chad.dupuis, andrew.vasquez, linux-scsi

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index 23f33a6..29d780c 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,7 +7,7 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.03.07.12-k"
+#define QLA2XXX_VERSION      "8.03.07.13-k"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3
-- 
1.6.0.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-02-09 19:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 19:14 [PATCH 00/11] qla2xxx: Patches for 3.3-rc Chad Dupuis
2012-02-09 19:14 ` [PATCH 01/11] qla2xxx: Propagate up abort failures Chad Dupuis
2012-02-09 19:14 ` [PATCH 02/11] qla2xxx: Add check for null fcport references in qla2xxx_queuecommand Chad Dupuis
2012-02-09 19:14 ` [PATCH 03/11] qla2xxx: Add an "is reset active" helper Chad Dupuis
2012-02-09 19:14 ` [PATCH 04/11] qla2xxx: Clear options-flags while issuing stop-firmware mbx command Chad Dupuis
2012-02-09 19:14 ` [PATCH 05/11] qla2xxx: Remove errant clearing of MBX_INTERRUPT flag during CT-IOCB processing Chad Dupuis
2012-02-09 19:14 ` [PATCH 06/11] qla2xxx: Correct out of bounds read of ISP2200 mailbox registers Chad Dupuis
2012-02-09 19:14 ` [PATCH 07/11] qla2xxx: Remove check for null fcport from host reset handler Chad Dupuis
2012-02-09 19:14 ` [PATCH 08/11] qla2xxx: Complete mailbox command timedout to avoid initialization failures during next reset cycle Chad Dupuis
2012-02-09 19:14 ` [PATCH 09/11] qla2xxx: Remove resetting memory during device initialization for ISP82xx Chad Dupuis
2012-02-09 19:14 ` [PATCH 10/11] qla2xxx: Proper detection of firmware abort error code " Chad Dupuis
2012-02-09 19:14 ` [PATCH 11/11] qla2xxx: Update version number to 8.03.07.13-k Chad Dupuis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.