Lines Matching +full:sense +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 1994-1996 Scott Snyder <snyder@fnald0.fnal.gov>
6 * Copyright (C) 1996-1998 Erik Andersen <andersee@debian.org>
7 * Copyright (C) 1998-2000 Jens Axboe <axboe@suse.de>
15 #include "ide-cd.h"
19 struct request_sense *sense) in ide_cd_log_error() argument
23 if (sense->sense_key == UNIT_ATTENTION || in ide_cd_log_error()
24 (sense->sense_key == NOT_READY && (sense->asc == 4 || in ide_cd_log_error()
25 sense->asc == 0x3a))) in ide_cd_log_error()
30 name, sense->error_code, sense->sense_key, in ide_cd_log_error()
31 sense->asc, sense->ascq); in ide_cd_log_error()
41 { GPCMD_REQUEST_SENSE, "Request Sense" },
69 { GPCMD_MODE_SELECT_10, "Mode Select 10" },
71 { GPCMD_MODE_SENSE_10, "Mode Sense 10" },
78 { GPCMD_SET_READ_AHEAD, "Set Read-ahead" },
94 "No sense data",
117 { 0x000000, "No additional sense information" },
123 { 0x010c0a, "Write error - padding blocks added" },
132 { 0x011802, "Recovered data - the data was auto-reallocated" },
134 { 0x011804, "Recovered data with L-EC" },
136 " - Predicted logical unit failure" },
138 " - Predicted media failure" },
139 { 0x015dff, "Failure prediction threshold exceeded - False" },
141 { 0x020400, "Logical unit not ready - cause not reportable" },
144 " - in progress [sic] of becoming ready" },
145 { 0x020402, "Logical unit not ready - initializing command required" },
146 { 0x020403, "Logical unit not ready - manual intervention required" },
147 { 0x020404, "Logical unit not ready - format in progress" },
148 { 0x020407, "Logical unit not ready - operation in progress" },
149 { 0x020408, "Logical unit not ready - long write in progress" },
159 { 0x030c01, "Write error - Recovered with auto reallocation" },
160 { 0x030c02, "Write error - auto reallocation failed" },
161 { 0x030c03, "Write error - recommend reassignment" },
165 { 0x030c07, "Write error - recovery needed" },
166 { 0x030c08, "Write error - recovery failed" },
167 { 0x030c09, "Write error - loss of streaming" },
175 { 0x037201, "Session fixation error writin lead-in" },
176 { 0x037202, "Session fixation error writin lead-out" },
208 { 0x053001, "Cannot read medium - unknown format" },
209 { 0x053002, "Cannot read medium - incompatible format" },
215 { 0x056400, "Illegal mode for this track or incompatible medium" },
217 " - Authentication failure" },
218 { 0x056f01, "Copy protection key exchange failure - Key not present" },
220 " - Key not established" },
225 { 0x057203, "Session fixation error - incomplete track in session" },
232 { 0x062a01, "Mode parameters changed" },
248 { 0xff0801, "Logical unit communication time-out" },
250 { 0xff4c00, "Logical unit failed self-configuration" },
251 { 0xff3e00, "Logical unit has not self-configured yet" },
255 struct request_sense *sense) in ide_cd_log_error() argument
258 const char *s = "bad sense key!"; in ide_cd_log_error()
262 if (sense->error_code == 0x70) in ide_cd_log_error()
264 else if (sense->error_code == 0x71) in ide_cd_log_error()
266 else if (sense->error_code == 0x7f) in ide_cd_log_error()
267 printk(KERN_CONT " Vendor-specific Error: "); in ide_cd_log_error()
271 if (sense->sense_key < ARRAY_SIZE(sense_key_texts)) in ide_cd_log_error()
272 s = sense_key_texts[sense->sense_key]; in ide_cd_log_error()
274 printk(KERN_CONT "%s -- (Sense key=0x%02x)\n", s, sense->sense_key); in ide_cd_log_error()
276 if (sense->asc == 0x40) { in ide_cd_log_error()
278 sense->ascq); in ide_cd_log_error()
282 unsigned long key = (sense->sense_key << 16); in ide_cd_log_error()
284 key |= (sense->asc << 8); in ide_cd_log_error()
285 if (!(sense->ascq >= 0x80 && sense->ascq <= 0xdd)) in ide_cd_log_error()
286 key |= sense->ascq; in ide_cd_log_error()
303 if (sense->asc > 0x80) in ide_cd_log_error()
304 s = "(vendor-specific error)"; in ide_cd_log_error()
309 printk(KERN_ERR " %s -- (asc=0x%02x, ascq=0x%02x)\n", in ide_cd_log_error()
310 s, sense->asc, sense->ascq); in ide_cd_log_error()
319 scsi_req(failed_command)->cmd[0]) { in ide_cd_log_error()
324 scsi_req(failed_command)->cmd[0]) in ide_cd_log_error()
333 printk(KERN_CONT "%02x ", scsi_req(failed_command)->cmd[i]); in ide_cd_log_error()
342 if (sense->sense_key == NOT_READY && (sense->sks[0] & 0x80)) { in ide_cd_log_error()
343 int progress = (sense->sks[1] << 8 | sense->sks[2]) * 100; in ide_cd_log_error()
349 if (sense->sense_key == ILLEGAL_REQUEST && in ide_cd_log_error()
350 (sense->sks[0] & 0x80) != 0) { in ide_cd_log_error()
352 (sense->sks[0] & 0x40) != 0 ? in ide_cd_log_error()
354 (sense->sks[1] << 8) + sense->sks[2]); in ide_cd_log_error()
356 if ((sense->sks[0] & 0x40) != 0) in ide_cd_log_error()
357 printk(KERN_CONT " bit %d", sense->sks[0] & 0x07); in ide_cd_log_error()