Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74279
b: refs/heads/master
c: 6413f08
h: refs/heads/master
i:
  74277: 0cd5c46
  74275: 5b2fac9
  74271: 6d28017
v: v3
  • Loading branch information
Denis Cheng authored and Bartlomiej Zolnierkiewicz committed Nov 27, 2007
1 parent 70ff13e commit caa9d0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e97564f362a93f8c248246c19828895950341252
refs/heads/master: 6413f08666830afec21e41e50c28a2c5105ede69
22 changes: 8 additions & 14 deletions trunk/drivers/scsi/ide-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,6 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
}
}

static void hexdump(u8 *x, int len)
{
int i;

printk("[ ");
for (i = 0; i < len; i++)
printk("%x ", x[i]);
printk("]\n");
}

static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_command)
{
idescsi_scsi_t *scsi = drive_to_idescsi(drive);
Expand Down Expand Up @@ -282,7 +272,8 @@ static int idescsi_check_condition(ide_drive_t *drive, struct request *failed_co
pc->scsi_cmd = ((idescsi_pc_t *) failed_command->special)->scsi_cmd;
if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
printk ("ide-scsi: %s: queue cmd = ", drive->name);
hexdump(pc->c, 6);
print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1, pc->c,
6, 0);
}
rq->rq_disk = scsi->disk;
return ide_do_drive_cmd(drive, rq, ide_preempt);
Expand Down Expand Up @@ -337,7 +328,8 @@ static int idescsi_end_request (ide_drive_t *drive, int uptodate, int nrsecs)
idescsi_pc_t *opc = (idescsi_pc_t *) rq->buffer;
if (log) {
printk ("ide-scsi: %s: wrap up check %lu, rst = ", drive->name, opc->scsi_cmd->serial_number);
hexdump(pc->buffer,16);
print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
pc->buffer, 16, 0);
}
memcpy((void *) opc->scsi_cmd->sense_buffer, pc->buffer, SCSI_SENSE_BUFFERSIZE);
kfree(pc->buffer);
Expand Down Expand Up @@ -816,10 +808,12 @@ static int idescsi_queue (struct scsi_cmnd *cmd,

if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) {
printk ("ide-scsi: %s: que %lu, cmd = ", drive->name, cmd->serial_number);
hexdump(cmd->cmnd, cmd->cmd_len);
print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
cmd->cmnd, cmd->cmd_len, 0);
if (memcmp(pc->c, cmd->cmnd, cmd->cmd_len)) {
printk ("ide-scsi: %s: que %lu, tsl = ", drive->name, cmd->serial_number);
hexdump(pc->c, 12);
print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
pc->c, 12, 0);
}
}

Expand Down

0 comments on commit caa9d0c

Please sign in to comment.