diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2014-12-02 18:10:49 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 12:57:45 -0500 |
commit | 0c3de38ff3eec506ef08ede32110d1f266366ccd (patch) | |
tree | cd94d017cf33979ccabc0cec01542fe4be50a38a /drivers/scsi | |
parent | 5af2e38242f87231244393e69beca7284e70056f (diff) |
scsi: remove SPRINTF macro
The macro SPRINTF doesn't save a lot of typing or make the code more
readable, and depending on a specific identifier (m) in the
surrounding scope is generally frowned upon. Nuke it.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/NCR5380.c | 20 | ||||
-rw-r--r-- | drivers/scsi/aha152x.c | 295 | ||||
-rw-r--r-- | drivers/scsi/dc395x.c | 78 | ||||
-rw-r--r-- | drivers/scsi/nsp32.c | 41 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 50 | ||||
-rw-r--r-- | drivers/scsi/wd7000.c | 41 |
6 files changed, 252 insertions, 273 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 36244d63def2..aca181e508f8 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -716,8 +716,6 @@ static int __maybe_unused NCR5380_write_info(struct Scsi_Host *instance, | |||
716 | } | 716 | } |
717 | #endif | 717 | #endif |
718 | 718 | ||
719 | #undef SPRINTF | ||
720 | #define SPRINTF(args...) seq_printf(m, ## args) | ||
721 | static | 719 | static |
722 | void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m); | 720 | void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m); |
723 | static | 721 | static |
@@ -734,19 +732,19 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
734 | hostdata = (struct NCR5380_hostdata *) instance->hostdata; | 732 | hostdata = (struct NCR5380_hostdata *) instance->hostdata; |
735 | 733 | ||
736 | #ifdef PSEUDO_DMA | 734 | #ifdef PSEUDO_DMA |
737 | SPRINTF("Highwater I/O busy spin counts: write %d, read %d\n", | 735 | seq_printf(m, "Highwater I/O busy spin counts: write %d, read %d\n", |
738 | hostdata->spin_max_w, hostdata->spin_max_r); | 736 | hostdata->spin_max_w, hostdata->spin_max_r); |
739 | #endif | 737 | #endif |
740 | spin_lock_irq(instance->host_lock); | 738 | spin_lock_irq(instance->host_lock); |
741 | if (!hostdata->connected) | 739 | if (!hostdata->connected) |
742 | SPRINTF("scsi%d: no currently connected command\n", instance->host_no); | 740 | seq_printf(m, "scsi%d: no currently connected command\n", instance->host_no); |
743 | else | 741 | else |
744 | lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); | 742 | lprint_Scsi_Cmnd((struct scsi_cmnd *) hostdata->connected, m); |
745 | SPRINTF("scsi%d: issue_queue\n", instance->host_no); | 743 | seq_printf(m, "scsi%d: issue_queue\n", instance->host_no); |
746 | for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) | 744 | for (ptr = (struct scsi_cmnd *) hostdata->issue_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) |
747 | lprint_Scsi_Cmnd(ptr, m); | 745 | lprint_Scsi_Cmnd(ptr, m); |
748 | 746 | ||
749 | SPRINTF("scsi%d: disconnected_queue\n", instance->host_no); | 747 | seq_printf(m, "scsi%d: disconnected_queue\n", instance->host_no); |
750 | for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) | 748 | for (ptr = (struct scsi_cmnd *) hostdata->disconnected_queue; ptr; ptr = (struct scsi_cmnd *) ptr->host_scribble) |
751 | lprint_Scsi_Cmnd(ptr, m); | 749 | lprint_Scsi_Cmnd(ptr, m); |
752 | spin_unlock_irq(instance->host_lock); | 750 | spin_unlock_irq(instance->host_lock); |
@@ -755,8 +753,8 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
755 | 753 | ||
756 | static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) | 754 | static void lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, struct seq_file *m) |
757 | { | 755 | { |
758 | SPRINTF("scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); | 756 | seq_printf(m, "scsi%d : destination target %d, lun %llu\n", cmd->device->host->host_no, cmd->device->id, cmd->device->lun); |
759 | SPRINTF(" command = "); | 757 | seq_printf(m, " command = "); |
760 | lprint_command(cmd->cmnd, m); | 758 | lprint_command(cmd->cmnd, m); |
761 | } | 759 | } |
762 | 760 | ||
@@ -765,13 +763,13 @@ static void lprint_command(unsigned char *command, struct seq_file *m) | |||
765 | int i, s; | 763 | int i, s; |
766 | lprint_opcode(command[0], m); | 764 | lprint_opcode(command[0], m); |
767 | for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) | 765 | for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) |
768 | SPRINTF("%02x ", command[i]); | 766 | seq_printf(m, "%02x ", command[i]); |
769 | SPRINTF("\n"); | 767 | seq_printf(m, "\n"); |
770 | } | 768 | } |
771 | 769 | ||
772 | static void lprint_opcode(int opcode, struct seq_file *m) | 770 | static void lprint_opcode(int opcode, struct seq_file *m) |
773 | { | 771 | { |
774 | SPRINTF("%2d (0x%02x)", opcode, opcode); | 772 | seq_printf(m, "%2d (0x%02x)", opcode, opcode); |
775 | } | 773 | } |
776 | 774 | ||
777 | 775 | ||
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 2b960b326daf..f14ad8a17daa 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -2490,299 +2490,296 @@ static void show_queues(struct Scsi_Host *shpnt) | |||
2490 | disp_enintr(shpnt); | 2490 | disp_enintr(shpnt); |
2491 | } | 2491 | } |
2492 | 2492 | ||
2493 | #undef SPRINTF | ||
2494 | #define SPRINTF(args...) seq_printf(m, ##args) | ||
2495 | |||
2496 | static void get_command(struct seq_file *m, Scsi_Cmnd * ptr) | 2493 | static void get_command(struct seq_file *m, Scsi_Cmnd * ptr) |
2497 | { | 2494 | { |
2498 | int i; | 2495 | int i; |
2499 | 2496 | ||
2500 | SPRINTF("%p: target=%d; lun=%d; cmnd=( ", | 2497 | seq_printf(m, "%p: target=%d; lun=%d; cmnd=( ", |
2501 | ptr, ptr->device->id, (u8)ptr->device->lun); | 2498 | ptr, ptr->device->id, (u8)ptr->device->lun); |
2502 | 2499 | ||
2503 | for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++) | 2500 | for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++) |
2504 | SPRINTF("0x%02x ", ptr->cmnd[i]); | 2501 | seq_printf(m, "0x%02x ", ptr->cmnd[i]); |
2505 | 2502 | ||
2506 | SPRINTF("); resid=%d; residual=%d; buffers=%d; phase |", | 2503 | seq_printf(m, "); resid=%d; residual=%d; buffers=%d; phase |", |
2507 | scsi_get_resid(ptr), ptr->SCp.this_residual, | 2504 | scsi_get_resid(ptr), ptr->SCp.this_residual, |
2508 | ptr->SCp.buffers_residual); | 2505 | ptr->SCp.buffers_residual); |
2509 | 2506 | ||
2510 | if (ptr->SCp.phase & not_issued) | 2507 | if (ptr->SCp.phase & not_issued) |
2511 | SPRINTF("not issued|"); | 2508 | seq_printf(m, "not issued|"); |
2512 | if (ptr->SCp.phase & selecting) | 2509 | if (ptr->SCp.phase & selecting) |
2513 | SPRINTF("selecting|"); | 2510 | seq_printf(m, "selecting|"); |
2514 | if (ptr->SCp.phase & disconnected) | 2511 | if (ptr->SCp.phase & disconnected) |
2515 | SPRINTF("disconnected|"); | 2512 | seq_printf(m, "disconnected|"); |
2516 | if (ptr->SCp.phase & aborted) | 2513 | if (ptr->SCp.phase & aborted) |
2517 | SPRINTF("aborted|"); | 2514 | seq_printf(m, "aborted|"); |
2518 | if (ptr->SCp.phase & identified) | 2515 | if (ptr->SCp.phase & identified) |
2519 | SPRINTF("identified|"); | 2516 | seq_printf(m, "identified|"); |
2520 | if (ptr->SCp.phase & completed) | 2517 | if (ptr->SCp.phase & completed) |
2521 | SPRINTF("completed|"); | 2518 | seq_printf(m, "completed|"); |
2522 | if (ptr->SCp.phase & spiordy) | 2519 | if (ptr->SCp.phase & spiordy) |
2523 | SPRINTF("spiordy|"); | 2520 | seq_printf(m, "spiordy|"); |
2524 | if (ptr->SCp.phase & syncneg) | 2521 | if (ptr->SCp.phase & syncneg) |
2525 | SPRINTF("syncneg|"); | 2522 | seq_printf(m, "syncneg|"); |
2526 | SPRINTF("; next=0x%p\n", SCNEXT(ptr)); | 2523 | seq_printf(m, "; next=0x%p\n", SCNEXT(ptr)); |
2527 | } | 2524 | } |
2528 | 2525 | ||
2529 | static void get_ports(struct seq_file *m, struct Scsi_Host *shpnt) | 2526 | static void get_ports(struct seq_file *m, struct Scsi_Host *shpnt) |
2530 | { | 2527 | { |
2531 | int s; | 2528 | int s; |
2532 | 2529 | ||
2533 | SPRINTF("\n%s: %s(%s) ", CURRENT_SC ? "on bus" : "waiting", states[STATE].name, states[PREVSTATE].name); | 2530 | seq_printf(m, "\n%s: %s(%s) ", CURRENT_SC ? "on bus" : "waiting", states[STATE].name, states[PREVSTATE].name); |
2534 | 2531 | ||
2535 | s = GETPORT(SCSISEQ); | 2532 | s = GETPORT(SCSISEQ); |
2536 | SPRINTF("SCSISEQ( "); | 2533 | seq_printf(m, "SCSISEQ( "); |
2537 | if (s & TEMODEO) | 2534 | if (s & TEMODEO) |
2538 | SPRINTF("TARGET MODE "); | 2535 | seq_printf(m, "TARGET MODE "); |
2539 | if (s & ENSELO) | 2536 | if (s & ENSELO) |
2540 | SPRINTF("SELO "); | 2537 | seq_printf(m, "SELO "); |
2541 | if (s & ENSELI) | 2538 | if (s & ENSELI) |
2542 | SPRINTF("SELI "); | 2539 | seq_printf(m, "SELI "); |
2543 | if (s & ENRESELI) | 2540 | if (s & ENRESELI) |
2544 | SPRINTF("RESELI "); | 2541 | seq_printf(m, "RESELI "); |
2545 | if (s & ENAUTOATNO) | 2542 | if (s & ENAUTOATNO) |
2546 | SPRINTF("AUTOATNO "); | 2543 | seq_printf(m, "AUTOATNO "); |
2547 | if (s & ENAUTOATNI) | 2544 | if (s & ENAUTOATNI) |
2548 | SPRINTF("AUTOATNI "); | 2545 | seq_printf(m, "AUTOATNI "); |
2549 | if (s & ENAUTOATNP) | 2546 | if (s & ENAUTOATNP) |
2550 | SPRINTF("AUTOATNP "); | 2547 | seq_printf(m, "AUTOATNP "); |
2551 | if (s & SCSIRSTO) | 2548 | if (s & SCSIRSTO) |
2552 | SPRINTF("SCSIRSTO "); | 2549 | seq_printf(m, "SCSIRSTO "); |
2553 | SPRINTF(");"); | 2550 | seq_printf(m, ");"); |
2554 | 2551 | ||
2555 | SPRINTF(" SCSISIG("); | 2552 | seq_printf(m, " SCSISIG("); |
2556 | s = GETPORT(SCSISIG); | 2553 | s = GETPORT(SCSISIG); |
2557 | switch (s & P_MASK) { | 2554 | switch (s & P_MASK) { |
2558 | case P_DATAO: | 2555 | case P_DATAO: |
2559 | SPRINTF("DATA OUT"); | 2556 | seq_printf(m, "DATA OUT"); |
2560 | break; | 2557 | break; |
2561 | case P_DATAI: | 2558 | case P_DATAI: |
2562 | SPRINTF("DATA IN"); | 2559 | seq_printf(m, "DATA IN"); |
2563 | break; | 2560 | break; |
2564 | case P_CMD: | 2561 | case P_CMD: |
2565 | SPRINTF("COMMAND"); | 2562 | seq_printf(m, "COMMAND"); |
2566 | break; | 2563 | break; |
2567 | case P_STATUS: | 2564 | case P_STATUS: |
2568 | SPRINTF("STATUS"); | 2565 | seq_printf(m, "STATUS"); |
2569 | break; | 2566 | break; |
2570 | case P_MSGO: | 2567 | case P_MSGO: |
2571 | SPRINTF("MESSAGE OUT"); | 2568 | seq_printf(m, "MESSAGE OUT"); |
2572 | break; | 2569 | break; |
2573 | case P_MSGI: | 2570 | case P_MSGI: |
2574 | SPRINTF("MESSAGE IN"); | 2571 | seq_printf(m, "MESSAGE IN"); |
2575 | break; | 2572 | break; |
2576 | default: | 2573 | default: |
2577 | SPRINTF("*invalid*"); | 2574 | seq_printf(m, "*invalid*"); |
2578 | break; | 2575 | break; |
2579 | } | 2576 | } |
2580 | 2577 | ||
2581 | SPRINTF("); "); | 2578 | seq_printf(m, "); "); |
2582 | 2579 | ||
2583 | SPRINTF("INTSTAT (%s); ", TESTHI(DMASTAT, INTSTAT) ? "hi" : "lo"); | 2580 | seq_printf(m, "INTSTAT (%s); ", TESTHI(DMASTAT, INTSTAT) ? "hi" : "lo"); |
2584 | 2581 | ||
2585 | SPRINTF("SSTAT( "); | 2582 | seq_printf(m, "SSTAT( "); |
2586 | s = GETPORT(SSTAT0); | 2583 | s = GETPORT(SSTAT0); |
2587 | if (s & TARGET) | 2584 | if (s & TARGET) |
2588 | SPRINTF("TARGET "); | 2585 | seq_printf(m, "TARGET "); |
2589 | if (s & SELDO) | 2586 | if (s & SELDO) |
2590 | SPRINTF("SELDO "); | 2587 | seq_printf(m, "SELDO "); |
2591 | if (s & SELDI) | 2588 | if (s & SELDI) |
2592 | SPRINTF("SELDI "); | 2589 | seq_printf(m, "SELDI "); |
2593 | if (s & SELINGO) | 2590 | if (s & SELINGO) |
2594 | SPRINTF("SELINGO "); | 2591 | seq_printf(m, "SELINGO "); |
2595 | if (s & SWRAP) | 2592 | if (s & SWRAP) |
2596 | SPRINTF("SWRAP "); | 2593 | seq_printf(m, "SWRAP "); |
2597 | if (s & SDONE) | 2594 | if (s & SDONE) |
2598 | SPRINTF("SDONE "); | 2595 | seq_printf(m, "SDONE "); |
2599 | if (s & SPIORDY) | 2596 | if (s & SPIORDY) |
2600 | SPRINTF("SPIORDY "); | 2597 | seq_printf(m, "SPIORDY "); |
2601 | if (s & DMADONE) | 2598 | if (s & DMADONE) |
2602 | SPRINTF("DMADONE "); | 2599 | seq_printf(m, "DMADONE "); |
2603 | 2600 | ||
2604 | s = GETPORT(SSTAT1); | 2601 | s = GETPORT(SSTAT1); |
2605 | if (s & SELTO) | 2602 | if (s & SELTO) |
2606 | SPRINTF("SELTO "); | 2603 | seq_printf(m, "SELTO "); |
2607 | if (s & ATNTARG) | 2604 | if (s & ATNTARG) |
2608 | SPRINTF("ATNTARG "); | 2605 | seq_printf(m, "ATNTARG "); |
2609 | if (s & SCSIRSTI) | 2606 | if (s & SCSIRSTI) |
2610 | SPRINTF("SCSIRSTI "); | 2607 | seq_printf(m, "SCSIRSTI "); |
2611 | if (s & PHASEMIS) | 2608 | if (s & PHASEMIS) |
2612 | SPRINTF("PHASEMIS "); | 2609 | seq_printf(m, "PHASEMIS "); |
2613 | if (s & BUSFREE) | 2610 | if (s & BUSFREE) |
2614 | SPRINTF("BUSFREE "); | 2611 | seq_printf(m, "BUSFREE "); |
2615 | if (s & SCSIPERR) | 2612 | if (s & SCSIPERR) |
2616 | SPRINTF("SCSIPERR "); | 2613 | seq_printf(m, "SCSIPERR "); |
2617 | if (s & PHASECHG) | 2614 | if (s & PHASECHG) |
2618 | SPRINTF("PHASECHG "); | 2615 | seq_printf(m, "PHASECHG "); |
2619 | if (s & REQINIT) | 2616 | if (s & REQINIT) |
2620 | SPRINTF("REQINIT "); | 2617 | seq_printf(m, "REQINIT "); |
2621 | SPRINTF("); "); | 2618 | seq_printf(m, "); "); |
2622 | 2619 | ||
2623 | 2620 | ||
2624 | SPRINTF("SSTAT( "); | 2621 | seq_printf(m, "SSTAT( "); |
2625 | 2622 | ||
2626 | s = GETPORT(SSTAT0) & GETPORT(SIMODE0); | 2623 | s = GETPORT(SSTAT0) & GETPORT(SIMODE0); |
2627 | 2624 | ||
2628 | if (s & TARGET) | 2625 | if (s & TARGET) |
2629 | SPRINTF("TARGET "); | 2626 | seq_printf(m, "TARGET "); |
2630 | if (s & SELDO) | 2627 | if (s & SELDO) |
2631 | SPRINTF("SELDO "); | 2628 | seq_printf(m, "SELDO "); |
2632 | if (s & SELDI) | 2629 | if (s & SELDI) |
2633 | SPRINTF("SELDI "); | 2630 | seq_printf(m, "SELDI "); |
2634 | if (s & SELINGO) | 2631 | if (s & SELINGO) |
2635 | SPRINTF("SELINGO "); | 2632 | seq_printf(m, "SELINGO "); |
2636 | if (s & SWRAP) | 2633 | if (s & SWRAP) |
2637 | SPRINTF("SWRAP "); | 2634 | seq_printf(m, "SWRAP "); |
2638 | if (s & SDONE) | 2635 | if (s & SDONE) |
2639 | SPRINTF("SDONE "); | 2636 | seq_printf(m, "SDONE "); |
2640 | if (s & SPIORDY) | 2637 | if (s & SPIORDY) |
2641 | SPRINTF("SPIORDY "); | 2638 | seq_printf(m, "SPIORDY "); |
2642 | if (s & DMADONE) | 2639 | if (s & DMADONE) |
2643 | SPRINTF("DMADONE "); | 2640 | seq_printf(m, "DMADONE "); |
2644 | 2641 | ||
2645 | s = GETPORT(SSTAT1) & GETPORT(SIMODE1); | 2642 | s = GETPORT(SSTAT1) & GETPORT(SIMODE1); |
2646 | 2643 | ||
2647 | if (s & SELTO) | 2644 | if (s & SELTO) |
2648 | SPRINTF("SELTO "); | 2645 | seq_printf(m, "SELTO "); |
2649 | if (s & ATNTARG) | 2646 | if (s & ATNTARG) |
2650 | SPRINTF("ATNTARG "); | 2647 | seq_printf(m, "ATNTARG "); |
2651 | if (s & SCSIRSTI) | 2648 | if (s & SCSIRSTI) |
2652 | SPRINTF("SCSIRSTI "); | 2649 | seq_printf(m, "SCSIRSTI "); |
2653 | if (s & PHASEMIS) | 2650 | if (s & PHASEMIS) |
2654 | SPRINTF("PHASEMIS "); | 2651 | seq_printf(m, "PHASEMIS "); |
2655 | if (s & BUSFREE) | 2652 | if (s & BUSFREE) |
2656 | SPRINTF("BUSFREE "); | 2653 | seq_printf(m, "BUSFREE "); |
2657 | if (s & SCSIPERR) | 2654 | if (s & SCSIPERR) |
2658 | SPRINTF("SCSIPERR "); | 2655 | seq_printf(m, "SCSIPERR "); |
2659 | if (s & PHASECHG) | 2656 | if (s & PHASECHG) |
2660 | SPRINTF("PHASECHG "); | 2657 | seq_printf(m, "PHASECHG "); |
2661 | if (s & REQINIT) | 2658 | if (s & REQINIT) |
2662 | SPRINTF("REQINIT "); | 2659 | seq_printf(m, "REQINIT "); |
2663 | SPRINTF("); "); | 2660 | seq_printf(m, "); "); |
2664 | 2661 | ||
2665 | SPRINTF("SXFRCTL0( "); | 2662 | seq_printf(m, "SXFRCTL0( "); |
2666 | 2663 | ||
2667 | s = GETPORT(SXFRCTL0); | 2664 | s = GETPORT(SXFRCTL0); |
2668 | if (s & SCSIEN) | 2665 | if (s & SCSIEN) |
2669 | SPRINTF("SCSIEN "); | 2666 | seq_printf(m, "SCSIEN "); |
2670 | if (s & DMAEN) | 2667 | if (s & DMAEN) |
2671 | SPRINTF("DMAEN "); | 2668 | seq_printf(m, "DMAEN "); |
2672 | if (s & CH1) | 2669 | if (s & CH1) |
2673 | SPRINTF("CH1 "); | 2670 | seq_printf(m, "CH1 "); |
2674 | if (s & CLRSTCNT) | 2671 | if (s & CLRSTCNT) |
2675 | SPRINTF("CLRSTCNT "); | 2672 | seq_printf(m, "CLRSTCNT "); |
2676 | if (s & SPIOEN) | 2673 | if (s & SPIOEN) |
2677 | SPRINTF("SPIOEN "); | 2674 | seq_printf(m, "SPIOEN "); |
2678 | if (s & CLRCH1) | 2675 | if (s & CLRCH1) |
2679 | SPRINTF("CLRCH1 "); | 2676 | seq_printf(m, "CLRCH1 "); |
2680 | SPRINTF("); "); | 2677 | seq_printf(m, "); "); |
2681 | 2678 | ||
2682 | SPRINTF("SIGNAL( "); | 2679 | seq_printf(m, "SIGNAL( "); |
2683 | 2680 | ||
2684 | s = GETPORT(SCSISIG); | 2681 | s = GETPORT(SCSISIG); |
2685 | if (s & SIG_ATNI) | 2682 | if (s & SIG_ATNI) |
2686 | SPRINTF("ATNI "); | 2683 | seq_printf(m, "ATNI "); |
2687 | if (s & SIG_SELI) | 2684 | if (s & SIG_SELI) |
2688 | SPRINTF("SELI "); | 2685 | seq_printf(m, "SELI "); |
2689 | if (s & SIG_BSYI) | 2686 | if (s & SIG_BSYI) |
2690 | SPRINTF("BSYI "); | 2687 | seq_printf(m, "BSYI "); |
2691 | if (s & SIG_REQI) | 2688 | if (s & SIG_REQI) |
2692 | SPRINTF("REQI "); | 2689 | seq_printf(m, "REQI "); |
2693 | if (s & SIG_ACKI) | 2690 | if (s & SIG_ACKI) |
2694 | SPRINTF("ACKI "); | 2691 | seq_printf(m, "ACKI "); |
2695 | SPRINTF("); "); | 2692 | seq_printf(m, "); "); |
2696 | 2693 | ||
2697 | SPRINTF("SELID(%02x), ", GETPORT(SELID)); | 2694 | seq_printf(m, "SELID(%02x), ", GETPORT(SELID)); |
2698 | 2695 | ||
2699 | SPRINTF("STCNT(%d), ", GETSTCNT()); | 2696 | seq_printf(m, "STCNT(%d), ", GETSTCNT()); |
2700 | 2697 | ||
2701 | SPRINTF("SSTAT2( "); | 2698 | seq_printf(m, "SSTAT2( "); |
2702 | 2699 | ||
2703 | s = GETPORT(SSTAT2); | 2700 | s = GETPORT(SSTAT2); |
2704 | if (s & SOFFSET) | 2701 | if (s & SOFFSET) |
2705 | SPRINTF("SOFFSET "); | 2702 | seq_printf(m, "SOFFSET "); |
2706 | if (s & SEMPTY) | 2703 | if (s & SEMPTY) |
2707 | SPRINTF("SEMPTY "); | 2704 | seq_printf(m, "SEMPTY "); |
2708 | if (s & SFULL) | 2705 | if (s & SFULL) |
2709 | SPRINTF("SFULL "); | 2706 | seq_printf(m, "SFULL "); |
2710 | SPRINTF("); SFCNT (%d); ", s & (SFULL | SFCNT)); | 2707 | seq_printf(m, "); SFCNT (%d); ", s & (SFULL | SFCNT)); |
2711 | 2708 | ||
2712 | s = GETPORT(SSTAT3); | 2709 | s = GETPORT(SSTAT3); |
2713 | SPRINTF("SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); | 2710 | seq_printf(m, "SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); |
2714 | 2711 | ||
2715 | SPRINTF("SSTAT4( "); | 2712 | seq_printf(m, "SSTAT4( "); |
2716 | s = GETPORT(SSTAT4); | 2713 | s = GETPORT(SSTAT4); |
2717 | if (s & SYNCERR) | 2714 | if (s & SYNCERR) |
2718 | SPRINTF("SYNCERR "); | 2715 | seq_printf(m, "SYNCERR "); |
2719 | if (s & FWERR) | 2716 | if (s & FWERR) |
2720 | SPRINTF("FWERR "); | 2717 | seq_printf(m, "FWERR "); |
2721 | if (s & FRERR) | 2718 | if (s & FRERR) |
2722 | SPRINTF("FRERR "); | 2719 | seq_printf(m, "FRERR "); |
2723 | SPRINTF("); "); | 2720 | seq_printf(m, "); "); |
2724 | 2721 | ||
2725 | SPRINTF("DMACNTRL0( "); | 2722 | seq_printf(m, "DMACNTRL0( "); |
2726 | s = GETPORT(DMACNTRL0); | 2723 | s = GETPORT(DMACNTRL0); |
2727 | SPRINTF("%s ", s & _8BIT ? "8BIT" : "16BIT"); | 2724 | seq_printf(m, "%s ", s & _8BIT ? "8BIT" : "16BIT"); |
2728 | SPRINTF("%s ", s & DMA ? "DMA" : "PIO"); | 2725 | seq_printf(m, "%s ", s & DMA ? "DMA" : "PIO"); |
2729 | SPRINTF("%s ", s & WRITE_READ ? "WRITE" : "READ"); | 2726 | seq_printf(m, "%s ", s & WRITE_READ ? "WRITE" : "READ"); |
2730 | if (s & ENDMA) | 2727 | if (s & ENDMA) |
2731 | SPRINTF("ENDMA "); | 2728 | seq_printf(m, "ENDMA "); |
2732 | if (s & INTEN) | 2729 | if (s & INTEN) |
2733 | SPRINTF("INTEN "); | 2730 | seq_printf(m, "INTEN "); |
2734 | if (s & RSTFIFO) | 2731 | if (s & RSTFIFO) |
2735 | SPRINTF("RSTFIFO "); | 2732 | seq_printf(m, "RSTFIFO "); |
2736 | if (s & SWINT) | 2733 | if (s & SWINT) |
2737 | SPRINTF("SWINT "); | 2734 | seq_printf(m, "SWINT "); |
2738 | SPRINTF("); "); | 2735 | seq_printf(m, "); "); |
2739 | 2736 | ||
2740 | SPRINTF("DMASTAT( "); | 2737 | seq_printf(m, "DMASTAT( "); |
2741 | s = GETPORT(DMASTAT); | 2738 | s = GETPORT(DMASTAT); |
2742 | if (s & ATDONE) | 2739 | if (s & ATDONE) |
2743 | SPRINTF("ATDONE "); | 2740 | seq_printf(m, "ATDONE "); |
2744 | if (s & WORDRDY) | 2741 | if (s & WORDRDY) |
2745 | SPRINTF("WORDRDY "); | 2742 | seq_printf(m, "WORDRDY "); |
2746 | if (s & DFIFOFULL) | 2743 | if (s & DFIFOFULL) |
2747 | SPRINTF("DFIFOFULL "); | 2744 | seq_printf(m, "DFIFOFULL "); |
2748 | if (s & DFIFOEMP) | 2745 | if (s & DFIFOEMP) |
2749 | SPRINTF("DFIFOEMP "); | 2746 | seq_printf(m, "DFIFOEMP "); |
2750 | SPRINTF(")\n"); | 2747 | seq_printf(m, ")\n"); |
2751 | 2748 | ||
2752 | SPRINTF("enabled interrupts( "); | 2749 | seq_printf(m, "enabled interrupts( "); |
2753 | 2750 | ||
2754 | s = GETPORT(SIMODE0); | 2751 | s = GETPORT(SIMODE0); |
2755 | if (s & ENSELDO) | 2752 | if (s & ENSELDO) |
2756 | SPRINTF("ENSELDO "); | 2753 | seq_printf(m, "ENSELDO "); |
2757 | if (s & ENSELDI) | 2754 | if (s & ENSELDI) |
2758 | SPRINTF("ENSELDI "); | 2755 | seq_printf(m, "ENSELDI "); |
2759 | if (s & ENSELINGO) | 2756 | if (s & ENSELINGO) |
2760 | SPRINTF("ENSELINGO "); | 2757 | seq_printf(m, "ENSELINGO "); |
2761 | if (s & ENSWRAP) | 2758 | if (s & ENSWRAP) |
2762 | SPRINTF("ENSWRAP "); | 2759 | seq_printf(m, "ENSWRAP "); |
2763 | if (s & ENSDONE) | 2760 | if (s & ENSDONE) |
2764 | SPRINTF("ENSDONE "); | 2761 | seq_printf(m, "ENSDONE "); |
2765 | if (s & ENSPIORDY) | 2762 | if (s & ENSPIORDY) |
2766 | SPRINTF("ENSPIORDY "); | 2763 | seq_printf(m, "ENSPIORDY "); |
2767 | if (s & ENDMADONE) | 2764 | if (s & ENDMADONE) |
2768 | SPRINTF("ENDMADONE "); | 2765 | seq_printf(m, "ENDMADONE "); |
2769 | 2766 | ||
2770 | s = GETPORT(SIMODE1); | 2767 | s = GETPORT(SIMODE1); |
2771 | if (s & ENSELTIMO) | 2768 | if (s & ENSELTIMO) |
2772 | SPRINTF("ENSELTIMO "); | 2769 | seq_printf(m, "ENSELTIMO "); |
2773 | if (s & ENATNTARG) | 2770 | if (s & ENATNTARG) |
2774 | SPRINTF("ENATNTARG "); | 2771 | seq_printf(m, "ENATNTARG "); |
2775 | if (s & ENPHASEMIS) | 2772 | if (s & ENPHASEMIS) |
2776 | SPRINTF("ENPHASEMIS "); | 2773 | seq_printf(m, "ENPHASEMIS "); |
2777 | if (s & ENBUSFREE) | 2774 | if (s & ENBUSFREE) |
2778 | SPRINTF("ENBUSFREE "); | 2775 | seq_printf(m, "ENBUSFREE "); |
2779 | if (s & ENSCSIPERR) | 2776 | if (s & ENSCSIPERR) |
2780 | SPRINTF("ENSCSIPERR "); | 2777 | seq_printf(m, "ENSCSIPERR "); |
2781 | if (s & ENPHASECHG) | 2778 | if (s & ENPHASECHG) |
2782 | SPRINTF("ENPHASECHG "); | 2779 | seq_printf(m, "ENPHASECHG "); |
2783 | if (s & ENREQINIT) | 2780 | if (s & ENREQINIT) |
2784 | SPRINTF("ENREQINIT "); | 2781 | seq_printf(m, "ENREQINIT "); |
2785 | SPRINTF(")\n"); | 2782 | seq_printf(m, ")\n"); |
2786 | } | 2783 | } |
2787 | 2784 | ||
2788 | static int aha152x_set_info(struct Scsi_Host *shpnt, char *buffer, int length) | 2785 | static int aha152x_set_info(struct Scsi_Host *shpnt, char *buffer, int length) |
@@ -2825,56 +2822,56 @@ static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) | |||
2825 | Scsi_Cmnd *ptr; | 2822 | Scsi_Cmnd *ptr; |
2826 | unsigned long flags; | 2823 | unsigned long flags; |
2827 | 2824 | ||
2828 | SPRINTF(AHA152X_REVID "\n"); | 2825 | seq_printf(m, AHA152X_REVID "\n"); |
2829 | 2826 | ||
2830 | SPRINTF("ioports 0x%04lx to 0x%04lx\n", | 2827 | seq_printf(m, "ioports 0x%04lx to 0x%04lx\n", |
2831 | shpnt->io_port, shpnt->io_port + shpnt->n_io_port - 1); | 2828 | shpnt->io_port, shpnt->io_port + shpnt->n_io_port - 1); |
2832 | SPRINTF("interrupt 0x%02x\n", shpnt->irq); | 2829 | seq_printf(m, "interrupt 0x%02x\n", shpnt->irq); |
2833 | SPRINTF("disconnection/reconnection %s\n", | 2830 | seq_printf(m, "disconnection/reconnection %s\n", |
2834 | RECONNECT ? "enabled" : "disabled"); | 2831 | RECONNECT ? "enabled" : "disabled"); |
2835 | SPRINTF("parity checking %s\n", | 2832 | seq_printf(m, "parity checking %s\n", |
2836 | PARITY ? "enabled" : "disabled"); | 2833 | PARITY ? "enabled" : "disabled"); |
2837 | SPRINTF("synchronous transfers %s\n", | 2834 | seq_printf(m, "synchronous transfers %s\n", |
2838 | SYNCHRONOUS ? "enabled" : "disabled"); | 2835 | SYNCHRONOUS ? "enabled" : "disabled"); |
2839 | SPRINTF("%d commands currently queued\n", HOSTDATA(shpnt)->commands); | 2836 | seq_printf(m, "%d commands currently queued\n", HOSTDATA(shpnt)->commands); |
2840 | 2837 | ||
2841 | if(SYNCHRONOUS) { | 2838 | if(SYNCHRONOUS) { |
2842 | SPRINTF("synchronously operating targets (tick=50 ns):\n"); | 2839 | seq_printf(m, "synchronously operating targets (tick=50 ns):\n"); |
2843 | for (i = 0; i < 8; i++) | 2840 | for (i = 0; i < 8; i++) |
2844 | if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) | 2841 | if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) |
2845 | SPRINTF("target %d: period %dT/%dns; req/ack offset %d\n", | 2842 | seq_printf(m, "target %d: period %dT/%dns; req/ack offset %d\n", |
2846 | i, | 2843 | i, |
2847 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2), | 2844 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2), |
2848 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, | 2845 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, |
2849 | HOSTDATA(shpnt)->syncrate[i] & 0x0f); | 2846 | HOSTDATA(shpnt)->syncrate[i] & 0x0f); |
2850 | } | 2847 | } |
2851 | SPRINTF("\nqueue status:\n"); | 2848 | seq_printf(m, "\nqueue status:\n"); |
2852 | DO_LOCK(flags); | 2849 | DO_LOCK(flags); |
2853 | if (ISSUE_SC) { | 2850 | if (ISSUE_SC) { |
2854 | SPRINTF("not yet issued commands:\n"); | 2851 | seq_printf(m, "not yet issued commands:\n"); |
2855 | for (ptr = ISSUE_SC; ptr; ptr = SCNEXT(ptr)) | 2852 | for (ptr = ISSUE_SC; ptr; ptr = SCNEXT(ptr)) |
2856 | get_command(m, ptr); | 2853 | get_command(m, ptr); |
2857 | } else | 2854 | } else |
2858 | SPRINTF("no not yet issued commands\n"); | 2855 | seq_printf(m, "no not yet issued commands\n"); |
2859 | DO_UNLOCK(flags); | 2856 | DO_UNLOCK(flags); |
2860 | 2857 | ||
2861 | if (CURRENT_SC) { | 2858 | if (CURRENT_SC) { |
2862 | SPRINTF("current command:\n"); | 2859 | seq_printf(m, "current command:\n"); |
2863 | get_command(m, CURRENT_SC); | 2860 | get_command(m, CURRENT_SC); |
2864 | } else | 2861 | } else |
2865 | SPRINTF("no current command\n"); | 2862 | seq_printf(m, "no current command\n"); |
2866 | 2863 | ||
2867 | if (DISCONNECTED_SC) { | 2864 | if (DISCONNECTED_SC) { |
2868 | SPRINTF("disconnected commands:\n"); | 2865 | seq_printf(m, "disconnected commands:\n"); |
2869 | for (ptr = DISCONNECTED_SC; ptr; ptr = SCNEXT(ptr)) | 2866 | for (ptr = DISCONNECTED_SC; ptr; ptr = SCNEXT(ptr)) |
2870 | get_command(m, ptr); | 2867 | get_command(m, ptr); |
2871 | } else | 2868 | } else |
2872 | SPRINTF("no disconnected commands\n"); | 2869 | seq_printf(m, "no disconnected commands\n"); |
2873 | 2870 | ||
2874 | get_ports(m, shpnt); | 2871 | get_ports(m, shpnt); |
2875 | 2872 | ||
2876 | #if defined(AHA152X_STAT) | 2873 | #if defined(AHA152X_STAT) |
2877 | SPRINTF("statistics:\n" | 2874 | seq_printf(m, "statistics:\n" |
2878 | "total commands: %d\n" | 2875 | "total commands: %d\n" |
2879 | "disconnections: %d\n" | 2876 | "disconnections: %d\n" |
2880 | "busfree with check condition: %d\n" | 2877 | "busfree with check condition: %d\n" |
@@ -2894,7 +2891,7 @@ static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) | |||
2894 | HOSTDATA(shpnt)->busfree_without_done_command, | 2891 | HOSTDATA(shpnt)->busfree_without_done_command, |
2895 | HOSTDATA(shpnt)->busfree_without_any_action); | 2892 | HOSTDATA(shpnt)->busfree_without_any_action); |
2896 | for(i=0; i<maxstate; i++) { | 2893 | for(i=0; i<maxstate; i++) { |
2897 | SPRINTF("%-10s %-12d %-12d %-12ld\n", | 2894 | seq_printf(m, "%-10s %-12d %-12d %-12ld\n", |
2898 | states[i].name, | 2895 | states[i].name, |
2899 | HOSTDATA(shpnt)->count_trans[i], | 2896 | HOSTDATA(shpnt)->count_trans[i], |
2900 | HOSTDATA(shpnt)->count[i], | 2897 | HOSTDATA(shpnt)->count[i], |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 0c6be0a17f53..0a1ed50ff8bb 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -4610,13 +4610,10 @@ static void adapter_uninit(struct AdapterCtlBlk *acb) | |||
4610 | } | 4610 | } |
4611 | 4611 | ||
4612 | 4612 | ||
4613 | #undef SPRINTF | ||
4614 | #define SPRINTF(args...) seq_printf(m,##args) | ||
4615 | |||
4616 | #undef YESNO | 4613 | #undef YESNO |
4617 | #define YESNO(YN) \ | 4614 | #define YESNO(YN) \ |
4618 | if (YN) SPRINTF(" Yes ");\ | 4615 | if (YN) seq_printf(m, " Yes ");\ |
4619 | else SPRINTF(" No ") | 4616 | else seq_printf(m, " No ") |
4620 | 4617 | ||
4621 | static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) | 4618 | static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) |
4622 | { | 4619 | { |
@@ -4626,47 +4623,44 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
4626 | unsigned long flags; | 4623 | unsigned long flags; |
4627 | int dev; | 4624 | int dev; |
4628 | 4625 | ||
4629 | SPRINTF(DC395X_BANNER " PCI SCSI Host Adapter\n"); | 4626 | seq_printf(m, DC395X_BANNER " PCI SCSI Host Adapter\n"); |
4630 | SPRINTF(" Driver Version " DC395X_VERSION "\n"); | 4627 | seq_printf(m, " Driver Version " DC395X_VERSION "\n"); |
4631 | 4628 | ||
4632 | DC395x_LOCK_IO(acb->scsi_host, flags); | 4629 | DC395x_LOCK_IO(acb->scsi_host, flags); |
4633 | 4630 | ||
4634 | SPRINTF("SCSI Host Nr %i, ", host->host_no); | 4631 | seq_printf(m, "SCSI Host Nr %i, ", host->host_no); |
4635 | SPRINTF("DC395U/UW/F DC315/U %s\n", | 4632 | seq_printf(m, "DC395U/UW/F DC315/U %s\n", |
4636 | (acb->config & HCC_WIDE_CARD) ? "Wide" : ""); | 4633 | (acb->config & HCC_WIDE_CARD) ? "Wide" : ""); |
4637 | SPRINTF("io_port_base 0x%04lx, ", acb->io_port_base); | 4634 | seq_printf(m, "io_port_base 0x%04lx, ", acb->io_port_base); |
4638 | SPRINTF("irq_level 0x%04x, ", acb->irq_level); | 4635 | seq_printf(m, "irq_level 0x%04x, ", acb->irq_level); |
4639 | SPRINTF(" SelTimeout %ims\n", (1638 * acb->sel_timeout) / 1000); | 4636 | seq_printf(m, " SelTimeout %ims\n", (1638 * acb->sel_timeout) / 1000); |
4640 | 4637 | ||
4641 | SPRINTF("MaxID %i, MaxLUN %llu, ", host->max_id, host->max_lun); | 4638 | seq_printf(m, "MaxID %i, MaxLUN %llu, ", host->max_id, host->max_lun); |
4642 | SPRINTF("AdapterID %i\n", host->this_id); | 4639 | seq_printf(m, "AdapterID %i\n", host->this_id); |
4643 | 4640 | ||
4644 | SPRINTF("tag_max_num %i", acb->tag_max_num); | 4641 | seq_printf(m, "tag_max_num %i", acb->tag_max_num); |
4645 | /*SPRINTF(", DMA_Status %i\n", DC395x_read8(acb, TRM_S1040_DMA_STATUS)); */ | 4642 | /*seq_printf(m, ", DMA_Status %i\n", DC395x_read8(acb, TRM_S1040_DMA_STATUS)); */ |
4646 | SPRINTF(", FilterCfg 0x%02x", | 4643 | seq_printf(m, ", FilterCfg 0x%02x", |
4647 | DC395x_read8(acb, TRM_S1040_SCSI_CONFIG1)); | 4644 | DC395x_read8(acb, TRM_S1040_SCSI_CONFIG1)); |
4648 | SPRINTF(", DelayReset %is\n", acb->eeprom.delay_time); | 4645 | seq_printf(m, ", DelayReset %is\n", acb->eeprom.delay_time); |
4649 | /*SPRINTF("\n"); */ | 4646 | /*seq_printf(m, "\n"); */ |
4650 | 4647 | ||
4651 | SPRINTF("Nr of DCBs: %i\n", list_size(&acb->dcb_list)); | 4648 | seq_printf(m, "Nr of DCBs: %i\n", list_size(&acb->dcb_list)); |
4652 | SPRINTF | 4649 | seq_printf(m, "Map of attached LUNs: %02x %02x %02x %02x %02x %02x %02x %02x\n", |
4653 | ("Map of attached LUNs: %02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
4654 | acb->dcb_map[0], acb->dcb_map[1], acb->dcb_map[2], | 4650 | acb->dcb_map[0], acb->dcb_map[1], acb->dcb_map[2], |
4655 | acb->dcb_map[3], acb->dcb_map[4], acb->dcb_map[5], | 4651 | acb->dcb_map[3], acb->dcb_map[4], acb->dcb_map[5], |
4656 | acb->dcb_map[6], acb->dcb_map[7]); | 4652 | acb->dcb_map[6], acb->dcb_map[7]); |
4657 | SPRINTF | 4653 | seq_printf(m, " %02x %02x %02x %02x %02x %02x %02x %02x\n", |
4658 | (" %02x %02x %02x %02x %02x %02x %02x %02x\n", | ||
4659 | acb->dcb_map[8], acb->dcb_map[9], acb->dcb_map[10], | 4654 | acb->dcb_map[8], acb->dcb_map[9], acb->dcb_map[10], |
4660 | acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13], | 4655 | acb->dcb_map[11], acb->dcb_map[12], acb->dcb_map[13], |
4661 | acb->dcb_map[14], acb->dcb_map[15]); | 4656 | acb->dcb_map[14], acb->dcb_map[15]); |
4662 | 4657 | ||
4663 | SPRINTF | 4658 | seq_printf(m, "Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n"); |
4664 | ("Un ID LUN Prty Sync Wide DsCn SndS TagQ nego_period SyncFreq SyncOffs MaxCmd\n"); | ||
4665 | 4659 | ||
4666 | dev = 0; | 4660 | dev = 0; |
4667 | list_for_each_entry(dcb, &acb->dcb_list, list) { | 4661 | list_for_each_entry(dcb, &acb->dcb_list, list) { |
4668 | int nego_period; | 4662 | int nego_period; |
4669 | SPRINTF("%02i %02i %02i ", dev, dcb->target_id, | 4663 | seq_printf(m, "%02i %02i %02i ", dev, dcb->target_id, |
4670 | dcb->target_lun); | 4664 | dcb->target_lun); |
4671 | YESNO(dcb->dev_mode & NTC_DO_PARITY_CHK); | 4665 | YESNO(dcb->dev_mode & NTC_DO_PARITY_CHK); |
4672 | YESNO(dcb->sync_offset); | 4666 | YESNO(dcb->sync_offset); |
@@ -4676,53 +4670,53 @@ static int dc395x_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
4676 | YESNO(dcb->sync_mode & EN_TAG_QUEUEING); | 4670 | YESNO(dcb->sync_mode & EN_TAG_QUEUEING); |
4677 | nego_period = clock_period[dcb->sync_period & 0x07] << 2; | 4671 | nego_period = clock_period[dcb->sync_period & 0x07] << 2; |
4678 | if (dcb->sync_offset) | 4672 | if (dcb->sync_offset) |
4679 | SPRINTF(" %03i ns ", nego_period); | 4673 | seq_printf(m, " %03i ns ", nego_period); |
4680 | else | 4674 | else |
4681 | SPRINTF(" (%03i ns)", (dcb->min_nego_period << 2)); | 4675 | seq_printf(m, " (%03i ns)", (dcb->min_nego_period << 2)); |
4682 | 4676 | ||
4683 | if (dcb->sync_offset & 0x0f) { | 4677 | if (dcb->sync_offset & 0x0f) { |
4684 | spd = 1000 / (nego_period); | 4678 | spd = 1000 / (nego_period); |
4685 | spd1 = 1000 % (nego_period); | 4679 | spd1 = 1000 % (nego_period); |
4686 | spd1 = (spd1 * 10 + nego_period / 2) / (nego_period); | 4680 | spd1 = (spd1 * 10 + nego_period / 2) / (nego_period); |
4687 | SPRINTF(" %2i.%1i M %02i ", spd, spd1, | 4681 | seq_printf(m, " %2i.%1i M %02i ", spd, spd1, |
4688 | (dcb->sync_offset & 0x0f)); | 4682 | (dcb->sync_offset & 0x0f)); |
4689 | } else | 4683 | } else |
4690 | SPRINTF(" "); | 4684 | seq_printf(m, " "); |
4691 | 4685 | ||
4692 | /* Add more info ... */ | 4686 | /* Add more info ... */ |
4693 | SPRINTF(" %02i\n", dcb->max_command); | 4687 | seq_printf(m, " %02i\n", dcb->max_command); |
4694 | dev++; | 4688 | dev++; |
4695 | } | 4689 | } |
4696 | 4690 | ||
4697 | if (timer_pending(&acb->waiting_timer)) | 4691 | if (timer_pending(&acb->waiting_timer)) |
4698 | SPRINTF("Waiting queue timer running\n"); | 4692 | seq_printf(m, "Waiting queue timer running\n"); |
4699 | else | 4693 | else |
4700 | SPRINTF("\n"); | 4694 | seq_printf(m, "\n"); |
4701 | 4695 | ||
4702 | list_for_each_entry(dcb, &acb->dcb_list, list) { | 4696 | list_for_each_entry(dcb, &acb->dcb_list, list) { |
4703 | struct ScsiReqBlk *srb; | 4697 | struct ScsiReqBlk *srb; |
4704 | if (!list_empty(&dcb->srb_waiting_list)) | 4698 | if (!list_empty(&dcb->srb_waiting_list)) |
4705 | SPRINTF("DCB (%02i-%i): Waiting: %i:", | 4699 | seq_printf(m, "DCB (%02i-%i): Waiting: %i:", |
4706 | dcb->target_id, dcb->target_lun, | 4700 | dcb->target_id, dcb->target_lun, |
4707 | list_size(&dcb->srb_waiting_list)); | 4701 | list_size(&dcb->srb_waiting_list)); |
4708 | list_for_each_entry(srb, &dcb->srb_waiting_list, list) | 4702 | list_for_each_entry(srb, &dcb->srb_waiting_list, list) |
4709 | SPRINTF(" %p", srb->cmd); | 4703 | seq_printf(m, " %p", srb->cmd); |
4710 | if (!list_empty(&dcb->srb_going_list)) | 4704 | if (!list_empty(&dcb->srb_going_list)) |
4711 | SPRINTF("\nDCB (%02i-%i): Going : %i:", | 4705 | seq_printf(m, "\nDCB (%02i-%i): Going : %i:", |
4712 | dcb->target_id, dcb->target_lun, | 4706 | dcb->target_id, dcb->target_lun, |
4713 | list_size(&dcb->srb_going_list)); | 4707 | list_size(&dcb->srb_going_list)); |
4714 | list_for_each_entry(srb, &dcb->srb_going_list, list) | 4708 | list_for_each_entry(srb, &dcb->srb_going_list, list) |
4715 | SPRINTF(" %p", srb->cmd); | 4709 | seq_printf(m, " %p", srb->cmd); |
4716 | if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list)) | 4710 | if (!list_empty(&dcb->srb_waiting_list) || !list_empty(&dcb->srb_going_list)) |
4717 | SPRINTF("\n"); | 4711 | seq_printf(m, "\n"); |
4718 | } | 4712 | } |
4719 | 4713 | ||
4720 | if (debug_enabled(DBG_1)) { | 4714 | if (debug_enabled(DBG_1)) { |
4721 | SPRINTF("DCB list for ACB %p:\n", acb); | 4715 | seq_printf(m, "DCB list for ACB %p:\n", acb); |
4722 | list_for_each_entry(dcb, &acb->dcb_list, list) { | 4716 | list_for_each_entry(dcb, &acb->dcb_list, list) { |
4723 | SPRINTF("%p -> ", dcb); | 4717 | seq_printf(m, "%p -> ", dcb); |
4724 | } | 4718 | } |
4725 | SPRINTF("END\n"); | 4719 | seq_printf(m, "END\n"); |
4726 | } | 4720 | } |
4727 | 4721 | ||
4728 | DC395x_UNLOCK_IO(acb->scsi_host, flags); | 4722 | DC395x_UNLOCK_IO(acb->scsi_host, flags); |
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index 90abb03c9074..3e775517628d 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c | |||
@@ -1441,8 +1441,6 @@ static irqreturn_t do_nsp32_isr(int irq, void *dev_id) | |||
1441 | return IRQ_RETVAL(handled); | 1441 | return IRQ_RETVAL(handled); |
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | #undef SPRINTF | ||
1445 | #define SPRINTF(args...) seq_printf(m, ##args) | ||
1446 | 1444 | ||
1447 | static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) | 1445 | static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) |
1448 | { | 1446 | { |
@@ -1458,64 +1456,63 @@ static int nsp32_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1458 | data = (nsp32_hw_data *)host->hostdata; | 1456 | data = (nsp32_hw_data *)host->hostdata; |
1459 | base = host->io_port; | 1457 | base = host->io_port; |
1460 | 1458 | ||
1461 | SPRINTF("NinjaSCSI-32 status\n\n"); | 1459 | seq_printf(m, "NinjaSCSI-32 status\n\n"); |
1462 | SPRINTF("Driver version: %s, $Revision: 1.33 $\n", nsp32_release_version); | 1460 | seq_printf(m, "Driver version: %s, $Revision: 1.33 $\n", nsp32_release_version); |
1463 | SPRINTF("SCSI host No.: %d\n", hostno); | 1461 | seq_printf(m, "SCSI host No.: %d\n", hostno); |
1464 | SPRINTF("IRQ: %d\n", host->irq); | 1462 | seq_printf(m, "IRQ: %d\n", host->irq); |
1465 | SPRINTF("IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); | 1463 | seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); |
1466 | SPRINTF("MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); | 1464 | seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); |
1467 | SPRINTF("sg_tablesize: %d\n", host->sg_tablesize); | 1465 | seq_printf(m, "sg_tablesize: %d\n", host->sg_tablesize); |
1468 | SPRINTF("Chip revision: 0x%x\n", (nsp32_read2(base, INDEX_REG) >> 8) & 0xff); | 1466 | seq_printf(m, "Chip revision: 0x%x\n", (nsp32_read2(base, INDEX_REG) >> 8) & 0xff); |
1469 | 1467 | ||
1470 | mode_reg = nsp32_index_read1(base, CHIP_MODE); | 1468 | mode_reg = nsp32_index_read1(base, CHIP_MODE); |
1471 | model = data->pci_devid->driver_data; | 1469 | model = data->pci_devid->driver_data; |
1472 | 1470 | ||
1473 | #ifdef CONFIG_PM | 1471 | #ifdef CONFIG_PM |
1474 | SPRINTF("Power Management: %s\n", (mode_reg & OPTF) ? "yes" : "no"); | 1472 | seq_printf(m, "Power Management: %s\n", (mode_reg & OPTF) ? "yes" : "no"); |
1475 | #endif | 1473 | #endif |
1476 | SPRINTF("OEM: %ld, %s\n", (mode_reg & (OEM0|OEM1)), nsp32_model[model]); | 1474 | seq_printf(m, "OEM: %ld, %s\n", (mode_reg & (OEM0|OEM1)), nsp32_model[model]); |
1477 | 1475 | ||
1478 | spin_lock_irqsave(&(data->Lock), flags); | 1476 | spin_lock_irqsave(&(data->Lock), flags); |
1479 | SPRINTF("CurrentSC: 0x%p\n\n", data->CurrentSC); | 1477 | seq_printf(m, "CurrentSC: 0x%p\n\n", data->CurrentSC); |
1480 | spin_unlock_irqrestore(&(data->Lock), flags); | 1478 | spin_unlock_irqrestore(&(data->Lock), flags); |
1481 | 1479 | ||
1482 | 1480 | ||
1483 | SPRINTF("SDTR status\n"); | 1481 | seq_printf(m, "SDTR status\n"); |
1484 | for (id = 0; id < ARRAY_SIZE(data->target); id++) { | 1482 | for (id = 0; id < ARRAY_SIZE(data->target); id++) { |
1485 | 1483 | ||
1486 | SPRINTF("id %d: ", id); | 1484 | seq_printf(m, "id %d: ", id); |
1487 | 1485 | ||
1488 | if (id == host->this_id) { | 1486 | if (id == host->this_id) { |
1489 | SPRINTF("----- NinjaSCSI-32 host adapter\n"); | 1487 | seq_printf(m, "----- NinjaSCSI-32 host adapter\n"); |
1490 | continue; | 1488 | continue; |
1491 | } | 1489 | } |
1492 | 1490 | ||
1493 | if (data->target[id].sync_flag == SDTR_DONE) { | 1491 | if (data->target[id].sync_flag == SDTR_DONE) { |
1494 | if (data->target[id].period == 0 && | 1492 | if (data->target[id].period == 0 && |
1495 | data->target[id].offset == ASYNC_OFFSET ) { | 1493 | data->target[id].offset == ASYNC_OFFSET ) { |
1496 | SPRINTF("async"); | 1494 | seq_printf(m, "async"); |
1497 | } else { | 1495 | } else { |
1498 | SPRINTF(" sync"); | 1496 | seq_printf(m, " sync"); |
1499 | } | 1497 | } |
1500 | } else { | 1498 | } else { |
1501 | SPRINTF(" none"); | 1499 | seq_printf(m, " none"); |
1502 | } | 1500 | } |
1503 | 1501 | ||
1504 | if (data->target[id].period != 0) { | 1502 | if (data->target[id].period != 0) { |
1505 | 1503 | ||
1506 | speed = 1000000 / (data->target[id].period * 4); | 1504 | speed = 1000000 / (data->target[id].period * 4); |
1507 | 1505 | ||
1508 | SPRINTF(" transfer %d.%dMB/s, offset %d", | 1506 | seq_printf(m, " transfer %d.%dMB/s, offset %d", |
1509 | speed / 1000, | 1507 | speed / 1000, |
1510 | speed % 1000, | 1508 | speed % 1000, |
1511 | data->target[id].offset | 1509 | data->target[id].offset |
1512 | ); | 1510 | ); |
1513 | } | 1511 | } |
1514 | SPRINTF("\n"); | 1512 | seq_printf(m, "\n"); |
1515 | } | 1513 | } |
1516 | return 0; | 1514 | return 0; |
1517 | } | 1515 | } |
1518 | #undef SPRINTF | ||
1519 | 1516 | ||
1520 | 1517 | ||
1521 | 1518 | ||
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 34aad32829f5..83db942d6913 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1364,9 +1364,6 @@ static const char *nsp_info(struct Scsi_Host *shpnt) | |||
1364 | return data->nspinfo; | 1364 | return data->nspinfo; |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | #undef SPRINTF | ||
1368 | #define SPRINTF(args...) seq_printf(m, ##args) | ||
1369 | |||
1370 | static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host) | 1367 | static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host) |
1371 | { | 1368 | { |
1372 | int id; | 1369 | int id; |
@@ -1378,75 +1375,74 @@ static int nsp_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1378 | hostno = host->host_no; | 1375 | hostno = host->host_no; |
1379 | data = (nsp_hw_data *)host->hostdata; | 1376 | data = (nsp_hw_data *)host->hostdata; |
1380 | 1377 | ||
1381 | SPRINTF("NinjaSCSI status\n\n"); | 1378 | seq_printf(m, "NinjaSCSI status\n\n"); |
1382 | SPRINTF("Driver version: $Revision: 1.23 $\n"); | 1379 | seq_printf(m, "Driver version: $Revision: 1.23 $\n"); |
1383 | SPRINTF("SCSI host No.: %d\n", hostno); | 1380 | seq_printf(m, "SCSI host No.: %d\n", hostno); |
1384 | SPRINTF("IRQ: %d\n", host->irq); | 1381 | seq_printf(m, "IRQ: %d\n", host->irq); |
1385 | SPRINTF("IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); | 1382 | seq_printf(m, "IO: 0x%lx-0x%lx\n", host->io_port, host->io_port + host->n_io_port - 1); |
1386 | SPRINTF("MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); | 1383 | seq_printf(m, "MMIO(virtual address): 0x%lx-0x%lx\n", host->base, host->base + data->MmioLength - 1); |
1387 | SPRINTF("sg_tablesize: %d\n", host->sg_tablesize); | 1384 | seq_printf(m, "sg_tablesize: %d\n", host->sg_tablesize); |
1388 | 1385 | ||
1389 | SPRINTF("burst transfer mode: "); | 1386 | seq_printf(m, "burst transfer mode: "); |
1390 | switch (nsp_burst_mode) { | 1387 | switch (nsp_burst_mode) { |
1391 | case BURST_IO8: | 1388 | case BURST_IO8: |
1392 | SPRINTF("io8"); | 1389 | seq_printf(m, "io8"); |
1393 | break; | 1390 | break; |
1394 | case BURST_IO32: | 1391 | case BURST_IO32: |
1395 | SPRINTF("io32"); | 1392 | seq_printf(m, "io32"); |
1396 | break; | 1393 | break; |
1397 | case BURST_MEM32: | 1394 | case BURST_MEM32: |
1398 | SPRINTF("mem32"); | 1395 | seq_printf(m, "mem32"); |
1399 | break; | 1396 | break; |
1400 | default: | 1397 | default: |
1401 | SPRINTF("???"); | 1398 | seq_printf(m, "???"); |
1402 | break; | 1399 | break; |
1403 | } | 1400 | } |
1404 | SPRINTF("\n"); | 1401 | seq_printf(m, "\n"); |
1405 | 1402 | ||
1406 | 1403 | ||
1407 | spin_lock_irqsave(&(data->Lock), flags); | 1404 | spin_lock_irqsave(&(data->Lock), flags); |
1408 | SPRINTF("CurrentSC: 0x%p\n\n", data->CurrentSC); | 1405 | seq_printf(m, "CurrentSC: 0x%p\n\n", data->CurrentSC); |
1409 | spin_unlock_irqrestore(&(data->Lock), flags); | 1406 | spin_unlock_irqrestore(&(data->Lock), flags); |
1410 | 1407 | ||
1411 | SPRINTF("SDTR status\n"); | 1408 | seq_printf(m, "SDTR status\n"); |
1412 | for(id = 0; id < ARRAY_SIZE(data->Sync); id++) { | 1409 | for(id = 0; id < ARRAY_SIZE(data->Sync); id++) { |
1413 | 1410 | ||
1414 | SPRINTF("id %d: ", id); | 1411 | seq_printf(m, "id %d: ", id); |
1415 | 1412 | ||
1416 | if (id == host->this_id) { | 1413 | if (id == host->this_id) { |
1417 | SPRINTF("----- NinjaSCSI-3 host adapter\n"); | 1414 | seq_printf(m, "----- NinjaSCSI-3 host adapter\n"); |
1418 | continue; | 1415 | continue; |
1419 | } | 1416 | } |
1420 | 1417 | ||
1421 | switch(data->Sync[id].SyncNegotiation) { | 1418 | switch(data->Sync[id].SyncNegotiation) { |
1422 | case SYNC_OK: | 1419 | case SYNC_OK: |
1423 | SPRINTF(" sync"); | 1420 | seq_printf(m, " sync"); |
1424 | break; | 1421 | break; |
1425 | case SYNC_NG: | 1422 | case SYNC_NG: |
1426 | SPRINTF("async"); | 1423 | seq_printf(m, "async"); |
1427 | break; | 1424 | break; |
1428 | case SYNC_NOT_YET: | 1425 | case SYNC_NOT_YET: |
1429 | SPRINTF(" none"); | 1426 | seq_printf(m, " none"); |
1430 | break; | 1427 | break; |
1431 | default: | 1428 | default: |
1432 | SPRINTF("?????"); | 1429 | seq_printf(m, "?????"); |
1433 | break; | 1430 | break; |
1434 | } | 1431 | } |
1435 | 1432 | ||
1436 | if (data->Sync[id].SyncPeriod != 0) { | 1433 | if (data->Sync[id].SyncPeriod != 0) { |
1437 | speed = 1000000 / (data->Sync[id].SyncPeriod * 4); | 1434 | speed = 1000000 / (data->Sync[id].SyncPeriod * 4); |
1438 | 1435 | ||
1439 | SPRINTF(" transfer %d.%dMB/s, offset %d", | 1436 | seq_printf(m, " transfer %d.%dMB/s, offset %d", |
1440 | speed / 1000, | 1437 | speed / 1000, |
1441 | speed % 1000, | 1438 | speed % 1000, |
1442 | data->Sync[id].SyncOffset | 1439 | data->Sync[id].SyncOffset |
1443 | ); | 1440 | ); |
1444 | } | 1441 | } |
1445 | SPRINTF("\n"); | 1442 | seq_printf(m, "\n"); |
1446 | } | 1443 | } |
1447 | return 0; | 1444 | return 0; |
1448 | } | 1445 | } |
1449 | #undef SPRINTF | ||
1450 | 1446 | ||
1451 | /*---------------------------------------------------------------*/ | 1447 | /*---------------------------------------------------------------*/ |
1452 | /* error handler */ | 1448 | /* error handler */ |
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index f94d73611ab4..2d7c62f3a7cc 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
@@ -1295,9 +1295,6 @@ static void wd7000_revision(Adapter * host) | |||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | 1297 | ||
1298 | #undef SPRINTF | ||
1299 | #define SPRINTF(args...) { seq_printf(m, ## args); } | ||
1300 | |||
1301 | static int wd7000_set_info(struct Scsi_Host *host, char *buffer, int length) | 1298 | static int wd7000_set_info(struct Scsi_Host *host, char *buffer, int length) |
1302 | { | 1299 | { |
1303 | dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); | 1300 | dprintk("Buffer = <%.*s>, length = %d\n", length, buffer, length); |
@@ -1320,43 +1317,43 @@ static int wd7000_show_info(struct seq_file *m, struct Scsi_Host *host) | |||
1320 | #endif | 1317 | #endif |
1321 | 1318 | ||
1322 | spin_lock_irqsave(host->host_lock, flags); | 1319 | spin_lock_irqsave(host->host_lock, flags); |
1323 | SPRINTF("Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); | 1320 | seq_printf(m, "Host scsi%d: Western Digital WD-7000 (rev %d.%d)\n", host->host_no, adapter->rev1, adapter->rev2); |
1324 | SPRINTF(" IO base: 0x%x\n", adapter->iobase); | 1321 | seq_printf(m, " IO base: 0x%x\n", adapter->iobase); |
1325 | SPRINTF(" IRQ: %d\n", adapter->irq); | 1322 | seq_printf(m, " IRQ: %d\n", adapter->irq); |
1326 | SPRINTF(" DMA channel: %d\n", adapter->dma); | 1323 | seq_printf(m, " DMA channel: %d\n", adapter->dma); |
1327 | SPRINTF(" Interrupts: %d\n", adapter->int_counter); | 1324 | seq_printf(m, " Interrupts: %d\n", adapter->int_counter); |
1328 | SPRINTF(" BUS_ON time: %d nanoseconds\n", adapter->bus_on * 125); | 1325 | seq_printf(m, " BUS_ON time: %d nanoseconds\n", adapter->bus_on * 125); |
1329 | SPRINTF(" BUS_OFF time: %d nanoseconds\n", adapter->bus_off * 125); | 1326 | seq_printf(m, " BUS_OFF time: %d nanoseconds\n", adapter->bus_off * 125); |
1330 | 1327 | ||
1331 | #ifdef WD7000_DEBUG | 1328 | #ifdef WD7000_DEBUG |
1332 | ogmbs = adapter->mb.ogmb; | 1329 | ogmbs = adapter->mb.ogmb; |
1333 | icmbs = adapter->mb.icmb; | 1330 | icmbs = adapter->mb.icmb; |
1334 | 1331 | ||
1335 | SPRINTF("\nControl port value: 0x%x\n", adapter->control); | 1332 | seq_printf(m, "\nControl port value: 0x%x\n", adapter->control); |
1336 | SPRINTF("Incoming mailbox:\n"); | 1333 | seq_printf(m, "Incoming mailbox:\n"); |
1337 | SPRINTF(" size: %d\n", ICMB_CNT); | 1334 | seq_printf(m, " size: %d\n", ICMB_CNT); |
1338 | SPRINTF(" queued messages: "); | 1335 | seq_printf(m, " queued messages: "); |
1339 | 1336 | ||
1340 | for (i = count = 0; i < ICMB_CNT; i++) | 1337 | for (i = count = 0; i < ICMB_CNT; i++) |
1341 | if (icmbs[i].status) { | 1338 | if (icmbs[i].status) { |
1342 | count++; | 1339 | count++; |
1343 | SPRINTF("0x%x ", i); | 1340 | seq_printf(m, "0x%x ", i); |
1344 | } | 1341 | } |
1345 | 1342 | ||
1346 | SPRINTF(count ? "\n" : "none\n"); | 1343 | seq_printf(m, count ? "\n" : "none\n"); |
1347 | 1344 | ||
1348 | SPRINTF("Outgoing mailbox:\n"); | 1345 | seq_printf(m, "Outgoing mailbox:\n"); |
1349 | SPRINTF(" size: %d\n", OGMB_CNT); | 1346 | seq_printf(m, " size: %d\n", OGMB_CNT); |
1350 | SPRINTF(" next message: 0x%x\n", adapter->next_ogmb); | 1347 | seq_printf(m, " next message: 0x%x\n", adapter->next_ogmb); |
1351 | SPRINTF(" queued messages: "); | 1348 | seq_printf(m, " queued messages: "); |
1352 | 1349 | ||
1353 | for (i = count = 0; i < OGMB_CNT; i++) | 1350 | for (i = count = 0; i < OGMB_CNT; i++) |
1354 | if (ogmbs[i].status) { | 1351 | if (ogmbs[i].status) { |
1355 | count++; | 1352 | count++; |
1356 | SPRINTF("0x%x ", i); | 1353 | seq_printf(m, "0x%x ", i); |
1357 | } | 1354 | } |
1358 | 1355 | ||
1359 | SPRINTF(count ? "\n" : "none\n"); | 1356 | seq_printf(m, count ? "\n" : "none\n"); |
1360 | #endif | 1357 | #endif |
1361 | 1358 | ||
1362 | spin_unlock_irqrestore(host->host_lock, flags); | 1359 | spin_unlock_irqrestore(host->host_lock, flags); |