public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4].
@ 2008-05-19 21:24 Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 1/3] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling." Andrew Vasquez
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Andrew Vasquez @ 2008-05-19 21:24 UTC (permalink / raw)
  To: Linux SCSI Mailing List, James Bottomley; +Cc: Seokmann Ju, Andrew Vasquez

James,

Further testing has found some regressions in the NPIV code.  Please
add the following to your rc-fixes tree.

 drivers/scsi/qla2xxx/qla_isr.c     |   36 ++++++++++--------------------------
 drivers/scsi/qla2xxx/qla_mid.c     |    1 +
 drivers/scsi/qla2xxx/qla_os.c      |   14 ++++++++------
 drivers/scsi/qla2xxx/qla_version.h |    2 +-
 4 files changed, 20 insertions(+), 33 deletions(-)

commits:

- Revert "qla2xxx: Use proper HA during asynchrounous event handling."
- Correct handling of AENs postings for vports.
- Update version number to 8.02.01-k4.

Regards,
Andrew Vasquez

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

* [PATCH 1/3] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."
  2008-05-19 21:24 [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
@ 2008-05-19 21:25 ` Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 2/3] qla2xxx: Correct handling of AENs postings for vports Andrew Vasquez
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Andrew Vasquez @ 2008-05-19 21:25 UTC (permalink / raw)
  To: Linux SCSI Mailing List, James Bottomley; +Cc: Andrew Vasquez, Seokmann Ju

From: Seokmann Ju <seokmann.ju@qlogic.com>

This reverts commit bd2a1846b2313e32d0270151a31a6b8335384a20.
The original (prior to the reverted commit) code was correct.
Additionally, the vp_idx should be checked during MBA_PORT_UPDATE
in order for proper handling to take place for a given vport.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_isr.c |   36 ++++++++++--------------------------
 1 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 14bcd7c..ec63b79 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -272,8 +272,6 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
 	uint32_t	rscn_entry, host_pid;
 	uint8_t		rscn_queue_index;
 	unsigned long	flags;
-	scsi_qla_host_t	*vha;
-	int		i;
 
 	/* Setup to process RIO completion. */
 	handle_cnt = 0;
@@ -544,18 +542,10 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
 		break;
 
 	case MBA_PORT_UPDATE:		/* Port database update */
-		if ((ha->flags.npiv_supported) && (ha->num_vhosts)) {
-			for_each_mapped_vp_idx(ha, i) {
-				list_for_each_entry(vha, &ha->vp_list,
-				    vp_list) {
-					if ((mb[3] & 0xff)
-					    == vha->vp_idx) {
-						ha = vha;
-						break;
-					}
-				}
-			}
-		}
+		/* Only handle SCNs for our Vport index. */
+		if (ha->parent && ha->vp_idx != (mb[3] & 0xff))
+			break;
+
 		/*
 		 * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET
 		 * event etc. earlier indicating loop is down) then process
@@ -590,18 +580,12 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
 		break;
 
 	case MBA_RSCN_UPDATE:		/* State Change Registration */
-		if ((ha->flags.npiv_supported) && (ha->num_vhosts)) {
-			for_each_mapped_vp_idx(ha, i) {
-				list_for_each_entry(vha, &ha->vp_list,
-				    vp_list) {
-					if ((mb[3] & 0xff)
-					    == vha->vp_idx) {
-						ha = vha;
-						break;
-					}
-				}
-			}
-		}
+		/* Check if the Vport has issued a SCR */
+		if (ha->parent && test_bit(VP_SCR_NEEDED, &ha->vp_flags))
+			break;
+		/* Only handle SCNs for our Vport index. */
+		if (ha->parent && ha->vp_idx != (mb[3] & 0xff))
+			break;
 
 		DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n",
 		    ha->host_no));
-- 
1.5.5.1.316.g377d9


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

* [PATCH 2/3] qla2xxx: Correct handling of AENs postings for vports.
  2008-05-19 21:24 [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 1/3] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling." Andrew Vasquez
@ 2008-05-19 21:25 ` Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 3/3] qla2xxx: Update version number to 8.02.01-k4 Andrew Vasquez
  2008-05-28 16:19 ` [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
  3 siblings, 0 replies; 6+ messages in thread
From: Andrew Vasquez @ 2008-05-19 21:25 UTC (permalink / raw)
  To: Linux SCSI Mailing List, James Bottomley; +Cc: Andrew Vasquez, Seokmann Ju

From: Seokmann Ju <seokmann.ju@qlogic.com>

Initialize all proper structure members in order to support
work-list vport processing.  This code also properly acquires the
correct (physical hardware_lock) lock during work submission.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_mid.c |    1 +
 drivers/scsi/qla2xxx/qla_os.c  |   14 ++++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index fc55429..62a3ad6 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -406,6 +406,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
 	INIT_LIST_HEAD(&vha->list);
 	INIT_LIST_HEAD(&vha->fcports);
 	INIT_LIST_HEAD(&vha->vp_fcports);
+	INIT_LIST_HEAD(&vha->work_list);
 
 	vha->dpc_flags = 0L;
 	set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 817f62f..48eaa3b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2157,13 +2157,14 @@ static int
 qla2x00_post_work(struct scsi_qla_host *ha, struct qla_work_evt *e, int locked)
 {
 	unsigned long flags;
+	scsi_qla_host_t *pha = to_qla_parent(ha);
 
 	if (!locked)
-		spin_lock_irqsave(&ha->hardware_lock, flags);
+		spin_lock_irqsave(&pha->hardware_lock, flags);
 	list_add_tail(&e->list, &ha->work_list);
 	qla2xxx_wake_dpc(ha);
 	if (!locked)
-		spin_unlock_irqrestore(&ha->hardware_lock, flags);
+		spin_unlock_irqrestore(&pha->hardware_lock, flags);
 	return QLA_SUCCESS;
 }
 
@@ -2203,12 +2204,13 @@ static void
 qla2x00_do_work(struct scsi_qla_host *ha)
 {
 	struct qla_work_evt *e;
+	scsi_qla_host_t *pha = to_qla_parent(ha);
 
-	spin_lock_irq(&ha->hardware_lock);
+	spin_lock_irq(&pha->hardware_lock);
 	while (!list_empty(&ha->work_list)) {
 		e = list_entry(ha->work_list.next, struct qla_work_evt, list);
 		list_del_init(&e->list);
-		spin_unlock_irq(&ha->hardware_lock);
+		spin_unlock_irq(&pha->hardware_lock);
 
 		switch (e->type) {
 		case QLA_EVT_AEN:
@@ -2222,9 +2224,9 @@ qla2x00_do_work(struct scsi_qla_host *ha)
 		}
 		if (e->flags & QLA_EVT_FLAG_FREE)
 			kfree(e);
-		spin_lock_irq(&ha->hardware_lock);
+		spin_lock_irq(&pha->hardware_lock);
 	}
-	spin_unlock_irq(&ha->hardware_lock);
+	spin_unlock_irq(&pha->hardware_lock);
 }
 
 /**************************************************************************
-- 
1.5.5.1.316.g377d9


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

* [PATCH 3/3] qla2xxx: Update version number to 8.02.01-k4.
  2008-05-19 21:24 [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 1/3] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling." Andrew Vasquez
  2008-05-19 21:25 ` [PATCH 2/3] qla2xxx: Correct handling of AENs postings for vports Andrew Vasquez
