• 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

12 qla2xxx_prep_dump(scsi_qla_host_t *ha, struct qla2xxx_fw_dump *fw_dump)
14 fw_dump->fw_major_version = htonl(ha->fw_major_version);
15 fw_dump->fw_minor_version = htonl(ha->fw_minor_version);
16 fw_dump->fw_subminor_version = htonl(ha->fw_subminor_version);
17 fw_dump->fw_attributes = htonl(ha->fw_attributes);
19 fw_dump->vendor = htonl(ha->pdev->vendor);
20 fw_dump->device = htonl(ha->pdev->device);
21 fw_dump->subsystem_vendor = htonl(ha->pdev->subsystem_vendor);
22 fw_dump->subsystem_device = htonl(ha->pdev->subsystem_device);
26 qla2xxx_copy_queues(scsi_qla_host_t *ha, void *ptr)
29 memcpy(ptr, ha->request_ring, ha->request_q_length *
33 ptr += ha->request_q_length * sizeof(request_t);
34 memcpy(ptr, ha->response_ring, ha->response_q_length *
37 return ptr + (ha->response_q_length * sizeof(response_t));
42 * @ha: HA context
46 qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
54 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
65 spin_lock_irqsave(&ha->hardware_lock, flags);
67 if (!ha->fw_dump) {
68 qla_printk(KERN_WARNING, ha,
73 if (ha->fw_dumped) {
74 qla_printk(KERN_WARNING, ha,
76 "request...\n", ha->fw_dump);
79 fw = &ha->fw_dump->isp.isp23;
80 qla2xxx_prep_dump(ha, ha->fw_dump);
87 if (IS_QLA2300(ha)) {
196 if (!IS_QLA2300(ha)) {
197 for (cnt = 30000; RD_MAILBOX_REG(ha, reg, 0) != 0 &&
209 WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_WORD);
210 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
214 WRT_MAILBOX_REG(ha, reg, 1, (uint16_t)risc_address);
225 &ha->mbx_cmd_flags);
227 mb0 = RD_MAILBOX_REG(ha, reg, 0);
228 mb2 = RD_MAILBOX_REG(ha, reg, 2);
238 &ha->mbx_cmd_flags);
240 mb0 = RD_MAILBOX_REG(ha, reg, 0);
241 mb2 = RD_MAILBOX_REG(ha, reg, 2);
256 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
267 WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_EXTENDED);
268 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
272 WRT_MAILBOX_REG(ha, reg, 1, LSW(risc_address));
273 WRT_MAILBOX_REG(ha, reg, 8, MSW(risc_address));
284 &ha->mbx_cmd_flags);
286 mb0 = RD_MAILBOX_REG(ha, reg, 0);
287 mb2 = RD_MAILBOX_REG(ha, reg, 2);
297 &ha->mbx_cmd_flags);
299 mb0 = RD_MAILBOX_REG(ha, reg, 0);
300 mb2 = RD_MAILBOX_REG(ha, reg, 2);
315 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
326 data_ram_cnt = ha->fw_memory_size - risc_address + 1;
327 WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_EXTENDED);
328 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
332 WRT_MAILBOX_REG(ha, reg, 1, LSW(risc_address));
333 WRT_MAILBOX_REG(ha, reg, 8, MSW(risc_address));
344 &ha->mbx_cmd_flags);
346 mb0 = RD_MAILBOX_REG(ha, reg, 0);
347 mb2 = RD_MAILBOX_REG(ha, reg, 2);
357 &ha->mbx_cmd_flags);
359 mb0 = RD_MAILBOX_REG(ha, reg, 0);
360 mb2 = RD_MAILBOX_REG(ha, reg, 2);
375 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
384 qla2xxx_copy_queues(ha, &fw->data_ram[cnt]);
387 qla_printk(KERN_WARNING, ha,
389 ha->fw_dumped = 0;
392 qla_printk(KERN_INFO, ha,
394 ha->host_no, ha->fw_dump);
395 ha->fw_dumped = 1;
400 spin_unlock_irqrestore(&ha->hardware_lock, flags);
405 * @ha: HA context
409 qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
415 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
425 spin_lock_irqsave(&ha->hardware_lock, flags);
427 if (!ha->fw_dump) {
428 qla_printk(KERN_WARNING, ha,
433 if (ha->fw_dumped) {
434 qla_printk(KERN_WARNING, ha,
436 "request...\n", ha->fw_dump);
439 fw = &ha->fw_dump->isp.isp21;
440 qla2xxx_prep_dump(ha, ha->fw_dump);
460 for (cnt = 0; cnt < ha->mbx_count; cnt++) {
537 for (cnt = 30000; RD_MAILBOX_REG(ha, reg, 0) != 0 &&
546 if (rval == QLA_SUCCESS && (IS_QLA2200(ha) || (IS_QLA2100(ha) &&
560 if (IS_QLA2100(ha))
574 WRT_MAILBOX_REG(ha, reg, 0, MBC_READ_RAM_WORD);
575 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
579 WRT_MAILBOX_REG(ha, reg, 1, risc_address);
587 &ha->mbx_cmd_flags);
589 mb0 = RD_MAILBOX_REG(ha, reg, 0);
590 mb2 = RD_MAILBOX_REG(ha, reg, 2);
604 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
613 qla2xxx_copy_queues(ha, &fw->risc_ram[cnt]);
616 qla_printk(KERN_WARNING, ha,
618 ha->fw_dumped = 0;
621 qla_printk(KERN_INFO, ha,
623 ha->host_no, ha->fw_dump);
624 ha->fw_dumped = 1;
629 spin_unlock_irqrestore(&ha->hardware_lock, flags);
633 qla24xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
641 struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
655 spin_lock_irqsave(&ha->hardware_lock, flags);
657 if (!ha->fw_dump) {
658 qla_printk(KERN_WARNING, ha,
663 if (ha->fw_dumped) {
664 qla_printk(KERN_WARNING, ha,
666 "request...\n", ha->fw_dump);
669 fw = &ha->fw_dump->isp.isp24;
670 qla2xxx_prep_dump(ha, ha->fw_dump);
1186 pci_read_config_word(ha->pdev, PCI_COMMAND, &wd);
1222 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
1240 &ha->mbx_cmd_flags);
1259 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
1270 ext_mem_cnt = ha->fw_memory_size - 0x100000 + 1;
1272 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
1290 &ha->mbx_cmd_flags);
1309 if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) {
1318 eft = qla2xxx_copy_queues(ha, &fw->ext_mem[cnt]);
1319 if (ha->eft)
1320 memcpy(eft, ha->eft, ntohl(ha->fw_dump->eft_size));
1324 qla_printk(KERN_WARNING, ha,
1326 ha->fw_dumped = 0;
1329 qla_printk(KERN_INFO, ha,
1331 ha->host_no, ha->fw_dump);
1332 ha->fw_dumped = 1;
1337 spin_unlock_irqrestore(&ha->hardware_lock, flags);
1345 qla2x00_dump_regs(scsi_qla_host_t *ha)
1347 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
1351 ha->host_no, RD_MAILBOX_REG(ha, reg, 0));
1353 ha->host_no, RD_MAILBOX_REG(ha, reg, 1));
1355 ha->host_no, RD_MAILBOX_REG(ha, reg, 2));
1357 ha->host_no, RD_MAILBOX_REG(ha, reg, 3));
1359 ha->host_no, RD_MAILBOX_REG(ha, reg, 4));
1361 ha->host_no, RD_MAILBOX_REG(ha, reg, 5));
1399 struct scsi_qla_host *ha;
1402 ha = (struct scsi_qla_host *)cmd->device->host->hostdata;