public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7]
@ 2009-07-29 18:03 giridhar.malavali
  2009-07-29 18:03 ` [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status giridhar.malavali
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

Please apply...

Andrew Vasquez (3):
  qla2xxx: Correctly handle 'global port-unavailable' AEN.
  qla2xxx: Fix endian issues on PPC platfrom for NPIV.
  qla2xxx: ISP21xx/22xx do not support FDMI registrations.  (fixed)

Anirban Chakraborty (2):
  qla2xxx: Fix to ensure driver works in sinlge queue mode if
    multiqueue fails.
  qla2xxx: Fix a bug that clears the interrupt status register for the
    base queue

Giridhar Malavali (3):
  qla2xxx: Update version number to 8.03.01-k5
  qla2xxx: Update version number to 8.03.01-k6
  qla2xxx: Update version number to 8.03.01-k7

Lalit Chandivade (1):
  qla2xxx: Process DPC requests within valid Fabric topologies.

Ravi Anand (1):
  qla2xxx: Modified the driver to pass the residaul UNDERRUN status

Santosh Vernekar (3):
  qla2xxx: Skip RSCN processing if the event is global and vp_idx index
  qla2xxx: Mark all devices as lost when fc port is marked
  qla2xxx: Handle RSCN's per master/slave vn-port basis.

Shyam Sundar (1):
  qla2xxx: Corrected one of the IOCB structure to be 64 bytes size

 drivers/scsi/qla2xxx/qla_attr.c    |    4 +-
 drivers/scsi/qla2xxx/qla_def.h     |    1 +
 drivers/scsi/qla2xxx/qla_fw.h      |    2 +-
 drivers/scsi/qla2xxx/qla_gs.c      |    4 ++
 drivers/scsi/qla2xxx/qla_init.c    |    5 +--
 drivers/scsi/qla2xxx/qla_iocb.c    |    2 +-
 drivers/scsi/qla2xxx/qla_isr.c     |   55 +++++++++++++++++++++++++++++++++--
 drivers/scsi/qla2xxx/qla_mbx.c     |    7 ++--
 drivers/scsi/qla2xxx/qla_mid.c     |    3 ++
 drivers/scsi/qla2xxx/qla_os.c      |   21 +++++++++++--
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 11 files changed, 87 insertions(+), 19 deletions(-)


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

* [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 19:07   ` James Bottomley
  2009-07-29 18:03 ` [PATCH 02/14] qla2xxx: Correctly handle 'global port-unavailable' AEN giridhar.malavali
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Ravi Anand

From: Ravi Anand <ravi.anand@qlogic.com>

to application for vendor specific commands.

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

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 245e7af..f966d54 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1223,6 +1223,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
 					cp->device->id, cp->device->lun, resid,
 					scsi_bufflen(cp)));
 
+				scsi_set_resid(cp, resid);
 				cp->result = DID_ERROR << 16;
 				break;
 			}
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 02/14] qla2xxx: Correctly handle 'global port-unavailable' AEN.
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
  2009-07-29 18:03 ` [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 03/14] qla2xxx: Skip RSCN processing if the event is global and vp_idx index giridhar.malavali
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

Treat a global port-unavailable PORT_UPDATE (8014h) AEN as a
loop-down event.  For this case, within the FCoE domain, the
'logical' interface has been terminated, but the driver will
not receive the classic LOOP_DOWN AEN.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index f966d54..417a9b9 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -599,8 +599,36 @@ skip_rio:
 
 	case MBA_PORT_UPDATE:		/* Port database update */
 		/* Only handle SCNs for our Vport index. */
-		if (vha->vp_idx && vha->vp_idx != (mb[3] & 0xff))
+		if (mb[1] != 0xffff &&
+		    vha->vp_idx && vha->vp_idx != (mb[3] & 0xff))
+			break;
+
+		/* Global event -- port logout or port unavailable. */
+		if (mb[1] == 0xffff && mb[2] == 0x7) {
+			DEBUG2(printk("scsi(%ld): Asynchronous PORT UPDATE.\n",
+			    vha->host_no));
+			DEBUG(printk(KERN_INFO
+			    "scsi(%ld): Port unavailable %04x %04x %04x.\n",
+			    vha->host_no, mb[1], mb[2], mb[3]));
+
+			if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
+				atomic_set(&vha->loop_state, LOOP_DOWN);
+				atomic_set(&vha->loop_down_timer,
+				    LOOP_DOWN_TIME);
+				vha->device_flags |= DFLG_NO_CABLE;
+				qla2x00_mark_all_devices_lost(vha, 1);
+			}
+
+			if (vha->vp_idx) {
+				atomic_set(&vha->vp_state, VP_FAILED);
+				fc_vport_set_state(vha->fc_vport,
+				    FC_VPORT_FAILED);
+			}
+
+			vha->flags.management_server_logged_in = 0;
+			ha->link_data_rate = PORT_SPEED_UNKNOWN;
 			break;
