mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
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>
This commit is contained in:
parent
6ddc8cf40a
commit
764a0c7e84
@ -418,15 +418,7 @@ static int aha1542_queuecommand_lck(struct scsi_cmnd *cmd, void (*done) (struct
|
|||||||
int mbo;
|
int mbo;
|
||||||
struct mailbox *mb = aha1542->mb;
|
struct mailbox *mb = aha1542->mb;
|
||||||
struct ccb *ccb = aha1542->ccb;
|
struct ccb *ccb = aha1542->ccb;
|
||||||
#ifdef DEBUG
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (target > 1) {
|
|
||||||
cmd->result = DID_TIME_OUT << 16;
|
|
||||||
done(cmd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (*cmd->cmnd == REQUEST_SENSE) {
|
if (*cmd->cmnd == REQUEST_SENSE) {
|
||||||
/* Don't do the command - we have the sense data already */
|
/* Don't do the command - we have the sense data already */
|
||||||
cmd->result = 0;
|
cmd->result = 0;
|
||||||
@ -434,19 +426,16 @@ static int aha1542_queuecommand_lck(struct scsi_cmnd *cmd, void (*done) (struct
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10)
|
if (*cmd->cmnd == READ_10 || *cmd->cmnd == WRITE_10)
|
||||||
i = xscsi2int(cmd->cmnd + 2);
|
i = xscsi2int(cmd->cmnd + 2);
|
||||||
else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6)
|
else if (*cmd->cmnd == READ_6 || *cmd->cmnd == WRITE_6)
|
||||||
i = scsi2int(cmd->cmnd + 2);
|
i = scsi2int(cmd->cmnd + 2);
|
||||||
else
|
shost_printk(KERN_DEBUG, sh, "aha1542_queuecommand: dev %d cmd %02x pos %d len %d",
|
||||||
i = -1;
|
target, *cmd->cmnd, i, bufflen);
|
||||||
if (done)
|
|
||||||
shost_printk(KERN_DEBUG, sh, "aha1542_queuecommand: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen);
|
|
||||||
else
|
|
||||||
shost_printk(KERN_DEBUG, sh, "aha1542_command: dev %d cmd %02x pos %d len %d ", target, *cmd->cmnd, i, bufflen);
|
|
||||||
print_hex_dump_bytes("command: ", DUMP_PREFIX_NONE, cmd->cmnd, cmd->cmd_len);
|
print_hex_dump_bytes("command: ", DUMP_PREFIX_NONE, cmd->cmnd, cmd->cmd_len);
|
||||||
if (*cmd->cmnd == WRITE_10 || *cmd->cmnd == WRITE_6)
|
}
|
||||||
return 0; /* we are still testing, so *don't* write */
|
|
||||||
#endif
|
#endif
|
||||||
/* Use the outgoing mailboxes in a round-robin fashion, because this
|
/* Use the outgoing mailboxes in a round-robin fashion, because this
|
||||||
is how the host adapter will scan for them */
|
is how the host adapter will scan for them */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user