linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/13] qla4xxx: Use polling mode for disable interrupt mailbox completion
@ 2011-03-14  5:25 Vikas Chaudhary
  0 siblings, 0 replies; 2+ messages in thread
From: Vikas Chaudhary @ 2011-03-14  5:25 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi@vger.kernel.org, Vikas Chaudhary, Lalit Chandivade,
	Ravi Anand, Sarang Radke, Mike Christie

From: Sarang Radke <sarang.radke@qlogic.com>

Disable Interrupt MBX completion will disable the interrupt on successful completion.
Fixed the bug where driver was waiting for Interrupt to come in for its completion.
Now driver will poll for disable interrupt MBX completion.

Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_nx.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 3d5ef2d..35381cb 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2304,14 +2304,13 @@ qla4_8xxx_enable_intrs(struct scsi_qla_host *ha)
 void
 qla4_8xxx_disable_intrs(struct scsi_qla_host *ha)
 {
-       if (test_bit(AF_INTERRUPTS_ON, &ha->flags))
+       if (test_and_clear_bit(AF_INTERRUPTS_ON, &ha->flags))
                qla4_8xxx_mbx_intr_disable(ha);

        spin_lock_irq(&ha->hardware_lock);
        /* BIT 10 - set */
        qla4_8xxx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0x0400);
        spin_unlock_irq(&ha->hardware_lock);
-       clear_bit(AF_INTERRUPTS_ON, &ha->flags);
 }

 struct ql4_init_msix_entry {
--
1.7.3.2


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 related	[flat|nested] 2+ messages in thread

* [PATCH 11/13] qla4xxx: Use polling mode for disable interrupt mailbox completion
@ 2011-03-23 15:07 vikas.chaudhary
  0 siblings, 0 replies; 2+ messages in thread
From: vikas.chaudhary @ 2011-03-23 15:07 UTC (permalink / raw)
  To: James.Bottomley
  Cc: linux-scsi, ravi.anand, lalit.chandivade, vikas.chaudhary,
	Sarang Radke

From: Sarang Radke <sarang.radke@qlogic.com>

Disable Interrupt MBX completion will disable the interrupt on successful completion.
Fixed the bug where driver was waiting for Interrupt to come in for its completion.
Now driver will poll for disable interrupt MBX completion.

Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_nx.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 3d5ef2d..35381cb 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2304,14 +2304,13 @@ qla4_8xxx_enable_intrs(struct scsi_qla_host *ha)
 void
 qla4_8xxx_disable_intrs(struct scsi_qla_host *ha)
 {
-	if (test_bit(AF_INTERRUPTS_ON, &ha->flags))
+	if (test_and_clear_bit(AF_INTERRUPTS_ON, &ha->flags))
 		qla4_8xxx_mbx_intr_disable(ha);
 
 	spin_lock_irq(&ha->hardware_lock);
 	/* BIT 10 - set */
 	qla4_8xxx_wr_32(ha, ha->nx_legacy_intr.tgt_mask_reg, 0x0400);
 	spin_unlock_irq(&ha->hardware_lock);
-	clear_bit(AF_INTERRUPTS_ON, &ha->flags);
 }
 
 struct ql4_init_msix_entry {
-- 
1.7.3.2


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

end of thread, other threads:[~2011-03-23 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-23 15:07 [PATCH 11/13] qla4xxx: Use polling mode for disable interrupt mailbox completion vikas.chaudhary
  -- strict thread matches above, loose matches on Subject: below --
2011-03-14  5:25 Vikas Chaudhary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).