From 360c73bdde4537397f70b17cadd8139ff1f75ab9 Mon Sep 17 00:00:00 2001 From: Stephen Cameron Date: Thu, 23 Apr 2015 09:32:32 -0500 Subject: hpsa: factor out hpsa_init_cmd function Factor out hpsa_cmd_init from cmd_alloc(). We also need this for resubmitting commands down the default RAID path when they have returned from the ioaccel paths with errors. In particular, reinitialize the cmd_type and busaddr fields as these will not be correct for submitting down the RAID stack path after ioaccel command completion. This saves time when submitting commands. Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Signed-off-by: Don Brace Reviewed-by: Christoph Hellwig Signed-off-by: James Bottomley --- drivers/scsi/hpsa_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/hpsa_cmd.h') diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index f6ca5fa44730..0efb6f2b4297 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -438,7 +438,7 @@ struct CommandList { * not used. */ struct hpsa_scsi_dev_t *phys_disk; - atomic_t refcount; /* Must be last to avoid memset in cmd_alloc */ + atomic_t refcount; /* Must be last to avoid memset in hpsa_cmd_init() */ } __aligned(COMMANDLIST_ALIGNMENT); /* Max S/G elements in I/O accelerator command */ -- cgit v1.2.3