diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2011-07-14 15:00:14 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-27 06:16:34 -0400 |
commit | 92fd65c095f0dedd3c874904fb63ddc8fb7836fd (patch) | |
tree | 427c41a1846a869c1d5872e1a6fff00fa5aaa4c0 /drivers/scsi/qla2xxx | |
parent | 7c3df1320e5e875478775e78d01a09aee96b8abe (diff) |
[SCSI] qla2xxx: Cleanup of previous infrastructure.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 103 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.h | 140 |
2 files changed, 0 insertions, 243 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 5c1e69f091e5..2155071f3100 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -1650,109 +1650,6 @@ qla81xx_fw_dump_failed: | |||
1650 | /****************************************************************************/ | 1650 | /****************************************************************************/ |
1651 | /* Driver Debug Functions. */ | 1651 | /* Driver Debug Functions. */ |
1652 | /****************************************************************************/ | 1652 | /****************************************************************************/ |
1653 | |||
1654 | void | ||
1655 | qla2x00_dump_regs(scsi_qla_host_t *vha) | ||
1656 | { | ||
1657 | int i; | ||
1658 | struct qla_hw_data *ha = vha->hw; | ||
1659 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | ||
1660 | struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; | ||
1661 | uint16_t __iomem *mbx_reg; | ||
1662 | |||
1663 | mbx_reg = IS_FWI2_CAPABLE(ha) ? ®24->mailbox0: | ||
1664 | MAILBOX_REG(ha, reg, 0); | ||
1665 | |||
1666 | printk("Mailbox registers:\n"); | ||
1667 | for (i = 0; i < 6; i++) | ||
1668 | printk("scsi(%ld): mbox %d 0x%04x \n", vha->host_no, i, | ||
1669 | RD_REG_WORD(mbx_reg++)); | ||
1670 | } | ||
1671 | |||
1672 | |||
1673 | void | ||
1674 | qla2x00_dump_buffer(uint8_t * b, uint32_t size) | ||
1675 | { | ||
1676 | uint32_t cnt; | ||
1677 | uint8_t c; | ||
1678 | |||
1679 | printk(" 0 1 2 3 4 5 6 7 8 9 " | ||
1680 | "Ah Bh Ch Dh Eh Fh\n"); | ||
1681 | printk("----------------------------------------" | ||
1682 | "----------------------\n"); | ||
1683 | |||
1684 | for (cnt = 0; cnt < size;) { | ||
1685 | c = *b++; | ||
1686 | printk("%02x",(uint32_t) c); | ||
1687 | cnt++; | ||
1688 | if (!(cnt % 16)) | ||
1689 | printk("\n"); | ||
1690 | else | ||
1691 | printk(" "); | ||
1692 | } | ||
1693 | if (cnt % 16) | ||
1694 | printk("\n"); | ||
1695 | } | ||
1696 | |||
1697 | void | ||
1698 | qla2x00_dump_buffer_zipped(uint8_t *b, uint32_t size) | ||
1699 | { | ||
1700 | uint32_t cnt; | ||
1701 | uint8_t c; | ||
1702 | uint8_t last16[16], cur16[16]; | ||
1703 | uint32_t lc = 0, num_same16 = 0, j; | ||
1704 | |||
1705 | printk(KERN_DEBUG " 0 1 2 3 4 5 6 7 8 9 " | ||
1706 | "Ah Bh Ch Dh Eh Fh\n"); | ||
1707 | printk(KERN_DEBUG "----------------------------------------" | ||
1708 | "----------------------\n"); | ||
1709 | |||
1710 | for (cnt = 0; cnt < size;) { | ||
1711 | c = *b++; | ||
1712 | |||
1713 | cur16[lc++] = c; | ||
1714 | |||
1715 | cnt++; | ||
1716 | if (cnt % 16) | ||
1717 | continue; | ||
1718 | |||
1719 | /* We have 16 now */ | ||
1720 | lc = 0; | ||
1721 | if (num_same16 == 0) { | ||
1722 | memcpy(last16, cur16, 16); | ||
1723 | num_same16++; | ||
1724 | continue; | ||
1725 | } | ||
1726 | if (memcmp(cur16, last16, 16) == 0) { | ||
1727 | num_same16++; | ||
1728 | continue; | ||
1729 | } | ||
1730 | for (j = 0; j < 16; j++) | ||
1731 | printk(KERN_DEBUG "%02x ", (uint32_t)last16[j]); | ||
1732 | printk(KERN_DEBUG "\n"); | ||
1733 | |||
1734 | if (num_same16 > 1) | ||
1735 | printk(KERN_DEBUG "> prev pattern repeats (%u)" | ||
1736 | "more times\n", num_same16-1); | ||
1737 | memcpy(last16, cur16, 16); | ||
1738 | num_same16 = 1; | ||
1739 | } | ||
1740 | |||
1741 | if (num_same16) { | ||
1742 | for (j = 0; j < 16; j++) | ||
1743 | printk(KERN_DEBUG "%02x ", (uint32_t)last16[j]); | ||
1744 | printk(KERN_DEBUG "\n"); | ||
1745 | |||
1746 | if (num_same16 > 1) | ||
1747 | printk(KERN_DEBUG "> prev pattern repeats (%u)" | ||
1748 | "more times\n", num_same16-1); | ||
1749 | } | ||
1750 | if (lc) { | ||
1751 | for (j = 0; j < lc; j++) | ||
1752 | printk(KERN_DEBUG "%02x ", (uint32_t)cur16[j]); | ||
1753 | printk(KERN_DEBUG "\n"); | ||
1754 | } | ||
1755 | } | ||
1756 | /* | 1653 | /* |
1757 | * This function is for formatting and logging debug information. | 1654 | * This function is for formatting and logging debug information. |
1758 | * It is to be used when vha is available. It formats the message | 1655 | * It is to be used when vha is available. It formats the message |
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index f955094fd5d8..98a377b99017 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h | |||
@@ -8,146 +8,6 @@ | |||
8 | #include "qla_def.h" | 8 | #include "qla_def.h" |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Driver debug definitions. | ||
12 | */ | ||
13 | /* #define QL_DEBUG_LEVEL_1 */ /* Output register accesses to COM1 */ | ||
14 | /* #define QL_DEBUG_LEVEL_2 */ /* Output error msgs to COM1 */ | ||
15 | /* #define QL_DEBUG_LEVEL_3 */ /* Output function trace msgs to COM1 */ | ||
16 | /* #define QL_DEBUG_LEVEL_4 */ /* Output NVRAM trace msgs to COM1 */ | ||
17 | /* #define QL_DEBUG_LEVEL_5 */ /* Output ring trace msgs to COM1 */ | ||
18 | /* #define QL_DEBUG_LEVEL_6 */ /* Output WATCHDOG timer trace to COM1 */ | ||
19 | /* #define QL_DEBUG_LEVEL_7 */ /* Output RISC load trace msgs to COM1 */ | ||
20 | /* #define QL_DEBUG_LEVEL_8 */ /* Output ring saturation msgs to COM1 */ | ||
21 | /* #define QL_DEBUG_LEVEL_9 */ /* Output IOCTL trace msgs */ | ||
22 | /* #define QL_DEBUG_LEVEL_10 */ /* Output IOCTL error msgs */ | ||
23 | /* #define QL_DEBUG_LEVEL_11 */ /* Output Mbx Cmd trace msgs */ | ||
24 | /* #define QL_DEBUG_LEVEL_12 */ /* Output IP trace msgs */ | ||
25 | /* #define QL_DEBUG_LEVEL_13 */ /* Output fdmi function trace msgs */ | ||
26 | /* #define QL_DEBUG_LEVEL_14 */ /* Output RSCN trace msgs */ | ||
27 | /* #define QL_DEBUG_LEVEL_15 */ /* Output NPIV trace msgs */ | ||
28 | /* #define QL_DEBUG_LEVEL_16 */ /* Output ISP84XX trace msgs */ | ||
29 | /* #define QL_DEBUG_LEVEL_17 */ /* Output EEH trace messages */ | ||
30 | /* #define QL_DEBUG_LEVEL_18 */ /* Output T10 CRC trace messages */ | ||
31 | |||
32 | /* | ||
33 | * Macros use for debugging the driver. | ||
34 | */ | ||
35 | |||
36 | #define DEBUG(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
37 | |||
38 | #if defined(QL_DEBUG_LEVEL_1) | ||
39 | #define DEBUG1(x) do {x;} while (0) | ||
40 | #else | ||
41 | #define DEBUG1(x) do {} while (0) | ||
42 | #endif | ||
43 | |||
44 | #define DEBUG2(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
45 | #define DEBUG2_3(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
46 | #define DEBUG2_3_11(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
47 | #define DEBUG2_9_10(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
48 | #define DEBUG2_11(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
49 | #define DEBUG2_13(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
50 | #define DEBUG2_16(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
51 | #define DEBUG2_17(x) do { if (ql2xextended_error_logging) { x; } } while (0) | ||
52 | |||
53 | #if defined(QL_DEBUG_LEVEL_3) | ||
54 | #define DEBUG3(x) do {x;} while (0) | ||
55 | #define DEBUG3_11(x) do {x;} while (0) | ||
56 | #else | ||
57 | #define DEBUG3(x) do {} while (0) | ||
58 | #endif | ||
59 | |||
60 | #if defined(QL_DEBUG_LEVEL_4) | ||
61 | #define DEBUG4(x) do {x;} while (0) | ||
62 | #else | ||
63 | #define DEBUG4(x) do {} while (0) | ||
64 | #endif | ||
65 | |||
66 | #if defined(QL_DEBUG_LEVEL_5) | ||
67 | #define DEBUG5(x) do {x;} while (0) | ||
68 | #else | ||
69 | #define DEBUG5(x) do {} while (0) | ||
70 | #endif | ||
71 | |||
72 | #if defined(QL_DEBUG_LEVEL_7) | ||
73 | #define DEBUG7(x) do {x;} while (0) | ||
74 | #else | ||
75 | #define DEBUG7(x) do {} while (0) | ||
76 | #endif | ||
77 | |||
78 | #if defined(QL_DEBUG_LEVEL_9) | ||
79 | #define DEBUG9(x) do {x;} while (0) | ||
80 | #define DEBUG9_10(x) do {x;} while (0) | ||
81 | #else | ||
82 | #define DEBUG9(x) do {} while (0) | ||
83 | #endif | ||
84 | |||
85 | #if defined(QL_DEBUG_LEVEL_10) | ||
86 | #define DEBUG10(x) do {x;} while (0) | ||
87 | #define DEBUG9_10(x) do {x;} while (0) | ||
88 | #else | ||
89 | #define DEBUG10(x) do {} while (0) | ||
90 | #if !defined(DEBUG9_10) | ||
91 | #define DEBUG9_10(x) do {} while (0) | ||
92 | #endif | ||
93 | #endif | ||
94 | |||
95 | #if defined(QL_DEBUG_LEVEL_11) | ||
96 | #define DEBUG11(x) do{x;} while(0) | ||
97 | #if !defined(DEBUG3_11) | ||
98 | #define DEBUG3_11(x) do{x;} while(0) | ||
99 | #endif | ||
100 | #else | ||
101 | #define DEBUG11(x) do{} while(0) | ||
102 | #if !defined(QL_DEBUG_LEVEL_3) | ||
103 | #define DEBUG3_11(x) do{} while(0) | ||
104 | #endif | ||
105 | #endif | ||
106 | |||
107 | #if defined(QL_DEBUG_LEVEL_12) | ||
108 | #define DEBUG12(x) do {x;} while (0) | ||
109 | #else | ||
110 | #define DEBUG12(x) do {} while (0) | ||
111 | #endif | ||
112 | |||
113 | #if defined(QL_DEBUG_LEVEL_13) | ||
114 | #define DEBUG13(x) do {x;} while (0) | ||
115 | #else | ||
116 | #define DEBUG13(x) do {} while (0) | ||
117 | #endif | ||
118 | |||
119 | #if defined(QL_DEBUG_LEVEL_14) | ||
120 | #define DEBUG14(x) do {x;} while (0) | ||
121 | #else | ||
122 | #define DEBUG14(x) do {} while (0) | ||
123 | #endif | ||
124 | |||
125 | #if defined(QL_DEBUG_LEVEL_15) | ||
126 | #define DEBUG15(x) do {x;} while (0) | ||
127 | #else | ||
128 | #define DEBUG15(x) do {} while (0) | ||
129 | #endif | ||
130 | |||
131 | #if defined(QL_DEBUG_LEVEL_16) | ||
132 | #define DEBUG16(x) do {x;} while (0) | ||
133 | #else | ||
134 | #define DEBUG16(x) do {} while (0) | ||
135 | #endif | ||
136 | |||
137 | #if defined(QL_DEBUG_LEVEL_17) | ||
138 | #define DEBUG17(x) do {x;} while (0) | ||
139 | #else | ||
140 | #define DEBUG17(x) do {} while (0) | ||
141 | #endif | ||
142 | |||
143 | #if defined(QL_DEBUG_LEVEL_18) | ||
144 | #define DEBUG18(x) do {if (ql2xextended_error_logging) x; } while (0) | ||
145 | #else | ||
146 | #define DEBUG18(x) do {} while (0) | ||
147 | #endif | ||
148 | |||
149 | |||
150 | /* | ||
151 | * Firmware Dump structure definition | 11 | * Firmware Dump structure definition |
152 | */ | 12 | */ |
153 | 13 | ||