• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/scsi/qla4xxx/

Lines Matching defs:ha

10 static inline void eeprom_cmd(uint32_t cmd, struct scsi_qla_host *ha)
12 writel(cmd, isp_nvram(ha));
13 readl(isp_nvram(ha));
17 static inline int eeprom_size(struct scsi_qla_host *ha)
19 return is_qla4010(ha) ? FM93C66A_SIZE_16 : FM93C86A_SIZE_16;
22 static inline int eeprom_no_addr_bits(struct scsi_qla_host *ha)
24 return is_qla4010(ha) ? FM93C56A_NO_ADDR_BITS_16 :
28 static inline int eeprom_no_data_bits(struct scsi_qla_host *ha)
33 static int fm93c56a_select(struct scsi_qla_host * ha)
37 ha->eeprom_cmd_data = AUBURN_EEPROM_CS_1 | 0x000f0000;
38 eeprom_cmd(ha->eeprom_cmd_data, ha);
42 static int fm93c56a_cmd(struct scsi_qla_host * ha, int cmd, int addr)
50 eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1, ha);
52 eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1 |
53 AUBURN_EEPROM_CLK_RISE, ha);
54 eeprom_cmd(ha->eeprom_cmd_data | AUBURN_EEPROM_DO_1 |
55 AUBURN_EEPROM_CLK_FALL, ha);
70 eeprom_cmd(ha->eeprom_cmd_data | dataBit, ha);
73 eeprom_cmd(ha->eeprom_cmd_data | dataBit |
74 AUBURN_EEPROM_CLK_RISE, ha);
75 eeprom_cmd(ha->eeprom_cmd_data | dataBit |
76 AUBURN_EEPROM_CLK_FALL, ha);
80 mask = 1 << (eeprom_no_addr_bits(ha) - 1);
84 for (i = 0; i < eeprom_no_addr_bits(ha); i++) {
92 eeprom_cmd(ha->eeprom_cmd_data | dataBit, ha);
96 eeprom_cmd(ha->eeprom_cmd_data | dataBit |
97 AUBURN_EEPROM_CLK_RISE, ha);
98 eeprom_cmd(ha->eeprom_cmd_data | dataBit |
99 AUBURN_EEPROM_CLK_FALL, ha);
106 static int fm93c56a_deselect(struct scsi_qla_host * ha)
108 ha->eeprom_cmd_data = AUBURN_EEPROM_CS_0 | 0x000f0000;
109 eeprom_cmd(ha->eeprom_cmd_data, ha);
113 static int fm93c56a_datain(struct scsi_qla_host * ha, unsigned short *value)
121 for (i = 0; i < eeprom_no_data_bits(ha); i++) {
122 eeprom_cmd(ha->eeprom_cmd_data |
123 AUBURN_EEPROM_CLK_RISE, ha);
124 eeprom_cmd(ha->eeprom_cmd_data |
125 AUBURN_EEPROM_CLK_FALL, ha);
127 dataBit = (readw(isp_nvram(ha)) & AUBURN_EEPROM_DI_1) ? 1 : 0;
137 struct scsi_qla_host * ha)
139 fm93c56a_select(ha);
140 fm93c56a_cmd(ha, FM93C56A_READ, eepromAddr);
141 fm93c56a_datain(ha, value);
142 fm93c56a_deselect(ha);
147 u16 rd_nvram_word(struct scsi_qla_host * ha, int offset)
152 eeprom_readword(offset, &val, ha);
156 int qla4xxx_is_nvram_configuration_valid(struct scsi_qla_host * ha)
163 spin_lock_irqsave(&ha->hardware_lock, flags);
164 for (index = 0; index < eeprom_size(ha); index++)
165 checksum += rd_nvram_word(ha, index);
166 spin_unlock_irqrestore(&ha->hardware_lock, flags);
179 int ql4xxx_sem_spinlock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits)
186 "0x%x\n", ha->host_no, sem_mask, sem_bits));
188 spin_lock_irqsave(&ha->hardware_lock, flags);
189 writel((sem_mask | sem_bits), isp_semaphore(ha));
190 value = readw(isp_semaphore(ha));
191 spin_unlock_irqrestore(&ha->hardware_lock, flags);
194 "code = 0x%x\n", ha->host_no,
203 void ql4xxx_sem_unlock(struct scsi_qla_host * ha, u32 sem_mask)
207 spin_lock_irqsave(&ha->hardware_lock, flags);
208 writel(sem_mask, isp_semaphore(ha));
209 readl(isp_semaphore(ha));
210 spin_unlock_irqrestore(&ha->hardware_lock, flags);
212 DEBUG2(printk("scsi%ld : UNLOCK SEM - mask= 0x%x\n", ha->host_no,
216 int ql4xxx_sem_lock(struct scsi_qla_host * ha, u32 sem_mask, u32 sem_bits)
221 spin_lock_irqsave(&ha->hardware_lock, flags);
222 writel((sem_mask | sem_bits), isp_semaphore(ha));
223 value = readw(isp_semaphore(ha));
224 spin_unlock_irqrestore(&ha->hardware_lock, flags);
227 "0x%x, sema code=0x%x\n", ha->host_no,