pinstance 140 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 146 drivers/scsi/pmcraid.c pinstance = shost_priv(scsi_dev->host); pinstance 148 drivers/scsi/pmcraid.c fw_version = be16_to_cpu(pinstance->inq_data->fw_version); pinstance 155 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, lock_flags); pinstance 156 drivers/scsi/pmcraid.c list_for_each_entry(temp, &pinstance->used_res_q, queue) { pinstance 193 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags); pinstance 360 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance pinstance 367 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->free_pool_lock, lock_flags); pinstance 369 drivers/scsi/pmcraid.c if (!list_empty(&pinstance->free_cmd_pool)) { pinstance 370 drivers/scsi/pmcraid.c cmd = list_entry(pinstance->free_cmd_pool.next, pinstance 374 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->free_pool_lock, lock_flags); pinstance 391 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 394 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->free_pool_lock, lock_flags); pinstance 395 drivers/scsi/pmcraid.c list_add_tail(&cmd->free_list, &pinstance->free_cmd_pool); pinstance 396 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->free_pool_lock, lock_flags); pinstance 407 drivers/scsi/pmcraid.c static u32 pmcraid_read_interrupts(struct pmcraid_instance *pinstance) pinstance 409 drivers/scsi/pmcraid.c return (pinstance->interrupt_mode) ? pinstance 410 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_msix_interrupt_reg) : pinstance 411 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_reg); pinstance 424 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 428 drivers/scsi/pmcraid.c u32 gmask = ioread32(pinstance->int_regs.global_interrupt_mask_reg); pinstance 431 drivers/scsi/pmcraid.c iowrite32(intrs, pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 432 drivers/scsi/pmcraid.c iowrite32(nmask, pinstance->int_regs.global_interrupt_mask_reg); pinstance 433 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.global_interrupt_mask_reg); pinstance 435 drivers/scsi/pmcraid.c if (!pinstance->interrupt_mode) { pinstance 437 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 438 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 452 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 456 drivers/scsi/pmcraid.c u32 gmask = ioread32(pinstance->int_regs.global_interrupt_mask_reg); pinstance 459 drivers/scsi/pmcraid.c iowrite32(nmask, pinstance->int_regs.global_interrupt_mask_reg); pinstance 461 drivers/scsi/pmcraid.c if (!pinstance->interrupt_mode) { pinstance 463 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 464 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 468 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.global_interrupt_mask_reg), pinstance 469 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_mask_reg)); pinstance 481 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance pinstance 486 drivers/scsi/pmcraid.c if (!pinstance->interrupt_mode) { pinstance 488 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 489 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 491 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 492 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 495 drivers/scsi/pmcraid.c if (pinstance->reset_cmd != NULL) { pinstance 496 drivers/scsi/pmcraid.c del_timer(&pinstance->reset_cmd->timer); pinstance 498 drivers/scsi/pmcraid.c pinstance->host->host_lock, lock_flags); pinstance 499 drivers/scsi/pmcraid.c pinstance->reset_cmd->cmd_done(pinstance->reset_cmd); pinstance 501 drivers/scsi/pmcraid.c pinstance->host->host_lock, lock_flags); pinstance 514 drivers/scsi/pmcraid.c static void pmcraid_reset_type(struct pmcraid_instance *pinstance) pinstance 520 drivers/scsi/pmcraid.c mask = ioread32(pinstance->int_regs.ioa_host_interrupt_mask_reg); pinstance 521 drivers/scsi/pmcraid.c intrs = ioread32(pinstance->int_regs.ioa_host_interrupt_reg); pinstance 522 drivers/scsi/pmcraid.c alerts = ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 528 drivers/scsi/pmcraid.c pinstance->ioa_hard_reset = 1; pinstance 533 drivers/scsi/pmcraid.c pinstance->ioa_unit_check = 1; pinstance 548 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 553 drivers/scsi/pmcraid.c rc = pci_read_config_word(pinstance->pdev, PCI_COMMAND, &pci_reg); pinstance 565 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 567 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 579 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 584 drivers/scsi/pmcraid.c pinstance->int_regs.host_ioa_interrupt_reg); pinstance 585 drivers/scsi/pmcraid.c doorbells = ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 586 drivers/scsi/pmcraid.c intrs = ioread32(pinstance->int_regs.ioa_host_interrupt_reg); pinstance 605 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 606 drivers/scsi/pmcraid.c u32 status = ioread32(pinstance->ioa_status); pinstance 616 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 618 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 641 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 651 drivers/scsi/pmcraid.c rc = pci_read_config_word(pinstance->pdev, PCI_COMMAND, &pci_reg); pinstance 665 drivers/scsi/pmcraid.c pinstance->int_regs.host_ioa_interrupt_reg); pinstance 667 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 671 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_HARD_RESET; pinstance 689 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 692 drivers/scsi/pmcraid.c dev_info(&pinstance->pdev->dev, pinstance 702 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 703 drivers/scsi/pmcraid.c if (!pinstance->ioa_reset_in_progress) { pinstance 704 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts = 0; pinstance 705 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 711 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 717 drivers/scsi/pmcraid.c pinstance->reset_cmd = cmd; pinstance 718 drivers/scsi/pmcraid.c pinstance->ioa_reset_in_progress = 1; pinstance 722 drivers/scsi/pmcraid.c if (pinstance->reset_cmd != cmd) { pinstance 735 drivers/scsi/pmcraid.c if (cmd == pinstance->reset_cmd) pinstance 740 drivers/scsi/pmcraid.c if (pinstance->scn.ioa_state != PMC_DEVICE_EVENT_RESET_START && pinstance 741 drivers/scsi/pmcraid.c pinstance->scn.ioa_state != PMC_DEVICE_EVENT_SHUTDOWN_START) pinstance 742 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 745 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 746 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 748 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 824 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 835 drivers/scsi/pmcraid.c dma_unmap_single(&pinstance->pdev->dev, cmd->sense_buffer_dma, pinstance 859 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 867 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->pending_pool_lock, lock_flags); pinstance 868 drivers/scsi/pmcraid.c list_add_tail(&cmd->free_list, &pinstance->pending_cmd_pool); pinstance 869 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->pending_pool_lock, lock_flags); pinstance 870 drivers/scsi/pmcraid.c atomic_inc(&pinstance->outstanding_cmds); pinstance 874 drivers/scsi/pmcraid.c iowrite32(le64_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), pinstance->ioarrin); pinstance 921 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 924 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 926 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 976 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 986 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 987 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 989 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 1007 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1031 drivers/scsi/pmcraid.c ioadl->address = cpu_to_le64(pinstance->inq_data_baddr); pinstance 1047 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1050 drivers/scsi/pmcraid.c __be64 hrrq_addr = cpu_to_be64(pinstance->hrrq_start_bus_addr[index]); pinstance 1057 drivers/scsi/pmcraid.c if (cmd->hrrq_index < pinstance->num_hrrq) { pinstance 1123 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 1135 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 1145 drivers/scsi/pmcraid.c dma = pinstance->ccn.baddr + PMCRAID_AEN_HDR_SIZE; pinstance 1146 drivers/scsi/pmcraid.c hcam = &pinstance->ccn; pinstance 1150 drivers/scsi/pmcraid.c dma = pinstance->ldn.baddr + PMCRAID_AEN_HDR_SIZE; pinstance 1151 drivers/scsi/pmcraid.c hcam = &pinstance->ldn; pinstance 1192 drivers/scsi/pmcraid.c static void pmcraid_send_hcam(struct pmcraid_instance *pinstance, u8 type) pinstance 1194 drivers/scsi/pmcraid.c struct pmcraid_cmd *cmd = pmcraid_init_hcam(pinstance, type); pinstance 1243 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 1246 drivers/scsi/pmcraid.c pinstance = cmd->drv_inst; pinstance 1248 drivers/scsi/pmcraid.c &pinstance->ldn : &pinstance->ccn; pinstance 1394 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 1404 drivers/scsi/pmcraid.c aen_msg->hostno = (pinstance->host->unique_id << 16 | pinstance 1405 drivers/scsi/pmcraid.c MINOR(pinstance->cdev.dev)); pinstance 1464 drivers/scsi/pmcraid.c static int pmcraid_notify_ccn(struct pmcraid_instance *pinstance) pinstance 1466 drivers/scsi/pmcraid.c return pmcraid_notify_aen(pinstance, pinstance 1467 drivers/scsi/pmcraid.c pinstance->ccn.msg, pinstance 1468 drivers/scsi/pmcraid.c le32_to_cpu(pinstance->ccn.hcam->data_len) + pinstance 1479 drivers/scsi/pmcraid.c static int pmcraid_notify_ldn(struct pmcraid_instance *pinstance) pinstance 1481 drivers/scsi/pmcraid.c return pmcraid_notify_aen(pinstance, pinstance 1482 drivers/scsi/pmcraid.c pinstance->ldn.msg, pinstance 1483 drivers/scsi/pmcraid.c le32_to_cpu(pinstance->ldn.hcam->data_len) + pinstance 1495 drivers/scsi/pmcraid.c static void pmcraid_notify_ioastate(struct pmcraid_instance *pinstance, u32 evt) pinstance 1497 drivers/scsi/pmcraid.c pinstance->scn.ioa_state = evt; pinstance 1498 drivers/scsi/pmcraid.c pmcraid_notify_aen(pinstance, pinstance 1499 drivers/scsi/pmcraid.c &pinstance->scn.msg, pinstance 1511 drivers/scsi/pmcraid.c static void pmcraid_handle_config_change(struct pmcraid_instance *pinstance) pinstance 1525 drivers/scsi/pmcraid.c ccn_hcam = (struct pmcraid_hcam_ccn *)pinstance->ccn.hcam; pinstance 1527 drivers/scsi/pmcraid.c fw_version = be16_to_cpu(pinstance->inq_data->fw_version); pinstance 1531 drivers/scsi/pmcraid.c le32_to_cpu(pinstance->ccn.hcam->ilid), pinstance 1532 drivers/scsi/pmcraid.c pinstance->ccn.hcam->op_code, pinstance 1533 drivers/scsi/pmcraid.c (le32_to_cpu(pinstance->ccn.hcam->timestamp1) | pinstance 1534 drivers/scsi/pmcraid.c ((le32_to_cpu(pinstance->ccn.hcam->timestamp2) & 0xffffffffLL) << 32)), pinstance 1535 drivers/scsi/pmcraid.c pinstance->ccn.hcam->notification_type, pinstance 1536 drivers/scsi/pmcraid.c pinstance->ccn.hcam->notification_lost, pinstance 1537 drivers/scsi/pmcraid.c pinstance->ccn.hcam->flags, pinstance 1538 drivers/scsi/pmcraid.c pinstance->host->unique_id, pinstance 1551 drivers/scsi/pmcraid.c if (pinstance->ccn.hcam->notification_lost) { pinstance 1552 drivers/scsi/pmcraid.c cfgcmd = pmcraid_get_free_cmd(pinstance); pinstance 1555 drivers/scsi/pmcraid.c pinstance->reinit_cfg_table = 1; pinstance 1567 drivers/scsi/pmcraid.c if (pinstance->ccn.hcam->notification_type == pinstance 1575 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, lock_flags); pinstance 1576 drivers/scsi/pmcraid.c list_for_each_entry(res, &pinstance->used_res_q, queue) { pinstance 1589 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, pinstance 1598 drivers/scsi/pmcraid.c if (list_empty(&pinstance->free_res_q)) { pinstance 1599 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, pinstance 1602 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, pinstance 1604 drivers/scsi/pmcraid.c pmcraid_send_hcam(pinstance, pinstance 1606 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 1611 drivers/scsi/pmcraid.c res = list_entry(pinstance->free_res_q.next, pinstance 1617 drivers/scsi/pmcraid.c list_add_tail(&res->queue, &pinstance->used_res_q); pinstance 1620 drivers/scsi/pmcraid.c memcpy(&res->cfg_entry, cfg_entry, pinstance->config_table_entry_size); pinstance 1622 drivers/scsi/pmcraid.c if (pinstance->ccn.hcam->notification_type == pinstance 1632 drivers/scsi/pmcraid.c schedule_work(&pinstance->worker_q); pinstance 1635 drivers/scsi/pmcraid.c list_move_tail(&res->queue, &pinstance->free_res_q); pinstance 1639 drivers/scsi/pmcraid.c schedule_work(&pinstance->worker_q); pinstance 1641 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags); pinstance 1647 drivers/scsi/pmcraid.c pmcraid_notify_ccn(pinstance); pinstance 1649 drivers/scsi/pmcraid.c cmd = pmcraid_init_hcam(pinstance, PMCRAID_HCAM_CODE_CONFIG_CHANGE); pinstance 1698 drivers/scsi/pmcraid.c static void pmcraid_handle_error_log(struct pmcraid_instance *pinstance) pinstance 1703 drivers/scsi/pmcraid.c hcam_ldn = (struct pmcraid_hcam_ldn *)pinstance->ldn.hcam; pinstance 1707 drivers/scsi/pmcraid.c pinstance->ldn.hcam->ilid, pinstance 1708 drivers/scsi/pmcraid.c pinstance->ldn.hcam->op_code, pinstance 1709 drivers/scsi/pmcraid.c pinstance->ldn.hcam->notification_type, pinstance 1710 drivers/scsi/pmcraid.c pinstance->ldn.hcam->notification_lost, pinstance 1711 drivers/scsi/pmcraid.c pinstance->ldn.hcam->flags, pinstance 1712 drivers/scsi/pmcraid.c pinstance->ldn.hcam->overlay_id); pinstance 1715 drivers/scsi/pmcraid.c if (pinstance->ldn.hcam->notification_type != pinstance 1719 drivers/scsi/pmcraid.c if (pinstance->ldn.hcam->notification_lost == pinstance 1721 drivers/scsi/pmcraid.c dev_info(&pinstance->pdev->dev, "Error notifications lost\n"); pinstance 1727 drivers/scsi/pmcraid.c dev_info(&pinstance->pdev->dev, pinstance 1730 drivers/scsi/pmcraid.c pinstance->host, pinstance 1749 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1753 drivers/scsi/pmcraid.c pinstance->ccn.cmd = NULL; pinstance 1761 drivers/scsi/pmcraid.c atomic_read(&pinstance->ccn.ignore) == 1) { pinstance 1764 drivers/scsi/pmcraid.c dev_info(&pinstance->pdev->dev, pinstance 1766 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 1767 drivers/scsi/pmcraid.c pmcraid_send_hcam(pinstance, PMCRAID_HCAM_CODE_CONFIG_CHANGE); pinstance 1768 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 1770 drivers/scsi/pmcraid.c pmcraid_handle_config_change(pinstance); pinstance 1786 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1788 drivers/scsi/pmcraid.c (struct pmcraid_hcam_ldn *)pinstance->ldn.hcam; pinstance 1794 drivers/scsi/pmcraid.c pinstance->ldn.cmd = NULL; pinstance 1802 drivers/scsi/pmcraid.c atomic_read(&pinstance->ccn.ignore) == 1) { pinstance 1805 drivers/scsi/pmcraid.c pmcraid_handle_error_log(pinstance); pinstance 1807 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, pinstance 1809 drivers/scsi/pmcraid.c pmcraid_initiate_reset(pinstance); pinstance 1810 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 1815 drivers/scsi/pmcraid.c pinstance->timestamp_error = 1; pinstance 1819 drivers/scsi/pmcraid.c dev_info(&pinstance->pdev->dev, pinstance 1824 drivers/scsi/pmcraid.c pmcraid_notify_ldn(pinstance); pinstance 1826 drivers/scsi/pmcraid.c cmd = pmcraid_init_hcam(pinstance, PMCRAID_HCAM_CODE_LOG_DATA); pinstance 1839 drivers/scsi/pmcraid.c static void pmcraid_register_hcams(struct pmcraid_instance *pinstance) pinstance 1841 drivers/scsi/pmcraid.c pmcraid_send_hcam(pinstance, PMCRAID_HCAM_CODE_CONFIG_CHANGE); pinstance 1842 drivers/scsi/pmcraid.c pmcraid_send_hcam(pinstance, PMCRAID_HCAM_CODE_LOG_DATA); pinstance 1851 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1858 drivers/scsi/pmcraid.c atomic_set(&pinstance->ccn.ignore, 1); pinstance 1859 drivers/scsi/pmcraid.c atomic_set(&pinstance->ldn.ignore, 1); pinstance 1865 drivers/scsi/pmcraid.c if ((pinstance->force_ioa_reset && !pinstance->ioa_bringdown) || pinstance 1866 drivers/scsi/pmcraid.c pinstance->ioa_unit_check) { pinstance 1867 drivers/scsi/pmcraid.c pinstance->force_ioa_reset = 0; pinstance 1868 drivers/scsi/pmcraid.c pinstance->ioa_unit_check = 0; pinstance 1869 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 1889 drivers/scsi/pmcraid.c static int pmcraid_reset_enable_ioa(struct pmcraid_instance *pinstance) pinstance 1893 drivers/scsi/pmcraid.c pmcraid_reinit_buffers(pinstance); pinstance 1894 drivers/scsi/pmcraid.c intrs = pmcraid_read_interrupts(pinstance); pinstance 1896 drivers/scsi/pmcraid.c pmcraid_enable_interrupts(pinstance, PMCRAID_PCI_INTERRUPTS); pinstance 1899 drivers/scsi/pmcraid.c if (!pinstance->interrupt_mode) { pinstance 1901 drivers/scsi/pmcraid.c pinstance->int_regs. pinstance 1904 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 1921 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 1946 drivers/scsi/pmcraid.c if (pinstance->interrupt_mode) { pinstance 1948 drivers/scsi/pmcraid.c pinstance->int_regs.host_ioa_interrupt_reg); pinstance 1949 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 1952 drivers/scsi/pmcraid.c iowrite32(doorbell, pinstance->int_regs.host_ioa_interrupt_reg); pinstance 1953 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg), pinstance 1954 drivers/scsi/pmcraid.c int_reg = ioread32(pinstance->int_regs.ioa_host_interrupt_reg); pinstance 1957 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg), pinstance 1969 drivers/scsi/pmcraid.c static void pmcraid_get_dump(struct pmcraid_instance *pinstance) pinstance 1986 drivers/scsi/pmcraid.c static void pmcraid_fail_outstanding_cmds(struct pmcraid_instance *pinstance) pinstance 1994 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->pending_pool_lock, lock_flags); pinstance 1995 drivers/scsi/pmcraid.c list_for_each_entry_safe(cmd, temp, &pinstance->pending_cmd_pool, pinstance 1998 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->pending_pool_lock, pinstance 2036 drivers/scsi/pmcraid.c atomic_dec(&pinstance->outstanding_cmds); pinstance 2037 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->pending_pool_lock, lock_flags); pinstance 2040 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->pending_pool_lock, lock_flags); pinstance 2060 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 2063 drivers/scsi/pmcraid.c pinstance->ioa_reset_in_progress = 1; pinstance 2065 drivers/scsi/pmcraid.c if (pinstance->reset_cmd != cmd) { pinstance 2067 drivers/scsi/pmcraid.c pinstance->reset_cmd = cmd; pinstance 2071 drivers/scsi/pmcraid.c pinstance->ioa_state, cmd); pinstance 2073 drivers/scsi/pmcraid.c switch (pinstance->ioa_state) { pinstance 2089 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 2090 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 2098 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 2104 drivers/scsi/pmcraid.c if (pinstance->ioa_hard_reset == 0) { pinstance 2105 drivers/scsi/pmcraid.c if (ioread32(pinstance->ioa_status) & pinstance 2108 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_BRINGUP; pinstance 2112 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_SOFT_RESET; pinstance 2119 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 2130 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_HARD_RESET; pinstance 2135 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts++; pinstance 2138 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_attempts > PMCRAID_RESET_ATTEMPTS) { pinstance 2139 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts = 0; pinstance 2141 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_DEAD; pinstance 2143 drivers/scsi/pmcraid.c if (pinstance->ioa_bringdown) pinstance 2144 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 2147 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 2156 drivers/scsi/pmcraid.c pci_restore_state(pinstance->pdev); pinstance 2159 drivers/scsi/pmcraid.c pmcraid_fail_outstanding_cmds(pinstance); pinstance 2162 drivers/scsi/pmcraid.c if (pinstance->ioa_unit_check) { pinstance 2164 drivers/scsi/pmcraid.c pinstance->ioa_unit_check = 0; pinstance 2165 drivers/scsi/pmcraid.c pmcraid_get_dump(pinstance); pinstance 2166 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts--; pinstance 2167 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_RESET_ALERT; pinstance 2176 drivers/scsi/pmcraid.c if (pinstance->ioa_bringdown) { pinstance 2178 drivers/scsi/pmcraid.c pinstance->ioa_shutdown_type = SHUTDOWN_NONE; pinstance 2179 drivers/scsi/pmcraid.c pinstance->ioa_bringdown = 0; pinstance 2180 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_UNKNOWN; pinstance 2181 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 2189 drivers/scsi/pmcraid.c if (pmcraid_reset_enable_ioa(pinstance)) { pinstance 2190 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_BRINGUP; pinstance 2195 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_SOFT_RESET; pinstance 2206 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_BRINGUP; pinstance 2219 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_OPERATIONAL; pinstance 2230 drivers/scsi/pmcraid.c if (pinstance->ioa_shutdown_type == SHUTDOWN_NONE && pinstance 2231 drivers/scsi/pmcraid.c pinstance->force_ioa_reset == 0) { pinstance 2232 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 2236 drivers/scsi/pmcraid.c if (pinstance->ioa_shutdown_type != SHUTDOWN_NONE) pinstance 2237 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_IN_BRINGDOWN; pinstance 2250 drivers/scsi/pmcraid.c pinstance->ioa_reset_in_progress = 0; pinstance 2251 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts = 0; pinstance 2252 drivers/scsi/pmcraid.c pinstance->reset_cmd = NULL; pinstance 2253 drivers/scsi/pmcraid.c pinstance->ioa_shutdown_type = SHUTDOWN_NONE; pinstance 2254 drivers/scsi/pmcraid.c pinstance->ioa_bringdown = 0; pinstance 2260 drivers/scsi/pmcraid.c if (pinstance->ioa_state == IOA_STATE_OPERATIONAL) pinstance 2261 drivers/scsi/pmcraid.c pmcraid_register_hcams(pinstance); pinstance 2263 drivers/scsi/pmcraid.c wake_up_all(&pinstance->reset_wait_q); pinstance 2280 drivers/scsi/pmcraid.c static void pmcraid_initiate_reset(struct pmcraid_instance *pinstance) pinstance 2287 drivers/scsi/pmcraid.c if (!pinstance->ioa_reset_in_progress) { pinstance 2288 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 2289 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 2296 drivers/scsi/pmcraid.c pinstance->ioa_shutdown_type = SHUTDOWN_NONE; pinstance 2297 drivers/scsi/pmcraid.c pinstance->reset_cmd = cmd; pinstance 2298 drivers/scsi/pmcraid.c pinstance->force_ioa_reset = 1; pinstance 2299 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, pinstance 2320 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 2329 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 2331 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_in_progress) { pinstance 2334 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2336 drivers/scsi/pmcraid.c wait_event(pinstance->reset_wait_q, pinstance 2337 drivers/scsi/pmcraid.c !pinstance->ioa_reset_in_progress); pinstance 2339 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 2341 drivers/scsi/pmcraid.c if (pinstance->ioa_state == IOA_STATE_DEAD) { pinstance 2346 drivers/scsi/pmcraid.c if (pinstance->ioa_state == target_state) { pinstance 2353 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 2354 drivers/scsi/pmcraid.c reset_cmd = pmcraid_get_free_cmd(pinstance); pinstance 2361 drivers/scsi/pmcraid.c pinstance->ioa_bringdown = 1; pinstance 2363 drivers/scsi/pmcraid.c pinstance->ioa_shutdown_type = shutdown_type; pinstance 2364 drivers/scsi/pmcraid.c pinstance->reset_cmd = reset_cmd; pinstance 2365 drivers/scsi/pmcraid.c pinstance->force_ioa_reset = reset; pinstance 2368 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2370 drivers/scsi/pmcraid.c wait_event(pinstance->reset_wait_q, pinstance 2371 drivers/scsi/pmcraid.c !pinstance->ioa_reset_in_progress); pinstance 2374 drivers/scsi/pmcraid.c scsi_unblock_requests(pinstance->host); pinstance 2375 drivers/scsi/pmcraid.c return pinstance->ioa_state != target_state; pinstance 2378 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2390 drivers/scsi/pmcraid.c static int pmcraid_reset_bringdown(struct pmcraid_instance *pinstance) pinstance 2392 drivers/scsi/pmcraid.c return pmcraid_reset_reload(pinstance, pinstance 2405 drivers/scsi/pmcraid.c static int pmcraid_reset_bringup(struct pmcraid_instance *pinstance) pinstance 2407 drivers/scsi/pmcraid.c pmcraid_notify_ioastate(pinstance, PMC_DEVICE_EVENT_RESET_START); pinstance 2409 drivers/scsi/pmcraid.c return pmcraid_reset_reload(pinstance, pinstance 2587 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 2635 drivers/scsi/pmcraid.c scsi_report_bus_reset(pinstance->host, pinstance 2706 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 2712 drivers/scsi/pmcraid.c pinstance = pinstance 2726 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 2727 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_in_progress || pinstance 2728 drivers/scsi/pmcraid.c pinstance->ioa_state == IOA_STATE_DEAD) { pinstance 2729 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2740 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 2743 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2772 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 2862 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 2865 drivers/scsi/pmcraid.c pinstance = (struct pmcraid_instance *)cmd->drv_inst; pinstance 2868 drivers/scsi/pmcraid.c cancel_cmd = pmcraid_get_free_cmd(pinstance); pinstance 2944 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 2953 drivers/scsi/pmcraid.c pinstance = pinstance 2969 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, host_lock_flags); pinstance 2971 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_in_progress || pinstance 2972 drivers/scsi/pmcraid.c pinstance->ioa_state == IOA_STATE_DEAD) { pinstance 2973 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 2983 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->pending_pool_lock, pending_lock_flags); pinstance 2984 drivers/scsi/pmcraid.c list_for_each_entry(cmd, &pinstance->pending_cmd_pool, free_list) { pinstance 2992 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->pending_pool_lock, pinstance 3001 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 3067 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pinstance 3076 drivers/scsi/pmcraid.c if (atomic_read(&pinstance->outstanding_cmds) <= pinstance 3082 drivers/scsi/pmcraid.c dev_err(&pinstance->pdev->dev, pinstance 3084 drivers/scsi/pmcraid.c return pmcraid_reset_bringup(pinstance) == 0 ? SUCCESS : FAILED; pinstance 3145 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 3330 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 3337 drivers/scsi/pmcraid.c pinstance = pinstance 3339 drivers/scsi/pmcraid.c fw_version = be16_to_cpu(pinstance->inq_data->fw_version); pinstance 3347 drivers/scsi/pmcraid.c if (pinstance->ioa_state == IOA_STATE_DEAD) { pinstance 3355 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_in_progress) pinstance 3368 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 3386 drivers/scsi/pmcraid.c ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % pinstance 3387 drivers/scsi/pmcraid.c pinstance->num_hrrq; pinstance 3408 drivers/scsi/pmcraid.c rc = pmcraid_build_ioadl(pinstance, cmd); pinstance 3412 drivers/scsi/pmcraid.c scsi_cmd->cmnd[0], pinstance->host->unique_id, pinstance 3440 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 3446 drivers/scsi/pmcraid.c pinstance = container_of(inode->i_cdev, struct pmcraid_instance, cdev); pinstance 3447 drivers/scsi/pmcraid.c filep->private_data = pinstance; pinstance 3460 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 3463 drivers/scsi/pmcraid.c pinstance = filep->private_data; pinstance 3464 drivers/scsi/pmcraid.c mutex_lock(&pinstance->aen_queue_lock); pinstance 3465 drivers/scsi/pmcraid.c rc = fasync_helper(fd, filep, mode, &pinstance->aen_queue); pinstance 3466 drivers/scsi/pmcraid.c mutex_unlock(&pinstance->aen_queue_lock); pinstance 3571 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 3592 drivers/scsi/pmcraid.c if (pinstance->ioa_reset_in_progress) { pinstance 3594 drivers/scsi/pmcraid.c pinstance->reset_wait_q, pinstance 3595 drivers/scsi/pmcraid.c !pinstance->ioa_reset_in_progress, pinstance 3605 drivers/scsi/pmcraid.c if (pinstance->ioa_state != IOA_STATE_OPERATIONAL) { pinstance 3654 drivers/scsi/pmcraid.c cmd = pmcraid_get_free_cmd(pinstance); pinstance 3689 drivers/scsi/pmcraid.c ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % pinstance 3690 drivers/scsi/pmcraid.c pinstance->num_hrrq; pinstance 3728 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 3730 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 3754 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 3756 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 3841 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 3851 drivers/scsi/pmcraid.c pmcraid_reset_bringup(pinstance); pinstance 3908 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = NULL; pinstance 3928 drivers/scsi/pmcraid.c pinstance = filep->private_data; pinstance 3930 drivers/scsi/pmcraid.c if (!pinstance) { pinstance 3943 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 3945 drivers/scsi/pmcraid.c retval = pmcraid_ioctl_passthrough(pinstance, cmd, pinstance 3949 drivers/scsi/pmcraid.c scsi_unblock_requests(pinstance->host); pinstance 3954 drivers/scsi/pmcraid.c retval = pmcraid_ioctl_driver(pinstance, cmd, pinstance 3999 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pinstance 4001 drivers/scsi/pmcraid.c return snprintf(buf, PAGE_SIZE, "%d\n", pinstance->current_log_level); pinstance 4021 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 4031 drivers/scsi/pmcraid.c pinstance = (struct pmcraid_instance *)shost->hostdata; pinstance 4032 drivers/scsi/pmcraid.c pinstance->current_log_level = val; pinstance 4087 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pinstance 4089 drivers/scsi/pmcraid.c u32 adapter_id = (pinstance->pdev->bus->number << 8) | pinstance 4090 drivers/scsi/pmcraid.c pinstance->pdev->devfn; pinstance 4095 drivers/scsi/pmcraid.c adapter_id, MINOR(pinstance->cdev.dev), aen_group); pinstance 4151 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 4158 drivers/scsi/pmcraid.c pinstance = hrrq_vector->drv_inst; pinstance 4162 drivers/scsi/pmcraid.c intrs_val = pmcraid_read_interrupts(pinstance); pinstance 4164 drivers/scsi/pmcraid.c ((ioread32(pinstance->int_regs.host_ioa_interrupt_reg) pinstance 4173 drivers/scsi/pmcraid.c pinstance->ioa_unit_check = 1; pinstance 4177 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, pinstance 4179 drivers/scsi/pmcraid.c pmcraid_initiate_reset(pinstance); pinstance 4181 drivers/scsi/pmcraid.c pinstance->host->host_lock, pinstance 4189 drivers/scsi/pmcraid.c pmcraid_clr_trans_op(pinstance); pinstance 4196 drivers/scsi/pmcraid.c pinstance->int_regs.host_ioa_interrupt_reg); pinstance 4197 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 4203 drivers/scsi/pmcraid.c tasklet_schedule(&(pinstance->isr_tasklet[hrrq_id])); pinstance 4220 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 4233 drivers/scsi/pmcraid.c pinstance = hrrq_vector->drv_inst; pinstance 4235 drivers/scsi/pmcraid.c intrs = pmcraid_read_interrupts(pinstance); pinstance 4247 drivers/scsi/pmcraid.c pinstance->ioa_unit_check = 1; pinstance 4250 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 4254 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 4255 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, lock_flags); pinstance 4256 drivers/scsi/pmcraid.c pmcraid_initiate_reset(pinstance); pinstance 4257 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, lock_flags); pinstance 4264 drivers/scsi/pmcraid.c pmcraid_clr_trans_op(pinstance); pinstance 4267 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 4269 drivers/scsi/pmcraid.c pinstance->int_regs.ioa_host_interrupt_clr_reg); pinstance 4272 drivers/scsi/pmcraid.c &(pinstance->isr_tasklet[hrrq_id])); pinstance 4291 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 4300 drivers/scsi/pmcraid.c pinstance = container_of(workp, struct pmcraid_instance, worker_q); pinstance 4302 drivers/scsi/pmcraid.c if (!atomic_read(&pinstance->expose_resources)) pinstance 4305 drivers/scsi/pmcraid.c fw_version = be16_to_cpu(pinstance->inq_data->fw_version); pinstance 4307 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, lock_flags); pinstance 4308 drivers/scsi/pmcraid.c list_for_each_entry_safe(res, temp, &pinstance->used_res_q, queue) { pinstance 4316 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, pinstance 4320 drivers/scsi/pmcraid.c pinstance->host->host_lock, pinstance 4325 drivers/scsi/pmcraid.c &pinstance->free_res_q); pinstance 4327 drivers/scsi/pmcraid.c &pinstance->resource_lock, pinstance 4331 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, pinstance 4336 drivers/scsi/pmcraid.c pinstance->host->host_lock, pinstance 4342 drivers/scsi/pmcraid.c list_for_each_entry(res, &pinstance->used_res_q, queue) { pinstance 4366 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, pinstance 4368 drivers/scsi/pmcraid.c scsi_add_device(pinstance->host, bus, target, lun); pinstance 4369 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, pinstance 4374 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags); pinstance 4388 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 4397 drivers/scsi/pmcraid.c pinstance = hrrq_vector->drv_inst; pinstance 4399 drivers/scsi/pmcraid.c lockp = &(pinstance->hrrq_lock[id]); pinstance 4409 drivers/scsi/pmcraid.c resp = le32_to_cpu(*(pinstance->hrrq_curr[id])); pinstance 4412 drivers/scsi/pmcraid.c pinstance->host_toggle_bit[id]) { pinstance 4417 drivers/scsi/pmcraid.c if (pinstance->hrrq_curr[id] < pinstance->hrrq_end[id]) { pinstance 4418 drivers/scsi/pmcraid.c pinstance->hrrq_curr[id]++; pinstance 4420 drivers/scsi/pmcraid.c pinstance->hrrq_curr[id] = pinstance->hrrq_start[id]; pinstance 4421 drivers/scsi/pmcraid.c pinstance->host_toggle_bit[id] ^= 1u; pinstance 4427 drivers/scsi/pmcraid.c resp = le32_to_cpu(*(pinstance->hrrq_curr[id])); pinstance 4431 drivers/scsi/pmcraid.c cmd = pinstance->cmd_list[cmd_index]; pinstance 4434 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->pending_pool_lock, pinstance 4437 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->pending_pool_lock, pinstance 4440 drivers/scsi/pmcraid.c atomic_dec(&pinstance->outstanding_cmds); pinstance 4443 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, pinstance 4446 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, pinstance 4453 drivers/scsi/pmcraid.c resp = le32_to_cpu(*(pinstance->hrrq_curr[id])); pinstance 4470 drivers/scsi/pmcraid.c void pmcraid_unregister_interrupt_handler(struct pmcraid_instance *pinstance) pinstance 4472 drivers/scsi/pmcraid.c struct pci_dev *pdev = pinstance->pdev; pinstance 4475 drivers/scsi/pmcraid.c for (i = 0; i < pinstance->num_hrrq; i++) pinstance 4476 drivers/scsi/pmcraid.c free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]); pinstance 4478 drivers/scsi/pmcraid.c pinstance->interrupt_mode = 0; pinstance 4490 drivers/scsi/pmcraid.c pmcraid_register_interrupt_handler(struct pmcraid_instance *pinstance) pinstance 4492 drivers/scsi/pmcraid.c struct pci_dev *pdev = pinstance->pdev; pinstance 4514 drivers/scsi/pmcraid.c struct pmcraid_isr_param *vec = &pinstance->hrrq_vector[i]; pinstance 4517 drivers/scsi/pmcraid.c vec->drv_inst = pinstance; pinstance 4524 drivers/scsi/pmcraid.c pinstance->num_hrrq = num_hrrq; pinstance 4526 drivers/scsi/pmcraid.c pinstance->interrupt_mode = 1; pinstance 4528 drivers/scsi/pmcraid.c pinstance->int_regs.host_ioa_interrupt_reg); pinstance 4529 drivers/scsi/pmcraid.c ioread32(pinstance->int_regs.host_ioa_interrupt_reg); pinstance 4536 drivers/scsi/pmcraid.c free_irq(pci_irq_vector(pdev, i), &pinstance->hrrq_vector[i]); pinstance 4550 drivers/scsi/pmcraid.c pmcraid_release_cmd_blocks(struct pmcraid_instance *pinstance, int max_index) pinstance 4554 drivers/scsi/pmcraid.c kmem_cache_free(pinstance->cmd_cachep, pinstance->cmd_list[i]); pinstance 4555 drivers/scsi/pmcraid.c pinstance->cmd_list[i] = NULL; pinstance 4557 drivers/scsi/pmcraid.c kmem_cache_destroy(pinstance->cmd_cachep); pinstance 4558 drivers/scsi/pmcraid.c pinstance->cmd_cachep = NULL; pinstance 4574 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance, pinstance 4580 drivers/scsi/pmcraid.c if (pinstance->control_pool == NULL) pinstance 4584 drivers/scsi/pmcraid.c dma_pool_free(pinstance->control_pool, pinstance 4585 drivers/scsi/pmcraid.c pinstance->cmd_list[i]->ioa_cb, pinstance 4586 drivers/scsi/pmcraid.c pinstance->cmd_list[i]->ioa_cb_bus_addr); pinstance 4587 drivers/scsi/pmcraid.c pinstance->cmd_list[i]->ioa_cb = NULL; pinstance 4588 drivers/scsi/pmcraid.c pinstance->cmd_list[i]->ioa_cb_bus_addr = 0; pinstance 4590 drivers/scsi/pmcraid.c dma_pool_destroy(pinstance->control_pool); pinstance 4591 drivers/scsi/pmcraid.c pinstance->control_pool = NULL; pinstance 4603 drivers/scsi/pmcraid.c static int pmcraid_allocate_cmd_blocks(struct pmcraid_instance *pinstance) pinstance 4607 drivers/scsi/pmcraid.c sprintf(pinstance->cmd_pool_name, "pmcraid_cmd_pool_%d", pinstance 4608 drivers/scsi/pmcraid.c pinstance->host->unique_id); pinstance 4611 drivers/scsi/pmcraid.c pinstance->cmd_cachep = kmem_cache_create( pinstance 4612 drivers/scsi/pmcraid.c pinstance->cmd_pool_name, pinstance 4615 drivers/scsi/pmcraid.c if (!pinstance->cmd_cachep) pinstance 4619 drivers/scsi/pmcraid.c pinstance->cmd_list[i] = pinstance 4620 drivers/scsi/pmcraid.c kmem_cache_alloc(pinstance->cmd_cachep, GFP_KERNEL); pinstance 4621 drivers/scsi/pmcraid.c if (!pinstance->cmd_list[i]) { pinstance 4622 drivers/scsi/pmcraid.c pmcraid_release_cmd_blocks(pinstance, i); pinstance 4639 drivers/scsi/pmcraid.c static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) pinstance 4643 drivers/scsi/pmcraid.c sprintf(pinstance->ctl_pool_name, "pmcraid_control_pool_%d", pinstance 4644 drivers/scsi/pmcraid.c pinstance->host->unique_id); pinstance 4646 drivers/scsi/pmcraid.c pinstance->control_pool = pinstance 4647 drivers/scsi/pmcraid.c dma_pool_create(pinstance->ctl_pool_name, pinstance 4648 drivers/scsi/pmcraid.c &pinstance->pdev->dev, pinstance 4652 drivers/scsi/pmcraid.c if (!pinstance->control_pool) pinstance 4656 drivers/scsi/pmcraid.c pinstance->cmd_list[i]->ioa_cb = pinstance 4658 drivers/scsi/pmcraid.c pinstance->control_pool, pinstance 4660 drivers/scsi/pmcraid.c &(pinstance->cmd_list[i]->ioa_cb_bus_addr)); pinstance 4662 drivers/scsi/pmcraid.c if (!pinstance->cmd_list[i]->ioa_cb) { pinstance 4663 drivers/scsi/pmcraid.c pmcraid_release_control_blocks(pinstance, i); pinstance 4666 drivers/scsi/pmcraid.c memset(pinstance->cmd_list[i]->ioa_cb, 0, pinstance 4681 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(struct pmcraid_instance *pinstance, int maxindex) pinstance 4686 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4688 drivers/scsi/pmcraid.c pinstance->hrrq_start[i], pinstance 4689 drivers/scsi/pmcraid.c pinstance->hrrq_start_bus_addr[i]); pinstance 4692 drivers/scsi/pmcraid.c pinstance->hrrq_start[i] = NULL; pinstance 4693 drivers/scsi/pmcraid.c pinstance->hrrq_start_bus_addr[i] = 0; pinstance 4694 drivers/scsi/pmcraid.c pinstance->host_toggle_bit[i] = 0; pinstance 4705 drivers/scsi/pmcraid.c static int pmcraid_allocate_host_rrqs(struct pmcraid_instance *pinstance) pinstance 4711 drivers/scsi/pmcraid.c for (i = 0; i < pinstance->num_hrrq; i++) { pinstance 4712 drivers/scsi/pmcraid.c pinstance->hrrq_start[i] = pinstance 4713 drivers/scsi/pmcraid.c dma_alloc_coherent(&pinstance->pdev->dev, buffer_size, pinstance 4714 drivers/scsi/pmcraid.c &pinstance->hrrq_start_bus_addr[i], pinstance 4716 drivers/scsi/pmcraid.c if (!pinstance->hrrq_start[i]) { pinstance 4719 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(pinstance, i); pinstance 4723 drivers/scsi/pmcraid.c memset(pinstance->hrrq_start[i], 0, buffer_size); pinstance 4724 drivers/scsi/pmcraid.c pinstance->hrrq_curr[i] = pinstance->hrrq_start[i]; pinstance 4725 drivers/scsi/pmcraid.c pinstance->hrrq_end[i] = pinstance 4726 drivers/scsi/pmcraid.c pinstance->hrrq_start[i] + PMCRAID_MAX_CMD - 1; pinstance 4727 drivers/scsi/pmcraid.c pinstance->host_toggle_bit[i] = 1; pinstance 4728 drivers/scsi/pmcraid.c spin_lock_init(&pinstance->hrrq_lock[i]); pinstance 4741 drivers/scsi/pmcraid.c static void pmcraid_release_hcams(struct pmcraid_instance *pinstance) pinstance 4743 drivers/scsi/pmcraid.c if (pinstance->ccn.msg != NULL) { pinstance 4744 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4747 drivers/scsi/pmcraid.c pinstance->ccn.msg, pinstance 4748 drivers/scsi/pmcraid.c pinstance->ccn.baddr); pinstance 4750 drivers/scsi/pmcraid.c pinstance->ccn.msg = NULL; pinstance 4751 drivers/scsi/pmcraid.c pinstance->ccn.hcam = NULL; pinstance 4752 drivers/scsi/pmcraid.c pinstance->ccn.baddr = 0; pinstance 4755 drivers/scsi/pmcraid.c if (pinstance->ldn.msg != NULL) { pinstance 4756 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4759 drivers/scsi/pmcraid.c pinstance->ldn.msg, pinstance 4760 drivers/scsi/pmcraid.c pinstance->ldn.baddr); pinstance 4762 drivers/scsi/pmcraid.c pinstance->ldn.msg = NULL; pinstance 4763 drivers/scsi/pmcraid.c pinstance->ldn.hcam = NULL; pinstance 4764 drivers/scsi/pmcraid.c pinstance->ldn.baddr = 0; pinstance 4775 drivers/scsi/pmcraid.c static int pmcraid_allocate_hcams(struct pmcraid_instance *pinstance) pinstance 4777 drivers/scsi/pmcraid.c pinstance->ccn.msg = dma_alloc_coherent(&pinstance->pdev->dev, pinstance 4780 drivers/scsi/pmcraid.c &pinstance->ccn.baddr, GFP_KERNEL); pinstance 4782 drivers/scsi/pmcraid.c pinstance->ldn.msg = dma_alloc_coherent(&pinstance->pdev->dev, pinstance 4785 drivers/scsi/pmcraid.c &pinstance->ldn.baddr, GFP_KERNEL); pinstance 4787 drivers/scsi/pmcraid.c if (pinstance->ldn.msg == NULL || pinstance->ccn.msg == NULL) { pinstance 4788 drivers/scsi/pmcraid.c pmcraid_release_hcams(pinstance); pinstance 4790 drivers/scsi/pmcraid.c pinstance->ccn.hcam = pinstance 4791 drivers/scsi/pmcraid.c (void *)pinstance->ccn.msg + PMCRAID_AEN_HDR_SIZE; pinstance 4792 drivers/scsi/pmcraid.c pinstance->ldn.hcam = pinstance 4793 drivers/scsi/pmcraid.c (void *)pinstance->ldn.msg + PMCRAID_AEN_HDR_SIZE; pinstance 4795 drivers/scsi/pmcraid.c atomic_set(&pinstance->ccn.ignore, 0); pinstance 4796 drivers/scsi/pmcraid.c atomic_set(&pinstance->ldn.ignore, 0); pinstance 4799 drivers/scsi/pmcraid.c return (pinstance->ldn.msg == NULL) ? -ENOMEM : 0; pinstance 4809 drivers/scsi/pmcraid.c static void pmcraid_release_config_buffers(struct pmcraid_instance *pinstance) pinstance 4811 drivers/scsi/pmcraid.c if (pinstance->cfg_table != NULL && pinstance 4812 drivers/scsi/pmcraid.c pinstance->cfg_table_bus_addr != 0) { pinstance 4813 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4815 drivers/scsi/pmcraid.c pinstance->cfg_table, pinstance 4816 drivers/scsi/pmcraid.c pinstance->cfg_table_bus_addr); pinstance 4817 drivers/scsi/pmcraid.c pinstance->cfg_table = NULL; pinstance 4818 drivers/scsi/pmcraid.c pinstance->cfg_table_bus_addr = 0; pinstance 4821 drivers/scsi/pmcraid.c if (pinstance->res_entries != NULL) { pinstance 4825 drivers/scsi/pmcraid.c list_del(&pinstance->res_entries[i].queue); pinstance 4826 drivers/scsi/pmcraid.c kfree(pinstance->res_entries); pinstance 4827 drivers/scsi/pmcraid.c pinstance->res_entries = NULL; pinstance 4830 drivers/scsi/pmcraid.c pmcraid_release_hcams(pinstance); pinstance 4840 drivers/scsi/pmcraid.c static int pmcraid_allocate_config_buffers(struct pmcraid_instance *pinstance) pinstance 4844 drivers/scsi/pmcraid.c pinstance->res_entries = pinstance 4849 drivers/scsi/pmcraid.c if (NULL == pinstance->res_entries) { pinstance 4855 drivers/scsi/pmcraid.c list_add_tail(&pinstance->res_entries[i].queue, pinstance 4856 drivers/scsi/pmcraid.c &pinstance->free_res_q); pinstance 4858 drivers/scsi/pmcraid.c pinstance->cfg_table = dma_alloc_coherent(&pinstance->pdev->dev, pinstance 4860 drivers/scsi/pmcraid.c &pinstance->cfg_table_bus_addr, pinstance 4863 drivers/scsi/pmcraid.c if (NULL == pinstance->cfg_table) { pinstance 4865 drivers/scsi/pmcraid.c pmcraid_release_config_buffers(pinstance); pinstance 4869 drivers/scsi/pmcraid.c if (pmcraid_allocate_hcams(pinstance)) { pinstance 4871 drivers/scsi/pmcraid.c pmcraid_release_config_buffers(pinstance); pinstance 4886 drivers/scsi/pmcraid.c static void pmcraid_init_tasklets(struct pmcraid_instance *pinstance) pinstance 4889 drivers/scsi/pmcraid.c for (i = 0; i < pinstance->num_hrrq; i++) pinstance 4890 drivers/scsi/pmcraid.c tasklet_init(&pinstance->isr_tasklet[i], pinstance 4892 drivers/scsi/pmcraid.c (unsigned long)&pinstance->hrrq_vector[i]); pinstance 4903 drivers/scsi/pmcraid.c static void pmcraid_kill_tasklets(struct pmcraid_instance *pinstance) pinstance 4906 drivers/scsi/pmcraid.c for (i = 0; i < pinstance->num_hrrq; i++) pinstance 4907 drivers/scsi/pmcraid.c tasklet_kill(&pinstance->isr_tasklet[i]); pinstance 4918 drivers/scsi/pmcraid.c static void pmcraid_release_buffers(struct pmcraid_instance *pinstance) pinstance 4920 drivers/scsi/pmcraid.c pmcraid_release_config_buffers(pinstance); pinstance 4921 drivers/scsi/pmcraid.c pmcraid_release_control_blocks(pinstance, PMCRAID_MAX_CMD); pinstance 4922 drivers/scsi/pmcraid.c pmcraid_release_cmd_blocks(pinstance, PMCRAID_MAX_CMD); pinstance 4923 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(pinstance, pinstance->num_hrrq); pinstance 4925 drivers/scsi/pmcraid.c if (pinstance->inq_data != NULL) { pinstance 4926 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4928 drivers/scsi/pmcraid.c pinstance->inq_data, pinstance 4929 drivers/scsi/pmcraid.c pinstance->inq_data_baddr); pinstance 4931 drivers/scsi/pmcraid.c pinstance->inq_data = NULL; pinstance 4932 drivers/scsi/pmcraid.c pinstance->inq_data_baddr = 0; pinstance 4935 drivers/scsi/pmcraid.c if (pinstance->timestamp_data != NULL) { pinstance 4936 drivers/scsi/pmcraid.c dma_free_coherent(&pinstance->pdev->dev, pinstance 4938 drivers/scsi/pmcraid.c pinstance->timestamp_data, pinstance 4939 drivers/scsi/pmcraid.c pinstance->timestamp_data_baddr); pinstance 4941 drivers/scsi/pmcraid.c pinstance->timestamp_data = NULL; pinstance 4942 drivers/scsi/pmcraid.c pinstance->timestamp_data_baddr = 0; pinstance 4959 drivers/scsi/pmcraid.c static int pmcraid_init_buffers(struct pmcraid_instance *pinstance) pinstance 4963 drivers/scsi/pmcraid.c if (pmcraid_allocate_host_rrqs(pinstance)) { pinstance 4965 drivers/scsi/pmcraid.c pinstance->num_hrrq); pinstance 4969 drivers/scsi/pmcraid.c if (pmcraid_allocate_config_buffers(pinstance)) { pinstance 4971 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(pinstance, pinstance->num_hrrq); pinstance 4975 drivers/scsi/pmcraid.c if (pmcraid_allocate_cmd_blocks(pinstance)) { pinstance 4977 drivers/scsi/pmcraid.c pmcraid_release_config_buffers(pinstance); pinstance 4978 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(pinstance, pinstance->num_hrrq); pinstance 4982 drivers/scsi/pmcraid.c if (pmcraid_allocate_control_blocks(pinstance)) { pinstance 4984 drivers/scsi/pmcraid.c pmcraid_release_config_buffers(pinstance); pinstance 4985 drivers/scsi/pmcraid.c pmcraid_release_cmd_blocks(pinstance, PMCRAID_MAX_CMD); pinstance 4986 drivers/scsi/pmcraid.c pmcraid_release_host_rrqs(pinstance, pinstance->num_hrrq); pinstance 4991 drivers/scsi/pmcraid.c pinstance->inq_data = dma_alloc_coherent(&pinstance->pdev->dev, pinstance 4993 drivers/scsi/pmcraid.c &pinstance->inq_data_baddr, GFP_KERNEL); pinstance 4994 drivers/scsi/pmcraid.c if (pinstance->inq_data == NULL) { pinstance 4996 drivers/scsi/pmcraid.c pmcraid_release_buffers(pinstance); pinstance 5001 drivers/scsi/pmcraid.c pinstance->timestamp_data = dma_alloc_coherent(&pinstance->pdev->dev, pinstance 5003 drivers/scsi/pmcraid.c &pinstance->timestamp_data_baddr, pinstance 5005 drivers/scsi/pmcraid.c if (pinstance->timestamp_data == NULL) { pinstance 5008 drivers/scsi/pmcraid.c pmcraid_release_buffers(pinstance); pinstance 5018 drivers/scsi/pmcraid.c struct pmcraid_cmd *cmdp = pinstance->cmd_list[i]; pinstance 5020 drivers/scsi/pmcraid.c cmdp->drv_inst = pinstance; pinstance 5021 drivers/scsi/pmcraid.c list_add_tail(&cmdp->free_list, &pinstance->free_cmd_pool); pinstance 5033 drivers/scsi/pmcraid.c static void pmcraid_reinit_buffers(struct pmcraid_instance *pinstance) pinstance 5038 drivers/scsi/pmcraid.c for (i = 0; i < pinstance->num_hrrq; i++) { pinstance 5039 drivers/scsi/pmcraid.c memset(pinstance->hrrq_start[i], 0, buffer_size); pinstance 5040 drivers/scsi/pmcraid.c pinstance->hrrq_curr[i] = pinstance->hrrq_start[i]; pinstance 5041 drivers/scsi/pmcraid.c pinstance->hrrq_end[i] = pinstance 5042 drivers/scsi/pmcraid.c pinstance->hrrq_start[i] + PMCRAID_MAX_CMD - 1; pinstance 5043 drivers/scsi/pmcraid.c pinstance->host_toggle_bit[i] = 1; pinstance 5059 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pinstance 5062 drivers/scsi/pmcraid.c pinstance->host = host; pinstance 5063 drivers/scsi/pmcraid.c pinstance->pdev = pdev; pinstance 5066 drivers/scsi/pmcraid.c pinstance->mapped_dma_addr = mapped_pci_addr; pinstance 5070 drivers/scsi/pmcraid.c struct pmcraid_chip_details *chip_cfg = pinstance->chip_cfg; pinstance 5071 drivers/scsi/pmcraid.c struct pmcraid_interrupts *pint_regs = &pinstance->int_regs; pinstance 5073 drivers/scsi/pmcraid.c pinstance->ioarrin = mapped_pci_addr + chip_cfg->ioarrin; pinstance 5089 drivers/scsi/pmcraid.c pinstance->mailbox = mapped_pci_addr + chip_cfg->mailbox; pinstance 5090 drivers/scsi/pmcraid.c pinstance->ioa_status = mapped_pci_addr + chip_cfg->ioastatus; pinstance 5099 drivers/scsi/pmcraid.c pinstance->ioa_reset_attempts = 0; pinstance 5100 drivers/scsi/pmcraid.c init_waitqueue_head(&pinstance->reset_wait_q); pinstance 5102 drivers/scsi/pmcraid.c atomic_set(&pinstance->outstanding_cmds, 0); pinstance 5103 drivers/scsi/pmcraid.c atomic_set(&pinstance->last_message_id, 0); pinstance 5104 drivers/scsi/pmcraid.c atomic_set(&pinstance->expose_resources, 0); pinstance 5106 drivers/scsi/pmcraid.c INIT_LIST_HEAD(&pinstance->free_res_q); pinstance 5107 drivers/scsi/pmcraid.c INIT_LIST_HEAD(&pinstance->used_res_q); pinstance 5108 drivers/scsi/pmcraid.c INIT_LIST_HEAD(&pinstance->free_cmd_pool); pinstance 5109 drivers/scsi/pmcraid.c INIT_LIST_HEAD(&pinstance->pending_cmd_pool); pinstance 5111 drivers/scsi/pmcraid.c spin_lock_init(&pinstance->free_pool_lock); pinstance 5112 drivers/scsi/pmcraid.c spin_lock_init(&pinstance->pending_pool_lock); pinstance 5113 drivers/scsi/pmcraid.c spin_lock_init(&pinstance->resource_lock); pinstance 5114 drivers/scsi/pmcraid.c mutex_init(&pinstance->aen_queue_lock); pinstance 5117 drivers/scsi/pmcraid.c INIT_WORK(&pinstance->worker_q, pmcraid_worker_function); pinstance 5120 drivers/scsi/pmcraid.c pinstance->current_log_level = pmcraid_log_level; pinstance 5123 drivers/scsi/pmcraid.c pinstance->ioa_state = IOA_STATE_UNKNOWN; pinstance 5124 drivers/scsi/pmcraid.c pinstance->reset_cmd = NULL; pinstance 5139 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); pinstance 5140 drivers/scsi/pmcraid.c pmcraid_reset_bringdown(pinstance); pinstance 5172 drivers/scsi/pmcraid.c static int pmcraid_setup_chrdev(struct pmcraid_instance *pinstance) pinstance 5178 drivers/scsi/pmcraid.c cdev_init(&pinstance->cdev, &pmcraid_fops); pinstance 5179 drivers/scsi/pmcraid.c pinstance->cdev.owner = THIS_MODULE; pinstance 5181 drivers/scsi/pmcraid.c error = cdev_add(&pinstance->cdev, MKDEV(pmcraid_major, minor), 1); pinstance 5199 drivers/scsi/pmcraid.c static void pmcraid_release_chrdev(struct pmcraid_instance *pinstance) pinstance 5201 drivers/scsi/pmcraid.c pmcraid_release_minor(MINOR(pinstance->cdev.dev)); pinstance 5203 drivers/scsi/pmcraid.c MKDEV(pmcraid_major, MINOR(pinstance->cdev.dev))); pinstance 5204 drivers/scsi/pmcraid.c cdev_del(&pinstance->cdev); pinstance 5216 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); pinstance 5219 drivers/scsi/pmcraid.c pmcraid_release_chrdev(pinstance); pinstance 5222 drivers/scsi/pmcraid.c scsi_remove_host(pinstance->host); pinstance 5225 drivers/scsi/pmcraid.c scsi_block_requests(pinstance->host); pinstance 5230 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 5231 drivers/scsi/pmcraid.c flush_work(&pinstance->worker_q); pinstance 5233 drivers/scsi/pmcraid.c pmcraid_kill_tasklets(pinstance); pinstance 5234 drivers/scsi/pmcraid.c pmcraid_unregister_interrupt_handler(pinstance); pinstance 5235 drivers/scsi/pmcraid.c pmcraid_release_buffers(pinstance); pinstance 5236 drivers/scsi/pmcraid.c iounmap(pinstance->mapped_dma_addr); pinstance 5238 drivers/scsi/pmcraid.c scsi_host_put(pinstance->host); pinstance 5254 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); pinstance 5257 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 5258 drivers/scsi/pmcraid.c pmcraid_kill_tasklets(pinstance); pinstance 5259 drivers/scsi/pmcraid.c pci_set_drvdata(pinstance->pdev, pinstance); pinstance 5260 drivers/scsi/pmcraid.c pmcraid_unregister_interrupt_handler(pinstance); pinstance 5276 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = pci_get_drvdata(pdev); pinstance 5277 drivers/scsi/pmcraid.c struct Scsi_Host *host = pinstance->host; pinstance 5305 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 5306 drivers/scsi/pmcraid.c atomic_set(&pinstance->outstanding_cmds, 0); pinstance 5307 drivers/scsi/pmcraid.c rc = pmcraid_register_interrupt_handler(pinstance); pinstance 5316 drivers/scsi/pmcraid.c pmcraid_init_tasklets(pinstance); pinstance 5317 drivers/scsi/pmcraid.c pmcraid_enable_interrupts(pinstance, PMCRAID_PCI_INTERRUPTS); pinstance 5322 drivers/scsi/pmcraid.c pinstance->ioa_hard_reset = 1; pinstance 5327 drivers/scsi/pmcraid.c if (pmcraid_reset_bringup(pinstance)) { pinstance 5336 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 5337 drivers/scsi/pmcraid.c pmcraid_kill_tasklets(pinstance); pinstance 5338 drivers/scsi/pmcraid.c pmcraid_unregister_interrupt_handler(pinstance); pinstance 5363 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 5366 drivers/scsi/pmcraid.c spin_lock_irqsave(pinstance->host->host_lock, flags); pinstance 5368 drivers/scsi/pmcraid.c spin_unlock_irqrestore(pinstance->host->host_lock, flags); pinstance 5369 drivers/scsi/pmcraid.c scsi_unblock_requests(pinstance->host); pinstance 5370 drivers/scsi/pmcraid.c schedule_work(&pinstance->worker_q); pinstance 5424 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 5432 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[0] = (__u8)(timestamp); pinstance 5433 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[1] = (__u8)((timestamp) >> 8); pinstance 5434 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[2] = (__u8)((timestamp) >> 16); pinstance 5435 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[3] = (__u8)((timestamp) >> 24); pinstance 5436 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[4] = (__u8)((timestamp) >> 32); pinstance 5437 drivers/scsi/pmcraid.c pinstance->timestamp_data->timestamp[5] = (__u8)((timestamp) >> 40); pinstance 5458 drivers/scsi/pmcraid.c ioadl->address = cpu_to_le64(pinstance->timestamp_data_baddr); pinstance 5461 drivers/scsi/pmcraid.c if (!pinstance->timestamp_error) { pinstance 5462 drivers/scsi/pmcraid.c pinstance->timestamp_error = 0; pinstance 5487 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 5495 drivers/scsi/pmcraid.c if (pinstance->cfg_table->flags & MICROCODE_UPDATE_REQUIRED) pinstance 5498 drivers/scsi/pmcraid.c fw_version = be16_to_cpu(pinstance->inq_data->fw_version); pinstance 5504 drivers/scsi/pmcraid.c spin_lock_irqsave(&pinstance->resource_lock, lock_flags); pinstance 5506 drivers/scsi/pmcraid.c list_for_each_entry_safe(res, temp, &pinstance->used_res_q, queue) pinstance 5509 drivers/scsi/pmcraid.c for (i = 0; i < le16_to_cpu(pinstance->cfg_table->num_entries); i++) { pinstance 5510 drivers/scsi/pmcraid.c if (be16_to_cpu(pinstance->inq_data->fw_version) <= pinstance 5512 drivers/scsi/pmcraid.c cfgte = &pinstance->cfg_table->entries[i]; pinstance 5515 drivers/scsi/pmcraid.c &pinstance->cfg_table->entries_ext[i]; pinstance 5530 drivers/scsi/pmcraid.c &pinstance->used_res_q); pinstance 5539 drivers/scsi/pmcraid.c if (list_empty(&pinstance->free_res_q)) { pinstance 5545 drivers/scsi/pmcraid.c res = list_entry(pinstance->free_res_q.next, pinstance 5551 drivers/scsi/pmcraid.c list_move_tail(&res->queue, &pinstance->used_res_q); pinstance 5559 drivers/scsi/pmcraid.c pinstance->config_table_entry_size); pinstance 5576 drivers/scsi/pmcraid.c list_move_tail(&res->queue, &pinstance->used_res_q); pinstance 5578 drivers/scsi/pmcraid.c list_move_tail(&res->queue, &pinstance->free_res_q); pinstance 5583 drivers/scsi/pmcraid.c spin_unlock_irqrestore(&pinstance->resource_lock, lock_flags); pinstance 5601 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance = cmd->drv_inst; pinstance 5604 drivers/scsi/pmcraid.c if (be16_to_cpu(pinstance->inq_data->fw_version) <= pinstance 5606 drivers/scsi/pmcraid.c pinstance->config_table_entry_size = pinstance 5609 drivers/scsi/pmcraid.c pinstance->config_table_entry_size = pinstance 5635 drivers/scsi/pmcraid.c ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr); pinstance 5655 drivers/scsi/pmcraid.c struct pmcraid_instance *pinstance; pinstance 5737 drivers/scsi/pmcraid.c pinstance = (struct pmcraid_instance *)host->hostdata; pinstance 5738 drivers/scsi/pmcraid.c memset(pinstance, 0, sizeof(*pinstance)); pinstance 5740 drivers/scsi/pmcraid.c pinstance->chip_cfg = pinstance 5750 drivers/scsi/pmcraid.c pci_set_drvdata(pdev, pinstance); pinstance 5753 drivers/scsi/pmcraid.c rc = pci_save_state(pinstance->pdev); pinstance 5760 drivers/scsi/pmcraid.c pmcraid_disable_interrupts(pinstance, ~0); pinstance 5762 drivers/scsi/pmcraid.c rc = pmcraid_register_interrupt_handler(pinstance); pinstance 5769 drivers/scsi/pmcraid.c pmcraid_init_tasklets(pinstance); pinstance 5772 drivers/scsi/pmcraid.c rc = pmcraid_init_buffers(pinstance); pinstance 5780 drivers/scsi/pmcraid.c pmcraid_reset_type(pinstance); pinstance 5782 drivers/scsi/pmcraid.c pmcraid_enable_interrupts(pinstance, PMCRAID_PCI_INTERRUPTS); pinstance 5788 drivers/scsi/pmcraid.c if (pmcraid_reset_bringup(pinstance)) { pinstance 5795 drivers/scsi/pmcraid.c rc = scsi_add_host(pinstance->host, &pdev->dev); pinstance 5801 drivers/scsi/pmcraid.c scsi_scan_host(pinstance->host); pinstance 5803 drivers/scsi/pmcraid.c rc = pmcraid_setup_chrdev(pinstance); pinstance 5814 drivers/scsi/pmcraid.c atomic_set(&pinstance->expose_resources, 1); pinstance 5815 drivers/scsi/pmcraid.c schedule_work(&pinstance->worker_q); pinstance 5822 drivers/scsi/pmcraid.c pmcraid_release_buffers(pinstance); pinstance 5825 drivers/scsi/pmcraid.c pmcraid_kill_tasklets(pinstance); pinstance 5826 drivers/scsi/pmcraid.c pmcraid_unregister_interrupt_handler(pinstance); pinstance 98 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h extern VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *pinstance);