ctlr_info
static void set_performant_mode(struct ctlr_info *h, struct CommandList *c,
static void set_ioaccel1_performant_mode(struct ctlr_info *h,
static void set_ioaccel2_tmf_performant_mode(struct ctlr_info *h,
static void set_ioaccel2_performant_mode(struct ctlr_info *h,
static void dial_down_lockup_detection_during_fw_flash(struct ctlr_info *h,
static void dial_up_lockup_detection_on_fw_flash_complete(struct ctlr_info *h,
static void __enqueue_cmd_and_start_io(struct ctlr_info *h,
static void enqueue_cmd_and_start_io(struct ctlr_info *h, struct CommandList *c)
static inline int is_scsi_rev_5(struct ctlr_info *h)
static int hpsa_find_target_lun(struct ctlr_info *h,
static void hpsa_show_dev_msg(const char *level, struct ctlr_info *h,
static int hpsa_scsi_add_entry(struct ctlr_info *h,
static void hpsa_scsi_update_entry(struct ctlr_info *h,
static void hpsa_scsi_replace_entry(struct ctlr_info *h,
static void hpsa_scsi_remove_entry(struct ctlr_info *h, int entry,
static void fixup_botched_add(struct ctlr_info *h,
static void hpsa_monitor_offline_device(struct ctlr_info *h,
static void hpsa_show_volume_status(struct ctlr_info *h,
static void hpsa_figure_phys_disk_ptrs(struct ctlr_info *h,
static void hpsa_update_log_drive_phys_drive_ptrs(struct ctlr_info *h,
static int hpsa_add_device(struct ctlr_info *h, struct hpsa_scsi_dev_t *device)
static int hpsa_find_outstanding_commands_for_dev(struct ctlr_info *h,
static void hpsa_wait_for_outstanding_commands_for_dev(struct ctlr_info *h,
static void hpsa_remove_device(struct ctlr_info *h,
static void adjust_hpsa_scsi_table(struct ctlr_info *h,
static struct hpsa_scsi_dev_t *lookup_hpsa_scsi_dev(struct ctlr_info *h,
struct ctlr_info *h;
static void hpsa_free_ioaccel2_sg_chain_blocks(struct ctlr_info *h)
static int hpsa_allocate_ioaccel2_sg_chain_blocks(struct ctlr_info *h)
static void hpsa_free_sg_chain_blocks(struct ctlr_info *h)
static int hpsa_alloc_sg_chain_blocks(struct ctlr_info *h)
static int hpsa_map_ioaccel2_sg_chain_block(struct ctlr_info *h,
static void hpsa_unmap_ioaccel2_sg_chain_block(struct ctlr_info *h,
static int hpsa_map_sg_chain_block(struct ctlr_info *h,
static void hpsa_unmap_sg_chain_block(struct ctlr_info *h,
static int handle_ioaccel_mode2_error(struct ctlr_info *h,
static int hpsa_add_sas_host(struct ctlr_info *h);
static void hpsa_delete_sas_host(struct ctlr_info *h);
*hpsa_find_device_by_sas_rphy(struct ctlr_info *h,
static void hpsa_cmd_resolve_events(struct ctlr_info *h,
static void hpsa_cmd_resolve_and_free(struct ctlr_info *h,
static void hpsa_cmd_free_and_done(struct ctlr_info *h,
static void hpsa_retry_cmd(struct ctlr_info *h, struct CommandList *c)
static void process_ioaccel2_completion(struct ctlr_info *h,
static int hpsa_evaluate_tmf_status(struct ctlr_info *h,
struct ctlr_info *h;
static int hpsa_passthru_ioctl(struct ctlr_info *h,
static int hpsa_big_passthru_ioctl(struct ctlr_info *h,
static void cmd_free(struct ctlr_info *h, struct CommandList *c);
static struct CommandList *cmd_alloc(struct ctlr_info *h);
static void cmd_tagged_free(struct ctlr_info *h, struct CommandList *c);
static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h,
static int fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h,
static void hpsa_free_cmd_pool(struct ctlr_info *h);
static int hpsa_scsi_do_simple_cmd_core(struct ctlr_info *h,
static int hpsa_scsi_do_simple_cmd(struct ctlr_info *h, struct CommandList *c,
static u32 lockup_detected(struct ctlr_info *h)
static int hpsa_scsi_do_simple_cmd_with_retry(struct ctlr_info *h,
static void hpsa_print_cmd(struct ctlr_info *h, char *txt,
static void hpsa_scsi_interpret_error(struct ctlr_info *h,
static void hpsa_update_scsi_devices(struct ctlr_info *h);
static int check_for_unit_attention(struct ctlr_info *h,
static void check_ioctl_unit_attention(struct ctlr_info *h,
static int hpsa_do_receive_diagnostic(struct ctlr_info *h, u8 *scsi3addr,
static void hpsa_free_performant_mode(struct ctlr_info *h);
static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h);
static u64 hpsa_get_enclosure_logical_identifier(struct ctlr_info *h,
static inline u32 next_command(struct ctlr_info *h, u8 q);
static int hpsa_scsi_do_inquiry(struct ctlr_info *h, unsigned char *scsi3addr,
static int hpsa_send_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev,
static int wait_for_device_to_become_ready(struct ctlr_info *h,
static bool hpsa_cmd_dev_match(struct ctlr_info *h, struct CommandList *c,
static int hpsa_wait_for_mode_change_ack(struct ctlr_info *h);
static int hpsa_do_reset(struct ctlr_info *h, struct hpsa_scsi_dev_t *dev,
static void hpsa_drain_accel_commands(struct ctlr_info *h);
static void hpsa_get_raid_level(struct ctlr_info *h,
static void hpsa_flush_cache(struct ctlr_info *h);
static int hpsa_scsi_ioaccel_queue_command(struct ctlr_info *h,
static void hpsa_debug_map_buff(struct ctlr_info *h, int rc,
static u32 lockup_detected(struct ctlr_info *h);
static int detect_controller_lockup(struct ctlr_info *h);
static void hpsa_disable_rld_caching(struct ctlr_info *h);
static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h,
static void hpsa_debug_map_buff(__attribute__((unused)) struct ctlr_info *h,
static int hpsa_get_raid_map(struct ctlr_info *h,
static bool hpsa_vpd_page_supported(struct ctlr_info *h,
static int hpsa_luns_changed(struct ctlr_info *h);
static bool hpsa_cmd_dev_match(struct ctlr_info *h, struct CommandList *c,
static int hpsa_bmic_sense_subsystem_information(struct ctlr_info *h,
static inline struct ctlr_info *sdev_to_hba(struct scsi_device *sdev)
static int hpsa_bmic_id_controller(struct ctlr_info *h,
static int hpsa_bmic_id_physical_device(struct ctlr_info *h,
return (struct ctlr_info *) *priv;
static inline struct ctlr_info *shost_to_hba(struct Scsi_Host *sh)
static void hpsa_get_enclosure_info(struct ctlr_info *h,
return (struct ctlr_info *) *priv;
static u64 hpsa_get_sas_address_from_report_physical(struct ctlr_info *h,
static void hpsa_get_sas_address(struct ctlr_info *h, unsigned char *scsi3addr,
static void hpsa_ext_ctrl_present(struct ctlr_info *h,
static bool hpsa_vpd_page_supported(struct ctlr_info *h,
static void hpsa_get_ioaccel_status(struct ctlr_info *h,
static int hpsa_get_device_id(struct ctlr_info *h, unsigned char *scsi3addr,
static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical,
static int check_for_unit_attention(struct ctlr_info *h,
static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h,
static inline int hpsa_scsi_do_report_log_luns(struct ctlr_info *h,
static int hpsa_get_volume_status(struct ctlr_info *h,
static unsigned char hpsa_volume_offline(struct ctlr_info *h,
static int hpsa_update_device_info(struct ctlr_info *h,
static void figure_bus_target_lun(struct ctlr_info *h,
static int figure_external_status(struct ctlr_info *h, int raid_ctlr_position,
static int hpsa_gather_lun_info(struct ctlr_info *h,
static u8 *figure_lunaddrbytes(struct ctlr_info *h, int raid_ctlr_position,
static void hpsa_get_ioaccel_drive_info(struct ctlr_info *h,
static int hpsa_set_local_logical_count(struct ctlr_info *h,
static bool hpsa_is_disk_spare(struct ctlr_info *h, u8 *lunaddrbytes)
static bool hpsa_skip_device(struct ctlr_info *h, u8 *lunaddrbytes,
static int check_for_busy(struct ctlr_info *h, struct CommandList *c)
static void hpsa_update_scsi_devices(struct ctlr_info *h)
static u32 lockup_detected(struct ctlr_info *h);
struct ctlr_info *h;
static int hpsa_scatter_gather(struct ctlr_info *h,
struct ctlr_info *h;
static inline void warn_zero_length_transfer(struct ctlr_info *h,
static int hpsa_scsi_ioaccel1_queue_command(struct ctlr_info *h,
struct ctlr_info *h;
static int hpsa_scsi_ioaccel_direct_map(struct ctlr_info *h,
static void set_encrypt_ioaccel2(struct ctlr_info *h,
static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h,
struct ctlr_info *h;
static int hpsa_scsi_ioaccel_queue_command(struct ctlr_info *h,
static int hpsa_scsi_ioaccel_raid_map(struct ctlr_info *h,
struct ctlr_info *h;
struct ctlr_info *h = shost_to_hba(shost);
struct ctlr_info *h;
static int hpsa_ciss_submit(struct ctlr_info *h,
struct ctlr_info *h;
static void hpsa_cmd_init(struct ctlr_info *h, int index,
static void hpsa_preinitialize_commands(struct ctlr_info *h)
static inline void hpsa_cmd_partial_init(struct ctlr_info *h, int index,
static int hpsa_ioaccel_submit(struct ctlr_info *h,
struct ctlr_info *h = c->h;
struct ctlr_info *h;
static void hpsa_scan_complete(struct ctlr_info *h)
struct ctlr_info *h = shost_to_hba(sh);
struct ctlr_info *h = shost_to_hba(sh);
static int hpsa_scsi_host_alloc(struct ctlr_info *h)
sh = scsi_host_alloc(&hpsa_driver_template, sizeof(struct ctlr_info *));
static int hpsa_scsi_add_host(struct ctlr_info *h)
static int hpsa_send_test_unit_ready(struct ctlr_info *h,
static int hpsa_wait_for_test_unit_ready(struct ctlr_info *h,
static int wait_for_device_to_become_ready(struct ctlr_info *h,
struct ctlr_info *h;
static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h,
static void cmd_tagged_free(struct ctlr_info *h, struct CommandList *c)
static struct CommandList *cmd_alloc(struct ctlr_info *h)
static void cmd_free(struct ctlr_info *h, struct CommandList *c)
struct ctlr_info *h = sdev_to_hba(dev);
struct ctlr_info *h = sdev_to_hba(dev);
struct ctlr_info *h;
static int hpsa_getpciinfo_ioctl(struct ctlr_info *h, void __user *argp)
static int hpsa_getdrivver_ioctl(struct ctlr_info *h, void __user *argp)
static int hpsa_passthru_ioctl(struct ctlr_info *h,
static int hpsa_big_passthru_ioctl(struct ctlr_info *h,
static void check_ioctl_unit_attention(struct ctlr_info *h,
struct ctlr_info *h = sdev_to_hba(dev);
static void hpsa_send_host_reset(struct ctlr_info *h, u8 reset_type)
static int fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h,
struct ctlr_info *h;
static inline unsigned long get_next_completion(struct ctlr_info *h, u8 q)
static inline bool interrupt_pending(struct ctlr_info *h)
static inline long interrupt_not_for_us(struct ctlr_info *h)
static inline int bad_tag(struct ctlr_info *h, u32 tag_index,
static inline void process_indexed_cmd(struct ctlr_info *h,
static int ignore_bogus_interrupt(struct ctlr_info *h)
static struct ctlr_info *queue_to_hba(u8 *queue)
return container_of((queue - *queue), struct ctlr_info, q[0]);
struct ctlr_info *h = queue_to_hba(queue);
struct ctlr_info *h;
struct ctlr_info *h = queue_to_hba(queue);
struct ctlr_info *h = queue_to_hba((u8 *) queue);
struct ctlr_info *h = queue_to_hba(queue);
struct ctlr_info *h;
static void hpsa_disable_interrupt_mode(struct ctlr_info *h)
static void hpsa_setup_reply_map(struct ctlr_info *h)
static int hpsa_interrupt_mode(struct ctlr_info *h)
struct ctlr_info *h;
static void hpsa_free_cfgtables(struct ctlr_info *h)
static int hpsa_find_cfgtables(struct ctlr_info *h)
static void hpsa_get_max_perf_mode_cmds(struct ctlr_info *h)
static int hpsa_supports_chained_sg_blocks(struct ctlr_info *h)
static void hpsa_find_board_params(struct ctlr_info *h)
static inline bool hpsa_CISS_signature_present(struct ctlr_info *h)
static inline void hpsa_set_driver_support_bits(struct ctlr_info *h)
struct ctlr_info *h;
static inline void hpsa_p600_dma_prefetch_quirk(struct ctlr_info *h)
static int hpsa_wait_for_clear_event_notify_ack(struct ctlr_info *h)
static int hpsa_wait_for_mode_change_ack(struct ctlr_info *h)
static int hpsa_enter_simple_mode(struct ctlr_info *h)
static void hpsa_free_pci_init(struct ctlr_info *h)
static int hpsa_pci_init(struct ctlr_info *h)
static void hpsa_hba_inquiry(struct ctlr_info *h)
static void hpsa_free_cmd_pool(struct ctlr_info *h)
struct ctlr_info *h;
static int hpsa_alloc_cmd_pool(struct ctlr_info *h)
static void hpsa_free_irqs(struct ctlr_info *h)
static int hpsa_request_irqs(struct ctlr_info *h,
static int hpsa_kdump_soft_reset(struct ctlr_info *h)
static void hpsa_free_reply_queues(struct ctlr_info *h)
static void hpsa_undo_allocations_after_kdump_soft_reset(struct ctlr_info *h)
static void fail_all_outstanding_cmds(struct ctlr_info *h)
static void set_lockup_detected_for_all_cpus(struct ctlr_info *h, u32 value)
static void controller_lockup_detected(struct ctlr_info *h)
static int detect_controller_lockup(struct ctlr_info *h)
static void hpsa_set_ioaccel_status(struct ctlr_info *h)
static void hpsa_ack_ctlr_events(struct ctlr_info *h)
static int hpsa_ctlr_needs_rescan(struct ctlr_info *h)
static int hpsa_offline_devices_ready(struct ctlr_info *h)
static int hpsa_luns_changed(struct ctlr_info *h)
static void hpsa_perform_rescan(struct ctlr_info *h)
struct ctlr_info *h = container_of(to_delayed_work(work),
struct ctlr_info, event_monitor_work);
struct ctlr_info *h = container_of(to_delayed_work(work),
struct ctlr_info, rescan_ctlr_work);
struct ctlr_info *h = container_of(to_delayed_work(work),
struct ctlr_info, monitor_ctlr_work);
static struct workqueue_struct *hpsa_create_controller_wq(struct ctlr_info *h,
static void hpda_free_ctlr_info(struct ctlr_info *h)
static struct ctlr_info *hpda_alloc_ctlr_info(void)
struct ctlr_info *h;
struct ctlr_info *h;
struct ctlr_info *h;
static void hpsa_flush_cache(struct ctlr_info *h)
static void hpsa_disable_rld_caching(struct ctlr_info *h)
struct ctlr_info *h;
struct ctlr_info *h;
static void hpsa_free_device_info(struct ctlr_info *h)
struct ctlr_info *h;
static int hpsa_enter_performant_mode(struct ctlr_info *h, u32 trans_support)
static void hpsa_free_ioaccel1_cmd_and_bft(struct ctlr_info *h)
static int hpsa_alloc_ioaccel1_cmd_and_bft(struct ctlr_info *h)
static void hpsa_free_ioaccel2_cmd_and_bft(struct ctlr_info *h)
static int hpsa_alloc_ioaccel2_cmd_and_bft(struct ctlr_info *h)
static void hpsa_free_performant_mode(struct ctlr_info *h)
static int hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
static void hpsa_drain_accel_commands(struct ctlr_info *h)
*hpsa_find_device_by_sas_rphy(struct ctlr_info *h,
static int hpsa_add_sas_host(struct ctlr_info *h)
static void hpsa_delete_sas_host(struct ctlr_info *h)
struct ctlr_info *h;
static inline u32 next_command(struct ctlr_info *h, u8 q)
struct ctlr_info;
void (*submit_command)(struct ctlr_info *h,
void (*set_intr_mask)(struct ctlr_info *h, unsigned long val);
bool (*intr_pending)(struct ctlr_info *h);
unsigned long (*command_completed)(struct ctlr_info *h, u8 q);
static void SA5_submit_command(struct ctlr_info *h,
static void SA5_submit_command_no_read(struct ctlr_info *h,
static void SA5_submit_command_ioaccel2(struct ctlr_info *h,
static void SA5_intr_mask(struct ctlr_info *h, unsigned long val)
static void SA5B_intr_mask(struct ctlr_info *h, unsigned long val)
static void SA5_performant_intr_mask(struct ctlr_info *h, unsigned long val)
static unsigned long SA5_performant_completed(struct ctlr_info *h, u8 q)
static unsigned long SA5_completed(struct ctlr_info *h,
static bool SA5_intr_pending(struct ctlr_info *h)
static bool SA5_performant_intr_pending(struct ctlr_info *h)
static bool SA5_ioaccel_mode1_intr_pending(struct ctlr_info *h)
static bool SA5B_intr_pending(struct ctlr_info *h)
static unsigned long SA5_ioaccel_mode1_completed(struct ctlr_info *h, u8 q)
struct ctlr_info; /* defined in hpsa.h */
struct ctlr_info *h;
if (sdev->channel < cs->ctlr_info->physchan_present) {
if (sdev->channel >= cs->ctlr_info->physchan_present) {
if (sdev->channel < cs->ctlr_info->physchan_present)
if (sdev->channel < cs->ctlr_info->physchan_present)
if (sdev->channel < cs->ctlr_info->physchan_present)
if (sdev->channel < cs->ctlr_info->physchan_present)
memcpy(serial, cs->ctlr_info->serial_number, 16);
struct myrs_ctlr_info *info = cs->ctlr_info;
return snprintf(buf, 4, "%d\n", cs->ctlr_info->ctlr_type);
return snprintf(buf, 8, "%d MB\n", cs->ctlr_info->cache_size_mb);
cs->ctlr_info->fw_major_version,
cs->ctlr_info->fw_minor_version,
cs->ctlr_info->fw_turn_number);
if (scmd->device->channel >= cs->ctlr_info->physchan_present) {
if (scmd->device->channel >= cs->ctlr_info->physchan_present) {
ldev_present = cs->ctlr_info->ldev_present;
ldev_critical = cs->ctlr_info->ldev_critical;
if (scmd->device->channel >= cs->ctlr_info->physchan_present) {
ldev_offline = cs->ctlr_info->ldev_offline;
ctlr_info_addr = dma_map_single(&cs->pdev->dev, cs->ctlr_info,
sdev->channel - cs->ctlr_info->physchan_present;
mbox->ctlr_info.id = MYRS_DCMD_TAG;
if (sdev->channel >= cs->ctlr_info->physchan_present) {
mbox->ctlr_info.opcode = MYRS_CMD_OP_IOCTL;
mbox->ctlr_info.control.dma_ctrl_to_host = true;
mbox->ctlr_info.control.no_autosense = true;
mbox->ctlr_info.dma_size = sizeof(struct myrs_ctlr_info);
mbox->ctlr_info.ctlr_num = 0;
mbox->ctlr_info.ioctl_opcode = MYRS_IOCTL_GET_CTLR_INFO;
sgl = &mbox->ctlr_info.dma_addr;
sgl->sge[0].sge_count = mbox->ctlr_info.dma_size;
if (sdev->channel < cs->ctlr_info->physchan_present) {
if (cs->ctlr_info->bg_init_active +
return (sdev->channel >= cs->ctlr_info->physchan_present) ? 1 : 0;
cs->ctlr_info->ldev_init_active +
cs->ctlr_info->pdev_init_active +
if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info)
cs->ctlr_info->cc_active +
cs->ctlr_info->rbld_active +
if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info)
cs->ctlr_info->exp_active != 0)
if (cs->ctlr_info->ldev_present != ldev_present ||
cs->ctlr_info->ldev_critical != ldev_critical ||
cs->ctlr_info->ldev_offline != ldev_offline)
cs->ctlr_info->ldev_critical,
cs->ctlr_info->ldev_offline,
cs->ctlr_info->ldev_present);
struct myrs_ctlr_info *info = cs->ctlr_info;
kfree(cs->ctlr_info);
sgl->sge[0].sge_count = mbox->ctlr_info.dma_size;
cs->ctlr_info = kzalloc_obj(struct myrs_ctlr_info);
if (!cs->ctlr_info)
struct myrs_ctlr_info *info = cs->ctlr_info;
sdev->channel < cs->ctlr_info->physchan_present) {
if (sdev->channel >= cs->ctlr_info->physchan_present) {
if (sdev->channel < cs->ctlr_info->physchan_present) {
} ctlr_info;
struct myrs_ctlr_info *ctlr_info;