diff options
Diffstat (limited to 'drivers/scsi/constants.c')
-rw-r--r-- | drivers/scsi/constants.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c index 9129bcf117cf..cd05e049d5f6 100644 --- a/drivers/scsi/constants.c +++ b/drivers/scsi/constants.c | |||
@@ -219,18 +219,15 @@ static void print_opcode_name(unsigned char * cdbp, int cdb_len) | |||
219 | break; | 219 | break; |
220 | } | 220 | } |
221 | sa = (cdbp[8] << 8) + cdbp[9]; | 221 | sa = (cdbp[8] << 8) + cdbp[9]; |
222 | name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa); | 222 | name = get_sa_name(variable_length_arr, VARIABLE_LENGTH_SZ, sa); |
223 | if (name) { | 223 | if (name) |
224 | printk("%s", name); | 224 | printk("%s", name); |
225 | if ((cdb_len > 0) && (len != cdb_len)) | 225 | else |
226 | printk(", in_cdb_len=%d, ext_len=%d", | ||
227 | len, cdb_len); | ||
228 | } else { | ||
229 | printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa); | 226 | printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa); |
230 | if ((cdb_len > 0) && (len != cdb_len)) | 227 | |
231 | printk(", in_cdb_len=%d, ext_len=%d", | 228 | if ((cdb_len > 0) && (len != cdb_len)) |
232 | len, cdb_len); | 229 | printk(", in_cdb_len=%d, ext_len=%d", len, cdb_len); |
233 | } | 230 | |
234 | break; | 231 | break; |
235 | case MAINTENANCE_IN: | 232 | case MAINTENANCE_IN: |
236 | sa = cdbp[1] & 0x1f; | 233 | sa = cdbp[1] & 0x1f; |
@@ -349,6 +346,9 @@ void scsi_print_command(struct scsi_cmnd *cmd) | |||
349 | { | 346 | { |
350 | int k; | 347 | int k; |
351 | 348 | ||
349 | if (cmd->cmnd == NULL) | ||
350 | return; | ||
351 | |||
352 | scmd_printk(KERN_INFO, cmd, "CDB: "); | 352 | scmd_printk(KERN_INFO, cmd, "CDB: "); |
353 | print_opcode_name(cmd->cmnd, cmd->cmd_len); | 353 | print_opcode_name(cmd->cmnd, cmd->cmd_len); |
354 | 354 | ||