Lines Matching refs:off
183 u32 unit_serial_len, off = 0; in spc_emulate_evpd_83() local
186 off = 4; in spc_emulate_evpd_83()
200 buf[off++] = 0x1; in spc_emulate_evpd_83()
203 buf[off] = 0x00; in spc_emulate_evpd_83()
206 buf[off++] |= 0x3; in spc_emulate_evpd_83()
207 off++; in spc_emulate_evpd_83()
210 buf[off++] = 0x10; in spc_emulate_evpd_83()
215 buf[off++] = (0x6 << 4); in spc_emulate_evpd_83()
220 buf[off++] = 0x01; in spc_emulate_evpd_83()
221 buf[off++] = 0x40; in spc_emulate_evpd_83()
222 buf[off] = (0x5 << 4); in spc_emulate_evpd_83()
229 spc_parse_naa_6h_vendor_specific(dev, &buf[off]); in spc_emulate_evpd_83()
232 off = (len + 4); in spc_emulate_evpd_83()
248 id_len += sprintf(&buf[off+12], "%s:%s", prod, in spc_emulate_evpd_83()
251 buf[off] = 0x2; /* ASCII */ in spc_emulate_evpd_83()
252 buf[off+1] = 0x1; /* T10 Vendor ID */ in spc_emulate_evpd_83()
253 buf[off+2] = 0x0; in spc_emulate_evpd_83()
254 memcpy(&buf[off+4], "LIO-ORG", 8); in spc_emulate_evpd_83()
258 buf[off+3] = id_len; in spc_emulate_evpd_83()
261 off += (id_len + 4); in spc_emulate_evpd_83()
278 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
279 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
280 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
282 buf[off] |= 0x10; in spc_emulate_evpd_83()
284 buf[off++] |= 0x4; in spc_emulate_evpd_83()
285 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
286 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
289 off += 2; in spc_emulate_evpd_83()
290 buf[off++] = ((lun->lun_rtpi >> 8) & 0xff); in spc_emulate_evpd_83()
291 buf[off++] = (lun->lun_rtpi & 0xff); in spc_emulate_evpd_83()
309 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
310 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
311 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
313 buf[off] |= 0x10; in spc_emulate_evpd_83()
315 buf[off++] |= 0x5; in spc_emulate_evpd_83()
316 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
317 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
318 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
319 buf[off++] = ((tg_pt_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
320 buf[off++] = (tg_pt_gp_id & 0xff); in spc_emulate_evpd_83()
340 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
342 buf[off++] |= 0x6; in spc_emulate_evpd_83()
343 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
344 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
345 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
346 buf[off++] = ((lu_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
347 buf[off++] = (lu_gp_id & 0xff); in spc_emulate_evpd_83()
357 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
358 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
359 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
361 buf[off] |= 0x10; in spc_emulate_evpd_83()
363 buf[off++] |= 0x8; in spc_emulate_evpd_83()
364 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
372 scsi_name_len = sprintf(&buf[off], "%s,t,0x%04x", in spc_emulate_evpd_83()
389 buf[off-1] = scsi_name_len; in spc_emulate_evpd_83()
390 off += scsi_name_len; in spc_emulate_evpd_83()
397 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
398 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
399 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
401 buf[off] |= 0x20; in spc_emulate_evpd_83()
403 buf[off++] |= 0x8; in spc_emulate_evpd_83()
404 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
411 scsi_target_len = sprintf(&buf[off], "%s", in spc_emulate_evpd_83()
428 buf[off-1] = scsi_target_len; in spc_emulate_evpd_83()
429 off += scsi_target_len; in spc_emulate_evpd_83()
1103 int off = ten ? 8 : 4; in spc_emulate_modeselect() local
1117 if (cmd->data_length < off + 2) in spc_emulate_modeselect()
1129 page = buf[off] & 0x3f; in spc_emulate_modeselect()
1130 subpage = buf[off] & 0x40 ? buf[off + 1] : 0; in spc_emulate_modeselect()
1144 if (cmd->data_length < off + length) { in spc_emulate_modeselect()
1149 if (memcmp(buf + off, tbuf, length)) in spc_emulate_modeselect()