+		}
 
 		/*
 		 * If PORT UPDATE is global (received LIP_OCCURRED/LIP_RESET
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 03/14] qla2xxx: Skip RSCN processing if the event is global and vp_idx index
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
  2009-07-29 18:03 ` [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status giridhar.malavali
  2009-07-29 18:03 ` [PATCH 02/14] qla2xxx: Correctly handle 'global port-unavailable' AEN giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 04/14] qla2xxx: Mark all devices as lost when fc port is marked giridhar.malavali
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Santosh Vernekar

From: Santosh Vernekar <santosh.vernekar@qlogic.com>

obtained does not belong to us.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 417a9b9..00f23d2 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -598,10 +598,26 @@ skip_rio:
 		break;
 
 	case MBA_PORT_UPDATE:		/* Port database update */
-		/* Only handle SCNs for our Vport index. */
-		if (mb[1] != 0xffff &&
-		    vha->vp_idx && vha->vp_idx != (mb[3] & 0xff))
-			break;
+		/*
+		 * Handle only global and vn-port update events
+		 *
+		 * Relevant inputs:
+		 * mb[1] = N_Port handle of changed port
+		 * OR 0xffff for global event
+		 * mb[2] = New login state
+		 * 7 = Port logged out
+		 * mb[3] = LSB is vp_idx, 0xff = all vps
+		 *
+		 * Skip processing if:
+		 *       Event is global, vp_idx is NOT all vps,
+		 *           vp_idx does not match
+		 *       Event is not global, vp_idx does not match
+		 */
+		if ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff)
+			|| (mb[1] != 0xffff)) {
+			if (vha->vp_idx != (mb[3] & 0xff))
+				break;
+		}
 
 		/* Global event -- port logout or port unavailable. */
 		if (mb[1] == 0xffff && mb[2] == 0x7) {
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 04/14] qla2xxx: Mark all devices as lost when fc port is marked
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (2 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 03/14] qla2xxx: Skip RSCN processing if the event is global and vp_idx index giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 05/14] qla2xxx: Process DPC requests within valid Fabric topologies giridhar.malavali
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Santosh Vernekar

From: Santosh Vernekar <santosh.vernekar@qlogic.com>

lost.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 00f23d2..63e7cdc 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -639,6 +639,7 @@ skip_rio:
 				atomic_set(&vha->vp_state, VP_FAILED);
 				fc_vport_set_state(vha->fc_vport,
 				    FC_VPORT_FAILED);
+				qla2x00_mark_all_devices_lost(vha, 1);
 			}
 
 			vha->flags.management_server_logged_in = 0;
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 05/14] qla2xxx: Process DPC requests within valid Fabric topologies.
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (3 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 04/14] qla2xxx: Mark all devices as lost when fc port is marked giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 06/14] qla2xxx: Fix endian issues on PPC platfrom for NPIV giridhar.malavali
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Lalit Chandivade

From: Lalit Chandivade <lalit.chandivade@qlogic.com>

If vports are created and topology is changed to Loop only, the
driver continuously gets a LIP reset occurred and keeps trying to
enable the vport.  Only manage requests during F_Port.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_mid.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index cd78c50..6238be3 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -250,6 +250,9 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha)
 	struct qla_hw_data *ha = vha->hw;
 	scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
 
+	if (!(ha->current_topology & ISP_CFG_F))
+		return 0;
+
 	if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) {
 		/* VP acquired. complete port configuration */
 		if (atomic_read(&base_vha->loop_state) == LOOP_READY) {
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 06/14] qla2xxx: Fix endian issues on PPC platfrom for NPIV.
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (4 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 05/14] qla2xxx: Process DPC requests within valid Fabric topologies giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 07/14] qla2xxx: Handle RSCN's per master/slave vn-port basis giridhar.malavali
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

VP IDX need to be converted to proper endian for NPIV
to work on PPC platforms.

