All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2]  qla2xxx: important fixes for 2.6.15.
@ 2005-12-06 18:55 Andrew Vasquez
  2005-12-06 18:57 ` [PATCH 1/2] qla2xxx: Correct mis-handling of AENs Andrew Vasquez
  2005-12-06 18:58 ` [PATCH 2/2] qla2xxx: Correct short-WRITE status handling Andrew Vasquez
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Vasquez @ 2005-12-06 18:55 UTC (permalink / raw)
  To: James Bottomley; +Cc: Linux-SCSI Mailing List, Andrew Morton

James,

Please queue these final bug-fixes for inclusion into 2.6.15:

- Correct mis-handling of AENs.
- Correct short-WRITE status handling.

Thanks,
Andrew Vasquez

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

* [PATCH 1/2]  qla2xxx: Correct mis-handling of AENs.
  2005-12-06 18:55 [PATCH 0/2] qla2xxx: important fixes for 2.6.15 Andrew Vasquez
@ 2005-12-06 18:57 ` Andrew Vasquez
  2005-12-06 18:58 ` [PATCH 2/2] qla2xxx: Correct short-WRITE status handling Andrew Vasquez
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Vasquez @ 2005-12-06 18:57 UTC (permalink / raw)
  To: James Bottomley; +Cc: Linux-SCSI Mailing List, Andrew Morton

A regression in a recent change
33135aa2a568ec1a30e734f18e5315e10516e4f3 caused the driver
to mistakenly drop handling of AENs.  Due to the incorrect
handling, ports would not reappear after RSCNs and LIPs.

Drops unused/incorrect compound #define from qla_def.h.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>

---

 drivers/scsi/qla2xxx/qla_def.h  |   10 +---------
 drivers/scsi/qla2xxx/qla_init.c |    6 +++---
 2 files changed, 4 insertions(+), 12 deletions(-)

eb897bf0f1298b29f039010b73c3db6e4e621380
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 7096945..7b3efd5 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2476,17 +2476,9 @@ typedef struct scsi_qla_host {
  */
 #define LOOP_TRANSITION(ha) \
 	(test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
-	 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
-
-#define LOOP_NOT_READY(ha) \
-	((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
-	  test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || \
-	  test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
-	  test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \
+	 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
 	 atomic_read(&ha->loop_state) == LOOP_DOWN)
 
-#define LOOP_RDY(ha)	(!LOOP_NOT_READY(ha))
-
 #define TGT_Q(ha, t) (ha->otgt[t])
 
 #define to_qla_host(x)		((scsi_qla_host_t *) (x)->hostdata)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 2d72012..c46d246 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1259,7 +1259,7 @@ qla2x00_configure_hba(scsi_qla_host_t *h
 	rval = qla2x00_get_adapter_id(ha,
 	    &loop_id, &al_pa, &area, &domain, &topo);
 	if (rval != QLA_SUCCESS) {
-		if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) ||
+		if (LOOP_TRANSITION(ha) || atomic_read(&ha->loop_down_timer) ||
 		    (rval == QLA_COMMAND_ERROR && loop_id == 0x7)) {
 			DEBUG2(printk("%s(%ld) Loop is in a transition state\n",
 			    __func__, ha->host_no));
@@ -1796,7 +1796,7 @@ qla2x00_configure_loop(scsi_qla_host_t *
 	}
 
 	if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) {
-		if (LOOP_NOT_READY(ha)) {
+		if (LOOP_TRANSITION(ha)) {
 			rval = QLA_FUNCTION_FAILED;
 		} else {
 			rval = qla2x00_configure_fabric(ha);
@@ -2369,7 +2369,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho
 		if (qla2x00_is_reserved_id(ha, loop_id))
 			continue;
 
-		if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha))
+		if (atomic_read(&ha->loop_down_timer) || LOOP_TRANSITION(ha))
 			break;
 
 		if (swl != NULL) {
-- 
0.99.9.GIT

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

* [PATCH 2/2]  qla2xxx: Correct short-WRITE status handling.
  2005-12-06 18:55 [PATCH 0/2] qla2xxx: important fixes for 2.6.15 Andrew Vasquez
  2005-12-06 18:57 ` [PATCH 1/2] qla2xxx: Correct mis-handling of AENs Andrew Vasquez
@ 2005-12-06 18:58 ` Andrew Vasquez
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Vasquez @ 2005-12-06 18:58 UTC (permalink / raw)
  To: James Bottomley; +Cc: Linux-SCSI Mailing List, Andrew Morton

Properly check FC_RESID for any non-transfered bytes
regardless of firmware completion status.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>

---

 drivers/scsi/qla2xxx/qla_isr.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

cbf1620234849d5f2adc85e893f84877cd2e5296
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 09afc0f..5181d96 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -909,6 +909,21 @@ qla2x00_status_entry(scsi_qla_host_t *ha
 			resid = resid_len;
 			cp->resid = resid;
 			CMD_RESID_LEN(cp) = resid;
+
+			if (!lscsi_status &&
+			    ((unsigned)(cp->request_bufflen - resid) <
+			     cp->underflow)) {
+				qla_printk(KERN_INFO, ha,
+				    "scsi(%ld:%d:%d:%d): Mid-layer underflow "
+				    "detected (%x of %x bytes)...returning "
+				    "error status.\n", ha->host_no,
+				    cp->device->channel, cp->device->id,
+				    cp->device->lun, resid,
+				    cp->request_bufflen);
+
+				cp->result = DID_ERROR << 16;
+				break;
+			}
 		}
 		cp->result = DID_OK << 16 | lscsi_status;
 
-- 
0.99.9.GIT

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

end of thread, other threads:[~2005-12-06 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 18:55 [PATCH 0/2] qla2xxx: important fixes for 2.6.15 Andrew Vasquez
2005-12-06 18:57 ` [PATCH 1/2] qla2xxx: Correct mis-handling of AENs Andrew Vasquez
2005-12-06 18:58 ` [PATCH 2/2] qla2xxx: Correct short-WRITE status handling Andrew Vasquez

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.