Lines Matching refs:ha

16 	struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
19 if (is_qla40XX(ha))
22 if (!test_bit(AF_82XX_DUMP_READING, &ha->flags))
25 return memory_read_from_buffer(buf, count, &off, ha->fw_dump,
26 ha->fw_dump_size);
34 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
40 if (is_qla40XX(ha))
49 ql4_printk(KERN_ERR, ha, "%s: Invalid input. Return err %d\n",
57 if (test_and_clear_bit(AF_82XX_DUMP_READING, &ha->flags)) {
58 clear_bit(AF_82XX_FW_DUMPED, &ha->flags);
60 qla4xxx_alloc_fw_dump(ha);
61 DEBUG2(ql4_printk(KERN_INFO, ha,
67 if (test_bit(AF_82XX_FW_DUMPED, &ha->flags) &&
68 !test_bit(AF_82XX_DUMP_READING, &ha->flags)) {
69 set_bit(AF_82XX_DUMP_READING, &ha->flags);
70 DEBUG2(ql4_printk(KERN_INFO, ha,
72 ha->host_no));
77 ha->isp_ops->idc_lock(ha);
78 dev_state = qla4_8xxx_rd_direct(ha, QLA8XXX_CRB_DEV_STATE);
80 ql4_printk(KERN_INFO, ha, "%s: Setting Need reset\n",
82 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
84 if (is_qla8022(ha) ||
85 ((is_qla8032(ha) || is_qla8042(ha)) &&
86 qla4_83xx_can_perform_reset(ha))) {
87 set_bit(AF_8XXX_RST_OWNER, &ha->flags);
88 set_bit(AF_FW_RECOVERY, &ha->flags);
89 ql4_printk(KERN_INFO, ha, "%s: Reset owner is 0x%x\n",
90 __func__, ha->func_num);
93 ql4_printk(KERN_INFO, ha,
97 ha->isp_ops->idc_unlock(ha);
125 void qla4_8xxx_alloc_sysfs_attr(struct scsi_qla_host *ha)
127 struct Scsi_Host *host = ha->host;
135 ql4_printk(KERN_ERR, ha,
141 void qla4_8xxx_free_sysfs_attr(struct scsi_qla_host *ha)
143 struct Scsi_Host *host = ha->host;
156 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
158 if (is_qla80XX(ha))
160 ha->fw_info.fw_major, ha->fw_info.fw_minor,
161 ha->fw_info.fw_patch, ha->fw_info.fw_build);
164 ha->fw_info.fw_major, ha->fw_info.fw_minor,
165 ha->fw_info.fw_patch, ha->fw_info.fw_build);
172 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
173 return snprintf(buf, PAGE_SIZE, "%s\n", ha->serial_number);
180 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
181 return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->fw_info.iscsi_major,
182 ha->fw_info.iscsi_minor);
189 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
191 ha->fw_info.bootload_major, ha->fw_info.bootload_minor,
192 ha->fw_info.bootload_patch, ha->fw_info.bootload_build);
199 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
200 return snprintf(buf, PAGE_SIZE, "0x%08X\n", ha->board_id);
207 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
209 qla4xxx_get_firmware_state(ha);
210 return snprintf(buf, PAGE_SIZE, "0x%08X%8X\n", ha->firmware_state,
211 ha->addl_fw_state);
218 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
220 if (is_qla40XX(ha))
223 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_cnt);
230 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
232 if (is_qla40XX(ha))
235 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->phy_port_num);
242 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
244 if (is_qla40XX(ha))
247 return snprintf(buf, PAGE_SIZE, "0x%04X\n", ha->iscsi_pci_func_cnt);
254 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
256 return snprintf(buf, PAGE_SIZE, "%s\n", ha->model_name);
263 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
264 return snprintf(buf, PAGE_SIZE, "%s %s\n", ha->fw_info.fw_build_date,
265 ha->fw_info.fw_build_time);
272 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
273 return snprintf(buf, PAGE_SIZE, "%s\n", ha->fw_info.fw_build_user);
280 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
281 return snprintf(buf, PAGE_SIZE, "%s\n", ha->fw_info.extended_timestamp);
288 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
291 switch (ha->fw_info.fw_load_source) {
310 struct scsi_qla_host *ha = to_qla_host(class_to_shost(dev));
311 qla4xxx_about_firmware(ha);
312 return snprintf(buf, PAGE_SIZE, "%u.%u secs\n", ha->fw_uptime_secs,
313 ha->fw_uptime_msecs);