diff options
author | Sergei Trofimovich <[email protected]> | 2021-03-30 08:19:57 +0100 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2021-04-01 22:51:54 -0400 |
commit | 02ec144292bc424a5800d45d4cb472c66e97c520 (patch) | |
tree | 6843bb1cb22c952062e279bb45fa8a2e65fad3b3 | |
parent | 5482a9a1a8fd23fbb57afc6d409e12713aa93fa5 (diff) |
scsi: hpsa: Fix boot on ia64 (atomic_t alignment)
Boot failure was observed on an HP rx3600 ia64 machine with RAID bus
controller: Hewlett-Packard Company Smart Array P600:
kernel unaligned access to 0xe000000105dd8b95, ip=0xa000000100b87551
kernel unaligned access to 0xe000000105dd8e95, ip=0xa000000100b87551
hpsa 0000:14:01.0: Controller reports max supported commands of 0 Using 16 instead. Ensure that firmware is up to date.
swapper/0[1]: error during unaligned kernel access
The unaligned access comes from 'struct CommandList' that happens to be
packed. Commit f749d8b7a989 ("scsi: hpsa: Correct dev cmds outstanding for
retried cmds") introduced unexpected padding and unaligned atomic_t from
natural alignment to something else.
This change removes packing annotation from a struct not intended to be
sent to controller as is. This restores natural `atomic_t` alignment.
The change was tested on the same rx3600 machine.
Link: https://lore.kernel.org/r/[email protected]
Fixes: f749d8b7a989 ("scsi: hpsa: Correct dev cmds outstanding for retried cmds")
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: Joe Szczypek <[email protected]>
CC: Scott Benesh <[email protected]>
CC: Scott Teel <[email protected]>
CC: Tomas Henzl <[email protected]>
CC: "Martin K. Petersen" <[email protected]>
CC: Don Brace <[email protected]>
Reported-by: John Paul Adrian Glaubitz <[email protected]>
Suggested-by: Don Brace <[email protected]>
Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Sergei Trofimovich <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/hpsa_cmd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h index 280e933d27e7..885b1f1fb20a 100644 --- a/drivers/scsi/hpsa_cmd.h +++ b/drivers/scsi/hpsa_cmd.h @@ -452,7 +452,7 @@ struct CommandList { bool retry_pending; struct hpsa_scsi_dev_t *device; atomic_t refcount; /* Must be last to avoid memset in hpsa_cmd_init() */ -} __packed __aligned(COMMANDLIST_ALIGNMENT); +} __aligned(COMMANDLIST_ALIGNMENT); /* Max S/G elements in I/O accelerator command */ #define IOACCEL1_MAXSGENTRIES 24 |