Replace uXX by __uXX and _packed by __attribute((packed)) as seems to be the norm for userspace headers.
Showing the changes to include/uapi/linux (2 of 2 files). Show all
Unified · Split
| @@ -428,6 +428,7 @@ header-y += virtio_net.h · 427 unmodified lines | ||
| 428 | 428 | header-y += virtio_pci.h |
| 429 | 429 | header-y += virtio_ring.h |
| 430 | 430 | header-y += virtio_rng.h |
| 431 | +header-y += virtio_scsi.h | |
| 431 | 432 | header-y += vm_sockets.h |
| 432 | 433 | header-y += vt.h |
| 433 | 434 | header-y += wait.h |
| @@ -34,78 +34,78 @@ · 33 unmodified lines | ||
| 34 | 34 | |
| 35 | 35 | /* SCSI command request, followed by data-out */ |
| 36 | 36 | struct virtio_scsi_cmd_req { |
| 37 | − u8 lun[8]; /* Logical Unit Number */ | |
| 37 | + __u8 lun[8]; /* Logical Unit Number */ | |
| 38 | 38 | __virtio64 tag; /* Command identifier */ |
| 39 | − u8 task_attr; /* Task attribute */ | |
| 40 | − u8 prio; /* SAM command priority field */ | |
| 41 | − u8 crn; | |
| 42 | − u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | |
| 43 | −} __packed; | |
| 39 | + __u8 task_attr; /* Task attribute */ | |
| 40 | + __u8 prio; /* SAM command priority field */ | |
| 41 | + __u8 crn; | |
| 42 | + __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | |
| 43 | +} __attribute__((packed)); | |
| 44 | 44 | |
| 45 | 45 | /* SCSI command request, followed by protection information */ |
| 46 | 46 | struct virtio_scsi_cmd_req_pi { |
| 47 | − u8 lun[8]; /* Logical Unit Number */ | |
| 47 | + __u8 lun[8]; /* Logical Unit Number */ | |
| 48 | 48 | __virtio64 tag; /* Command identifier */ |
| 49 | − u8 task_attr; /* Task attribute */ | |
| 50 | − u8 prio; /* SAM command priority field */ | |
| 51 | − u8 crn; | |
| 49 | + __u8 task_attr; /* Task attribute */ | |
| 50 | + __u8 prio; /* SAM command priority field */ | |
| 51 | + __u8 crn; | |
| 52 | 52 | __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */ |
| 53 | 53 | __virtio32 pi_bytesin; /* DataIN PI Number of bytes */ |
| 54 | − u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | |
| 55 | −} __packed; | |
| 54 | + __u8 cdb[VIRTIO_SCSI_CDB_SIZE]; | |
| 55 | +} __attribute__((packed)); | |
| 56 | 56 | |
| 57 | 57 | /* Response, followed by sense data and data-in */ |
| 58 | 58 | struct virtio_scsi_cmd_resp { |
| 59 | 59 | __virtio32 sense_len; /* Sense data length */ |
| 60 | 60 | __virtio32 resid; /* Residual bytes in data buffer */ |
| 61 | 61 | __virtio16 status_qualifier; /* Status qualifier */ |
| 62 | − u8 status; /* Command completion status */ | |
| 63 | − u8 response; /* Response values */ | |
| 64 | − u8 sense[VIRTIO_SCSI_SENSE_SIZE]; | |
| 65 | −} __packed; | |
| 62 | + __u8 status; /* Command completion status */ | |
| 63 | + __u8 response; /* Response values */ | |
| 64 | + __u8 sense[VIRTIO_SCSI_SENSE_SIZE]; | |
| 65 | +} __attribute__((packed)); | |
| 66 | 66 | |
| 67 | 67 | /* Task Management Request */ |
| 68 | 68 | struct virtio_scsi_ctrl_tmf_req { |
| 69 | 69 | __virtio32 type; |
| 70 | 70 | __virtio32 subtype; |
| 71 | − u8 lun[8]; | |
| 71 | + __u8 lun[8]; | |
| 72 | 72 | __virtio64 tag; |
| 73 | −} __packed; | |
| 73 | +} __attribute__((packed)); | |
| 74 | 74 | |
| 75 | 75 | struct virtio_scsi_ctrl_tmf_resp { |
| 76 | − u8 response; | |
| 77 | −} __packed; | |
| 76 | + __u8 response; | |
| 77 | +} __attribute__((packed)); | |
| 78 | 78 | |
| 79 | 79 | /* Asynchronous notification query/subscription */ |
| 80 | 80 | struct virtio_scsi_ctrl_an_req { |
| 81 | 81 | __virtio32 type; |
| 82 | − u8 lun[8]; | |
| 82 | + __u8 lun[8]; | |
| 83 | 83 | __virtio32 event_requested; |
| 84 | −} __packed; | |
| 84 | +} __attribute__((packed)); | |
| 85 | 85 | |
| 86 | 86 | struct virtio_scsi_ctrl_an_resp { |
| 87 | 87 | __virtio32 event_actual; |
| 88 | − u8 response; | |
| 89 | −} __packed; | |
| 88 | + __u8 response; | |
| 89 | +} __attribute__((packed)); | |
| 90 | 90 | |
| 91 | 91 | struct virtio_scsi_event { |
| 92 | 92 | __virtio32 event; |
| 93 | − u8 lun[8]; | |
| 93 | + __u8 lun[8]; | |
| 94 | 94 | __virtio32 reason; |
| 95 | −} __packed; | |
| 95 | +} __attribute__((packed)); | |
| 96 | 96 | |
| 97 | 97 | struct virtio_scsi_config { |
| 98 | − u32 num_queues; | |
| 99 | − u32 seg_max; | |
| 100 | − u32 max_sectors; | |
| 101 | − u32 cmd_per_lun; | |
| 102 | − u32 event_info_size; | |
| 103 | − u32 sense_size; | |
| 104 | − u32 cdb_size; | |
| 105 | − u16 max_channel; | |
| 106 | − u16 max_target; | |
| 107 | − u32 max_lun; | |
| 108 | −} __packed; | |
| 98 | + __u32 num_queues; | |
| 99 | + __u32 seg_max; | |
| 100 | + __u32 max_sectors; | |
| 101 | + __u32 cmd_per_lun; | |
| 102 | + __u32 event_info_size; | |
| 103 | + __u32 sense_size; | |
| 104 | + __u32 cdb_size; | |
| 105 | + __u16 max_channel; | |
| 106 | + __u16 max_target; | |
| 107 | + __u32 max_lun; | |
| 108 | +} __attribute__((packed)); | |
| 109 | 109 | |
| 110 | 110 | /* Feature Bits */ |
| 111 | 111 | #define VIRTIO_SCSI_F_INOUT 0 |