Lines Matching refs:ha
281 static void ips_free_flash_copperhead(ips_ha_t * ha);
332 static int ips_abort_init(ips_ha_t * ha, int index);
338 static int ips_poll_for_flush_complete(ips_ha_t * ha);
339 static void ips_flush_and_reset(ips_ha_t *ha);
587 ips_setup_funclist(ips_ha_t * ha) in ips_setup_funclist() argument
593 if (IPS_IS_MORPHEUS(ha) || IPS_IS_MARCO(ha)) { in ips_setup_funclist()
595 ha->func.isintr = ips_isintr_morpheus; in ips_setup_funclist()
596 ha->func.isinit = ips_isinit_morpheus; in ips_setup_funclist()
597 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
598 ha->func.init = ips_init_morpheus; in ips_setup_funclist()
599 ha->func.statupd = ips_statupd_morpheus; in ips_setup_funclist()
600 ha->func.reset = ips_reset_morpheus; in ips_setup_funclist()
601 ha->func.intr = ips_intr_morpheus; in ips_setup_funclist()
602 ha->func.enableint = ips_enable_int_morpheus; in ips_setup_funclist()
603 } else if (IPS_USE_MEMIO(ha)) { in ips_setup_funclist()
605 ha->func.isintr = ips_isintr_copperhead_memio; in ips_setup_funclist()
606 ha->func.isinit = ips_isinit_copperhead_memio; in ips_setup_funclist()
607 ha->func.init = ips_init_copperhead_memio; in ips_setup_funclist()
608 ha->func.statupd = ips_statupd_copperhead_memio; in ips_setup_funclist()
609 ha->func.statinit = ips_statinit_memio; in ips_setup_funclist()
610 ha->func.reset = ips_reset_copperhead_memio; in ips_setup_funclist()
611 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
612 ha->func.erasebios = ips_erase_bios_memio; in ips_setup_funclist()
613 ha->func.programbios = ips_program_bios_memio; in ips_setup_funclist()
614 ha->func.verifybios = ips_verify_bios_memio; in ips_setup_funclist()
615 ha->func.enableint = ips_enable_int_copperhead_memio; in ips_setup_funclist()
616 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
617 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
619 ha->func.issue = ips_issue_copperhead_memio; in ips_setup_funclist()
622 ha->func.isintr = ips_isintr_copperhead; in ips_setup_funclist()
623 ha->func.isinit = ips_isinit_copperhead; in ips_setup_funclist()
624 ha->func.init = ips_init_copperhead; in ips_setup_funclist()
625 ha->func.statupd = ips_statupd_copperhead; in ips_setup_funclist()
626 ha->func.statinit = ips_statinit; in ips_setup_funclist()
627 ha->func.reset = ips_reset_copperhead; in ips_setup_funclist()
628 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
629 ha->func.erasebios = ips_erase_bios; in ips_setup_funclist()
630 ha->func.programbios = ips_program_bios; in ips_setup_funclist()
631 ha->func.verifybios = ips_verify_bios; in ips_setup_funclist()
632 ha->func.enableint = ips_enable_int_copperhead; in ips_setup_funclist()
634 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
635 ha->func.issue = ips_issue_i2o; in ips_setup_funclist()
637 ha->func.issue = ips_issue_copperhead; in ips_setup_funclist()
654 ips_ha_t *ha; in ips_release() local
670 ha = IPS_HA(sh); in ips_release()
672 if (!ha) in ips_release()
676 scb = &ha->scbs[ha->max_cmds - 1]; in ips_release()
678 ips_init_scb(ha, scb); in ips_release()
684 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_release()
691 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_release()
694 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == IPS_FAILURE) in ips_release()
695 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Incomplete Flush.\n"); in ips_release()
697 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Complete.\n"); in ips_release()
703 ips_free(ha); in ips_release()
706 free_irq(ha->pcidev->irq, ha); in ips_release()
728 ips_ha_t *ha; in ips_halt() local
736 ha = (ips_ha_t *) ips_ha[i]; in ips_halt()
738 if (!ha) in ips_halt()
741 if (!ha->active) in ips_halt()
745 scb = &ha->scbs[ha->max_cmds - 1]; in ips_halt()
747 ips_init_scb(ha, scb); in ips_halt()
753 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_halt()
760 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_halt()
763 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == in ips_halt()
765 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
768 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
786 ips_ha_t *ha; in ips_eh_abort() local
797 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_eh_abort()
799 if (!ha) in ips_eh_abort()
802 if (!ha->active) in ips_eh_abort()
808 item = ha->copp_waitlist.head; in ips_eh_abort()
814 ips_removeq_copp(&ha->copp_waitlist, item); in ips_eh_abort()
818 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in ips_eh_abort()
845 ips_ha_t *ha; in __ips_eh_reset() local
861 ha = (ips_ha_t *) SC->device->host->hostdata; in __ips_eh_reset()
863 if (!ha) { in __ips_eh_reset()
869 if (!ha->active) in __ips_eh_reset()
873 item = ha->copp_waitlist.head; in __ips_eh_reset()
879 ips_removeq_copp(&ha->copp_waitlist, item); in __ips_eh_reset()
884 if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in __ips_eh_reset()
899 if (ha->ioctl_reset == 0) { /* IF Not an IOCTL Requested Reset */ in __ips_eh_reset()
900 scb = &ha->scbs[ha->max_cmds - 1]; in __ips_eh_reset()
902 ips_init_scb(ha, scb); in __ips_eh_reset()
908 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in __ips_eh_reset()
916 ret = ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_IORL); in __ips_eh_reset()
918 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
927 ha->ioctl_reset = 0; /* Reset the IOCTL Requested Reset Flag */ in __ips_eh_reset()
933 IPS_PRINTK(KERN_NOTICE, ha->pcidev, "Resetting controller.\n"); in __ips_eh_reset()
934 ret = (*ha->func.reset) (ha); in __ips_eh_reset()
939 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
944 ips_name, ha->host_num); in __ips_eh_reset()
946 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
949 ips_freescb(ha, scb); in __ips_eh_reset()
954 ips_name, ha->host_num); in __ips_eh_reset()
956 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
961 ha->active = FALSE; in __ips_eh_reset()
965 if (!ips_clear_adapter(ha, IPS_INTR_IORL)) { in __ips_eh_reset()
968 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
973 ips_name, ha->host_num); in __ips_eh_reset()
975 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
978 ips_freescb(ha, scb); in __ips_eh_reset()
983 ips_name, ha->host_num); in __ips_eh_reset()
985 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
990 ha->active = FALSE; in __ips_eh_reset()
995 if (le32_to_cpu(ha->subsys->param[3]) & 0x300000) { in __ips_eh_reset()
999 ha->last_ffdc = tv.tv_sec; in __ips_eh_reset()
1000 ha->reset_count++; in __ips_eh_reset()
1001 ips_ffdc_reset(ha, IPS_INTR_IORL); in __ips_eh_reset()
1005 DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num); in __ips_eh_reset()
1007 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
1010 ips_freescb(ha, scb); in __ips_eh_reset()
1014 for (i = 1; i < ha->nbus; i++) in __ips_eh_reset()
1015 ha->dcdb_active[i - 1] = 0; in __ips_eh_reset()
1018 ha->num_ioctl = 0; in __ips_eh_reset()
1020 ips_next(ha, IPS_INTR_IORL); in __ips_eh_reset()
1052 ips_ha_t *ha; in ips_queue_lck() local
1057 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_queue_lck()
1059 if (!ha) in ips_queue_lck()
1062 if (!ha->active) in ips_queue_lck()
1066 if (ha->copp_waitlist.count == IPS_MAX_IOCTL_QUEUE) { in ips_queue_lck()
1072 } else if (ha->scb_waitlist.count == IPS_MAX_QUEUE) { in ips_queue_lck()
1083 ha->host_num, in ips_queue_lck()
1089 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { in ips_queue_lck()
1106 if (ha->scb_activelist.count != 0) { in ips_queue_lck()
1111 ha->ioctl_reset = 1; /* This reset request is from an IOCTL */ in ips_queue_lck()
1131 ips_putq_copp_tail(&ha->copp_waitlist, scratch); in ips_queue_lck()
1133 ips_putq_wait_tail(&ha->scb_waitlist, SC); in ips_queue_lck()
1136 ips_next(ha, IPS_INTR_IORL); in ips_queue_lck()
1155 ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; in DEF_SCSI_QCMD() local
1162 if (!ha) in DEF_SCSI_QCMD()
1166 if (!ha->active) in DEF_SCSI_QCMD()
1169 if (!ips_read_adapter_status(ha, IPS_INTR_ON)) in DEF_SCSI_QCMD()
1173 if ((capacity > 0x400000) && ((ha->enq->ucMiscFlag & 0x8) == 0)) { in DEF_SCSI_QCMD()
1205 ips_ha_t *ha; in ips_slave_configure() local
1208 ha = IPS_HA(SDptr->host); in ips_slave_configure()
1210 min = ha->max_cmds / 2; in ips_slave_configure()
1211 if (ha->enq->ucLogDriveCount <= 2) in ips_slave_configure()
1212 min = ha->max_cmds - 1; in ips_slave_configure()
1233 ips_ha_t *ha; in do_ipsintr() local
1239 ha = (ips_ha_t *) dev_id; in do_ipsintr()
1240 if (!ha) in do_ipsintr()
1242 host = ips_sh[ha->host_num]; in do_ipsintr()
1245 (*ha->func.intr) (ha); in do_ipsintr()
1251 if (!ha->active) { in do_ipsintr()
1256 irqstatus = (*ha->func.intr) (ha); in do_ipsintr()
1261 ips_next(ha, IPS_INTR_ON); in do_ipsintr()
1277 ips_intr_copperhead(ips_ha_t * ha) in ips_intr_copperhead() argument
1286 if (!ha) in ips_intr_copperhead()
1289 if (!ha->active) in ips_intr_copperhead()
1292 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1303 sp = &ha->sp; in ips_intr_copperhead()
1305 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1310 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_copperhead()
1317 ips_chkstatus(ha, &cstatus); in ips_intr_copperhead()
1324 (*scb->callback) (ha, scb); in ips_intr_copperhead()
1341 ips_intr_morpheus(ips_ha_t * ha) in ips_intr_morpheus() argument
1350 if (!ha) in ips_intr_morpheus()
1353 if (!ha->active) in ips_intr_morpheus()
1356 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1367 sp = &ha->sp; in ips_intr_morpheus()
1369 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1374 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_morpheus()
1381 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_intr_morpheus()
1387 ips_chkstatus(ha, &cstatus); in ips_intr_morpheus()
1394 (*scb->callback) (ha, scb); in ips_intr_morpheus()
1413 ips_ha_t *ha; in ips_info() local
1417 ha = IPS_HA(SH); in ips_info()
1419 if (!ha) in ips_info()
1428 if (ha->ad_type > 0 && ha->ad_type <= MAX_ADAPTER_NAME) { in ips_info()
1430 strcat(bp, ips_adapter_name[ha->ad_type - 1]); in ips_info()
1441 ips_ha_t *ha = NULL; in ips_write_info() local
1447 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_write_info()
1453 if (!ha) in ips_write_info()
1463 ips_ha_t *ha = NULL; in ips_show_info() local
1469 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_show_info()
1475 if (!ha) in ips_show_info()
1478 return ips_host_info(ha, m); in ips_show_info()
1535 ips_alloc_passthru_buffer(ips_ha_t * ha, int length) in ips_alloc_passthru_buffer() argument
1540 if (ha->ioctl_data && length <= ha->ioctl_len) in ips_alloc_passthru_buffer()
1543 bigger_buf = pci_alloc_consistent(ha->pcidev, length, &dma_busaddr); in ips_alloc_passthru_buffer()
1546 pci_free_consistent(ha->pcidev, ha->ioctl_len, ha->ioctl_data, in ips_alloc_passthru_buffer()
1547 ha->ioctl_busaddr); in ips_alloc_passthru_buffer()
1549 ha->ioctl_data = (char *) bigger_buf; in ips_alloc_passthru_buffer()
1550 ha->ioctl_len = length; in ips_alloc_passthru_buffer()
1551 ha->ioctl_busaddr = dma_busaddr; in ips_alloc_passthru_buffer()
1568 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr) in ips_make_passthru() argument
1583 ips_name, ha->host_num); in ips_make_passthru()
1586 if (ips_alloc_passthru_buffer(ha, length)) { in ips_make_passthru()
1589 if (ha->ioctl_data) { in ips_make_passthru()
1590 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1598 ha->ioctl_datasize = length; in ips_make_passthru()
1600 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize); in ips_make_passthru()
1601 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1615 memcpy(ha->ioctl_data + sizeof (ips_passthru_t), in ips_make_passthru()
1617 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1630 ips_name, ha->host_num); in ips_make_passthru()
1635 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_make_passthru()
1638 ret = ips_flash_copperhead(ha, pt, scb); in ips_make_passthru()
1639 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1643 if (ips_usrcmd(ha, pt, scb)) in ips_make_passthru()
1662 ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_copperhead() argument
1668 if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { in ips_flash_copperhead()
1669 if (ips_usrcmd(ha, pt, scb)) in ips_flash_copperhead()
1682 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1685 ha->flash_data = ips_FlashData; in ips_flash_copperhead()
1686 ha->flash_busaddr = ips_flashbusaddr; in ips_flash_copperhead()
1687 ha->flash_len = PAGE_SIZE << 7; in ips_flash_copperhead()
1688 ha->flash_datasize = 0; in ips_flash_copperhead()
1689 } else if (!ha->flash_data) { in ips_flash_copperhead()
1692 ha->flash_data = pci_alloc_consistent(ha->pcidev, in ips_flash_copperhead()
1694 &ha->flash_busaddr); in ips_flash_copperhead()
1695 if (!ha->flash_data){ in ips_flash_copperhead()
1699 ha->flash_datasize = 0; in ips_flash_copperhead()
1700 ha->flash_len = datasize; in ips_flash_copperhead()
1704 if (pt->CoppCP.cmd.flashfw.count + ha->flash_datasize > in ips_flash_copperhead()
1705 ha->flash_len) { in ips_flash_copperhead()
1706 ips_free_flash_copperhead(ha); in ips_flash_copperhead()
1707 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_flash_copperhead()
1712 if (!ha->flash_data) in ips_flash_copperhead()
1715 memcpy(&ha->flash_data[ha->flash_datasize], pt + 1, in ips_flash_copperhead()
1717 ha->flash_datasize += pt->CoppCP.cmd.flashfw.count; in ips_flash_copperhead()
1721 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1723 return ips_flash_firmware(ha, pt, scb); in ips_flash_copperhead()
1734 ips_flash_bios(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_bios() argument
1739 if ((!ha->func.programbios) || (!ha->func.erasebios) || in ips_flash_bios()
1740 (!ha->func.verifybios)) in ips_flash_bios()
1742 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1745 ips_name, ha->host_num); in ips_flash_bios()
1748 if ((*ha->func.programbios) (ha, in ips_flash_bios()
1749 ha->flash_data + in ips_flash_bios()
1751 ha->flash_datasize - in ips_flash_bios()
1755 ips_name, ha->host_num); in ips_flash_bios()
1758 if ((*ha->func.verifybios) (ha, in ips_flash_bios()
1759 ha->flash_data + in ips_flash_bios()
1761 ha->flash_datasize - in ips_flash_bios()
1765 ips_name, ha->host_num); in ips_flash_bios()
1768 ips_free_flash_copperhead(ha); in ips_flash_bios()
1772 if (!ha->func.erasebios) in ips_flash_bios()
1774 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1777 ips_name, ha->host_num); in ips_flash_bios()
1785 ips_free_flash_copperhead(ha); in ips_flash_bios()
1798 ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, in ips_fill_scb_sg_single() argument
1804 if ((scb->data_len + e_len) > ha->max_xfer) { in ips_fill_scb_sg_single()
1805 e_len = ha->max_xfer - scb->data_len; in ips_fill_scb_sg_single()
1813 if (IPS_USE_ENH_SGLIST(ha)) { in ips_fill_scb_sg_single()
1836 ips_flash_firmware(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_firmware() argument
1845 pt->CoppCP.cmd.flashfw.count = cpu_to_le32(ha->flash_datasize); in ips_flash_firmware()
1849 ips_free_flash_copperhead(ha); in ips_flash_firmware()
1870 scb->data_len = ha->flash_datasize; in ips_flash_firmware()
1872 pci_map_single(ha->pcidev, ha->flash_data, scb->data_len, in ips_flash_firmware()
1875 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_flash_firmware()
1889 ips_free_flash_copperhead(ips_ha_t * ha) in ips_free_flash_copperhead() argument
1891 if (ha->flash_data == ips_FlashData) in ips_free_flash_copperhead()
1893 else if (ha->flash_data) in ips_free_flash_copperhead()
1894 pci_free_consistent(ha->pcidev, ha->flash_len, ha->flash_data, in ips_free_flash_copperhead()
1895 ha->flash_busaddr); in ips_free_flash_copperhead()
1896 ha->flash_data = NULL; in ips_free_flash_copperhead()
1909 ips_usrcmd(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_usrcmd() argument
1916 if ((!scb) || (!pt) || (!ha)) in ips_usrcmd()
1938 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_usrcmd()
1948 scb->data_busaddr = ha->ioctl_busaddr + sizeof (ips_passthru_t); in ips_usrcmd()
1997 ips_cleanup_passthru(ips_ha_t * ha, ips_scb_t * scb) in ips_cleanup_passthru() argument
2005 ips_name, ha->host_num); in ips_cleanup_passthru()
2009 pt = (ips_passthru_t *) ha->ioctl_data; in ips_cleanup_passthru()
2017 pt->AdapterType = ha->ad_type; in ips_cleanup_passthru()
2019 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_cleanup_passthru()
2022 ips_free_flash_copperhead(ha); in ips_cleanup_passthru()
2024 ips_scmd_buf_write(scb->scsi_cmd, ha->ioctl_data, ha->ioctl_datasize); in ips_cleanup_passthru()
2037 ips_host_info(ips_ha_t *ha, struct seq_file *m) in ips_host_info() argument
2043 if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && in ips_host_info()
2044 (le16_to_cpu(ha->nvram->adapter_type) != 0)) in ips_host_info()
2046 ips_adapter_name[ha->ad_type - 1]); in ips_host_info()
2050 if (ha->io_addr) in ips_host_info()
2053 ha->io_addr, ha->io_len); in ips_host_info()
2055 if (ha->mem_addr) { in ips_host_info()
2058 ha->mem_addr, ha->mem_len); in ips_host_info()
2061 (unsigned long)ha->mem_ptr); in ips_host_info()
2064 seq_printf(m, "\tIRQ number : %d\n", ha->pcidev->irq); in ips_host_info()
2069 if (le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) { in ips_host_info()
2070 if (ha->nvram->bios_low[3] == 0) { in ips_host_info()
2073 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2074 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2075 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2076 ha->nvram->bios_low[2]); in ips_host_info()
2081 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2082 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2083 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2084 ha->nvram->bios_low[2], ha->nvram->bios_low[3]); in ips_host_info()
2089 if (ha->enq->CodeBlkVersion[7] == 0) { in ips_host_info()
2092 ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], in ips_host_info()
2093 ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], in ips_host_info()
2094 ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], in ips_host_info()
2095 ha->enq->CodeBlkVersion[6]); in ips_host_info()
2099 ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], in ips_host_info()
2100 ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], in ips_host_info()
2101 ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], in ips_host_info()
2102 ha->enq->CodeBlkVersion[6], ha->enq->CodeBlkVersion[7]); in ips_host_info()
2105 if (ha->enq->BootBlkVersion[7] == 0) { in ips_host_info()
2108 ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], in ips_host_info()
2109 ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], in ips_host_info()
2110 ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], in ips_host_info()
2111 ha->enq->BootBlkVersion[6]); in ips_host_info()
2115 ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], in ips_host_info()
2116 ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], in ips_host_info()
2117 ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], in ips_host_info()
2118 ha->enq->BootBlkVersion[6], ha->enq->BootBlkVersion[7]); in ips_host_info()
2128 ha->enq->ucMaxPhysicalDevices); in ips_host_info()
2130 ha->max_cmds); in ips_host_info()
2132 ha->scb_waitlist.count); in ips_host_info()
2134 ha->scb_activelist.count - ha->num_ioctl); in ips_host_info()
2136 ha->copp_waitlist.count); in ips_host_info()
2138 ha->num_ioctl); in ips_host_info()
2155 ips_identify_controller(ips_ha_t * ha) in ips_identify_controller() argument
2159 switch (ha->pcidev->device) { in ips_identify_controller()
2161 if (ha->pcidev->revision <= IPS_REVID_SERVERAID) { in ips_identify_controller()
2162 ha->ad_type = IPS_ADTYPE_SERVERAID; in ips_identify_controller()
2163 } else if (ha->pcidev->revision == IPS_REVID_SERVERAID2) { in ips_identify_controller()
2164 ha->ad_type = IPS_ADTYPE_SERVERAID2; in ips_identify_controller()
2165 } else if (ha->pcidev->revision == IPS_REVID_NAVAJO) { in ips_identify_controller()
2166 ha->ad_type = IPS_ADTYPE_NAVAJO; in ips_identify_controller()
2167 } else if ((ha->pcidev->revision == IPS_REVID_SERVERAID2) in ips_identify_controller()
2168 && (ha->slot_num == 0)) { in ips_identify_controller()
2169 ha->ad_type = IPS_ADTYPE_KIOWA; in ips_identify_controller()
2170 } else if ((ha->pcidev->revision >= IPS_REVID_CLARINETP1) && in ips_identify_controller()
2171 (ha->pcidev->revision <= IPS_REVID_CLARINETP3)) { in ips_identify_controller()
2172 if (ha->enq->ucMaxPhysicalDevices == 15) in ips_identify_controller()
2173 ha->ad_type = IPS_ADTYPE_SERVERAID3L; in ips_identify_controller()
2175 ha->ad_type = IPS_ADTYPE_SERVERAID3; in ips_identify_controller()
2176 } else if ((ha->pcidev->revision >= IPS_REVID_TROMBONE32) && in ips_identify_controller()
2177 (ha->pcidev->revision <= IPS_REVID_TROMBONE64)) { in ips_identify_controller()
2178 ha->ad_type = IPS_ADTYPE_SERVERAID4H; in ips_identify_controller()
2183 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2185 ha->ad_type = IPS_ADTYPE_SERVERAID4L; in ips_identify_controller()
2189 ha->ad_type = IPS_ADTYPE_SERVERAID4M; in ips_identify_controller()
2193 ha->ad_type = IPS_ADTYPE_SERVERAID4MX; in ips_identify_controller()
2197 ha->ad_type = IPS_ADTYPE_SERVERAID4LX; in ips_identify_controller()
2201 ha->ad_type = IPS_ADTYPE_SERVERAID5I2; in ips_identify_controller()
2205 ha->ad_type = IPS_ADTYPE_SERVERAID5I1; in ips_identify_controller()
2212 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2214 ha->ad_type = IPS_ADTYPE_SERVERAID6M; in ips_identify_controller()
2217 ha->ad_type = IPS_ADTYPE_SERVERAID6I; in ips_identify_controller()
2220 ha->ad_type = IPS_ADTYPE_SERVERAID7k; in ips_identify_controller()
2223 ha->ad_type = IPS_ADTYPE_SERVERAID7M; in ips_identify_controller()
2240 ips_get_bios_version(ips_ha_t * ha, int intr) in ips_get_bios_version() argument
2257 strncpy(ha->bios_version, " ?", 8); in ips_get_bios_version()
2259 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { in ips_get_bios_version()
2260 if (IPS_USE_MEMIO(ha)) { in ips_get_bios_version()
2264 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2265 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2268 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2271 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2272 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2275 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2279 writel(0x1FF, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2280 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2283 major = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2286 writel(0x1FE, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2287 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2289 minor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2292 writel(0x1FD, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2293 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2295 subminor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2301 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2302 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2305 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2308 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2309 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2312 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2316 outl(0x1FF, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2317 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2320 major = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2323 outl(0x1FE, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2324 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2327 minor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2330 outl(0x1FD, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2331 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2334 subminor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2340 buffer = ha->ioctl_data; in ips_get_bios_version()
2344 scb = &ha->scbs[ha->max_cmds - 1]; in ips_get_bios_version()
2346 ips_init_scb(ha, scb); in ips_get_bios_version()
2352 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_get_bios_version()
2359 scb->cmd.flashfw.buffer_addr = ha->ioctl_busaddr; in ips_get_bios_version()
2363 ips_send_wait(ha, scb, ips_cmd_timeout, in ips_get_bios_version()
2381 ha->bios_version[0] = hexDigits[(major & 0xF0) >> 4]; in ips_get_bios_version()
2382 ha->bios_version[1] = '.'; in ips_get_bios_version()
2383 ha->bios_version[2] = hexDigits[major & 0x0F]; in ips_get_bios_version()
2384 ha->bios_version[3] = hexDigits[subminor]; in ips_get_bios_version()
2385 ha->bios_version[4] = '.'; in ips_get_bios_version()
2386 ha->bios_version[5] = hexDigits[(minor & 0xF0) >> 4]; in ips_get_bios_version()
2387 ha->bios_version[6] = hexDigits[minor & 0x0F]; in ips_get_bios_version()
2388 ha->bios_version[7] = 0; in ips_get_bios_version()
2403 ips_hainit(ips_ha_t * ha) in ips_hainit() argument
2410 if (!ha) in ips_hainit()
2413 if (ha->func.statinit) in ips_hainit()
2414 (*ha->func.statinit) (ha); in ips_hainit()
2416 if (ha->func.enableint) in ips_hainit()
2417 (*ha->func.enableint) (ha); in ips_hainit()
2420 ha->reset_count = 1; in ips_hainit()
2422 ha->last_ffdc = tv.tv_sec; in ips_hainit()
2423 ips_ffdc_reset(ha, IPS_INTR_IORL); in ips_hainit()
2425 if (!ips_read_config(ha, IPS_INTR_IORL)) { in ips_hainit()
2426 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2432 if (!ips_read_adapter_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2433 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2440 ips_identify_controller(ha); in ips_hainit()
2442 if (!ips_read_subsystem_parameters(ha, IPS_INTR_IORL)) { in ips_hainit()
2443 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2450 if (!ips_write_driver_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2451 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2458 if ((ha->conf->ucLogDriveCount > 0) && (ha->requires_esl == 1)) in ips_hainit()
2459 ips_clear_adapter(ha, IPS_INTR_IORL); in ips_hainit()
2462 ha->ntargets = IPS_MAX_TARGETS + 1; in ips_hainit()
2463 ha->nlun = 1; in ips_hainit()
2464 ha->nbus = (ha->enq->ucMaxPhysicalDevices / IPS_MAX_TARGETS) + 1; in ips_hainit()
2466 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2468 ha->max_xfer = 0x10000; in ips_hainit()
2472 ha->max_xfer = 0x20000; in ips_hainit()
2476 ha->max_xfer = 0x40000; in ips_hainit()
2481 ha->max_xfer = 0x80000; in ips_hainit()
2486 if (le32_to_cpu(ha->subsys->param[4]) & 0x1) { in ips_hainit()
2488 ha->max_cmds = ha->enq->ucConcurrentCmdCount; in ips_hainit()
2491 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2493 ha->max_cmds = 32; in ips_hainit()
2497 ha->max_cmds = 16; in ips_hainit()
2501 ha->max_cmds = 8; in ips_hainit()
2506 ha->max_cmds = 4; in ips_hainit()
2512 if ((ha->ad_type == IPS_ADTYPE_SERVERAID3L) || in ips_hainit()
2513 (ha->ad_type == IPS_ADTYPE_SERVERAID4L) || in ips_hainit()
2514 (ha->ad_type == IPS_ADTYPE_SERVERAID4LX)) { in ips_hainit()
2515 if ((ha->max_cmds > MaxLiteCmds) && (MaxLiteCmds)) in ips_hainit()
2516 ha->max_cmds = MaxLiteCmds; in ips_hainit()
2520 ha->ha_id[0] = IPS_ADAPTER_ID; in ips_hainit()
2521 for (i = 1; i < ha->nbus; i++) { in ips_hainit()
2522 ha->ha_id[i] = ha->conf->init_id[i - 1] & 0x1f; in ips_hainit()
2523 ha->dcdb_active[i - 1] = 0; in ips_hainit()
2539 ips_next(ips_ha_t * ha, int intr) in ips_next() argument
2550 if (!ha) in ips_next()
2552 host = ips_sh[ha->host_num]; in ips_next()
2560 if ((ha->subsys->param[3] & 0x300000) in ips_next()
2561 && (ha->scb_activelist.count == 0)) { in ips_next()
2566 if (tv.tv_sec - ha->last_ffdc > IPS_SECS_8HOURS) { in ips_next()
2567 ha->last_ffdc = tv.tv_sec; in ips_next()
2568 ips_ffdc_time(ha); in ips_next()
2579 while ((ha->num_ioctl < IPS_MAX_IOCTL) && in ips_next()
2580 (ha->copp_waitlist.head) && (scb = ips_getscb(ha))) { in ips_next()
2582 item = ips_removeq_copp_head(&ha->copp_waitlist); in ips_next()
2583 ha->num_ioctl++; in ips_next()
2589 ret = ips_make_passthru(ha, scb->scsi_cmd, scb, intr); in ips_next()
2600 ips_freescb(ha, scb); in ips_next()
2608 ips_freescb(ha, scb); in ips_next()
2615 ha->num_ioctl--; in ips_next()
2619 ret = ips_send_cmd(ha, scb); in ips_next()
2622 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2624 ha->num_ioctl--; in ips_next()
2632 ips_freescb(ha, scb); in ips_next()
2635 ips_freescb(ha, scb); in ips_next()
2647 p = ha->scb_waitlist.head; in ips_next()
2648 while ((p) && (scb = ips_getscb(ha))) { in ips_next()
2650 && (ha-> in ips_next()
2653 ips_freescb(ha, scb); in ips_next()
2659 SC = ips_removeq_wait(&ha->scb_waitlist, q); in ips_next()
2690 (ha, sg_dma_address(sg), scb, i, in ips_next()
2721 ret = ips_send_cmd(ha, scb); in ips_next()
2725 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2734 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2737 ips_freescb(ha, scb); in ips_next()
2744 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2747 ips_freescb(ha, scb); in ips_next()
3104 ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_blocking() argument
3108 ips_freescb(ha, scb); in ipsintr_blocking()
3109 if ((ha->waitflag == TRUE) && (ha->cmd_in_progress == scb->cdb[0])) { in ipsintr_blocking()
3110 ha->waitflag = FALSE; in ipsintr_blocking()
3126 ipsintr_done(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_done() argument
3131 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3139 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3145 ips_done(ha, scb); in ipsintr_done()
3158 ips_done(ips_ha_t * ha, ips_scb_t * scb) in ips_done() argument
3168 ips_cleanup_passthru(ha, scb); in ips_done()
3169 ha->num_ioctl--; in ips_done()
3191 ips_fill_scb_sg_single(ha, in ips_done()
3199 (ha, in ips_done()
3218 ret = ips_send_cmd(ha, scb); in ips_done()
3227 ips_freescb(ha, scb); in ips_done()
3235 ips_freescb(ha, scb); in ips_done()
3246 ha->dcdb_active[scb->bus - 1] &= ~(1 << scb->target_id); in ips_done()
3251 ips_freescb(ha, scb); in ips_done()
3264 ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) in ips_map_status() argument
3277 ips_name, ha->host_num, in ips_map_status()
3401 ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr) in ips_send_wait() argument
3408 ha->waitflag = TRUE; in ips_send_wait()
3409 ha->cmd_in_progress = scb->cdb[0]; in ips_send_wait()
3412 ret = ips_send_cmd(ha, scb); in ips_send_wait()
3418 ret = ips_wait(ha, timeout, intr); in ips_send_wait()
3467 ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) in ips_send_cmd() argument
3485 if ((ha->waitflag == TRUE) && in ips_send_cmd()
3486 (ha->cmd_in_progress == scb->cdb[0])) { in ips_send_cmd()
3487 ha->waitflag = FALSE; in ips_send_cmd()
3552 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3556 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3565 ips_reqsen(ha, scb); in ips_send_cmd()
3584 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3590 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3630 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3636 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3675 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3678 scb->data_len = sizeof (*ha->enq); in ips_send_cmd()
3679 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_send_cmd()
3685 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3690 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3733 if (ha->conf->dev[scb->bus - 1][scb->target_id].ucState == 0) { in ips_send_cmd()
3738 ha->dcdb_active[scb->bus - 1] |= (1 << scb->target_id); in ips_send_cmd()
3739 scb->cmd.dcdb.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3752 if (ha->subsys->param[4] & 0x00100000) { /* If NEW Tape DCDB is Supported */ in ips_send_cmd()
3759 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3798 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3836 return ((*ha->func.issue) (ha, scb)); in ips_send_cmd()
3849 ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) in ips_chkstatus() argument
3860 scb = &ha->scbs[pstatus->fields.command_id]; in ips_chkstatus()
3865 sp = &ha->sp; in ips_chkstatus()
3870 ips_removeq_scb(&ha->scb_activelist, scb); in ips_chkstatus()
3878 ha->host_num, in ips_chkstatus()
3897 ips_name, ha->host_num, in ips_chkstatus()
3915 if (!ips_online(ha, scb)) { in ips_chkstatus()
3921 if (ips_online(ha, scb)) { in ips_chkstatus()
3922 ips_inquiry(ha, scb); in ips_chkstatus()
3929 ips_reqsen(ha, scb); in ips_chkstatus()
3941 if (!ips_online(ha, scb) in ips_chkstatus()
3942 || !ips_msense(ha, scb)) { in ips_chkstatus()
3948 if (ips_online(ha, scb)) in ips_chkstatus()
3949 ips_rdcap(ha, scb); in ips_chkstatus()
3988 ips_name, ha->host_num, in ips_chkstatus()
3993 ips_map_status(ha, scb, sp); in ips_chkstatus()
4007 ips_online(ips_ha_t * ha, ips_scb_t * scb) in ips_online() argument
4015 memset(ha->logical_drive_info, 0, sizeof (IPS_LD_INFO)); in ips_online()
4019 if (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()
4023 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4025 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4042 ips_inquiry(ips_ha_t * ha, ips_scb_t * scb) in ips_inquiry() argument
4077 ips_rdcap(ips_ha_t * ha, ips_scb_t * scb) in ips_rdcap() argument
4088 (ha->logical_drive_info-> in ips_rdcap()
4107 ips_msense(ips_ha_t * ha, ips_scb_t * scb) in ips_msense() argument
4116 if (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) > 0x400000 && in ips_msense()
4117 (ha->enq->ucMiscFlag & 0x8) == 0) { in ips_msense()
4126 (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) - in ips_msense()
4198 ips_reqsen(ips_ha_t * ha, ips_scb_t * scb) in ips_reqsen() argument
4227 ips_free(ips_ha_t * ha) in ips_free() argument
4232 if (ha) { in ips_free()
4233 if (ha->enq) { in ips_free()
4234 pci_free_consistent(ha->pcidev, sizeof(IPS_ENQ), in ips_free()
4235 ha->enq, ha->enq_busaddr); in ips_free()
4236 ha->enq = NULL; in ips_free()
4239 kfree(ha->conf); in ips_free()
4240 ha->conf = NULL; in ips_free()
4242 if (ha->adapt) { in ips_free()
4243 pci_free_consistent(ha->pcidev, in ips_free()
4245 sizeof (IPS_IO_CMD), ha->adapt, in ips_free()
4246 ha->adapt->hw_status_start); in ips_free()
4247 ha->adapt = NULL; in ips_free()
4250 if (ha->logical_drive_info) { in ips_free()
4251 pci_free_consistent(ha->pcidev, in ips_free()
4253 ha->logical_drive_info, in ips_free()
4254 ha->logical_drive_info_dma_addr); in ips_free()
4255 ha->logical_drive_info = NULL; in ips_free()
4258 kfree(ha->nvram); in ips_free()
4259 ha->nvram = NULL; in ips_free()
4261 kfree(ha->subsys); in ips_free()
4262 ha->subsys = NULL; in ips_free()
4264 if (ha->ioctl_data) { in ips_free()
4265 pci_free_consistent(ha->pcidev, ha->ioctl_len, in ips_free()
4266 ha->ioctl_data, ha->ioctl_busaddr); in ips_free()
4267 ha->ioctl_data = NULL; in ips_free()
4268 ha->ioctl_datasize = 0; in ips_free()
4269 ha->ioctl_len = 0; in ips_free()
4271 ips_deallocatescbs(ha, ha->max_cmds); in ips_free()
4274 if (ha->mem_ptr) { in ips_free()
4275 iounmap(ha->ioremap_ptr); in ips_free()
4276 ha->ioremap_ptr = NULL; in ips_free()
4277 ha->mem_ptr = NULL; in ips_free()
4280 ha->mem_addr = 0; in ips_free()
4295 ips_deallocatescbs(ips_ha_t * ha, int cmds) in ips_deallocatescbs() argument
4297 if (ha->scbs) { in ips_deallocatescbs()
4298 pci_free_consistent(ha->pcidev, in ips_deallocatescbs()
4299 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * cmds, in ips_deallocatescbs()
4300 ha->scbs->sg_list.list, in ips_deallocatescbs()
4301 ha->scbs->sg_busaddr); in ips_deallocatescbs()
4302 pci_free_consistent(ha->pcidev, sizeof (ips_scb_t) * cmds, in ips_deallocatescbs()
4303 ha->scbs, ha->scbs->scb_busaddr); in ips_deallocatescbs()
4304 ha->scbs = NULL; in ips_deallocatescbs()
4319 ips_allocatescbs(ips_ha_t * ha) in ips_allocatescbs() argument
4329 ha->scbs = in ips_allocatescbs()
4330 pci_alloc_consistent(ha->pcidev, ha->max_cmds * sizeof (ips_scb_t), in ips_allocatescbs()
4332 if (ha->scbs == NULL) in ips_allocatescbs()
4335 pci_alloc_consistent(ha->pcidev, in ips_allocatescbs()
4336 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * in ips_allocatescbs()
4337 ha->max_cmds, &sg_dma); in ips_allocatescbs()
4339 pci_free_consistent(ha->pcidev, in ips_allocatescbs()
4340 ha->max_cmds * sizeof (ips_scb_t), ha->scbs, in ips_allocatescbs()
4345 memset(ha->scbs, 0, ha->max_cmds * sizeof (ips_scb_t)); in ips_allocatescbs()
4347 for (i = 0; i < ha->max_cmds; i++) { in ips_allocatescbs()
4348 scb_p = &ha->scbs[i]; in ips_allocatescbs()
4351 if (IPS_USE_ENH_SGLIST(ha)) { in ips_allocatescbs()
4355 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4360 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4364 if (i < ha->max_cmds - 1) { in ips_allocatescbs()
4365 scb_p->q_next = ha->scb_freelist; in ips_allocatescbs()
4366 ha->scb_freelist = scb_p; in ips_allocatescbs()
4384 ips_init_scb(ips_ha_t * ha, ips_scb_t * scb) in ips_init_scb() argument
4398 memset(ha->dummy, 0, sizeof (IPS_IO_CMD)); in ips_init_scb()
4401 ha->dummy->op_code = 0xFF; in ips_init_scb()
4402 ha->dummy->ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4404 ha->dummy->command_id = IPS_MAX_CMDS; in ips_init_scb()
4413 scb->cmd.basic_io.ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4429 ips_getscb(ips_ha_t * ha) in ips_getscb() argument
4435 if ((scb = ha->scb_freelist) == NULL) { in ips_getscb()
4440 ha->scb_freelist = scb->q_next; in ips_getscb()
4444 ips_init_scb(ha, scb); in ips_getscb()
4461 ips_freescb(ips_ha_t * ha, ips_scb_t * scb) in ips_freescb() argument
4468 pci_unmap_single(ha->pcidev, scb->data_busaddr, scb->data_len, in ips_freescb()
4472 if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) { in ips_freescb()
4473 scb->q_next = ha->scb_freelist; in ips_freescb()
4474 ha->scb_freelist = scb; in ips_freescb()
4488 ips_isinit_copperhead(ips_ha_t * ha) in ips_isinit_copperhead() argument
4495 isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isinit_copperhead()
4496 scpr = inb(ha->io_addr + IPS_REG_SCPR); in ips_isinit_copperhead()
4514 ips_isinit_copperhead_memio(ips_ha_t * ha) in ips_isinit_copperhead_memio() argument
4521 isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isinit_copperhead_memio()
4522 scpr = readb(ha->mem_ptr + IPS_REG_SCPR); in ips_isinit_copperhead_memio()
4540 ips_isinit_morpheus(ips_ha_t * ha) in ips_isinit_morpheus() argument
4547 if (ips_isintr_morpheus(ha)) in ips_isinit_morpheus()
4548 ips_flush_and_reset(ha); in ips_isinit_morpheus()
4550 post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_isinit_morpheus()
4551 bits = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isinit_morpheus()
4572 ips_flush_and_reset(ips_ha_t *ha) in ips_flush_and_reset() argument
4581 scb = pci_alloc_consistent(ha->pcidev, sizeof(ips_scb_t), &command_dma); in ips_flush_and_reset()
4584 ips_init_scb(ha, scb); in ips_flush_and_reset()
4598 ret = ips_send_cmd(ha, scb); /* Send the Flush Command */ in ips_flush_and_reset()
4605 done = ips_poll_for_flush_complete(ha); in ips_flush_and_reset()
4614 (*ha->func.reset) (ha); in ips_flush_and_reset()
4616 pci_free_consistent(ha->pcidev, sizeof(ips_scb_t), scb, command_dma); in ips_flush_and_reset()
4631 ips_poll_for_flush_complete(ips_ha_t * ha) in ips_poll_for_flush_complete() argument
4636 cstatus.value = (*ha->func.statupd) (ha); in ips_poll_for_flush_complete()
4658 ips_enable_int_copperhead(ips_ha_t * ha) in ips_enable_int_copperhead() argument
4662 outb(ha->io_addr + IPS_REG_HISR, IPS_BIT_EI); in ips_enable_int_copperhead()
4663 inb(ha->io_addr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead()
4675 ips_enable_int_copperhead_memio(ips_ha_t * ha) in ips_enable_int_copperhead_memio() argument
4679 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_enable_int_copperhead_memio()
4680 readb(ha->mem_ptr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead_memio()
4692 ips_enable_int_morpheus(ips_ha_t * ha) in ips_enable_int_morpheus() argument
4698 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4700 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4701 readl(ha->mem_ptr + IPS_REG_I960_OIMR); /*Ensure PCI Posting Completes*/ in ips_enable_int_morpheus()
4714 ips_init_copperhead(ips_ha_t * ha) in ips_init_copperhead() argument
4726 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4738 PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4739 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4743 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead()
4752 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4764 ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4765 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4769 Cbsp = inb(ha->io_addr + IPS_REG_CBSP); in ips_init_copperhead()
4783 outl(0x1010, ha->io_addr + IPS_REG_CCCR); in ips_init_copperhead()
4786 outb(IPS_BIT_EBM, ha->io_addr + IPS_REG_SCPR); in ips_init_copperhead()
4788 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead()
4790 outl(0, ha->io_addr + IPS_REG_NDAE); in ips_init_copperhead()
4793 outb(IPS_BIT_EI, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4808 ips_init_copperhead_memio(ips_ha_t * ha) in ips_init_copperhead_memio() argument
4820 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4832 PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4833 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4837 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead_memio()
4846 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4858 ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4859 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4863 Cbsp = readb(ha->mem_ptr + IPS_REG_CBSP); in ips_init_copperhead_memio()
4877 writel(0x1010, ha->mem_ptr + IPS_REG_CCCR); in ips_init_copperhead_memio()
4880 writeb(IPS_BIT_EBM, ha->mem_ptr + IPS_REG_SCPR); in ips_init_copperhead_memio()
4882 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead_memio()
4884 writel(0, ha->mem_ptr + IPS_REG_NDAE); in ips_init_copperhead_memio()
4887 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4903 ips_init_morpheus(ips_ha_t * ha) in ips_init_morpheus() argument
4915 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4926 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4932 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4935 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4940 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4943 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4951 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4960 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4963 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4971 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4982 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4988 Config = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_morpheus()
4992 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4995 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
4997 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
5004 ha->requires_esl = 1; in ips_init_morpheus()
5020 ips_reset_copperhead(ips_ha_t * ha) in ips_reset_copperhead() argument
5027 ips_name, ha->host_num, ha->io_addr, ha->pcidev->irq); in ips_reset_copperhead()
5034 outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5039 outb(0, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5044 if ((*ha->func.init) (ha)) in ips_reset_copperhead()
5065 ips_reset_copperhead_memio(ips_ha_t * ha) in ips_reset_copperhead_memio() argument
5072 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_copperhead_memio()
5079 writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5084 writeb(0, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5089 if ((*ha->func.init) (ha)) in ips_reset_copperhead_memio()
5110 ips_reset_morpheus(ips_ha_t * ha) in ips_reset_morpheus() argument
5118 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_morpheus()
5125 writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); in ips_reset_morpheus()
5131 pci_read_config_byte(ha->pcidev, 4, &junk); in ips_reset_morpheus()
5133 if ((*ha->func.init) (ha)) in ips_reset_morpheus()
5154 ips_statinit(ips_ha_t * ha) in ips_statinit() argument
5160 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit()
5161 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit()
5162 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit()
5164 phys_status_start = ha->adapt->hw_status_start; in ips_statinit()
5165 outl(phys_status_start, ha->io_addr + IPS_REG_SQSR); in ips_statinit()
5167 ha->io_addr + IPS_REG_SQER); in ips_statinit()
5169 ha->io_addr + IPS_REG_SQHR); in ips_statinit()
5170 outl(phys_status_start, ha->io_addr + IPS_REG_SQTR); in ips_statinit()
5172 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit()
5185 ips_statinit_memio(ips_ha_t * ha) in ips_statinit_memio() argument
5191 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit_memio()
5192 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit_memio()
5193 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit_memio()
5195 phys_status_start = ha->adapt->hw_status_start; in ips_statinit_memio()
5196 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQSR); in ips_statinit_memio()
5198 ha->mem_ptr + IPS_REG_SQER); in ips_statinit_memio()
5199 writel(phys_status_start + IPS_STATUS_SIZE, ha->mem_ptr + IPS_REG_SQHR); in ips_statinit_memio()
5200 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQTR); in ips_statinit_memio()
5202 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit_memio()
5215 ips_statupd_copperhead(ips_ha_t * ha) in ips_statupd_copperhead() argument
5219 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead()
5220 ha->adapt->p_status_tail++; in ips_statupd_copperhead()
5221 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead()
5223 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead()
5224 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead()
5227 outl(ha->adapt->hw_status_tail, in ips_statupd_copperhead()
5228 ha->io_addr + IPS_REG_SQTR); in ips_statupd_copperhead()
5230 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead()
5243 ips_statupd_copperhead_memio(ips_ha_t * ha) in ips_statupd_copperhead_memio() argument
5247 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead_memio()
5248 ha->adapt->p_status_tail++; in ips_statupd_copperhead_memio()
5249 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead_memio()
5251 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead_memio()
5252 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead_memio()
5255 writel(ha->adapt->hw_status_tail, ha->mem_ptr + IPS_REG_SQTR); in ips_statupd_copperhead_memio()
5257 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead_memio()
5270 ips_statupd_morpheus(ips_ha_t * ha) in ips_statupd_morpheus() argument
5276 val = readl(ha->mem_ptr + IPS_REG_I2O_OUTMSGQ); in ips_statupd_morpheus()
5291 ips_issue_copperhead(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead() argument
5301 ha->host_num, in ips_issue_copperhead()
5307 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead()
5313 le32_to_cpu(inl(ha->io_addr + IPS_REG_CCCR))) & IPS_BIT_SEM) { in ips_issue_copperhead()
5320 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5322 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5329 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_CCSAR); in ips_issue_copperhead()
5330 outw(IPS_BIT_START_CMD, ha->io_addr + IPS_REG_CCCR); in ips_issue_copperhead()
5345 ips_issue_copperhead_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead_memio() argument
5355 ha->host_num, in ips_issue_copperhead_memio()
5361 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead_memio()
5366 while ((val = readl(ha->mem_ptr + IPS_REG_CCCR)) & IPS_BIT_SEM) { in ips_issue_copperhead_memio()
5373 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5375 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5382 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_CCSAR); in ips_issue_copperhead_memio()
5383 writel(IPS_BIT_START_CMD, ha->mem_ptr + IPS_REG_CCCR); in ips_issue_copperhead_memio()
5398 ips_issue_i2o(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o() argument
5406 ha->host_num, in ips_issue_i2o()
5412 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o()
5415 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o()
5430 ips_issue_i2o_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o_memio() argument
5438 ha->host_num, in ips_issue_i2o_memio()
5444 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o_memio()
5447 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o_memio()
5462 ips_isintr_copperhead(ips_ha_t * ha) in ips_isintr_copperhead() argument
5468 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5479 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5495 ips_isintr_copperhead_memio(ips_ha_t * ha) in ips_isintr_copperhead_memio() argument
5501 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5512 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5528 ips_isintr_morpheus(ips_ha_t * ha) in ips_isintr_morpheus() argument
5534 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isintr_morpheus()
5552 ips_wait(ips_ha_t * ha, int time, int intr) in ips_wait() argument
5566 if (ha->waitflag == FALSE) { in ips_wait()
5572 if (ha->waitflag == FALSE) { in ips_wait()
5589 (*ha->func.intr) (ha); in ips_wait()
5610 ips_write_driver_status(ips_ha_t * ha, int intr) in ips_write_driver_status() argument
5614 if (!ips_readwrite_page5(ha, FALSE, intr)) { in ips_write_driver_status()
5615 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5623 if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) { in ips_write_driver_status()
5626 ips_name, ha->host_num, ha->nvram->signature); in ips_write_driver_status()
5627 ha->nvram->signature = IPS_NVRAM_P5_SIG; in ips_write_driver_status()
5632 ips_name, ha->host_num, le16_to_cpu(ha->nvram->adapter_type), in ips_write_driver_status()
5633 ha->nvram->adapter_slot, ha->nvram->bios_high[0], in ips_write_driver_status()
5634 ha->nvram->bios_high[1], ha->nvram->bios_high[2], in ips_write_driver_status()
5635 ha->nvram->bios_high[3], ha->nvram->bios_low[0], in ips_write_driver_status()
5636 ha->nvram->bios_low[1], ha->nvram->bios_low[2], in ips_write_driver_status()
5637 ha->nvram->bios_low[3]); in ips_write_driver_status()
5639 ips_get_bios_version(ha, intr); in ips_write_driver_status()
5642 ha->nvram->operating_system = IPS_OS_LINUX; in ips_write_driver_status()
5643 ha->nvram->adapter_type = ha->ad_type; in ips_write_driver_status()
5644 strncpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); in ips_write_driver_status()
5645 strncpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); in ips_write_driver_status()
5646 strncpy((char *) ha->nvram->bios_high, ha->bios_version, 4); in ips_write_driver_status()
5647 strncpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); in ips_write_driver_status()
5649 ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ in ips_write_driver_status()
5652 if (!ips_readwrite_page5(ha, TRUE, intr)) { in ips_write_driver_status()
5653 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5660 ha->slot_num = ha->nvram->adapter_slot; in ips_write_driver_status()
5675 ips_read_adapter_status(ips_ha_t * ha, int intr) in ips_read_adapter_status() argument
5682 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_adapter_status()
5684 ips_init_scb(ha, scb); in ips_read_adapter_status()
5690 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_adapter_status()
5695 scb->data_len = sizeof (*ha->enq); in ips_read_adapter_status()
5696 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_read_adapter_status()
5700 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_adapter_status()
5718 ips_read_subsystem_parameters(ips_ha_t * ha, int intr) in ips_read_subsystem_parameters() argument
5725 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_subsystem_parameters()
5727 ips_init_scb(ha, scb); in ips_read_subsystem_parameters()
5733 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_subsystem_parameters()
5738 scb->data_len = sizeof (*ha->subsys); in ips_read_subsystem_parameters()
5739 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_subsystem_parameters()
5743 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_subsystem_parameters()
5748 memcpy(ha->subsys, ha->ioctl_data, sizeof(*ha->subsys)); in ips_read_subsystem_parameters()
5762 ips_read_config(ips_ha_t * ha, int intr) in ips_read_config() argument
5772 ha->conf->init_id[i] = 7; in ips_read_config()
5774 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_config()
5776 ips_init_scb(ha, scb); in ips_read_config()
5782 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_config()
5783 scb->data_len = sizeof (*ha->conf); in ips_read_config()
5784 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_config()
5788 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_config()
5792 memset(ha->conf, 0, sizeof (IPS_CONF)); in ips_read_config()
5796 ha->conf->init_id[i] = 7; in ips_read_config()
5806 memcpy(ha->conf, ha->ioctl_data, sizeof(*ha->conf)); in ips_read_config()
5820 ips_readwrite_page5(ips_ha_t * ha, int write, int intr) in ips_readwrite_page5() argument
5827 scb = &ha->scbs[ha->max_cmds - 1]; in ips_readwrite_page5()
5829 ips_init_scb(ha, scb); in ips_readwrite_page5()
5835 scb->cmd.nvram.command_id = IPS_COMMAND_ID(ha, scb); in ips_readwrite_page5()
5840 scb->data_len = sizeof (*ha->nvram); in ips_readwrite_page5()
5841 scb->cmd.nvram.buffer_addr = ha->ioctl_busaddr; in ips_readwrite_page5()
5843 memcpy(ha->ioctl_data, ha->nvram, sizeof(*ha->nvram)); in ips_readwrite_page5()
5847 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_readwrite_page5()
5851 memset(ha->nvram, 0, sizeof (IPS_NVRAM_P5)); in ips_readwrite_page5()
5856 memcpy(ha->nvram, ha->ioctl_data, sizeof(*ha->nvram)); in ips_readwrite_page5()
5870 ips_clear_adapter(ips_ha_t * ha, int intr) in ips_clear_adapter() argument
5877 scb = &ha->scbs[ha->max_cmds - 1]; in ips_clear_adapter()
5879 ips_init_scb(ha, scb); in ips_clear_adapter()
5885 scb->cmd.config_sync.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5894 ips_send_wait(ha, scb, ips_reset_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5900 ips_init_scb(ha, scb); in ips_clear_adapter()
5906 scb->cmd.unlock_stripe.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5915 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5933 ips_ffdc_reset(ips_ha_t * ha, int intr) in ips_ffdc_reset() argument
5939 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_reset()
5941 ips_init_scb(ha, scb); in ips_ffdc_reset()
5946 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_reset()
5947 scb->cmd.ffdc.reset_count = ha->reset_count; in ips_ffdc_reset()
5951 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_reset()
5954 ips_send_wait(ha, scb, ips_cmd_timeout, intr); in ips_ffdc_reset()
5967 ips_ffdc_time(ips_ha_t * ha) in ips_ffdc_time() argument
5973 DEBUG_VAR(1, "(%s%d) Sending time update.", ips_name, ha->host_num); in ips_ffdc_time()
5975 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_time()
5977 ips_init_scb(ha, scb); in ips_ffdc_time()
5982 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_time()
5987 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_time()
5990 ips_send_wait(ha, scb, ips_cmd_timeout, IPS_FFDC); in ips_ffdc_time()
6002 ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time_t current_time) in ips_fix_ffdc_time() argument
6070 ips_erase_bios(ips_ha_t * ha) in ips_erase_bios() argument
6080 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6081 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6084 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6085 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6089 outb(0x20, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6090 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6094 outb(0xD0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6095 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6099 outb(0x70, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6100 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6106 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6107 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6111 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6125 outb(0xB0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6126 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6132 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6133 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6137 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6161 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6162 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6166 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6167 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6182 ips_erase_bios_memio(ips_ha_t * ha) in ips_erase_bios_memio() argument
6192 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6193 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6196 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6197 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6201 writeb(0x20, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6202 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6206 writeb(0xD0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6207 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6211 writeb(0x70, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6212 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6218 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6219 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6223 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6237 writeb(0xB0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6238 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6244 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6245 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6249 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6273 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6274 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6278 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6279 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6294 ips_program_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios() argument
6307 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6308 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6311 outb(0x40, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6312 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6315 outb(buffer[i], ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6316 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6322 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios()
6323 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6327 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6338 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6339 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6342 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6343 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6352 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6353 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6356 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6357 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6365 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6366 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6369 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6370 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6385 ips_program_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios_memio() argument
6398 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6399 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6402 writeb(0x40, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6403 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6406 writeb(buffer[i], ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6407 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6413 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios_memio()
6414 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6418 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6429 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6430 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6433 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6434 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6443 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6444 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6447 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6448 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6456 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6457 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6460 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6461 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6476 ips_verify_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios() argument
6485 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6486 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6489 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_verify_bios()
6492 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6493 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6495 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios()
6501 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6502 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6505 checksum = (uint8_t) checksum + inb(ha->io_addr + IPS_REG_FLDP); in ips_verify_bios()
6525 ips_verify_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios_memio() argument
6534 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6535 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6538 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_verify_bios_memio()
6541 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6542 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6544 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios_memio()
6550 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6551 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6555 (uint8_t) checksum + readb(ha->mem_ptr + IPS_REG_FLDP); in ips_verify_bios_memio()
6574 ips_abort_init(ips_ha_t * ha, int index) in ips_abort_init() argument
6576 ha->active = 0; in ips_abort_init()
6577 ips_free(ha); in ips_abort_init()
6713 ips_ha_t *ha, *oldha = ips_ha[index]; in ips_register_scsi() local
6720 ha = IPS_HA(sh); in ips_register_scsi()
6721 memcpy(ha, oldha, sizeof (ips_ha_t)); in ips_register_scsi()
6724 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_register_scsi()
6725 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_register_scsi()
6733 sh->unique_id = (ha->io_addr) ? ha->io_addr : ha->mem_addr; in ips_register_scsi()
6740 sh->max_id = ha->ntargets; in ips_register_scsi()
6741 sh->max_lun = ha->nlun; in ips_register_scsi()
6742 sh->max_channel = ha->nbus - 1; in ips_register_scsi()
6743 sh->can_queue = ha->max_cmds - 1; in ips_register_scsi()
6745 if (scsi_add_host(sh, &ha->pcidev->dev)) in ips_register_scsi()
6749 ips_ha[index] = ha; in ips_register_scsi()
6756 free_irq(ha->pcidev->irq, ha); in ips_register_scsi()
6886 ips_ha_t *ha; in ips_init_phase1() local
6952 ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL); in ips_init_phase1()
6953 if (ha == NULL) { in ips_init_phase1()
6960 ips_ha[index] = ha; in ips_init_phase1()
6961 ha->active = 1; in ips_init_phase1()
6964 ha->io_addr = io_addr; in ips_init_phase1()
6965 ha->io_len = io_len; in ips_init_phase1()
6966 ha->mem_addr = mem_addr; in ips_init_phase1()
6967 ha->mem_len = mem_len; in ips_init_phase1()
6968 ha->mem_ptr = mem_ptr; in ips_init_phase1()
6969 ha->ioremap_ptr = ioremap_ptr; in ips_init_phase1()
6970 ha->host_num = (uint32_t) index; in ips_init_phase1()
6971 ha->slot_num = PCI_SLOT(pci_dev->devfn); in ips_init_phase1()
6972 ha->pcidev = pci_dev; in ips_init_phase1()
6980 if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && in ips_init_phase1()
6981 !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) { in ips_init_phase1()
6982 (ha)->flags |= IPS_HA_ENH_SG; in ips_init_phase1()
6984 if (pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(32)) != 0) { in ips_init_phase1()
6986 return ips_abort_init(ha, index); in ips_init_phase1()
6994 ha->enq = pci_alloc_consistent(pci_dev, sizeof (IPS_ENQ), in ips_init_phase1()
6995 &ha->enq_busaddr); in ips_init_phase1()
6996 if (!ha->enq) { in ips_init_phase1()
6999 return ips_abort_init(ha, index); in ips_init_phase1()
7002 ha->adapt = pci_alloc_consistent(pci_dev, sizeof (IPS_ADAPTER) + in ips_init_phase1()
7004 if (!ha->adapt) { in ips_init_phase1()
7007 return ips_abort_init(ha, index); in ips_init_phase1()
7009 ha->adapt->hw_status_start = dma_address; in ips_init_phase1()
7010 ha->dummy = (void *) (ha->adapt + 1); in ips_init_phase1()
7014 ha->logical_drive_info = pci_alloc_consistent(pci_dev, sizeof (IPS_LD_INFO), &dma_address); in ips_init_phase1()
7015 if (!ha->logical_drive_info) { in ips_init_phase1()
7018 return ips_abort_init(ha, index); in ips_init_phase1()
7020 ha->logical_drive_info_dma_addr = dma_address; in ips_init_phase1()
7023 ha->conf = kmalloc(sizeof (IPS_CONF), GFP_KERNEL); in ips_init_phase1()
7025 if (!ha->conf) { in ips_init_phase1()
7028 return ips_abort_init(ha, index); in ips_init_phase1()
7031 ha->nvram = kmalloc(sizeof (IPS_NVRAM_P5), GFP_KERNEL); in ips_init_phase1()
7033 if (!ha->nvram) { in ips_init_phase1()
7036 return ips_abort_init(ha, index); in ips_init_phase1()
7039 ha->subsys = kmalloc(sizeof (IPS_SUBSYS), GFP_KERNEL); in ips_init_phase1()
7041 if (!ha->subsys) { in ips_init_phase1()
7044 return ips_abort_init(ha, index); in ips_init_phase1()
7052 ha->ioctl_data = pci_alloc_consistent(pci_dev, ips_ioctlsize, in ips_init_phase1()
7053 &ha->ioctl_busaddr); in ips_init_phase1()
7054 ha->ioctl_len = ips_ioctlsize; in ips_init_phase1()
7055 if (!ha->ioctl_data) { in ips_init_phase1()
7058 return ips_abort_init(ha, index); in ips_init_phase1()
7064 ips_setup_funclist(ha); in ips_init_phase1()
7066 if ((IPS_IS_MORPHEUS(ha)) || (IPS_IS_MARCO(ha))) { in ips_init_phase1()
7068 IsDead = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_phase1()
7070 ips_reset_morpheus(ha); in ips_init_phase1()
7078 if (!(*ha->func.isinit) (ha)) { in ips_init_phase1()
7079 if (!(*ha->func.init) (ha)) { in ips_init_phase1()
7085 return ips_abort_init(ha, index); in ips_init_phase1()
7105 ips_ha_t *ha; in ips_init_phase2() local
7107 ha = ips_ha[index]; in ips_init_phase2()
7110 if (!ha->active) { in ips_init_phase2()
7116 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_init_phase2()
7117 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7119 return ips_abort_init(ha, index); in ips_init_phase2()
7125 ha->max_cmds = 1; in ips_init_phase2()
7126 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7127 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7129 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7130 return ips_abort_init(ha, index); in ips_init_phase2()
7133 if (!ips_hainit(ha)) { in ips_init_phase2()
7134 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7136 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7137 return ips_abort_init(ha, index); in ips_init_phase2()
7140 ips_deallocatescbs(ha, 1); in ips_init_phase2()
7143 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7144 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7146 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7147 return ips_abort_init(ha, index); in ips_init_phase2()