diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-28 19:23:06 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 19:23:06 -0800 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /drivers/scsi/constants.c | |
parent | c16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff) | |
parent | 30ff056c42c665b9ea535d8515890857ae382540 (diff) | |
download | linux-stable-47871889c601d8199c51a4086f77eebd77c29b0b.tar.gz linux-stable-47871889c601d8199c51a4086f77eebd77c29b0b.tar.bz2 linux-stable-47871889c601d8199c51a4086f77eebd77c29b0b.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/firmware/iscsi_ibft.c
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) break; } sa = (cdbp[8] << 8) + cdbp[9]; - name = get_sa_name(maint_in_arr, MAINT_IN_SZ, sa); - if (name) { + name = get_sa_name(variable_length_arr, VARIABLE_LENGTH_SZ, sa); + if (name) printk("%s", name); - if ((cdb_len > 0) && (len != cdb_len)) - printk(", in_cdb_len=%d, ext_len=%d", - len, cdb_len); - } else { + else printk("cdb[0]=0x%x, sa=0x%x", cdb0, sa); - if ((cdb_len > 0) && (len != cdb_len)) - printk(", in_cdb_len=%d, ext_len=%d", - len, cdb_len); - } + + if ((cdb_len > 0) && (len != cdb_len)) + printk(", in_cdb_len=%d, ext_len=%d", len, cdb_len); + break; case MAINTENANCE_IN: sa = cdbp[1] & 0x1f; @@ -349,6 +346,9 @@ void scsi_print_command(struct scsi_cmnd *cmd) { int k; + if (cmd->cmnd == NULL) + return; + scmd_printk(KERN_INFO, cmd, "CDB: "); print_opcode_name(cmd->cmnd, cmd->cmd_len); |