Signed-off-by: Giridhar Malavali <giridhar.malavali@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 fe69f30..8fcd99e 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2746,7 +2746,8 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha,
 	if (rptid_entry->format == 0) {
 		DEBUG15(printk("%s:format 0 : scsi(%ld) number of VPs setup %d,"
 			" number of VPs acquired %d\n", __func__, vha->host_no,
-			MSB(rptid_entry->vp_count), LSB(rptid_entry->vp_count)));
+			MSB(le16_to_cpu(rptid_entry->vp_count)),
+			LSB(le16_to_cpu(rptid_entry->vp_count))));
 		DEBUG15(printk("%s primary port id %02x%02x%02x\n", __func__,
 			rptid_entry->port_id[2], rptid_entry->port_id[1],
 			rptid_entry->port_id[0]));
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 07/14] qla2xxx: Handle RSCN's per master/slave vn-port basis.
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (5 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 06/14] qla2xxx: Fix endian issues on PPC platfrom for NPIV giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 08/14] qla2xxx: Corrected one of the IOCB structure to be 64 bytes size giridhar.malavali
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Santosh Vernekar

From: Santosh Vernekar <santosh.vernekar@qlogic.com>

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

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 63e7cdc..40014f3 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -685,7 +685,7 @@ skip_rio:
 		if (vha->vp_idx && test_bit(VP_SCR_NEEDED, &vha->vp_flags))
 			break;
 		/* Only handle SCNs for our Vport index. */
-		if (vha->vp_idx && vha->vp_idx != (mb[3] & 0xff))
+		if (vha->vp_idx != (mb[3] & 0xff))
 			break;
 		DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n",
 		    vha->host_no));
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 08/14] qla2xxx: Corrected one of the IOCB structure to be 64 bytes size
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (6 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 07/14] qla2xxx: Handle RSCN's per master/slave vn-port basis giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 09/14] qla2xxx: Update version number to 8.03.01-k5 giridhar.malavali
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi, Shyam Sundar

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

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

diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index dfde2dd..66a8da5 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -1126,7 +1126,7 @@ struct vp_config_entry_24xx {
 	uint16_t id;
 	uint16_t reserved_4;
 	uint16_t hopct;
-	uint8_t reserved_5;
+	uint8_t reserved_5[2];
 };
 
 #define VP_RPT_ID_IOCB_TYPE	0x32	/* Report ID Acquisition entry. */
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 09/14] qla2xxx: Update version number to 8.03.01-k5
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (7 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 08/14] qla2xxx: Corrected one of the IOCB structure to be 64 bytes size giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:03 ` [PATCH 10/14] qla2xxx: Fix to ensure driver works in sinlge queue mode if multiqueue fails giridhar.malavali
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

Signed-off-by: Giridhar Malavali <giridhar.malavali@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 8436970..87a884e 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.01-k4"
+#define QLA2XXX_VERSION      "8.03.01-k5"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 10/14] qla2xxx: Fix to ensure driver works in sinlge queue mode if multiqueue fails.
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (8 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 09/14] qla2xxx: Update version number to 8.03.01-k5 giridhar.malavali
@ 2009-07-29 18:03 ` giridhar.malavali
  2009-07-29 18:04 ` [PATCH 11/14] qla2xxx: Fix a bug that clears the interrupt status register for the base queue giridhar.malavali
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:03 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi,
	Anirban Chakraborty

From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>

When the multiqueue mode fails to work, the driver falls back on single
queue mode. This ensures that the firmware is reinitialized with single
queue options and all the resources are readjusted accordingly.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c |    4 ++--
 drivers/scsi/qla2xxx/qla_def.h  |    1 +
 drivers/scsi/qla2xxx/qla_init.c |    5 ++---
 drivers/scsi/qla2xxx/qla_iocb.c |    2 +-
 drivers/scsi/qla2xxx/qla_mbx.c  |    4 ++--
 drivers/scsi/qla2xxx/qla_os.c   |   21 +++++++++++++++++----
 6 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 0f87962..5b0a222 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1670,7 +1670,7 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
 
 	qla24xx_vport_disable(fc_vport, disable);
 
-	if (ql2xmultique_tag) {
+	if (ha->flags.cpu_affinity_enabled) {
 		req = ha->req_q_map[1];
 		goto vport_queue;
 	} else if (ql2xmaxqueues == 1 || !ha->npiv_info)
@@ -1743,7 +1743,7 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
 		    vha->host_no, vha->vp_idx, vha));
         }
 
-	if (vha->req->id && !ql2xmultique_tag) {
+	if (vha->req->id && !ha->flags.cpu_affinity_enabled) {
 		if (qla25xx_delete_req_que(vha, vha->req) != QLA_SUCCESS)
 			qla_printk(KERN_WARNING, ha,
 				"Queue delete failed.\n");
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 00aa48d..61c1ae8 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2224,6 +2224,7 @@ struct qla_hw_data {
 		uint32_t	chip_reset_done		:1;
 		uint32_t	port0			:1;
 		uint32_t	running_gold_fw		:1;
+		uint32_t	cpu_affinity_enabled	:1;
 	} flags;
 
 	/* This spinlock is used to protect "io transactions", you must
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index f2ce8e3..0cbe39e 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -987,7 +987,6 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
 				    ha->phy_version);
 				if (rval != QLA_SUCCESS)
 					goto failed;
-
 				ha->flags.npiv_supported = 0;
 				if (IS_QLA2XXX_MIDTYPE(ha) &&
 					 (ha->fw_attributes & BIT_2)) {
@@ -3244,7 +3243,7 @@ qla2x00_loop_resync(scsi_qla_host_t *vha)
 	struct req_que *req;
 	struct rsp_que *rsp;
 
-	if (ql2xmultique_tag)
+	if (vha->hw->flags.cpu_affinity_enabled)
 		req = vha->hw->req_q_map[0];
 	else
 		req = vha->req;
@@ -4264,7 +4263,7 @@ qla24xx_configure_vhba(scsi_qla_host_t *vha)
 		return -EINVAL;
 
 	rval = qla2x00_fw_ready(base_vha);
-	if (ql2xmultique_tag)
+	if (ha->flags.cpu_affinity_enabled)
 		req = ha->req_q_map[0];
 	else
 		req = vha->req;
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 13396be..c0ba370 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -852,7 +852,7 @@ static void qla25xx_set_que(srb_t *sp, struct rsp_que **rsp)
 	struct qla_hw_data *ha = sp->fcport->vha->hw;
 	int affinity = cmd->request->cpu;
 
-	if (ql2xmultique_tag && affinity >= 0 &&
+	if (ha->flags.cpu_affinity_enabled && affinity >= 0 &&
 		affinity < ha->max_rsp_queues - 1)
 		*rsp = ha->rsp_q_map[affinity + 1];
 	 else
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 8fcd99e..b6202fe 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -1507,7 +1507,7 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain,
 
 	DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no));
 
-	if (ql2xmultique_tag)
+	if (ha->flags.cpu_affinity_enabled)
 		req = ha->req_q_map[0];
 	else
 		req = vha->req;
@@ -2324,7 +2324,7 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport,
 	vha = fcport->vha;
 	ha = vha->hw;
 	req = vha->req;
-	if (ql2xmultique_tag)
+	if (ha->flags.cpu_affinity_enabled)
 		rsp = ha->rsp_q_map[tag + 1];
 	else
 		rsp = req->rsp;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index f0396e7..1007508 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -287,9 +287,12 @@ static int qla25xx_setup_mode(struct scsi_qla_host *vha)
 	int ques, req, ret;
 	struct qla_hw_data *ha = vha->hw;
 
+	if (!(ha->fw_attributes & BIT_6)) {
+		qla_printk(KERN_INFO, ha,
+			"Firmware is not multi-queue capable\n");
+		goto fail;
+	}
 	if (ql2xmultique_tag) {
-		/* CPU affinity mode */
-		ha->wq = create_workqueue("qla2xxx_wq");
 		/* create a request queue for IO */
 		options |= BIT_7;
 		req = qla25xx_create_req_que(ha, options, 0, 0, -1,
@@ -309,6 +312,9 @@ static int qla25xx_setup_mode(struct scsi_qla_host *vha)
 				goto fail2;
 			}
 		}
+		ha->flags.cpu_affinity_enabled = 1;
+		ha->wq = create_workqueue("qla2xxx_wq");
+
 		DEBUG2(qla_printk(KERN_INFO, ha,
 			"CPU affinity mode enabled, no. of response"
 			" queues:%d, no. of request queues:%d\n",
@@ -319,6 +325,9 @@ fail2:
 	qla25xx_delete_queues(vha);
 fail:
 	ha->mqenable = 0;
+	kfree(ha->req_q_map);
+	kfree(ha->rsp_q_map);
+	ha->max_req_queues = ha->max_rsp_queues = 1;
 	return 1;
 }
 
@@ -1923,6 +1932,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (ret)
 		goto probe_init_failed;
 	/* Alloc arrays of request and response ring ptrs */
+que_init:
 	if (!qla2x00_alloc_queues(ha)) {
 		qla_printk(KERN_WARNING, ha,
 		"[ERROR] Failed to allocate memory for queue"
@@ -1959,11 +1969,14 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto probe_failed;
 	}
 
-	if (ha->mqenable)
-		if (qla25xx_setup_mode(base_vha))
+	if (ha->mqenable) {
+		if (qla25xx_setup_mode(base_vha)) {
 			qla_printk(KERN_WARNING, ha,
 				"Can't create queues, falling back to single"
 				" queue mode\n");
+			goto que_init;
+		}
+	}
 
 	if (ha->flags.running_gold_fw)
 		goto skip_dpc;
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 11/14] qla2xxx: Fix a bug that clears the interrupt status register for the base queue
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (9 preceding siblings ...)
  2009-07-29 18:03 ` [PATCH 10/14] qla2xxx: Fix to ensure driver works in sinlge queue mode if multiqueue fails giridhar.malavali
