]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/qla2xxx/qla_inline.h
[SCSI] qla2xxx: Add ISP24xx definitions.
[linux-2.6-omap-h63xx.git] / drivers / scsi / qla2xxx / qla_inline.h
index 6a05d1b8d48a13e8b2afd35bdd17359a714bbbc0..6cf7036ccf4c10c235e0186760271cbfed14c7f8 100644 (file)
@@ -117,46 +117,9 @@ static __inline__ void qla2x00_poll(scsi_qla_host_t *);
 static inline void 
 qla2x00_poll(scsi_qla_host_t *ha)
 {
-       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(&reg->ictrl, ICR_EN_INT | ICR_EN_RISC);
-       RD_REG_WORD(&reg->ictrl);
-       spin_unlock_irqrestore(&ha->hardware_lock, flags);
-
+       ha->isp_ops.intr_handler(0, ha, NULL);
 }
 
-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(&reg->ictrl, 0);
-       RD_REG_WORD(&reg->ictrl);
-       spin_unlock_irqrestore(&ha->hardware_lock, flags);
-}
-
-
 static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
 
 /*
@@ -273,3 +236,14 @@ qla2x00_delete_timer_from_cmd(srb_t *sp)
        }
 }
 
+
+static inline int qla2x00_is_reserved_id(scsi_qla_host_t *, uint16_t);
+static inline int
+qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id)
+{
+       if (IS_QLA24XX(ha) || IS_QLA25XX(ha))
+               return (loop_id > NPH_LAST_HANDLE);
+
+       return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) ||
+           loop_id == MANAGEMENT_SERVER || loop_id == BROADCAST);
+};