diff options
| author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2014-12-02 18:10:51 -0500 |
|---|---|---|
| committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 12:57:45 -0500 |
| commit | ee7c7277d9444612c0341588abfb958dffbc5b34 (patch) | |
| tree | 751a0b87f047dbae03d3f4147e6a4f86d4cac73b | |
| parent | 2f979427b2babed959c86d32a506063b9145429e (diff) | |
aha152x: replace seq_printf with seq_puts
Using seq_printf to print a simple string is a lot more expensive than
it needs to be, since seq_puts exists. Replace seq_printf with
seq_puts when possible.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Christoph Hellwig <hch@lst.de>
| -rw-r--r-- | drivers/scsi/aha152x.c | 248 |
1 files changed, 124 insertions, 124 deletions
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index f14ad8a17daa..e31c460a1335 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
| @@ -2505,21 +2505,21 @@ static void get_command(struct seq_file *m, Scsi_Cmnd * ptr) | |||
| 2505 | ptr->SCp.buffers_residual); | 2505 | ptr->SCp.buffers_residual); |
| 2506 | 2506 | ||
| 2507 | if (ptr->SCp.phase & not_issued) | 2507 | if (ptr->SCp.phase & not_issued) |
| 2508 | seq_printf(m, "not issued|"); | 2508 | seq_puts(m, "not issued|"); |
| 2509 | if (ptr->SCp.phase & selecting) | 2509 | if (ptr->SCp.phase & selecting) |
| 2510 | seq_printf(m, "selecting|"); | 2510 | seq_puts(m, "selecting|"); |
| 2511 | if (ptr->SCp.phase & disconnected) | 2511 | if (ptr->SCp.phase & disconnected) |
| 2512 | seq_printf(m, "disconnected|"); | 2512 | seq_puts(m, "disconnected|"); |
| 2513 | if (ptr->SCp.phase & aborted) | 2513 | if (ptr->SCp.phase & aborted) |
| 2514 | seq_printf(m, "aborted|"); | 2514 | seq_puts(m, "aborted|"); |
| 2515 | if (ptr->SCp.phase & identified) | 2515 | if (ptr->SCp.phase & identified) |
| 2516 | seq_printf(m, "identified|"); | 2516 | seq_puts(m, "identified|"); |
| 2517 | if (ptr->SCp.phase & completed) | 2517 | if (ptr->SCp.phase & completed) |
| 2518 | seq_printf(m, "completed|"); | 2518 | seq_puts(m, "completed|"); |
| 2519 | if (ptr->SCp.phase & spiordy) | 2519 | if (ptr->SCp.phase & spiordy) |
| 2520 | seq_printf(m, "spiordy|"); | 2520 | seq_puts(m, "spiordy|"); |
| 2521 | if (ptr->SCp.phase & syncneg) | 2521 | if (ptr->SCp.phase & syncneg) |
| 2522 | seq_printf(m, "syncneg|"); | 2522 | seq_puts(m, "syncneg|"); |
| 2523 | seq_printf(m, "; next=0x%p\n", SCNEXT(ptr)); | 2523 | seq_printf(m, "; next=0x%p\n", SCNEXT(ptr)); |
| 2524 | } | 2524 | } |
| 2525 | 2525 | ||
| @@ -2530,256 +2530,256 @@ static void get_ports(struct seq_file *m, struct Scsi_Host *shpnt) | |||
| 2530 | seq_printf(m, "\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); |
| 2531 | 2531 | ||
| 2532 | s = GETPORT(SCSISEQ); | 2532 | s = GETPORT(SCSISEQ); |
| 2533 | seq_printf(m, "SCSISEQ( "); | 2533 | seq_puts(m, "SCSISEQ( "); |
| 2534 | if (s & TEMODEO) | 2534 | if (s & TEMODEO) |
| 2535 | seq_printf(m, "TARGET MODE "); | 2535 | seq_puts(m, "TARGET MODE "); |
| 2536 | if (s & ENSELO) | 2536 | if (s & ENSELO) |
| 2537 | seq_printf(m, "SELO "); | 2537 | seq_puts(m, "SELO "); |
| 2538 | if (s & ENSELI) | 2538 | if (s & ENSELI) |
| 2539 | seq_printf(m, "SELI "); | 2539 | seq_puts(m, "SELI "); |
| 2540 | if (s & ENRESELI) | 2540 | if (s & ENRESELI) |
| 2541 | seq_printf(m, "RESELI "); | 2541 | seq_puts(m, "RESELI "); |
| 2542 | if (s & ENAUTOATNO) | 2542 | if (s & ENAUTOATNO) |
| 2543 | seq_printf(m, "AUTOATNO "); | 2543 | seq_puts(m, "AUTOATNO "); |
| 2544 | if (s & ENAUTOATNI) | 2544 | if (s & ENAUTOATNI) |
| 2545 | seq_printf(m, "AUTOATNI "); | 2545 | seq_puts(m, "AUTOATNI "); |
| 2546 | if (s & ENAUTOATNP) | 2546 | if (s & ENAUTOATNP) |
| 2547 | seq_printf(m, "AUTOATNP "); | 2547 | seq_puts(m, "AUTOATNP "); |
| 2548 | if (s & SCSIRSTO) | 2548 | if (s & SCSIRSTO) |
| 2549 | seq_printf(m, "SCSIRSTO "); | 2549 | seq_puts(m, "SCSIRSTO "); |
| 2550 | seq_printf(m, ");"); | 2550 | seq_puts(m, ");"); |
| 2551 | 2551 | ||
| 2552 | seq_printf(m, " SCSISIG("); | 2552 | seq_puts(m, " SCSISIG("); |
| 2553 | s = GETPORT(SCSISIG); | 2553 | s = GETPORT(SCSISIG); |
| 2554 | switch (s & P_MASK) { | 2554 | switch (s & P_MASK) { |
| 2555 | case P_DATAO: | 2555 | case P_DATAO: |
| 2556 | seq_printf(m, "DATA OUT"); | 2556 | seq_puts(m, "DATA OUT"); |
| 2557 | break; | 2557 | break; |
| 2558 | case P_DATAI: | 2558 | case P_DATAI: |
| 2559 | seq_printf(m, "DATA IN"); | 2559 | seq_puts(m, "DATA IN"); |
| 2560 | break; | 2560 | break; |
| 2561 | case P_CMD: | 2561 | case P_CMD: |
| 2562 | seq_printf(m, "COMMAND"); | 2562 | seq_puts(m, "COMMAND"); |
| 2563 | break; | 2563 | break; |
| 2564 | case P_STATUS: | 2564 | case P_STATUS: |
| 2565 | seq_printf(m, "STATUS"); | 2565 | seq_puts(m, "STATUS"); |
| 2566 | break; | 2566 | break; |
| 2567 | case P_MSGO: | 2567 | case P_MSGO: |
| 2568 | seq_printf(m, "MESSAGE OUT"); | 2568 | seq_puts(m, "MESSAGE OUT"); |
| 2569 | break; | 2569 | break; |
| 2570 | case P_MSGI: | 2570 | case P_MSGI: |
| 2571 | seq_printf(m, "MESSAGE IN"); | 2571 | seq_puts(m, "MESSAGE IN"); |
| 2572 | break; | 2572 | break; |
| 2573 | default: | 2573 | default: |
| 2574 | seq_printf(m, "*invalid*"); | 2574 | seq_puts(m, "*invalid*"); |
| 2575 | break; | 2575 | break; |
| 2576 | } | 2576 | } |
| 2577 | 2577 | ||
| 2578 | seq_printf(m, "); "); | 2578 | seq_puts(m, "); "); |
| 2579 | 2579 | ||
| 2580 | seq_printf(m, "INTSTAT (%s); ", TESTHI(DMASTAT, INTSTAT) ? "hi" : "lo"); | 2580 | seq_printf(m, "INTSTAT (%s); ", TESTHI(DMASTAT, INTSTAT) ? "hi" : "lo"); |
| 2581 | 2581 | ||
| 2582 | seq_printf(m, "SSTAT( "); | 2582 | seq_puts(m, "SSTAT( "); |
| 2583 | s = GETPORT(SSTAT0); | 2583 | s = GETPORT(SSTAT0); |
| 2584 | if (s & TARGET) | 2584 | if (s & TARGET) |
| 2585 | seq_printf(m, "TARGET "); | 2585 | seq_puts(m, "TARGET "); |
| 2586 | if (s & SELDO) | 2586 | if (s & SELDO) |
| 2587 | seq_printf(m, "SELDO "); | 2587 | seq_puts(m, "SELDO "); |
| 2588 | if (s & SELDI) | 2588 | if (s & SELDI) |
| 2589 | seq_printf(m, "SELDI "); | 2589 | seq_puts(m, "SELDI "); |
| 2590 | if (s & SELINGO) | 2590 | if (s & SELINGO) |
| 2591 | seq_printf(m, "SELINGO "); | 2591 | seq_puts(m, "SELINGO "); |
| 2592 | if (s & SWRAP) | 2592 | if (s & SWRAP) |
| 2593 | seq_printf(m, "SWRAP "); | 2593 | seq_puts(m, "SWRAP "); |
| 2594 | if (s & SDONE) | 2594 | if (s & SDONE) |
| 2595 | seq_printf(m, "SDONE "); | 2595 | seq_puts(m, "SDONE "); |
| 2596 | if (s & SPIORDY) | 2596 | if (s & SPIORDY) |
| 2597 | seq_printf(m, "SPIORDY "); | 2597 | seq_puts(m, "SPIORDY "); |
| 2598 | if (s & DMADONE) | 2598 | if (s & DMADONE) |
| 2599 | seq_printf(m, "DMADONE "); | 2599 | seq_puts(m, "DMADONE "); |
| 2600 | 2600 | ||
| 2601 | s = GETPORT(SSTAT1); | 2601 | s = GETPORT(SSTAT1); |
| 2602 | if (s & SELTO) | 2602 | if (s & SELTO) |
| 2603 | seq_printf(m, "SELTO "); | 2603 | seq_puts(m, "SELTO "); |
| 2604 | if (s & ATNTARG) | 2604 | if (s & ATNTARG) |
| 2605 | seq_printf(m, "ATNTARG "); | 2605 | seq_puts(m, "ATNTARG "); |
| 2606 | if (s & SCSIRSTI) | 2606 | if (s & SCSIRSTI) |
| 2607 | seq_printf(m, "SCSIRSTI "); | 2607 | seq_puts(m, "SCSIRSTI "); |
| 2608 | if (s & PHASEMIS) | 2608 | if (s & PHASEMIS) |
| 2609 | seq_printf(m, "PHASEMIS "); | 2609 | seq_puts(m, "PHASEMIS "); |
| 2610 | if (s & BUSFREE) | 2610 | if (s & BUSFREE) |
| 2611 | seq_printf(m, "BUSFREE "); | 2611 | seq_puts(m, "BUSFREE "); |
| 2612 | if (s & SCSIPERR) | 2612 | if (s & SCSIPERR) |
| 2613 | seq_printf(m, "SCSIPERR "); | 2613 | seq_puts(m, "SCSIPERR "); |
| 2614 | if (s & PHASECHG) | 2614 | if (s & PHASECHG) |
| 2615 | seq_printf(m, "PHASECHG "); | 2615 | seq_puts(m, "PHASECHG "); |
| 2616 | if (s & REQINIT) | 2616 | if (s & REQINIT) |
| 2617 | seq_printf(m, "REQINIT "); | 2617 | seq_puts(m, "REQINIT "); |
| 2618 | seq_printf(m, "); "); | 2618 | seq_puts(m, "); "); |
| 2619 | 2619 | ||
| 2620 | 2620 | ||
| 2621 | seq_printf(m, "SSTAT( "); | 2621 | seq_puts(m, "SSTAT( "); |
| 2622 | 2622 | ||
| 2623 | s = GETPORT(SSTAT0) & GETPORT(SIMODE0); | 2623 | s = GETPORT(SSTAT0) & GETPORT(SIMODE0); |
| 2624 | 2624 | ||
| 2625 | if (s & TARGET) | 2625 | if (s & TARGET) |
| 2626 | seq_printf(m, "TARGET "); | 2626 | seq_puts(m, "TARGET "); |
| 2627 | if (s & SELDO) | 2627 | if (s & SELDO) |
| 2628 | seq_printf(m, "SELDO "); | 2628 | seq_puts(m, "SELDO "); |
| 2629 | if (s & SELDI) | 2629 | if (s & SELDI) |
| 2630 | seq_printf(m, "SELDI "); | 2630 | seq_puts(m, "SELDI "); |
| 2631 | if (s & SELINGO) | 2631 | if (s & SELINGO) |
| 2632 | seq_printf(m, "SELINGO "); | 2632 | seq_puts(m, "SELINGO "); |
| 2633 | if (s & SWRAP) | 2633 | if (s & SWRAP) |
| 2634 | seq_printf(m, "SWRAP "); | 2634 | seq_puts(m, "SWRAP "); |
| 2635 | if (s & SDONE) | 2635 | if (s & SDONE) |
| 2636 | seq_printf(m, "SDONE "); | 2636 | seq_puts(m, "SDONE "); |
| 2637 | if (s & SPIORDY) | 2637 | if (s & SPIORDY) |
| 2638 | seq_printf(m, "SPIORDY "); | 2638 | seq_puts(m, "SPIORDY "); |
| 2639 | if (s & DMADONE) | 2639 | if (s & DMADONE) |
| 2640 | seq_printf(m, "DMADONE "); | 2640 | seq_puts(m, "DMADONE "); |
| 2641 | 2641 | ||
| 2642 | s = GETPORT(SSTAT1) & GETPORT(SIMODE1); | 2642 | s = GETPORT(SSTAT1) & GETPORT(SIMODE1); |
| 2643 | 2643 | ||
| 2644 | if (s & SELTO) | 2644 | if (s & SELTO) |
| 2645 | seq_printf(m, "SELTO "); | 2645 | seq_puts(m, "SELTO "); |
| 2646 | if (s & ATNTARG) | 2646 | if (s & ATNTARG) |
| 2647 | seq_printf(m, "ATNTARG "); | 2647 | seq_puts(m, "ATNTARG "); |
| 2648 | if (s & SCSIRSTI) | 2648 | if (s & SCSIRSTI) |
| 2649 | seq_printf(m, "SCSIRSTI "); | 2649 | seq_puts(m, "SCSIRSTI "); |
| 2650 | if (s & PHASEMIS) | 2650 | if (s & PHASEMIS) |
| 2651 | seq_printf(m, "PHASEMIS "); | 2651 | seq_puts(m, "PHASEMIS "); |
| 2652 | if (s & BUSFREE) | 2652 | if (s & BUSFREE) |
| 2653 | seq_printf(m, "BUSFREE "); | 2653 | seq_puts(m, "BUSFREE "); |
| 2654 | if (s & SCSIPERR) | 2654 | if (s & SCSIPERR) |
| 2655 | seq_printf(m, "SCSIPERR "); | 2655 | seq_puts(m, "SCSIPERR "); |
| 2656 | if (s & PHASECHG) | 2656 | if (s & PHASECHG) |
| 2657 | seq_printf(m, "PHASECHG "); | 2657 | seq_puts(m, "PHASECHG "); |
| 2658 | if (s & REQINIT) | 2658 | if (s & REQINIT) |
| 2659 | seq_printf(m, "REQINIT "); | 2659 | seq_puts(m, "REQINIT "); |
| 2660 | seq_printf(m, "); "); | 2660 | seq_puts(m, "); "); |
| 2661 | 2661 | ||
| 2662 | seq_printf(m, "SXFRCTL0( "); | 2662 | seq_puts(m, "SXFRCTL0( "); |
| 2663 | 2663 | ||
| 2664 | s = GETPORT(SXFRCTL0); | 2664 | s = GETPORT(SXFRCTL0); |
| 2665 | if (s & SCSIEN) | 2665 | if (s & SCSIEN) |
| 2666 | seq_printf(m, "SCSIEN "); | 2666 | seq_puts(m, "SCSIEN "); |
| 2667 | if (s & DMAEN) | 2667 | if (s & DMAEN) |
| 2668 | seq_printf(m, "DMAEN "); | 2668 | seq_puts(m, "DMAEN "); |
| 2669 | if (s & CH1) | 2669 | if (s & CH1) |
| 2670 | seq_printf(m, "CH1 "); | 2670 | seq_puts(m, "CH1 "); |
| 2671 | if (s & CLRSTCNT) | 2671 | if (s & CLRSTCNT) |
| 2672 | seq_printf(m, "CLRSTCNT "); | 2672 | seq_puts(m, "CLRSTCNT "); |
| 2673 | if (s & SPIOEN) | 2673 | if (s & SPIOEN) |
| 2674 | seq_printf(m, "SPIOEN "); | 2674 | seq_puts(m, "SPIOEN "); |
| 2675 | if (s & CLRCH1) | 2675 | if (s & CLRCH1) |
| 2676 | seq_printf(m, "CLRCH1 "); | 2676 | seq_puts(m, "CLRCH1 "); |
| 2677 | seq_printf(m, "); "); | 2677 | seq_puts(m, "); "); |
| 2678 | 2678 | ||
| 2679 | seq_printf(m, "SIGNAL( "); | 2679 | seq_puts(m, "SIGNAL( "); |
| 2680 | 2680 | ||
| 2681 | s = GETPORT(SCSISIG); | 2681 | s = GETPORT(SCSISIG); |
| 2682 | if (s & SIG_ATNI) | 2682 | if (s & SIG_ATNI) |
| 2683 | seq_printf(m, "ATNI "); | 2683 | seq_puts(m, "ATNI "); |
| 2684 | if (s & SIG_SELI) | 2684 | if (s & SIG_SELI) |
| 2685 | seq_printf(m, "SELI "); | 2685 | seq_puts(m, "SELI "); |
| 2686 | if (s & SIG_BSYI) | 2686 | if (s & SIG_BSYI) |
| 2687 | seq_printf(m, "BSYI "); | 2687 | seq_puts(m, "BSYI "); |
| 2688 | if (s & SIG_REQI) | 2688 | if (s & SIG_REQI) |
| 2689 | seq_printf(m, "REQI "); | 2689 | seq_puts(m, "REQI "); |
| 2690 | if (s & SIG_ACKI) | 2690 | if (s & SIG_ACKI) |
| 2691 | seq_printf(m, "ACKI "); | 2691 | seq_puts(m, "ACKI "); |
| 2692 | seq_printf(m, "); "); | 2692 | seq_puts(m, "); "); |
| 2693 | 2693 | ||
| 2694 | seq_printf(m, "SELID(%02x), ", GETPORT(SELID)); | 2694 | seq_printf(m, "SELID(%02x), ", GETPORT(SELID)); |
| 2695 | 2695 | ||
| 2696 | seq_printf(m, "STCNT(%d), ", GETSTCNT()); | 2696 | seq_printf(m, "STCNT(%d), ", GETSTCNT()); |
| 2697 | 2697 | ||
| 2698 | seq_printf(m, "SSTAT2( "); | 2698 | seq_puts(m, "SSTAT2( "); |
| 2699 | 2699 | ||
| 2700 | s = GETPORT(SSTAT2); | 2700 | s = GETPORT(SSTAT2); |
| 2701 | if (s & SOFFSET) | 2701 | if (s & SOFFSET) |
| 2702 | seq_printf(m, "SOFFSET "); | 2702 | seq_puts(m, "SOFFSET "); |
| 2703 | if (s & SEMPTY) | 2703 | if (s & SEMPTY) |
| 2704 | seq_printf(m, "SEMPTY "); | 2704 | seq_puts(m, "SEMPTY "); |
| 2705 | if (s & SFULL) | 2705 | if (s & SFULL) |
| 2706 | seq_printf(m, "SFULL "); | 2706 | seq_puts(m, "SFULL "); |
| 2707 | seq_printf(m, "); SFCNT (%d); ", s & (SFULL | SFCNT)); | 2707 | seq_printf(m, "); SFCNT (%d); ", s & (SFULL | SFCNT)); |
| 2708 | 2708 | ||
| 2709 | s = GETPORT(SSTAT3); | 2709 | s = GETPORT(SSTAT3); |
| 2710 | seq_printf(m, "SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); | 2710 | seq_printf(m, "SCSICNT (%d), OFFCNT(%d), ", (s & 0xf0) >> 4, s & 0x0f); |
| 2711 | 2711 | ||
| 2712 | seq_printf(m, "SSTAT4( "); | 2712 | seq_puts(m, "SSTAT4( "); |
| 2713 | s = GETPORT(SSTAT4); | 2713 | s = GETPORT(SSTAT4); |
| 2714 | if (s & SYNCERR) | 2714 | if (s & SYNCERR) |
| 2715 | seq_printf(m, "SYNCERR "); | 2715 | seq_puts(m, "SYNCERR "); |
| 2716 | if (s & FWERR) | 2716 | if (s & FWERR) |
| 2717 | seq_printf(m, "FWERR "); | 2717 | seq_puts(m, "FWERR "); |
| 2718 | if (s & FRERR) | 2718 | if (s & FRERR) |
| 2719 | seq_printf(m, "FRERR "); | 2719 | seq_puts(m, "FRERR "); |
| 2720 | seq_printf(m, "); "); | 2720 | seq_puts(m, "); "); |
| 2721 | 2721 | ||
| 2722 | seq_printf(m, "DMACNTRL0( "); | 2722 | seq_puts(m, "DMACNTRL0( "); |
| 2723 | s = GETPORT(DMACNTRL0); | 2723 | s = GETPORT(DMACNTRL0); |
| 2724 | seq_printf(m, "%s ", s & _8BIT ? "8BIT" : "16BIT"); | 2724 | seq_printf(m, "%s ", s & _8BIT ? "8BIT" : "16BIT"); |
| 2725 | seq_printf(m, "%s ", s & DMA ? "DMA" : "PIO"); | 2725 | seq_printf(m, "%s ", s & DMA ? "DMA" : "PIO"); |
| 2726 | seq_printf(m, "%s ", s & WRITE_READ ? "WRITE" : "READ"); | 2726 | seq_printf(m, "%s ", s & WRITE_READ ? "WRITE" : "READ"); |
| 2727 | if (s & ENDMA) | 2727 | if (s & ENDMA) |
| 2728 | seq_printf(m, "ENDMA "); | 2728 | seq_puts(m, "ENDMA "); |
| 2729 | if (s & INTEN) | 2729 | if (s & INTEN) |
| 2730 | seq_printf(m, "INTEN "); | 2730 | seq_puts(m, "INTEN "); |
| 2731 | if (s & RSTFIFO) | 2731 | if (s & RSTFIFO) |
| 2732 | seq_printf(m, "RSTFIFO "); | 2732 | seq_puts(m, "RSTFIFO "); |
| 2733 | if (s & SWINT) | 2733 | if (s & SWINT) |
| 2734 | seq_printf(m, "SWINT "); | 2734 | seq_puts(m, "SWINT "); |
| 2735 | seq_printf(m, "); "); | 2735 | seq_puts(m, "); "); |
| 2736 | 2736 | ||
| 2737 | seq_printf(m, "DMASTAT( "); | 2737 | seq_puts(m, "DMASTAT( "); |
| 2738 | s = GETPORT(DMASTAT); | 2738 | s = GETPORT(DMASTAT); |
| 2739 | if (s & ATDONE) | 2739 | if (s & ATDONE) |
| 2740 | seq_printf(m, "ATDONE "); | 2740 | seq_puts(m, "ATDONE "); |
| 2741 | if (s & WORDRDY) | 2741 | if (s & WORDRDY) |
| 2742 | seq_printf(m, "WORDRDY "); | 2742 | seq_puts(m, "WORDRDY "); |
| 2743 | if (s & DFIFOFULL) | 2743 | if (s & DFIFOFULL) |
| 2744 | seq_printf(m, "DFIFOFULL "); | 2744 | seq_puts(m, "DFIFOFULL "); |
| 2745 | if (s & DFIFOEMP) | 2745 | if (s & DFIFOEMP) |
| 2746 | seq_printf(m, "DFIFOEMP "); | 2746 | seq_puts(m, "DFIFOEMP "); |
| 2747 | seq_printf(m, ")\n"); | 2747 | seq_puts(m, ")\n"); |
| 2748 | 2748 | ||
| 2749 | seq_printf(m, "enabled interrupts( "); | 2749 | seq_puts(m, "enabled interrupts( "); |
| 2750 | 2750 | ||
| 2751 | s = GETPORT(SIMODE0); | 2751 | s = GETPORT(SIMODE0); |
| 2752 | if (s & ENSELDO) | 2752 | if (s & ENSELDO) |
| 2753 | seq_printf(m, "ENSELDO "); | 2753 | seq_puts(m, "ENSELDO "); |
| 2754 | if (s & ENSELDI) | 2754 | if (s & ENSELDI) |
| 2755 | seq_printf(m, "ENSELDI "); | 2755 | seq_puts(m, "ENSELDI "); |
| 2756 | if (s & ENSELINGO) | 2756 | if (s & ENSELINGO) |
| 2757 | seq_printf(m, "ENSELINGO "); | 2757 | seq_puts(m, "ENSELINGO "); |
| 2758 | if (s & ENSWRAP) | 2758 | if (s & ENSWRAP) |
| 2759 | seq_printf(m, "ENSWRAP "); | 2759 | seq_puts(m, "ENSWRAP "); |
| 2760 | if (s & ENSDONE) | 2760 | if (s & ENSDONE) |
| 2761 | seq_printf(m, "ENSDONE "); | 2761 | seq_puts(m, "ENSDONE "); |
| 2762 | if (s & ENSPIORDY) | 2762 | if (s & ENSPIORDY) |
| 2763 | seq_printf(m, "ENSPIORDY "); | 2763 | seq_puts(m, "ENSPIORDY "); |
| 2764 | if (s & ENDMADONE) | 2764 | if (s & ENDMADONE) |
| 2765 | seq_printf(m, "ENDMADONE "); | 2765 | seq_puts(m, "ENDMADONE "); |
| 2766 | 2766 | ||
| 2767 | s = GETPORT(SIMODE1); | 2767 | s = GETPORT(SIMODE1); |
| 2768 | if (s & ENSELTIMO) | 2768 | if (s & ENSELTIMO) |
| 2769 | seq_printf(m, "ENSELTIMO "); | 2769 | seq_puts(m, "ENSELTIMO "); |
| 2770 | if (s & ENATNTARG) | 2770 | if (s & ENATNTARG) |
| 2771 | seq_printf(m, "ENATNTARG "); | 2771 | seq_puts(m, "ENATNTARG "); |
| 2772 | if (s & ENPHASEMIS) | 2772 | if (s & ENPHASEMIS) |
| 2773 | seq_printf(m, "ENPHASEMIS "); | 2773 | seq_puts(m, "ENPHASEMIS "); |
| 2774 | if (s & ENBUSFREE) | 2774 | if (s & ENBUSFREE) |
| 2775 | seq_printf(m, "ENBUSFREE "); | 2775 | seq_puts(m, "ENBUSFREE "); |
| 2776 | if (s & ENSCSIPERR) | 2776 | if (s & ENSCSIPERR) |
| 2777 | seq_printf(m, "ENSCSIPERR "); | 2777 | seq_puts(m, "ENSCSIPERR "); |
| 2778 | if (s & ENPHASECHG) | 2778 | if (s & ENPHASECHG) |
| 2779 | seq_printf(m, "ENPHASECHG "); | 2779 | seq_puts(m, "ENPHASECHG "); |
| 2780 | if (s & ENREQINIT) | 2780 | if (s & ENREQINIT) |
| 2781 | seq_printf(m, "ENREQINIT "); | 2781 | seq_puts(m, "ENREQINIT "); |
| 2782 | seq_printf(m, ")\n"); | 2782 | seq_puts(m, ")\n"); |
| 2783 | } | 2783 | } |
| 2784 | 2784 | ||
| 2785 | 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) |
| @@ -2822,7 +2822,7 @@ static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) | |||
| 2822 | Scsi_Cmnd *ptr; | 2822 | Scsi_Cmnd *ptr; |
| 2823 | unsigned long flags; | 2823 | unsigned long flags; |
| 2824 | 2824 | ||
| 2825 | seq_printf(m, AHA152X_REVID "\n"); | 2825 | seq_puts(m, AHA152X_REVID "\n"); |
| 2826 | 2826 | ||
| 2827 | seq_printf(m, "ioports 0x%04lx to 0x%04lx\n", | 2827 | seq_printf(m, "ioports 0x%04lx to 0x%04lx\n", |
| 2828 | shpnt->io_port, shpnt->io_port + shpnt->n_io_port - 1); | 2828 | shpnt->io_port, shpnt->io_port + shpnt->n_io_port - 1); |
| @@ -2836,7 +2836,7 @@ static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) | |||
| 2836 | seq_printf(m, "%d commands currently queued\n", HOSTDATA(shpnt)->commands); | 2836 | seq_printf(m, "%d commands currently queued\n", HOSTDATA(shpnt)->commands); |
| 2837 | 2837 | ||
| 2838 | if(SYNCHRONOUS) { | 2838 | if(SYNCHRONOUS) { |
| 2839 | seq_printf(m, "synchronously operating targets (tick=50 ns):\n"); | 2839 | seq_puts(m, "synchronously operating targets (tick=50 ns):\n"); |
| 2840 | for (i = 0; i < 8; i++) | 2840 | for (i = 0; i < 8; i++) |
| 2841 | if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) | 2841 | if (HOSTDATA(shpnt)->syncrate[i] & 0x7f) |
| 2842 | seq_printf(m, "target %d: period %dT/%dns; req/ack offset %d\n", | 2842 | seq_printf(m, "target %d: period %dT/%dns; req/ack offset %d\n", |
| @@ -2845,28 +2845,28 @@ static int aha152x_show_info(struct seq_file *m, struct Scsi_Host *shpnt) | |||
| 2845 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, | 2845 | (((HOSTDATA(shpnt)->syncrate[i] & 0x70) >> 4) + 2) * 50, |
| 2846 | HOSTDATA(shpnt)->syncrate[i] & 0x0f); | 2846 | HOSTDATA(shpnt)->syncrate[i] & 0x0f); |
| 2847 | } | 2847 | } |
| 2848 | seq_printf(m, "\nqueue status:\n"); | 2848 | seq_puts(m, "\nqueue status:\n"); |
| 2849 | DO_LOCK(flags); | 2849 | DO_LOCK(flags); |
| 2850 | if (ISSUE_SC) { | 2850 | if (ISSUE_SC) { |
| 2851 | seq_printf(m, "not yet issued commands:\n"); | 2851 | seq_puts(m, "not yet issued commands:\n"); |
| 2852 | for (ptr = ISSUE_SC; ptr; ptr = SCNEXT(ptr)) | 2852 | for (ptr = ISSUE_SC; ptr; ptr = SCNEXT(ptr)) |
| 2853 | get_command(m, ptr); | 2853 | get_command(m, ptr); |
| 2854 | } else | 2854 | } else |
| 2855 | seq_printf(m, "no not yet issued commands\n"); | 2855 | seq_puts(m, "no not yet issued commands\n"); |
| 2856 | DO_UNLOCK(flags); | 2856 | DO_UNLOCK(flags); |
| 2857 | 2857 | ||
| 2858 | if (CURRENT_SC) { | 2858 | if (CURRENT_SC) { |
| 2859 | seq_printf(m, "current command:\n"); | 2859 | seq_puts(m, "current command:\n"); |
| 2860 | get_command(m, CURRENT_SC); | 2860 | get_command(m, CURRENT_SC); |
| 2861 | } else | 2861 | } else |
| 2862 | seq_printf(m, "no current command\n"); | 2862 | seq_puts(m, "no current command\n"); |
| 2863 | 2863 | ||
| 2864 | if (DISCONNECTED_SC) { | 2864 | if (DISCONNECTED_SC) { |
| 2865 | seq_printf(m, "disconnected commands:\n"); | 2865 | seq_puts(m, "disconnected commands:\n"); |
| 2866 | for (ptr = DISCONNECTED_SC; ptr; ptr = SCNEXT(ptr)) | 2866 | for (ptr = DISCONNECTED_SC; ptr; ptr = SCNEXT(ptr)) |
| 2867 | get_command(m, ptr); | 2867 | get_command(m, ptr); |
| 2868 | } else | 2868 | } else |
| 2869 | seq_printf(m, "no disconnected commands\n"); | 2869 | seq_puts(m, "no disconnected commands\n"); |
| 2870 | 2870 | ||
| 2871 | get_ports(m, shpnt); | 2871 | get_ports(m, shpnt); |
| 2872 | 2872 | ||
