Commit d24354bb authored by Hans de Goede's avatar Hans de Goede Committed by Sarah Sharp

uas: Pack iu struct definitions

The iu struct definitions are usb packet definitions, so no alignment should
happen. Notice that assuming 32 bit alignment this does not make any
difference at all.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent 00d202cc
...@@ -9,7 +9,7 @@ struct iu { ...@@ -9,7 +9,7 @@ struct iu {
__u8 iu_id; __u8 iu_id;
__u8 rsvd1; __u8 rsvd1;
__be16 tag; __be16 tag;
}; } __attribute__((__packed__));
enum { enum {
IU_ID_COMMAND = 0x01, IU_ID_COMMAND = 0x01,
...@@ -52,7 +52,7 @@ struct command_iu { ...@@ -52,7 +52,7 @@ struct command_iu {
__u8 rsvd7; __u8 rsvd7;
struct scsi_lun lun; struct scsi_lun lun;
__u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */ __u8 cdb[16]; /* XXX: Overflow-checking tools may misunderstand */
}; } __attribute__((__packed__));
struct task_mgmt_iu { struct task_mgmt_iu {
__u8 iu_id; __u8 iu_id;
...@@ -62,7 +62,7 @@ struct task_mgmt_iu { ...@@ -62,7 +62,7 @@ struct task_mgmt_iu {
__u8 rsvd2; __u8 rsvd2;
__be16 task_tag; __be16 task_tag;
struct scsi_lun lun; struct scsi_lun lun;
}; } __attribute__((__packed__));
/* /*
* Also used for the Read Ready and Write Ready IUs since they have the * Also used for the Read Ready and Write Ready IUs since they have the
...@@ -77,7 +77,7 @@ struct sense_iu { ...@@ -77,7 +77,7 @@ struct sense_iu {
__u8 rsvd7[7]; __u8 rsvd7[7];
__be16 len; __be16 len;
__u8 sense[SCSI_SENSE_BUFFERSIZE]; __u8 sense[SCSI_SENSE_BUFFERSIZE];
}; } __attribute__((__packed__));
struct response_iu { struct response_iu {
__u8 iu_id; __u8 iu_id;
...@@ -85,7 +85,7 @@ struct response_iu { ...@@ -85,7 +85,7 @@ struct response_iu {
__be16 tag; __be16 tag;
__u8 add_response_info[3]; __u8 add_response_info[3];
__u8 response_code; __u8 response_code;
}; } __attribute__((__packed__));
struct usb_pipe_usage_descriptor { struct usb_pipe_usage_descriptor {
__u8 bLength; __u8 bLength;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment