ide-tape: dump gcw fields on error in idetape_identify_device()
PATCH 1/1 ide-tape: dump gcw fields on error in idetape_identify_device()
---
goes before "ide-tape: remove IDETAPE_DEBUG_INFO" patch in IDE quilt tree
drivers/ide/ide-tape.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/ide/ide-tape.c +7 -6
@@ -3852,16 +3852,17 @@ static int idetape_identify_device (ide_/* Check that we can support this device */ -if (gcw.protocol !=2 ) -printk (KERN_ERR "ide-tape: Protocol is not ATAPI\n" ); +if (gcw.protocol !=2 ) +printk (KERN_ERR "ide-tape: Protocol (0x%02x) is not ATAPI\n" , + gcw.protocol);else if (gcw.device_type !=1 ) -printk (KERN_ERR "ide-tape: Device type is not set to tape\n" ); +printk (KERN_ERR "ide-tape: Device type (0x%02x) is not set " +"to tape\n" , gcw.device_type);else if (!gcw.removable)printk (KERN_ERR "ide-tape: The removable flag is not set\n" );else if (gcw.packet_size !=0 ) { -printk (KERN_ERR "ide-tape: Packet size is not 12 bytes long\n" ); -if (gcw.packet_size ==1 ) -printk (KERN_ERR "ide-tape: Sorry, padding to 16 bytes is still not supported\n" ); +printk (KERN_ERR "ide-tape: Packet size (0x%02x) is not 12 " +"bytes long\n" , gcw.packet_size); }else return 1 ;return 0 ;
Quoted 1 line · Bartlomiej Zolnierkiewicz
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Quoted 15 lines
Index:
b/drivers/ide/ide-tape.c
===================================================================drivers/ide/ide-tape.c +3
-3@@ -3852,16 +3852,17 @@ static int idetape_identify_device (ide_/* Check that we can support this device */ -if (gcw.protocol !=2 ) -printk (KERN_ERR "ide-tape: Protocol is not ATAPI\n" ); +if (gcw.protocol !=2 ) +printk (KERN_ERR "ide-tape: Protocol (0x%02x) is not ATAPI\n" , + gcw.protocol);else if (gcw.device_type !=1 ) -printk (KERN_ERR "ide-tape: Device type is not set to tape\n" );
drivers/ide/ide-tape.c static int idetape_identify_device (ide_ · line 3865
Quoted 10 lines
drivers/ide/ide-tape.c +4
-3+printk (KERN_ERR "ide-tape: Device type (0x%02x) is not set " +"to tape\n" , gcw.device_type); else if (!gcw.removable)printk (KERN_ERR "ide-tape: The removable flag is not set\n" ); else if (gcw.packet_size != 0) { -printk (KERN_ERR "ide-tape: Packet size is not 12 bytes long\n" ); -if (gcw.packet_size ==1 ) -printk (KERN_ERR "ide-tape: Sorry, padding to 16 bytes is still not supported\n" ); +printk (KERN_ERR "ide-tape: Packet size (0x%02x) is not 12 " +"bytes long\n" , gcw.packet_size);
Shouldn't it be either "packet size is not 12 byted" or "packet is not 12
bytes long"?
MBR, Sergei
Quoted 24 lines · Sergei Shtylyov
Quoted 1 line · Bartlomiej Zolnierkiewicz
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Acked-by Sergei Shtylyov <[email protected]>Quoted 18 lines
Index:
b/drivers/ide/ide-tape.c
===================================================================drivers/ide/ide-tape.c +5
-2@@ -3852,16 +3852,17 @@ static int idetape_identify_device (ide_/* Check that we can support this device */ - if (gcw.protocol !=2 ) -printk (KERN_ERR "ide-tape: Protocol is not ATAPI\n" ); +if (gcw.protocol !=2 ) +printk (KERN_ERR "ide-tape: Protocol (0x%02x) is not ATAPI\n" , + gcw.protocol);else if (gcw.device_type !=1 ) - printk(KERN_ERR "ide-tape: Device type is not set to tape\n"); +printk (KERN_ERR "ide-tape: Device type (0x%02x) is not set " +"to tape\n" , gcw.device_type);else if (!gcw.removable)printk (KERN_ERR "ide-tape: The removable flag is not set\n" );else if (gcw.packet_size !=0 ) {
Quoted 8 lines
drivers/ide/ide-tape.c static int idetape_identify_device (ide_ · line 3865
Quoted 5 lines
drivers/ide/ide-tape.c +2
-3-printk (KERN_ERR "ide-tape: Packet size is not 12 bytes long\n" ); -if (gcw.packet_size ==1 ) -printk (KERN_ERR "ide-tape: Sorry, padding to 16 bytes is still not supported\n" ); +printk (KERN_ERR "ide-tape: Packet size (0x%02x) is not 12 " +"bytes long\n" , gcw.packet_size);Shouldn't it be either "packet size is not 12 byted" or "packet is not
12 bytes long"?
I like the last one better. Will send a correction later on to Bart. Thanks.
Signature · 2 lines
Regards/Gruß,
Boris.