Lines Matching +full:0 +full:x72

57 	if (type == 0x1e)  in scsi_device_type()
59 if (type == 0x1f) in scsi_device_type()
84 return 0; in scsi_pr_type_to_block()
105 return 0; in block_pr_type_to_scsi()
122 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
123 * returns the integer: 0x0b03d204
127 * addressing method 0.
134 lun = 0; in scsilun_to_int()
135 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int()
153 * Given an integer : 0x0b03d204, this function returns a
154 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
161 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun)); in int_to_scsilun()
163 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun()
164 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun()
165 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun()
193 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense()
198 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
203 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense()
208 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense()
220 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense()
239 * (e.g. 0 -> information)
253 if ((sb_len < 8) || (0 == (add_sen_len = sense_buffer[7]))) in scsi_sense_desc_find()
255 if ((sense_buffer[0] < 0x72) || (sense_buffer[0] > 0x73)) in scsi_sense_desc_find()
260 for (desc_len = 0, k = 0; k < add_sen_len; k += desc_len) { in scsi_sense_desc_find()
264 if (descp[0] == desc_type) in scsi_sense_desc_find()
266 if (add_len < 0) // short descriptor ?? in scsi_sense_desc_find()
276 * 0 == fixed format)
286 buf[0] = 0x72; /* descriptor, current */ in scsi_build_sense_buffer()
290 buf[7] = 0; in scsi_build_sense_buffer()
292 buf[0] = 0x70; /* fixed, current */ in scsi_build_sense_buffer()
294 buf[7] = 0xa; in scsi_build_sense_buffer()
309 * 0 on success or -EINVAL for invalid sense buffer length
313 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_information()
317 ucp = (char *)scsi_sense_desc_find(buf, len + 8, 0); in scsi_set_sense_information()
319 buf[7] = len + 0xc; in scsi_set_sense_information()
323 if (buf_len < len + 0xc) in scsi_set_sense_information()
327 ucp[0] = 0; in scsi_set_sense_information()
328 ucp[1] = 0xa; in scsi_set_sense_information()
329 ucp[2] = 0x80; /* Valid bit */ in scsi_set_sense_information()
330 ucp[3] = 0; in scsi_set_sense_information()
332 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_information()
338 if (info <= 0xffffffffUL) in scsi_set_sense_information()
339 buf[0] |= 0x80; in scsi_set_sense_information()
341 buf[0] &= 0x7f; in scsi_set_sense_information()
345 return 0; in scsi_set_sense_information()
359 * 0 on success or -EINVAL for invalid sense buffer length
365 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_field_pointer()
377 ucp[0] = 2; in scsi_set_sense_field_pointer()
379 ucp[4] = 0x80; /* Valid bit */ in scsi_set_sense_field_pointer()
381 ucp[4] |= 0x40; in scsi_set_sense_field_pointer()
382 if (bp < 0x8) in scsi_set_sense_field_pointer()
383 ucp[4] |= 0x8 | bp; in scsi_set_sense_field_pointer()
385 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_field_pointer()
390 buf[15] = 0x80; in scsi_set_sense_field_pointer()
392 buf[15] |= 0x40; in scsi_set_sense_field_pointer()
393 if (bp < 0x8) in scsi_set_sense_field_pointer()
394 buf[15] |= 0x8 | bp; in scsi_set_sense_field_pointer()
398 return 0; in scsi_set_sense_field_pointer()