- if (IS_QLA2100(ha) || IS_QLA2200(ha))
- qla2100_intr_handler(0, ha, NULL);
- else
- qla2300_intr_handler(0, ha, NULL);
-}
-
-
-static __inline__ void qla2x00_enable_intrs(scsi_qla_host_t *);
-static __inline__ void qla2x00_disable_intrs(scsi_qla_host_t *);
-
-static inline void
-qla2x00_enable_intrs(scsi_qla_host_t *ha)
-{
- unsigned long flags = 0;
- device_reg_t __iomem *reg = ha->iobase;
-
- spin_lock_irqsave(&ha->hardware_lock, flags);
- ha->interrupts_on = 1;
- /* enable risc and host interrupts */
- WRT_REG_WORD(®->ictrl, ICR_EN_INT | ICR_EN_RISC);
- RD_REG_WORD(®->ictrl);
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
-
-}
-
-static inline void
-qla2x00_disable_intrs(scsi_qla_host_t *ha)
-{
- unsigned long flags = 0;
- device_reg_t __iomem *reg = ha->iobase;
-
- spin_lock_irqsave(&ha->hardware_lock, flags);
- ha->interrupts_on = 0;
- /* disable risc and host interrupts */
- WRT_REG_WORD(®->ictrl, 0);
- RD_REG_WORD(®->ictrl);
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
-}
-
-
-static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
-
-/*
- * qla2x00_is_wwn_zero - Check for zero node name
- *
- * Input:
- * wwn = Pointer to WW name to check
- *
- * Returns:
- * 1 if name is 0x00 else 0
- *
- * Context:
- * Kernel context.
- */
-static __inline__ int
-qla2x00_is_wwn_zero(uint8_t *wwn)
-{
- int cnt;
-
- for (cnt = 0; cnt < WWN_SIZE ; cnt++, wwn++) {
- if (*wwn != 0)
- break;
- }
- /* if zero return 1 */
- if (cnt == WWN_SIZE)
- return (1);
- else
- return (0);
-}
-
-static __inline__ uint8_t
-qla2x00_suspend_lun(scsi_qla_host_t *, os_lun_t *, int, int);
-static __inline__ uint8_t
-qla2x00_delay_lun(scsi_qla_host_t *, os_lun_t *, int);
-
-static __inline__ uint8_t
-qla2x00_suspend_lun(scsi_qla_host_t *ha, os_lun_t *lq, int time, int count)
-{
- return (__qla2x00_suspend_lun(ha, lq, time, count, 0));
-}
-
-static __inline__ uint8_t
-qla2x00_delay_lun(scsi_qla_host_t *ha, os_lun_t *lq, int time)
-{
- return (__qla2x00_suspend_lun(ha, lq, time, 1, 1));