aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:54 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:54 -0400
commit568ca92774d2f6be4a7e2f8357559bfdc9424056 (patch)
treebde2cd61eafb613124923a6e57de91f0d0e4f016 /drivers/ide/ide-tape.c
parent0b2eea4c5594ceaf13c57eaff7ff226263f1c36f (diff)
ide-{floppy,tape,scsi}: log device name instead of driver name
Log device name instead of driver name in *_pc_intr() and *_transfer_pc*(). While at it: * Merge two consecutive printk()-s in *_pc_intr() together. * Replace "floppy"/"tape"/"scsi" references in printk()-s by "device". Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index cc70e759fc8e..8f10211c2b08 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -776,8 +776,8 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
776 debug_log(DBG_ERR, "%s: I/O error\n", tape->name); 776 debug_log(DBG_ERR, "%s: I/O error\n", tape->name);
777 777
778 if (pc->c[0] == REQUEST_SENSE) { 778 if (pc->c[0] == REQUEST_SENSE) {
779 printk(KERN_ERR "ide-tape: I/O error in request" 779 printk(KERN_ERR "%s: I/O error in request sense"
780 " sense command\n"); 780 " command\n", drive->name);
781 return ide_do_reset(drive); 781 return ide_do_reset(drive);
782 } 782 }
783 debug_log(DBG_ERR, "[cmd %x]: check condition\n", 783 debug_log(DBG_ERR, "[cmd %x]: check condition\n",
@@ -805,8 +805,8 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
805 805
806 if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { 806 if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
807 pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS; 807 pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS;
808 printk(KERN_ERR "ide-tape: The tape wants to issue more " 808 printk(KERN_ERR "%s: The device wants to issue more interrupts "
809 "interrupts in DMA mode\n"); 809 "in DMA mode\n", drive->name);
810 ide_dma_off(drive); 810 ide_dma_off(drive);
811 return ide_do_reset(drive); 811 return ide_do_reset(drive);
812 } 812 }
@@ -817,14 +817,14 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
817 ireason = hwif->INB(hwif->io_ports.nsect_addr); 817 ireason = hwif->INB(hwif->io_ports.nsect_addr);
818 818
819 if (ireason & CD) { 819 if (ireason & CD) {
820 printk(KERN_ERR "ide-tape: CoD != 0 in %s\n", __func__); 820 printk(KERN_ERR "%s: CoD != 0 in %s\n", drive->name, __func__);
821 return ide_do_reset(drive); 821 return ide_do_reset(drive);
822 } 822 }
823 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) { 823 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) {
824 /* Hopefully, we will never get here */ 824 /* Hopefully, we will never get here */
825 printk(KERN_ERR "ide-tape: We wanted to %s, ", 825 printk(KERN_ERR "%s: We wanted to %s, but the device wants us "
826 (ireason & IO) ? "Write" : "Read"); 826 "to %s!\n", drive->name,
827 printk(KERN_ERR "ide-tape: but the tape wants us to %s !\n", 827 (ireason & IO) ? "Write" : "Read",
828 (ireason & IO) ? "Read" : "Write"); 828 (ireason & IO) ? "Read" : "Write");
829 return ide_do_reset(drive); 829 return ide_do_reset(drive);
830 } 830 }
@@ -833,15 +833,16 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
833 temp = pc->xferred + bcount; 833 temp = pc->xferred + bcount;
834 if (temp > pc->req_xfer) { 834 if (temp > pc->req_xfer) {
835 if (temp > pc->buf_size) { 835 if (temp > pc->buf_size) {
836 printk(KERN_ERR "ide-tape: The tape wants to " 836 printk(KERN_ERR "%s: The device wants to send "
837 "send us more data than expected " 837 "us more data than expected - "
838 "- discarding data\n"); 838 "discarding data\n",
839 drive->name);
839 ide_pad_transfer(drive, 0, bcount); 840 ide_pad_transfer(drive, 0, bcount);
840 ide_set_handler(drive, &idetape_pc_intr, 841 ide_set_handler(drive, &idetape_pc_intr,
841 IDETAPE_WAIT_CMD, NULL); 842 IDETAPE_WAIT_CMD, NULL);
842 return ide_started; 843 return ide_started;
843 } 844 }
844 debug_log(DBG_SENSE, "The tape wants to send us more " 845 debug_log(DBG_SENSE, "The device wants to send us more "
845 "data than expected - allowing transfer\n"); 846 "data than expected - allowing transfer\n");
846 } 847 }
847 iobuf = &idetape_input_buffers; 848 iobuf = &idetape_input_buffers;
@@ -914,26 +915,27 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
914 u8 ireason; 915 u8 ireason;
915 916
916 if (ide_wait_stat(&startstop, drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) { 917 if (ide_wait_stat(&startstop, drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) {
917 printk(KERN_ERR "ide-tape: Strange, packet command initiated " 918 printk(KERN_ERR "%s: Strange, packet command initiated yet "
918 "yet DRQ isn't asserted\n"); 919 "DRQ isn't asserted\n", drive->name);
919 return startstop; 920 return startstop;
920 } 921 }
921 ireason = hwif->INB(hwif->io_ports.nsect_addr); 922 ireason = hwif->INB(hwif->io_ports.nsect_addr);
922 while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) { 923 while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) {
923 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing " 924 printk(KERN_ERR "%s: (IO,CoD != (0,1) while issuing "
924 "a packet command, retrying\n"); 925 "a packet command, retrying\n", drive->name);
925 udelay(100); 926 udelay(100);
926 ireason = hwif->INB(hwif->io_ports.nsect_addr); 927 ireason = hwif->INB(hwif->io_ports.nsect_addr);
927 if (retries == 0) { 928 if (retries == 0) {
928 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while " 929 printk(KERN_ERR "%s: (IO,CoD != (0,1) while issuing "
929 "issuing a packet command, ignoring\n"); 930 "a packet command, ignoring\n",
931 drive->name);
930 ireason |= CD; 932 ireason |= CD;
931 ireason &= ~IO; 933 ireason &= ~IO;
932 } 934 }
933 } 935 }
934 if ((ireason & CD) == 0 || (ireason & IO)) { 936 if ((ireason & CD) == 0 || (ireason & IO)) {
935 printk(KERN_ERR "ide-tape: (IO,CoD) != (0,1) while issuing " 937 printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing "
936 "a packet command\n"); 938 "a packet command\n", drive->name);
937 return ide_do_reset(drive); 939 return ide_do_reset(drive);
938 } 940 }
939 /* Set the interrupt routine */ 941 /* Set the interrupt routine */