@ 2009-07-29 18:04 ` giridhar.malavali
  2009-07-29 18:04 ` [PATCH 12/14] qla2xxx: Update version number to 8.03.01-k6 giridhar.malavali
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:04 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, andrew.vasquez, linux-scsi,
	Anirban Chakraborty

From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>

The interrupt handler clears the interrupt status register for response updates in the
base queue while working in the multique mode. This could lead to missing interrupt for
async events, mail box completions etc. as these are also handled in the base queue.
The fix ensures that the interrupt bit is not cleared for response updates in the ISR
when the driver is working in multiqueue mode.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 40014f3..175b20b 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1769,7 +1769,8 @@ qla24xx_msix_rsp_q(int irq, void *dev_id)
 
 	vha = qla25xx_get_host(rsp);
 	qla24xx_process_response_queue(vha, rsp);
-	WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
+	if (!ha->mqenable)
+		WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_INT);
 
 	spin_unlock_irq(&ha->hardware_lock);
 
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 12/14] qla2xxx: Update version number to 8.03.01-k6
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (10 preceding siblings ...)
  2009-07-29 18:04 ` [PATCH 11/14] qla2xxx: Fix a bug that clears the interrupt status register for the base queue giridhar.malavali
@ 2009-07-29 18:04 ` giridhar.malavali
  2009-07-29 18:04 ` [PATCH 13/14] qla2xxx: ISP21xx/22xx do not support FDMI registrations. (fixed) giridhar.malavali
  2009-07-29 18:04 ` [PATCH 14/14] qla2xxx: Update version number to 8.03.01-k7 giridhar.malavali
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:04 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

Signed-off-by: Giridhar Malavali <giridhar.malavali@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 87a884e..ac107a2 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.01-k5"
+#define QLA2XXX_VERSION      "8.03.01-k6"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 13/14] qla2xxx: ISP21xx/22xx do not support FDMI registrations.  (fixed)
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (11 preceding siblings ...)
  2009-07-29 18:04 ` [PATCH 12/14] qla2xxx: Update version number to 8.03.01-k6 giridhar.malavali
@ 2009-07-29 18:04 ` giridhar.malavali
  2009-07-29 18:04 ` [PATCH 14/14] qla2xxx: Update version number to 8.03.01-k7 giridhar.malavali
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:04 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

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

diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 917534b..4647015 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -1674,6 +1674,10 @@ int
 qla2x00_fdmi_register(scsi_qla_host_t *vha)
 {
 	int rval;
+       struct qla_hw_data *ha = vha->hw;
+
+	if (IS_QLA2100(ha) || IS_QLA2200(ha))
+		return QLA_FUNCTION_FAILED;
 
 	rval = qla2x00_mgmt_svr_login(vha);
 	if (rval)
-- 
1.6.2.rc1.30.gd43c


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

* [PATCH 14/14] qla2xxx: Update version number to 8.03.01-k7
  2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
                   ` (12 preceding siblings ...)
  2009-07-29 18:04 ` [PATCH 13/14] qla2xxx: ISP21xx/22xx do not support FDMI registrations. (fixed) giridhar.malavali
@ 2009-07-29 18:04 ` giridhar.malavali
  13 siblings, 0 replies; 17+ messages in thread
From: giridhar.malavali @ 2009-07-29 18:04 UTC (permalink / raw)
  To: James.Bottomley; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

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

Signed-off-by: Giridhar Malavali <giridhar.malavali@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 ac107a2..807e0db 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.01-k6"
+#define QLA2XXX_VERSION      "8.03.01-k7"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3
-- 
1.6.2.rc1.30.gd43c


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

