From: Harish Zunjarrao Date: Tue, 12 Jan 2010 20:59:50 +0000 (-0800) Subject: [SCSI] fc-transport: Use packed modifier for fc_bsg_request structure. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eda05a28ec52be40086400a1b606d211276f0e41;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SCSI] fc-transport: Use packed modifier for fc_bsg_request structure. The 32bit kernel does not add padding bytes in the fc_bsg_request structure whereas the 64bit kernel adds padding bytes in the fc_bsg_request structure. Due to this, structure elements gets mismatched with 32bit application and 64bit kernel.To resolve this, used packed modifier to avoid adding padding bytes. Signed-off-by: Giridhar Malavali Signed-off-by: James Bottomley --- diff --git a/include/scsi/scsi_bsg_fc.h b/include/scsi/scsi_bsg_fc.h index a4b233318179..91a4e4ff9a9b 100644 --- a/include/scsi/scsi_bsg_fc.h +++ b/include/scsi/scsi_bsg_fc.h @@ -292,7 +292,7 @@ struct fc_bsg_request { struct fc_bsg_rport_els r_els; struct fc_bsg_rport_ct r_ct; } rqst_data; -}; +} __attribute__((packed)); /* response (request sense data) structure of the sg_io_v4 */