Lines Matching refs:off

191 	u32 unit_serial_len, off = 0;  in spc_emulate_evpd_83()  local
194 off = 4; in spc_emulate_evpd_83()
208 buf[off++] = 0x1; in spc_emulate_evpd_83()
211 buf[off] = 0x00; in spc_emulate_evpd_83()
214 buf[off++] |= 0x3; in spc_emulate_evpd_83()
215 off++; in spc_emulate_evpd_83()
218 buf[off++] = 0x10; in spc_emulate_evpd_83()
223 buf[off++] = (0x6 << 4); in spc_emulate_evpd_83()
228 buf[off++] = 0x01; in spc_emulate_evpd_83()
229 buf[off++] = 0x40; in spc_emulate_evpd_83()
230 buf[off] = (0x5 << 4); in spc_emulate_evpd_83()
237 spc_parse_naa_6h_vendor_specific(dev, &buf[off]); in spc_emulate_evpd_83()
240 off = (len + 4); in spc_emulate_evpd_83()
256 id_len += sprintf(&buf[off+12], "%s:%s", prod, in spc_emulate_evpd_83()
259 buf[off] = 0x2; /* ASCII */ in spc_emulate_evpd_83()
260 buf[off+1] = 0x1; /* T10 Vendor ID */ in spc_emulate_evpd_83()
261 buf[off+2] = 0x0; in spc_emulate_evpd_83()
262 memcpy(&buf[off+4], "LIO-ORG", 8); in spc_emulate_evpd_83()
266 buf[off+3] = id_len; in spc_emulate_evpd_83()
269 off += (id_len + 4); in spc_emulate_evpd_83()
289 buf[off] = in spc_emulate_evpd_83()
291 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
292 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
294 buf[off] |= 0x10; in spc_emulate_evpd_83()
296 buf[off++] |= 0x4; in spc_emulate_evpd_83()
297 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
298 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
301 off += 2; in spc_emulate_evpd_83()
302 buf[off++] = ((port->sep_rtpi >> 8) & 0xff); in spc_emulate_evpd_83()
303 buf[off++] = (port->sep_rtpi & 0xff); in spc_emulate_evpd_83()
325 buf[off] = in spc_emulate_evpd_83()
327 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
328 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
330 buf[off] |= 0x10; in spc_emulate_evpd_83()
332 buf[off++] |= 0x5; in spc_emulate_evpd_83()
333 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
334 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
335 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
336 buf[off++] = ((tg_pt_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
337 buf[off++] = (tg_pt_gp_id & 0xff); in spc_emulate_evpd_83()
357 buf[off++] |= 0x1; /* CODE SET == Binary */ in spc_emulate_evpd_83()
359 buf[off++] |= 0x6; in spc_emulate_evpd_83()
360 off++; /* Skip over Reserved */ in spc_emulate_evpd_83()
361 buf[off++] = 4; /* DESIGNATOR LENGTH */ in spc_emulate_evpd_83()
362 off += 2; /* Skip over Reserved Field */ in spc_emulate_evpd_83()
363 buf[off++] = ((lu_gp_id >> 8) & 0xff); in spc_emulate_evpd_83()
364 buf[off++] = (lu_gp_id & 0xff); in spc_emulate_evpd_83()
374 buf[off] = in spc_emulate_evpd_83()
376 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
377 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
379 buf[off] |= 0x10; in spc_emulate_evpd_83()
381 buf[off++] |= 0x8; in spc_emulate_evpd_83()
382 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
390 scsi_name_len = sprintf(&buf[off], "%s,t,0x%04x", in spc_emulate_evpd_83()
407 buf[off-1] = scsi_name_len; in spc_emulate_evpd_83()
408 off += scsi_name_len; in spc_emulate_evpd_83()
415 buf[off] = in spc_emulate_evpd_83()
417 buf[off++] |= 0x3; /* CODE SET == UTF-8 */ in spc_emulate_evpd_83()
418 buf[off] = 0x80; /* Set PIV=1 */ in spc_emulate_evpd_83()
420 buf[off] |= 0x20; in spc_emulate_evpd_83()
422 buf[off++] |= 0x8; in spc_emulate_evpd_83()
423 off += 2; /* Skip over Reserved and length */ in spc_emulate_evpd_83()
430 scsi_target_len = sprintf(&buf[off], "%s", in spc_emulate_evpd_83()
447 buf[off-1] = scsi_target_len; in spc_emulate_evpd_83()
448 off += scsi_target_len; in spc_emulate_evpd_83()
1100 int off = ten ? 8 : 4; in spc_emulate_modeselect() local
1114 if (cmd->data_length < off + 2) in spc_emulate_modeselect()
1126 page = buf[off] & 0x3f; in spc_emulate_modeselect()
1127 subpage = buf[off] & 0x40 ? buf[off + 1] : 0; in spc_emulate_modeselect()
1141 if (cmd->data_length < off + length) { in spc_emulate_modeselect()
1146 if (memcmp(buf + off, tbuf, length)) in spc_emulate_modeselect()