* Re: [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status
  2009-07-29 18:03 ` [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status giridhar.malavali
@ 2009-07-29 19:07   ` James Bottomley
  2009-07-29 20:20     ` Giridhar Malavali
  0 siblings, 1 reply; 17+ messages in thread
From: James Bottomley @ 2009-07-29 19:07 UTC (permalink / raw)
  To: giridhar.malavali; +Cc: andrew.vasquez, linux-scsi, Ravi Anand

On Wed, 2009-07-29 at 11:03 -0700, giridhar.malavali@qlogic.com wrote:
> From: Ravi Anand <ravi.anand@qlogic.com>
> 
> to application for vendor specific commands.

This is a strange changelog, as is this:


> From: Santosh Vernekar <santosh.vernekar@qlogic.com>
> 
> lost.
> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>

Could you redo the change logs so they're correct.  Also separating the
changelog from the signed-off-by by a single empty line is the current
convention.

Thanks,

James



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

* Re: [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status
  2009-07-29 19:07   ` James Bottomley
@ 2009-07-29 20:20     ` Giridhar Malavali
  0 siblings, 0 replies; 17+ messages in thread
From: Giridhar Malavali @ 2009-07-29 20:20 UTC (permalink / raw)
  To: James Bottomley; +Cc: Andrew Vasquez, linux-scsi@vger.kernel.org, Ravi Anand

James,

I resent the patches. I will take care of it in future.

Thanks,
Giridhar.M.B


On Jul 29, 2009, at 12:07 PM, James Bottomley wrote:

> On Wed, 2009-07-29 at 11:03 -0700, giridhar.malavali@qlogic.com wrote:
>> From: Ravi Anand <ravi.anand@qlogic.com>
>>
>> to application for vendor specific commands.
>
> This is a strange changelog, as is this:
>
>
>> From: Santosh Vernekar <santosh.vernekar@qlogic.com>
>>
>> lost.
>> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
>
> Could you redo the change logs so they're correct.  Also separating  
> the
> changelog from the signed-off-by by a single empty line is the current
> convention.
>
> Thanks,
>
> James
>
>


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

end of thread, other threads:[~2009-07-29 20:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-29 18:03 [PATCH 00/14] qla2xxx: fixes for 2.6.31-rc3 [8.03.01-k5/K6/K7] giridhar.malavali
2009-07-29 18:03 ` [PATCH 01/14] qla2xxx: Modified the driver to pass the residaul UNDERRUN status giridhar.malavali
2009-07-29 19:07   ` James Bottomley
2009-07-29 20:20     ` Giridhar Malavali
2009-07-29 18:03 ` [PATCH 02/14] qla2xxx: Correctly handle 'global port-unavailable' AEN giridhar.malavali
2009-07-29 18:03 ` [PATCH 03/14] qla2xxx: Skip RSCN processing if the event is global and vp_idx index giridhar.malavali
2009-07-29 18:03 ` [PATCH 04/14] qla2xxx: Mark all devices as lost when fc port is marked giridhar.malavali
2009-07-29 18:03 ` [PATCH 05/14] qla2xxx: Process DPC requests within valid Fabric topologies giridhar.malavali
2009-07-29 18:03 ` [PATCH 06/14] qla2xxx: Fix endian issues on PPC platfrom for NPIV giridhar.malavali
2009-07-29 18:03 ` [PATCH 07/14] qla2xxx: Handle RSCN's per master/slave vn-port basis giridhar.malavali
2009-07-29 18:03 ` [PATCH 08/14] qla2xxx: Corrected one of the IOCB structure to be 64 bytes size giridhar.malavali
2009-07-29 18:03 ` [PATCH 09/14] qla2xxx: Update version number to 8.03.01-k5 giridhar.malavali
2009-07-29 18:03 ` [PATCH 10/14] qla2xxx: Fix to ensure driver works in sinlge queue mode if multiqueue fails giridhar.malavali
2009-07-29 18:04 ` [PATCH 11/14] qla2xxx: Fix a bug that clears the interrupt status register for the base queue giridhar.malavali
2009-07-29 18:04 ` [PATCH 12/14] qla2xxx: Update version number to 8.03.01-k6 giridhar.malavali
2009-07-29 18:04 ` [PATCH 13/14] qla2xxx: ISP21xx/22xx do not support FDMI registrations. (fixed) giridhar.malavali
2009-07-29 18:04 ` [PATCH 14/14] qla2xxx: Update version number to 8.03.01-k7 giridhar.malavali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox