diff options
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 39d8754e63ac..aeb95f409826 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1794,7 +1794,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) if (instance->unload == 1) { scmd->result = DID_NO_CONNECT << 16; - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } @@ -1809,7 +1809,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) return SCSI_MLQUEUE_HOST_BUSY; } else { scmd->result = DID_NO_CONNECT << 16; - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } } @@ -1818,7 +1818,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) if (!mr_device_priv_data || (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR)) { scmd->result = DID_NO_CONNECT << 16; - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } @@ -1826,7 +1826,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) ld_tgt_id = MEGASAS_TARGET_ID(scmd->device); if (instance->ld_tgtid_status[ld_tgt_id] == LD_TARGET_ID_DELETED) { scmd->result = DID_NO_CONNECT << 16; - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } } @@ -1857,7 +1857,7 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd) return instance->instancet->build_and_issue_cmd(instance, scmd); out_done: - scmd->scsi_done(scmd); + scsi_done(scmd); return 0; } @@ -2783,7 +2783,7 @@ static int megasas_wait_for_outstanding(struct megasas_instance *instance) reset_index, reset_cmd, reset_cmd->scmd->cmnd[0]); - reset_cmd->scmd->scsi_done(reset_cmd->scmd); + scsi_done(reset_cmd->scmd); megasas_return_cmd(instance, reset_cmd); } else if (reset_cmd->sync_cmd) { dev_notice(&instance->pdev->dev, "%p synch cmds" @@ -3481,19 +3481,21 @@ static DEVICE_ATTR_RW(enable_sdev_max_qd); static DEVICE_ATTR_RO(dump_system_regs); static DEVICE_ATTR_RO(raid_map_id); -static struct device_attribute *megaraid_host_attrs[] = { - &dev_attr_fw_crash_buffer_size, - &dev_attr_fw_crash_buffer, - &dev_attr_fw_crash_state, - &dev_attr_page_size, - &dev_attr_ldio_outstanding, - &dev_attr_fw_cmds_outstanding, - &dev_attr_enable_sdev_max_qd, - &dev_attr_dump_system_regs, - &dev_attr_raid_map_id, +static struct attribute *megaraid_host_attrs[] = { + &dev_attr_fw_crash_buffer_size.attr, + &dev_attr_fw_crash_buffer.attr, + &dev_attr_fw_crash_state.attr, + &dev_attr_page_size.attr, + &dev_attr_ldio_outstanding.attr, + &dev_attr_fw_cmds_outstanding.attr, + &dev_attr_enable_sdev_max_qd.attr, + &dev_attr_dump_system_regs.attr, + &dev_attr_raid_map_id.attr, NULL, }; +ATTRIBUTE_GROUPS(megaraid_host); + /* * Scsi host template for megaraid_sas driver */ @@ -3510,7 +3512,7 @@ static struct scsi_host_template megasas_template = { .eh_abort_handler = megasas_task_abort, .eh_host_reset_handler = megasas_reset_bus_host, .eh_timed_out = megasas_reset_timer, - .shost_attrs = megaraid_host_attrs, + .shost_groups = megaraid_host_groups, .bios_param = megasas_bios_param, .map_queues = megasas_map_queues, .mq_poll = megasas_blk_mq_poll, @@ -3640,7 +3642,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, atomic_dec(&instance->fw_outstanding); scsi_dma_unmap(cmd->scmd); - cmd->scmd->scsi_done(cmd->scmd); + scsi_done(cmd->scmd); megasas_return_cmd(instance, cmd); break; @@ -3686,7 +3688,7 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, atomic_dec(&instance->fw_outstanding); scsi_dma_unmap(cmd->scmd); - cmd->scmd->scsi_done(cmd->scmd); + scsi_done(cmd->scmd); megasas_return_cmd(instance, cmd); break; |