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

Lines Matching defs:ha

17 	struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
19 char *rbuf = (char *)ha->fw_dump;
21 if (ha->fw_dump_reading == 0)
23 if (off > ha->fw_dump_len)
25 if (off + count > ha->fw_dump_len)
26 count = ha->fw_dump_len - off;
37 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
47 if (!ha->fw_dump_reading)
50 qla_printk(KERN_INFO, ha,
51 "Firmware dump cleared on (%ld).\n", ha->host_no);
53 ha->fw_dump_reading = 0;
54 ha->fw_dumped = 0;
57 if (ha->fw_dumped && !ha->fw_dump_reading) {
58 ha->fw_dump_reading = 1;
60 qla_printk(KERN_INFO, ha,
62 ha->host_no);
66 qla2x00_alloc_fw_dump(ha);
87 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
95 spin_lock_irqsave(&ha->hardware_lock, flags);
96 ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->nvram_base,
97 ha->nvram_size);
98 spin_unlock_irqrestore(&ha->hardware_lock, flags);
100 return ha->nvram_size;
107 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
112 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->nvram_size)
116 if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) {
139 spin_lock_irqsave(&ha->hardware_lock, flags);
140 ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->nvram_base, count);
141 spin_unlock_irqrestore(&ha->hardware_lock, flags);
143 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
163 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
166 if (ha->optrom_state != QLA_SREADING)
168 if (off > ha->optrom_size)
170 if (off + count > ha->optrom_size)
171 count = ha->optrom_size - off;
173 memcpy(buf, &ha->optrom_buffer[off], count);
182 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
185 if (ha->optrom_state != QLA_SWRITING)
187 if (off > ha->optrom_size)
189 if (off + count > ha->optrom_size)
190 count = ha->optrom_size - off;
192 memcpy(&ha->optrom_buffer[off], buf, count);
212 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
224 if (ha->optrom_state != QLA_SREADING &&
225 ha->optrom_state != QLA_SWRITING)
228 ha->optrom_state = QLA_SWAITING;
229 vfree(ha->optrom_buffer);
230 ha->optrom_buffer = NULL;
233 if (ha->optrom_state != QLA_SWAITING)
236 ha->optrom_state = QLA_SREADING;
237 ha->optrom_buffer = (uint8_t *)vmalloc(ha->optrom_size);
238 if (ha->optrom_buffer == NULL) {
239 qla_printk(KERN_WARNING, ha,
241 "(%x).\n", ha->optrom_size);
243 ha->optrom_state = QLA_SWAITING;
247 memset(ha->optrom_buffer, 0, ha->optrom_size);
248 ha->isp_ops.read_optrom(ha, ha->optrom_buffer, 0,
249 ha->optrom_size);
252 if (ha->optrom_state != QLA_SWAITING)
255 ha->optrom_state = QLA_SWRITING;
256 ha->optrom_buffer = (uint8_t *)vmalloc(ha->optrom_size);
257 if (ha->optrom_buffer == NULL) {
258 qla_printk(KERN_WARNING, ha,
260 "(%x).\n", ha->optrom_size);
262 ha->optrom_state = QLA_SWAITING;
265 memset(ha->optrom_buffer, 0, ha->optrom_size);
268 if (ha->optrom_state != QLA_SWRITING)
271 ha->isp_ops.write_optrom(ha, ha->optrom_buffer, 0,
272 ha->optrom_size);
292 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
300 spin_lock_irqsave(&ha->hardware_lock, flags);
301 ha->isp_ops.read_nvram(ha, (uint8_t *)buf, ha->vpd_base, ha->vpd_size);
302 spin_unlock_irqrestore(&ha->hardware_lock, flags);
304 return ha->vpd_size;
311 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
315 if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size)
319 spin_lock_irqsave(&ha->hardware_lock, flags);
320 ha->isp_ops.write_nvram(ha, (uint8_t *)buf, ha->vpd_base, count);
321 spin_unlock_irqrestore(&ha->hardware_lock, flags);
341 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
358 rval = qla2x00_read_sfp(ha, ha->sfp_data_dma, addr, offset,
361 qla_printk(KERN_WARNING, ha,
367 memcpy(buf, ha->sfp_data, SFP_BLOCK_SIZE);
399 qla2x00_alloc_sysfs_attr(scsi_qla_host_t *ha)
401 struct Scsi_Host *host = ha->host;
406 if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)))
412 qla_printk(KERN_INFO, ha,
419 qla2x00_free_sysfs_attr(scsi_qla_host_t *ha)
421 struct Scsi_Host *host = ha->host;
425 if (iter->is4GBp_only && (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)))
432 if (ha->beacon_blink_led == 1)
433 ha->isp_ops.beacon_off(ha);
447 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
451 ha->isp_ops.fw_version_str(ha, fw_str));
457 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
460 sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | ha->serial1;
468 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
469 return snprintf(buf, PAGE_SIZE, "ISP%04X\n", ha->pdev->device);
475 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
477 ha->product_id[0], ha->product_id[1], ha->product_id[2],
478 ha->product_id[3]);
484 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
485 return snprintf(buf, PAGE_SIZE, "%s\n", ha->model_number);
491 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
493 ha->model_desc ? ha->model_desc: "");
499 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
503 ha->isp_ops.pci_info_str(ha, pci_info));
509 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
512 if (atomic_read(&ha->loop_state) == LOOP_DOWN ||
513 atomic_read(&ha->loop_state) == LOOP_DEAD)
515 else if (atomic_read(&ha->loop_state) != LOOP_READY ||
516 test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) ||
517 test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags))
522 switch (ha->current_topology) {
547 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
550 switch (ha->zio_mode) {
564 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
568 if (!IS_ZIO_SUPPORTED(ha))
580 if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) {
581 ha->zio_mode = zio_mode;
582 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
590 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
592 return snprintf(buf, PAGE_SIZE, "%d us\n", ha->zio_timer * 100);
599 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
609 ha->zio_timer = zio_timer;
617 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
620 if (ha->beacon_blink_led)
631 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
635 if (IS_QLA2100(ha) || IS_QLA2200(ha))
638 if (test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) {
639 qla_printk(KERN_WARNING, ha,
648 rval = ha->isp_ops.beacon_on(ha);
650 rval = ha->isp_ops.beacon_off(ha);
661 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
663 return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->bios_revision[1],
664 ha->bios_revision[0]);
670 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
672 return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->efi_revision[1],
673 ha->efi_revision[0]);
679 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
681 return snprintf(buf, PAGE_SIZE, "%d.%02d\n", ha->fcode_revision[1],
682 ha->fcode_revision[0]);
688 scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev));
691 ha->fw_revision[0], ha->fw_revision[1], ha->fw_revision[2],
692 ha->fw_revision[3]);
745 scsi_qla_host_t *ha = to_qla_host(shost);
747 fc_host_port_id(shost) = ha->d_id.b.domain << 16 |
748 ha->d_id.b.area << 8 | ha->d_id.b.al_pa;
754 scsi_qla_host_t *ha = to_qla_host(shost);
757 switch (ha->link_data_rate) {
774 scsi_qla_host_t *ha = to_qla_host(shost);
777 switch (ha->current_topology) {
798 scsi_qla_host_t *ha = to_qla_host(host);
802 list_for_each_entry(fcport, &ha->fcports, list) {
816 scsi_qla_host_t *ha = to_qla_host(host);
820 list_for_each_entry(fcport, &ha->fcports, list) {
834 scsi_qla_host_t *ha = to_qla_host(host);
838 list_for_each_entry(fcport, &ha->fcports, list) {
853 scsi_qla_host_t *ha = to_qla_host(host);
855 rport->dev_loss_tmo = ha->port_down_retry_count + 5;
862 scsi_qla_host_t *ha = to_qla_host(host);
865 ha->port_down_retry_count = timeout;
867 ha->port_down_retry_count = 1;
869 rport->dev_loss_tmo = ha->port_down_retry_count + 5;
875 scsi_qla_host_t *ha = to_qla_host(shost);
877 set_bit(LOOP_RESET_NEEDED, &ha->dpc_flags);
884 scsi_qla_host_t *ha = to_qla_host(shost);
891 pfc_host_stat = &ha->fc_host_stat;
894 if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) {
895 rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf,
897 } else if (atomic_read(&ha->loop_state) == LOOP_READY &&
898 !test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) &&
899 !test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) &&
900 !ha->dpc_active) {
902 rval = qla2x00_get_link_status(ha, ha->loop_id, &stat_buf,
922 scsi_qla_host_t *ha = to_qla_host(shost);
924 qla2x00_get_sym_node_name(ha, fc_host_symbolic_name(shost));
930 scsi_qla_host_t *ha = to_qla_host(shost);
932 set_bit(REGISTER_FDMI_NEEDED, &ha->dpc_flags);
938 scsi_qla_host_t *ha = to_qla_host(shost);
941 if (ha->device_flags & SWITCH_FOUND)
942 node_name = wwn_to_u64(ha->fabric_node_name);
944 node_name = wwn_to_u64(ha->node_name);
952 scsi_qla_host_t *ha = to_qla_host(shost);
954 if (!ha->flags.online)
956 else if (atomic_read(&ha->loop_state) == LOOP_TIMEOUT)
1002 qla2x00_init_host_attr(scsi_qla_host_t *ha)
1004 fc_host_node_name(ha->host) = wwn_to_u64(ha->node_name);
1005 fc_host_port_name(ha->host) = wwn_to_u64(ha->port_name);
1006 fc_host_supported_classes(ha->host) = FC_COS_CLASS3;