diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 6abd17a..cb3a705 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -2712,6 +2712,26 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc) } cmd->result = SAM_STAT_GOOD; + + if(1) + { + unsigned long flags; + u8 *buf, *scsicmd; + int len; + + buf = ata_scsi_rbuf_get(cmd, true, &flags); + len = scsi_bufflen(cmd); + scsicmd = cmd->cmnd; + + printk(KERN_INFO "CDB rbuf: [%02x %02x %02x %02x %02x %02x %02x %02x %02x]\n", + scsicmd[0], scsicmd[1], scsicmd[2], scsicmd[3], + scsicmd[4], scsicmd[5], scsicmd[6], scsicmd[7], + scsicmd[8]); + + print_hex_dump(KERN_INFO, "CDB rbuf: ", DUMP_PREFIX_OFFSET, 16, 1, buf, len, true); + + ata_scsi_rbuf_put(cmd, true, &flags); + } } qc->scsidone(cmd); diff --git a/include/linux/libata.h b/include/linux/libata.h index 91f705d..4373982 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -53,8 +53,8 @@ * compile-time options: to be removed as soon as all the drivers are * converted to the new debugging mechanism */ -#undef ATA_DEBUG /* debugging output */ -#undef ATA_VERBOSE_DEBUG /* yet more debugging output */ +#define ATA_DEBUG /* debugging output */ +#define ATA_VERBOSE_DEBUG /* yet more debugging output */ #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ #undef ATA_NDEBUG /* define to disable quick runtime checks */