All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] qla2xxx: Patches for 2.6.38-rcx
@ 2011-01-28 23:17 madhu.iyengar
  2011-01-28 23:17 ` [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost madhu.iyengar
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: madhu.iyengar @ 2011-01-28 23:17 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, madhu.iyengar, andrew.vasquez, linux-scsi,
	Madhuranath Iyengar

From: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>

James,

Please apply these patches. Thanks.

Andrew Vasquez (1):
  qla2xxx: Remove check to return DID_NO_CONNECT when FC device is
    lost.

Madhuranath Iyengar (2):
  qla2xxx: Change from irq to irqsave with host_lock
  qla2xxx: Update version number to 8.03.06-k0.

 drivers/scsi/qla2xxx/qla_attr.c    |    5 +++--
 drivers/scsi/qla2xxx/qla_init.c    |   10 ++++++----
 drivers/scsi/qla2xxx/qla_os.c      |    6 +++---
 drivers/scsi/qla2xxx/qla_version.h |    4 ++--
 4 files changed, 14 insertions(+), 11 deletions(-)


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

* [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost.
  2011-01-28 23:17 [PATCH 0/3] qla2xxx: Patches for 2.6.38-rcx madhu.iyengar
@ 2011-01-28 23:17 ` madhu.iyengar
  2011-02-12 16:52   ` James Bottomley
  2011-01-28 23:17 ` [PATCH 2/3] qla2xxx: Change from irq to irqsave with host_lock madhu.iyengar
  2011-01-28 23:17 ` [PATCH 3/3] qla2xxx: Update version number to 8.03.06-k0 madhu.iyengar
  2 siblings, 1 reply; 6+ messages in thread
From: madhu.iyengar @ 2011-01-28 23:17 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, madhu.iyengar, andrew.vasquez, linux-scsi

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

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_os.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index c194c23..5dc548b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -562,7 +562,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)
 	}
 	if (atomic_read(&fcport->state) != FCS_ONLINE) {
 		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
-			atomic_read(&fcport->state) == FCS_DEVICE_LOST ||
 			atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
 			cmd->result = DID_NO_CONNECT << 16;
 			goto qc24_fail_command;
-- 
1.6.0.2


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

* [PATCH 2/3] qla2xxx: Change from irq to irqsave with host_lock
  2011-01-28 23:17 [PATCH 0/3] qla2xxx: Patches for 2.6.38-rcx madhu.iyengar
  2011-01-28 23:17 ` [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost madhu.iyengar
@ 2011-01-28 23:17 ` madhu.iyengar
  2011-01-28 23:17 ` [PATCH 3/3] qla2xxx: Update version number to 8.03.06-k0 madhu.iyengar
  2 siblings, 0 replies; 6+ messages in thread
From: madhu.iyengar @ 2011-01-28 23:17 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, madhu.iyengar, andrew.vasquez, linux-scsi,
	Madhuranath Iyengar

From: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>

Make the driver safer by using irqsave/irqrestore with host_lock.

Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_attr.c |    5 +++--
 drivers/scsi/qla2xxx/qla_init.c |   10 ++++++----
 drivers/scsi/qla2xxx/qla_os.c   |    5 +++--
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 44578b5..d3e58d7 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1561,6 +1561,7 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
 {
 	struct Scsi_Host *host = rport_to_shost(rport);
 	fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
+	unsigned long flags;
 
 	if (!fcport)
 		return;
@@ -1573,10 +1574,10 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
 	 * Transport has effectively 'deleted' the rport, clear
 	 * all local references.
 	 */
-	spin_lock_irq(host->host_lock);
+	spin_lock_irqsave(host->host_lock, flags);
 	fcport->rport = fcport->drport = NULL;
 	*((fc_port_t **)rport->dd_data) = NULL;
-	spin_unlock_irq(host->host_lock);
+	spin_unlock_irqrestore(host->host_lock, flags);
 
 	if (test_bit(ABORT_ISP_ACTIVE, &fcport->vha->dpc_flags))
 		return;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index f948e1a..d9479c3 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2505,11 +2505,12 @@ qla2x00_rport_del(void *data)
 {
 	fc_port_t *fcport = data;
 	struct fc_rport *rport;
+	unsigned long flags;
 
-	spin_lock_irq(fcport->vha->host->host_lock);
+	spin_lock_irqsave(fcport->vha->host->host_lock, flags);
 	rport = fcport->drport ? fcport->drport: fcport->rport;
 	fcport->drport = NULL;
-	spin_unlock_irq(fcport->vha->host->host_lock);
+	spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
 	if (rport)
 		fc_remote_port_delete(rport);
 }
@@ -2879,6 +2880,7 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
 	struct fc_rport_identifiers rport_ids;
 	struct fc_rport *rport;
 	struct qla_hw_data *ha = vha->hw;
+	unsigned long flags;
 
 	qla2x00_rport_del(fcport);
 
@@ -2893,9 +2895,9 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
 		    "Unable to allocate fc remote port!\n");
 		return;
 	}
