aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/ide/ide-floppy.c35
-rw-r--r--drivers/ide/ide-tape.c42
-rw-r--r--drivers/scsi/ide-scsi.c24
3 files changed, 53 insertions, 48 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 8dbb340dbfc0..dae1c90d421f 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -438,8 +438,8 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
438 debug_log("%s: I/O error\n", drive->name); 438 debug_log("%s: I/O error\n", drive->name);
439 rq->errors++; 439 rq->errors++;
440 if (pc->c[0] == GPCMD_REQUEST_SENSE) { 440 if (pc->c[0] == GPCMD_REQUEST_SENSE) {
441 printk(KERN_ERR "ide-floppy: I/O error in " 441 printk(KERN_ERR "%s: I/O error in request sense"
442 "request sense command\n"); 442 " command\n", drive->name);
443 return ide_do_reset(drive); 443 return ide_do_reset(drive);
444 } 444 }
445 /* Retry operation */ 445 /* Retry operation */
@@ -457,8 +457,8 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
457 457
458 if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) { 458 if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
459 pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS; 459 pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS;
460 printk(KERN_ERR "ide-floppy: The floppy wants to issue " 460 printk(KERN_ERR "%s: The device wants to issue more interrupts "
461 "more interrupts in DMA mode\n"); 461 "in DMA mode\n", drive->name);
462 ide_dma_off(drive); 462 ide_dma_off(drive);
463 return ide_do_reset(drive); 463 return ide_do_reset(drive);
464 } 464 }
@@ -470,14 +470,14 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
470 ireason = hwif->INB(hwif->io_ports.nsect_addr); 470 ireason = hwif->INB(hwif->io_ports.nsect_addr);
471 471
472 if (ireason & CD) { 472 if (ireason & CD) {
473 printk(KERN_ERR "ide-floppy: CoD != 0 in %s\n", __func__); 473 printk(KERN_ERR "%s: CoD != 0 in %s\n", drive->name, __func__);
474 return ide_do_reset(drive); 474 return ide_do_reset(drive);
475 } 475 }
476 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) { 476 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) {
477 /* Hopefully, we will never get here */ 477 /* Hopefully, we will never get here */
478 printk(KERN_ERR "ide-floppy: We wanted to %s, ", 478 printk(KERN_ERR "%s: We wanted to %s, but the device wants us "
479 (ireason & IO) ? "Write" : "Read"); 479 "to %s!\n", drive->name,
480 printk(KERN_ERR "but the floppy wants us to %s !\n", 480 (ireason & IO) ? "Write" : "Read",
481 (ireason & IO) ? "Read" : "Write"); 481 (ireason & IO) ? "Read" : "Write");
482 return ide_do_reset(drive); 482 return ide_do_reset(drive);
483 } 483 }
@@ -486,9 +486,10 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
486 temp = pc->xferred + bcount; 486 temp = pc->xferred + bcount;
487 if (temp > pc->req_xfer) { 487 if (temp > pc->req_xfer) {
488 if (temp > pc->buf_size) { 488 if (temp > pc->buf_size) {
489 printk(KERN_ERR "ide-floppy: The floppy wants " 489 printk(KERN_ERR "%s: The device wants to send "
490 "to send us more data than expected " 490 "us more data than expected - "
491 "- discarding data\n"); 491 "discarding data\n",
492 drive->name);
492 ide_pad_transfer(drive, 0, bcount); 493 ide_pad_transfer(drive, 0, bcount);
493 494
494 ide_set_handler(drive, 495 ide_set_handler(drive,
@@ -497,8 +498,8 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive)
497 NULL); 498 NULL);
498 return ide_started; 499 return ide_started;
499 } 500 }
500 debug_log("The floppy wants to send us more data than" 501 debug_log("The device wants to send us more data than "
501 " expected - allowing transfer\n"); 502 "expected - allowing transfer\n");
502 } 503 }
503 } 504 }
504 if (pc->flags & PC_FLAG_WRITING) 505 if (pc->flags & PC_FLAG_WRITING)
@@ -552,14 +553,14 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
552 u8 ireason; 553 u8 ireason;
553 554
554 if (ide_wait_stat(&startstop, drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) { 555 if (ide_wait_stat(&startstop, drive, DRQ_STAT, BUSY_STAT, WAIT_READY)) {
555 printk(KERN_ERR "ide-floppy: Strange, packet command " 556 printk(KERN_ERR "%s: Strange, packet command initiated yet "
556 "initiated yet DRQ isn't asserted\n"); 557 "DRQ isn't asserted\n", drive->name);
557 return startstop; 558 return startstop;
558 } 559 }
559 ireason = hwif->INB(hwif->io_ports.nsect_addr); 560 ireason = hwif->INB(hwif->io_ports.nsect_addr);
560 if ((ireason & CD) == 0 || (ireason & IO)) { 561 if ((ireason & CD) == 0 || (ireason & IO)) {
561 printk(KERN_ERR "ide-floppy: (IO,CoD) != (0,1) " 562 printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing "
562 "while issuing a packet command\n"); 563 "a packet command\n", drive->name);
563 return ide_do_reset(drive); 564 return ide_do_reset(drive);
564 } 565 }
565 /* 566 /*
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 */
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index d2dad9039e0d..5b8a1931ac9b 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -391,7 +391,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
391 ireason = hwif->INB(hwif->io_ports.nsect_addr); 391 ireason = hwif->INB(hwif->io_ports.nsect_addr);
392 392
393 if (ireason & CD) { 393 if (ireason & CD) {
394 printk(KERN_ERR "ide-scsi: CoD != 0 in idescsi_pc_intr\n"); 394 printk(KERN_ERR "%s: CoD != 0 in %s\n", drive->name, __func__);
395 return ide_do_reset (drive); 395 return ide_do_reset (drive);
396 } 396 }
397 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) { 397 if (((ireason & IO) == IO) == !!(pc->flags & PC_FLAG_WRITING)) {
@@ -406,9 +406,10 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
406 temp = pc->xferred + bcount; 406 temp = pc->xferred + bcount;
407 if (temp > pc->req_xfer) { 407 if (temp > pc->req_xfer) {
408 if (temp > pc->buf_size) { 408 if (temp > pc->buf_size) {
409 printk(KERN_ERR "ide-scsi: The scsi wants to " 409 printk(KERN_ERR "%s: The device wants to send "
410 "send us more data than expected " 410 "us more data than expected - "
411 "- discarding data\n"); 411 "discarding data\n",
412 drive->name);
412 temp = pc->buf_size - pc->xferred; 413 temp = pc->buf_size - pc->xferred;
413 if (temp) { 414 if (temp) {
414 if (pc->sg) 415 if (pc->sg)
@@ -417,8 +418,9 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
417 else 418 else
418 hwif->input_data(drive, NULL, 419 hwif->input_data(drive, NULL,
419 pc->cur_pos, temp); 420 pc->cur_pos, temp);
420 printk(KERN_ERR "ide-scsi: transferred" 421 printk(KERN_ERR "%s: transferred %d of "
421 " %d of %d bytes\n", 422 "%d bytes\n",
423 drive->name,
422 temp, bcount); 424 temp, bcount);
423 } 425 }
424 pc->xferred += temp; 426 pc->xferred += temp;
@@ -427,7 +429,7 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
427 ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); 429 ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry);
428 return ide_started; 430 return ide_started;
429 } 431 }
430 debug_log("The scsi wants to send us more data than " 432 debug_log("The device wants to send us more data than "
431 "expected - allowing transfer\n"); 433 "expected - allowing transfer\n");
432 } 434 }
433 xferfunc = hwif->input_data; 435 xferfunc = hwif->input_data;
@@ -458,14 +460,14 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive)
458 u8 ireason; 460 u8 ireason;
459 461
460 if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) { 462 if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) {
461 printk(KERN_ERR "ide-scsi: Strange, packet command " 463 printk(KERN_ERR "%s: Strange, packet command initiated yet "
462 "initiated yet DRQ isn't asserted\n"); 464 "DRQ isn't asserted\n", drive->name);
463 return startstop; 465 return startstop;
464 } 466 }
465 ireason = hwif->INB(hwif->io_ports.nsect_addr); 467 ireason = hwif->INB(hwif->io_ports.nsect_addr);
466 if ((ireason & CD) == 0 || (ireason & IO)) { 468 if ((ireason & CD) == 0 || (ireason & IO)) {
467 printk(KERN_ERR "ide-scsi: (IO,CoD) != (0,1) while " 469 printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing "
468 "issuing a packet command\n"); 470 "a packet command\n", drive->name);
469 return ide_do_reset (drive); 471 return ide_do_reset (drive);
470 } 472 }
471 473