aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aha152x.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-12-02 18:10:49 -0500
committerJames Bottomley <JBottomley@Parallels.com>2015-02-02 12:57:45 -0500
commit0c3de38ff3eec506ef08ede32110d1f266366ccd (patch)
treecd94d017cf33979ccabc0cec01542fe4be50a38a /drivers/scsi/aha152x.c
parent5af2e38242f87231244393e69beca7284e70056f (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/aha152x.c')
-rw-r--r--drivers/scsi/aha152x.c295
1 files changed, 146 insertions, 149 deletions
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
2496static void get_command(struct seq_file *m, Scsi_Cmnd * ptr) 2493static 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
2529static void get_ports(struct seq_file *m, struct Scsi_Host *shpnt) 2526static 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
2788static int aha152x_set_info(struct Scsi_Host *shpnt, char *buffer, int length) 2785static 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],