-	spin_lock_irq(fcport->vha->host->host_lock);
+	spin_lock_irqsave(fcport->vha->host->host_lock, flags);
 	*((fc_port_t **)rport->dd_data) = fcport;
-	spin_unlock_irq(fcport->vha->host->host_lock);
+	spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
 
 	rport->supported_classes = fcport->supported_classes;
 
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 5dc548b..a32f135 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2512,6 +2512,7 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
 {
 	struct fc_rport *rport;
 	scsi_qla_host_t *base_vha;
+	unsigned long flags;
 
 	if (!fcport->rport)
 		return;
@@ -2519,9 +2520,9 @@ qla2x00_schedule_rport_del(struct scsi_qla_host *vha, fc_port_t *fcport,
 	rport = fcport->rport;
 	if (defer) {
 		base_vha = pci_get_drvdata(vha->hw->pdev);
-		spin_lock_irq(vha->host->host_lock);
+		spin_lock_irqsave(vha->host->host_lock, flags);
 		fcport->drport = rport;
-		spin_unlock_irq(vha->host->host_lock);
+		spin_unlock_irqrestore(vha->host->host_lock, flags);
 		set_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags);
 		qla2xxx_wake_dpc(base_vha);
 	} else
-- 
1.6.0.2


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

* [PATCH 3/3] qla2xxx: Update version number to 8.03.06-k0.
  2011-01-28 23:17 [PATCH 0/3] qla2xxx: Patches for 2.6.38-rcx madhu.iyengar
  2011-01-28 23:17 ` [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost madhu.iyengar
  2011-01-28 23:17 ` [PATCH 2/3] qla2xxx: Change from irq to irqsave with host_lock madhu.iyengar
@ 2011-01-28 23:17 ` madhu.iyengar
  2 siblings, 0 replies; 6+ messages in thread
From: madhu.iyengar @ 2011-01-28 23:17 UTC (permalink / raw)
  To: James.Bottomley
  Cc: giridhar.malavali, madhu.iyengar, andrew.vasquez, linux-scsi,
	Madhuranath Iyengar

From: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>

Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
---
 drivers/scsi/qla2xxx/qla_version.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h
index cf0075a..8f3678b 100644
--- a/drivers/scsi/qla2xxx/qla_version.h
+++ b/drivers/scsi/qla2xxx/qla_version.h
@@ -7,9 +7,9 @@
 /*
  * Driver version
  */
-#define QLA2XXX_VERSION      "8.03.05-k0"
+#define QLA2XXX_VERSION      "8.03.06-k0"
 
 #define QLA_DRIVER_MAJOR_VER	8
 #define QLA_DRIVER_MINOR_VER	3
-#define QLA_DRIVER_PATCH_VER	5
+#define QLA_DRIVER_PATCH_VER	6
 #define QLA_DRIVER_BETA_VER	0
-- 
1.6.0.2


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

* Re: [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost.
  2011-01-28 23:17 ` [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost madhu.iyengar
@ 2011-02-12 16:52   ` James Bottomley
  2011-02-13  3:20     ` Madhu Iyengar
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2011-02-12 16:52 UTC (permalink / raw)
  To: madhu.iyengar; +Cc: giridhar.malavali, andrew.vasquez, linux-scsi

On Fri, 2011-01-28 at 15:17 -0800, madhu.iyengar@qlogic.com wrote:
> From: Andrew Vasquez <andrew.vasquez@qlogic.com>
> 
> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_os.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index c194c23..5dc548b 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -562,7 +562,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)
>  	}
>  	if (atomic_read(&fcport->state) != FCS_ONLINE) {
>  		if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
> -			atomic_read(&fcport->state) == FCS_DEVICE_LOST ||

This looks like you're actually *not* returning DID_NO_CONNECT when the
device is lost ... what are you returning instead, and why is this an
important bug fix?

James


>  			atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
>  			cmd->result = DID_NO_CONNECT << 16;
>  			goto qc24_fail_command;



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

* RE: [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost.
  2011-02-12 16:52   ` James Bottomley
@ 2011-02-13  3:20     ` Madhu Iyengar
  0 siblings, 0 replies; 6+ messages in thread
From: Madhu Iyengar @ 2011-02-13  3:20 UTC (permalink / raw)
  To: James Bottomley
  Cc: Giridhar Malavali, Andrew Vasquez, linux-scsi, Madhu Iyengar

James,

Sorry about that. Here's the commit message, which explains the patch. Can you please add this to the patch? Thanks in advance:

---
If the target device gets lost, this fix is needed, as it causes negative unintended responses on basic I/O tests. If the target device gets lost, the upstream qla2xxx driver returns SCSI_MLQUEUE_TARGET_BUSY which causes an immediate retry without drop in the number of allowed retries. This semantic change, as a result of removing FC_DEVICE_LOST check is reasonable, as it only extends a short transitional period, until the transport is called to notify that the rport as lost (fc_remote_port_delete()). Once transport notification is done, fc_remote_port_chkready() check will take over.
---

Cheers,
Madhu

> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@suse.de]
> Sent: Saturday, February 12, 2011 8:52 AM
> To: Madhu Iyengar
> Cc: Giridhar Malavali; Andrew Vasquez; linux-scsi@vger.kernel.org
> Subject: Re: [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT
> when FC device is lost.
>
> On Fri, 2011-01-28 at 15:17 -0800, madhu.iyengar@qlogic.com wrote:
> > From: Andrew Vasquez <andrew.vasquez@qlogic.com>
> >
> > Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
> > Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
> > ---
> >  drivers/scsi/qla2xxx/qla_os.c |    1 -
> >  1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/scsi/qla2xxx/qla_os.c
> b/drivers/scsi/qla2xxx/qla_os.c
> > index c194c23..5dc548b 100644
> > --- a/drivers/scsi/qla2xxx/qla_os.c
> > +++ b/drivers/scsi/qla2xxx/qla_os.c
> > @@ -562,7 +562,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void
> (*done)(struct scsi_cmnd *)
> >     }
> >     if (atomic_read(&fcport->state) != FCS_ONLINE) {
> >             if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
> > -                   atomic_read(&fcport->state) == FCS_DEVICE_LOST ||
>
> This looks like you're actually *not* returning DID_NO_CONNECT when the
> device is lost ... what are you returning instead, and why is this an
> important bug fix?
>
> James
>
>
> >                     atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
> >                     cmd->result = DID_NO_CONNECT << 16;
> >                     goto qc24_fail_command;
>
>


This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.


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

end of thread, other threads:[~2011-02-13  3:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 23:17 [PATCH 0/3] qla2xxx: Patches for 2.6.38-rcx madhu.iyengar
2011-01-28 23:17 ` [PATCH 1/3] qla2xxx: Remove check to return DID_NO_CONNECT when FC device is lost madhu.iyengar
2011-02-12 16:52   ` James Bottomley
2011-02-13  3:20     ` Madhu Iyengar
2011-01-28 23:17 ` [PATCH 2/3] qla2xxx: Change from irq to irqsave with host_lock madhu.iyengar
2011-01-28 23:17 ` [PATCH 3/3] qla2xxx: Update version number to 8.03.06-k0 madhu.iyengar

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.