Lines Matching refs:off

177 	u32 unit_serial_len, off = 0;  in spc_emulate_evpd_83()  local
180 off = 4; in spc_emulate_evpd_83()
194 buf[off++] = 0x1; in spc_emulate_evpd_83()
197 buf[off] = 0x00; in spc_emulate_evpd_83()
200 buf[off++] |= 0x3; in spc_emulate_evpd_83()
201 off++; in spc_emulate_evpd_83()
204 buf[off++] = 0x10; in spc_emulate_evpd_83()
209 buf[off++] = (0x6 << 4); in spc_emulate_evpd_83()
214 buf[off++] = 0x01; in spc_emulate_evpd_83()
215 buf[off++] = 0x40; in spc_emulate_evpd_83()
216 buf[off] = (0x5 << 4); in spc_emulate_evpd_83()
223 spc_parse_naa_6h_vendor_specific(dev, &buf[off]); in spc_emulate_evpd_83()
226 off = (len + 4); in spc_emulate_evpd_83()
242 id_len += sprintf(&buf[off+12], "%s:%s", prod, in spc_emulate_evpd_83()
245 buf[off] = 0x2; /* ASCII */ in spc_emulate_evpd_83()
246 buf[off+1] = 0x1; /* T10 Vendor ID */ in spc_emulate_evpd_83()
247 buf[off+2] = 0x0; in spc_emulate_evpd_83()
249 memset(&buf[off+4], 0x20, INQUIRY_VENDOR_LEN); in spc_emulate_evpd_83()
250 memcpy(&buf[off+4], dev->t10_wwn.vendor, in spc_emulate_evpd_83()
255 buf[off+3] = id_len; in spc_emulate_evpd_83()
258 off += (id_len + 4); in spc_emulate_evpd_83()
275 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
276 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
277 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
279 buf[off] |= 0x10; in spc_emulate_evpd_83()
281 buf[off++] |= 0x4; in spc_emulate_evpd_83()
282 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
283 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
286 off += 2; in spc_emulate_evpd_83()
287 put_unaligned_be16(lun->lun_rtpi, &buf[off]); in spc_emulate_evpd_83()
288 off += 2; in spc_emulate_evpd_83()
306 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
307 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
308 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
310 buf[off] |= 0x10; in spc_emulate_evpd_83()
312 buf[off++] |= 0x5; in spc_emulate_evpd_83()
313 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
314 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
315 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
316 put_unaligned_be16(tg_pt_gp_id, &buf[off]); in spc_emulate_evpd_83()
317 off += 2; in spc_emulate_evpd_83()
337 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
339 buf[off++] |= 0x6; in spc_emulate_evpd_83()
340 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
341 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
342 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
343 put_unaligned_be16(lu_gp_id, &buf[off]); in spc_emulate_evpd_83()
344 off += 2; in spc_emulate_evpd_83()
354 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
355 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
356 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
358 buf[off] |= 0x10; in spc_emulate_evpd_83()
360 buf[off++] |= 0x8; in spc_emulate_evpd_83()
361 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
369 scsi_name_len = sprintf(&buf[off], "%s,t,0x%04x", in spc_emulate_evpd_83()
386 buf[off-1] = scsi_name_len; in spc_emulate_evpd_83()
387 off += scsi_name_len; in spc_emulate_evpd_83()
394 buf[off] = tpg->proto_id << 4; in spc_emulate_evpd_83()
395 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
396 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
398 buf[off] |= 0x20; in spc_emulate_evpd_83()
400 buf[off++] |= 0x8; in spc_emulate_evpd_83()
401 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
408 scsi_target_len = sprintf(&buf[off], "%s", in spc_emulate_evpd_83()
425 buf[off-1] = scsi_target_len; in spc_emulate_evpd_83()
426 off += scsi_target_len; in spc_emulate_evpd_83()
1119 int off = ten ? 8 : 4; in spc_emulate_modeselect() local
1133 if (cmd->data_length < off + 2) in spc_emulate_modeselect()
1145 page = buf[off] & 0x3f; in spc_emulate_modeselect()
1146 subpage = buf[off] & 0x40 ? buf[off + 1] : 0; in spc_emulate_modeselect()
1160 if (cmd->data_length < off + length) { in spc_emulate_modeselect()
1165 if (memcmp(buf + off, tbuf, length)) in spc_emulate_modeselect()