Lines Matching +full:0 +full:x72

56 	if (type == 0x1e)  in scsi_device_type()
58 if (type == 0x1f) in scsi_device_type()
79 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
80 * returns the integer: 0x0b03d204
84 * addressing method 0.
91 lun = 0; in scsilun_to_int()
92 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int()
110 * Given an integer : 0x0b03d204, this function returns a
111 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
118 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun)); in int_to_scsilun()
120 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun()
121 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun()
122 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun()
150 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense()
155 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
160 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense()
165 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense()
177 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense()
197 * (e.g. 0 -> information)
211 if ((sb_len < 8) || (0 == (add_sen_len = sense_buffer[7]))) in scsi_sense_desc_find()
213 if ((sense_buffer[0] < 0x72) || (sense_buffer[0] > 0x73)) in scsi_sense_desc_find()
218 for (desc_len = 0, k = 0; k < add_sen_len; k += desc_len) { in scsi_sense_desc_find()
222 if (descp[0] == desc_type) in scsi_sense_desc_find()
224 if (add_len < 0) // short descriptor ?? in scsi_sense_desc_find()
234 * 0 == fixed format)
244 buf[0] = 0x72; /* descriptor, current */ in scsi_build_sense_buffer()
248 buf[7] = 0; in scsi_build_sense_buffer()
250 buf[0] = 0x70; /* fixed, current */ in scsi_build_sense_buffer()
252 buf[7] = 0xa; in scsi_build_sense_buffer()
267 * 0 on success or -EINVAL for invalid sense buffer length
271 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_information()
275 ucp = (char *)scsi_sense_desc_find(buf, len + 8, 0); in scsi_set_sense_information()
277 buf[7] = len + 0xc; in scsi_set_sense_information()
281 if (buf_len < len + 0xc) in scsi_set_sense_information()
285 ucp[0] = 0; in scsi_set_sense_information()
286 ucp[1] = 0xa; in scsi_set_sense_information()
287 ucp[2] = 0x80; /* Valid bit */ in scsi_set_sense_information()
288 ucp[3] = 0; in scsi_set_sense_information()
290 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_information()
296 if (info <= 0xffffffffUL) in scsi_set_sense_information()
297 buf[0] |= 0x80; in scsi_set_sense_information()
299 buf[0] &= 0x7f; in scsi_set_sense_information()
303 return 0; in scsi_set_sense_information()
317 * 0 on success or -EINVAL for invalid sense buffer length
323 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_field_pointer()
335 ucp[0] = 2; in scsi_set_sense_field_pointer()
337 ucp[4] = 0x80; /* Valid bit */ in scsi_set_sense_field_pointer()
339 ucp[4] |= 0x40; in scsi_set_sense_field_pointer()
340 if (bp < 0x8) in scsi_set_sense_field_pointer()
341 ucp[4] |= 0x8 | bp; in scsi_set_sense_field_pointer()
343 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_field_pointer()
348 buf[15] = 0x80; in scsi_set_sense_field_pointer()
350 buf[15] |= 0x40; in scsi_set_sense_field_pointer()
351 if (bp < 0x8) in scsi_set_sense_field_pointer()
352 buf[15] |= 0x8 | bp; in scsi_set_sense_field_pointer()
356 return 0; in scsi_set_sense_field_pointer()