Lines Matching refs:off
176 u32 unit_serial_len, off = 0; in spc_emulate_evpd_83() local
179 off = 4; in spc_emulate_evpd_83()
193 buf[off++] = 0x1; in spc_emulate_evpd_83()
196 buf[off] = 0x00; in spc_emulate_evpd_83()
199 buf[off++] |= 0x3; in spc_emulate_evpd_83()
200 off++; in spc_emulate_evpd_83()
203 buf[off++] = 0x10; in spc_emulate_evpd_83()
208 buf[off++] = (0x6 << 4); in spc_emulate_evpd_83()
213 buf[off++] = 0x01; in spc_emulate_evpd_83()
214 buf[off++] = 0x40; in spc_emulate_evpd_83()
215 buf[off] = (0x5 << 4); in spc_emulate_evpd_83()
222 spc_parse_naa_6h_vendor_specific(dev, &buf[off]); in spc_emulate_evpd_83()
225 off = (len + 4); in spc_emulate_evpd_83()
241 id_len += sprintf(&buf[off+12], "%s:%s", prod, in spc_emulate_evpd_83()
244 buf[off] = 0x2; /* ASCII */ in spc_emulate_evpd_83()
245 buf[off+1] = 0x1; /* T10 Vendor ID */ in spc_emulate_evpd_83()
246 buf[off+2] = 0x0; in spc_emulate_evpd_83()
247 memcpy(&buf[off+4], "LIO-ORG", 8); in spc_emulate_evpd_83()
251 buf[off+3] = id_len; in spc_emulate_evpd_83()
254 off += (id_len + 4); in spc_emulate_evpd_83()
274 buf[off] = 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 buf[off++] = ((port->sep_rtpi >> 8) & 0xff); in spc_emulate_evpd_83()
288 buf[off++] = (port->sep_rtpi & 0xff); in spc_emulate_evpd_83()
310 buf[off] = in spc_emulate_evpd_83()
312 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
313 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
315 buf[off] |= 0x10; in spc_emulate_evpd_83()
317 buf[off++] |= 0x5; in spc_emulate_evpd_83()
318 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
319 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
320 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
321 buf[off++] = ((tg_pt_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
322 buf[off++] = (tg_pt_gp_id & 0xff); in spc_emulate_evpd_83()
342 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
344 buf[off++] |= 0x6; in spc_emulate_evpd_83()
345 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
346 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
347 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
348 buf[off++] = ((lu_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
349 buf[off++] = (lu_gp_id & 0xff); in spc_emulate_evpd_83()
369 buf[off] = in spc_emulate_evpd_83()
371 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
372 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
374 buf[off] |= 0x10; in spc_emulate_evpd_83()
376 buf[off++] |= 0x8; in spc_emulate_evpd_83()
377 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
385 scsi_name_len = sprintf(&buf[off], "%s,t,0x%04x", in spc_emulate_evpd_83()
399 buf[off-1] = scsi_name_len; in spc_emulate_evpd_83()
400 off += scsi_name_len; in spc_emulate_evpd_83()
994 int off = ten ? 8 : 4; in spc_emulate_modeselect() local
1008 if (cmd->data_length < off + 2) in spc_emulate_modeselect()
1020 page = buf[off] & 0x3f; in spc_emulate_modeselect()
1021 subpage = buf[off] & 0x40 ? buf[off + 1] : 0; in spc_emulate_modeselect()
1035 if (cmd->data_length < off + length) { in spc_emulate_modeselect()
1040 if (memcmp(buf + off, tbuf, length)) in spc_emulate_modeselect()