~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/scsicmd.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
  /* there can be additional sense field */
86
86
} __attribute__((packed));
87
87
 
88
 
struct grub_scsi_read_capacity
 
88
struct grub_scsi_read_capacity10
89
89
{
90
90
  grub_uint8_t opcode;
91
91
  grub_uint8_t lun; /* 7-5 LUN, 4-1 reserved, 0 reserved */
97
97
  grub_uint16_t pad; /* To be ATAPI compatible */
98
98
} __attribute__((packed));
99
99
 
100
 
struct grub_scsi_read_capacity_data
101
 
{
102
 
  grub_uint32_t size;
103
 
  grub_uint32_t blocksize;
 
100
struct grub_scsi_read_capacity10_data
 
101
{
 
102
  grub_uint32_t last_block;
 
103
  grub_uint32_t blocksize;
 
104
} __attribute__((packed));
 
105
 
 
106
struct grub_scsi_read_capacity16
 
107
{
 
108
  grub_uint8_t opcode;
 
109
  grub_uint8_t lun; /* 7-5 LUN, 4-0 0x10 */
 
110
  grub_uint64_t logical_block_addr; /* only if PMI=1 */
 
111
  grub_uint32_t alloc_len;
 
112
  grub_uint8_t PMI;
 
113
  grub_uint8_t control;
 
114
} __attribute__((packed));
 
115
 
 
116
struct grub_scsi_read_capacity16_data
 
117
{
 
118
  grub_uint64_t last_block;
 
119
  grub_uint32_t blocksize;
 
120
  grub_uint8_t pad[20];
104
121
} __attribute__((packed));
105
122
 
106
123
struct grub_scsi_read10
124
141
  grub_uint8_t control;
125
142
} __attribute__((packed));
126
143
 
 
144
struct grub_scsi_read16
 
145
{
 
146
  grub_uint8_t opcode;
 
147
  grub_uint8_t lun;
 
148
  grub_uint64_t lba;
 
149
  grub_uint32_t size;
 
150
  grub_uint8_t reserved;
 
151
  grub_uint8_t control;
 
152
} __attribute__((packed));
 
153
 
127
154
struct grub_scsi_write10
128
155
{
129
156
  grub_uint8_t opcode;
145
172
  grub_uint8_t control;
146
173
} __attribute__((packed));
147
174
 
 
175
struct grub_scsi_write16
 
176
{
 
177
  grub_uint8_t opcode;
 
178
  grub_uint8_t lun;
 
179
  grub_uint64_t lba;
 
180
  grub_uint32_t size;
 
181
  grub_uint8_t reserved;
 
182
  grub_uint8_t control;
 
183
} __attribute__((packed));
 
184
 
148
185
typedef enum
149
186
  {
150
187
    grub_scsi_cmd_test_unit_ready = 0x00,
151
188
    grub_scsi_cmd_request_sense = 0x03,
152
189
    grub_scsi_cmd_inquiry = 0x12,
153
 
    grub_scsi_cmd_read_capacity = 0x25,
 
190
    grub_scsi_cmd_read_capacity10 = 0x25,
154
191
    grub_scsi_cmd_read10 = 0x28,
155
192
    grub_scsi_cmd_write10 = 0x2a,
 
193
    grub_scsi_cmd_read16 = 0x88,
 
194
    grub_scsi_cmd_write16 = 0x8a,
 
195
    grub_scsi_cmd_read_capacity16 = 0x9e,
156
196
    grub_scsi_cmd_read12 = 0xa8,
157
197
    grub_scsi_cmd_write12 = 0xaa,
158
198
  } grub_scsi_cmd_t;