• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x72

47 	if (type == 0x1e)  in scsi_device_type()
49 if (type == 0x1f) in scsi_device_type()
70 * Given a struct scsi_lun of: d2 04 0b 03 00 00 00 00, this function
71 * returns the integer: 0x0b03d204
75 * addressing method 0.
82 lun = 0; in scsilun_to_int()
83 for (i = 0; i < sizeof(lun); i += 2) in scsilun_to_int()
101 * Given an integer : 0x0b03d204, this function returns a
102 * struct scsi_lun of: d2 04 0b 03 00 00 00 00
109 memset(scsilun->scsi_lun, 0, sizeof(scsilun->scsi_lun)); in int_to_scsilun()
111 for (i = 0; i < sizeof(lun); i += 2) { in int_to_scsilun()
112 scsilun->scsi_lun[i] = (lun >> 8) & 0xFF; in int_to_scsilun()
113 scsilun->scsi_lun[i+1] = lun & 0xFF; in int_to_scsilun()
141 memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); in scsi_normalize_sense()
146 sshdr->response_code = (sense_buffer[0] & 0x7f); in scsi_normalize_sense()
151 if (sshdr->response_code >= 0x72) { in scsi_normalize_sense()
156 sshdr->sense_key = (sense_buffer[1] & 0xf); in scsi_normalize_sense()
168 sshdr->sense_key = (sense_buffer[2] & 0xf); in scsi_normalize_sense()
188 * (e.g. 0 -> information)
202 if ((sb_len < 8) || (0 == (add_sen_len = sense_buffer[7]))) in scsi_sense_desc_find()
204 if ((sense_buffer[0] < 0x72) || (sense_buffer[0] > 0x73)) in scsi_sense_desc_find()
209 for (desc_len = 0, k = 0; k < add_sen_len; k += desc_len) { in scsi_sense_desc_find()
213 if (descp[0] == desc_type) in scsi_sense_desc_find()
215 if (add_len < 0) // short descriptor ?? in scsi_sense_desc_find()
225 * 0 == fixed format)
235 buf[0] = 0x72; /* descriptor, current */ in scsi_build_sense_buffer()
239 buf[7] = 0; in scsi_build_sense_buffer()
241 buf[0] = 0x70; /* fixed, current */ in scsi_build_sense_buffer()
243 buf[7] = 0xa; in scsi_build_sense_buffer()
258 * 0 on success or -EINVAL for invalid sense buffer length
262 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_information()
266 ucp = (char *)scsi_sense_desc_find(buf, len + 8, 0); in scsi_set_sense_information()
268 buf[7] = len + 0xc; in scsi_set_sense_information()
272 if (buf_len < len + 0xc) in scsi_set_sense_information()
276 ucp[0] = 0; in scsi_set_sense_information()
277 ucp[1] = 0xa; in scsi_set_sense_information()
278 ucp[2] = 0x80; /* Valid bit */ in scsi_set_sense_information()
279 ucp[3] = 0; in scsi_set_sense_information()
281 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_information()
287 if (info <= 0xffffffffUL) in scsi_set_sense_information()
288 buf[0] |= 0x80; in scsi_set_sense_information()
290 buf[0] &= 0x7f; in scsi_set_sense_information()
294 return 0; in scsi_set_sense_information()
308 * 0 on success or -EINVAL for invalid sense buffer length
314 if ((buf[0] & 0x7f) == 0x72) { in scsi_set_sense_field_pointer()
326 ucp[0] = 2; in scsi_set_sense_field_pointer()
328 ucp[4] = 0x80; /* Valid bit */ in scsi_set_sense_field_pointer()
330 ucp[4] |= 0x40; in scsi_set_sense_field_pointer()
331 if (bp < 0x8) in scsi_set_sense_field_pointer()
332 ucp[4] |= 0x8 | bp; in scsi_set_sense_field_pointer()
334 } else if ((buf[0] & 0x7f) == 0x70) { in scsi_set_sense_field_pointer()
339 buf[15] = 0x80; in scsi_set_sense_field_pointer()
341 buf[15] |= 0x40; in scsi_set_sense_field_pointer()
342 if (bp < 0x8) in scsi_set_sense_field_pointer()
343 buf[15] |= 0x8 | bp; in scsi_set_sense_field_pointer()
347 return 0; in scsi_set_sense_field_pointer()