diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2015-02-06 17:11:54 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-04-09 21:09:18 -0400 |
commit | 764a0c7e840085828afbc16fb9b47be5712f5531 (patch) | |
tree | c58601c17ca7cc5b248e3fdcce3e41aebfea008e | |
parent | 6ddc8cf40a2011af0c1a5dd300cc75d727c3c3a8 (diff) |
aha1542: Don't reduce functionality with DEBUG enabled
Enabling DEBUG disables write commands and devices with ID > 1.
Remove this "feature" to allow real debugging.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r-- | drivers/scsi/aha1542.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 87017fbdbc84..a19fcb02ff20 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -418,15 +418,7 @@ static int aha1542_queuecommand_lck(struct scsi_cmnd *cmd, void (*done) (struct | |||
418 | int mbo; | 418 | int mbo; |
419 | struct mailbox *mb = aha1542->mb; | 419 | struct mailbox *mb = aha1542->mb; |
420 | struct ccb *ccb = aha1542->ccb; | 420 | struct ccb *ccb = aha1542->ccb; |
421 | #ifdef DEBUG | ||
422 | int i; | ||
423 | 421 | ||
424 | if (target > 1) { | ||
425 | cmd->result = DID_TIME_OUT << 16; | ||
426 | done(cmd); | ||
427 | return 0; | ||
428 | } | ||
429 | #endif | ||
430 | if (*cmd->cmnd == REQUEST_SENSE) { | 422 | if (*cmd->cmnd == REQUEST_SENSE) { |
431 | /* Don't do the command - we have the sense data already */ | 423 | /* Don't do the command - we have the sense data already */ |
432 | cmd->result = 0; | 424 | cmd->result = 0; |
@@ -434,19 +426,16 @@ static int aha1542_queuecommand_lck(struct scsi_cmnd *cmd, void (*done) (struct | |||
434 | return 0; | 426 | return 0; |
435 | } | 427 | } |
436 | #ifdef DEBUG | 428 | #ifdef DEBUG |
437 | if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10) | 429 | { |
438 | i = xscsi2int(cmd->cmnd + 2); | 430 | int i = -1; |
439 | else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6) | 431 | if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10) |
440 | i = scsi2int(cmd->cmnd + 2); | 432 | i = xscsi2int(cmd->cmnd + 2); |
441 | else | 433 | else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6) |
442 | i = -1; | 434 | i = scsi2int(cmd->cmnd + 2); |
443 | if (done) | 435 | shost_printk(KERN_DEBUG, sh, "aha1542_queuecommand: dev %d cmd %02x pos %d len %d", |
444 | shost_printk(KERN_DEBUG, sh, "aha1542_queuecommand: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen); | 436 | target, *cmd->cmnd, i, bufflen); |
445 | else | 437 | print_hex_dump_bytes("command: ", DUMP_PREFIX_NONE, cmd->cmnd, cmd->cmd_len); |
446 | shost_printk(KERN_DEBUG, sh, "aha1542_command: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen); | 438 | } |
447 | print_hex_dump_bytes("command: ", DUMP_PREFIX_NONE, cmd->cmnd, cmd->cmd_len); | ||
448 | if (*cmd->cmnd == WRITE_10 || *cmd->cmnd == WRITE_6) | ||
449 | return 0; /* we are still testing, so *don't* write */ | ||
450 | #endif | 439 | #endif |
451 | /* Use the outgoing mailboxes in a round-robin fashion, because this | 440 | /* Use the outgoing mailboxes in a round-robin fashion, because this |
452 | is how the host adapter will scan for them */ | 441 | is how the host adapter will scan for them */ |