vserver 1.9.5.x5
[linux-2.6.git] / drivers / scsi / qla2xxx / qla_inline.h
index fa6f6dd..07c1133 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 
-static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t *);
+static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t __iomem *);
 /*
  * qla2x00_debounce_register
  *      Debounce register.
@@ -30,7 +30,7 @@ static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t *);
  *      register value.
  */
 static __inline__ uint16_t
-qla2x00_debounce_register(volatile uint16_t *addr) 
+qla2x00_debounce_register(volatile uint16_t __iomem *addr) 
 {
        volatile uint16_t first;
        volatile uint16_t second;
@@ -117,7 +117,10 @@ static __inline__ void qla2x00_poll(scsi_qla_host_t *);
 static inline void 
 qla2x00_poll(scsi_qla_host_t *ha)
 {
-       qla2x00_intr_handler(0, ha, NULL);
+       if (IS_QLA2100(ha) || IS_QLA2200(ha))
+               qla2100_intr_handler(0, ha, NULL);
+       else
+               qla2300_intr_handler(0, ha, NULL);
 }
 
 
@@ -128,10 +131,9 @@ static inline void
 qla2x00_enable_intrs(scsi_qla_host_t *ha)
 {
        unsigned long flags = 0;
-       device_reg_t *reg;
+       device_reg_t __iomem *reg = ha->iobase;
 
        spin_lock_irqsave(&ha->hardware_lock, flags);
-       reg = ha->iobase;
        ha->interrupts_on = 1;
        /* enable risc and host interrupts */
        WRT_REG_WORD(&reg->ictrl, ICR_EN_INT | ICR_EN_RISC);
@@ -144,10 +146,9 @@ static inline void
 qla2x00_disable_intrs(scsi_qla_host_t *ha)
 {
        unsigned long flags = 0;
-       device_reg_t *reg;
+       device_reg_t __iomem *reg = ha->iobase;
 
        spin_lock_irqsave(&ha->hardware_lock, flags);
-       reg = ha->iobase;
        ha->interrupts_on = 0;
        /* disable risc and host interrupts */
        WRT_REG_WORD(&reg->ictrl, 0);
@@ -165,7 +166,7 @@ static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
  *      wwn = Pointer to WW name to check
  *
  * Returns:
- *      TRUE if name is 0 else FALSE
+ *      1 if name is 0x00 else 0
  *
  * Context:
  *      Kernel context.
@@ -179,7 +180,7 @@ qla2x00_is_wwn_zero(uint8_t *wwn)
                if (*wwn != 0)
                        break;
        }
-       /* if zero return TRUE */
+       /* if zero return 1 */
        if (cnt == WWN_SIZE)
                return (1);
        else