From 7b9f25b539c3fa3c7b8c82775488a0021d90220f Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 23:09:28 +0100 Subject: ide: add ide_dump_identify() debug helper * Add ide_dump_identify() debug helper for dumping raw identify data in the hdparm friendly format (== the identify data can be extracted from dmesg output and passed to hdparm --Istdin). * Dump identify data in ide-probe.c::do_identify() if DEBUG is enabled. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/ide-probe.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/ide') diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index edf650b20c6..cdb81471102 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -129,6 +129,10 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd) drive->id_read = 1; local_irq_enable(); +#ifdef DEBUG + printk(KERN_INFO "%s: dumping identify data\n", drive->name); + ide_dump_identify((u8 *)id); +#endif ide_fix_driveid(id); #if defined (CONFIG_SCSI_EATA_PIO) || defined (CONFIG_SCSI_EATA) -- cgit v1.2.3