diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2005-07-06 13:30:05 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-14 10:47:30 -0400 |
commit | abbd8870b9cb7754a4935826bc9f3c7b029f8b7c (patch) | |
tree | c795f15d35c18a08c97dcbdaeb83a4e0c67679c6 /drivers/scsi/qla2xxx/qla_inline.h | |
parent | eb1dd68bc897d4e5a5133bfffbd4777a0fe16c4c (diff) |
[SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.
Factor-out ISP specific functions to method-based call tables.
In anticipation of ISP24xx/ISP25xx support, factor-out ISP
specific functions into a method-based call table.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_inline.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 6a05d1b8d48a..8f99febc15db 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -117,46 +117,9 @@ static __inline__ void qla2x00_poll(scsi_qla_host_t *); | |||
117 | static inline void | 117 | static inline void |
118 | qla2x00_poll(scsi_qla_host_t *ha) | 118 | qla2x00_poll(scsi_qla_host_t *ha) |
119 | { | 119 | { |
120 | if (IS_QLA2100(ha) || IS_QLA2200(ha)) | 120 | ha->isp_ops.intr_handler(0, ha, NULL); |
121 | qla2100_intr_handler(0, ha, NULL); | ||
122 | else | ||
123 | qla2300_intr_handler(0, ha, NULL); | ||
124 | } | 121 | } |
125 | 122 | ||
126 | |||
127 | static __inline__ void qla2x00_enable_intrs(scsi_qla_host_t *); | ||
128 | static __inline__ void qla2x00_disable_intrs(scsi_qla_host_t *); | ||
129 | |||
130 | static inline void | ||
131 | qla2x00_enable_intrs(scsi_qla_host_t *ha) | ||
132 | { | ||
133 | unsigned long flags = 0; | ||
134 | device_reg_t __iomem *reg = ha->iobase; | ||
135 | |||
136 | spin_lock_irqsave(&ha->hardware_lock, flags); | ||
137 | ha->interrupts_on = 1; | ||
138 | /* enable risc and host interrupts */ | ||
139 | WRT_REG_WORD(®->ictrl, ICR_EN_INT | ICR_EN_RISC); | ||
140 | RD_REG_WORD(®->ictrl); | ||
141 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | ||
142 | |||
143 | } | ||
144 | |||
145 | static inline void | ||
146 | qla2x00_disable_intrs(scsi_qla_host_t *ha) | ||
147 | { | ||
148 | unsigned long flags = 0; | ||
149 | device_reg_t __iomem *reg = ha->iobase; | ||
150 | |||
151 | spin_lock_irqsave(&ha->hardware_lock, flags); | ||
152 | ha->interrupts_on = 0; | ||
153 | /* disable risc and host interrupts */ | ||
154 | WRT_REG_WORD(®->ictrl, 0); | ||
155 | RD_REG_WORD(®->ictrl); | ||
156 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | ||
157 | } | ||
158 | |||
159 | |||
160 | static __inline__ int qla2x00_is_wwn_zero(uint8_t *); | 123 | static __inline__ int qla2x00_is_wwn_zero(uint8_t *); |
161 | 124 | ||
162 | /* | 125 | /* |