diff options
Diffstat (limited to 'drivers/scsi/constants.c')
-rw-r--r-- | drivers/scsi/constants.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 63abb06c4edb..cd05e049d5f6 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c | |||
@@ -141,6 +141,7 @@ static const struct value_name_pair serv_out12_arr[] = { | |||
141 | static const struct value_name_pair serv_in16_arr[] = { | 141 | static const struct value_name_pair serv_in16_arr[] = { |
142 | {0x10, "Read capacity(16)"}, | 142 | {0x10, "Read capacity(16)"}, |
143 | {0x11, "Read long(16)"}, | 143 | {0x11, "Read long(16)"}, |
144 | {0x12, "Get LBA status"}, | ||
144 | }; | 145 | }; |
145 | #define SERV_IN16_SZ ARRAY_SIZE(serv_in16_arr) | 146 | #define SERV_IN16_SZ ARRAY_SIZE(serv_in16_arr) |
146 | 147 | ||
@@ -218,18 +219,15 @@ static void print_opcode_name(unsigned char * cdbp, int cdb_len) | |||
218 | break; | 219 | break; |
219 | } | 220 | } |
220 | sa = (cdbp[8] << 8) + cdbp[9]; | 221 | sa = (cdbp[8] << 8) + cdbp[9]; |
221 | name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa); | 222 | name = get_sa_name(variable_length_arr, VARIABLE_LENGTH_SZ, sa); |
222 | if (name) { | 223 | if (name) |
223 | printk("%s", name); | 224 | printk("%s", name); |
224 | if ((cdb_len > 0) && (len != cdb_len)) | 225 | else |
225 | printk(", in_cdb_len=%d, ext_len=%d", | ||
226 | len, cdb_len); | ||
227 | } else { | ||
228 | printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa); | 226 | printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa); |
229 | if ((cdb_len > 0) && (len != cdb_len)) | 227 | |
230 | printk(", in_cdb_len=%d, ext_len=%d", | 228 | if ((cdb_len > 0) && (len != cdb_len)) |
231 | len, cdb_len); | 229 | printk(", in_cdb_len=%d, ext_len=%d", len, cdb_len); |
232 | } | 230 | |
233 | break; | 231 | break; |
234 | case MAINTENANCE_IN: | 232 | case MAINTENANCE_IN: |
235 | sa = cdbp[1] & 0x1f; | 233 | sa = cdbp[1] & 0x1f; |
@@ -348,6 +346,9 @@ void scsi_print_command(struct scsi_cmnd *cmd) | |||
348 | { | 346 | { |
349 | int k; | 347 | int k; |
350 | 348 | ||
349 | if (cmd->cmnd == NULL) | ||
350 | return; | ||
351 | |||
351 | scmd_printk(KERN_INFO, cmd, "CDB: "); | 352 | scmd_printk(KERN_INFO, cmd, "CDB: "); |
352 | print_opcode_name(cmd->cmnd, cmd->cmd_len); | 353 | print_opcode_name(cmd->cmnd, cmd->cmd_len); |
353 | 354 | ||