Skip to content

Commit 02ec144

Browse files
Sergei Trofimovichmartinkpetersen
authored andcommitted
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 f749d8b ("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: f749d8b ("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]>
1 parent 5482a9a commit 02ec144

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/hpsa_cmd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ struct CommandList {
452452
bool retry_pending;
453453
struct hpsa_scsi_dev_t *device;
454454
atomic_t refcount; /* Must be last to avoid memset in hpsa_cmd_init() */
455-
} __packed __aligned(COMMANDLIST_ALIGNMENT);
455+
} __aligned(COMMANDLIST_ALIGNMENT);
456456

457457
/* Max S/G elements in I/O accelerator command */
458458
#define IOACCEL1_MAXSGENTRIES 24

0 commit comments

Comments
 (0)