Lines Matching refs:ha

275 static void ips_free_flash_copperhead(ips_ha_t * ha);
326 static int ips_abort_init(ips_ha_t * ha, int index);
332 static int ips_poll_for_flush_complete(ips_ha_t * ha);
333 static void ips_flush_and_reset(ips_ha_t *ha);
578 ips_setup_funclist(ips_ha_t * ha) in ips_setup_funclist() argument
584 if (IPS_IS_MORPHEUS(ha) || IPS_IS_MARCO(ha)) { in ips_setup_funclist()
586 ha->func.isintr = ips_isintr_morpheus; in ips_setup_funclist()
587 ha->func.isinit = ips_isinit_morpheus; in ips_setup_funclist()
588 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
589 ha->func.init = ips_init_morpheus; in ips_setup_funclist()
590 ha->func.statupd = ips_statupd_morpheus; in ips_setup_funclist()
591 ha->func.reset = ips_reset_morpheus; in ips_setup_funclist()
592 ha->func.intr = ips_intr_morpheus; in ips_setup_funclist()
593 ha->func.enableint = ips_enable_int_morpheus; in ips_setup_funclist()
594 } else if (IPS_USE_MEMIO(ha)) { in ips_setup_funclist()
596 ha->func.isintr = ips_isintr_copperhead_memio; in ips_setup_funclist()
597 ha->func.isinit = ips_isinit_copperhead_memio; in ips_setup_funclist()
598 ha->func.init = ips_init_copperhead_memio; in ips_setup_funclist()
599 ha->func.statupd = ips_statupd_copperhead_memio; in ips_setup_funclist()
600 ha->func.statinit = ips_statinit_memio; in ips_setup_funclist()
601 ha->func.reset = ips_reset_copperhead_memio; in ips_setup_funclist()
602 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
603 ha->func.erasebios = ips_erase_bios_memio; in ips_setup_funclist()
604 ha->func.programbios = ips_program_bios_memio; in ips_setup_funclist()
605 ha->func.verifybios = ips_verify_bios_memio; in ips_setup_funclist()
606 ha->func.enableint = ips_enable_int_copperhead_memio; in ips_setup_funclist()
607 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
608 ha->func.issue = ips_issue_i2o_memio; in ips_setup_funclist()
610 ha->func.issue = ips_issue_copperhead_memio; in ips_setup_funclist()
613 ha->func.isintr = ips_isintr_copperhead; in ips_setup_funclist()
614 ha->func.isinit = ips_isinit_copperhead; in ips_setup_funclist()
615 ha->func.init = ips_init_copperhead; in ips_setup_funclist()
616 ha->func.statupd = ips_statupd_copperhead; in ips_setup_funclist()
617 ha->func.statinit = ips_statinit; in ips_setup_funclist()
618 ha->func.reset = ips_reset_copperhead; in ips_setup_funclist()
619 ha->func.intr = ips_intr_copperhead; in ips_setup_funclist()
620 ha->func.erasebios = ips_erase_bios; in ips_setup_funclist()
621 ha->func.programbios = ips_program_bios; in ips_setup_funclist()
622 ha->func.verifybios = ips_verify_bios; in ips_setup_funclist()
623 ha->func.enableint = ips_enable_int_copperhead; in ips_setup_funclist()
625 if (IPS_USE_I2O_DELIVER(ha)) in ips_setup_funclist()
626 ha->func.issue = ips_issue_i2o; in ips_setup_funclist()
628 ha->func.issue = ips_issue_copperhead; in ips_setup_funclist()
645 ips_ha_t *ha; in ips_release() local
661 ha = IPS_HA(sh); in ips_release()
663 if (!ha) in ips_release()
667 scb = &ha->scbs[ha->max_cmds - 1]; in ips_release()
669 ips_init_scb(ha, scb); in ips_release()
675 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_release()
682 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_release()
685 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == IPS_FAILURE) in ips_release()
686 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Incomplete Flush.\n"); in ips_release()
688 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Complete.\n"); in ips_release()
694 ips_free(ha); in ips_release()
697 free_irq(ha->pcidev->irq, ha); in ips_release()
719 ips_ha_t *ha; in ips_halt() local
727 ha = (ips_ha_t *) ips_ha[i]; in ips_halt()
729 if (!ha) in ips_halt()
732 if (!ha->active) in ips_halt()
736 scb = &ha->scbs[ha->max_cmds - 1]; in ips_halt()
738 ips_init_scb(ha, scb); in ips_halt()
744 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in ips_halt()
751 IPS_PRINTK(KERN_WARNING, ha->pcidev, "Flushing Cache.\n"); in ips_halt()
754 if (ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_ON) == in ips_halt()
756 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
759 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_halt()
777 ips_ha_t *ha; in ips_eh_abort() local
788 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_eh_abort()
790 if (!ha) in ips_eh_abort()
793 if (!ha->active) in ips_eh_abort()
799 item = ha->copp_waitlist.head; in ips_eh_abort()
805 ips_removeq_copp(&ha->copp_waitlist, item); in ips_eh_abort()
809 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in ips_eh_abort()
836 ips_ha_t *ha; in __ips_eh_reset() local
852 ha = (ips_ha_t *) SC->device->host->hostdata; in __ips_eh_reset()
854 if (!ha) { in __ips_eh_reset()
860 if (!ha->active) in __ips_eh_reset()
864 item = ha->copp_waitlist.head; in __ips_eh_reset()
870 ips_removeq_copp(&ha->copp_waitlist, item); in __ips_eh_reset()
875 if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in __ips_eh_reset()
890 if (ha->ioctl_reset == 0) { /* IF Not an IOCTL Requested Reset */ in __ips_eh_reset()
891 scb = &ha->scbs[ha->max_cmds - 1]; in __ips_eh_reset()
893 ips_init_scb(ha, scb); in __ips_eh_reset()
899 scb->cmd.flush_cache.command_id = IPS_COMMAND_ID(ha, scb); in __ips_eh_reset()
907 ret = ips_send_wait(ha, scb, ips_cmd_timeout, IPS_INTR_IORL); in __ips_eh_reset()
909 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
918 ha->ioctl_reset = 0; /* Reset the IOCTL Requested Reset Flag */ in __ips_eh_reset()
924 IPS_PRINTK(KERN_NOTICE, ha->pcidev, "Resetting controller.\n"); in __ips_eh_reset()
925 ret = (*ha->func.reset) (ha); in __ips_eh_reset()
930 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
935 ips_name, ha->host_num); in __ips_eh_reset()
937 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
940 ips_freescb(ha, scb); in __ips_eh_reset()
945 ips_name, ha->host_num); in __ips_eh_reset()
947 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
952 ha->active = FALSE; in __ips_eh_reset()
956 if (!ips_clear_adapter(ha, IPS_INTR_IORL)) { in __ips_eh_reset()
959 IPS_PRINTK(KERN_NOTICE, ha->pcidev, in __ips_eh_reset()
964 ips_name, ha->host_num); in __ips_eh_reset()
966 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
969 ips_freescb(ha, scb); in __ips_eh_reset()
974 ips_name, ha->host_num); in __ips_eh_reset()
976 while ((scsi_cmd = ips_removeq_wait_head(&ha->scb_waitlist))) { in __ips_eh_reset()
981 ha->active = FALSE; in __ips_eh_reset()
986 if (le32_to_cpu(ha->subsys->param[3]) & 0x300000) { in __ips_eh_reset()
987 ha->last_ffdc = ktime_get_real_seconds(); in __ips_eh_reset()
988 ha->reset_count++; in __ips_eh_reset()
989 ips_ffdc_reset(ha, IPS_INTR_IORL); in __ips_eh_reset()
993 DEBUG_VAR(1, "(%s%d) Failing active commands", ips_name, ha->host_num); in __ips_eh_reset()
995 while ((scb = ips_removeq_scb_head(&ha->scb_activelist))) { in __ips_eh_reset()
998 ips_freescb(ha, scb); in __ips_eh_reset()
1002 for (i = 1; i < ha->nbus; i++) in __ips_eh_reset()
1003 ha->dcdb_active[i - 1] = 0; in __ips_eh_reset()
1006 ha->num_ioctl = 0; in __ips_eh_reset()
1008 ips_next(ha, IPS_INTR_IORL); in __ips_eh_reset()
1040 ips_ha_t *ha; in ips_queue_lck() local
1045 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_queue_lck()
1047 if (!ha) in ips_queue_lck()
1050 if (!ha->active) in ips_queue_lck()
1054 if (ha->copp_waitlist.count == IPS_MAX_IOCTL_QUEUE) { in ips_queue_lck()
1060 } else if (ha->scb_waitlist.count == IPS_MAX_QUEUE) { in ips_queue_lck()
1071 ha->host_num, in ips_queue_lck()
1077 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { in ips_queue_lck()
1094 if (ha->scb_activelist.count != 0) { in ips_queue_lck()
1099 ha->ioctl_reset = 1; /* This reset request is from an IOCTL */ in ips_queue_lck()
1119 ips_putq_copp_tail(&ha->copp_waitlist, scratch); in ips_queue_lck()
1121 ips_putq_wait_tail(&ha->scb_waitlist, SC); in ips_queue_lck()
1124 ips_next(ha, IPS_INTR_IORL); in ips_queue_lck()
1148 ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; in DEF_SCSI_QCMD() local
1155 if (!ha) in DEF_SCSI_QCMD()
1159 if (!ha->active) in DEF_SCSI_QCMD()
1162 if (!ips_read_adapter_status(ha, IPS_INTR_ON)) in DEF_SCSI_QCMD()
1166 if ((capacity > 0x400000) && ((ha->enq->ucMiscFlag & 0x8) == 0)) { in DEF_SCSI_QCMD()
1198 ips_ha_t *ha; in ips_slave_configure() local
1201 ha = IPS_HA(SDptr->host); in ips_slave_configure()
1203 min = ha->max_cmds / 2; in ips_slave_configure()
1204 if (ha->enq->ucLogDriveCount <= 2) in ips_slave_configure()
1205 min = ha->max_cmds - 1; in ips_slave_configure()
1226 ips_ha_t *ha; in do_ipsintr() local
1232 ha = (ips_ha_t *) dev_id; in do_ipsintr()
1233 if (!ha) in do_ipsintr()
1235 host = ips_sh[ha->host_num]; in do_ipsintr()
1238 (*ha->func.intr) (ha); in do_ipsintr()
1244 if (!ha->active) { in do_ipsintr()
1249 irqstatus = (*ha->func.intr) (ha); in do_ipsintr()
1254 ips_next(ha, IPS_INTR_ON); in do_ipsintr()
1270 ips_intr_copperhead(ips_ha_t * ha) in ips_intr_copperhead() argument
1279 if (!ha) in ips_intr_copperhead()
1282 if (!ha->active) in ips_intr_copperhead()
1285 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1296 sp = &ha->sp; in ips_intr_copperhead()
1298 intrstatus = (*ha->func.isintr) (ha); in ips_intr_copperhead()
1303 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_copperhead()
1310 ips_chkstatus(ha, &cstatus); in ips_intr_copperhead()
1317 (*scb->callback) (ha, scb); in ips_intr_copperhead()
1334 ips_intr_morpheus(ips_ha_t * ha) in ips_intr_morpheus() argument
1343 if (!ha) in ips_intr_morpheus()
1346 if (!ha->active) in ips_intr_morpheus()
1349 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1360 sp = &ha->sp; in ips_intr_morpheus()
1362 intrstatus = (*ha->func.isintr) (ha); in ips_intr_morpheus()
1367 cstatus.value = (*ha->func.statupd) (ha); in ips_intr_morpheus()
1374 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_intr_morpheus()
1380 ips_chkstatus(ha, &cstatus); in ips_intr_morpheus()
1387 (*scb->callback) (ha, scb); in ips_intr_morpheus()
1406 ips_ha_t *ha; in ips_info() local
1410 ha = IPS_HA(SH); in ips_info()
1412 if (!ha) in ips_info()
1421 if (ha->ad_type > 0 && ha->ad_type <= MAX_ADAPTER_NAME) { in ips_info()
1423 strcat(bp, ips_adapter_name[ha->ad_type - 1]); in ips_info()
1434 ips_ha_t *ha = NULL; in ips_write_info() local
1440 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_write_info()
1446 if (!ha) in ips_write_info()
1456 ips_ha_t *ha = NULL; in ips_show_info() local
1462 ha = (ips_ha_t *) ips_sh[i]->hostdata; in ips_show_info()
1468 if (!ha) in ips_show_info()
1471 return ips_host_info(ha, m); in ips_show_info()
1528 ips_alloc_passthru_buffer(ips_ha_t * ha, int length) in ips_alloc_passthru_buffer() argument
1533 if (ha->ioctl_data && length <= ha->ioctl_len) in ips_alloc_passthru_buffer()
1536 bigger_buf = dma_alloc_coherent(&ha->pcidev->dev, length, &dma_busaddr, in ips_alloc_passthru_buffer()
1540 dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, in ips_alloc_passthru_buffer()
1541 ha->ioctl_data, ha->ioctl_busaddr); in ips_alloc_passthru_buffer()
1543 ha->ioctl_data = (char *) bigger_buf; in ips_alloc_passthru_buffer()
1544 ha->ioctl_len = length; in ips_alloc_passthru_buffer()
1545 ha->ioctl_busaddr = dma_busaddr; in ips_alloc_passthru_buffer()
1562 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr) in ips_make_passthru() argument
1577 ips_name, ha->host_num); in ips_make_passthru()
1580 if (ips_alloc_passthru_buffer(ha, length)) { in ips_make_passthru()
1583 if (ha->ioctl_data) { in ips_make_passthru()
1584 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1592 ha->ioctl_datasize = length; in ips_make_passthru()
1594 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize); in ips_make_passthru()
1595 pt = (ips_passthru_t *) ha->ioctl_data; in ips_make_passthru()
1609 memcpy(ha->ioctl_data + sizeof (ips_passthru_t), in ips_make_passthru()
1611 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1624 ips_name, ha->host_num); in ips_make_passthru()
1629 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_make_passthru()
1632 ret = ips_flash_copperhead(ha, pt, scb); in ips_make_passthru()
1633 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1637 if (ips_usrcmd(ha, pt, scb)) in ips_make_passthru()
1656 ips_flash_copperhead(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_copperhead() argument
1662 if (IPS_IS_TROMBONE(ha) && pt->CoppCP.cmd.flashfw.type == IPS_FW_IMAGE) { in ips_flash_copperhead()
1663 if (ips_usrcmd(ha, pt, scb)) in ips_flash_copperhead()
1676 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1679 ha->flash_data = ips_FlashData; in ips_flash_copperhead()
1680 ha->flash_busaddr = ips_flashbusaddr; in ips_flash_copperhead()
1681 ha->flash_len = PAGE_SIZE << 7; in ips_flash_copperhead()
1682 ha->flash_datasize = 0; in ips_flash_copperhead()
1683 } else if (!ha->flash_data) { in ips_flash_copperhead()
1686 ha->flash_data = dma_alloc_coherent(&ha->pcidev->dev, in ips_flash_copperhead()
1687 datasize, &ha->flash_busaddr, GFP_KERNEL); in ips_flash_copperhead()
1688 if (!ha->flash_data){ in ips_flash_copperhead()
1692 ha->flash_datasize = 0; in ips_flash_copperhead()
1693 ha->flash_len = datasize; in ips_flash_copperhead()
1697 if (pt->CoppCP.cmd.flashfw.count + ha->flash_datasize > in ips_flash_copperhead()
1698 ha->flash_len) { in ips_flash_copperhead()
1699 ips_free_flash_copperhead(ha); in ips_flash_copperhead()
1700 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_flash_copperhead()
1705 if (!ha->flash_data) in ips_flash_copperhead()
1708 memcpy(&ha->flash_data[ha->flash_datasize], pt + 1, in ips_flash_copperhead()
1710 ha->flash_datasize += pt->CoppCP.cmd.flashfw.count; in ips_flash_copperhead()
1714 return ips_flash_bios(ha, pt, scb); in ips_flash_copperhead()
1716 return ips_flash_firmware(ha, pt, scb); in ips_flash_copperhead()
1727 ips_flash_bios(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_bios() argument
1732 if ((!ha->func.programbios) || (!ha->func.erasebios) || in ips_flash_bios()
1733 (!ha->func.verifybios)) in ips_flash_bios()
1735 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1738 ips_name, ha->host_num); in ips_flash_bios()
1741 if ((*ha->func.programbios) (ha, in ips_flash_bios()
1742 ha->flash_data + in ips_flash_bios()
1744 ha->flash_datasize - in ips_flash_bios()
1748 ips_name, ha->host_num); in ips_flash_bios()
1751 if ((*ha->func.verifybios) (ha, in ips_flash_bios()
1752 ha->flash_data + in ips_flash_bios()
1754 ha->flash_datasize - in ips_flash_bios()
1758 ips_name, ha->host_num); in ips_flash_bios()
1761 ips_free_flash_copperhead(ha); in ips_flash_bios()
1765 if (!ha->func.erasebios) in ips_flash_bios()
1767 if ((*ha->func.erasebios) (ha)) { in ips_flash_bios()
1770 ips_name, ha->host_num); in ips_flash_bios()
1778 ips_free_flash_copperhead(ha); in ips_flash_bios()
1791 ips_fill_scb_sg_single(ips_ha_t * ha, dma_addr_t busaddr, in ips_fill_scb_sg_single() argument
1797 if ((scb->data_len + e_len) > ha->max_xfer) { in ips_fill_scb_sg_single()
1798 e_len = ha->max_xfer - scb->data_len; in ips_fill_scb_sg_single()
1806 if (IPS_USE_ENH_SGLIST(ha)) { in ips_fill_scb_sg_single()
1829 ips_flash_firmware(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_flash_firmware() argument
1838 pt->CoppCP.cmd.flashfw.count = cpu_to_le32(ha->flash_datasize); in ips_flash_firmware()
1842 ips_free_flash_copperhead(ha); in ips_flash_firmware()
1863 scb->data_len = ha->flash_datasize; in ips_flash_firmware()
1865 dma_map_single(&ha->pcidev->dev, ha->flash_data, scb->data_len, in ips_flash_firmware()
1868 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_flash_firmware()
1882 ips_free_flash_copperhead(ips_ha_t * ha) in ips_free_flash_copperhead() argument
1884 if (ha->flash_data == ips_FlashData) in ips_free_flash_copperhead()
1886 else if (ha->flash_data) in ips_free_flash_copperhead()
1887 dma_free_coherent(&ha->pcidev->dev, ha->flash_len, in ips_free_flash_copperhead()
1888 ha->flash_data, ha->flash_busaddr); in ips_free_flash_copperhead()
1889 ha->flash_data = NULL; in ips_free_flash_copperhead()
1902 ips_usrcmd(ips_ha_t * ha, ips_passthru_t * pt, ips_scb_t * scb) in ips_usrcmd() argument
1909 if ((!scb) || (!pt) || (!ha)) in ips_usrcmd()
1931 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_usrcmd()
1941 scb->data_busaddr = ha->ioctl_busaddr + sizeof (ips_passthru_t); in ips_usrcmd()
1990 ips_cleanup_passthru(ips_ha_t * ha, ips_scb_t * scb) in ips_cleanup_passthru() argument
1998 ips_name, ha->host_num); in ips_cleanup_passthru()
2002 pt = (ips_passthru_t *) ha->ioctl_data; in ips_cleanup_passthru()
2010 pt->AdapterType = ha->ad_type; in ips_cleanup_passthru()
2012 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD && in ips_cleanup_passthru()
2015 ips_free_flash_copperhead(ha); in ips_cleanup_passthru()
2017 ips_scmd_buf_write(scb->scsi_cmd, ha->ioctl_data, ha->ioctl_datasize); in ips_cleanup_passthru()
2030 ips_host_info(ips_ha_t *ha, struct seq_file *m) in ips_host_info() argument
2036 if ((le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) && in ips_host_info()
2037 (le16_to_cpu(ha->nvram->adapter_type) != 0)) in ips_host_info()
2039 ips_adapter_name[ha->ad_type - 1]); in ips_host_info()
2043 if (ha->io_addr) in ips_host_info()
2046 ha->io_addr, ha->io_len); in ips_host_info()
2048 if (ha->mem_addr) { in ips_host_info()
2051 ha->mem_addr, ha->mem_len); in ips_host_info()
2054 (unsigned long)ha->mem_ptr); in ips_host_info()
2057 seq_printf(m, "\tIRQ number : %d\n", ha->pcidev->irq); in ips_host_info()
2062 if (le32_to_cpu(ha->nvram->signature) == IPS_NVRAM_P5_SIG) { in ips_host_info()
2063 if (ha->nvram->bios_low[3] == 0) { in ips_host_info()
2066 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2067 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2068 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2069 ha->nvram->bios_low[2]); in ips_host_info()
2074 ha->nvram->bios_high[0], ha->nvram->bios_high[1], in ips_host_info()
2075 ha->nvram->bios_high[2], ha->nvram->bios_high[3], in ips_host_info()
2076 ha->nvram->bios_low[0], ha->nvram->bios_low[1], in ips_host_info()
2077 ha->nvram->bios_low[2], ha->nvram->bios_low[3]); in ips_host_info()
2082 if (ha->enq->CodeBlkVersion[7] == 0) { in ips_host_info()
2085 ha->enq->CodeBlkVersion[0], ha->enq->CodeBlkVersion[1], in ips_host_info()
2086 ha->enq->CodeBlkVersion[2], ha->enq->CodeBlkVersion[3], in ips_host_info()
2087 ha->enq->CodeBlkVersion[4], ha->enq->CodeBlkVersion[5], in ips_host_info()
2088 ha->enq->CodeBlkVersion[6]); 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], ha->enq->CodeBlkVersion[7]); in ips_host_info()
2098 if (ha->enq->BootBlkVersion[7] == 0) { in ips_host_info()
2101 ha->enq->BootBlkVersion[0], ha->enq->BootBlkVersion[1], in ips_host_info()
2102 ha->enq->BootBlkVersion[2], ha->enq->BootBlkVersion[3], in ips_host_info()
2103 ha->enq->BootBlkVersion[4], ha->enq->BootBlkVersion[5], in ips_host_info()
2104 ha->enq->BootBlkVersion[6]); 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], ha->enq->BootBlkVersion[7]); in ips_host_info()
2121 ha->enq->ucMaxPhysicalDevices); in ips_host_info()
2123 ha->max_cmds); in ips_host_info()
2125 ha->scb_waitlist.count); in ips_host_info()
2127 ha->scb_activelist.count - ha->num_ioctl); in ips_host_info()
2129 ha->copp_waitlist.count); in ips_host_info()
2131 ha->num_ioctl); in ips_host_info()
2148 ips_identify_controller(ips_ha_t * ha) in ips_identify_controller() argument
2152 switch (ha->pcidev->device) { in ips_identify_controller()
2154 if (ha->pcidev->revision <= IPS_REVID_SERVERAID) { in ips_identify_controller()
2155 ha->ad_type = IPS_ADTYPE_SERVERAID; in ips_identify_controller()
2156 } else if (ha->pcidev->revision == IPS_REVID_SERVERAID2) { in ips_identify_controller()
2157 ha->ad_type = IPS_ADTYPE_SERVERAID2; in ips_identify_controller()
2158 } else if (ha->pcidev->revision == IPS_REVID_NAVAJO) { in ips_identify_controller()
2159 ha->ad_type = IPS_ADTYPE_NAVAJO; in ips_identify_controller()
2160 } else if ((ha->pcidev->revision == IPS_REVID_SERVERAID2) in ips_identify_controller()
2161 && (ha->slot_num == 0)) { in ips_identify_controller()
2162 ha->ad_type = IPS_ADTYPE_KIOWA; in ips_identify_controller()
2163 } else if ((ha->pcidev->revision >= IPS_REVID_CLARINETP1) && in ips_identify_controller()
2164 (ha->pcidev->revision <= IPS_REVID_CLARINETP3)) { in ips_identify_controller()
2165 if (ha->enq->ucMaxPhysicalDevices == 15) in ips_identify_controller()
2166 ha->ad_type = IPS_ADTYPE_SERVERAID3L; in ips_identify_controller()
2168 ha->ad_type = IPS_ADTYPE_SERVERAID3; in ips_identify_controller()
2169 } else if ((ha->pcidev->revision >= IPS_REVID_TROMBONE32) && in ips_identify_controller()
2170 (ha->pcidev->revision <= IPS_REVID_TROMBONE64)) { in ips_identify_controller()
2171 ha->ad_type = IPS_ADTYPE_SERVERAID4H; in ips_identify_controller()
2176 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2178 ha->ad_type = IPS_ADTYPE_SERVERAID4L; in ips_identify_controller()
2182 ha->ad_type = IPS_ADTYPE_SERVERAID4M; in ips_identify_controller()
2186 ha->ad_type = IPS_ADTYPE_SERVERAID4MX; in ips_identify_controller()
2190 ha->ad_type = IPS_ADTYPE_SERVERAID4LX; in ips_identify_controller()
2194 ha->ad_type = IPS_ADTYPE_SERVERAID5I2; in ips_identify_controller()
2198 ha->ad_type = IPS_ADTYPE_SERVERAID5I1; in ips_identify_controller()
2205 switch (ha->pcidev->subsystem_device) { in ips_identify_controller()
2207 ha->ad_type = IPS_ADTYPE_SERVERAID6M; in ips_identify_controller()
2210 ha->ad_type = IPS_ADTYPE_SERVERAID6I; in ips_identify_controller()
2213 ha->ad_type = IPS_ADTYPE_SERVERAID7k; in ips_identify_controller()
2216 ha->ad_type = IPS_ADTYPE_SERVERAID7M; in ips_identify_controller()
2233 ips_get_bios_version(ips_ha_t * ha, int intr) in ips_get_bios_version() argument
2247 memcpy(ha->bios_version, " ?", 8); in ips_get_bios_version()
2249 if (ha->pcidev->device == IPS_DEVICEID_COPPERHEAD) { in ips_get_bios_version()
2250 if (IPS_USE_MEMIO(ha)) { in ips_get_bios_version()
2254 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2255 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2258 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2261 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2262 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2265 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2269 writel(0x1FF, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2270 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2273 major = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2276 writel(0x1FE, ha->mem_ptr + IPS_REG_FLAP); in ips_get_bios_version()
2277 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2279 minor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2282 writel(0x1FD, 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 subminor = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_get_bios_version()
2291 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2292 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2295 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_get_bios_version()
2298 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2299 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2302 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_get_bios_version()
2306 outl(0x1FF, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2307 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2310 major = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2313 outl(0x1FE, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2314 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2317 minor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2320 outl(0x1FD, ha->io_addr + IPS_REG_FLAP); in ips_get_bios_version()
2321 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_get_bios_version()
2324 subminor = inb(ha->io_addr + IPS_REG_FLDP); in ips_get_bios_version()
2330 buffer = ha->ioctl_data; in ips_get_bios_version()
2334 scb = &ha->scbs[ha->max_cmds - 1]; in ips_get_bios_version()
2336 ips_init_scb(ha, scb); in ips_get_bios_version()
2342 scb->cmd.flashfw.command_id = IPS_COMMAND_ID(ha, scb); in ips_get_bios_version()
2349 scb->cmd.flashfw.buffer_addr = ha->ioctl_busaddr; in ips_get_bios_version()
2353 ips_send_wait(ha, scb, ips_cmd_timeout, in ips_get_bios_version()
2371 ha->bios_version[0] = hex_asc_upper_hi(major); in ips_get_bios_version()
2372 ha->bios_version[1] = '.'; in ips_get_bios_version()
2373 ha->bios_version[2] = hex_asc_upper_lo(major); in ips_get_bios_version()
2374 ha->bios_version[3] = hex_asc_upper_lo(subminor); in ips_get_bios_version()
2375 ha->bios_version[4] = '.'; in ips_get_bios_version()
2376 ha->bios_version[5] = hex_asc_upper_hi(minor); in ips_get_bios_version()
2377 ha->bios_version[6] = hex_asc_upper_lo(minor); in ips_get_bios_version()
2378 ha->bios_version[7] = 0; in ips_get_bios_version()
2393 ips_hainit(ips_ha_t * ha) in ips_hainit() argument
2399 if (!ha) in ips_hainit()
2402 if (ha->func.statinit) in ips_hainit()
2403 (*ha->func.statinit) (ha); in ips_hainit()
2405 if (ha->func.enableint) in ips_hainit()
2406 (*ha->func.enableint) (ha); in ips_hainit()
2409 ha->reset_count = 1; in ips_hainit()
2410 ha->last_ffdc = ktime_get_real_seconds(); in ips_hainit()
2411 ips_ffdc_reset(ha, IPS_INTR_IORL); in ips_hainit()
2413 if (!ips_read_config(ha, IPS_INTR_IORL)) { in ips_hainit()
2414 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2420 if (!ips_read_adapter_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2421 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2428 ips_identify_controller(ha); in ips_hainit()
2430 if (!ips_read_subsystem_parameters(ha, IPS_INTR_IORL)) { in ips_hainit()
2431 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2438 if (!ips_write_driver_status(ha, IPS_INTR_IORL)) { in ips_hainit()
2439 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_hainit()
2446 if ((ha->conf->ucLogDriveCount > 0) && (ha->requires_esl == 1)) in ips_hainit()
2447 ips_clear_adapter(ha, IPS_INTR_IORL); in ips_hainit()
2450 ha->ntargets = IPS_MAX_TARGETS + 1; in ips_hainit()
2451 ha->nlun = 1; in ips_hainit()
2452 ha->nbus = (ha->enq->ucMaxPhysicalDevices / IPS_MAX_TARGETS) + 1; in ips_hainit()
2454 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2456 ha->max_xfer = 0x10000; in ips_hainit()
2460 ha->max_xfer = 0x20000; in ips_hainit()
2464 ha->max_xfer = 0x40000; in ips_hainit()
2469 ha->max_xfer = 0x80000; in ips_hainit()
2474 if (le32_to_cpu(ha->subsys->param[4]) & 0x1) { in ips_hainit()
2476 ha->max_cmds = ha->enq->ucConcurrentCmdCount; in ips_hainit()
2479 switch (ha->conf->logical_drive[0].ucStripeSize) { in ips_hainit()
2481 ha->max_cmds = 32; in ips_hainit()
2485 ha->max_cmds = 16; in ips_hainit()
2489 ha->max_cmds = 8; in ips_hainit()
2494 ha->max_cmds = 4; in ips_hainit()
2500 if ((ha->ad_type == IPS_ADTYPE_SERVERAID3L) || in ips_hainit()
2501 (ha->ad_type == IPS_ADTYPE_SERVERAID4L) || in ips_hainit()
2502 (ha->ad_type == IPS_ADTYPE_SERVERAID4LX)) { in ips_hainit()
2503 if ((ha->max_cmds > MaxLiteCmds) && (MaxLiteCmds)) in ips_hainit()
2504 ha->max_cmds = MaxLiteCmds; in ips_hainit()
2508 ha->ha_id[0] = IPS_ADAPTER_ID; in ips_hainit()
2509 for (i = 1; i < ha->nbus; i++) { in ips_hainit()
2510 ha->ha_id[i] = ha->conf->init_id[i - 1] & 0x1f; in ips_hainit()
2511 ha->dcdb_active[i - 1] = 0; in ips_hainit()
2527 ips_next(ips_ha_t * ha, int intr) in ips_next() argument
2538 if (!ha) in ips_next()
2540 host = ips_sh[ha->host_num]; in ips_next()
2548 if ((ha->subsys->param[3] & 0x300000) in ips_next()
2549 && (ha->scb_activelist.count == 0)) { in ips_next()
2551 if (now - ha->last_ffdc > IPS_SECS_8HOURS) { in ips_next()
2552 ha->last_ffdc = now; in ips_next()
2553 ips_ffdc_time(ha); in ips_next()
2564 while ((ha->num_ioctl < IPS_MAX_IOCTL) && in ips_next()
2565 (ha->copp_waitlist.head) && (scb = ips_getscb(ha))) { in ips_next()
2567 item = ips_removeq_copp_head(&ha->copp_waitlist); in ips_next()
2568 ha->num_ioctl++; in ips_next()
2574 ret = ips_make_passthru(ha, scb->scsi_cmd, scb, intr); in ips_next()
2585 ips_freescb(ha, scb); in ips_next()
2593 ips_freescb(ha, scb); in ips_next()
2600 ha->num_ioctl--; in ips_next()
2604 ret = ips_send_cmd(ha, scb); in ips_next()
2607 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2609 ha->num_ioctl--; in ips_next()
2617 ips_freescb(ha, scb); in ips_next()
2620 ips_freescb(ha, scb); in ips_next()
2632 p = ha->scb_waitlist.head; in ips_next()
2633 while ((p) && (scb = ips_getscb(ha))) { in ips_next()
2635 && (ha-> in ips_next()
2638 ips_freescb(ha, scb); in ips_next()
2644 SC = ips_removeq_wait(&ha->scb_waitlist, q); in ips_next()
2675 (ha, sg_dma_address(sg), scb, i, in ips_next()
2706 ret = ips_send_cmd(ha, scb); in ips_next()
2710 ips_putq_scb_head(&ha->scb_activelist, scb); in ips_next()
2719 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2722 ips_freescb(ha, scb); in ips_next()
2729 ha->dcdb_active[scb->bus - 1] &= in ips_next()
2732 ips_freescb(ha, scb); in ips_next()
3089 ipsintr_blocking(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_blocking() argument
3093 ips_freescb(ha, scb); in ipsintr_blocking()
3094 if ((ha->waitflag == TRUE) && (ha->cmd_in_progress == scb->cdb[0])) { in ipsintr_blocking()
3095 ha->waitflag = FALSE; in ipsintr_blocking()
3111 ipsintr_done(ips_ha_t * ha, ips_scb_t * scb) in ipsintr_done() argument
3116 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3124 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ipsintr_done()
3130 ips_done(ha, scb); in ipsintr_done()
3143 ips_done(ips_ha_t * ha, ips_scb_t * scb) in ips_done() argument
3153 ips_cleanup_passthru(ha, scb); in ips_done()
3154 ha->num_ioctl--; in ips_done()
3176 ips_fill_scb_sg_single(ha, in ips_done()
3184 (ha, in ips_done()
3203 ret = ips_send_cmd(ha, scb); in ips_done()
3212 ips_freescb(ha, scb); in ips_done()
3220 ips_freescb(ha, scb); in ips_done()
3231 ha->dcdb_active[scb->bus - 1] &= ~(1 << scb->target_id); in ips_done()
3236 ips_freescb(ha, scb); in ips_done()
3249 ips_map_status(ips_ha_t * ha, ips_scb_t * scb, ips_stat_t * sp) in ips_map_status() argument
3262 ips_name, ha->host_num, in ips_map_status()
3388 ips_send_wait(ips_ha_t * ha, ips_scb_t * scb, int timeout, int intr) in ips_send_wait() argument
3395 ha->waitflag = TRUE; in ips_send_wait()
3396 ha->cmd_in_progress = scb->cdb[0]; in ips_send_wait()
3399 ret = ips_send_cmd(ha, scb); in ips_send_wait()
3405 ret = ips_wait(ha, timeout, intr); in ips_send_wait()
3454 ips_send_cmd(ips_ha_t * ha, ips_scb_t * scb) in ips_send_cmd() argument
3472 if ((ha->waitflag == TRUE) && in ips_send_cmd()
3473 (ha->cmd_in_progress == scb->cdb[0])) { in ips_send_cmd()
3474 ha->waitflag = FALSE; in ips_send_cmd()
3540 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3544 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3553 ips_reqsen(ha, scb); in ips_send_cmd()
3572 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3578 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3618 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3624 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3663 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3666 scb->data_len = sizeof (*ha->enq); in ips_send_cmd()
3667 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_send_cmd()
3673 scb->cmd.logical_info.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3678 scb->data_busaddr = ha->logical_drive_info_dma_addr; in ips_send_cmd()
3721 if (ha->conf->dev[scb->bus - 1][scb->target_id].ucState == 0) { in ips_send_cmd()
3726 ha->dcdb_active[scb->bus - 1] |= (1 << scb->target_id); in ips_send_cmd()
3727 scb->cmd.dcdb.command_id = IPS_COMMAND_ID(ha, scb); in ips_send_cmd()
3740 if (ha->subsys->param[4] & 0x00100000) { /* If NEW Tape DCDB is Supported */ in ips_send_cmd()
3747 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3786 IPS_USE_ENH_SGLIST(ha) ? 0xFF : 0; in ips_send_cmd()
3824 return ((*ha->func.issue) (ha, scb)); in ips_send_cmd()
3837 ips_chkstatus(ips_ha_t * ha, IPS_STATUS * pstatus) in ips_chkstatus() argument
3848 scb = &ha->scbs[pstatus->fields.command_id]; in ips_chkstatus()
3853 sp = &ha->sp; in ips_chkstatus()
3858 ips_removeq_scb(&ha->scb_activelist, scb); in ips_chkstatus()
3866 ha->host_num, in ips_chkstatus()
3885 ips_name, ha->host_num, in ips_chkstatus()
3903 if (!ips_online(ha, scb)) { in ips_chkstatus()
3909 if (ips_online(ha, scb)) { in ips_chkstatus()
3910 ips_inquiry(ha, scb); in ips_chkstatus()
3917 ips_reqsen(ha, scb); in ips_chkstatus()
3929 if (!ips_online(ha, scb) in ips_chkstatus()
3930 || !ips_msense(ha, scb)) { in ips_chkstatus()
3936 if (ips_online(ha, scb)) in ips_chkstatus()
3937 ips_rdcap(ha, scb); in ips_chkstatus()
3976 ips_name, ha->host_num, in ips_chkstatus()
3981 ips_map_status(ha, scb, sp); in ips_chkstatus()
3995 ips_online(ips_ha_t * ha, ips_scb_t * scb) in ips_online() argument
4003 memset(ha->logical_drive_info, 0, sizeof (IPS_LD_INFO)); in ips_online()
4007 if (ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4009 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4011 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4013 && ha->logical_drive_info->drive_info[scb->target_id].state != in ips_online()
4030 ips_inquiry(ips_ha_t * ha, ips_scb_t * scb) in ips_inquiry() argument
4065 ips_rdcap(ips_ha_t * ha, ips_scb_t * scb) in ips_rdcap() argument
4076 (ha->logical_drive_info-> in ips_rdcap()
4095 ips_msense(ips_ha_t * ha, ips_scb_t * scb) in ips_msense() argument
4104 if (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) > 0x400000 && in ips_msense()
4105 (ha->enq->ucMiscFlag & 0x8) == 0) { in ips_msense()
4114 (le32_to_cpu(ha->enq->ulDriveSize[scb->target_id]) - in ips_msense()
4186 ips_reqsen(ips_ha_t * ha, ips_scb_t * scb) in ips_reqsen() argument
4215 ips_free(ips_ha_t * ha) in ips_free() argument
4220 if (ha) { in ips_free()
4221 if (ha->enq) { in ips_free()
4222 dma_free_coherent(&ha->pcidev->dev, sizeof(IPS_ENQ), in ips_free()
4223 ha->enq, ha->enq_busaddr); in ips_free()
4224 ha->enq = NULL; in ips_free()
4227 kfree(ha->conf); in ips_free()
4228 ha->conf = NULL; in ips_free()
4230 if (ha->adapt) { in ips_free()
4231 dma_free_coherent(&ha->pcidev->dev, in ips_free()
4233 sizeof (IPS_IO_CMD), ha->adapt, in ips_free()
4234 ha->adapt->hw_status_start); in ips_free()
4235 ha->adapt = NULL; in ips_free()
4238 if (ha->logical_drive_info) { in ips_free()
4239 dma_free_coherent(&ha->pcidev->dev, in ips_free()
4241 ha->logical_drive_info, in ips_free()
4242 ha->logical_drive_info_dma_addr); in ips_free()
4243 ha->logical_drive_info = NULL; in ips_free()
4246 kfree(ha->nvram); in ips_free()
4247 ha->nvram = NULL; in ips_free()
4249 kfree(ha->subsys); in ips_free()
4250 ha->subsys = NULL; in ips_free()
4252 if (ha->ioctl_data) { in ips_free()
4253 dma_free_coherent(&ha->pcidev->dev, ha->ioctl_len, in ips_free()
4254 ha->ioctl_data, ha->ioctl_busaddr); in ips_free()
4255 ha->ioctl_data = NULL; in ips_free()
4256 ha->ioctl_datasize = 0; in ips_free()
4257 ha->ioctl_len = 0; in ips_free()
4259 ips_deallocatescbs(ha, ha->max_cmds); in ips_free()
4262 if (ha->mem_ptr) { in ips_free()
4263 iounmap(ha->ioremap_ptr); in ips_free()
4264 ha->ioremap_ptr = NULL; in ips_free()
4265 ha->mem_ptr = NULL; in ips_free()
4268 ha->mem_addr = 0; in ips_free()
4283 ips_deallocatescbs(ips_ha_t * ha, int cmds) in ips_deallocatescbs() argument
4285 if (ha->scbs) { in ips_deallocatescbs()
4286 dma_free_coherent(&ha->pcidev->dev, in ips_deallocatescbs()
4287 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * cmds, in ips_deallocatescbs()
4288 ha->scbs->sg_list.list, in ips_deallocatescbs()
4289 ha->scbs->sg_busaddr); in ips_deallocatescbs()
4290 dma_free_coherent(&ha->pcidev->dev, sizeof (ips_scb_t) * cmds, in ips_deallocatescbs()
4291 ha->scbs, ha->scbs->scb_busaddr); in ips_deallocatescbs()
4292 ha->scbs = NULL; in ips_deallocatescbs()
4307 ips_allocatescbs(ips_ha_t * ha) in ips_allocatescbs() argument
4317 ha->scbs = dma_alloc_coherent(&ha->pcidev->dev, in ips_allocatescbs()
4318 ha->max_cmds * sizeof (ips_scb_t), in ips_allocatescbs()
4320 if (ha->scbs == NULL) in ips_allocatescbs()
4322 ips_sg.list = dma_alloc_coherent(&ha->pcidev->dev, in ips_allocatescbs()
4323 IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * ha->max_cmds, in ips_allocatescbs()
4326 dma_free_coherent(&ha->pcidev->dev, in ips_allocatescbs()
4327 ha->max_cmds * sizeof (ips_scb_t), ha->scbs, in ips_allocatescbs()
4332 memset(ha->scbs, 0, ha->max_cmds * sizeof (ips_scb_t)); in ips_allocatescbs()
4334 for (i = 0; i < ha->max_cmds; i++) { in ips_allocatescbs()
4335 scb_p = &ha->scbs[i]; in ips_allocatescbs()
4338 if (IPS_USE_ENH_SGLIST(ha)) { in ips_allocatescbs()
4342 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4347 sg_dma + IPS_SGLIST_SIZE(ha) * IPS_MAX_SG * i; in ips_allocatescbs()
4351 if (i < ha->max_cmds - 1) { in ips_allocatescbs()
4352 scb_p->q_next = ha->scb_freelist; in ips_allocatescbs()
4353 ha->scb_freelist = scb_p; in ips_allocatescbs()
4371 ips_init_scb(ips_ha_t * ha, ips_scb_t * scb) in ips_init_scb() argument
4385 memset(ha->dummy, 0, sizeof (IPS_IO_CMD)); in ips_init_scb()
4388 ha->dummy->op_code = 0xFF; in ips_init_scb()
4389 ha->dummy->ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4391 ha->dummy->command_id = IPS_MAX_CMDS; in ips_init_scb()
4400 scb->cmd.basic_io.ccsar = cpu_to_le32(ha->adapt->hw_status_start in ips_init_scb()
4416 ips_getscb(ips_ha_t * ha) in ips_getscb() argument
4422 if ((scb = ha->scb_freelist) == NULL) { in ips_getscb()
4427 ha->scb_freelist = scb->q_next; in ips_getscb()
4431 ips_init_scb(ha, scb); in ips_getscb()
4448 ips_freescb(ips_ha_t * ha, ips_scb_t * scb) in ips_freescb() argument
4455 dma_unmap_single(&ha->pcidev->dev, scb->data_busaddr, in ips_freescb()
4459 if (IPS_COMMAND_ID(ha, scb) < (ha->max_cmds - 1)) { in ips_freescb()
4460 scb->q_next = ha->scb_freelist; in ips_freescb()
4461 ha->scb_freelist = scb; in ips_freescb()
4475 ips_isinit_copperhead(ips_ha_t * ha) in ips_isinit_copperhead() argument
4482 isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isinit_copperhead()
4483 scpr = inb(ha->io_addr + IPS_REG_SCPR); in ips_isinit_copperhead()
4501 ips_isinit_copperhead_memio(ips_ha_t * ha) in ips_isinit_copperhead_memio() argument
4508 isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isinit_copperhead_memio()
4509 scpr = readb(ha->mem_ptr + IPS_REG_SCPR); in ips_isinit_copperhead_memio()
4527 ips_isinit_morpheus(ips_ha_t * ha) in ips_isinit_morpheus() argument
4534 if (ips_isintr_morpheus(ha)) in ips_isinit_morpheus()
4535 ips_flush_and_reset(ha); in ips_isinit_morpheus()
4537 post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_isinit_morpheus()
4538 bits = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isinit_morpheus()
4559 ips_flush_and_reset(ips_ha_t *ha) in ips_flush_and_reset() argument
4568 scb = dma_alloc_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), in ips_flush_and_reset()
4572 ips_init_scb(ha, scb); in ips_flush_and_reset()
4586 ret = ips_send_cmd(ha, scb); /* Send the Flush Command */ in ips_flush_and_reset()
4593 done = ips_poll_for_flush_complete(ha); in ips_flush_and_reset()
4602 (*ha->func.reset) (ha); in ips_flush_and_reset()
4604 dma_free_coherent(&ha->pcidev->dev, sizeof(ips_scb_t), scb, command_dma); in ips_flush_and_reset()
4619 ips_poll_for_flush_complete(ips_ha_t * ha) in ips_poll_for_flush_complete() argument
4624 cstatus.value = (*ha->func.statupd) (ha); in ips_poll_for_flush_complete()
4646 ips_enable_int_copperhead(ips_ha_t * ha) in ips_enable_int_copperhead() argument
4650 outb(ha->io_addr + IPS_REG_HISR, IPS_BIT_EI); in ips_enable_int_copperhead()
4651 inb(ha->io_addr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead()
4663 ips_enable_int_copperhead_memio(ips_ha_t * ha) in ips_enable_int_copperhead_memio() argument
4667 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_enable_int_copperhead_memio()
4668 readb(ha->mem_ptr + IPS_REG_HISR); /*Ensure PCI Posting Completes*/ in ips_enable_int_copperhead_memio()
4680 ips_enable_int_morpheus(ips_ha_t * ha) in ips_enable_int_morpheus() argument
4686 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4688 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_enable_int_morpheus()
4689 readl(ha->mem_ptr + IPS_REG_I960_OIMR); /*Ensure PCI Posting Completes*/ in ips_enable_int_morpheus()
4702 ips_init_copperhead(ips_ha_t * ha) in ips_init_copperhead() argument
4713 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4725 PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4726 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4730 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead()
4739 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4751 inb(ha->io_addr + IPS_REG_ISPR); in ips_init_copperhead()
4752 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4756 Cbsp = inb(ha->io_addr + IPS_REG_CBSP); in ips_init_copperhead()
4770 outl(0x1010, ha->io_addr + IPS_REG_CCCR); in ips_init_copperhead()
4773 outb(IPS_BIT_EBM, ha->io_addr + IPS_REG_SCPR); in ips_init_copperhead()
4775 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead()
4777 outl(0, ha->io_addr + IPS_REG_NDAE); in ips_init_copperhead()
4780 outb(IPS_BIT_EI, ha->io_addr + IPS_REG_HISR); in ips_init_copperhead()
4795 ips_init_copperhead_memio(ips_ha_t * ha) in ips_init_copperhead_memio() argument
4806 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4818 PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4819 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4823 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_copperhead_memio()
4832 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4844 readb(ha->mem_ptr + IPS_REG_ISPR); in ips_init_copperhead_memio()
4845 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4849 Cbsp = readb(ha->mem_ptr + IPS_REG_CBSP); in ips_init_copperhead_memio()
4863 writel(0x1010, ha->mem_ptr + IPS_REG_CCCR); in ips_init_copperhead_memio()
4866 writeb(IPS_BIT_EBM, ha->mem_ptr + IPS_REG_SCPR); in ips_init_copperhead_memio()
4868 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_init_copperhead_memio()
4870 writel(0, ha->mem_ptr + IPS_REG_NDAE); in ips_init_copperhead_memio()
4873 writeb(IPS_BIT_EI, ha->mem_ptr + IPS_REG_HISR); in ips_init_copperhead_memio()
4889 ips_init_morpheus(ips_ha_t * ha) in ips_init_morpheus() argument
4901 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4912 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4918 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4921 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4926 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4929 Post = readl(ha->mem_ptr + IPS_REG_I960_MSG0); in ips_init_morpheus()
4937 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4946 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4949 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4957 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4968 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_morpheus()
4974 Config = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_morpheus()
4978 writel(Isr, ha->mem_ptr + IPS_REG_I2O_HIR); in ips_init_morpheus()
4981 Oimr = readl(ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
4983 writel(Oimr, ha->mem_ptr + IPS_REG_I960_OIMR); in ips_init_morpheus()
4990 ha->requires_esl = 1; in ips_init_morpheus()
5006 ips_reset_copperhead(ips_ha_t * ha) in ips_reset_copperhead() argument
5013 ips_name, ha->host_num, ha->io_addr, ha->pcidev->irq); in ips_reset_copperhead()
5020 outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5025 outb(0, ha->io_addr + IPS_REG_SCPR); in ips_reset_copperhead()
5030 if ((*ha->func.init) (ha)) in ips_reset_copperhead()
5051 ips_reset_copperhead_memio(ips_ha_t * ha) in ips_reset_copperhead_memio() argument
5058 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_copperhead_memio()
5065 writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5070 writeb(0, ha->mem_ptr + IPS_REG_SCPR); in ips_reset_copperhead_memio()
5075 if ((*ha->func.init) (ha)) in ips_reset_copperhead_memio()
5096 ips_reset_morpheus(ips_ha_t * ha) in ips_reset_morpheus() argument
5104 ips_name, ha->host_num, ha->mem_addr, ha->pcidev->irq); in ips_reset_morpheus()
5111 writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); in ips_reset_morpheus()
5117 pci_read_config_byte(ha->pcidev, 4, &junk); in ips_reset_morpheus()
5119 if ((*ha->func.init) (ha)) in ips_reset_morpheus()
5140 ips_statinit(ips_ha_t * ha) in ips_statinit() argument
5146 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit()
5147 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit()
5148 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit()
5150 phys_status_start = ha->adapt->hw_status_start; in ips_statinit()
5151 outl(phys_status_start, ha->io_addr + IPS_REG_SQSR); in ips_statinit()
5153 ha->io_addr + IPS_REG_SQER); in ips_statinit()
5155 ha->io_addr + IPS_REG_SQHR); in ips_statinit()
5156 outl(phys_status_start, ha->io_addr + IPS_REG_SQTR); in ips_statinit()
5158 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit()
5171 ips_statinit_memio(ips_ha_t * ha) in ips_statinit_memio() argument
5177 ha->adapt->p_status_start = ha->adapt->status; in ips_statinit_memio()
5178 ha->adapt->p_status_end = ha->adapt->status + IPS_MAX_CMDS; in ips_statinit_memio()
5179 ha->adapt->p_status_tail = ha->adapt->status; in ips_statinit_memio()
5181 phys_status_start = ha->adapt->hw_status_start; in ips_statinit_memio()
5182 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQSR); in ips_statinit_memio()
5184 ha->mem_ptr + IPS_REG_SQER); in ips_statinit_memio()
5185 writel(phys_status_start + IPS_STATUS_SIZE, ha->mem_ptr + IPS_REG_SQHR); in ips_statinit_memio()
5186 writel(phys_status_start, ha->mem_ptr + IPS_REG_SQTR); in ips_statinit_memio()
5188 ha->adapt->hw_status_tail = phys_status_start; in ips_statinit_memio()
5201 ips_statupd_copperhead(ips_ha_t * ha) in ips_statupd_copperhead() argument
5205 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead()
5206 ha->adapt->p_status_tail++; in ips_statupd_copperhead()
5207 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead()
5209 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead()
5210 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead()
5213 outl(ha->adapt->hw_status_tail, in ips_statupd_copperhead()
5214 ha->io_addr + IPS_REG_SQTR); in ips_statupd_copperhead()
5216 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead()
5229 ips_statupd_copperhead_memio(ips_ha_t * ha) in ips_statupd_copperhead_memio() argument
5233 if (ha->adapt->p_status_tail != ha->adapt->p_status_end) { in ips_statupd_copperhead_memio()
5234 ha->adapt->p_status_tail++; in ips_statupd_copperhead_memio()
5235 ha->adapt->hw_status_tail += sizeof (IPS_STATUS); in ips_statupd_copperhead_memio()
5237 ha->adapt->p_status_tail = ha->adapt->p_status_start; in ips_statupd_copperhead_memio()
5238 ha->adapt->hw_status_tail = ha->adapt->hw_status_start; in ips_statupd_copperhead_memio()
5241 writel(ha->adapt->hw_status_tail, ha->mem_ptr + IPS_REG_SQTR); in ips_statupd_copperhead_memio()
5243 return (ha->adapt->p_status_tail->value); in ips_statupd_copperhead_memio()
5256 ips_statupd_morpheus(ips_ha_t * ha) in ips_statupd_morpheus() argument
5262 val = readl(ha->mem_ptr + IPS_REG_I2O_OUTMSGQ); in ips_statupd_morpheus()
5277 ips_issue_copperhead(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead() argument
5287 ha->host_num, in ips_issue_copperhead()
5293 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead()
5299 le32_to_cpu(inl(ha->io_addr + IPS_REG_CCCR))) & IPS_BIT_SEM) { in ips_issue_copperhead()
5306 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5308 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead()
5315 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_CCSAR); in ips_issue_copperhead()
5316 outw(IPS_BIT_START_CMD, ha->io_addr + IPS_REG_CCCR); in ips_issue_copperhead()
5331 ips_issue_copperhead_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_copperhead_memio() argument
5341 ha->host_num, in ips_issue_copperhead_memio()
5347 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_copperhead_memio()
5352 while ((val = readl(ha->mem_ptr + IPS_REG_CCCR)) & IPS_BIT_SEM) { in ips_issue_copperhead_memio()
5359 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5361 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_issue_copperhead_memio()
5368 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_CCSAR); in ips_issue_copperhead_memio()
5369 writel(IPS_BIT_START_CMD, ha->mem_ptr + IPS_REG_CCCR); in ips_issue_copperhead_memio()
5384 ips_issue_i2o(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o() argument
5392 ha->host_num, in ips_issue_i2o()
5398 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o()
5401 outl(scb->scb_busaddr, ha->io_addr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o()
5416 ips_issue_i2o_memio(ips_ha_t * ha, ips_scb_t * scb) in ips_issue_i2o_memio() argument
5424 ha->host_num, in ips_issue_i2o_memio()
5430 ips_name, ha->host_num, scb->cmd.basic_io.command_id); in ips_issue_i2o_memio()
5433 writel(scb->scb_busaddr, ha->mem_ptr + IPS_REG_I2O_INMSGQ); in ips_issue_i2o_memio()
5448 ips_isintr_copperhead(ips_ha_t * ha) in ips_isintr_copperhead() argument
5454 Isr = inb(ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5465 outb(Isr, ha->io_addr + IPS_REG_HISR); in ips_isintr_copperhead()
5481 ips_isintr_copperhead_memio(ips_ha_t * ha) in ips_isintr_copperhead_memio() argument
5487 Isr = readb(ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5498 writeb(Isr, ha->mem_ptr + IPS_REG_HISR); in ips_isintr_copperhead_memio()
5514 ips_isintr_morpheus(ips_ha_t * ha) in ips_isintr_morpheus() argument
5520 Isr = readl(ha->mem_ptr + IPS_REG_I2O_HIR); in ips_isintr_morpheus()
5538 ips_wait(ips_ha_t * ha, int time, int intr) in ips_wait() argument
5552 if (ha->waitflag == FALSE) { in ips_wait()
5558 if (ha->waitflag == FALSE) { in ips_wait()
5575 (*ha->func.intr) (ha); in ips_wait()
5596 ips_write_driver_status(ips_ha_t * ha, int intr) in ips_write_driver_status() argument
5600 if (!ips_readwrite_page5(ha, FALSE, intr)) { in ips_write_driver_status()
5601 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5609 if (le32_to_cpu(ha->nvram->signature) != IPS_NVRAM_P5_SIG) { in ips_write_driver_status()
5612 ips_name, ha->host_num, ha->nvram->signature); in ips_write_driver_status()
5613 ha->nvram->signature = IPS_NVRAM_P5_SIG; in ips_write_driver_status()
5618 ips_name, ha->host_num, le16_to_cpu(ha->nvram->adapter_type), in ips_write_driver_status()
5619 ha->nvram->adapter_slot, ha->nvram->bios_high[0], in ips_write_driver_status()
5620 ha->nvram->bios_high[1], ha->nvram->bios_high[2], in ips_write_driver_status()
5621 ha->nvram->bios_high[3], ha->nvram->bios_low[0], in ips_write_driver_status()
5622 ha->nvram->bios_low[1], ha->nvram->bios_low[2], in ips_write_driver_status()
5623 ha->nvram->bios_low[3]); in ips_write_driver_status()
5625 ips_get_bios_version(ha, intr); in ips_write_driver_status()
5628 ha->nvram->operating_system = IPS_OS_LINUX; in ips_write_driver_status()
5629 ha->nvram->adapter_type = ha->ad_type; in ips_write_driver_status()
5630 memcpy((char *) ha->nvram->driver_high, IPS_VERSION_HIGH, 4); in ips_write_driver_status()
5631 memcpy((char *) ha->nvram->driver_low, IPS_VERSION_LOW, 4); in ips_write_driver_status()
5632 memcpy((char *) ha->nvram->bios_high, ha->bios_version, 4); in ips_write_driver_status()
5633 memcpy((char *) ha->nvram->bios_low, ha->bios_version + 4, 4); in ips_write_driver_status()
5635 ha->nvram->versioning = 0; /* Indicate the Driver Does Not Support Versioning */ in ips_write_driver_status()
5638 if (!ips_readwrite_page5(ha, TRUE, intr)) { in ips_write_driver_status()
5639 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_write_driver_status()
5646 ha->slot_num = ha->nvram->adapter_slot; in ips_write_driver_status()
5661 ips_read_adapter_status(ips_ha_t * ha, int intr) in ips_read_adapter_status() argument
5668 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_adapter_status()
5670 ips_init_scb(ha, scb); in ips_read_adapter_status()
5676 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_adapter_status()
5681 scb->data_len = sizeof (*ha->enq); in ips_read_adapter_status()
5682 scb->cmd.basic_io.sg_addr = ha->enq_busaddr; in ips_read_adapter_status()
5686 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_adapter_status()
5704 ips_read_subsystem_parameters(ips_ha_t * ha, int intr) in ips_read_subsystem_parameters() argument
5711 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_subsystem_parameters()
5713 ips_init_scb(ha, scb); in ips_read_subsystem_parameters()
5719 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_subsystem_parameters()
5724 scb->data_len = sizeof (*ha->subsys); in ips_read_subsystem_parameters()
5725 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_subsystem_parameters()
5729 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_subsystem_parameters()
5734 memcpy(ha->subsys, ha->ioctl_data, sizeof(*ha->subsys)); in ips_read_subsystem_parameters()
5748 ips_read_config(ips_ha_t * ha, int intr) in ips_read_config() argument
5758 ha->conf->init_id[i] = 7; in ips_read_config()
5760 scb = &ha->scbs[ha->max_cmds - 1]; in ips_read_config()
5762 ips_init_scb(ha, scb); in ips_read_config()
5768 scb->cmd.basic_io.command_id = IPS_COMMAND_ID(ha, scb); in ips_read_config()
5769 scb->data_len = sizeof (*ha->conf); in ips_read_config()
5770 scb->cmd.basic_io.sg_addr = ha->ioctl_busaddr; in ips_read_config()
5774 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_read_config()
5778 memset(ha->conf, 0, sizeof (IPS_CONF)); in ips_read_config()
5782 ha->conf->init_id[i] = 7; in ips_read_config()
5792 memcpy(ha->conf, ha->ioctl_data, sizeof(*ha->conf)); in ips_read_config()
5806 ips_readwrite_page5(ips_ha_t * ha, int write, int intr) in ips_readwrite_page5() argument
5813 scb = &ha->scbs[ha->max_cmds - 1]; in ips_readwrite_page5()
5815 ips_init_scb(ha, scb); in ips_readwrite_page5()
5821 scb->cmd.nvram.command_id = IPS_COMMAND_ID(ha, scb); in ips_readwrite_page5()
5826 scb->data_len = sizeof (*ha->nvram); in ips_readwrite_page5()
5827 scb->cmd.nvram.buffer_addr = ha->ioctl_busaddr; in ips_readwrite_page5()
5829 memcpy(ha->ioctl_data, ha->nvram, sizeof(*ha->nvram)); in ips_readwrite_page5()
5833 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_readwrite_page5()
5837 memset(ha->nvram, 0, sizeof (IPS_NVRAM_P5)); in ips_readwrite_page5()
5842 memcpy(ha->nvram, ha->ioctl_data, sizeof(*ha->nvram)); in ips_readwrite_page5()
5856 ips_clear_adapter(ips_ha_t * ha, int intr) in ips_clear_adapter() argument
5863 scb = &ha->scbs[ha->max_cmds - 1]; in ips_clear_adapter()
5865 ips_init_scb(ha, scb); in ips_clear_adapter()
5871 scb->cmd.config_sync.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5880 ips_send_wait(ha, scb, ips_reset_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5886 ips_init_scb(ha, scb); in ips_clear_adapter()
5892 scb->cmd.unlock_stripe.command_id = IPS_COMMAND_ID(ha, scb); in ips_clear_adapter()
5901 ips_send_wait(ha, scb, ips_cmd_timeout, intr)) == IPS_FAILURE) in ips_clear_adapter()
5919 ips_ffdc_reset(ips_ha_t * ha, int intr) in ips_ffdc_reset() argument
5925 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_reset()
5927 ips_init_scb(ha, scb); in ips_ffdc_reset()
5932 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_reset()
5933 scb->cmd.ffdc.reset_count = ha->reset_count; in ips_ffdc_reset()
5937 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_reset()
5940 ips_send_wait(ha, scb, ips_cmd_timeout, intr); in ips_ffdc_reset()
5953 ips_ffdc_time(ips_ha_t * ha) in ips_ffdc_time() argument
5959 DEBUG_VAR(1, "(%s%d) Sending time update.", ips_name, ha->host_num); in ips_ffdc_time()
5961 scb = &ha->scbs[ha->max_cmds - 1]; in ips_ffdc_time()
5963 ips_init_scb(ha, scb); in ips_ffdc_time()
5968 scb->cmd.ffdc.command_id = IPS_COMMAND_ID(ha, scb); in ips_ffdc_time()
5973 ips_fix_ffdc_time(ha, scb, ha->last_ffdc); in ips_ffdc_time()
5976 ips_send_wait(ha, scb, ips_cmd_timeout, IPS_FFDC); in ips_ffdc_time()
5988 ips_fix_ffdc_time(ips_ha_t * ha, ips_scb_t * scb, time64_t current_time) in ips_fix_ffdc_time() argument
6018 ips_erase_bios(ips_ha_t * ha) in ips_erase_bios() argument
6028 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6029 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6032 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6033 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6037 outb(0x20, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6038 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6042 outb(0xD0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6043 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6047 outb(0x70, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6048 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6054 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6055 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6059 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6073 outb(0xB0, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6074 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6080 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios()
6081 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_erase_bios()
6085 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6109 outb(0x50, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6110 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6114 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_erase_bios()
6115 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios()
6130 ips_erase_bios_memio(ips_ha_t * ha) in ips_erase_bios_memio() argument
6140 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6141 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6144 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6145 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6149 writeb(0x20, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6150 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6154 writeb(0xD0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6155 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6159 writeb(0x70, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6160 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6166 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6167 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6171 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6185 writeb(0xB0, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6186 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6192 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_erase_bios_memio()
6193 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_erase_bios_memio()
6197 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6221 writeb(0x50, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6222 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6226 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_erase_bios_memio()
6227 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_erase_bios_memio()
6242 ips_program_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios() argument
6255 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6256 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6259 outb(0x40, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6260 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6263 outb(buffer[i], ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6264 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6270 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios()
6271 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6275 status = inb(ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6286 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6287 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6290 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6291 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6300 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6301 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6304 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6305 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6313 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_program_bios()
6314 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6317 outb(0xFF, ha->io_addr + IPS_REG_FLDP); in ips_program_bios()
6318 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios()
6333 ips_program_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_program_bios_memio() argument
6346 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6347 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6350 writeb(0x40, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6351 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6354 writeb(buffer[i], ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6355 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6361 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) { in ips_program_bios_memio()
6362 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6366 status = readb(ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6377 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6378 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6381 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6382 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6391 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6392 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6395 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6396 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6404 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_program_bios_memio()
6405 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6408 writeb(0xFF, ha->mem_ptr + IPS_REG_FLDP); in ips_program_bios_memio()
6409 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_program_bios_memio()
6424 ips_verify_bios(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios() argument
6433 outl(0, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6434 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6437 if (inb(ha->io_addr + IPS_REG_FLDP) != 0x55) in ips_verify_bios()
6440 outl(1, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6441 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6443 if (inb(ha->io_addr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios()
6449 outl(i + offset, ha->io_addr + IPS_REG_FLAP); in ips_verify_bios()
6450 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios()
6453 checksum = (uint8_t) checksum + inb(ha->io_addr + IPS_REG_FLDP); in ips_verify_bios()
6473 ips_verify_bios_memio(ips_ha_t * ha, char *buffer, uint32_t buffersize, in ips_verify_bios_memio() argument
6482 writel(0, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6483 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6486 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0x55) in ips_verify_bios_memio()
6489 writel(1, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6490 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6492 if (readb(ha->mem_ptr + IPS_REG_FLDP) != 0xAA) in ips_verify_bios_memio()
6498 writel(i + offset, ha->mem_ptr + IPS_REG_FLAP); in ips_verify_bios_memio()
6499 if (ha->pcidev->revision == IPS_REVID_TROMBONE64) in ips_verify_bios_memio()
6503 (uint8_t) checksum + readb(ha->mem_ptr + IPS_REG_FLDP); in ips_verify_bios_memio()
6522 ips_abort_init(ips_ha_t * ha, int index) in ips_abort_init() argument
6524 ha->active = 0; in ips_abort_init()
6525 ips_free(ha); in ips_abort_init()
6661 ips_ha_t *ha, *oldha = ips_ha[index]; in ips_register_scsi() local
6668 ha = IPS_HA(sh); in ips_register_scsi()
6669 memcpy(ha, oldha, sizeof (ips_ha_t)); in ips_register_scsi()
6672 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_register_scsi()
6673 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_register_scsi()
6681 sh->unique_id = (ha->io_addr) ? ha->io_addr : ha->mem_addr; in ips_register_scsi()
6687 sh->max_id = ha->ntargets; in ips_register_scsi()
6688 sh->max_lun = ha->nlun; in ips_register_scsi()
6689 sh->max_channel = ha->nbus - 1; in ips_register_scsi()
6690 sh->can_queue = ha->max_cmds - 1; in ips_register_scsi()
6692 if (scsi_add_host(sh, &ha->pcidev->dev)) in ips_register_scsi()
6696 ips_ha[index] = ha; in ips_register_scsi()
6703 free_irq(ha->pcidev->irq, ha); in ips_register_scsi()
6838 ips_ha_t *ha; in ips_init_phase1() local
6898 ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL); in ips_init_phase1()
6899 if (ha == NULL) { in ips_init_phase1()
6906 ips_ha[index] = ha; in ips_init_phase1()
6907 ha->active = 1; in ips_init_phase1()
6910 ha->io_addr = io_addr; in ips_init_phase1()
6911 ha->io_len = io_len; in ips_init_phase1()
6912 ha->mem_addr = mem_addr; in ips_init_phase1()
6913 ha->mem_len = mem_len; in ips_init_phase1()
6914 ha->mem_ptr = mem_ptr; in ips_init_phase1()
6915 ha->ioremap_ptr = ioremap_ptr; in ips_init_phase1()
6916 ha->host_num = (uint32_t) index; in ips_init_phase1()
6917 ha->slot_num = PCI_SLOT(pci_dev->devfn); in ips_init_phase1()
6918 ha->pcidev = pci_dev; in ips_init_phase1()
6926 if (sizeof(dma_addr_t) > 4 && IPS_HAS_ENH_SGLIST(ha) && in ips_init_phase1()
6927 !dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(64))) { in ips_init_phase1()
6928 (ha)->flags |= IPS_HA_ENH_SG; in ips_init_phase1()
6930 if (dma_set_mask(&ha->pcidev->dev, DMA_BIT_MASK(32)) != 0) { in ips_init_phase1()
6932 return ips_abort_init(ha, index); in ips_init_phase1()
6940 ha->enq = dma_alloc_coherent(&pci_dev->dev, sizeof (IPS_ENQ), in ips_init_phase1()
6941 &ha->enq_busaddr, GFP_KERNEL); in ips_init_phase1()
6942 if (!ha->enq) { in ips_init_phase1()
6945 return ips_abort_init(ha, index); in ips_init_phase1()
6948 ha->adapt = dma_alloc_coherent(&pci_dev->dev, in ips_init_phase1()
6951 if (!ha->adapt) { in ips_init_phase1()
6954 return ips_abort_init(ha, index); in ips_init_phase1()
6956 ha->adapt->hw_status_start = dma_address; in ips_init_phase1()
6957 ha->dummy = (void *) (ha->adapt + 1); in ips_init_phase1()
6961 ha->logical_drive_info = dma_alloc_coherent(&pci_dev->dev, in ips_init_phase1()
6963 if (!ha->logical_drive_info) { in ips_init_phase1()
6966 return ips_abort_init(ha, index); in ips_init_phase1()
6968 ha->logical_drive_info_dma_addr = dma_address; in ips_init_phase1()
6971 ha->conf = kmalloc(sizeof (IPS_CONF), GFP_KERNEL); in ips_init_phase1()
6973 if (!ha->conf) { in ips_init_phase1()
6976 return ips_abort_init(ha, index); in ips_init_phase1()
6979 ha->nvram = kmalloc(sizeof (IPS_NVRAM_P5), GFP_KERNEL); in ips_init_phase1()
6981 if (!ha->nvram) { in ips_init_phase1()
6984 return ips_abort_init(ha, index); in ips_init_phase1()
6987 ha->subsys = kmalloc(sizeof (IPS_SUBSYS), GFP_KERNEL); in ips_init_phase1()
6989 if (!ha->subsys) { in ips_init_phase1()
6992 return ips_abort_init(ha, index); in ips_init_phase1()
7000 ha->ioctl_data = dma_alloc_coherent(&pci_dev->dev, ips_ioctlsize, in ips_init_phase1()
7001 &ha->ioctl_busaddr, GFP_KERNEL); in ips_init_phase1()
7002 ha->ioctl_len = ips_ioctlsize; in ips_init_phase1()
7003 if (!ha->ioctl_data) { in ips_init_phase1()
7006 return ips_abort_init(ha, index); in ips_init_phase1()
7012 ips_setup_funclist(ha); in ips_init_phase1()
7014 if ((IPS_IS_MORPHEUS(ha)) || (IPS_IS_MARCO(ha))) { in ips_init_phase1()
7016 IsDead = readl(ha->mem_ptr + IPS_REG_I960_MSG1); in ips_init_phase1()
7018 ips_reset_morpheus(ha); in ips_init_phase1()
7026 if (!(*ha->func.isinit) (ha)) { in ips_init_phase1()
7027 if (!(*ha->func.init) (ha)) { in ips_init_phase1()
7033 return ips_abort_init(ha, index); in ips_init_phase1()
7053 ips_ha_t *ha; in ips_init_phase2() local
7055 ha = ips_ha[index]; in ips_init_phase2()
7058 if (!ha->active) { in ips_init_phase2()
7064 if (request_irq(ha->pcidev->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) { in ips_init_phase2()
7065 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7067 return ips_abort_init(ha, index); in ips_init_phase2()
7073 ha->max_cmds = 1; in ips_init_phase2()
7074 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7075 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7077 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7078 return ips_abort_init(ha, index); in ips_init_phase2()
7081 if (!ips_hainit(ha)) { in ips_init_phase2()
7082 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7084 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7085 return ips_abort_init(ha, index); in ips_init_phase2()
7088 ips_deallocatescbs(ha, 1); in ips_init_phase2()
7091 if (!ips_allocatescbs(ha)) { in ips_init_phase2()
7092 IPS_PRINTK(KERN_WARNING, ha->pcidev, in ips_init_phase2()
7094 free_irq(ha->pcidev->irq, ha); in ips_init_phase2()
7095 return ips_abort_init(ha, index); in ips_init_phase2()