linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ths@linux-mips.org
Date: Sun, 03 Jul 2005 18:34:07 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ths@ftp.linux-mips.org  05/07/03 18:34:01

Modified files:
        drivers/scsi   : qla1280.c 

Log message:
        qla1280 patchset from hch: qla1280-disable-intr-posting-bug.

diff -urN linux/drivers/scsi/qla1280.c linux/drivers/scsi/qla1280.c
--- linux/drivers/scsi/qla1280.c        2005/07/03 17:32:01     1.46
+++ linux/drivers/scsi/qla1280.c        2005/07/03 17:34:01     1.47
@@ -1241,6 +1241,22 @@
        return qla1280_biosparam(disk->device, NULL, disk->capacity, geom);
 }
 #endif
+ 
+/* disable risc and host interrupts */
+static inline void
+qla1280_disable_intrs(struct scsi_qla_host *ha)
+{
+       WRT_REG_WORD(&ha->iobase->ictrl, 0);
+       RD_REG_WORD(&ha->iobase->ictrl);        /* PCI Posted Write flush */
+}
+
+/* enable risc and host interrupts */
+static inline void
+qla1280_enable_intrs(struct scsi_qla_host *ha)
+{
+       WRT_REG_WORD(&ha->iobase->ictrl, (ISP_EN_INT | ISP_EN_RISC));
+       RD_REG_WORD(&ha->iobase->ictrl);        /* PCI Posted Write flush */
+}
 
 /**************************************************************************
  * qla1280_intr_handler
@@ -1262,7 +1278,7 @@
        ha->isr_count++;
        reg = ha->iobase;
 
-       WRT_REG_WORD(&reg->ictrl, 0);   /* disable our interrupt. */
+       qla1280_disable_intrs(ha);
 
        data = qla1280_debounce_register(&reg->istatus);
        /* Check for pending interrupts. */
@@ -1275,8 +1291,7 @@
 
        spin_unlock(HOST_LOCK);
 
-       /* enable our interrupt. */
-       WRT_REG_WORD(&reg->ictrl, (ISP_EN_INT | ISP_EN_RISC));
+       qla1280_enable_intrs(ha);
 
        LEAVE_INTR("qla1280_intr_handler");
        return IRQ_RETVAL(handled);
@@ -1589,38 +1604,6 @@
 /*                QLogic ISP1280 Hardware Support Functions.                */
 /****************************************************************************/
 
- /*
-  * qla2100_enable_intrs
-  * qla2100_disable_intrs
-  *
-  * Input:
-  *      ha = adapter block pointer.
-  *
-  * Returns:
-  *      None
-  */
-static inline void
-qla1280_enable_intrs(struct scsi_qla_host *ha)
-{
-       struct device_reg __iomem *reg;
-
-       reg = ha->iobase;
-       /* enable risc and host interrupts */
-       WRT_REG_WORD(&reg->ictrl, (ISP_EN_INT | ISP_EN_RISC));
-       RD_REG_WORD(&reg->ictrl);       /* PCI Posted Write flush */
-}
-
-static inline void
-qla1280_disable_intrs(struct scsi_qla_host *ha)
-{
-       struct device_reg __iomem *reg;
-
-       reg = ha->iobase;
-       /* disable risc and host interrupts */
-       WRT_REG_WORD(&reg->ictrl, 0);
-       RD_REG_WORD(&reg->ictrl);       /* PCI Posted Write flush */
-}
-
 /*
  * qla1280_initialize_adapter
  *      Initialize board.
@@ -4728,7 +4711,7 @@
 
 #if LINUX_VERSION_CODE >= 0x020600
  error_disable_adapter:
-       WRT_REG_WORD(&ha->iobase->ictrl, 0);
+       qla1280_disable_intrs(ha);
 #endif
  error_free_irq:
        free_irq(pdev->irq, ha);
@@ -4765,7 +4748,7 @@
        scsi_remove_host(host);
 #endif
 
-       WRT_REG_WORD(&ha->iobase->ictrl, 0);
+       qla1280_disable_intrs(ha);
 
        free_irq(pdev->irq, ha);
 

<Prev in Thread] Current Thread [Next in Thread>