ctrl_info 415 drivers/crypto/cavium/cpt/cptvf_reqmanager.c union ctrl_info *ctrl = NULL; ctrl_info 431 drivers/crypto/cavium/cpt/cptvf_reqmanager.c ctrl = (union ctrl_info *)&req->ctrl; ctrl_info 62 drivers/crypto/cavium/cpt/request_manager.h union ctrl_info ctrl; /* User control information */ ctrl_info 56 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c #define CMDQ_WQE_COMPLETED(ctrl_info) \ ctrl_info 57 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c HINIC_CMDQ_CTRL_GET(ctrl_info, HW_BUSY_BIT) ctrl_info 209 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c ctrl->ctrl_info = HINIC_CMDQ_CTRL_SET(prod_idx, PI) | ctrl_info 554 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c ctrl->ctrl_info = 0; ctrl_info 572 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c u32 ctrl_info; ctrl_info 576 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c ctrl_info = be32_to_cpu(ctrl->ctrl_info); ctrl_info 579 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c if (!CMDQ_WQE_COMPLETED(ctrl_info)) ctrl_info 624 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c if (!CMDQ_WQE_COMPLETED(be32_to_cpu(ctrl->ctrl_info))) ctrl_info 481 drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c ctrl->ctrl_info = HINIC_SQ_CTRL_SET(bufdesc_size, BUFDESC_SECT_LEN) | ctrl_info 717 drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c u32 ctrl_info; ctrl_info 728 drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c ctrl_info = be32_to_cpu(ctrl->ctrl_info); ctrl_info 729 drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c buf_sect_len = HINIC_SQ_CTRL_GET(ctrl_info, BUFDESC_SECT_LEN); ctrl_info 947 drivers/net/ethernet/huawei/hinic/hinic_hw_qp.c ctrl->ctrl_info = ctrl_info 330 drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h u32 ctrl_info; ctrl_info 389 drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h u32 ctrl_info; ctrl_info 426 drivers/net/ethernet/huawei/hinic/hinic_hw_wqe.h u32 ctrl_info; ctrl_info 171 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Powering off due to button press\n", ctrl_info 175 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s) Powering on due to button press\n", ctrl_info 190 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Button cancel\n", slot_name(ctrl)); ctrl_info 201 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Action canceled due to button press\n", ctrl_info 244 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Link Down\n", ctrl_info 247 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Card not present\n", ctrl_info 273 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Card present\n", ctrl_info 276 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Link Up\n", ctrl_info 293 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Latch open\n", ctrl_info 302 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already enabled\n", ctrl_info 337 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already disabled\n", ctrl_info 382 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already in powering on state\n", ctrl_info 388 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already enabled\n", ctrl_info 416 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already in powering off state\n", ctrl_info 422 drivers/pci/hotplug/pciehp_ctrl.c ctrl_info(ctrl, "Slot(%s): Already disabled\n", ctrl_info 74 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "%s: no response from device\n", ctrl_info 127 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "Timeout on hotplug command %#06x (issued %u msec ago)\n", ctrl_info 152 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "%s: no response from device\n", __func__); ctrl_info 559 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "%s: no response from device\n", __func__); ctrl_info 643 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "Slot(%s): Attention button pressed\n", ctrl_info 897 drivers/pci/hotplug/pciehp_hpc.c ctrl_info(ctrl, "Slot #%d AttnBtn%c PwrCtrl%c MRL%c AttnInd%c PwrInd%c HotPlug%c Surprise%c Interlock%c NoCompl%c LLActRep%c%s\n", ctrl_info 59 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Button pressed on Slot(%s)\n", slot_name(p_slot)); ctrl_info 87 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Latch open on Slot(%s)\n", slot_name(p_slot)); ctrl_info 97 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Latch close on Slot(%s)\n", slot_name(p_slot)); ctrl_info 124 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Card present on Slot(%s)\n", ctrl_info 131 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Card not present on Slot(%s)\n", ctrl_info 155 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Power fault cleared on Slot(%s)\n", ctrl_info 163 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Power fault on Slot(%s)\n", slot_name(p_slot)); ctrl_info 167 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Power fault bit %x set\n", hp_slot); ctrl_info 470 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "PCI slot #%s - powering off due to button press\n", ctrl_info 474 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "PCI slot #%s - powering on due to button press\n", ctrl_info 490 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Button cancel on Slot(%s)\n", ctrl_info 498 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "PCI slot #%s - action canceled due to button press\n", ctrl_info 509 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Button ignore on Slot(%s)\n", ctrl_info 554 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "No adapter on slot(%s)\n", slot_name(p_slot)); ctrl_info 559 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Latch open on slot(%s)\n", slot_name(p_slot)); ctrl_info 564 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Already enabled on slot(%s)\n", ctrl_info 615 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "No adapter on slot(%s)\n", slot_name(p_slot)); ctrl_info 620 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Latch open on slot(%s)\n", slot_name(p_slot)); ctrl_info 625 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Already disabled on slot(%s)\n", ctrl_info 655 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Slot %s is already in powering on state\n", ctrl_info 660 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Already enabled on slot %s\n", ctrl_info 691 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Slot %s is already in powering off state\n", ctrl_info 696 drivers/pci/hotplug/shpchp_ctrl.c ctrl_info(ctrl, "Already disabled on slot %s\n", ctrl_info 287 drivers/pci/hotplug/shpchp_hpc.c ctrl_info(ctrl, "Command was interrupted by a signal\n"); ctrl_info 972 drivers/pci/hotplug/shpchp_hpc.c ctrl_info(ctrl, "HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n", ctrl_info 1046 drivers/pci/hotplug/shpchp_hpc.c ctrl_info(ctrl, "Can't get msi for the hotplug controller\n"); ctrl_info 1047 drivers/pci/hotplug/shpchp_hpc.c ctrl_info(ctrl, "Use INTx for the hotplug controller\n"); ctrl_info 5854 drivers/scsi/megaraid/megaraid_sas_base.c struct megasas_ctrl_info *ctrl_info = NULL; ctrl_info 6239 drivers/scsi/megaraid/megaraid_sas_base.c ctrl_info = instance->ctrl_info_buf; ctrl_info 6241 drivers/scsi/megaraid/megaraid_sas_base.c max_sectors_1 = (1 << ctrl_info->stripe_sz_ops.min) * ctrl_info 6242 drivers/scsi/megaraid/megaraid_sas_base.c le16_to_cpu(ctrl_info->max_strips_per_io); ctrl_info 6243 drivers/scsi/megaraid/megaraid_sas_base.c max_sectors_2 = le32_to_cpu(ctrl_info->max_request_size); ctrl_info 6247 drivers/scsi/megaraid/megaraid_sas_base.c instance->peerIsPresent = ctrl_info->cluster.peerIsPresent; ctrl_info 6248 drivers/scsi/megaraid/megaraid_sas_base.c instance->passive = ctrl_info->cluster.passive; ctrl_info 6249 drivers/scsi/megaraid/megaraid_sas_base.c memcpy(instance->clusterId, ctrl_info->clusterId, sizeof(instance->clusterId)); ctrl_info 6251 drivers/scsi/megaraid/megaraid_sas_base.c ctrl_info->adapterOperations2.supportUnevenSpans; ctrl_info 6260 drivers/scsi/megaraid/megaraid_sas_base.c if (ctrl_info->host_interface.SRIOV) { ctrl_info 6261 drivers/scsi/megaraid/megaraid_sas_base.c instance->requestorId = ctrl_info->iov.requestorId; ctrl_info 6263 drivers/scsi/megaraid/megaraid_sas_base.c if (!ctrl_info->adapterOperations2.activePassive) ctrl_info 6271 drivers/scsi/megaraid/megaraid_sas_base.c ((unsigned char *)ctrl_info + IOV_111_OFFSET); ctrl_info 6280 drivers/scsi/megaraid/megaraid_sas_base.c ctrl_info->adapterOperations3.supportCrashDump; ctrl_info 6305 drivers/scsi/megaraid/megaraid_sas_base.c le16_to_cpu(ctrl_info->pci.vendor_id), ctrl_info 6306 drivers/scsi/megaraid/megaraid_sas_base.c le16_to_cpu(ctrl_info->pci.device_id), ctrl_info 6307 drivers/scsi/megaraid/megaraid_sas_base.c le16_to_cpu(ctrl_info->pci.sub_vendor_id), ctrl_info 6308 drivers/scsi/megaraid/megaraid_sas_base.c le16_to_cpu(ctrl_info->pci.sub_device_id)); ctrl_info 669 drivers/scsi/smartpqi/smartpqi.h struct pqi_ctrl_info *ctrl_info; /* backpointer */ ctrl_info 1407 drivers/scsi/smartpqi/smartpqi.h static inline bool pqi_ctrl_offline(struct pqi_ctrl_info *ctrl_info) ctrl_info 1409 drivers/scsi/smartpqi/smartpqi.h return !ctrl_info->controller_online; ctrl_info 1412 drivers/scsi/smartpqi/smartpqi.h static inline void pqi_ctrl_busy(struct pqi_ctrl_info *ctrl_info) ctrl_info 1414 drivers/scsi/smartpqi/smartpqi.h atomic_inc(&ctrl_info->num_busy_threads); ctrl_info 1417 drivers/scsi/smartpqi/smartpqi.h static inline void pqi_ctrl_unbusy(struct pqi_ctrl_info *ctrl_info) ctrl_info 1419 drivers/scsi/smartpqi/smartpqi.h atomic_dec(&ctrl_info->num_busy_threads); ctrl_info 1422 drivers/scsi/smartpqi/smartpqi.h static inline bool pqi_ctrl_blocked(struct pqi_ctrl_info *ctrl_info) ctrl_info 1424 drivers/scsi/smartpqi/smartpqi.h return ctrl_info->block_requests; ctrl_info 1427 drivers/scsi/smartpqi/smartpqi.h static inline bool pqi_device_reset_blocked(struct pqi_ctrl_info *ctrl_info) ctrl_info 1429 drivers/scsi/smartpqi/smartpqi.h return ctrl_info->block_device_reset; ctrl_info 1435 drivers/scsi/smartpqi/smartpqi.h int pqi_add_sas_host(struct Scsi_Host *shost, struct pqi_ctrl_info *ctrl_info); ctrl_info 1436 drivers/scsi/smartpqi/smartpqi.h void pqi_delete_sas_host(struct pqi_ctrl_info *ctrl_info); ctrl_info 1441 drivers/scsi/smartpqi/smartpqi.h struct pqi_ctrl_info *ctrl_info, struct sas_rphy *rphy); ctrl_info 1443 drivers/scsi/smartpqi/smartpqi.h int pqi_csmi_smp_passthru(struct pqi_ctrl_info *ctrl_info, ctrl_info 55 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info); ctrl_info 57 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_retry_raid_bypass_requests(struct pqi_ctrl_info *ctrl_info); ctrl_info 58 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_scan_scsi_devices(struct pqi_ctrl_info *ctrl_info); ctrl_info 60 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_start_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 63 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_submit_raid_request_synchronous(struct pqi_ctrl_info *ctrl_info, ctrl_info 66 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_aio_submit_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 70 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_ctrl_quiesce(struct pqi_ctrl_info *ctrl_info); ctrl_info 71 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_ctrl_unquiesce(struct pqi_ctrl_info *ctrl_info); ctrl_info 72 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_ctrl_restart(struct pqi_ctrl_info *ctrl_info); ctrl_info 73 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_setup_host_buffer(struct pqi_ctrl_info *ctrl_info, ctrl_info 75 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_free_host_buffer(struct pqi_ctrl_info *ctrl_info); ctrl_info 76 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_host_memory_update(struct pqi_ctrl_info *ctrl_info); ctrl_info 77 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_device_wait_for_pending_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 214 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_check_ctrl_health(struct pqi_ctrl_info *ctrl_info) ctrl_info 216 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->controller_online) ctrl_info 217 drivers/scsi/smartpqi/smartpqi_init.c if (!sis_is_firmware_running(ctrl_info)) ctrl_info 218 drivers/scsi/smartpqi/smartpqi_init.c pqi_take_ctrl_offline(ctrl_info); ctrl_info 227 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 229 drivers/scsi/smartpqi/smartpqi_init.c return sis_read_driver_scratch(ctrl_info); ctrl_info 232 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_save_ctrl_mode(struct pqi_ctrl_info *ctrl_info, ctrl_info 235 drivers/scsi/smartpqi/smartpqi_init.c sis_write_driver_scratch(ctrl_info, mode); ctrl_info 238 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_block_requests(struct pqi_ctrl_info *ctrl_info) ctrl_info 240 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->block_requests = true; ctrl_info 241 drivers/scsi/smartpqi/smartpqi_init.c scsi_block_requests(ctrl_info->scsi_host); ctrl_info 244 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_unblock_requests(struct pqi_ctrl_info *ctrl_info) ctrl_info 246 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->block_requests = false; ctrl_info 247 drivers/scsi/smartpqi/smartpqi_init.c wake_up_all(&ctrl_info->block_requests_wait); ctrl_info 248 drivers/scsi/smartpqi/smartpqi_init.c pqi_retry_raid_bypass_requests(ctrl_info); ctrl_info 249 drivers/scsi/smartpqi/smartpqi_init.c scsi_unblock_requests(ctrl_info->scsi_host); ctrl_info 252 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_block_device_reset(struct pqi_ctrl_info *ctrl_info) ctrl_info 254 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->block_device_reset = true; ctrl_info 257 drivers/scsi/smartpqi/smartpqi_init.c static unsigned long pqi_wait_if_ctrl_blocked(struct pqi_ctrl_info *ctrl_info, ctrl_info 262 drivers/scsi/smartpqi/smartpqi_init.c if (!pqi_ctrl_blocked(ctrl_info)) ctrl_info 265 drivers/scsi/smartpqi/smartpqi_init.c atomic_inc(&ctrl_info->num_blocked_threads); ctrl_info 268 drivers/scsi/smartpqi/smartpqi_init.c wait_event(ctrl_info->block_requests_wait, ctrl_info 269 drivers/scsi/smartpqi/smartpqi_init.c !pqi_ctrl_blocked(ctrl_info)); ctrl_info 275 drivers/scsi/smartpqi/smartpqi_init.c wait_event_timeout(ctrl_info->block_requests_wait, ctrl_info 276 drivers/scsi/smartpqi/smartpqi_init.c !pqi_ctrl_blocked(ctrl_info), ctrl_info 281 drivers/scsi/smartpqi/smartpqi_init.c atomic_dec(&ctrl_info->num_blocked_threads); ctrl_info 286 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_wait_until_quiesced(struct pqi_ctrl_info *ctrl_info) ctrl_info 288 drivers/scsi/smartpqi/smartpqi_init.c while (atomic_read(&ctrl_info->num_busy_threads) > ctrl_info 289 drivers/scsi/smartpqi/smartpqi_init.c atomic_read(&ctrl_info->num_blocked_threads)) ctrl_info 313 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_ofa_start(struct pqi_ctrl_info *ctrl_info) ctrl_info 315 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->in_ofa = true; ctrl_info 318 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_ofa_done(struct pqi_ctrl_info *ctrl_info) ctrl_info 320 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->in_ofa = false; ctrl_info 323 drivers/scsi/smartpqi/smartpqi_init.c static inline bool pqi_ctrl_in_ofa(struct pqi_ctrl_info *ctrl_info) ctrl_info 325 drivers/scsi/smartpqi/smartpqi_init.c return ctrl_info->in_ofa; ctrl_info 333 drivers/scsi/smartpqi/smartpqi_init.c static inline bool pqi_device_in_remove(struct pqi_ctrl_info *ctrl_info, ctrl_info 336 drivers/scsi/smartpqi/smartpqi_init.c return device->in_remove && !ctrl_info->in_shutdown; ctrl_info 339 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_ctrl_shutdown_start(struct pqi_ctrl_info *ctrl_info) ctrl_info 341 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->in_shutdown = true; ctrl_info 344 drivers/scsi/smartpqi/smartpqi_init.c static inline bool pqi_ctrl_in_shutdown(struct pqi_ctrl_info *ctrl_info) ctrl_info 346 drivers/scsi/smartpqi/smartpqi_init.c return ctrl_info->in_shutdown; ctrl_info 350 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info, unsigned long delay) ctrl_info 352 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 354 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_in_ofa(ctrl_info)) ctrl_info 357 drivers/scsi/smartpqi/smartpqi_init.c schedule_delayed_work(&ctrl_info->rescan_work, delay); ctrl_info 360 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_schedule_rescan_worker(struct pqi_ctrl_info *ctrl_info) ctrl_info 362 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker_with_delay(ctrl_info, 0); ctrl_info 368 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 370 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker_with_delay(ctrl_info, PQI_RESCAN_WORK_DELAY); ctrl_info 373 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_cancel_rescan_worker(struct pqi_ctrl_info *ctrl_info) ctrl_info 375 drivers/scsi/smartpqi/smartpqi_init.c cancel_delayed_work_sync(&ctrl_info->rescan_work); ctrl_info 378 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_cancel_event_worker(struct pqi_ctrl_info *ctrl_info) ctrl_info 380 drivers/scsi/smartpqi/smartpqi_init.c cancel_work_sync(&ctrl_info->event_work); ctrl_info 383 drivers/scsi/smartpqi/smartpqi_init.c static inline u32 pqi_read_heartbeat_counter(struct pqi_ctrl_info *ctrl_info) ctrl_info 385 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->heartbeat_counter) ctrl_info 388 drivers/scsi/smartpqi/smartpqi_init.c return readl(ctrl_info->heartbeat_counter); ctrl_info 391 drivers/scsi/smartpqi/smartpqi_init.c static inline u8 pqi_read_soft_reset_status(struct pqi_ctrl_info *ctrl_info) ctrl_info 393 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->soft_reset_status) ctrl_info 396 drivers/scsi/smartpqi/smartpqi_init.c return readb(ctrl_info->soft_reset_status); ctrl_info 399 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_clear_soft_reset_status(struct pqi_ctrl_info *ctrl_info, ctrl_info 404 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->soft_reset_status) ctrl_info 407 drivers/scsi/smartpqi/smartpqi_init.c status = pqi_read_soft_reset_status(ctrl_info); ctrl_info 409 drivers/scsi/smartpqi/smartpqi_init.c writeb(status, ctrl_info->soft_reset_status); ctrl_info 449 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_build_raid_path_request(struct pqi_ctrl_info *ctrl_info, ctrl_info 530 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, "unknown command 0x%c\n", ctrl_info 550 drivers/scsi/smartpqi/smartpqi_init.c return pqi_map_single(ctrl_info->pci_dev, &request->sg_descriptors[0], ctrl_info 563 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 566 drivers/scsi/smartpqi/smartpqi_init.c u16 i = ctrl_info->next_io_request_slot; /* benignly racy */ ctrl_info 569 drivers/scsi/smartpqi/smartpqi_init.c io_request = &ctrl_info->io_request_pool[i]; ctrl_info 573 drivers/scsi/smartpqi/smartpqi_init.c i = (i + 1) % ctrl_info->max_io_slots; ctrl_info 577 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->next_io_request_slot = (i + 1) % ctrl_info->max_io_slots; ctrl_info 589 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_send_scsi_raid_request(struct pqi_ctrl_info *ctrl_info, u8 cmd, ctrl_info 598 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_build_raid_path_request(ctrl_info, &request, ctrl_info 604 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 607 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, request.sg_descriptors, 1, dir); ctrl_info 613 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_send_ctrl_raid_request(struct pqi_ctrl_info *ctrl_info, ctrl_info 616 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_scsi_raid_request(ctrl_info, cmd, RAID_CTLR_LUNID, ctrl_info 620 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_send_ctrl_raid_with_error(struct pqi_ctrl_info *ctrl_info, ctrl_info 624 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_scsi_raid_request(ctrl_info, cmd, RAID_CTLR_LUNID, ctrl_info 629 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_identify_controller(struct pqi_ctrl_info *ctrl_info, ctrl_info 632 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_ctrl_raid_request(ctrl_info, BMIC_IDENTIFY_CONTROLLER, ctrl_info 636 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_sense_subsystem_info(struct pqi_ctrl_info *ctrl_info, ctrl_info 639 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_ctrl_raid_request(ctrl_info, ctrl_info 644 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_scsi_inquiry(struct pqi_ctrl_info *ctrl_info, ctrl_info 647 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_scsi_raid_request(ctrl_info, INQUIRY, scsi3addr, ctrl_info 651 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_identify_physical_device(struct pqi_ctrl_info *ctrl_info, ctrl_info 661 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_build_raid_path_request(ctrl_info, &request, ctrl_info 671 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 674 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, request.sg_descriptors, 1, dir); ctrl_info 678 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_flush_cache(struct pqi_ctrl_info *ctrl_info, ctrl_info 688 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 697 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_send_ctrl_raid_request(ctrl_info, SA_FLUSH_CACHE, flush_cache, ctrl_info 705 drivers/scsi/smartpqi/smartpqi_init.c int pqi_csmi_smp_passthru(struct pqi_ctrl_info *ctrl_info, ctrl_info 709 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_ctrl_raid_with_error(ctrl_info, BMIC_CSMI_PASSTHRU, ctrl_info 715 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_set_diag_rescan(struct pqi_ctrl_info *ctrl_info) ctrl_info 724 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_send_ctrl_raid_request(ctrl_info, BMIC_SENSE_DIAG_OPTIONS, ctrl_info 731 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_send_ctrl_raid_request(ctrl_info, BMIC_SET_DIAG_OPTIONS, ctrl_info 739 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_write_host_wellness(struct pqi_ctrl_info *ctrl_info, ctrl_info 742 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_ctrl_raid_request(ctrl_info, BMIC_WRITE_HOST_WELLNESS, ctrl_info 760 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 788 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_write_host_wellness(ctrl_info, buffer, buffer_length); ctrl_info 809 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 851 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_write_host_wellness(ctrl_info, buffer, buffer_length); ctrl_info 863 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 865 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = container_of(to_delayed_work(work), struct pqi_ctrl_info, ctrl_info 868 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 871 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_write_current_time_to_host_wellness(ctrl_info); ctrl_info 873 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 876 drivers/scsi/smartpqi/smartpqi_init.c schedule_delayed_work(&ctrl_info->update_time_work, ctrl_info 881 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 883 drivers/scsi/smartpqi/smartpqi_init.c schedule_delayed_work(&ctrl_info->update_time_work, 0); ctrl_info 887 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 889 drivers/scsi/smartpqi/smartpqi_init.c cancel_delayed_work_sync(&ctrl_info->update_time_work); ctrl_info 892 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_report_luns(struct pqi_ctrl_info *ctrl_info, u8 cmd, ctrl_info 895 drivers/scsi/smartpqi/smartpqi_init.c return pqi_send_ctrl_raid_request(ctrl_info, cmd, buffer, ctrl_info 899 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_report_phys_logical_luns(struct pqi_ctrl_info *ctrl_info, u8 cmd, ctrl_info 915 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_report_luns(ctrl_info, cmd, report_lun_header, ctrl_info 936 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_report_luns(ctrl_info, cmd, lun_data, lun_data_length); ctrl_info 962 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_report_phys_luns(struct pqi_ctrl_info *ctrl_info, ctrl_info 965 drivers/scsi/smartpqi/smartpqi_init.c return pqi_report_phys_logical_luns(ctrl_info, CISS_REPORT_PHYS, ctrl_info 969 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_report_logical_luns(struct pqi_ctrl_info *ctrl_info, ctrl_info 972 drivers/scsi/smartpqi/smartpqi_init.c return pqi_report_phys_logical_luns(ctrl_info, CISS_REPORT_LOG, buffer); ctrl_info 975 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_get_device_lists(struct pqi_ctrl_info *ctrl_info, ctrl_info 986 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_report_phys_luns(ctrl_info, (void **)physdev_list); ctrl_info 988 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 991 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_report_logical_luns(ctrl_info, (void **)logdev_list); ctrl_info 993 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 1084 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_get_raid_level(struct pqi_ctrl_info *ctrl_info, ctrl_info 1095 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_scsi_inquiry(ctrl_info, device->scsi3addr, ctrl_info 1108 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_validate_raid_map(struct pqi_ctrl_info *ctrl_info, ctrl_info 1148 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 1156 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info, ctrl_info 1167 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_send_scsi_raid_request(ctrl_info, CISS_GET_RAID_MAP, ctrl_info 1184 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_send_scsi_raid_request(ctrl_info, CISS_GET_RAID_MAP, ctrl_info 1192 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 1200 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_validate_raid_map(ctrl_info, device, raid_map); ctrl_info 1214 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_get_raid_bypass_status(struct pqi_ctrl_info *ctrl_info, ctrl_info 1225 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_scsi_inquiry(ctrl_info, device->scsi3addr, ctrl_info 1239 drivers/scsi/smartpqi/smartpqi_init.c pqi_get_raid_map(ctrl_info, device) == 0) ctrl_info 1250 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_get_volume_status(struct pqi_ctrl_info *ctrl_info, ctrl_info 1264 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_scsi_inquiry(ctrl_info, device->scsi3addr, ctrl_info 1290 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_get_device_info(struct pqi_ctrl_info *ctrl_info, ctrl_info 1306 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_scsi_inquiry(ctrl_info, device->scsi3addr, 0, ctrl_info 1329 drivers/scsi/smartpqi/smartpqi_init.c pqi_get_raid_level(ctrl_info, device); ctrl_info 1330 drivers/scsi/smartpqi/smartpqi_init.c pqi_get_raid_bypass_status(ctrl_info, device); ctrl_info 1331 drivers/scsi/smartpqi/smartpqi_init.c pqi_get_volume_status(ctrl_info, device); ctrl_info 1341 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_get_physical_disk_info(struct pqi_ctrl_info *ctrl_info, ctrl_info 1349 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_identify_physical_device(ctrl_info, device, ctrl_info 1372 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_show_volume_status(struct pqi_ctrl_info *ctrl_info, ctrl_info 1469 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 1471 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host->host_no, ctrl_info 1477 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 1479 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = container_of(to_delayed_work(work), struct pqi_ctrl_info, ctrl_info 1482 drivers/scsi/smartpqi/smartpqi_init.c pqi_scan_scsi_devices(ctrl_info); ctrl_info 1485 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_add_device(struct pqi_ctrl_info *ctrl_info, ctrl_info 1491 drivers/scsi/smartpqi/smartpqi_init.c rc = scsi_add_device(ctrl_info->scsi_host, device->bus, ctrl_info 1494 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_add_sas_device(ctrl_info->sas_host, device); ctrl_info 1501 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_remove_device(struct pqi_ctrl_info *ctrl_info, ctrl_info 1508 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_device_wait_for_pending_io(ctrl_info, device, ctrl_info 1511 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 1513 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host->host_no, device->bus, ctrl_info 1525 drivers/scsi/smartpqi/smartpqi_init.c static struct pqi_scsi_dev *pqi_find_scsi_dev(struct pqi_ctrl_info *ctrl_info, ctrl_info 1530 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 1558 drivers/scsi/smartpqi/smartpqi_init.c static enum pqi_find_result pqi_scsi_find_entry(struct pqi_ctrl_info *ctrl_info, ctrl_info 1564 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 1591 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_dev_info(struct pqi_ctrl_info *ctrl_info, ctrl_info 1598 drivers/scsi/smartpqi/smartpqi_init.c "%d:%d:", ctrl_info->scsi_host->host_no, device->bus); ctrl_info 1647 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, "%s %s\n", action, buffer); ctrl_info 1718 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_fixup_botched_add(struct pqi_ctrl_info *ctrl_info, ctrl_info 1723 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 1725 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 1739 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_update_device_list(struct pqi_ctrl_info *ctrl_info, ctrl_info 1759 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 1762 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 1769 drivers/scsi/smartpqi/smartpqi_init.c find_result = pqi_scsi_find_entry(ctrl_info, device, ctrl_info 1800 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry_safe(device, next, &ctrl_info->scsi_device_list, ctrl_info 1816 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->scsi_device_list); ctrl_info 1822 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 1824 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_in_ofa(ctrl_info)) ctrl_info 1825 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_ofa_done(ctrl_info); ctrl_info 1831 drivers/scsi/smartpqi/smartpqi_init.c pqi_dev_info(ctrl_info, "offline", device); ctrl_info 1832 drivers/scsi/smartpqi/smartpqi_init.c pqi_show_volume_status(ctrl_info, device); ctrl_info 1834 drivers/scsi/smartpqi/smartpqi_init.c pqi_dev_info(ctrl_info, "removed", device); ctrl_info 1837 drivers/scsi/smartpqi/smartpqi_init.c pqi_remove_device(ctrl_info, device); ctrl_info 1846 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 1859 drivers/scsi/smartpqi/smartpqi_init.c pqi_dev_info(ctrl_info, "added", device); ctrl_info 1860 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_add_device(ctrl_info, device); ctrl_info 1862 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 1864 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host->host_no, ctrl_info 1867 drivers/scsi/smartpqi/smartpqi_init.c pqi_fixup_botched_add(ctrl_info, device); ctrl_info 1943 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_update_scsi_devices(struct pqi_ctrl_info *ctrl_info) ctrl_info 1967 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_get_device_lists(ctrl_info, &physdev_list, &logdev_list); ctrl_info 1994 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, "%s\n", ctrl_info 2022 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, "%s\n", out_of_memory_msg); ctrl_info 2030 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, "%s\n", ctrl_info 2082 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_get_device_info(ctrl_info, device); ctrl_info 2084 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, "%s\n", ctrl_info 2090 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 2095 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 2118 drivers/scsi/smartpqi/smartpqi_init.c pqi_get_physical_disk_info(ctrl_info, ctrl_info 2132 drivers/scsi/smartpqi/smartpqi_init.c pqi_update_device_list(ctrl_info, new_device_list, num_valid_devices); ctrl_info 2151 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_remove_all_scsi_devices(struct pqi_ctrl_info *ctrl_info) ctrl_info 2157 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 2159 drivers/scsi/smartpqi/smartpqi_init.c device = list_first_entry_or_null(&ctrl_info->scsi_device_list, ctrl_info 2164 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 2171 drivers/scsi/smartpqi/smartpqi_init.c pqi_remove_device(ctrl_info, device); ctrl_info 2176 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_scan_scsi_devices(struct pqi_ctrl_info *ctrl_info) ctrl_info 2180 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 2183 drivers/scsi/smartpqi/smartpqi_init.c if (!mutex_trylock(&ctrl_info->scan_mutex)) { ctrl_info 2184 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker_delayed(ctrl_info); ctrl_info 2187 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_update_scsi_devices(ctrl_info); ctrl_info 2189 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker_delayed(ctrl_info); ctrl_info 2190 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->scan_mutex); ctrl_info 2198 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 2200 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 2201 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_in_ofa(ctrl_info)) ctrl_info 2204 drivers/scsi/smartpqi/smartpqi_init.c pqi_scan_scsi_devices(ctrl_info); ctrl_info 2212 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 2214 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_priv(shost); ctrl_info 2216 drivers/scsi/smartpqi/smartpqi_init.c return !mutex_is_locked(&ctrl_info->scan_mutex); ctrl_info 2219 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_wait_until_scan_finished(struct pqi_ctrl_info *ctrl_info) ctrl_info 2221 drivers/scsi/smartpqi/smartpqi_init.c mutex_lock(&ctrl_info->scan_mutex); ctrl_info 2222 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->scan_mutex); ctrl_info 2225 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_wait_until_lun_reset_finished(struct pqi_ctrl_info *ctrl_info) ctrl_info 2227 drivers/scsi/smartpqi/smartpqi_init.c mutex_lock(&ctrl_info->lun_reset_mutex); ctrl_info 2228 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->lun_reset_mutex); ctrl_info 2231 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_wait_until_ofa_finished(struct pqi_ctrl_info *ctrl_info) ctrl_info 2233 drivers/scsi/smartpqi/smartpqi_init.c mutex_lock(&ctrl_info->ofa_mutex); ctrl_info 2234 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->ofa_mutex); ctrl_info 2264 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_raid_bypass_submit_scsi_cmd(struct pqi_ctrl_info *ctrl_info, ctrl_info 2587 drivers/scsi/smartpqi/smartpqi_init.c return pqi_aio_submit_io(ctrl_info, scmd, aio_handle, ctrl_info 2605 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_for_pqi_mode_ready(struct pqi_ctrl_info *ctrl_info) ctrl_info 2612 drivers/scsi/smartpqi/smartpqi_init.c pqi_registers = ctrl_info->pqi_registers; ctrl_info 2621 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 2633 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 2645 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 2666 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 2674 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 2675 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker(ctrl_info); ctrl_info 2676 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, "re-scanning %s scsi %d:%d:%d:%d\n", ctrl_info 2677 drivers/scsi/smartpqi/smartpqi_init.c path, ctrl_info->scsi_host->host_no, device->bus, ctrl_info 2752 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host); ctrl_info 2759 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun); ctrl_info 2767 drivers/scsi/smartpqi/smartpqi_init.c sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun); ctrl_info 2906 drivers/scsi/smartpqi/smartpqi_init.c static unsigned int pqi_process_io_intr(struct pqi_ctrl_info *ctrl_info, ctrl_info 2929 drivers/scsi/smartpqi/smartpqi_init.c WARN_ON(request_id >= ctrl_info->max_io_slots); ctrl_info 2931 drivers/scsi/smartpqi/smartpqi_init.c io_request = &ctrl_info->io_request_pool[request_id]; ctrl_info 2959 drivers/scsi/smartpqi/smartpqi_init.c io_request->error_info = ctrl_info->error_buffer + ctrl_info 2966 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 2980 drivers/scsi/smartpqi/smartpqi_init.c oq_ci = (oq_ci + 1) % ctrl_info->num_elements_per_oq; ctrl_info 3004 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_send_event_ack(struct pqi_ctrl_info *ctrl_info, ctrl_info 3013 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[PQI_DEFAULT_QUEUE_GROUP]; ctrl_info 3023 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq)) ctrl_info 3029 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 3038 drivers/scsi/smartpqi/smartpqi_init.c iq_pi = (iq_pi + 1) % ctrl_info->num_elements_per_iq; ctrl_info 3050 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_acknowledge_event(struct pqi_ctrl_info *ctrl_info, ctrl_info 3064 drivers/scsi/smartpqi/smartpqi_init.c pqi_send_event_ack(ctrl_info, &request, sizeof(request)); ctrl_info 3071 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 3079 drivers/scsi/smartpqi/smartpqi_init.c status = pqi_read_soft_reset_status(ctrl_info); ctrl_info 3087 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 3092 drivers/scsi/smartpqi/smartpqi_init.c if (!sis_is_firmware_running(ctrl_info)) ctrl_info 3099 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_process_soft_reset(struct pqi_ctrl_info *ctrl_info, ctrl_info 3108 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 3109 drivers/scsi/smartpqi/smartpqi_init.c "resetting controller %u\n", ctrl_info->ctrl_id); ctrl_info 3110 drivers/scsi/smartpqi/smartpqi_init.c sis_soft_reset(ctrl_info); ctrl_info 3113 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_ofa_ctrl_restart(ctrl_info); ctrl_info 3114 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_free_host_buffer(ctrl_info); ctrl_info 3115 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 3117 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id, rc == 0 ? "SUCCESS" : "FAILED"); ctrl_info 3120 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_ctrl_unquiesce(ctrl_info); ctrl_info 3121 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 3123 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id, "ABORTED"); ctrl_info 3126 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_free_host_buffer(ctrl_info); ctrl_info 3127 drivers/scsi/smartpqi/smartpqi_init.c pqi_take_ctrl_offline(ctrl_info); ctrl_info 3132 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_process_event(struct pqi_ctrl_info *ctrl_info, ctrl_info 3140 drivers/scsi/smartpqi/smartpqi_init.c mutex_lock(&ctrl_info->ofa_mutex); ctrl_info 3143 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 3145 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id); ctrl_info 3146 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_ctrl_quiesce(ctrl_info); ctrl_info 3147 drivers/scsi/smartpqi/smartpqi_init.c pqi_acknowledge_event(ctrl_info, event); ctrl_info 3148 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->soft_reset_handshake_supported) { ctrl_info 3149 drivers/scsi/smartpqi/smartpqi_init.c status = pqi_poll_for_soft_reset_status(ctrl_info); ctrl_info 3150 drivers/scsi/smartpqi/smartpqi_init.c pqi_process_soft_reset(ctrl_info, status); ctrl_info 3152 drivers/scsi/smartpqi/smartpqi_init.c pqi_process_soft_reset(ctrl_info, ctrl_info 3157 drivers/scsi/smartpqi/smartpqi_init.c pqi_acknowledge_event(ctrl_info, event); ctrl_info 3158 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_setup_host_buffer(ctrl_info, ctrl_info 3160 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_host_memory_update(ctrl_info); ctrl_info 3162 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_free_host_buffer(ctrl_info); ctrl_info 3163 drivers/scsi/smartpqi/smartpqi_init.c pqi_acknowledge_event(ctrl_info, event); ctrl_info 3164 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 3166 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id, event->ofa_cancel_reason); ctrl_info 3169 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->ofa_mutex); ctrl_info 3175 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 3178 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = container_of(work, struct pqi_ctrl_info, event_work); ctrl_info 3180 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_busy(ctrl_info); ctrl_info 3181 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_if_ctrl_blocked(ctrl_info, NO_TIMEOUT); ctrl_info 3182 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 3185 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_rescan_worker_delayed(ctrl_info); ctrl_info 3187 drivers/scsi/smartpqi/smartpqi_init.c event = ctrl_info->events; ctrl_info 3192 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 3193 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_process_event(ctrl_info, event); ctrl_info 3196 drivers/scsi/smartpqi/smartpqi_init.c pqi_acknowledge_event(ctrl_info, event); ctrl_info 3202 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 3211 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info = from_timer(ctrl_info, t, ctrl_info 3214 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 3215 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 3218 drivers/scsi/smartpqi/smartpqi_init.c num_interrupts = atomic_read(&ctrl_info->num_interrupts); ctrl_info 3219 drivers/scsi/smartpqi/smartpqi_init.c heartbeat_count = pqi_read_heartbeat_counter(ctrl_info); ctrl_info 3221 drivers/scsi/smartpqi/smartpqi_init.c if (num_interrupts == ctrl_info->previous_num_interrupts) { ctrl_info 3222 drivers/scsi/smartpqi/smartpqi_init.c if (heartbeat_count == ctrl_info->previous_heartbeat_count) { ctrl_info 3223 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 3226 drivers/scsi/smartpqi/smartpqi_init.c pqi_take_ctrl_offline(ctrl_info); ctrl_info 3230 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->previous_num_interrupts = num_interrupts; ctrl_info 3233 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->previous_heartbeat_count = heartbeat_count; ctrl_info 3234 drivers/scsi/smartpqi/smartpqi_init.c mod_timer(&ctrl_info->heartbeat_timer, ctrl_info 3238 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_start_heartbeat_timer(struct pqi_ctrl_info *ctrl_info) ctrl_info 3240 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->heartbeat_counter) ctrl_info 3243 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->previous_num_interrupts = ctrl_info 3244 drivers/scsi/smartpqi/smartpqi_init.c atomic_read(&ctrl_info->num_interrupts); ctrl_info 3245 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->previous_heartbeat_count = ctrl_info 3246 drivers/scsi/smartpqi/smartpqi_init.c pqi_read_heartbeat_counter(ctrl_info); ctrl_info 3248 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->heartbeat_timer.expires = ctrl_info 3250 drivers/scsi/smartpqi/smartpqi_init.c add_timer(&ctrl_info->heartbeat_timer); ctrl_info 3253 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_stop_heartbeat_timer(struct pqi_ctrl_info *ctrl_info) ctrl_info 3255 drivers/scsi/smartpqi/smartpqi_init.c del_timer_sync(&ctrl_info->heartbeat_timer); ctrl_info 3292 drivers/scsi/smartpqi/smartpqi_init.c static unsigned int pqi_process_event_intr(struct pqi_ctrl_info *ctrl_info) ctrl_info 3302 drivers/scsi/smartpqi/smartpqi_init.c event_queue = &ctrl_info->event_queue; ctrl_info 3320 drivers/scsi/smartpqi/smartpqi_init.c event = &ctrl_info->events[event_index]; ctrl_info 3336 drivers/scsi/smartpqi/smartpqi_init.c schedule_work(&ctrl_info->event_work); ctrl_info 3344 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_configure_legacy_intx(struct pqi_ctrl_info *ctrl_info, ctrl_info 3351 drivers/scsi/smartpqi/smartpqi_init.c pqi_registers = ctrl_info->pqi_registers; ctrl_info 3363 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_change_irq_mode(struct pqi_ctrl_info *ctrl_info, ctrl_info 3366 drivers/scsi/smartpqi/smartpqi_init.c switch (ctrl_info->irq_mode) { ctrl_info 3372 drivers/scsi/smartpqi/smartpqi_init.c pqi_configure_legacy_intx(ctrl_info, true); ctrl_info 3373 drivers/scsi/smartpqi/smartpqi_init.c sis_enable_intx(ctrl_info); ctrl_info 3382 drivers/scsi/smartpqi/smartpqi_init.c pqi_configure_legacy_intx(ctrl_info, false); ctrl_info 3383 drivers/scsi/smartpqi/smartpqi_init.c sis_enable_msix(ctrl_info); ctrl_info 3388 drivers/scsi/smartpqi/smartpqi_init.c pqi_configure_legacy_intx(ctrl_info, false); ctrl_info 3395 drivers/scsi/smartpqi/smartpqi_init.c sis_enable_msix(ctrl_info); ctrl_info 3398 drivers/scsi/smartpqi/smartpqi_init.c pqi_configure_legacy_intx(ctrl_info, true); ctrl_info 3399 drivers/scsi/smartpqi/smartpqi_init.c sis_enable_intx(ctrl_info); ctrl_info 3407 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->irq_mode = new_mode; ctrl_info 3412 drivers/scsi/smartpqi/smartpqi_init.c static inline bool pqi_is_valid_irq(struct pqi_ctrl_info *ctrl_info) ctrl_info 3417 drivers/scsi/smartpqi/smartpqi_init.c switch (ctrl_info->irq_mode) { ctrl_info 3423 drivers/scsi/smartpqi/smartpqi_init.c readl(&ctrl_info->pqi_registers->legacy_intx_status); ctrl_info 3440 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 3445 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = queue_group->ctrl_info; ctrl_info 3447 drivers/scsi/smartpqi/smartpqi_init.c if (!pqi_is_valid_irq(ctrl_info)) ctrl_info 3450 drivers/scsi/smartpqi/smartpqi_init.c num_responses_handled = pqi_process_io_intr(ctrl_info, queue_group); ctrl_info 3452 drivers/scsi/smartpqi/smartpqi_init.c if (irq == ctrl_info->event_irq) ctrl_info 3453 drivers/scsi/smartpqi/smartpqi_init.c num_responses_handled += pqi_process_event_intr(ctrl_info); ctrl_info 3456 drivers/scsi/smartpqi/smartpqi_init.c atomic_inc(&ctrl_info->num_interrupts); ctrl_info 3458 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, queue_group, RAID_PATH, NULL); ctrl_info 3459 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, queue_group, AIO_PATH, NULL); ctrl_info 3464 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_request_irqs(struct pqi_ctrl_info *ctrl_info) ctrl_info 3466 drivers/scsi/smartpqi/smartpqi_init.c struct pci_dev *pci_dev = ctrl_info->pci_dev; ctrl_info 3470 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_irq = pci_irq_vector(pci_dev, 0); ctrl_info 3472 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_msix_vectors_enabled; i++) { ctrl_info 3474 drivers/scsi/smartpqi/smartpqi_init.c DRIVER_NAME_SHORT, &ctrl_info->queue_groups[i]); ctrl_info 3481 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_msix_vectors_initialized++; ctrl_info 3487 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_free_irqs(struct pqi_ctrl_info *ctrl_info) ctrl_info 3491 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_msix_vectors_initialized; i++) ctrl_info 3492 drivers/scsi/smartpqi/smartpqi_init.c free_irq(pci_irq_vector(ctrl_info->pci_dev, i), ctrl_info 3493 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->queue_groups[i]); ctrl_info 3495 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_msix_vectors_initialized = 0; ctrl_info 3498 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_enable_msix_interrupts(struct pqi_ctrl_info *ctrl_info) ctrl_info 3502 drivers/scsi/smartpqi/smartpqi_init.c num_vectors_enabled = pci_alloc_irq_vectors(ctrl_info->pci_dev, ctrl_info 3503 drivers/scsi/smartpqi/smartpqi_init.c PQI_MIN_MSIX_VECTORS, ctrl_info->num_queue_groups, ctrl_info 3506 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 3512 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_msix_vectors_enabled = num_vectors_enabled; ctrl_info 3513 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->irq_mode = IRQ_MODE_MSIX; ctrl_info 3517 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_disable_msix_interrupts(struct pqi_ctrl_info *ctrl_info) ctrl_info 3519 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->num_msix_vectors_enabled) { ctrl_info 3520 drivers/scsi/smartpqi/smartpqi_init.c pci_free_irq_vectors(ctrl_info->pci_dev); ctrl_info 3521 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_msix_vectors_enabled = 0; ctrl_info 3525 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_alloc_operational_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 3541 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq; ctrl_info 3544 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_oq; ctrl_info 3545 drivers/scsi/smartpqi/smartpqi_init.c num_inbound_queues = ctrl_info->num_queue_groups * 2; ctrl_info 3546 drivers/scsi/smartpqi/smartpqi_init.c num_outbound_queues = ctrl_info->num_queue_groups; ctrl_info 3547 drivers/scsi/smartpqi/smartpqi_init.c num_queue_indexes = (ctrl_info->num_queue_groups * 3) + 1; ctrl_info 3579 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base = ctrl_info 3580 drivers/scsi/smartpqi/smartpqi_init.c dma_alloc_coherent(&ctrl_info->pci_dev->dev, alloc_length, ctrl_info 3581 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->queue_memory_base_dma_handle, ctrl_info 3584 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->queue_memory_base) ctrl_info 3587 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_length = alloc_length; ctrl_info 3589 drivers/scsi/smartpqi/smartpqi_init.c element_array = PTR_ALIGN(ctrl_info->queue_memory_base, ctrl_info 3592 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 3593 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 3596 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3597 drivers/scsi/smartpqi/smartpqi_init.c (element_array - ctrl_info->queue_memory_base); ctrl_info 3603 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3604 drivers/scsi/smartpqi/smartpqi_init.c (element_array - ctrl_info->queue_memory_base); ctrl_info 3610 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 3611 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 3614 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3615 drivers/scsi/smartpqi/smartpqi_init.c (element_array - ctrl_info->queue_memory_base); ctrl_info 3621 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.oq_element_array = element_array; ctrl_info 3622 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.oq_element_array_bus_addr = ctrl_info 3623 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3624 drivers/scsi/smartpqi/smartpqi_init.c (element_array - ctrl_info->queue_memory_base); ctrl_info 3631 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 3632 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 3635 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3637 drivers/scsi/smartpqi/smartpqi_init.c (void __iomem *)ctrl_info->queue_memory_base); ctrl_info 3643 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3645 drivers/scsi/smartpqi/smartpqi_init.c (void __iomem *)ctrl_info->queue_memory_base); ctrl_info 3651 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3653 drivers/scsi/smartpqi/smartpqi_init.c (void __iomem *)ctrl_info->queue_memory_base); ctrl_info 3659 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.oq_pi = next_queue_index; ctrl_info 3660 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.oq_pi_bus_addr = ctrl_info 3661 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle + ctrl_info 3663 drivers/scsi/smartpqi/smartpqi_init.c (void __iomem *)ctrl_info->queue_memory_base); ctrl_info 3668 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_init_operational_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 3678 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) ctrl_info 3679 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].ctrl_info = ctrl_info; ctrl_info 3686 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.oq_id = next_oq_id++; ctrl_info 3687 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 3688 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].iq_id[RAID_PATH] = next_iq_id++; ctrl_info 3689 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].iq_id[AIO_PATH] = next_iq_id++; ctrl_info 3690 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].oq_id = next_oq_id++; ctrl_info 3697 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->event_queue.int_msg_num = 0; ctrl_info 3698 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) ctrl_info 3699 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].int_msg_num = i; ctrl_info 3701 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 3702 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_init(&ctrl_info->queue_groups[i].submit_lock[0]); ctrl_info 3703 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_init(&ctrl_info->queue_groups[i].submit_lock[1]); ctrl_info 3704 drivers/scsi/smartpqi/smartpqi_init.c INIT_LIST_HEAD(&ctrl_info->queue_groups[i].request_list[0]); ctrl_info 3705 drivers/scsi/smartpqi/smartpqi_init.c INIT_LIST_HEAD(&ctrl_info->queue_groups[i].request_list[1]); ctrl_info 3709 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_alloc_admin_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 3718 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base = ctrl_info 3719 drivers/scsi/smartpqi/smartpqi_init.c dma_alloc_coherent(&ctrl_info->pci_dev->dev, alloc_length, ctrl_info 3720 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->admin_queue_memory_base_dma_handle, ctrl_info 3723 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->admin_queue_memory_base) ctrl_info 3726 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_length = alloc_length; ctrl_info 3728 drivers/scsi/smartpqi/smartpqi_init.c admin_queues = &ctrl_info->admin_queues; ctrl_info 3729 drivers/scsi/smartpqi/smartpqi_init.c admin_queues_aligned = PTR_ALIGN(ctrl_info->admin_queue_memory_base, ctrl_info 3740 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base_dma_handle + ctrl_info 3742 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base); ctrl_info 3744 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base_dma_handle + ctrl_info 3746 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base); ctrl_info 3748 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base_dma_handle + ctrl_info 3750 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base); ctrl_info 3752 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base_dma_handle + ctrl_info 3754 drivers/scsi/smartpqi/smartpqi_init.c (void __iomem *)ctrl_info->admin_queue_memory_base); ctrl_info 3762 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_create_admin_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 3770 drivers/scsi/smartpqi/smartpqi_init.c pqi_registers = ctrl_info->pqi_registers; ctrl_info 3771 drivers/scsi/smartpqi/smartpqi_init.c admin_queues = &ctrl_info->admin_queues; ctrl_info 3804 drivers/scsi/smartpqi/smartpqi_init.c admin_queues->iq_pi = ctrl_info->iomem_base + ctrl_info 3807 drivers/scsi/smartpqi/smartpqi_init.c admin_queues->oq_ci = ctrl_info->iomem_base + ctrl_info 3814 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_submit_admin_request(struct pqi_ctrl_info *ctrl_info, ctrl_info 3821 drivers/scsi/smartpqi/smartpqi_init.c admin_queues = &ctrl_info->admin_queues; ctrl_info 3841 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_poll_for_admin_response(struct pqi_ctrl_info *ctrl_info, ctrl_info 3849 drivers/scsi/smartpqi/smartpqi_init.c admin_queues = &ctrl_info->admin_queues; ctrl_info 3859 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 3863 drivers/scsi/smartpqi/smartpqi_init.c if (!sis_is_firmware_running(ctrl_info)) ctrl_info 3878 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_start_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 3917 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq)) ctrl_info 3927 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq - iq_pi; ctrl_info 3941 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq; ctrl_info 3960 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_for_completion_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 3972 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 3973 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) { ctrl_info 4013 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_submit_raid_request_synchronous(struct pqi_ctrl_info *ctrl_info, ctrl_info 4030 drivers/scsi/smartpqi/smartpqi_init.c if (down_interruptible(&ctrl_info->sync_request_sem)) ctrl_info 4034 drivers/scsi/smartpqi/smartpqi_init.c down(&ctrl_info->sync_request_sem); ctrl_info 4037 drivers/scsi/smartpqi/smartpqi_init.c if (down_timeout(&ctrl_info->sync_request_sem, ctrl_info 4050 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_busy(ctrl_info); ctrl_info 4051 drivers/scsi/smartpqi/smartpqi_init.c timeout_msecs = pqi_wait_if_ctrl_blocked(ctrl_info, timeout_msecs); ctrl_info 4053 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 4058 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) { ctrl_info 4059 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 4064 drivers/scsi/smartpqi/smartpqi_init.c atomic_inc(&ctrl_info->sync_cmds_outstanding); ctrl_info 4066 drivers/scsi/smartpqi/smartpqi_init.c io_request = pqi_alloc_io_request(ctrl_info); ctrl_info 4082 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, ctrl_info 4083 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->queue_groups[PQI_DEFAULT_QUEUE_GROUP], RAID_PATH, ctrl_info 4086 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 4089 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_for_completion_io(ctrl_info, &wait); ctrl_info 4093 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 4112 drivers/scsi/smartpqi/smartpqi_init.c atomic_dec(&ctrl_info->sync_cmds_outstanding); ctrl_info 4114 drivers/scsi/smartpqi/smartpqi_init.c up(&ctrl_info->sync_request_sem); ctrl_info 4139 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info, ctrl_info 4145 drivers/scsi/smartpqi/smartpqi_init.c pqi_submit_admin_request(ctrl_info, request); ctrl_info 4147 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_poll_for_admin_response(ctrl_info, response); ctrl_info 4156 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_report_device_capability(struct pqi_ctrl_info *ctrl_info) ctrl_info 4178 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_map_single(ctrl_info->pci_dev, ctrl_info 4185 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4188 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, ctrl_info 4200 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_inbound_queues = ctrl_info 4202 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_elements_per_iq = ctrl_info 4204 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_iq_element_length = ctrl_info 4207 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_outbound_queues = ctrl_info 4209 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_elements_per_oq = ctrl_info 4211 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_oq_element_length = ctrl_info 4218 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_inbound_iu_length_per_firmware = ctrl_info 4221 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->inbound_spanning_supported = ctrl_info 4223 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->outbound_spanning_supported = ctrl_info 4232 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_validate_device_capability(struct pqi_ctrl_info *ctrl_info) ctrl_info 4234 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->max_iq_element_length < ctrl_info 4236 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4238 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_iq_element_length, ctrl_info 4243 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->max_oq_element_length < ctrl_info 4245 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4247 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_oq_element_length, ctrl_info 4252 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->max_inbound_iu_length_per_firmware < ctrl_info 4254 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4256 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_inbound_iu_length_per_firmware, ctrl_info 4261 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->inbound_spanning_supported) { ctrl_info 4262 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4267 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->outbound_spanning_supported) { ctrl_info 4268 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4276 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_create_event_queue(struct pqi_ctrl_info *ctrl_info) ctrl_info 4283 drivers/scsi/smartpqi/smartpqi_init.c event_queue = &ctrl_info->event_queue; ctrl_info 4308 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4313 drivers/scsi/smartpqi/smartpqi_init.c event_queue->oq_ci = ctrl_info->iomem_base + ctrl_info 4321 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_create_queue_group(struct pqi_ctrl_info *ctrl_info, ctrl_info 4329 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[group_number]; ctrl_info 4347 drivers/scsi/smartpqi/smartpqi_init.c put_unaligned_le16(ctrl_info->num_elements_per_iq, ctrl_info 4353 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4356 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4361 drivers/scsi/smartpqi/smartpqi_init.c queue_group->iq_pi[RAID_PATH] = ctrl_info->iomem_base + ctrl_info 4382 drivers/scsi/smartpqi/smartpqi_init.c put_unaligned_le16(ctrl_info->num_elements_per_iq, ctrl_info 4388 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4391 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4396 drivers/scsi/smartpqi/smartpqi_init.c queue_group->iq_pi[AIO_PATH] = ctrl_info->iomem_base + ctrl_info 4416 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4419 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4438 drivers/scsi/smartpqi/smartpqi_init.c put_unaligned_le16(ctrl_info->num_elements_per_oq, ctrl_info 4446 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_admin_request_synchronous(ctrl_info, &request, ctrl_info 4449 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4454 drivers/scsi/smartpqi/smartpqi_init.c queue_group->oq_ci = ctrl_info->iomem_base + ctrl_info 4462 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_create_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 4467 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_event_queue(ctrl_info); ctrl_info 4469 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4474 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 4475 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_queue_group(ctrl_info, i); ctrl_info 4477 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4479 drivers/scsi/smartpqi/smartpqi_init.c i, ctrl_info->num_queue_groups); ctrl_info 4491 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_configure_events(struct pqi_ctrl_info *ctrl_info, ctrl_info 4514 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_map_single(ctrl_info->pci_dev, ctrl_info 4521 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 4524 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, ctrl_info 4535 drivers/scsi/smartpqi/smartpqi_init.c put_unaligned_le16(ctrl_info->event_queue.oq_id, ctrl_info 4550 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_map_single(ctrl_info->pci_dev, ctrl_info 4557 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header, 0, ctrl_info 4560 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, ctrl_info 4570 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_enable_events(struct pqi_ctrl_info *ctrl_info) ctrl_info 4572 drivers/scsi/smartpqi/smartpqi_init.c return pqi_configure_events(ctrl_info, true); ctrl_info 4575 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_disable_events(struct pqi_ctrl_info *ctrl_info) ctrl_info 4577 drivers/scsi/smartpqi/smartpqi_init.c return pqi_configure_events(ctrl_info, false); ctrl_info 4580 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_free_all_io_requests(struct pqi_ctrl_info *ctrl_info) ctrl_info 4587 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->io_request_pool) ctrl_info 4590 drivers/scsi/smartpqi/smartpqi_init.c dev = &ctrl_info->pci_dev->dev; ctrl_info 4591 drivers/scsi/smartpqi/smartpqi_init.c sg_chain_buffer_length = ctrl_info->sg_chain_buffer_length; ctrl_info 4592 drivers/scsi/smartpqi/smartpqi_init.c io_request = ctrl_info->io_request_pool; ctrl_info 4594 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->max_io_slots; i++) { ctrl_info 4604 drivers/scsi/smartpqi/smartpqi_init.c kfree(ctrl_info->io_request_pool); ctrl_info 4605 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->io_request_pool = NULL; ctrl_info 4608 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_alloc_error_buffer(struct pqi_ctrl_info *ctrl_info) ctrl_info 4610 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer = dma_alloc_coherent(&ctrl_info->pci_dev->dev, ctrl_info 4611 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer_length, ctrl_info 4612 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->error_buffer_dma_handle, ctrl_info 4615 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->error_buffer) ctrl_info 4621 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_alloc_io_resources(struct pqi_ctrl_info *ctrl_info) ctrl_info 4630 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->io_request_pool = ctrl_info 4631 drivers/scsi/smartpqi/smartpqi_init.c kcalloc(ctrl_info->max_io_slots, ctrl_info 4632 drivers/scsi/smartpqi/smartpqi_init.c sizeof(ctrl_info->io_request_pool[0]), GFP_KERNEL); ctrl_info 4634 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->io_request_pool) { ctrl_info 4635 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4640 drivers/scsi/smartpqi/smartpqi_init.c dev = &ctrl_info->pci_dev->dev; ctrl_info 4641 drivers/scsi/smartpqi/smartpqi_init.c sg_chain_buffer_length = ctrl_info->sg_chain_buffer_length; ctrl_info 4642 drivers/scsi/smartpqi/smartpqi_init.c io_request = ctrl_info->io_request_pool; ctrl_info 4644 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->max_io_slots; i++) { ctrl_info 4646 drivers/scsi/smartpqi/smartpqi_init.c kmalloc(ctrl_info->max_inbound_iu_length, GFP_KERNEL); ctrl_info 4649 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4659 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 4674 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_all_io_requests(ctrl_info); ctrl_info 4684 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_calculate_io_resources(struct pqi_ctrl_info *ctrl_info) ctrl_info 4689 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_ml_can_queue = ctrl_info 4690 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_outstanding_requests - PQI_RESERVED_IO_SLOTS; ctrl_info 4691 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_io_slots = ctrl_info->max_outstanding_requests; ctrl_info 4693 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer_length = ctrl_info 4694 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_io_slots * PQI_ERROR_BUFFER_ELEMENT_LENGTH; ctrl_info 4697 drivers/scsi/smartpqi/smartpqi_init.c max_transfer_size = min(ctrl_info->max_transfer_size, ctrl_info 4700 drivers/scsi/smartpqi/smartpqi_init.c max_transfer_size = min(ctrl_info->max_transfer_size, ctrl_info 4708 drivers/scsi/smartpqi/smartpqi_init.c max_sg_entries = min(ctrl_info->max_sg_entries, max_sg_entries); ctrl_info 4712 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->sg_chain_buffer_length = ctrl_info 4715 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->sg_tablesize = max_sg_entries; ctrl_info 4716 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_sectors = max_transfer_size / 512; ctrl_info 4719 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_calculate_queue_resources(struct pqi_ctrl_info *ctrl_info) ctrl_info 4731 drivers/scsi/smartpqi/smartpqi_init.c max_queue_groups = min(ctrl_info->max_inbound_queues / 2, ctrl_info 4732 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_outbound_queues - 1); ctrl_info 4736 drivers/scsi/smartpqi/smartpqi_init.c num_queue_groups = min(num_cpus, ctrl_info->max_msix_vectors); ctrl_info 4740 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_queue_groups = num_queue_groups; ctrl_info 4741 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_hw_queue_index = num_queue_groups - 1; ctrl_info 4747 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_inbound_iu_length = ctrl_info 4748 drivers/scsi/smartpqi/smartpqi_init.c (ctrl_info->max_inbound_iu_length_per_firmware / ctrl_info 4753 drivers/scsi/smartpqi/smartpqi_init.c (ctrl_info->max_inbound_iu_length / ctrl_info 4760 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_elements_per_iq); ctrl_info 4764 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_elements_per_oq); ctrl_info 4766 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_iq = num_elements_per_iq; ctrl_info 4767 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_elements_per_oq = num_elements_per_oq; ctrl_info 4769 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_sg_per_iu = ctrl_info 4770 drivers/scsi/smartpqi/smartpqi_init.c ((ctrl_info->max_inbound_iu_length - ctrl_info 4787 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_build_raid_sg_list(struct pqi_ctrl_info *ctrl_info, ctrl_info 4812 drivers/scsi/smartpqi/smartpqi_init.c max_sg_per_iu = ctrl_info->max_sg_per_iu - 1; ctrl_info 4851 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_build_aio_sg_list(struct pqi_ctrl_info *ctrl_info, ctrl_info 4877 drivers/scsi/smartpqi/smartpqi_init.c max_sg_per_iu = ctrl_info->max_sg_per_iu - 1; ctrl_info 4928 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info, struct pqi_io_request *io_request, ctrl_info 5000 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5006 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_build_raid_sg_list(ctrl_info, request, scmd, io_request); ctrl_info 5012 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, queue_group, RAID_PATH, io_request); ctrl_info 5017 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_raid_submit_scsi_cmd(struct pqi_ctrl_info *ctrl_info, ctrl_info 5023 drivers/scsi/smartpqi/smartpqi_init.c io_request = pqi_alloc_io_request(ctrl_info); ctrl_info 5025 drivers/scsi/smartpqi/smartpqi_init.c return pqi_raid_submit_scsi_cmd_with_io_request(ctrl_info, io_request, ctrl_info 5029 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_schedule_bypass_retry(struct pqi_ctrl_info *ctrl_info) ctrl_info 5031 drivers/scsi/smartpqi/smartpqi_init.c if (!pqi_ctrl_blocked(ctrl_info)) ctrl_info 5032 drivers/scsi/smartpqi/smartpqi_init.c schedule_work(&ctrl_info->raid_bypass_retry_work); ctrl_info 5039 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5054 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(scmd->device->host); ctrl_info 5055 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5062 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info, ctrl_info 5067 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5070 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->raid_bypass_retry_list); ctrl_info 5073 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->raid_bypass_retry_list); ctrl_info 5074 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5090 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5095 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(scmd->device->host); ctrl_info 5097 drivers/scsi/smartpqi/smartpqi_init.c pqi_add_to_raid_bypass_retry_list(ctrl_info, io_request, false); ctrl_info 5098 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_bypass_retry(ctrl_info); ctrl_info 5105 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5117 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(scmd->device->host); ctrl_info 5122 drivers/scsi/smartpqi/smartpqi_init.c return pqi_raid_submit_scsi_cmd_with_io_request(ctrl_info, io_request, ctrl_info 5127 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 5132 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5134 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->raid_bypass_retry_list, ctrl_info 5138 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5143 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_retry_raid_bypass_requests(struct pqi_ctrl_info *ctrl_info) ctrl_info 5148 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_busy(ctrl_info); ctrl_info 5151 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_blocked(ctrl_info)) ctrl_info 5153 drivers/scsi/smartpqi/smartpqi_init.c io_request = pqi_next_queued_raid_bypass_request(ctrl_info); ctrl_info 5158 drivers/scsi/smartpqi/smartpqi_init.c pqi_add_to_raid_bypass_retry_list(ctrl_info, io_request, ctrl_info 5160 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_bypass_retry(ctrl_info); ctrl_info 5165 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 5170 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5172 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = container_of(work, struct pqi_ctrl_info, ctrl_info 5174 drivers/scsi/smartpqi/smartpqi_init.c pqi_retry_raid_bypass_requests(ctrl_info); ctrl_info 5178 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info) ctrl_info 5182 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5183 drivers/scsi/smartpqi/smartpqi_init.c INIT_LIST_HEAD(&ctrl_info->raid_bypass_retry_list); ctrl_info 5184 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->raid_bypass_retry_list_lock, flags); ctrl_info 5204 drivers/scsi/smartpqi/smartpqi_init.c static inline int pqi_aio_submit_scsi_cmd(struct pqi_ctrl_info *ctrl_info, ctrl_info 5208 drivers/scsi/smartpqi/smartpqi_init.c return pqi_aio_submit_io(ctrl_info, scmd, device->aio_handle, ctrl_info 5212 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_aio_submit_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 5221 drivers/scsi/smartpqi/smartpqi_init.c io_request = pqi_alloc_io_request(ctrl_info); ctrl_info 5255 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5271 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_build_aio_sg_list(ctrl_info, request, scmd, io_request); ctrl_info 5277 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, queue_group, AIO_PATH, io_request); ctrl_info 5282 drivers/scsi/smartpqi/smartpqi_init.c static inline u16 pqi_get_hw_queue(struct pqi_ctrl_info *ctrl_info, ctrl_info 5288 drivers/scsi/smartpqi/smartpqi_init.c if (hw_queue > ctrl_info->max_hw_queue_index) ctrl_info 5321 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5328 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 5338 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info) || pqi_device_in_remove(ctrl_info, ctrl_info 5345 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_busy(ctrl_info); ctrl_info 5346 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_blocked(ctrl_info) || pqi_device_in_reset(device) || ctrl_info 5347 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_in_ofa(ctrl_info) || pqi_ctrl_in_shutdown(ctrl_info)) { ctrl_info 5358 drivers/scsi/smartpqi/smartpqi_init.c hw_queue = pqi_get_hw_queue(ctrl_info, scmd); ctrl_info 5359 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[hw_queue]; ctrl_info 5365 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_raid_bypass_submit_scsi_cmd(ctrl_info, device, ctrl_info 5371 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_raid_submit_scsi_cmd(ctrl_info, device, scmd, ctrl_info 5375 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_aio_submit_scsi_cmd(ctrl_info, device, scmd, ctrl_info 5378 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_raid_submit_scsi_cmd(ctrl_info, device, scmd, ctrl_info 5383 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 5390 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_until_queued_io_drained(struct pqi_ctrl_info *ctrl_info, ctrl_info 5407 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5408 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5417 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_until_inbound_queues_empty(struct pqi_ctrl_info *ctrl_info) ctrl_info 5426 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 5427 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 5429 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_until_queued_io_drained(ctrl_info, queue_group); ctrl_info 5440 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5441 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5451 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_fail_io_queued_for_device(struct pqi_ctrl_info *ctrl_info, ctrl_info 5463 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 5464 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 5492 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_fail_io_queued_for_all_devices(struct pqi_ctrl_info *ctrl_info) ctrl_info 5502 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 5503 drivers/scsi/smartpqi/smartpqi_init.c queue_group = &ctrl_info->queue_groups[i]; ctrl_info 5528 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_device_wait_for_pending_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 5536 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5537 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5541 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5552 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ctrl_wait_for_pending_io(struct pqi_ctrl_info *ctrl_info, ctrl_info 5564 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 5565 drivers/scsi/smartpqi/smartpqi_init.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 5572 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 5578 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5579 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5584 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5595 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ctrl_wait_for_pending_sync_cmds(struct pqi_ctrl_info *ctrl_info) ctrl_info 5597 drivers/scsi/smartpqi/smartpqi_init.c while (atomic_read(&ctrl_info->sync_cmds_outstanding)) { ctrl_info 5598 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5599 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 5617 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_for_lun_reset_completion(struct pqi_ctrl_info *ctrl_info, ctrl_info 5629 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5630 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) { ctrl_info 5639 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_lun_reset(struct pqi_ctrl_info *ctrl_info, ctrl_info 5647 drivers/scsi/smartpqi/smartpqi_init.c io_request = pqi_alloc_io_request(ctrl_info); ctrl_info 5662 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_io(ctrl_info, ctrl_info 5663 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->queue_groups[PQI_DEFAULT_QUEUE_GROUP], RAID_PATH, ctrl_info 5666 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_for_lun_reset_completion(ctrl_info, device, &wait); ctrl_info 5681 drivers/scsi/smartpqi/smartpqi_init.c static int _pqi_device_reset(struct pqi_ctrl_info *ctrl_info, ctrl_info 5689 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_lun_reset(ctrl_info, device); ctrl_info 5697 drivers/scsi/smartpqi/smartpqi_init.c rc |= pqi_device_wait_for_pending_io(ctrl_info, device, timeout_secs); ctrl_info 5702 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_device_reset(struct pqi_ctrl_info *ctrl_info, ctrl_info 5707 drivers/scsi/smartpqi/smartpqi_init.c mutex_lock(&ctrl_info->lun_reset_mutex); ctrl_info 5709 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_requests(ctrl_info); ctrl_info 5710 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_until_quiesced(ctrl_info); ctrl_info 5711 drivers/scsi/smartpqi/smartpqi_init.c pqi_fail_io_queued_for_device(ctrl_info, device); ctrl_info 5712 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_until_inbound_queues_empty(ctrl_info); ctrl_info 5714 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unblock_requests(ctrl_info); ctrl_info 5719 drivers/scsi/smartpqi/smartpqi_init.c rc = _pqi_device_reset(ctrl_info, device); ctrl_info 5723 drivers/scsi/smartpqi/smartpqi_init.c mutex_unlock(&ctrl_info->lun_reset_mutex); ctrl_info 5732 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5736 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 5739 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5743 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 5744 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info) || ctrl_info 5745 drivers/scsi/smartpqi/smartpqi_init.c pqi_device_reset_blocked(ctrl_info)) { ctrl_info 5750 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_ofa_finished(ctrl_info); ctrl_info 5752 drivers/scsi/smartpqi/smartpqi_init.c atomic_inc(&ctrl_info->sync_cmds_outstanding); ctrl_info 5753 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_device_reset(ctrl_info, device); ctrl_info 5754 drivers/scsi/smartpqi/smartpqi_init.c atomic_dec(&ctrl_info->sync_cmds_outstanding); ctrl_info 5757 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 5769 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 5773 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 5775 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 5780 drivers/scsi/smartpqi/smartpqi_init.c device = pqi_find_device_by_sas_rphy(ctrl_info, rphy); ctrl_info 5787 drivers/scsi/smartpqi/smartpqi_init.c device = pqi_find_scsi_dev(ctrl_info, sdev_channel(sdev), ctrl_info 5805 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 5812 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost); ctrl_info 5815 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pci_dev, 0); ctrl_info 5818 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_getpciinfo_ioctl(struct pqi_ctrl_info *ctrl_info, ctrl_info 5829 drivers/scsi/smartpqi/smartpqi_init.c pci_dev = ctrl_info->pci_dev; ctrl_info 5930 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_passthru_ioctl(struct pqi_ctrl_info *ctrl_info, void __user *arg) ctrl_info 5941 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) ctrl_info 6012 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_map_single(ctrl_info->pci_dev, ctrl_info 6023 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 6027 drivers/scsi/smartpqi/smartpqi_init.c pqi_pci_unmap(ctrl_info->pci_dev, request.sg_descriptors, 1, ctrl_info 6072 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6074 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6076 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_in_ofa(ctrl_info) || ctrl_info 6077 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_in_shutdown(ctrl_info)) ctrl_info 6084 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_scan_scsi_devices(ctrl_info); ctrl_info 6087 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_getpciinfo_ioctl(ctrl_info, arg); ctrl_info 6093 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_passthru_ioctl(ctrl_info, arg); ctrl_info 6107 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6110 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 6112 drivers/scsi/smartpqi/smartpqi_init.c return snprintf(buffer, PAGE_SIZE, "%s\n", ctrl_info->firmware_version); ctrl_info 6119 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6122 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 6132 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6135 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 6137 drivers/scsi/smartpqi/smartpqi_init.c return snprintf(buffer, PAGE_SIZE, "%s\n", ctrl_info->serial_number); ctrl_info 6144 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6147 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 6149 drivers/scsi/smartpqi/smartpqi_init.c return snprintf(buffer, PAGE_SIZE, "%s\n", ctrl_info->model); ctrl_info 6156 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6159 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(shost); ctrl_info 6161 drivers/scsi/smartpqi/smartpqi_init.c return snprintf(buffer, PAGE_SIZE, "%s\n", ctrl_info->vendor); ctrl_info 6237 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6244 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6246 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6250 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 6262 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6275 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6282 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6284 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6288 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 6294 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6303 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6316 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6318 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6322 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 6340 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host->host_no, ctrl_info 6379 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6387 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6394 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6396 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6400 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, ctrl_info 6406 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6414 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6420 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6422 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6429 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6437 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6444 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = shost_to_hba(sdev->host); ctrl_info 6446 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6455 drivers/scsi/smartpqi/smartpqi_init.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 6494 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_register_scsi(struct pqi_ctrl_info *ctrl_info) ctrl_info 6499 drivers/scsi/smartpqi/smartpqi_init.c shost = scsi_host_alloc(&pqi_driver_template, sizeof(ctrl_info)); ctrl_info 6501 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6503 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id); ctrl_info 6514 drivers/scsi/smartpqi/smartpqi_init.c shost->max_sectors = ctrl_info->max_sectors; ctrl_info 6515 drivers/scsi/smartpqi/smartpqi_init.c shost->can_queue = ctrl_info->scsi_ml_can_queue; ctrl_info 6517 drivers/scsi/smartpqi/smartpqi_init.c shost->sg_tablesize = ctrl_info->sg_tablesize; ctrl_info 6519 drivers/scsi/smartpqi/smartpqi_init.c shost->irq = pci_irq_vector(ctrl_info->pci_dev, 0); ctrl_info 6521 drivers/scsi/smartpqi/smartpqi_init.c shost->nr_hw_queues = ctrl_info->num_queue_groups; ctrl_info 6522 drivers/scsi/smartpqi/smartpqi_init.c shost->hostdata[0] = (unsigned long)ctrl_info; ctrl_info 6524 drivers/scsi/smartpqi/smartpqi_init.c rc = scsi_add_host(shost, &ctrl_info->pci_dev->dev); ctrl_info 6526 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6528 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id); ctrl_info 6532 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_add_sas_host(shost, ctrl_info); ctrl_info 6534 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6536 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id); ctrl_info 6540 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->scsi_host = shost; ctrl_info 6552 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_unregister_scsi(struct pqi_ctrl_info *ctrl_info) ctrl_info 6556 drivers/scsi/smartpqi/smartpqi_init.c pqi_delete_sas_host(ctrl_info); ctrl_info 6558 drivers/scsi/smartpqi/smartpqi_init.c shost = ctrl_info->scsi_host; ctrl_info 6566 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_wait_for_pqi_reset_completion(struct pqi_ctrl_info *ctrl_info) ctrl_info 6574 drivers/scsi/smartpqi/smartpqi_init.c pqi_registers = ctrl_info->pqi_registers; ctrl_info 6583 drivers/scsi/smartpqi/smartpqi_init.c pqi_check_ctrl_health(ctrl_info); ctrl_info 6584 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ctrl_offline(ctrl_info)) { ctrl_info 6597 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_reset(struct pqi_ctrl_info *ctrl_info) ctrl_info 6602 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->pqi_reset_quiesce_supported) { ctrl_info 6603 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_pqi_reset_quiesce(ctrl_info); ctrl_info 6605 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6616 drivers/scsi/smartpqi/smartpqi_init.c writel(reset_reg.all_bits, &ctrl_info->pqi_registers->device_reset); ctrl_info 6618 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_for_pqi_reset_completion(ctrl_info); ctrl_info 6620 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6626 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_get_ctrl_serial_number(struct pqi_ctrl_info *ctrl_info) ctrl_info 6635 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_sense_subsystem_info(ctrl_info, sense_info); ctrl_info 6639 drivers/scsi/smartpqi/smartpqi_init.c memcpy(ctrl_info->serial_number, sense_info->ctrl_serial_number, ctrl_info 6641 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->serial_number[sizeof(sense_info->ctrl_serial_number)] = '\0'; ctrl_info 6649 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_get_ctrl_product_details(struct pqi_ctrl_info *ctrl_info) ctrl_info 6658 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_identify_controller(ctrl_info, identify); ctrl_info 6662 drivers/scsi/smartpqi/smartpqi_init.c memcpy(ctrl_info->firmware_version, identify->firmware_version, ctrl_info 6664 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->firmware_version[sizeof(identify->firmware_version)] = '\0'; ctrl_info 6665 drivers/scsi/smartpqi/smartpqi_init.c snprintf(ctrl_info->firmware_version + ctrl_info 6666 drivers/scsi/smartpqi/smartpqi_init.c strlen(ctrl_info->firmware_version), ctrl_info 6667 drivers/scsi/smartpqi/smartpqi_init.c sizeof(ctrl_info->firmware_version), ctrl_info 6670 drivers/scsi/smartpqi/smartpqi_init.c memcpy(ctrl_info->model, identify->product_id, ctrl_info 6672 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->model[sizeof(identify->product_id)] = '\0'; ctrl_info 6674 drivers/scsi/smartpqi/smartpqi_init.c memcpy(ctrl_info->vendor, identify->vendor_id, ctrl_info 6676 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->vendor[sizeof(identify->vendor_id)] = '\0'; ctrl_info 6685 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6738 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_config_table_update(struct pqi_ctrl_info *ctrl_info, ctrl_info 6755 drivers/scsi/smartpqi/smartpqi_init.c return pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 6759 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_enable_firmware_features(struct pqi_ctrl_info *ctrl_info, ctrl_info 6775 drivers/scsi/smartpqi/smartpqi_init.c return pqi_config_table_update(ctrl_info, ctrl_info 6785 drivers/scsi/smartpqi/smartpqi_init.c void (*feature_status)(struct pqi_ctrl_info *ctrl_info, ctrl_info 6789 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_firmware_feature_status(struct pqi_ctrl_info *ctrl_info, ctrl_info 6793 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, "%s not supported by controller\n", ctrl_info 6799 drivers/scsi/smartpqi/smartpqi_init.c dev_info(&ctrl_info->pci_dev->dev, ctrl_info 6804 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, "failed to enable %s\n", ctrl_info 6808 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_firmware_feature_update(struct pqi_ctrl_info *ctrl_info, ctrl_info 6812 drivers/scsi/smartpqi/smartpqi_init.c firmware_feature->feature_status(ctrl_info, firmware_feature); ctrl_info 6839 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 6845 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = section_info->ctrl_info; ctrl_info 6856 drivers/scsi/smartpqi/smartpqi_init.c pqi_firmware_feature_update(ctrl_info, ctrl_info 6871 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_enable_firmware_features(ctrl_info, firmware_features, ctrl_info 6874 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6879 drivers/scsi/smartpqi/smartpqi_init.c pqi_firmware_feature_update(ctrl_info, ctrl_info 6885 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->soft_reset_handshake_supported = false; ctrl_info 6895 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->soft_reset_handshake_supported = ctrl_info 6898 drivers/scsi/smartpqi/smartpqi_init.c pqi_firmware_feature_update(ctrl_info, ctrl_info 6922 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_process_config_table(struct pqi_ctrl_info *ctrl_info) ctrl_info 6931 drivers/scsi/smartpqi/smartpqi_init.c table_length = ctrl_info->config_table_length; ctrl_info 6937 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 6946 drivers/scsi/smartpqi/smartpqi_init.c table_iomem_addr = ctrl_info->iomem_base + ctrl_info 6947 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->config_table_offset; ctrl_info 6950 drivers/scsi/smartpqi/smartpqi_init.c section_info.ctrl_info = ctrl_info; ctrl_info 6968 drivers/scsi/smartpqi/smartpqi_init.c dev_warn(&ctrl_info->pci_dev->dev, ctrl_info 6971 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->heartbeat_counter = ctrl_info 6979 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->soft_reset_status = ctrl_info 6998 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_revert_to_sis_mode(struct pqi_ctrl_info *ctrl_info) ctrl_info 7002 drivers/scsi/smartpqi/smartpqi_init.c pqi_change_irq_mode(ctrl_info, IRQ_MODE_NONE); ctrl_info 7003 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_reset(ctrl_info); ctrl_info 7006 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_reenable_sis_mode(ctrl_info); ctrl_info 7008 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7012 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, SIS_MODE); ctrl_info 7022 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_force_sis_mode(struct pqi_ctrl_info *ctrl_info) ctrl_info 7024 drivers/scsi/smartpqi/smartpqi_init.c if (!sis_is_firmware_running(ctrl_info)) ctrl_info 7027 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_get_ctrl_mode(ctrl_info) == SIS_MODE) ctrl_info 7030 drivers/scsi/smartpqi/smartpqi_init.c if (sis_is_kernel_up(ctrl_info)) { ctrl_info 7031 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, SIS_MODE); ctrl_info 7035 drivers/scsi/smartpqi/smartpqi_init.c return pqi_revert_to_sis_mode(ctrl_info); ctrl_info 7040 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info) ctrl_info 7045 drivers/scsi/smartpqi/smartpqi_init.c sis_soft_reset(ctrl_info); ctrl_info 7048 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_force_sis_mode(ctrl_info); ctrl_info 7057 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_wait_for_ctrl_ready(ctrl_info); ctrl_info 7065 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_get_ctrl_properties(ctrl_info); ctrl_info 7067 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7072 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_get_pqi_capabilities(ctrl_info); ctrl_info 7074 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7080 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->max_outstanding_requests > ctrl_info 7082 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_outstanding_requests = ctrl_info 7085 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->max_outstanding_requests > ctrl_info 7087 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_outstanding_requests = ctrl_info 7091 drivers/scsi/smartpqi/smartpqi_init.c pqi_calculate_io_resources(ctrl_info); ctrl_info 7093 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_alloc_error_buffer(ctrl_info); ctrl_info 7095 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7105 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_init_base_struct_addr(ctrl_info); ctrl_info 7107 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7113 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_for_pqi_mode_ready(ctrl_info); ctrl_info 7115 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7121 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = true; ctrl_info 7122 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, PQI_MODE); ctrl_info 7124 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_alloc_admin_queues(ctrl_info); ctrl_info 7126 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7131 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_admin_queues(ctrl_info); ctrl_info 7133 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7138 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_report_device_capability(ctrl_info); ctrl_info 7140 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7145 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_validate_device_capability(ctrl_info); ctrl_info 7149 drivers/scsi/smartpqi/smartpqi_init.c pqi_calculate_queue_resources(ctrl_info); ctrl_info 7151 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_enable_msix_interrupts(ctrl_info); ctrl_info 7155 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->num_msix_vectors_enabled < ctrl_info->num_queue_groups) { ctrl_info 7156 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_msix_vectors = ctrl_info 7157 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->num_msix_vectors_enabled; ctrl_info 7158 drivers/scsi/smartpqi/smartpqi_init.c pqi_calculate_queue_resources(ctrl_info); ctrl_info 7161 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_alloc_io_resources(ctrl_info); ctrl_info 7165 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_alloc_operational_queues(ctrl_info); ctrl_info 7167 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7172 drivers/scsi/smartpqi/smartpqi_init.c pqi_init_operational_queues(ctrl_info); ctrl_info 7174 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_request_irqs(ctrl_info); ctrl_info 7178 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_queues(ctrl_info); ctrl_info 7182 drivers/scsi/smartpqi/smartpqi_init.c pqi_change_irq_mode(ctrl_info, IRQ_MODE_MSIX); ctrl_info 7184 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->controller_online = true; ctrl_info 7186 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_process_config_table(ctrl_info); ctrl_info 7190 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_heartbeat_timer(ctrl_info); ctrl_info 7192 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_enable_events(ctrl_info); ctrl_info 7194 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7200 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_register_scsi(ctrl_info); ctrl_info 7204 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_get_ctrl_product_details(ctrl_info); ctrl_info 7206 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7211 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_get_ctrl_serial_number(ctrl_info); ctrl_info 7213 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7218 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_set_diag_rescan(ctrl_info); ctrl_info 7220 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7225 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_write_driver_version_to_host_wellness(ctrl_info); ctrl_info 7227 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7232 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_update_time_worker(ctrl_info); ctrl_info 7234 drivers/scsi/smartpqi/smartpqi_init.c pqi_scan_scsi_devices(ctrl_info); ctrl_info 7239 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_reinit_queues(struct pqi_ctrl_info *ctrl_info) ctrl_info 7245 drivers/scsi/smartpqi/smartpqi_init.c admin_queues = &ctrl_info->admin_queues; ctrl_info 7250 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->num_queue_groups; i++) { ctrl_info 7251 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].iq_pi_copy[RAID_PATH] = 0; ctrl_info 7252 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].iq_pi_copy[AIO_PATH] = 0; ctrl_info 7253 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_groups[i].oq_ci_copy = 0; ctrl_info 7255 drivers/scsi/smartpqi/smartpqi_init.c writel(0, ctrl_info->queue_groups[i].iq_ci[RAID_PATH]); ctrl_info 7256 drivers/scsi/smartpqi/smartpqi_init.c writel(0, ctrl_info->queue_groups[i].iq_ci[AIO_PATH]); ctrl_info 7257 drivers/scsi/smartpqi/smartpqi_init.c writel(0, ctrl_info->queue_groups[i].oq_pi); ctrl_info 7260 drivers/scsi/smartpqi/smartpqi_init.c event_queue = &ctrl_info->event_queue; ctrl_info 7265 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ctrl_init_resume(struct pqi_ctrl_info *ctrl_info) ctrl_info 7269 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_force_sis_mode(ctrl_info); ctrl_info 7277 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_wait_for_ctrl_ready_resume(ctrl_info); ctrl_info 7285 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_get_ctrl_properties(ctrl_info); ctrl_info 7287 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7292 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_get_pqi_capabilities(ctrl_info); ctrl_info 7294 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7304 drivers/scsi/smartpqi/smartpqi_init.c rc = sis_init_base_struct_addr(ctrl_info); ctrl_info 7306 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7312 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_wait_for_pqi_mode_ready(ctrl_info); ctrl_info 7314 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7320 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = true; ctrl_info 7321 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, PQI_MODE); ctrl_info 7323 drivers/scsi/smartpqi/smartpqi_init.c pqi_reinit_queues(ctrl_info); ctrl_info 7325 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_admin_queues(ctrl_info); ctrl_info 7327 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7332 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_create_queues(ctrl_info); ctrl_info 7336 drivers/scsi/smartpqi/smartpqi_init.c pqi_change_irq_mode(ctrl_info, IRQ_MODE_MSIX); ctrl_info 7338 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->controller_online = true; ctrl_info 7339 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unblock_requests(ctrl_info); ctrl_info 7341 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_process_config_table(ctrl_info); ctrl_info 7345 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_heartbeat_timer(ctrl_info); ctrl_info 7347 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_enable_events(ctrl_info); ctrl_info 7349 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7354 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_get_ctrl_product_details(ctrl_info); ctrl_info 7356 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7361 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_set_diag_rescan(ctrl_info); ctrl_info 7363 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7368 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_write_driver_version_to_host_wellness(ctrl_info); ctrl_info 7370 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7375 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_update_time_worker(ctrl_info); ctrl_info 7377 drivers/scsi/smartpqi/smartpqi_init.c pqi_scan_scsi_devices(ctrl_info); ctrl_info 7389 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_pci_init(struct pqi_ctrl_info *ctrl_info) ctrl_info 7394 drivers/scsi/smartpqi/smartpqi_init.c rc = pci_enable_device(ctrl_info->pci_dev); ctrl_info 7396 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7406 drivers/scsi/smartpqi/smartpqi_init.c rc = dma_set_mask_and_coherent(&ctrl_info->pci_dev->dev, mask); ctrl_info 7408 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, "failed to set DMA mask\n"); ctrl_info 7412 drivers/scsi/smartpqi/smartpqi_init.c rc = pci_request_regions(ctrl_info->pci_dev, DRIVER_NAME_SHORT); ctrl_info 7414 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7419 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->iomem_base = ioremap_nocache(pci_resource_start( ctrl_info 7420 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pci_dev, 0), ctrl_info 7422 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->iomem_base) { ctrl_info 7423 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7432 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_set_pcie_completion_timeout(ctrl_info->pci_dev, ctrl_info 7435 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 7441 drivers/scsi/smartpqi/smartpqi_init.c pci_set_master(ctrl_info->pci_dev); ctrl_info 7443 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->registers = ctrl_info->iomem_base; ctrl_info 7444 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_registers = &ctrl_info->registers->pqi_registers; ctrl_info 7446 drivers/scsi/smartpqi/smartpqi_init.c pci_set_drvdata(ctrl_info->pci_dev, ctrl_info); ctrl_info 7451 drivers/scsi/smartpqi/smartpqi_init.c pci_release_regions(ctrl_info->pci_dev); ctrl_info 7453 drivers/scsi/smartpqi/smartpqi_init.c pci_disable_device(ctrl_info->pci_dev); ctrl_info 7458 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_cleanup_pci_init(struct pqi_ctrl_info *ctrl_info) ctrl_info 7460 drivers/scsi/smartpqi/smartpqi_init.c iounmap(ctrl_info->iomem_base); ctrl_info 7461 drivers/scsi/smartpqi/smartpqi_init.c pci_release_regions(ctrl_info->pci_dev); ctrl_info 7462 drivers/scsi/smartpqi/smartpqi_init.c if (pci_is_enabled(ctrl_info->pci_dev)) ctrl_info 7463 drivers/scsi/smartpqi/smartpqi_init.c pci_disable_device(ctrl_info->pci_dev); ctrl_info 7464 drivers/scsi/smartpqi/smartpqi_init.c pci_set_drvdata(ctrl_info->pci_dev, NULL); ctrl_info 7469 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 7471 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = kzalloc_node(sizeof(struct pqi_ctrl_info), ctrl_info 7473 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info) ctrl_info 7476 drivers/scsi/smartpqi/smartpqi_init.c mutex_init(&ctrl_info->scan_mutex); ctrl_info 7477 drivers/scsi/smartpqi/smartpqi_init.c mutex_init(&ctrl_info->lun_reset_mutex); ctrl_info 7478 drivers/scsi/smartpqi/smartpqi_init.c mutex_init(&ctrl_info->ofa_mutex); ctrl_info 7480 drivers/scsi/smartpqi/smartpqi_init.c INIT_LIST_HEAD(&ctrl_info->scsi_device_list); ctrl_info 7481 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_init(&ctrl_info->scsi_device_list_lock); ctrl_info 7483 drivers/scsi/smartpqi/smartpqi_init.c INIT_WORK(&ctrl_info->event_work, pqi_event_worker); ctrl_info 7484 drivers/scsi/smartpqi/smartpqi_init.c atomic_set(&ctrl_info->num_interrupts, 0); ctrl_info 7485 drivers/scsi/smartpqi/smartpqi_init.c atomic_set(&ctrl_info->sync_cmds_outstanding, 0); ctrl_info 7487 drivers/scsi/smartpqi/smartpqi_init.c INIT_DELAYED_WORK(&ctrl_info->rescan_work, pqi_rescan_worker); ctrl_info 7488 drivers/scsi/smartpqi/smartpqi_init.c INIT_DELAYED_WORK(&ctrl_info->update_time_work, pqi_update_time_worker); ctrl_info 7490 drivers/scsi/smartpqi/smartpqi_init.c timer_setup(&ctrl_info->heartbeat_timer, pqi_heartbeat_timer_handler, 0); ctrl_info 7491 drivers/scsi/smartpqi/smartpqi_init.c INIT_WORK(&ctrl_info->ctrl_offline_work, pqi_ctrl_offline_worker); ctrl_info 7493 drivers/scsi/smartpqi/smartpqi_init.c sema_init(&ctrl_info->sync_request_sem, ctrl_info 7495 drivers/scsi/smartpqi/smartpqi_init.c init_waitqueue_head(&ctrl_info->block_requests_wait); ctrl_info 7497 drivers/scsi/smartpqi/smartpqi_init.c INIT_LIST_HEAD(&ctrl_info->raid_bypass_retry_list); ctrl_info 7498 drivers/scsi/smartpqi/smartpqi_init.c spin_lock_init(&ctrl_info->raid_bypass_retry_list_lock); ctrl_info 7499 drivers/scsi/smartpqi/smartpqi_init.c INIT_WORK(&ctrl_info->raid_bypass_retry_work, ctrl_info 7502 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->ctrl_id = atomic_inc_return(&pqi_controller_count) - 1; ctrl_info 7503 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->irq_mode = IRQ_MODE_NONE; ctrl_info 7504 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_msix_vectors = PQI_MAX_MSIX_VECTORS; ctrl_info 7506 drivers/scsi/smartpqi/smartpqi_init.c return ctrl_info; ctrl_info 7509 drivers/scsi/smartpqi/smartpqi_init.c static inline void pqi_free_ctrl_info(struct pqi_ctrl_info *ctrl_info) ctrl_info 7511 drivers/scsi/smartpqi/smartpqi_init.c kfree(ctrl_info); ctrl_info 7514 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_free_interrupts(struct pqi_ctrl_info *ctrl_info) ctrl_info 7516 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_irqs(ctrl_info); ctrl_info 7517 drivers/scsi/smartpqi/smartpqi_init.c pqi_disable_msix_interrupts(ctrl_info); ctrl_info 7520 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_free_ctrl_resources(struct pqi_ctrl_info *ctrl_info) ctrl_info 7522 drivers/scsi/smartpqi/smartpqi_init.c pqi_stop_heartbeat_timer(ctrl_info); ctrl_info 7523 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_interrupts(ctrl_info); ctrl_info 7524 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->queue_memory_base) ctrl_info 7525 drivers/scsi/smartpqi/smartpqi_init.c dma_free_coherent(&ctrl_info->pci_dev->dev, ctrl_info 7526 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_length, ctrl_info 7527 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base, ctrl_info 7528 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->queue_memory_base_dma_handle); ctrl_info 7529 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->admin_queue_memory_base) ctrl_info 7530 drivers/scsi/smartpqi/smartpqi_init.c dma_free_coherent(&ctrl_info->pci_dev->dev, ctrl_info 7531 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_length, ctrl_info 7532 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base, ctrl_info 7533 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->admin_queue_memory_base_dma_handle); ctrl_info 7534 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_all_io_requests(ctrl_info); ctrl_info 7535 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->error_buffer) ctrl_info 7536 drivers/scsi/smartpqi/smartpqi_init.c dma_free_coherent(&ctrl_info->pci_dev->dev, ctrl_info 7537 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer_length, ctrl_info 7538 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer, ctrl_info 7539 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->error_buffer_dma_handle); ctrl_info 7540 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->iomem_base) ctrl_info 7541 drivers/scsi/smartpqi/smartpqi_init.c pqi_cleanup_pci_init(ctrl_info); ctrl_info 7542 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_ctrl_info(ctrl_info); ctrl_info 7545 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_remove_ctrl(struct pqi_ctrl_info *ctrl_info) ctrl_info 7547 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_rescan_worker(ctrl_info); ctrl_info 7548 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_update_time_worker(ctrl_info); ctrl_info 7549 drivers/scsi/smartpqi/smartpqi_init.c pqi_remove_all_scsi_devices(ctrl_info); ctrl_info 7550 drivers/scsi/smartpqi/smartpqi_init.c pqi_unregister_scsi(ctrl_info); ctrl_info 7551 drivers/scsi/smartpqi/smartpqi_init.c if (ctrl_info->pqi_mode_enabled) ctrl_info 7552 drivers/scsi/smartpqi/smartpqi_init.c pqi_revert_to_sis_mode(ctrl_info); ctrl_info 7553 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_ctrl_resources(ctrl_info); ctrl_info 7556 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_ctrl_quiesce(struct pqi_ctrl_info *ctrl_info) ctrl_info 7558 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_update_time_worker(ctrl_info); ctrl_info 7559 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_rescan_worker(ctrl_info); ctrl_info 7560 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_lun_reset_finished(ctrl_info); ctrl_info 7561 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_scan_finished(ctrl_info); ctrl_info 7562 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_ofa_start(ctrl_info); ctrl_info 7563 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_requests(ctrl_info); ctrl_info 7564 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_until_quiesced(ctrl_info); ctrl_info 7565 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_for_pending_io(ctrl_info, PQI_PENDING_IO_TIMEOUT_SECS); ctrl_info 7566 drivers/scsi/smartpqi/smartpqi_init.c pqi_fail_io_queued_for_all_devices(ctrl_info); ctrl_info 7567 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_inbound_queues_empty(ctrl_info); ctrl_info 7568 drivers/scsi/smartpqi/smartpqi_init.c pqi_stop_heartbeat_timer(ctrl_info); ctrl_info 7569 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = false; ctrl_info 7570 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, SIS_MODE); ctrl_info 7573 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_ctrl_unquiesce(struct pqi_ctrl_info *ctrl_info) ctrl_info 7575 drivers/scsi/smartpqi/smartpqi_init.c pqi_ofa_free_host_buffer(ctrl_info); ctrl_info 7576 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = true; ctrl_info 7577 drivers/scsi/smartpqi/smartpqi_init.c pqi_save_ctrl_mode(ctrl_info, PQI_MODE); ctrl_info 7578 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->controller_online = true; ctrl_info 7579 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unblock_requests(ctrl_info); ctrl_info 7580 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_heartbeat_timer(ctrl_info); ctrl_info 7581 drivers/scsi/smartpqi/smartpqi_init.c pqi_schedule_update_time_worker(ctrl_info); ctrl_info 7582 drivers/scsi/smartpqi/smartpqi_init.c pqi_clear_soft_reset_status(ctrl_info, ctrl_info 7584 drivers/scsi/smartpqi/smartpqi_init.c pqi_scan_scsi_devices(ctrl_info); ctrl_info 7587 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_alloc_mem(struct pqi_ctrl_info *ctrl_info, ctrl_info 7597 drivers/scsi/smartpqi/smartpqi_init.c dev = &ctrl_info->pci_dev->dev; ctrl_info 7602 drivers/scsi/smartpqi/smartpqi_init.c ofap = ctrl_info->pqi_ofa_mem_virt_addr; ctrl_info 7607 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_chunk_virt_addr = ctrl_info 7609 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->pqi_ofa_chunk_virt_addr) ctrl_info 7615 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_chunk_virt_addr[i] = ctrl_info 7619 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->pqi_ofa_chunk_virt_addr[i]) ctrl_info 7640 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_chunk_virt_addr[i], ctrl_info 7643 drivers/scsi/smartpqi/smartpqi_init.c kfree(ctrl_info->pqi_ofa_chunk_virt_addr); ctrl_info 7650 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_alloc_host_buffer(struct pqi_ctrl_info *ctrl_info) ctrl_info 7657 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_mem_virt_addr->bytes_allocated); ctrl_info 7661 drivers/scsi/smartpqi/smartpqi_init.c if (!pqi_ofa_alloc_mem(ctrl_info, total_size, chunk_sz)) ctrl_info 7667 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_setup_host_buffer(struct pqi_ctrl_info *ctrl_info, ctrl_info 7673 drivers/scsi/smartpqi/smartpqi_init.c dev = &ctrl_info->pci_dev->dev; ctrl_info 7676 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->pqi_ofa_mem_dma_handle, ctrl_info 7687 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_mem_virt_addr = pqi_ofa_memory; ctrl_info 7689 drivers/scsi/smartpqi/smartpqi_init.c if (pqi_ofa_alloc_host_buffer(ctrl_info) < 0) { ctrl_info 7695 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_ofa_free_host_buffer(struct pqi_ctrl_info *ctrl_info) ctrl_info 7701 drivers/scsi/smartpqi/smartpqi_init.c ofap = ctrl_info->pqi_ofa_mem_virt_addr; ctrl_info 7713 drivers/scsi/smartpqi/smartpqi_init.c dma_free_coherent(&ctrl_info->pci_dev->dev, ctrl_info 7715 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_chunk_virt_addr[i], ctrl_info 7718 drivers/scsi/smartpqi/smartpqi_init.c kfree(ctrl_info->pqi_ofa_chunk_virt_addr); ctrl_info 7721 drivers/scsi/smartpqi/smartpqi_init.c dma_free_coherent(&ctrl_info->pci_dev->dev, ctrl_info 7723 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_mem_dma_handle); ctrl_info 7724 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_ofa_mem_virt_addr = NULL; ctrl_info 7727 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_host_memory_update(struct pqi_ctrl_info *ctrl_info) ctrl_info 7735 drivers/scsi/smartpqi/smartpqi_init.c ofap = ctrl_info->pqi_ofa_mem_virt_addr; ctrl_info 7748 drivers/scsi/smartpqi/smartpqi_init.c put_unaligned_le64((u64)ctrl_info->pqi_ofa_mem_dma_handle, ctrl_info 7755 drivers/scsi/smartpqi/smartpqi_init.c return pqi_submit_raid_request_synchronous(ctrl_info, &request.header, ctrl_info 7759 drivers/scsi/smartpqi/smartpqi_init.c static int pqi_ofa_ctrl_restart(struct pqi_ctrl_info *ctrl_info) ctrl_info 7762 drivers/scsi/smartpqi/smartpqi_init.c return pqi_ctrl_init_resume(ctrl_info); ctrl_info 7785 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_fail_all_outstanding_requests(struct pqi_ctrl_info *ctrl_info) ctrl_info 7791 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->max_io_slots; i++) { ctrl_info 7792 drivers/scsi/smartpqi/smartpqi_init.c io_request = &ctrl_info->io_request_pool[i]; ctrl_info 7810 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_take_ctrl_offline_deferred(struct pqi_ctrl_info *ctrl_info) ctrl_info 7813 drivers/scsi/smartpqi/smartpqi_init.c pqi_stop_heartbeat_timer(ctrl_info); ctrl_info 7814 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_interrupts(ctrl_info); ctrl_info 7815 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_rescan_worker(ctrl_info); ctrl_info 7816 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_update_time_worker(ctrl_info); ctrl_info 7817 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_until_quiesced(ctrl_info); ctrl_info 7818 drivers/scsi/smartpqi/smartpqi_init.c pqi_fail_all_outstanding_requests(ctrl_info); ctrl_info 7819 drivers/scsi/smartpqi/smartpqi_init.c pqi_clear_all_queued_raid_bypass_retries(ctrl_info); ctrl_info 7820 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unblock_requests(ctrl_info); ctrl_info 7825 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 7827 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = container_of(work, struct pqi_ctrl_info, ctrl_offline_work); ctrl_info 7828 drivers/scsi/smartpqi/smartpqi_init.c pqi_take_ctrl_offline_deferred(ctrl_info); ctrl_info 7831 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info) ctrl_info 7833 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info->controller_online) ctrl_info 7836 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->controller_online = false; ctrl_info 7837 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = false; ctrl_info 7838 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_requests(ctrl_info); ctrl_info 7840 drivers/scsi/smartpqi/smartpqi_init.c sis_shutdown_ctrl(ctrl_info); ctrl_info 7841 drivers/scsi/smartpqi/smartpqi_init.c pci_disable_device(ctrl_info->pci_dev); ctrl_info 7842 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, "controller offline\n"); ctrl_info 7843 drivers/scsi/smartpqi/smartpqi_init.c schedule_work(&ctrl_info->ctrl_offline_work); ctrl_info 7864 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 7888 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = pqi_alloc_ctrl_info(node); ctrl_info 7889 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info) { ctrl_info 7895 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pci_dev = pci_dev; ctrl_info 7897 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_pci_init(ctrl_info); ctrl_info 7901 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_ctrl_init(ctrl_info); ctrl_info 7908 drivers/scsi/smartpqi/smartpqi_init.c pqi_remove_ctrl(ctrl_info); ctrl_info 7915 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 7917 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = pci_get_drvdata(pci_dev); ctrl_info 7918 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info) ctrl_info 7921 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->in_shutdown = true; ctrl_info 7923 drivers/scsi/smartpqi/smartpqi_init.c pqi_remove_ctrl(ctrl_info); ctrl_info 7926 drivers/scsi/smartpqi/smartpqi_init.c static void pqi_crash_if_pending_command(struct pqi_ctrl_info *ctrl_info) ctrl_info 7932 drivers/scsi/smartpqi/smartpqi_init.c for (i = 0; i < ctrl_info->max_io_slots; i++) { ctrl_info 7933 drivers/scsi/smartpqi/smartpqi_init.c io_request = &ctrl_info->io_request_pool[i]; ctrl_info 7945 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 7947 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = pci_get_drvdata(pci_dev); ctrl_info 7948 drivers/scsi/smartpqi/smartpqi_init.c if (!ctrl_info) { ctrl_info 7954 drivers/scsi/smartpqi/smartpqi_init.c pqi_disable_events(ctrl_info); ctrl_info 7955 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_ofa_finished(ctrl_info); ctrl_info 7956 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_update_time_worker(ctrl_info); ctrl_info 7957 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_rescan_worker(ctrl_info); ctrl_info 7958 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_event_worker(ctrl_info); ctrl_info 7960 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_shutdown_start(ctrl_info); ctrl_info 7961 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_until_quiesced(ctrl_info); ctrl_info 7963 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_ctrl_wait_for_pending_io(ctrl_info, NO_TIMEOUT); ctrl_info 7970 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_device_reset(ctrl_info); ctrl_info 7971 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_lun_reset_finished(ctrl_info); ctrl_info 7977 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_flush_cache(ctrl_info, SHUTDOWN); ctrl_info 7982 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_requests(ctrl_info); ctrl_info 7984 drivers/scsi/smartpqi/smartpqi_init.c rc = pqi_ctrl_wait_for_pending_sync_cmds(ctrl_info); ctrl_info 7991 drivers/scsi/smartpqi/smartpqi_init.c pqi_crash_if_pending_command(ctrl_info); ctrl_info 7992 drivers/scsi/smartpqi/smartpqi_init.c pqi_reset(ctrl_info); ctrl_info 8022 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 8024 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = pci_get_drvdata(pci_dev); ctrl_info 8026 drivers/scsi/smartpqi/smartpqi_init.c pqi_disable_events(ctrl_info); ctrl_info 8027 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_update_time_worker(ctrl_info); ctrl_info 8028 drivers/scsi/smartpqi/smartpqi_init.c pqi_cancel_rescan_worker(ctrl_info); ctrl_info 8029 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_scan_finished(ctrl_info); ctrl_info 8030 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_lun_reset_finished(ctrl_info); ctrl_info 8031 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_ofa_finished(ctrl_info); ctrl_info 8032 drivers/scsi/smartpqi/smartpqi_init.c pqi_flush_cache(ctrl_info, SUSPEND); ctrl_info 8033 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_block_requests(ctrl_info); ctrl_info 8034 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_until_quiesced(ctrl_info); ctrl_info 8035 drivers/scsi/smartpqi/smartpqi_init.c pqi_wait_until_inbound_queues_empty(ctrl_info); ctrl_info 8036 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_wait_for_pending_io(ctrl_info, NO_TIMEOUT); ctrl_info 8037 drivers/scsi/smartpqi/smartpqi_init.c pqi_stop_heartbeat_timer(ctrl_info); ctrl_info 8045 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->controller_online = false; ctrl_info 8046 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->pqi_mode_enabled = false; ctrl_info 8054 drivers/scsi/smartpqi/smartpqi_init.c struct pqi_ctrl_info *ctrl_info; ctrl_info 8056 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info = pci_get_drvdata(pci_dev); ctrl_info 8059 drivers/scsi/smartpqi/smartpqi_init.c ctrl_info->max_hw_queue_index = 0; ctrl_info 8060 drivers/scsi/smartpqi/smartpqi_init.c pqi_free_interrupts(ctrl_info); ctrl_info 8061 drivers/scsi/smartpqi/smartpqi_init.c pqi_change_irq_mode(ctrl_info, IRQ_MODE_INTX); ctrl_info 8064 drivers/scsi/smartpqi/smartpqi_init.c &ctrl_info->queue_groups[0]); ctrl_info 8066 drivers/scsi/smartpqi/smartpqi_init.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 8071 drivers/scsi/smartpqi/smartpqi_init.c pqi_start_heartbeat_timer(ctrl_info); ctrl_info 8072 drivers/scsi/smartpqi/smartpqi_init.c pqi_ctrl_unblock_requests(ctrl_info); ctrl_info 8079 drivers/scsi/smartpqi/smartpqi_init.c return pqi_ctrl_init_resume(ctrl_info); ctrl_info 200 drivers/scsi/smartpqi/smartpqi_sas_transport.c struct pqi_ctrl_info *ctrl_info, struct sas_rphy *rphy) ctrl_info 204 drivers/scsi/smartpqi/smartpqi_sas_transport.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 215 drivers/scsi/smartpqi/smartpqi_sas_transport.c int pqi_add_sas_host(struct Scsi_Host *shost, struct pqi_ctrl_info *ctrl_info) ctrl_info 230 drivers/scsi/smartpqi/smartpqi_sas_transport.c ctrl_info->sas_address, NULL); ctrl_info 246 drivers/scsi/smartpqi/smartpqi_sas_transport.c ctrl_info->sas_host = pqi_sas_node; ctrl_info 260 drivers/scsi/smartpqi/smartpqi_sas_transport.c void pqi_delete_sas_host(struct pqi_ctrl_info *ctrl_info) ctrl_info 262 drivers/scsi/smartpqi/smartpqi_sas_transport.c pqi_free_sas_node(ctrl_info->sas_host); ctrl_info 319 drivers/scsi/smartpqi/smartpqi_sas_transport.c struct pqi_ctrl_info *ctrl_info; ctrl_info 327 drivers/scsi/smartpqi/smartpqi_sas_transport.c ctrl_info = shost_to_hba(shost); ctrl_info 328 drivers/scsi/smartpqi/smartpqi_sas_transport.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 329 drivers/scsi/smartpqi/smartpqi_sas_transport.c found_device = pqi_find_device_by_sas_rphy(ctrl_info, rphy); ctrl_info 349 drivers/scsi/smartpqi/smartpqi_sas_transport.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 369 drivers/scsi/smartpqi/smartpqi_sas_transport.c list_for_each_entry(device, &ctrl_info->scsi_device_list, ctrl_info 382 drivers/scsi/smartpqi/smartpqi_sas_transport.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 393 drivers/scsi/smartpqi/smartpqi_sas_transport.c struct pqi_ctrl_info *ctrl_info; ctrl_info 401 drivers/scsi/smartpqi/smartpqi_sas_transport.c ctrl_info = shost_to_hba(shost); ctrl_info 402 drivers/scsi/smartpqi/smartpqi_sas_transport.c spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 403 drivers/scsi/smartpqi/smartpqi_sas_transport.c device = pqi_find_device_by_sas_rphy(ctrl_info, rphy); ctrl_info 416 drivers/scsi/smartpqi/smartpqi_sas_transport.c spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags); ctrl_info 515 drivers/scsi/smartpqi/smartpqi_sas_transport.c struct pqi_ctrl_info *ctrl_info = shost_to_hba(shost); ctrl_info 520 drivers/scsi/smartpqi/smartpqi_sas_transport.c pqi_ctrl_busy(ctrl_info); ctrl_info 542 drivers/scsi/smartpqi/smartpqi_sas_transport.c if (pqi_ctrl_offline(ctrl_info)) { ctrl_info 547 drivers/scsi/smartpqi/smartpqi_sas_transport.c if (pqi_ctrl_blocked(ctrl_info)) { ctrl_info 558 drivers/scsi/smartpqi/smartpqi_sas_transport.c rc = pqi_csmi_smp_passthru(ctrl_info, smp_buf, sizeof(*smp_buf), ctrl_info 566 drivers/scsi/smartpqi/smartpqi_sas_transport.c pqi_ctrl_unbusy(ctrl_info); ctrl_info 81 drivers/scsi/smartpqi/smartpqi_sis.c static int sis_wait_for_ctrl_ready_with_timeout(struct pqi_ctrl_info *ctrl_info, ctrl_info 90 drivers/scsi/smartpqi/smartpqi_sis.c status = readl(&ctrl_info->registers->sis_firmware_status); ctrl_info 93 drivers/scsi/smartpqi/smartpqi_sis.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 96 drivers/scsi/smartpqi/smartpqi_sis.c &ctrl_info->registers->sis_mailbox[7])); ctrl_info 103 drivers/scsi/smartpqi/smartpqi_sis.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 114 drivers/scsi/smartpqi/smartpqi_sis.c int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info) ctrl_info 116 drivers/scsi/smartpqi/smartpqi_sis.c return sis_wait_for_ctrl_ready_with_timeout(ctrl_info, ctrl_info 120 drivers/scsi/smartpqi/smartpqi_sis.c int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info) ctrl_info 122 drivers/scsi/smartpqi/smartpqi_sis.c return sis_wait_for_ctrl_ready_with_timeout(ctrl_info, ctrl_info 126 drivers/scsi/smartpqi/smartpqi_sis.c bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info) ctrl_info 131 drivers/scsi/smartpqi/smartpqi_sis.c status = readl(&ctrl_info->registers->sis_firmware_status); ctrl_info 139 drivers/scsi/smartpqi/smartpqi_sis.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 141 drivers/scsi/smartpqi/smartpqi_sis.c readl(&ctrl_info->registers->sis_mailbox[7])); ctrl_info 146 drivers/scsi/smartpqi/smartpqi_sis.c bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info) ctrl_info 148 drivers/scsi/smartpqi/smartpqi_sis.c return readl(&ctrl_info->registers->sis_firmware_status) & ctrl_info 157 drivers/scsi/smartpqi/smartpqi_sis.c static int sis_send_sync_cmd(struct pqi_ctrl_info *ctrl_info, ctrl_info 166 drivers/scsi/smartpqi/smartpqi_sis.c registers = ctrl_info->registers; ctrl_info 212 drivers/scsi/smartpqi/smartpqi_sis.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 233 drivers/scsi/smartpqi/smartpqi_sis.c int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info) ctrl_info 242 drivers/scsi/smartpqi/smartpqi_sis.c rc = sis_send_sync_cmd(ctrl_info, SIS_CMD_GET_ADAPTER_PROPERTIES, ctrl_info 259 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->pqi_reset_quiesce_supported = true; ctrl_info 264 drivers/scsi/smartpqi/smartpqi_sis.c int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info) ctrl_info 271 drivers/scsi/smartpqi/smartpqi_sis.c rc = sis_send_sync_cmd(ctrl_info, SIS_CMD_GET_PQI_CAPABILITIES, ctrl_info 276 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->max_sg_entries = params.mailbox[1]; ctrl_info 277 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->max_transfer_size = params.mailbox[2]; ctrl_info 278 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->max_outstanding_requests = params.mailbox[3]; ctrl_info 279 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->config_table_offset = params.mailbox[4]; ctrl_info 280 drivers/scsi/smartpqi/smartpqi_sis.c ctrl_info->config_table_length = params.mailbox[5]; ctrl_info 285 drivers/scsi/smartpqi/smartpqi_sis.c int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info) ctrl_info 301 drivers/scsi/smartpqi/smartpqi_sis.c error_buffer_paddr = (unsigned long)ctrl_info->error_buffer_dma_handle; ctrl_info 310 drivers/scsi/smartpqi/smartpqi_sis.c put_unaligned_le32(ctrl_info->max_io_slots, ctrl_info 313 drivers/scsi/smartpqi/smartpqi_sis.c bus_address = dma_map_single(&ctrl_info->pci_dev->dev, base_struct, ctrl_info 315 drivers/scsi/smartpqi/smartpqi_sis.c if (dma_mapping_error(&ctrl_info->pci_dev->dev, bus_address)) { ctrl_info 325 drivers/scsi/smartpqi/smartpqi_sis.c rc = sis_send_sync_cmd(ctrl_info, SIS_CMD_INIT_BASE_STRUCT_ADDRESS, ctrl_info 328 drivers/scsi/smartpqi/smartpqi_sis.c dma_unmap_single(&ctrl_info->pci_dev->dev, bus_address, ctrl_info 339 drivers/scsi/smartpqi/smartpqi_sis.c struct pqi_ctrl_info *ctrl_info, u32 bit) ctrl_info 349 drivers/scsi/smartpqi/smartpqi_sis.c readl(&ctrl_info->registers->sis_host_to_ctrl_doorbell); ctrl_info 352 drivers/scsi/smartpqi/smartpqi_sis.c if (readl(&ctrl_info->registers->sis_firmware_status) & ctrl_info 358 drivers/scsi/smartpqi/smartpqi_sis.c dev_err(&ctrl_info->pci_dev->dev, ctrl_info 370 drivers/scsi/smartpqi/smartpqi_sis.c static inline int sis_set_doorbell_bit(struct pqi_ctrl_info *ctrl_info, u32 bit) ctrl_info 372 drivers/scsi/smartpqi/smartpqi_sis.c writel(bit, &ctrl_info->registers->sis_host_to_ctrl_doorbell); ctrl_info 374 drivers/scsi/smartpqi/smartpqi_sis.c return sis_wait_for_doorbell_bit_to_clear(ctrl_info, bit); ctrl_info 377 drivers/scsi/smartpqi/smartpqi_sis.c void sis_enable_msix(struct pqi_ctrl_info *ctrl_info) ctrl_info 379 drivers/scsi/smartpqi/smartpqi_sis.c sis_set_doorbell_bit(ctrl_info, SIS_ENABLE_MSIX); ctrl_info 382 drivers/scsi/smartpqi/smartpqi_sis.c void sis_enable_intx(struct pqi_ctrl_info *ctrl_info) ctrl_info 384 drivers/scsi/smartpqi/smartpqi_sis.c sis_set_doorbell_bit(ctrl_info, SIS_ENABLE_INTX); ctrl_info 387 drivers/scsi/smartpqi/smartpqi_sis.c void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info) ctrl_info 389 drivers/scsi/smartpqi/smartpqi_sis.c if (readl(&ctrl_info->registers->sis_firmware_status) & ctrl_info 394 drivers/scsi/smartpqi/smartpqi_sis.c &ctrl_info->registers->sis_host_to_ctrl_doorbell); ctrl_info 397 drivers/scsi/smartpqi/smartpqi_sis.c int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info) ctrl_info 399 drivers/scsi/smartpqi/smartpqi_sis.c return sis_set_doorbell_bit(ctrl_info, SIS_PQI_RESET_QUIESCE); ctrl_info 402 drivers/scsi/smartpqi/smartpqi_sis.c int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info) ctrl_info 404 drivers/scsi/smartpqi/smartpqi_sis.c return sis_set_doorbell_bit(ctrl_info, SIS_REENABLE_SIS_MODE); ctrl_info 407 drivers/scsi/smartpqi/smartpqi_sis.c void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value) ctrl_info 409 drivers/scsi/smartpqi/smartpqi_sis.c writel(value, &ctrl_info->registers->sis_driver_scratch); ctrl_info 412 drivers/scsi/smartpqi/smartpqi_sis.c u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info) ctrl_info 414 drivers/scsi/smartpqi/smartpqi_sis.c return readl(&ctrl_info->registers->sis_driver_scratch); ctrl_info 417 drivers/scsi/smartpqi/smartpqi_sis.c void sis_soft_reset(struct pqi_ctrl_info *ctrl_info) ctrl_info 420 drivers/scsi/smartpqi/smartpqi_sis.c &ctrl_info->registers->sis_host_to_ctrl_doorbell); ctrl_info 15 drivers/scsi/smartpqi/smartpqi_sis.h int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info); ctrl_info 16 drivers/scsi/smartpqi/smartpqi_sis.h int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info); ctrl_info 17 drivers/scsi/smartpqi/smartpqi_sis.h bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info); ctrl_info 18 drivers/scsi/smartpqi/smartpqi_sis.h bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info); ctrl_info 19 drivers/scsi/smartpqi/smartpqi_sis.h int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info); ctrl_info 20 drivers/scsi/smartpqi/smartpqi_sis.h int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info); ctrl_info 21 drivers/scsi/smartpqi/smartpqi_sis.h int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info); ctrl_info 22 drivers/scsi/smartpqi/smartpqi_sis.h void sis_enable_msix(struct pqi_ctrl_info *ctrl_info); ctrl_info 23 drivers/scsi/smartpqi/smartpqi_sis.h void sis_enable_intx(struct pqi_ctrl_info *ctrl_info); ctrl_info 24 drivers/scsi/smartpqi/smartpqi_sis.h void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info); ctrl_info 25 drivers/scsi/smartpqi/smartpqi_sis.h int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info); ctrl_info 26 drivers/scsi/smartpqi/smartpqi_sis.h int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info); ctrl_info 27 drivers/scsi/smartpqi/smartpqi_sis.h void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value); ctrl_info 28 drivers/scsi/smartpqi/smartpqi_sis.h u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info); ctrl_info 29 drivers/scsi/smartpqi/smartpqi_sis.h void sis_soft_reset(struct pqi_ctrl_info *ctrl_info); ctrl_info 542 net/atm/mpc.c if (entry->ctrl_info.tag != 0) { ctrl_info 544 net/atm/mpc.c mpc->dev->name, entry->ctrl_info.tag); ctrl_info 545 net/atm/mpc.c tagged_llc_snap_hdr.tag = entry->ctrl_info.tag; ctrl_info 638 net/atm/mpc.c mpc->dev->name, &in_entry->ctrl_info.in_dst_ip); ctrl_info 670 net/atm/mpc.c mpc->dev->name, &in_entry->ctrl_info.in_dst_ip); ctrl_info 761 net/atm/mpc.c new_skb = skb_realloc_headroom(skb, eg->ctrl_info.DH_length); ctrl_info 768 net/atm/mpc.c skb_push(new_skb, eg->ctrl_info.DH_length); /* add MAC header */ ctrl_info 769 net/atm/mpc.c skb_copy_to_linear_data(new_skb, eg->ctrl_info.DLL_header, ctrl_info 770 net/atm/mpc.c eg->ctrl_info.DH_length); ctrl_info 1090 net/atm/mpc.c msg->content.in_info = entry->ctrl_info; ctrl_info 1100 net/atm/mpc.c msg->content.in_info = entry->ctrl_info; ctrl_info 1177 net/atm/mpc.c entry->ctrl_info = msg->content.in_info; ctrl_info 1270 net/atm/mpc.c purge_msg->content.eg_info = entry->ctrl_info; ctrl_info 1400 net/atm/mpc.c msg->content.eg_info = entry->ctrl_info; ctrl_info 1401 net/atm/mpc.c dprintk("cache_id %u\n", entry->ctrl_info.cache_id); ctrl_info 43 net/atm/mpoa_caches.c if (entry->ctrl_info.in_dst_ip == dst_ip) { ctrl_info 64 net/atm/mpoa_caches.c if ((entry->ctrl_info.in_dst_ip & mask) == (dst_ip & mask)) { ctrl_info 119 net/atm/mpoa_caches.c entry->ctrl_info.in_dst_ip = dst_ip; ctrl_info 124 net/atm/mpoa_caches.c entry->ctrl_info.holding_time = HOLDING_TIME_DEFAULT; ctrl_info 145 net/atm/mpoa_caches.c msg.content.in_info = entry->ctrl_info; ctrl_info 147 net/atm/mpoa_caches.c qos = atm_mpoa_search_qos(entry->ctrl_info.in_dst_ip); ctrl_info 165 net/atm/mpoa_caches.c mpc->dev->name, &entry->ctrl_info.in_dst_ip); ctrl_info 169 net/atm/mpoa_caches.c msg.content.in_info = entry->ctrl_info; ctrl_info 170 net/atm/mpoa_caches.c qos = atm_mpoa_search_qos(entry->ctrl_info.in_dst_ip); ctrl_info 198 net/atm/mpoa_caches.c &entry->ctrl_info.in_dst_ip); ctrl_info 238 net/atm/mpoa_caches.c if ((now - entry->time) > entry->ctrl_info.holding_time) { ctrl_info 240 net/atm/mpoa_caches.c &entry->ctrl_info.in_dst_ip); ctrl_info 285 net/atm/mpoa_caches.c msg.content.in_info = entry->ctrl_info; ctrl_info 286 net/atm/mpoa_caches.c qos = atm_mpoa_search_qos(entry->ctrl_info.in_dst_ip); ctrl_info 311 net/atm/mpoa_caches.c entry->refresh_time = (2 * (entry->ctrl_info.holding_time))/3; ctrl_info 340 net/atm/mpoa_caches.c if (entry->ctrl_info.cache_id == cache_id) { ctrl_info 361 net/atm/mpoa_caches.c if (entry->ctrl_info.tag == tag) { ctrl_info 479 net/atm/mpoa_caches.c entry->ctrl_info = msg->content.eg_info; ctrl_info 483 net/atm/mpoa_caches.c ntohl(entry->ctrl_info.cache_id)); ctrl_info 484 net/atm/mpoa_caches.c dprintk("mps_ip = %pI4\n", &entry->ctrl_info.mps_ip); ctrl_info 497 net/atm/mpoa_caches.c entry->ctrl_info.holding_time = holding_time; ctrl_info 512 net/atm/mpoa_caches.c if ((now - entry->time) > entry->ctrl_info.holding_time) { ctrl_info 514 net/atm/mpoa_caches.c msg.content.eg_info = entry->ctrl_info; ctrl_info 516 net/atm/mpoa_caches.c ntohl(entry->ctrl_info.cache_id)); ctrl_info 30 net/atm/mpoa_caches.h struct in_ctrl_info ctrl_info; ctrl_info 63 net/atm/mpoa_caches.h struct eg_ctrl_info ctrl_info; ctrl_info 155 net/atm/mpoa_proc.c sprintf(ip_string, "%pI4", &in_entry->ctrl_info.in_dst_ip); ctrl_info 159 net/atm/mpoa_proc.c in_entry->ctrl_info.holding_time - ctrl_info 172 net/atm/mpoa_proc.c unsigned char *p = eg_entry->ctrl_info.in_MPC_data_ATM_addr; ctrl_info 178 net/atm/mpoa_proc.c (unsigned long)ntohl(eg_entry->ctrl_info.cache_id), ctrl_info 180 net/atm/mpoa_proc.c (eg_entry->ctrl_info.holding_time - seconds_delta),