Skip to content

Commit

Permalink
ide-tape: dump gcw fields on error in idetape_identify_device()
Browse files Browse the repository at this point in the history
Cc: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 2, 2008
1 parent 47314fa commit 16422de
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -3852,16 +3852,17 @@ static int idetape_identify_device (ide_drive_t *drive)

/* 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;
Expand Down

0 comments on commit 16422de

Please sign in to comment.