diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:54 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:54 -0400 |
commit | 568ca92774d2f6be4a7e2f8357559bfdc9424056 (patch) | |
tree | bde2cd61eafb613124923a6e57de91f0d0e4f016 /drivers/ide/ide-floppy.c | |
parent | 0b2eea4c5594ceaf13c57eaff7ff226263f1c36f (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-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 35 |
1 files changed, 18 insertions, 17 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 | /* |