Lines Matching refs:ha

277 static void ips_free_flash_copperhead(ips_ha_t * ha);
328 static int ips_abort_init(ips_ha_t * ha, int index);
334 static int ips_poll_for_flush_complete(ips_ha_t * ha);
335 static void ips_flush_and_reset(ips_ha_t *ha);
583 ips_setup_funclist(ips_ha_t * ha) in ips_setup_funclist() argument
589 if (IPS_IS_MORPHEUS(ha) || IPS_IS_MARCO(ha)) { in ips_setup_funclist()
591 ha->func.isintr = ips_isintr_morpheus; in ips_setup_funclist()
592 ha->func.isinit = ips_isinit_morpheus; in ips_setup_funclist()
593 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
594 ha->func.init = ips_init_morpheus; in ips_setup_funclist()
595 ha->func.statupd = ips_statupd_morpheus; in ips_setup_funclist()
596 ha->func.reset = ips_reset_morpheus; in ips_setup_funclist()
597 ha->func.intr = ips_intr_morpheus; in ips_setup_funclist()
598 ha->func.enableint = ips_enable_int_morpheus; in ips_setup_funclist()
599 } else if (IPS_USE_MEMIO(ha)) { in ips_setup_funclist()
601 ha->func.isintr = ips_isintr_copperhead_memio; in ips_setup_funclist()
602 ha->func.isinit = ips_isinit_copperhead_memio; in ips_setup_funclist()
603 ha->func.init = ips_init_copperhead_memio; in ips_setup_funclist()
604 ha->func.statupd = ips_statupd_copperhead_memio; in ips_setup_funclist()
605 ha->func.statinit = ips_statinit_memio; in ips_setup_funclist()
606 ha->func.reset = ips_reset_copperhead_memio; in ips_setup_funclist()
607 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
608 ha->func.erasebios = ips_erase_bios_memio; in ips_setup_funclist()
609 ha->func.programbios = ips_program_bios_memio; in ips_setup_funclist()
610 ha->func.verifybios = ips_verify_bios_memio; in ips_setup_funclist()
611 ha->func.enableint = ips_enable_int_copperhead_memio; in ips_setup_funclist()
612 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
613 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
615 ha->func.issue = ips_issue_copperhead_memio; in ips_setup_funclist()
618 ha->func.isintr = ips_isintr_copperhead; in ips_setup_funclist()
619 ha->func.isinit = ips_isinit_copperhead; in ips_setup_funclist()
620 ha->func.init = ips_init_copperhead; in ips_setup_funclist()
621 ha->func.statupd = ips_statupd_copperhead; in ips_setup_funclist()
622 ha->func.statinit = ips_statinit; in ips_setup_funclist()
623 ha->func.reset = ips_reset_copperhead; in ips_setup_funclist()
624 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
625 ha->func.erasebios = ips_erase_bios; in ips_setup_funclist()
626 ha->func.programbios = ips_program_bios; in ips_setup_funclist()
627 ha->func.verifybios = ips_verify_bios; in ips_setup_funclist()
628 ha->func.enableint = ips_enable_int_copperhead; in ips_setup_funclist()
630 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
631 ha->func.issue = ips_issue_i2o; in ips_setup_funclist()
633 ha->func.issue = ips_issue_copperhead; in ips_setup_funclist()
650 ips_ha_t *ha; in ips_release() local
666 ha = IPS_HA(sh); in ips_release()
668 if (!ha) in ips_release()
672 scb = &ha->scbs[ha->max_cmds - 1]; in ips_release()
674 ips_init_scb(ha, scb); in ips_release()
680 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_release()
687 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_release()
690 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == IPS_FAILURE) in ips_release()
691 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Incomplete Flush.\n"); in ips_release()
693 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Complete.\n"); in ips_release()
699 ips_free(ha); in ips_release()
702 free_irq(ha->pcidev->irq, ha); in ips_release()
724 ips_ha_t *ha; in ips_halt() local
732 ha = (ips_ha_t *) ips_ha[i]; in ips_halt()
734 if (!ha) in ips_halt()
737 if (!ha->active) in ips_halt()
741 scb = &ha->scbs[ha->max_cmds - 1]; in ips_halt()
743 ips_init_scb(ha, scb); in ips_halt()
749 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_halt()
756 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_halt()
759 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == in ips_halt()
761 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
764 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
782 ips_ha_t *ha; in ips_eh_abort() local
793 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_eh_abort()
795 if (!ha) in ips_eh_abort()
798 if (!ha->active) in ips_eh_abort()
804 item = ha->copp_waitlist.head; in ips_eh_abort()
810 ips_removeq_copp(&ha->copp_waitlist, item); in ips_eh_abort()
814 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in ips_eh_abort()
841 ips_ha_t *ha; in __ips_eh_reset() local
857 ha = (ips_ha_t *) SC->device->host->hostdata; in __ips_eh_reset()
859 if (!ha) { in __ips_eh_reset()
865 if (!ha->active) in __ips_eh_reset()
869 item = ha->copp_waitlist.head; in __ips_eh_reset()
875 ips_removeq_copp(&ha->copp_waitlist, item); in __ips_eh_reset()
880 if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in __ips_eh_reset()
895 if (ha->ioctl_reset == 0) { /* IF Not an IOCTL Requested Reset */ in __ips_eh_reset()
896 scb = &ha->scbs[ha->max_cmds - 1]; in __ips_eh_reset()
898 ips_init_scb(ha, scb); in __ips_eh_reset()
904 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in __ips_eh_reset()
912 ret = ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_IORL); in __ips_eh_reset()
914 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
923 ha->ioctl_reset = 0; /* Reset the IOCTL Requested Reset Flag */ in __ips_eh_reset()
929 IPS_PRINTK(KERN_NOTICE, ha->pcidev, "Resetting controller.\n"); in __ips_eh_reset()
930 ret = (*ha->func.reset) (ha); in __ips_eh_reset()
935 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
940 ips_name, ha->host_num); in __ips_eh_reset()
942 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
945 ips_freescb(ha, scb); in __ips_eh_reset()
950 ips_name, ha->host_num); in __ips_eh_reset()
952 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
957 ha->active = FALSE; in __ips_eh_reset()
961 if (!ips_clear_adapter(ha, IPS_INTR_IORL)) { in __ips_eh_reset()
964 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
969 ips_name, ha->host_num); in __ips_eh_reset()
971 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
974 ips_freescb(ha, scb); in __ips_eh_reset()
979 ips_name, ha->host_num); in __ips_eh_reset()
981 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
986 ha->active = FALSE; in __ips_eh_reset()
991 if (le32_to_cpu(ha->subsys->param[3]) & 0x300000) { in __ips_eh_reset()
995 ha->last_ffdc = tv.tv_sec; in __ips_eh_reset()
996 ha->reset_count++; in __ips_eh_reset()
997 ips_ffdc_reset(ha, IPS_INTR_IORL); in __ips_eh_reset()
1001 DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num); in __ips_eh_reset()
1003 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
1006 ips_freescb(ha, scb); in __ips_eh_reset()
1010 for (i = 1; i < ha->nbus; i++) in __ips_eh_reset()
1011 ha->dcdb_active[i - 1] = 0; in __ips_eh_reset()
1014 ha->num_ioctl = 0; in __ips_eh_reset()
1016 ips_next(ha, IPS_INTR_IORL); in __ips_eh_reset()
1048 ips_ha_t *ha; in ips_queue_lck() local
1053 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_queue_lck()
1055 if (!ha) in ips_queue_lck()
1058 if (!ha->active) in ips_queue_lck()
1062 if (ha->copp_waitlist.count == IPS_MAX_IOCTL_QUEUE) { in ips_queue_lck()
1068 } else if (ha->scb_waitlist.count == IPS_MAX_QUEUE) { in ips_queue_lck()
1079 ha->host_num, in ips_queue_lck()
1085 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { in ips_queue_lck()
1102 if (ha->scb_activelist.count != 0) { in ips_queue_lck()
1107 ha->ioctl_reset = 1; /* This reset request is from an IOCTL */ in ips_queue_lck()
1127 ips_putq_copp_tail(&ha->copp_waitlist, scratch); in ips_queue_lck()
1129 ips_putq_wait_tail(&ha->scb_waitlist, SC); in ips_queue_lck()
1132 ips_next(ha, IPS_INTR_IORL); in ips_queue_lck()
1151 ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; in DEF_SCSI_QCMD() local
1158 if (!ha) in DEF_SCSI_QCMD()
1162 if (!ha->active) in DEF_SCSI_QCMD()
1165 if (!ips_read_adapter_status(ha, IPS_INTR_ON)) in DEF_SCSI_QCMD()
1169 if ((capacity > 0x400000) && ((ha->enq->ucMiscFlag & 0x8) == 0)) { in DEF_SCSI_QCMD()
1201 ips_ha_t *ha; in ips_slave_configure() local
1204 ha = IPS_HA(SDptr->host); in ips_slave_configure()
1206 min = ha->max_cmds / 2; in ips_slave_configure()
1207 if (ha->enq->ucLogDriveCount <= 2) in ips_slave_configure()
1208 min = ha->max_cmds - 1; in ips_slave_configure()
1229 ips_ha_t *ha; in do_ipsintr() local
1235 ha = (ips_ha_t *) dev_id; in do_ipsintr()
1236 if (!ha) in do_ipsintr()
1238 host = ips_sh[ha->host_num]; in do_ipsintr()
1241 (*ha->func.intr) (ha); in do_ipsintr()
1247 if (!ha->active) { in do_ipsintr()
1252 irqstatus = (*ha->func.intr) (ha); in do_ipsintr()
1257 ips_next(ha, IPS_INTR_ON); in do_ipsintr()
1273 ips_intr_copperhead(ips_ha_t * ha) in ips_intr_copperhead() argument
1282 if (!ha) in ips_intr_copperhead()
1285 if (!ha->active) in ips_intr_copperhead()
1288 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1299 sp = &ha->sp; in ips_intr_copperhead()
1301 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1306 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_copperhead()
1313 ips_chkstatus(ha, &cstatus); in ips_intr_copperhead()
1320 (*scb->callback) (ha, scb); in ips_intr_copperhead()
1337 ips_intr_morpheus(ips_ha_t * ha) in ips_intr_morpheus() argument
1346 if (!ha) in ips_intr_morpheus()
1349 if (!ha->active) in ips_intr_morpheus()
1352 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1363 sp = &ha->sp; in ips_intr_morpheus()
1365 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1370 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_morpheus()
1377 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_intr_morpheus()
1383 ips_chkstatus(ha, &cstatus); in ips_intr_morpheus()
1390 (*scb->callback) (ha, scb); in ips_intr_morpheus()
1409 ips_ha_t *ha; in ips_info() local
1413 ha = IPS_HA(SH); in ips_info()
1415 if (!ha) in ips_info()
1424 if (ha->ad_type > 0 && ha->ad_type <= MAX_ADAPTER_NAME) { in ips_info()
1426 strcat(bp, ips_adapter_name[ha->ad_type - 1]); in ips_info()
1437 ips_ha_t *ha = NULL; in ips_write_info() local
1443 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_write_info()
1449 if (!ha) in ips_write_info()
1459 ips_ha_t *ha = NULL; in ips_show_info() local
1465 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_show_info()
1471 if (!ha) in ips_show_info()
1474 return ips_host_info(ha, m); in ips_show_info()
1531 ips_alloc_passthru_buffer(ips_ha_t * ha, int length) in ips_alloc_passthru_buffer() argument
1536 if (ha->ioctl_data && length <= ha->ioctl_len) in ips_alloc_passthru_buffer()
1539 bigger_buf = pci_alloc_consistent(ha->pcidev, length, &dma_busaddr); in ips_alloc_passthru_buffer()
1542 pci_free_consistent(ha->pcidev, ha->ioctl_len, ha->ioctl_data, in ips_alloc_passthru_buffer()
1543 ha->ioctl_busaddr); in ips_alloc_passthru_buffer()
1545 ha->ioctl_data = (char *) bigger_buf; in ips_alloc_passthru_buffer()
1546 ha->ioctl_len = length; in ips_alloc_passthru_buffer()
1547 ha->ioctl_busaddr = dma_busaddr; in ips_alloc_passthru_buffer()
1564 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr) in ips_make_passthru() argument
1579 ips_name, ha->host_num); in ips_make_passthru()
1582 if (ips_alloc_passthru_buffer(ha, length)) { in ips_make_passthru()
1585 if (ha->ioctl_data) { in ips_make_passthru()
1586 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1594 ha->ioctl_datasize = length; in ips_make_passthru()
1596 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize); in ips_make_passthru()
1597 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1611 memcpy(ha->ioctl_data + sizeof (ips_passthru_t), in ips_make_passthru()
1613 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1626 ips_name, ha->host_num); in ips_make_passthru()
1631 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_make_passthru()
1634 ret = ips_flash_copperhead(ha, pt, scb); in ips_make_passthru()
1635 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1639 if (ips_usrcmd(ha, pt, scb)) in ips_make_passthru()
1658 ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_copperhead() argument
1664 if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { in ips_flash_copperhead()
1665 if (ips_usrcmd(ha, pt, scb)) in ips_flash_copperhead()
1678 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1681 ha->flash_data = ips_FlashData; in ips_flash_copperhead()
1682 ha->flash_busaddr = ips_flashbusaddr; in ips_flash_copperhead()
1683 ha->flash_len = PAGE_SIZE << 7; in ips_flash_copperhead()
1684 ha->flash_datasize = 0; in ips_flash_copperhead()
1685 } else if (!ha->flash_data) { in ips_flash_copperhead()
1688 ha->flash_data = pci_alloc_consistent(ha->pcidev, in ips_flash_copperhead()
1690 &ha->flash_busaddr); in ips_flash_copperhead()
1691 if (!ha->flash_data){ in ips_flash_copperhead()
1695 ha->flash_datasize = 0; in ips_flash_copperhead()
1696 ha->flash_len = datasize; in ips_flash_copperhead()
1700 if (pt->CoppCP.cmd.flashfw.count + ha->flash_datasize > in ips_flash_copperhead()
1701 ha->flash_len) { in ips_flash_copperhead()
1702 ips_free_flash_copperhead(ha); in ips_flash_copperhead()
1703 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_flash_copperhead()
1708 if (!ha->flash_data) in ips_flash_copperhead()
1711 memcpy(&ha->flash_data[ha->flash_datasize], pt + 1, in ips_flash_copperhead()
1713 ha->flash_datasize += pt->CoppCP.cmd.flashfw.count; in ips_flash_copperhead()
1717 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1719 return ips_flash_firmware(ha, pt, scb); in ips_flash_copperhead()
1730 ips_flash_bios(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_bios() argument
1735 if ((!ha->func.programbios) || (!ha->func.erasebios) || in ips_flash_bios()
1736 (!ha->func.verifybios)) in ips_flash_bios()
1738 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1741 ips_name, ha->host_num); in ips_flash_bios()
1744 if ((*ha->func.programbios) (ha, in ips_flash_bios()
1745 ha->flash_data + in ips_flash_bios()
1747 ha->flash_datasize - in ips_flash_bios()
1751 ips_name, ha->host_num); in ips_flash_bios()
1754 if ((*ha->func.verifybios) (ha, in ips_flash_bios()
1755 ha->flash_data + in ips_flash_bios()
1757 ha->flash_datasize - in ips_flash_bios()
1761 ips_name, ha->host_num); in ips_flash_bios()
1764 ips_free_flash_copperhead(ha); in ips_flash_bios()
1768 if (!ha->func.erasebios) in ips_flash_bios()
1770 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1773 ips_name, ha->host_num); in ips_flash_bios()
1781 ips_free_flash_copperhead(ha); in ips_flash_bios()
1794 ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, in ips_fill_scb_sg_single() argument
1800 if ((scb->data_len + e_len) > ha->max_xfer) { in ips_fill_scb_sg_single()
1801 e_len = ha->max_xfer - scb->data_len; in ips_fill_scb_sg_single()
1809 if (IPS_USE_ENH_SGLIST(ha)) { in ips_fill_scb_sg_single()
1832 ips_flash_firmware(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_firmware() argument
1841 pt->CoppCP.cmd.flashfw.count = cpu_to_le32(ha->flash_datasize); in ips_flash_firmware()
1845 ips_free_flash_copperhead(ha); in ips_flash_firmware()
1866 scb->data_len = ha->flash_datasize; in ips_flash_firmware()
1868 pci_map_single(ha->pcidev, ha->flash_data, scb->data_len, in ips_flash_firmware()
1871 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_flash_firmware()
1885 ips_free_flash_copperhead(ips_ha_t * ha) in ips_free_flash_copperhead() argument
1887 if (ha->flash_data == ips_FlashData) in ips_free_flash_copperhead()
1889 else if (ha->flash_data) in ips_free_flash_copperhead()
1890 pci_free_consistent(ha->pcidev, ha->flash_len, ha->flash_data, in ips_free_flash_copperhead()
1891 ha->flash_busaddr); in ips_free_flash_copperhead()
1892 ha->flash_data = NULL; in ips_free_flash_copperhead()
1905 ips_usrcmd(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_usrcmd() argument
1912 if ((!scb) || (!pt) || (!ha)) in ips_usrcmd()
1934 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_usrcmd()
1944 scb->data_busaddr = ha->ioctl_busaddr + sizeof (ips_passthru_t); in ips_usrcmd()
1993 ips_cleanup_passthru(ips_ha_t * ha, ips_scb_t * scb) in ips_cleanup_passthru() argument
2001 ips_name, ha->host_num); in ips_cleanup_passthru()
2005 pt = (ips_passthru_t *) ha->ioctl_data; in ips_cleanup_passthru()
2013 pt->AdapterType = ha->ad_type; in ips_cleanup_passthru()
2015 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_cleanup_passthru()
2018 ips_free_flash_copperhead(ha); in ips_cleanup_passthru()
2020 ips_scmd_buf_write(scb->scsi_cmd, ha->ioctl_data, ha->ioctl_datasize); in ips_cleanup_passthru()
2033 ips_host_info(ips_ha_t *ha, struct seq_file *m) in ips_host_info() argument
2039 if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && in ips_host_info()
2040 (le16_to_cpu(ha->nvram->adapter_type) != 0)) in ips_host_info()
2042 ips_adapter_name[ha->ad_type - 1]); in ips_host_info()
2046 if (ha->io_addr) in ips_host_info()
2049 ha->io_addr, ha->io_len); in ips_host_info()
2051 if (ha->mem_addr) { in ips_host_info()
2054 ha->mem_addr, ha->mem_len); in ips_host_info()
2057 (unsigned long)ha->mem_ptr); in ips_host_info()
2060 seq_printf(m, "\tIRQ number : %d\n", ha->pcidev->irq); in ips_host_info()
2065 if (le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) { in ips_host_info()
2066 if (ha->nvram->bios_low[3] == 0) { in ips_host_info()
2069 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2070 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2071 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2072 ha->nvram->bios_low[2]); in ips_host_info()
2077 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2078 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2079 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2080 ha->nvram->bios_low[2], ha->nvram->bios_low[3]); in ips_host_info()
2085 if (ha->enq->CodeBlkVersion[7] == 0) { in ips_host_info()
2088 ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], in ips_host_info()
2089 ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], in ips_host_info()
2090 ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], in ips_host_info()
2091 ha->enq->CodeBlkVersion[6]); in ips_host_info()
2095 ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], in ips_host_info()
2096 ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], in ips_host_info()
2097 ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], in ips_host_info()
2098 ha->enq->CodeBlkVersion[6], ha->enq->CodeBlkVersion[7]); in ips_host_info()
2101 if (ha->enq->BootBlkVersion[7] == 0) { in ips_host_info()
2104 ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], in ips_host_info()
2105 ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], in ips_host_info()
2106 ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], in ips_host_info()
2107 ha->enq->BootBlkVersion[6]); in ips_host_info()
2111 ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], in ips_host_info()
2112 ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], in ips_host_info()
2113 ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], in ips_host_info()
2114 ha->enq->BootBlkVersion[6], ha->enq->BootBlkVersion[7]); in ips_host_info()
2124 ha->enq->ucMaxPhysicalDevices); in ips_host_info()
2126 ha->max_cmds); in ips_host_info()
2128 ha->scb_waitlist.count); in ips_host_info()
2130 ha->scb_activelist.count - ha->num_ioctl); in ips_host_info()
2132 ha->copp_waitlist.count); in ips_host_info()
2134 ha->num_ioctl); in ips_host_info()
2151 ips_identify_controller(ips_ha_t * ha) in ips_identify_controller() argument
2155 switch (ha->pcidev->device) { in ips_identify_controller()
2157 if (ha->pcidev->revision <= IPS_REVID_SERVERAID) { in ips_identify_controller()
2158 ha->ad_type = IPS_ADTYPE_SERVERAID; in ips_identify_controller()
2159 } else if (ha->pcidev->revision == IPS_REVID_SERVERAID2) { in ips_identify_controller()
2160 ha->ad_type = IPS_ADTYPE_SERVERAID2; in ips_identify_controller()
2161 } else if (ha->pcidev->revision == IPS_REVID_NAVAJO) { in ips_identify_controller()
2162 ha->ad_type = IPS_ADTYPE_NAVAJO; in ips_identify_controller()
2163 } else if ((ha->pcidev->revision == IPS_REVID_SERVERAID2) in ips_identify_controller()
2164 && (ha->slot_num == 0)) { in ips_identify_controller()
2165 ha->ad_type = IPS_ADTYPE_KIOWA; in ips_identify_controller()
2166 } else if ((ha->pcidev->revision >= IPS_REVID_CLARINETP1) && in ips_identify_controller()
2167 (ha->pcidev->revision <= IPS_REVID_CLARINETP3)) { in ips_identify_controller()
2168 if (ha->enq->ucMaxPhysicalDevices == 15) in ips_identify_controller()
2169 ha->ad_type = IPS_ADTYPE_SERVERAID3L; in ips_identify_controller()
2171 ha->ad_type = IPS_ADTYPE_SERVERAID3; in ips_identify_controller()
2172 } else if ((ha->pcidev->revision >= IPS_REVID_TROMBONE32) && in ips_identify_controller()
2173 (ha->pcidev->revision <= IPS_REVID_TROMBONE64)) { in ips_identify_controller()
2174 ha->ad_type = IPS_ADTYPE_SERVERAID4H; in ips_identify_controller()
2179 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2181 ha->ad_type = IPS_ADTYPE_SERVERAID4L; in ips_identify_controller()
2185 ha->ad_type = IPS_ADTYPE_SERVERAID4M; in ips_identify_controller()
2189 ha->ad_type = IPS_ADTYPE_SERVERAID4MX; in ips_identify_controller()
2193 ha->ad_type = IPS_ADTYPE_SERVERAID4LX; in ips_identify_controller()
2197 ha->ad_type = IPS_ADTYPE_SERVERAID5I2; in ips_identify_controller()
2201 ha->ad_type = IPS_ADTYPE_SERVERAID5I1; in ips_identify_controller()
2208 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2210 ha->ad_type = IPS_ADTYPE_SERVERAID6M; in ips_identify_controller()
2213 ha->ad_type = IPS_ADTYPE_SERVERAID6I; in ips_identify_controller()
2216 ha->ad_type = IPS_ADTYPE_SERVERAID7k; in ips_identify_controller()
2219 ha->ad_type = IPS_ADTYPE_SERVERAID7M; in ips_identify_controller()
2236 ips_get_bios_version(ips_ha_t * ha, int intr) in ips_get_bios_version() argument
2253 strncpy(ha->bios_version, " ?", 8); in ips_get_bios_version()
2255 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { in ips_get_bios_version()
2256 if (IPS_USE_MEMIO(ha)) { in ips_get_bios_version()
2260 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2261 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2264 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2267 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2268 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2271 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2275 writel(0x1FF, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2276 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2279 major = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2282 writel(0x1FE, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2283 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2285 minor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2288 writel(0x1FD, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2289 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2291 subminor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2297 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2298 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2301 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2304 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2305 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2308 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2312 outl(0x1FF, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2313 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2316 major = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2319 outl(0x1FE, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2320 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2323 minor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2326 outl(0x1FD, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2327 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2330 subminor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2336 buffer = ha->ioctl_data; in ips_get_bios_version()
2340 scb = &ha->scbs[ha->max_cmds - 1]; in ips_get_bios_version()
2342 ips_init_scb(ha, scb); in ips_get_bios_version()
2348 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_get_bios_version()
2355 scb->cmd.flashfw.buffer_addr = ha->ioctl_busaddr; in ips_get_bios_version()
2359 ips_send_wait(ha, scb, ips_cmd_timeout, in ips_get_bios_version()
2377 ha->bios_version[0] = hexDigits[(major & 0xF0) >> 4]; in ips_get_bios_version()
2378 ha->bios_version[1] = '.'; in ips_get_bios_version()
2379 ha->bios_version[2] = hexDigits[major & 0x0F]; in ips_get_bios_version()
2380 ha->bios_version[3] = hexDigits[subminor]; in ips_get_bios_version()
2381 ha->bios_version[4] = '.'; in ips_get_bios_version()
2382 ha->bios_version[5] = hexDigits[(minor & 0xF0) >> 4]; in ips_get_bios_version()
2383 ha->bios_version[6] = hexDigits[minor & 0x0F]; in ips_get_bios_version()
2384 ha->bios_version[7] = 0; in ips_get_bios_version()
2399 ips_hainit(ips_ha_t * ha) in ips_hainit() argument
2406 if (!ha) in ips_hainit()
2409 if (ha->func.statinit) in ips_hainit()
2410 (*ha->func.statinit) (ha); in ips_hainit()
2412 if (ha->func.enableint) in ips_hainit()
2413 (*ha->func.enableint) (ha); in ips_hainit()
2416 ha->reset_count = 1; in ips_hainit()
2418 ha->last_ffdc = tv.tv_sec; in ips_hainit()
2419 ips_ffdc_reset(ha, IPS_INTR_IORL); in ips_hainit()
2421 if (!ips_read_config(ha, IPS_INTR_IORL)) { in ips_hainit()
2422 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2428 if (!ips_read_adapter_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2429 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2436 ips_identify_controller(ha); in ips_hainit()
2438 if (!ips_read_subsystem_parameters(ha, IPS_INTR_IORL)) { in ips_hainit()
2439 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2446 if (!ips_write_driver_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2447 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2454 if ((ha->conf->ucLogDriveCount > 0) && (ha->requires_esl == 1)) in ips_hainit()
2455 ips_clear_adapter(ha, IPS_INTR_IORL); in ips_hainit()
2458 ha->ntargets = IPS_MAX_TARGETS + 1; in ips_hainit()
2459 ha->nlun = 1; in ips_hainit()
2460 ha->nbus = (ha->enq->ucMaxPhysicalDevices / IPS_MAX_TARGETS) + 1; in ips_hainit()
2462 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2464 ha->max_xfer = 0x10000; in ips_hainit()
2468 ha->max_xfer = 0x20000; in ips_hainit()
2472 ha->max_xfer = 0x40000; in ips_hainit()
2477 ha->max_xfer = 0x80000; in ips_hainit()
2482 if (le32_to_cpu(ha->subsys->param[4]) & 0x1) { in ips_hainit()
2484 ha->max_cmds = ha->enq->ucConcurrentCmdCount; in ips_hainit()
2487 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2489 ha->max_cmds = 32; in ips_hainit()
2493 ha->max_cmds = 16; in ips_hainit()
2497 ha->max_cmds = 8; in ips_hainit()
2502 ha->max_cmds = 4; in ips_hainit()
2508 if ((ha->ad_type == IPS_ADTYPE_SERVERAID3L) || in ips_hainit()
2509 (ha->ad_type == IPS_ADTYPE_SERVERAID4L) || in ips_hainit()
2510 (ha->ad_type == IPS_ADTYPE_SERVERAID4LX)) { in ips_hainit()
2511 if ((ha->max_cmds > MaxLiteCmds) && (MaxLiteCmds)) in ips_hainit()
2512 ha->max_cmds = MaxLiteCmds; in ips_hainit()
2516 ha->ha_id[0] = IPS_ADAPTER_ID; in ips_hainit()
2517 for (i = 1; i < ha->nbus; i++) { in ips_hainit()
2518 ha->ha_id[i] = ha->conf->init_id[i - 1] & 0x1f; in ips_hainit()
2519 ha->dcdb_active[i - 1] = 0; in ips_hainit()
2535 ips_next(ips_ha_t * ha, int intr) in ips_next() argument
2546 if (!ha) in ips_next()
2548 host = ips_sh[ha->host_num]; in ips_next()
2556 if ((ha->subsys->param[3] & 0x300000) in ips_next()
2557 && (ha->scb_activelist.count == 0)) { in ips_next()
2562 if (tv.tv_sec - ha->last_ffdc > IPS_SECS_8HOURS) { in ips_next()
2563 ha->last_ffdc = tv.tv_sec; in ips_next()
2564 ips_ffdc_time(ha); in ips_next()
2575 while ((ha->num_ioctl < IPS_MAX_IOCTL) && in ips_next()
2576 (ha->copp_waitlist.head) && (scb = ips_getscb(ha))) { in ips_next()
2578 item = ips_removeq_copp_head(&ha->copp_waitlist); in ips_next()
2579 ha->num_ioctl++; in ips_next()
2585 ret = ips_make_passthru(ha, scb->scsi_cmd, scb, intr); in ips_next()
2596 ips_freescb(ha, scb); in ips_next()
2604 ips_freescb(ha, scb); in ips_next()
2611 ha->num_ioctl--; in ips_next()
2615 ret = ips_send_cmd(ha, scb); in ips_next()
2618 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2620 ha->num_ioctl--; in ips_next()
2628 ips_freescb(ha, scb); in ips_next()
2631 ips_freescb(ha, scb); in ips_next()
2643 p = ha->scb_waitlist.head; in ips_next()
2644 while ((p) && (scb = ips_getscb(ha))) { in ips_next()
2646 && (ha-> in ips_next()
2649 ips_freescb(ha, scb); in ips_next()
2655 SC = ips_removeq_wait(&ha->scb_waitlist, q); in ips_next()
2686 (ha, sg_dma_address(sg), scb, i, in ips_next()
2717 ret = ips_send_cmd(ha, scb); in ips_next()
2721 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2730 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2733 ips_freescb(ha, scb); in ips_next()
2740 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2743 ips_freescb(ha, scb); in ips_next()
3100 ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_blocking() argument
3104 ips_freescb(ha, scb); in ipsintr_blocking()
3105 if ((ha->waitflag == TRUE) && (ha->cmd_in_progress == scb->cdb[0])) { in ipsintr_blocking()
3106 ha->waitflag = FALSE; in ipsintr_blocking()
3122 ipsintr_done(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_done() argument
3127 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3135 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3141 ips_done(ha, scb); in ipsintr_done()
3154 ips_done(ips_ha_t * ha, ips_scb_t * scb) in ips_done() argument
3164 ips_cleanup_passthru(ha, scb); in ips_done()
3165 ha->num_ioctl--; in ips_done()
3187 ips_fill_scb_sg_single(ha, in ips_done()
3195 (ha, in ips_done()
3214 ret = ips_send_cmd(ha, scb); in ips_done()
3223 ips_freescb(ha, scb); in ips_done()
3231 ips_freescb(ha, scb); in ips_done()
3242 ha->dcdb_active[scb->bus - 1] &= ~(1 << scb->target_id); in ips_done()
3247 ips_freescb(ha, scb); in ips_done()
3260 ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) in ips_map_status() argument
3273 ips_name, ha->host_num, in ips_map_status()
3397 ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr) in ips_send_wait() argument
3404 ha->waitflag = TRUE; in ips_send_wait()
3405 ha->cmd_in_progress = scb->cdb[0]; in ips_send_wait()
3408 ret = ips_send_cmd(ha, scb); in ips_send_wait()
3414 ret = ips_wait(ha, timeout, intr); in ips_send_wait()
3463 ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) in ips_send_cmd() argument
3481 if ((ha->waitflag == TRUE) && in ips_send_cmd()
3482 (ha->cmd_in_progress == scb->cdb[0])) { in ips_send_cmd()
3483 ha->waitflag = FALSE; in ips_send_cmd()
3548 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3552 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3561 ips_reqsen(ha, scb); in ips_send_cmd()
3580 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3586 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3626 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3632 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3671 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3674 scb->data_len = sizeof (*ha->enq); in ips_send_cmd()
3675 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_send_cmd()
3681 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3686 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3729 if (ha->conf->dev[scb->bus - 1][scb->target_id].ucState == 0) { in ips_send_cmd()
3734 ha->dcdb_active[scb->bus - 1] |= (1 << scb->target_id); in ips_send_cmd()
3735 scb->cmd.dcdb.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3748 if (ha->subsys->param[4] & 0x00100000) { /* If NEW Tape DCDB is Supported */ in ips_send_cmd()
3755 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3794 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3832 return ((*ha->func.issue) (ha, scb)); in ips_send_cmd()
3845 ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) in ips_chkstatus() argument
3856 scb = &ha->scbs[pstatus->fields.command_id]; in ips_chkstatus()
3861 sp = &ha->sp; in ips_chkstatus()
3866 ips_removeq_scb(&ha->scb_activelist, scb); in ips_chkstatus()
3874 ha->host_num, in ips_chkstatus()
3893 ips_name, ha->host_num, in ips_chkstatus()
3911 if (!ips_online(ha, scb)) { in ips_chkstatus()
3917 if (ips_online(ha, scb)) { in ips_chkstatus()
3918 ips_inquiry(ha, scb); in ips_chkstatus()
3925 ips_reqsen(ha, scb); in ips_chkstatus()
3937 if (!ips_online(ha, scb) in ips_chkstatus()
3938 || !ips_msense(ha, scb)) { in ips_chkstatus()
3944 if (ips_online(ha, scb)) in ips_chkstatus()
3945 ips_rdcap(ha, scb); in ips_chkstatus()
3984 ips_name, ha->host_num, in ips_chkstatus()
3989 ips_map_status(ha, scb, sp); in ips_chkstatus()
4003 ips_online(ips_ha_t * ha, ips_scb_t * scb) in ips_online() argument
4011 memset(ha->logical_drive_info, 0, sizeof (IPS_LD_INFO)); in ips_online()
4015 if (ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4017 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4019 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4021 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4038 ips_inquiry(ips_ha_t * ha, ips_scb_t * scb) in ips_inquiry() argument
4073 ips_rdcap(ips_ha_t * ha, ips_scb_t * scb) in ips_rdcap() argument
4084 (ha->logical_drive_info-> in ips_rdcap()
4103 ips_msense(ips_ha_t * ha, ips_scb_t * scb) in ips_msense() argument
4112 if (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) > 0x400000 && in ips_msense()
4113 (ha->enq->ucMiscFlag & 0x8) == 0) { in ips_msense()
4122 (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) - in ips_msense()
4194 ips_reqsen(ips_ha_t * ha, ips_scb_t * scb) in ips_reqsen() argument
4223 ips_free(ips_ha_t * ha) in ips_free() argument
4228 if (ha) { in ips_free()
4229 if (ha->enq) { in ips_free()
4230 pci_free_consistent(ha->pcidev, sizeof(IPS_ENQ), in ips_free()
4231 ha->enq, ha->enq_busaddr); in ips_free()
4232 ha->enq = NULL; in ips_free()
4235 kfree(ha->conf); in ips_free()
4236 ha->conf = NULL; in ips_free()
4238 if (ha->adapt) { in ips_free()
4239 pci_free_consistent(ha->pcidev, in ips_free()
4241 sizeof (IPS_IO_CMD), ha->adapt, in ips_free()
4242 ha->adapt->hw_status_start); in ips_free()
4243 ha->adapt = NULL; in ips_free()
4246 if (ha->logical_drive_info) { in ips_free()
4247 pci_free_consistent(ha->pcidev, in ips_free()
4249 ha->logical_drive_info, in ips_free()
4250 ha->logical_drive_info_dma_addr); in ips_free()
4251 ha->logical_drive_info = NULL; in ips_free()
4254 kfree(ha->nvram); in ips_free()
4255 ha->nvram = NULL; in ips_free()
4257 kfree(ha->subsys); in ips_free()
4258 ha->subsys = NULL; in ips_free()
4260 if (ha->ioctl_data) { in ips_free()
4261 pci_free_consistent(ha->pcidev, ha->ioctl_len, in ips_free()
4262 ha->ioctl_data, ha->ioctl_busaddr); in ips_free()
4263 ha->ioctl_data = NULL; in ips_free()
4264 ha->ioctl_datasize = 0; in ips_free()
4265 ha->ioctl_len = 0; in ips_free()
4267 ips_deallocatescbs(ha, ha->max_cmds); in ips_free()
4270 if (ha->mem_ptr) { in ips_free()
4271 iounmap(ha->ioremap_ptr); in ips_free()
4272 ha->ioremap_ptr = NULL; in ips_free()
4273 ha->mem_ptr = NULL; in ips_free()
4276 ha->mem_addr = 0; in ips_free()
4291 ips_deallocatescbs(ips_ha_t * ha, int cmds) in ips_deallocatescbs() argument
4293 if (ha->scbs) { in ips_deallocatescbs()
4294 pci_free_consistent(ha->pcidev, in ips_deallocatescbs()
4295 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * cmds, in ips_deallocatescbs()
4296 ha->scbs->sg_list.list, in ips_deallocatescbs()
4297 ha->scbs->sg_busaddr); in ips_deallocatescbs()
4298 pci_free_consistent(ha->pcidev, sizeof (ips_scb_t) * cmds, in ips_deallocatescbs()
4299 ha->scbs, ha->scbs->scb_busaddr); in ips_deallocatescbs()
4300 ha->scbs = NULL; in ips_deallocatescbs()
4315 ips_allocatescbs(ips_ha_t * ha) in ips_allocatescbs() argument
4325 ha->scbs = in ips_allocatescbs()
4326 pci_alloc_consistent(ha->pcidev, ha->max_cmds * sizeof (ips_scb_t), in ips_allocatescbs()
4328 if (ha->scbs == NULL) in ips_allocatescbs()
4331 pci_alloc_consistent(ha->pcidev, in ips_allocatescbs()
4332 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * in ips_allocatescbs()
4333 ha->max_cmds, &sg_dma); in ips_allocatescbs()
4335 pci_free_consistent(ha->pcidev, in ips_allocatescbs()
4336 ha->max_cmds * sizeof (ips_scb_t), ha->scbs, in ips_allocatescbs()
4341 memset(ha->scbs, 0, ha->max_cmds * sizeof (ips_scb_t)); in ips_allocatescbs()
4343 for (i = 0; i < ha->max_cmds; i++) { in ips_allocatescbs()
4344 scb_p = &ha->scbs[i]; in ips_allocatescbs()
4347 if (IPS_USE_ENH_SGLIST(ha)) { in ips_allocatescbs()
4351 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4356 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4360 if (i < ha->max_cmds - 1) { in ips_allocatescbs()
4361 scb_p->q_next = ha->scb_freelist; in ips_allocatescbs()
4362 ha->scb_freelist = scb_p; in ips_allocatescbs()
4380 ips_init_scb(ips_ha_t * ha, ips_scb_t * scb) in ips_init_scb() argument
4394 memset(ha->dummy, 0, sizeof (IPS_IO_CMD)); in ips_init_scb()
4397 ha->dummy->op_code = 0xFF; in ips_init_scb()
4398 ha->dummy->ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4400 ha->dummy->command_id = IPS_MAX_CMDS; in ips_init_scb()
4409 scb->cmd.basic_io.ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4425 ips_getscb(ips_ha_t * ha) in ips_getscb() argument
4431 if ((scb = ha->scb_freelist) == NULL) { in ips_getscb()
4436 ha->scb_freelist = scb->q_next; in ips_getscb()
4440 ips_init_scb(ha, scb); in ips_getscb()
4457 ips_freescb(ips_ha_t * ha, ips_scb_t * scb) in ips_freescb() argument
4464 pci_unmap_single(ha->pcidev, scb->data_busaddr, scb->data_len, in ips_freescb()
4468 if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) { in ips_freescb()
4469 scb->q_next = ha->scb_freelist; in ips_freescb()
4470 ha->scb_freelist = scb; in ips_freescb()
4484 ips_isinit_copperhead(ips_ha_t * ha) in ips_isinit_copperhead() argument
4491 isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isinit_copperhead()
4492 scpr = inb(ha->io_addr + IPS_REG_SCPR); in ips_isinit_copperhead()
4510 ips_isinit_copperhead_memio(ips_ha_t * ha) in ips_isinit_copperhead_memio() argument
4517 isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isinit_copperhead_memio()
4518 scpr = readb(ha->mem_ptr + IPS_REG_SCPR); in ips_isinit_copperhead_memio()
4536 ips_isinit_morpheus(ips_ha_t * ha) in ips_isinit_morpheus() argument
4543 if (ips_isintr_morpheus(ha)) in ips_isinit_morpheus()
4544 ips_flush_and_reset(ha); in ips_isinit_morpheus()
4546 post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_isinit_morpheus()
4547 bits = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isinit_morpheus()
4568 ips_flush_and_reset(ips_ha_t *ha) in ips_flush_and_reset() argument
4577 scb = pci_alloc_consistent(ha->pcidev, sizeof(ips_scb_t), &command_dma); in ips_flush_and_reset()
4580 ips_init_scb(ha, scb); in ips_flush_and_reset()
4594 ret = ips_send_cmd(ha, scb); /* Send the Flush Command */ in ips_flush_and_reset()
4601 done = ips_poll_for_flush_complete(ha); in ips_flush_and_reset()
4610 (*ha->func.reset) (ha); in ips_flush_and_reset()
4612 pci_free_consistent(ha->pcidev, sizeof(ips_scb_t), scb, command_dma); in ips_flush_and_reset()
4627 ips_poll_for_flush_complete(ips_ha_t * ha) in ips_poll_for_flush_complete() argument
4632 cstatus.value = (*ha->func.statupd) (ha); in ips_poll_for_flush_complete()
4654 ips_enable_int_copperhead(ips_ha_t * ha) in ips_enable_int_copperhead() argument
4658 outb(ha->io_addr + IPS_REG_HISR, IPS_BIT_EI); in ips_enable_int_copperhead()
4659 inb(ha->io_addr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead()
4671 ips_enable_int_copperhead_memio(ips_ha_t * ha) in ips_enable_int_copperhead_memio() argument
4675 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_enable_int_copperhead_memio()
4676 readb(ha->mem_ptr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead_memio()
4688 ips_enable_int_morpheus(ips_ha_t * ha) in ips_enable_int_morpheus() argument
4694 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4696 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4697 readl(ha->mem_ptr + IPS_REG_I960_OIMR); /*Ensure PCI Posting Completes*/ in ips_enable_int_morpheus()
4710 ips_init_copperhead(ips_ha_t * ha) in ips_init_copperhead() argument
4722 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4734 PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4735 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4739 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead()
4748 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4760 ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4761 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4765 Cbsp = inb(ha->io_addr + IPS_REG_CBSP); in ips_init_copperhead()
4779 outl(0x1010, ha->io_addr + IPS_REG_CCCR); in ips_init_copperhead()
4782 outb(IPS_BIT_EBM, ha->io_addr + IPS_REG_SCPR); in ips_init_copperhead()
4784 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead()
4786 outl(0, ha->io_addr + IPS_REG_NDAE); in ips_init_copperhead()
4789 outb(IPS_BIT_EI, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4804 ips_init_copperhead_memio(ips_ha_t * ha) in ips_init_copperhead_memio() argument
4816 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4828 PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4829 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4833 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead_memio()
4842 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4854 ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4855 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4859 Cbsp = readb(ha->mem_ptr + IPS_REG_CBSP); in ips_init_copperhead_memio()
4873 writel(0x1010, ha->mem_ptr + IPS_REG_CCCR); in ips_init_copperhead_memio()
4876 writeb(IPS_BIT_EBM, ha->mem_ptr + IPS_REG_SCPR); in ips_init_copperhead_memio()
4878 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead_memio()
4880 writel(0, ha->mem_ptr + IPS_REG_NDAE); in ips_init_copperhead_memio()
4883 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4899 ips_init_morpheus(ips_ha_t * ha) in ips_init_morpheus() argument
4911 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4922 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4928 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4931 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4936 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4939 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4947 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4956 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4959 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4967 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4978 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4984 Config = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_morpheus()
4988 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4991 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
4993 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
5000 ha->requires_esl = 1; in ips_init_morpheus()
5016 ips_reset_copperhead(ips_ha_t * ha) in ips_reset_copperhead() argument
5023 ips_name, ha->host_num, ha->io_addr, ha->pcidev->irq); in ips_reset_copperhead()
5030 outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5035 outb(0, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5040 if ((*ha->func.init) (ha)) in ips_reset_copperhead()
5061 ips_reset_copperhead_memio(ips_ha_t * ha) in ips_reset_copperhead_memio() argument
5068 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_copperhead_memio()
5075 writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5080 writeb(0, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5085 if ((*ha->func.init) (ha)) in ips_reset_copperhead_memio()
5106 ips_reset_morpheus(ips_ha_t * ha) in ips_reset_morpheus() argument
5114 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_morpheus()
5121 writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); in ips_reset_morpheus()
5127 pci_read_config_byte(ha->pcidev, 4, &junk); in ips_reset_morpheus()
5129 if ((*ha->func.init) (ha)) in ips_reset_morpheus()
5150 ips_statinit(ips_ha_t * ha) in ips_statinit() argument
5156 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit()
5157 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit()
5158 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit()
5160 phys_status_start = ha->adapt->hw_status_start; in ips_statinit()
5161 outl(phys_status_start, ha->io_addr + IPS_REG_SQSR); in ips_statinit()
5163 ha->io_addr + IPS_REG_SQER); in ips_statinit()
5165 ha->io_addr + IPS_REG_SQHR); in ips_statinit()
5166 outl(phys_status_start, ha->io_addr + IPS_REG_SQTR); in ips_statinit()
5168 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit()
5181 ips_statinit_memio(ips_ha_t * ha) in ips_statinit_memio() argument
5187 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit_memio()
5188 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit_memio()
5189 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit_memio()
5191 phys_status_start = ha->adapt->hw_status_start; in ips_statinit_memio()
5192 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQSR); in ips_statinit_memio()
5194 ha->mem_ptr + IPS_REG_SQER); in ips_statinit_memio()
5195 writel(phys_status_start + IPS_STATUS_SIZE, ha->mem_ptr + IPS_REG_SQHR); in ips_statinit_memio()
5196 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQTR); in ips_statinit_memio()
5198 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit_memio()
5211 ips_statupd_copperhead(ips_ha_t * ha) in ips_statupd_copperhead() argument
5215 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead()
5216 ha->adapt->p_status_tail++; in ips_statupd_copperhead()
5217 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead()
5219 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead()
5220 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead()
5223 outl(ha->adapt->hw_status_tail, in ips_statupd_copperhead()
5224 ha->io_addr + IPS_REG_SQTR); in ips_statupd_copperhead()
5226 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead()
5239 ips_statupd_copperhead_memio(ips_ha_t * ha) in ips_statupd_copperhead_memio() argument
5243 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead_memio()
5244 ha->adapt->p_status_tail++; in ips_statupd_copperhead_memio()
5245 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead_memio()
5247 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead_memio()
5248 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead_memio()
5251 writel(ha->adapt->hw_status_tail, ha->mem_ptr + IPS_REG_SQTR); in ips_statupd_copperhead_memio()
5253 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead_memio()
5266 ips_statupd_morpheus(ips_ha_t * ha) in ips_statupd_morpheus() argument
5272 val = readl(ha->mem_ptr + IPS_REG_I2O_OUTMSGQ); in ips_statupd_morpheus()
5287 ips_issue_copperhead(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead() argument
5297 ha->host_num, in ips_issue_copperhead()
5303 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead()
5309 le32_to_cpu(inl(ha->io_addr + IPS_REG_CCCR))) & IPS_BIT_SEM) { in ips_issue_copperhead()
5316 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5318 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5325 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_CCSAR); in ips_issue_copperhead()
5326 outw(IPS_BIT_START_CMD, ha->io_addr + IPS_REG_CCCR); in ips_issue_copperhead()
5341 ips_issue_copperhead_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead_memio() argument
5351 ha->host_num, in ips_issue_copperhead_memio()
5357 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead_memio()
5362 while ((val = readl(ha->mem_ptr + IPS_REG_CCCR)) & IPS_BIT_SEM) { in ips_issue_copperhead_memio()
5369 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5371 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5378 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_CCSAR); in ips_issue_copperhead_memio()
5379 writel(IPS_BIT_START_CMD, ha->mem_ptr + IPS_REG_CCCR); in ips_issue_copperhead_memio()
5394 ips_issue_i2o(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o() argument
5402 ha->host_num, in ips_issue_i2o()
5408 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o()
5411 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o()
5426 ips_issue_i2o_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o_memio() argument
5434 ha->host_num, in ips_issue_i2o_memio()
5440 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o_memio()
5443 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o_memio()
5458 ips_isintr_copperhead(ips_ha_t * ha) in ips_isintr_copperhead() argument
5464 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5475 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5491 ips_isintr_copperhead_memio(ips_ha_t * ha) in ips_isintr_copperhead_memio() argument
5497 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5508 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5524 ips_isintr_morpheus(ips_ha_t * ha) in ips_isintr_morpheus() argument
5530 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isintr_morpheus()
5548 ips_wait(ips_ha_t * ha, int time, int intr) in ips_wait() argument
5562 if (ha->waitflag == FALSE) { in ips_wait()
5568 if (ha->waitflag == FALSE) { in ips_wait()
5585 (*ha->func.intr) (ha); in ips_wait()
5606 ips_write_driver_status(ips_ha_t * ha, int intr) in ips_write_driver_status() argument
5610 if (!ips_readwrite_page5(ha, FALSE, intr)) { in ips_write_driver_status()
5611 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5619 if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) { in ips_write_driver_status()
5622 ips_name, ha->host_num, ha->nvram->signature); in ips_write_driver_status()
5623 ha->nvram->signature = IPS_NVRAM_P5_SIG; in ips_write_driver_status()
5628 ips_name, ha->host_num, le16_to_cpu(ha->nvram->adapter_type), in ips_write_driver_status()
5629 ha->nvram->adapter_slot, ha->nvram->bios_high[0], in ips_write_driver_status()
5630 ha->nvram->bios_high[1], ha->nvram->bios_high[2], in ips_write_driver_status()
5631 ha->nvram->bios_high[3], ha->nvram->bios_low[0], in ips_write_driver_status()
5632 ha->nvram->bios_low[1], ha->nvram->bios_low[2], in ips_write_driver_status()
5633 ha->nvram->bios_low[3]); in ips_write_driver_status()
5635 ips_get_bios_version(ha, intr); in ips_write_driver_status()
5638 ha->nvram->operating_system = IPS_OS_LINUX; in ips_write_driver_status()
5639 ha->nvram->adapter_type = ha->ad_type; in ips_write_driver_status()
5640 strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); in ips_write_driver_status()
5641 strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); in ips_write_driver_status()
5642 strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); in ips_write_driver_status()
5643 strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); in ips_write_driver_status()
5645 ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ in ips_write_driver_status()
5648 if (!ips_readwrite_page5(ha, TRUE, intr)) { in ips_write_driver_status()
5649 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5656 ha->slot_num = ha->nvram->adapter_slot; in ips_write_driver_status()
5671 ips_read_adapter_status(ips_ha_t * ha, int intr) in ips_read_adapter_status() argument
5678 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_adapter_status()
5680 ips_init_scb(ha, scb); in ips_read_adapter_status()
5686 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_adapter_status()
5691 scb->data_len = sizeof (*ha->enq); in ips_read_adapter_status()
5692 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_read_adapter_status()
5696 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_adapter_status()
5714 ips_read_subsystem_parameters(ips_ha_t * ha, int intr) in ips_read_subsystem_parameters() argument
5721 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_subsystem_parameters()
5723 ips_init_scb(ha, scb); in ips_read_subsystem_parameters()
5729 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_subsystem_parameters()
5734 scb->data_len = sizeof (*ha->subsys); in ips_read_subsystem_parameters()
5735 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_subsystem_parameters()
5739 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_subsystem_parameters()
5744 memcpy(ha->subsys, ha->ioctl_data, sizeof(*ha->subsys)); in ips_read_subsystem_parameters()
5758 ips_read_config(ips_ha_t * ha, int intr) in ips_read_config() argument
5768 ha->conf->init_id[i] = 7; in ips_read_config()
5770 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_config()
5772 ips_init_scb(ha, scb); in ips_read_config()
5778 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_config()
5779 scb->data_len = sizeof (*ha->conf); in ips_read_config()
5780 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_config()
5784 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_config()
5788 memset(ha->conf, 0, sizeof (IPS_CONF)); in ips_read_config()
5792 ha->conf->init_id[i] = 7; in ips_read_config()
5802 memcpy(ha->conf, ha->ioctl_data, sizeof(*ha->conf)); in ips_read_config()
5816 ips_readwrite_page5(ips_ha_t * ha, int write, int intr) in ips_readwrite_page5() argument
5823 scb = &ha->scbs[ha->max_cmds - 1]; in ips_readwrite_page5()
5825 ips_init_scb(ha, scb); in ips_readwrite_page5()
5831 scb->cmd.nvram.command_id = IPS_COMMAND_ID(ha, scb); in ips_readwrite_page5()
5836 scb->data_len = sizeof (*ha->nvram); in ips_readwrite_page5()
5837 scb->cmd.nvram.buffer_addr = ha->ioctl_busaddr; in ips_readwrite_page5()
5839 memcpy(ha->ioctl_data, ha->nvram, sizeof(*ha->nvram)); in ips_readwrite_page5()
5843 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_readwrite_page5()
5847 memset(ha->nvram, 0, sizeof (IPS_NVRAM_P5)); in ips_readwrite_page5()
5852 memcpy(ha->nvram, ha->ioctl_data, sizeof(*ha->nvram)); in ips_readwrite_page5()
5866 ips_clear_adapter(ips_ha_t * ha, int intr) in ips_clear_adapter() argument
5873 scb = &ha->scbs[ha->max_cmds - 1]; in ips_clear_adapter()
5875 ips_init_scb(ha, scb); in ips_clear_adapter()
5881 scb->cmd.config_sync.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5890 ips_send_wait(ha, scb, ips_reset_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5896 ips_init_scb(ha, scb); in ips_clear_adapter()
5902 scb->cmd.unlock_stripe.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5911 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5929 ips_ffdc_reset(ips_ha_t * ha, int intr) in ips_ffdc_reset() argument
5935 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_reset()
5937 ips_init_scb(ha, scb); in ips_ffdc_reset()
5942 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_reset()
5943 scb->cmd.ffdc.reset_count = ha->reset_count; in ips_ffdc_reset()
5947 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_reset()
5950 ips_send_wait(ha, scb, ips_cmd_timeout, intr); in ips_ffdc_reset()
5963 ips_ffdc_time(ips_ha_t * ha) in ips_ffdc_time() argument
5969 DEBUG_VAR(1, "(%s%d) Sending time update.", ips_name, ha->host_num); in ips_ffdc_time()
5971 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_time()
5973 ips_init_scb(ha, scb); in ips_ffdc_time()
5978 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_time()
5983 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_time()
5986 ips_send_wait(ha, scb, ips_cmd_timeout, IPS_FFDC); in ips_ffdc_time()
5998 ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time_t current_time) in ips_fix_ffdc_time() argument
6066 ips_erase_bios(ips_ha_t * ha) in ips_erase_bios() argument
6076 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6077 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6080 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6081 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6085 outb(0x20, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6086 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6090 outb(0xD0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6091 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6095 outb(0x70, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6096 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6102 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6103 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6107 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6121 outb(0xB0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6122 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6128 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6129 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6133 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6157 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6158 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6162 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6163 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6178 ips_erase_bios_memio(ips_ha_t * ha) in ips_erase_bios_memio() argument
6188 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6189 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6192 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6193 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6197 writeb(0x20, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6198 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6202 writeb(0xD0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6203 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6207 writeb(0x70, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6208 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6214 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6215 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6219 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6233 writeb(0xB0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6234 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6240 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6241 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6245 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6269 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6270 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6274 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6275 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6290 ips_program_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios() argument
6303 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6304 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6307 outb(0x40, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6308 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6311 outb(buffer[i], ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6312 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6318 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios()
6319 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6323 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6334 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6335 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6338 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6339 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6348 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6349 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6352 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6353 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6361 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6362 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6365 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6366 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6381 ips_program_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios_memio() argument
6394 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6395 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6398 writeb(0x40, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6399 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6402 writeb(buffer[i], ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6403 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6409 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios_memio()
6410 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6414 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6425 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6426 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6429 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6430 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6439 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6440 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6443 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6444 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6452 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6453 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6456 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6457 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6472 ips_verify_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios() argument
6481 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6482 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6485 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_verify_bios()
6488 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6489 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6491 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios()
6497 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6498 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6501 checksum = (uint8_t) checksum + inb(ha->io_addr + IPS_REG_FLDP); in ips_verify_bios()
6521 ips_verify_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios_memio() argument
6530 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6531 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6534 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_verify_bios_memio()
6537 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6538 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6540 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios_memio()
6546 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6547 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6551 (uint8_t) checksum + readb(ha->mem_ptr + IPS_REG_FLDP); in ips_verify_bios_memio()
6570 ips_abort_init(ips_ha_t * ha, int index) in ips_abort_init() argument
6572 ha->active = 0; in ips_abort_init()
6573 ips_free(ha); in ips_abort_init()
6709 ips_ha_t *ha, *oldha = ips_ha[index]; in ips_register_scsi() local
6716 ha = IPS_HA(sh); in ips_register_scsi()
6717 memcpy(ha, oldha, sizeof (ips_ha_t)); in ips_register_scsi()
6720 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_register_scsi()
6721 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_register_scsi()
6729 sh->unique_id = (ha->io_addr) ? ha->io_addr : ha->mem_addr; in ips_register_scsi()
6736 sh->max_id = ha->ntargets; in ips_register_scsi()
6737 sh->max_lun = ha->nlun; in ips_register_scsi()
6738 sh->max_channel = ha->nbus - 1; in ips_register_scsi()
6739 sh->can_queue = ha->max_cmds - 1; in ips_register_scsi()
6741 if (scsi_add_host(sh, &ha->pcidev->dev)) in ips_register_scsi()
6745 ips_ha[index] = ha; in ips_register_scsi()
6752 free_irq(ha->pcidev->irq, ha); in ips_register_scsi()
6887 ips_ha_t *ha; in ips_init_phase1() local
6953 ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL); in ips_init_phase1()
6954 if (ha == NULL) { in ips_init_phase1()
6961 ips_ha[index] = ha; in ips_init_phase1()
6962 ha->active = 1; in ips_init_phase1()
6965 ha->io_addr = io_addr; in ips_init_phase1()
6966 ha->io_len = io_len; in ips_init_phase1()
6967 ha->mem_addr = mem_addr; in ips_init_phase1()
6968 ha->mem_len = mem_len; in ips_init_phase1()
6969 ha->mem_ptr = mem_ptr; in ips_init_phase1()
6970 ha->ioremap_ptr = ioremap_ptr; in ips_init_phase1()
6971 ha->host_num = (uint32_t) index; in ips_init_phase1()
6972 ha->slot_num = PCI_SLOT(pci_dev->devfn); in ips_init_phase1()
6973 ha->pcidev = pci_dev; in ips_init_phase1()
6981 if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && in ips_init_phase1()
6982 !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) { in ips_init_phase1()
6983 (ha)->flags |= IPS_HA_ENH_SG; in ips_init_phase1()
6985 if (pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(32)) != 0) { in ips_init_phase1()
6987 return ips_abort_init(ha, index); in ips_init_phase1()
6995 ha->enq = pci_alloc_consistent(pci_dev, sizeof (IPS_ENQ), in ips_init_phase1()
6996 &ha->enq_busaddr); in ips_init_phase1()
6997 if (!ha->enq) { in ips_init_phase1()
7000 return ips_abort_init(ha, index); in ips_init_phase1()
7003 ha->adapt = pci_alloc_consistent(pci_dev, sizeof (IPS_ADAPTER) + in ips_init_phase1()
7005 if (!ha->adapt) { in ips_init_phase1()
7008 return ips_abort_init(ha, index); in ips_init_phase1()
7010 ha->adapt->hw_status_start = dma_address; in ips_init_phase1()
7011 ha->dummy = (void *) (ha->adapt + 1); in ips_init_phase1()
7015 ha->logical_drive_info = pci_alloc_consistent(pci_dev, sizeof (IPS_LD_INFO), &dma_address); in ips_init_phase1()
7016 if (!ha->logical_drive_info) { in ips_init_phase1()
7019 return ips_abort_init(ha, index); in ips_init_phase1()
7021 ha->logical_drive_info_dma_addr = dma_address; in ips_init_phase1()
7024 ha->conf = kmalloc(sizeof (IPS_CONF), GFP_KERNEL); in ips_init_phase1()
7026 if (!ha->conf) { in ips_init_phase1()
7029 return ips_abort_init(ha, index); in ips_init_phase1()
7032 ha->nvram = kmalloc(sizeof (IPS_NVRAM_P5), GFP_KERNEL); in ips_init_phase1()
7034 if (!ha->nvram) { in ips_init_phase1()
7037 return ips_abort_init(ha, index); in ips_init_phase1()
7040 ha->subsys = kmalloc(sizeof (IPS_SUBSYS), GFP_KERNEL); in ips_init_phase1()
7042 if (!ha->subsys) { in ips_init_phase1()
7045 return ips_abort_init(ha, index); in ips_init_phase1()
7053 ha->ioctl_data = pci_alloc_consistent(pci_dev, ips_ioctlsize, in ips_init_phase1()
7054 &ha->ioctl_busaddr); in ips_init_phase1()
7055 ha->ioctl_len = ips_ioctlsize; in ips_init_phase1()
7056 if (!ha->ioctl_data) { in ips_init_phase1()
7059 return ips_abort_init(ha, index); in ips_init_phase1()
7065 ips_setup_funclist(ha); in ips_init_phase1()
7067 if ((IPS_IS_MORPHEUS(ha)) || (IPS_IS_MARCO(ha))) { in ips_init_phase1()
7069 IsDead = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_phase1()
7071 ips_reset_morpheus(ha); in ips_init_phase1()
7079 if (!(*ha->func.isinit) (ha)) { in ips_init_phase1()
7080 if (!(*ha->func.init) (ha)) { in ips_init_phase1()
7086 return ips_abort_init(ha, index); in ips_init_phase1()
7106 ips_ha_t *ha; in ips_init_phase2() local
7108 ha = ips_ha[index]; in ips_init_phase2()
7111 if (!ha->active) { in ips_init_phase2()
7117 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_init_phase2()
7118 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7120 return ips_abort_init(ha, index); in ips_init_phase2()
7126 ha->max_cmds = 1; in ips_init_phase2()
7127 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7128 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7130 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7131 return ips_abort_init(ha, index); in ips_init_phase2()
7134 if (!ips_hainit(ha)) { in ips_init_phase2()
7135 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7137 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7138 return ips_abort_init(ha, index); in ips_init_phase2()
7141 ips_deallocatescbs(ha, 1); in ips_init_phase2()
7144 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7145 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7147 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7148 return ips_abort_init(ha, index); in ips_init_phase2()