@ 2008-05-19 21:25 ` Andrew Vasquez
  2008-05-28 16:19 ` [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
  3 siblings, 0 replies; 6+ messages in thread
From: Andrew Vasquez @ 2008-05-19 21:25 UTC (permalink / raw)
  To: Linux SCSI Mailing List, James Bottomley; +Cc: Andrew Vasquez, Seokmann Ju

Signed-off-by: Andrew Vasquez <andrew.vasquez@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 b42e3f2..d058c88 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.02.01-k3"
+#define QLA2XXX_VERSION      "8.02.01-k4"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	2
-- 
1.5.5.1.316.g377d9


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

* Re: [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4].
  2008-05-19 21:24 [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
                   ` (2 preceding siblings ...)
  2008-05-19 21:25 ` [PATCH 3/3] qla2xxx: Update version number to 8.02.01-k4 Andrew Vasquez
@ 2008-05-28 16:19 ` Andrew Vasquez
  2008-05-28 17:22   ` James Bottomley
  3 siblings, 1 reply; 6+ messages in thread
From: Andrew Vasquez @ 2008-05-28 16:19 UTC (permalink / raw)
  To: James Bottomley; +Cc: Seokmann Ju, Linux SCSI Mailing List

On Mon, 19 May 2008, Andrew Vasquez wrote:

> James,
> 
> Further testing has found some regressions in the NPIV code.  Please
> add the following to your rc-fixes tree.
> 
>  drivers/scsi/qla2xxx/qla_isr.c     |   36 ++++++++++--------------------------
>  drivers/scsi/qla2xxx/qla_mid.c     |    1 +
>  drivers/scsi/qla2xxx/qla_os.c      |   14 ++++++++------
>  drivers/scsi/qla2xxx/qla_version.h |    2 +-
>  4 files changed, 20 insertions(+), 33 deletions(-)
> 
> commits:
> 
> - Revert "qla2xxx: Use proper HA during asynchrounous event handling."
> - Correct handling of AENs postings for vports.
> - Update version number to 8.02.01-k4.

Ack/Nack?  These fixes should really be in 2.6.26.

Thanks, AV

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

* Re: [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4].
  2008-05-28 16:19 ` [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
@ 2008-05-28 17:22   ` James Bottomley
  0 siblings, 0 replies; 6+ messages in thread
From: James Bottomley @ 2008-05-28 17:22 UTC (permalink / raw)
  To: Andrew Vasquez; +Cc: Seokmann Ju, Linux SCSI Mailing List

On Wed, 2008-05-28 at 09:19 -0700, Andrew Vasquez wrote:
> On Mon, 19 May 2008, Andrew Vasquez wrote:
> 
> > James,
> > 
> > Further testing has found some regressions in the NPIV code.  Please
> > add the following to your rc-fixes tree.
> > 
> >  drivers/scsi/qla2xxx/qla_isr.c     |   36 ++++++++++--------------------------
> >  drivers/scsi/qla2xxx/qla_mid.c     |    1 +
> >  drivers/scsi/qla2xxx/qla_os.c      |   14 ++++++++------
> >  drivers/scsi/qla2xxx/qla_version.h |    2 +-
> >  4 files changed, 20 insertions(+), 33 deletions(-)
> > 
> > commits:
> > 
> > - Revert "qla2xxx: Use proper HA during asynchrounous event handling."
> > - Correct handling of AENs postings for vports.
> > - Update version number to 8.02.01-k4.
> 
> Ack/Nack?  These fixes should really be in 2.6.26.

Next on the list to look at, honest!  I've been away for a week, so I'm
in catch up mode.

James



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

end of thread, other threads:[~2008-05-28 17:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-19 21:24 [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
2008-05-19 21:25 ` [PATCH 1/3] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling." Andrew Vasquez
2008-05-19 21:25 ` [PATCH 2/3] qla2xxx: Correct handling of AENs postings for vports Andrew Vasquez
2008-05-19 21:25 ` [PATCH 3/3] qla2xxx: Update version number to 8.02.01-k4 Andrew Vasquez
2008-05-28 16:19 ` [PATCH 0/3] qla2xxx: fixes for 2.6.26 [8.02.01-k4] Andrew Vasquez
2008-05-28 17:22   ` James Bottomley

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