diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2005-07-06 13:32:07 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-14 11:03:15 -0400 |
commit | fa2a1ce53d4b869b74da9a770770c79f9af64914 (patch) | |
tree | da350e79117d3177f51c2788c51aeba425afd4ca /drivers/scsi/qla2xxx | |
parent | ba5140b48e35aa4e4b57eb6db5cface63d7bd712 (diff) |
[SCSI] qla2xxx: Code scrubbing.
Code scrubbing.
- Remove trailing whitespace from driver files.
- Remove unused #defines and inlines.
- Standardize on C comments (// -> /* */)
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 130 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 42 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_fw.h | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gs.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 56 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 86 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 21 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 78 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_rscn.c | 30 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_settings.h | 25 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 10 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 |
14 files changed, 199 insertions, 306 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 80dcc2bac6d6..d5107aa15c1e 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -74,7 +74,7 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
74 | fw->hccr = RD_REG_WORD(®->hccr); | 74 | fw->hccr = RD_REG_WORD(®->hccr); |
75 | 75 | ||
76 | /* Pause RISC. */ | 76 | /* Pause RISC. */ |
77 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); | 77 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); |
78 | if (IS_QLA2300(ha)) { | 78 | if (IS_QLA2300(ha)) { |
79 | for (cnt = 30000; | 79 | for (cnt = 30000; |
80 | (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && | 80 | (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && |
@@ -91,85 +91,85 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
91 | 91 | ||
92 | if (rval == QLA_SUCCESS) { | 92 | if (rval == QLA_SUCCESS) { |
93 | dmp_reg = (uint16_t __iomem *)(reg + 0); | 93 | dmp_reg = (uint16_t __iomem *)(reg + 0); |
94 | for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) | 94 | for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) |
95 | fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); | 95 | fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); |
96 | 96 | ||
97 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); | 97 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); |
98 | for (cnt = 0; cnt < sizeof(fw->risc_host_reg) / 2; cnt++) | 98 | for (cnt = 0; cnt < sizeof(fw->risc_host_reg) / 2; cnt++) |
99 | fw->risc_host_reg[cnt] = RD_REG_WORD(dmp_reg++); | 99 | fw->risc_host_reg[cnt] = RD_REG_WORD(dmp_reg++); |
100 | 100 | ||
101 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x40); | 101 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x40); |
102 | for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) | 102 | for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) |
103 | fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); | 103 | fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); |
104 | 104 | ||
105 | WRT_REG_WORD(®->ctrl_status, 0x40); | 105 | WRT_REG_WORD(®->ctrl_status, 0x40); |
106 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 106 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
107 | for (cnt = 0; cnt < sizeof(fw->resp_dma_reg) / 2; cnt++) | 107 | for (cnt = 0; cnt < sizeof(fw->resp_dma_reg) / 2; cnt++) |
108 | fw->resp_dma_reg[cnt] = RD_REG_WORD(dmp_reg++); | 108 | fw->resp_dma_reg[cnt] = RD_REG_WORD(dmp_reg++); |
109 | 109 | ||
110 | WRT_REG_WORD(®->ctrl_status, 0x50); | 110 | WRT_REG_WORD(®->ctrl_status, 0x50); |
111 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 111 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
112 | for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) | 112 | for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) |
113 | fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); | 113 | fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); |
114 | 114 | ||
115 | WRT_REG_WORD(®->ctrl_status, 0x00); | 115 | WRT_REG_WORD(®->ctrl_status, 0x00); |
116 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); | 116 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); |
117 | for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) | 117 | for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) |
118 | fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); | 118 | fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); |
119 | 119 | ||
120 | WRT_REG_WORD(®->pcr, 0x2000); | 120 | WRT_REG_WORD(®->pcr, 0x2000); |
121 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 121 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
122 | for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) | 122 | for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) |
123 | fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); | 123 | fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); |
124 | 124 | ||
125 | WRT_REG_WORD(®->pcr, 0x2200); | 125 | WRT_REG_WORD(®->pcr, 0x2200); |
126 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 126 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
127 | for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) | 127 | for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) |
128 | fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); | 128 | fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); |
129 | 129 | ||
130 | WRT_REG_WORD(®->pcr, 0x2400); | 130 | WRT_REG_WORD(®->pcr, 0x2400); |
131 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 131 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
132 | for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) | 132 | for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) |
133 | fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); | 133 | fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); |
134 | 134 | ||
135 | WRT_REG_WORD(®->pcr, 0x2600); | 135 | WRT_REG_WORD(®->pcr, 0x2600); |
136 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 136 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
137 | for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) | 137 | for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) |
138 | fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); | 138 | fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); |
139 | 139 | ||
140 | WRT_REG_WORD(®->pcr, 0x2800); | 140 | WRT_REG_WORD(®->pcr, 0x2800); |
141 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 141 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
142 | for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) | 142 | for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) |
143 | fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); | 143 | fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); |
144 | 144 | ||
145 | WRT_REG_WORD(®->pcr, 0x2A00); | 145 | WRT_REG_WORD(®->pcr, 0x2A00); |
146 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 146 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
147 | for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) | 147 | for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) |
148 | fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); | 148 | fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); |
149 | 149 | ||
150 | WRT_REG_WORD(®->pcr, 0x2C00); | 150 | WRT_REG_WORD(®->pcr, 0x2C00); |
151 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 151 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
152 | for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) | 152 | for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) |
153 | fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); | 153 | fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); |
154 | 154 | ||
155 | WRT_REG_WORD(®->pcr, 0x2E00); | 155 | WRT_REG_WORD(®->pcr, 0x2E00); |
156 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 156 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
157 | for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) | 157 | for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) |
158 | fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); | 158 | fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); |
159 | 159 | ||
160 | WRT_REG_WORD(®->ctrl_status, 0x10); | 160 | WRT_REG_WORD(®->ctrl_status, 0x10); |
161 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 161 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
162 | for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) | 162 | for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) |
163 | fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); | 163 | fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); |
164 | 164 | ||
165 | WRT_REG_WORD(®->ctrl_status, 0x20); | 165 | WRT_REG_WORD(®->ctrl_status, 0x20); |
166 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 166 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
167 | for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) | 167 | for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) |
168 | fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); | 168 | fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); |
169 | 169 | ||
170 | WRT_REG_WORD(®->ctrl_status, 0x30); | 170 | WRT_REG_WORD(®->ctrl_status, 0x30); |
171 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 171 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
172 | for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) | 172 | for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) |
173 | fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); | 173 | fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); |
174 | 174 | ||
175 | /* Reset RISC. */ | 175 | /* Reset RISC. */ |
@@ -622,7 +622,7 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
622 | fw->hccr = RD_REG_WORD(®->hccr); | 622 | fw->hccr = RD_REG_WORD(®->hccr); |
623 | 623 | ||
624 | /* Pause RISC. */ | 624 | /* Pause RISC. */ |
625 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); | 625 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); |
626 | for (cnt = 30000; (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && | 626 | for (cnt = 30000; (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && |
627 | rval == QLA_SUCCESS; cnt--) { | 627 | rval == QLA_SUCCESS; cnt--) { |
628 | if (cnt) | 628 | if (cnt) |
@@ -632,7 +632,7 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
632 | } | 632 | } |
633 | if (rval == QLA_SUCCESS) { | 633 | if (rval == QLA_SUCCESS) { |
634 | dmp_reg = (uint16_t __iomem *)(reg + 0); | 634 | dmp_reg = (uint16_t __iomem *)(reg + 0); |
635 | for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) | 635 | for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) |
636 | fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); | 636 | fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); |
637 | 637 | ||
638 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); | 638 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x10); |
@@ -644,67 +644,67 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
644 | } | 644 | } |
645 | 645 | ||
646 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x20); | 646 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x20); |
647 | for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) | 647 | for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) |
648 | fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); | 648 | fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); |
649 | 649 | ||
650 | WRT_REG_WORD(®->ctrl_status, 0x00); | 650 | WRT_REG_WORD(®->ctrl_status, 0x00); |
651 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); | 651 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0xA0); |
652 | for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) | 652 | for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) |
653 | fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); | 653 | fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); |
654 | 654 | ||
655 | WRT_REG_WORD(®->pcr, 0x2000); | 655 | WRT_REG_WORD(®->pcr, 0x2000); |
656 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 656 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
657 | for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) | 657 | for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) |
658 | fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); | 658 | fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); |
659 | 659 | ||
660 | WRT_REG_WORD(®->pcr, 0x2100); | 660 | WRT_REG_WORD(®->pcr, 0x2100); |
661 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 661 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
662 | for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) | 662 | for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) |
663 | fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); | 663 | fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); |
664 | 664 | ||
665 | WRT_REG_WORD(®->pcr, 0x2200); | 665 | WRT_REG_WORD(®->pcr, 0x2200); |
666 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 666 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
667 | for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) | 667 | for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) |
668 | fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); | 668 | fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); |
669 | 669 | ||
670 | WRT_REG_WORD(®->pcr, 0x2300); | 670 | WRT_REG_WORD(®->pcr, 0x2300); |
671 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 671 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
672 | for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) | 672 | for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) |
673 | fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); | 673 | fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); |
674 | 674 | ||
675 | WRT_REG_WORD(®->pcr, 0x2400); | 675 | WRT_REG_WORD(®->pcr, 0x2400); |
676 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 676 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
677 | for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) | 677 | for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) |
678 | fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); | 678 | fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); |
679 | 679 | ||
680 | WRT_REG_WORD(®->pcr, 0x2500); | 680 | WRT_REG_WORD(®->pcr, 0x2500); |
681 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 681 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
682 | for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) | 682 | for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) |
683 | fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); | 683 | fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); |
684 | 684 | ||
685 | WRT_REG_WORD(®->pcr, 0x2600); | 685 | WRT_REG_WORD(®->pcr, 0x2600); |
686 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 686 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
687 | for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) | 687 | for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) |
688 | fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); | 688 | fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); |
689 | 689 | ||
690 | WRT_REG_WORD(®->pcr, 0x2700); | 690 | WRT_REG_WORD(®->pcr, 0x2700); |
691 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 691 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
692 | for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) | 692 | for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) |
693 | fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); | 693 | fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); |
694 | 694 | ||
695 | WRT_REG_WORD(®->ctrl_status, 0x10); | 695 | WRT_REG_WORD(®->ctrl_status, 0x10); |
696 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 696 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
697 | for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) | 697 | for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) |
698 | fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); | 698 | fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); |
699 | 699 | ||
700 | WRT_REG_WORD(®->ctrl_status, 0x20); | 700 | WRT_REG_WORD(®->ctrl_status, 0x20); |
701 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 701 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
702 | for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) | 702 | for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) |
703 | fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); | 703 | fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); |
704 | 704 | ||
705 | WRT_REG_WORD(®->ctrl_status, 0x30); | 705 | WRT_REG_WORD(®->ctrl_status, 0x30); |
706 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); | 706 | dmp_reg = (uint16_t __iomem *)((uint8_t __iomem *)reg + 0x80); |
707 | for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) | 707 | for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) |
708 | fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); | 708 | fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); |
709 | 709 | ||
710 | /* Reset the ISP. */ | 710 | /* Reset the ISP. */ |
@@ -723,7 +723,7 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked) | |||
723 | if (rval == QLA_SUCCESS && (IS_QLA2200(ha) || (IS_QLA2100(ha) && | 723 | if (rval == QLA_SUCCESS && (IS_QLA2200(ha) || (IS_QLA2100(ha) && |
724 | (RD_REG_WORD(®->mctr) & (BIT_1 | BIT_0)) != 0))) { | 724 | (RD_REG_WORD(®->mctr) & (BIT_1 | BIT_0)) != 0))) { |
725 | 725 | ||
726 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); | 726 | WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); |
727 | for (cnt = 30000; | 727 | for (cnt = 30000; |
728 | (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && | 728 | (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && |
729 | rval == QLA_SUCCESS; cnt--) { | 729 | rval == QLA_SUCCESS; cnt--) { |
@@ -964,7 +964,7 @@ qla_uprintf(char **uiter, char *fmt, ...) | |||
964 | int iter, len; | 964 | int iter, len; |
965 | char buf[128]; | 965 | char buf[128]; |
966 | va_list args; | 966 | va_list args; |
967 | 967 | ||
968 | va_start(args, fmt); | 968 | va_start(args, fmt); |
969 | len = vsprintf(buf, fmt, args); | 969 | len = vsprintf(buf, fmt, args); |
970 | va_end(args); | 970 | va_end(args); |
@@ -1913,8 +1913,8 @@ qla24xx_ascii_fw_dump(scsi_qla_host_t *ha) | |||
1913 | /* Driver Debug Functions. */ | 1913 | /* Driver Debug Functions. */ |
1914 | /****************************************************************************/ | 1914 | /****************************************************************************/ |
1915 | 1915 | ||
1916 | void | 1916 | void |
1917 | qla2x00_dump_regs(scsi_qla_host_t *ha) | 1917 | qla2x00_dump_regs(scsi_qla_host_t *ha) |
1918 | { | 1918 | { |
1919 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 1919 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
1920 | 1920 | ||
@@ -1935,7 +1935,7 @@ qla2x00_dump_regs(scsi_qla_host_t *ha) | |||
1935 | 1935 | ||
1936 | 1936 | ||
1937 | void | 1937 | void |
1938 | qla2x00_dump_buffer(uint8_t * b, uint32_t size) | 1938 | qla2x00_dump_buffer(uint8_t * b, uint32_t size) |
1939 | { | 1939 | { |
1940 | uint32_t cnt; | 1940 | uint32_t cnt; |
1941 | uint8_t c; | 1941 | uint8_t c; |
@@ -1961,11 +1961,11 @@ qla2x00_dump_buffer(uint8_t * b, uint32_t size) | |||
1961 | /************************************************************************** | 1961 | /************************************************************************** |
1962 | * qla2x00_print_scsi_cmd | 1962 | * qla2x00_print_scsi_cmd |
1963 | * Dumps out info about the scsi cmd and srb. | 1963 | * Dumps out info about the scsi cmd and srb. |
1964 | * Input | 1964 | * Input |
1965 | * cmd : struct scsi_cmnd | 1965 | * cmd : struct scsi_cmnd |
1966 | **************************************************************************/ | 1966 | **************************************************************************/ |
1967 | void | 1967 | void |
1968 | qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) | 1968 | qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) |
1969 | { | 1969 | { |
1970 | int i; | 1970 | int i; |
1971 | struct scsi_qla_host *ha; | 1971 | struct scsi_qla_host *ha; |
@@ -1988,7 +1988,7 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) | |||
1988 | cmd->request_buffer, cmd->request_bufflen); | 1988 | cmd->request_buffer, cmd->request_bufflen); |
1989 | printk(" tag=%d, transfersize=0x%x\n", | 1989 | printk(" tag=%d, transfersize=0x%x\n", |
1990 | cmd->tag, cmd->transfersize); | 1990 | cmd->tag, cmd->transfersize); |
1991 | printk(" serial_number=%lx, SP=%p\n", cmd->serial_number, sp); | 1991 | printk(" serial_number=%lx, SP=%p\n", cmd->serial_number, sp); |
1992 | printk(" data direction=%d\n", cmd->sc_data_direction); | 1992 | printk(" data direction=%d\n", cmd->sc_data_direction); |
1993 | 1993 | ||
1994 | if (!sp) | 1994 | if (!sp) |
@@ -2025,8 +2025,8 @@ qla2x00_dump_pkt(void *pkt) | |||
2025 | * count = number of words. | 2025 | * count = number of words. |
2026 | */ | 2026 | */ |
2027 | void | 2027 | void |
2028 | qla2x00_formatted_dump_buffer(char *string, uint8_t * buffer, | 2028 | qla2x00_formatted_dump_buffer(char *string, uint8_t * buffer, |
2029 | uint8_t wd_size, uint32_t count) | 2029 | uint8_t wd_size, uint32_t count) |
2030 | { | 2030 | { |
2031 | uint32_t cnt; | 2031 | uint32_t cnt; |
2032 | uint16_t *buf16; | 2032 | uint16_t *buf16; |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 7c1618019c42..bd87d5f1ffbb 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -116,7 +116,7 @@ | |||
116 | 116 | ||
117 | #include "qla_settings.h" | 117 | #include "qla_settings.h" |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * Data bit definitions | 120 | * Data bit definitions |
121 | */ | 121 | */ |
122 | #define BIT_0 0x1 | 122 | #define BIT_0 0x1 |
@@ -194,8 +194,8 @@ | |||
194 | #define MAX_TARGETS MAX_FIBRE_DEVICES | 194 | #define MAX_TARGETS MAX_FIBRE_DEVICES |
195 | #define MIN_LUNS 8 | 195 | #define MIN_LUNS 8 |
196 | #define MAX_LUNS MAX_FIBRE_LUNS | 196 | #define MAX_LUNS MAX_FIBRE_LUNS |
197 | #define MAX_CMDS_PER_LUN 255 | 197 | #define MAX_CMDS_PER_LUN 255 |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Fibre Channel device definitions. | 200 | * Fibre Channel device definitions. |
201 | */ | 201 | */ |
@@ -243,7 +243,7 @@ | |||
243 | #define RESPONSE_ENTRY_CNT_2300 512 /* Number of response entries.*/ | 243 | #define RESPONSE_ENTRY_CNT_2300 512 /* Number of response entries.*/ |
244 | 244 | ||
245 | /* | 245 | /* |
246 | * SCSI Request Block | 246 | * SCSI Request Block |
247 | */ | 247 | */ |
248 | typedef struct srb { | 248 | typedef struct srb { |
249 | struct list_head list; | 249 | struct list_head list; |
@@ -254,7 +254,7 @@ typedef struct srb { | |||
254 | struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ | 254 | struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ |
255 | 255 | ||
256 | struct timer_list timer; /* Command timer */ | 256 | struct timer_list timer; /* Command timer */ |
257 | atomic_t ref_count; /* Reference count for this structure */ | 257 | atomic_t ref_count; /* Reference count for this structure */ |
258 | uint16_t flags; | 258 | uint16_t flags; |
259 | 259 | ||
260 | /* Request state */ | 260 | /* Request state */ |
@@ -312,7 +312,7 @@ struct device_reg_2xxx { | |||
312 | uint16_t flash_data; /* Flash BIOS data */ | 312 | uint16_t flash_data; /* Flash BIOS data */ |
313 | uint16_t unused_1[1]; /* Gap */ | 313 | uint16_t unused_1[1]; /* Gap */ |
314 | uint16_t ctrl_status; /* Control/Status */ | 314 | uint16_t ctrl_status; /* Control/Status */ |
315 | #define CSR_FLASH_64K_BANK BIT_3 /* Flash upper 64K bank select */ | 315 | #define CSR_FLASH_64K_BANK BIT_3 /* Flash upper 64K bank select */ |
316 | #define CSR_FLASH_ENABLE BIT_1 /* Flash BIOS Read/Write enable */ | 316 | #define CSR_FLASH_ENABLE BIT_1 /* Flash BIOS Read/Write enable */ |
317 | #define CSR_ISP_SOFT_RESET BIT_0 /* ISP soft reset */ | 317 | #define CSR_ISP_SOFT_RESET BIT_0 /* ISP soft reset */ |
318 | 318 | ||
@@ -355,12 +355,12 @@ struct device_reg_2xxx { | |||
355 | uint16_t rsp_q_out; /* Out-Pointer */ | 355 | uint16_t rsp_q_out; /* Out-Pointer */ |
356 | 356 | ||
357 | /* RISC to Host Status */ | 357 | /* RISC to Host Status */ |
358 | uint32_t host_status; | 358 | uint32_t host_status; |
359 | #define HSR_RISC_INT BIT_15 /* RISC interrupt */ | 359 | #define HSR_RISC_INT BIT_15 /* RISC interrupt */ |
360 | #define HSR_RISC_PAUSED BIT_8 /* RISC Paused */ | 360 | #define HSR_RISC_PAUSED BIT_8 /* RISC Paused */ |
361 | 361 | ||
362 | /* Host to Host Semaphore */ | 362 | /* Host to Host Semaphore */ |
363 | uint16_t host_semaphore; | 363 | uint16_t host_semaphore; |
364 | uint16_t unused_3[17]; /* Gap */ | 364 | uint16_t unused_3[17]; /* Gap */ |
365 | uint16_t mailbox0; | 365 | uint16_t mailbox0; |
366 | uint16_t mailbox1; | 366 | uint16_t mailbox1; |
@@ -1057,7 +1057,7 @@ typedef struct { | |||
1057 | * LSB BIT 5 = Rx Sensitivity 1G bit 1 | 1057 | * LSB BIT 5 = Rx Sensitivity 1G bit 1 |
1058 | * LSB BIT 6 = Rx Sensitivity 1G bit 2 | 1058 | * LSB BIT 6 = Rx Sensitivity 1G bit 2 |
1059 | * LSB BIT 7 = Rx Sensitivity 1G bit 3 | 1059 | * LSB BIT 7 = Rx Sensitivity 1G bit 3 |
1060 | * | 1060 | * |
1061 | * MSB BIT 0 = Tx Sensitivity 2G bit 0 | 1061 | * MSB BIT 0 = Tx Sensitivity 2G bit 0 |
1062 | * MSB BIT 1 = Tx Sensitivity 2G bit 1 | 1062 | * MSB BIT 1 = Tx Sensitivity 2G bit 1 |
1063 | * MSB BIT 2 = Tx Sensitivity 2G bit 2 | 1063 | * MSB BIT 2 = Tx Sensitivity 2G bit 2 |
@@ -1075,7 +1075,7 @@ typedef struct { | |||
1075 | * LSB BIT 5 = Output Swing 2G bit 0 | 1075 | * LSB BIT 5 = Output Swing 2G bit 0 |
1076 | * LSB BIT 6 = Output Swing 2G bit 1 | 1076 | * LSB BIT 6 = Output Swing 2G bit 1 |
1077 | * LSB BIT 7 = Output Swing 2G bit 2 | 1077 | * LSB BIT 7 = Output Swing 2G bit 2 |
1078 | * | 1078 | * |
1079 | * MSB BIT 0 = Output Emphasis 2G bit 0 | 1079 | * MSB BIT 0 = Output Emphasis 2G bit 0 |
1080 | * MSB BIT 1 = Output Emphasis 2G bit 1 | 1080 | * MSB BIT 1 = Output Emphasis 2G bit 1 |
1081 | * MSB BIT 2 = Output Enable | 1081 | * MSB BIT 2 = Output Enable |
@@ -1997,7 +1997,7 @@ struct qla_board_info { | |||
1997 | struct gid_list_info { | 1997 | struct gid_list_info { |
1998 | uint8_t al_pa; | 1998 | uint8_t al_pa; |
1999 | uint8_t area; | 1999 | uint8_t area; |
2000 | uint8_t domain; | 2000 | uint8_t domain; |
2001 | uint8_t loop_id_2100; /* ISP2100/ISP2200 -- 4 bytes. */ | 2001 | uint8_t loop_id_2100; /* ISP2100/ISP2200 -- 4 bytes. */ |
2002 | uint16_t loop_id; /* ISP23XX -- 6 bytes. */ | 2002 | uint16_t loop_id; /* ISP23XX -- 6 bytes. */ |
2003 | uint16_t reserved_1; /* ISP24XX -- 8 bytes. */ | 2003 | uint16_t reserved_1; /* ISP24XX -- 8 bytes. */ |
@@ -2111,7 +2111,7 @@ typedef struct scsi_qla_host { | |||
2111 | #define ISP_ABORT_RETRY 20 /* ISP aborted. */ | 2111 | #define ISP_ABORT_RETRY 20 /* ISP aborted. */ |
2112 | #define FCPORT_RESCAN_NEEDED 21 /* IO descriptor processing needed */ | 2112 | #define FCPORT_RESCAN_NEEDED 21 /* IO descriptor processing needed */ |
2113 | #define IODESC_PROCESS_NEEDED 22 /* IO descriptor processing needed */ | 2113 | #define IODESC_PROCESS_NEEDED 22 /* IO descriptor processing needed */ |
2114 | #define IOCTL_ERROR_RECOVERY 23 | 2114 | #define IOCTL_ERROR_RECOVERY 23 |
2115 | #define LOOP_RESET_NEEDED 24 | 2115 | #define LOOP_RESET_NEEDED 24 |
2116 | #define BEACON_BLINK_NEEDED 25 | 2116 | #define BEACON_BLINK_NEEDED 25 |
2117 | 2117 | ||
@@ -2126,7 +2126,7 @@ typedef struct scsi_qla_host { | |||
2126 | #define SRB_MIN_REQ 128 | 2126 | #define SRB_MIN_REQ 128 |
2127 | mempool_t *srb_mempool; | 2127 | mempool_t *srb_mempool; |
2128 | 2128 | ||
2129 | /* This spinlock is used to protect "io transactions", you must | 2129 | /* This spinlock is used to protect "io transactions", you must |
2130 | * aquire it before doing any IO to the card, eg with RD_REG*() and | 2130 | * aquire it before doing any IO to the card, eg with RD_REG*() and |
2131 | * WRT_REG*() for the duration of your entire commandtransaction. | 2131 | * WRT_REG*() for the duration of your entire commandtransaction. |
2132 | * | 2132 | * |
@@ -2153,12 +2153,12 @@ typedef struct scsi_qla_host { | |||
2153 | response_t *response_ring_ptr; /* Current address. */ | 2153 | response_t *response_ring_ptr; /* Current address. */ |
2154 | uint16_t rsp_ring_index; /* Current index. */ | 2154 | uint16_t rsp_ring_index; /* Current index. */ |
2155 | uint16_t response_q_length; | 2155 | uint16_t response_q_length; |
2156 | 2156 | ||
2157 | struct isp_operations isp_ops; | 2157 | struct isp_operations isp_ops; |
2158 | 2158 | ||
2159 | /* Outstandings ISP commands. */ | 2159 | /* Outstandings ISP commands. */ |
2160 | srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; | 2160 | srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; |
2161 | uint32_t current_outstanding_cmd; | 2161 | uint32_t current_outstanding_cmd; |
2162 | srb_t *status_srb; /* Status continuation entry. */ | 2162 | srb_t *status_srb; /* Status continuation entry. */ |
2163 | 2163 | ||
2164 | uint16_t revision; | 2164 | uint16_t revision; |
@@ -2187,7 +2187,7 @@ typedef struct scsi_qla_host { | |||
2187 | #define LOOP_P2P 2 | 2187 | #define LOOP_P2P 2 |
2188 | #define P2P_LOOP 3 | 2188 | #define P2P_LOOP 3 |
2189 | 2189 | ||
2190 | uint8_t marker_needed; | 2190 | uint8_t marker_needed; |
2191 | 2191 | ||
2192 | uint8_t interrupts_on; | 2192 | uint8_t interrupts_on; |
2193 | 2193 | ||
@@ -2208,7 +2208,7 @@ typedef struct scsi_qla_host { | |||
2208 | uint8_t mbx_count; | 2208 | uint8_t mbx_count; |
2209 | uint16_t last_loop_id; | 2209 | uint16_t last_loop_id; |
2210 | 2210 | ||
2211 | uint32_t login_retry_count; | 2211 | uint32_t login_retry_count; |
2212 | 2212 | ||
2213 | /* Fibre Channel Device List. */ | 2213 | /* Fibre Channel Device List. */ |
2214 | struct list_head fcports; | 2214 | struct list_head fcports; |
@@ -2253,7 +2253,7 @@ typedef struct scsi_qla_host { | |||
2253 | dma_addr_t rlc_rsp_dma; | 2253 | dma_addr_t rlc_rsp_dma; |
2254 | rpt_lun_cmd_rsp_t *rlc_rsp; | 2254 | rpt_lun_cmd_rsp_t *rlc_rsp; |
2255 | 2255 | ||
2256 | /* Small DMA pool allocations -- maximum 256 bytes in length. */ | 2256 | /* Small DMA pool allocations -- maximum 256 bytes in length. */ |
2257 | #define DMA_POOL_SIZE 256 | 2257 | #define DMA_POOL_SIZE 256 |
2258 | struct dma_pool *s_dma_pool; | 2258 | struct dma_pool *s_dma_pool; |
2259 | 2259 | ||
@@ -2281,10 +2281,10 @@ typedef struct scsi_qla_host { | |||
2281 | uint32_t mbx_flags; | 2281 | uint32_t mbx_flags; |
2282 | #define MBX_IN_PROGRESS BIT_0 | 2282 | #define MBX_IN_PROGRESS BIT_0 |
2283 | #define MBX_BUSY BIT_1 /* Got the Access */ | 2283 | #define MBX_BUSY BIT_1 /* Got the Access */ |
2284 | #define MBX_SLEEPING_ON_SEM BIT_2 | 2284 | #define MBX_SLEEPING_ON_SEM BIT_2 |
2285 | #define MBX_POLLING_FOR_COMP BIT_3 | 2285 | #define MBX_POLLING_FOR_COMP BIT_3 |
2286 | #define MBX_COMPLETED BIT_4 | 2286 | #define MBX_COMPLETED BIT_4 |
2287 | #define MBX_TIMEDOUT BIT_5 | 2287 | #define MBX_TIMEDOUT BIT_5 |
2288 | #define MBX_ACCESS_TIMEDOUT BIT_6 | 2288 | #define MBX_ACCESS_TIMEDOUT BIT_6 |
2289 | 2289 | ||
2290 | mbx_cmd_t mc; | 2290 | mbx_cmd_t mc; |
@@ -2345,7 +2345,7 @@ typedef struct scsi_qla_host { | |||
2345 | test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ | 2345 | test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ |
2346 | test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \ | 2346 | test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \ |
2347 | atomic_read(&ha->loop_state) == LOOP_DOWN) | 2347 | atomic_read(&ha->loop_state) == LOOP_DOWN) |
2348 | 2348 | ||
2349 | #define LOOP_RDY(ha) (!LOOP_NOT_READY(ha)) | 2349 | #define LOOP_RDY(ha) (!LOOP_NOT_READY(ha)) |
2350 | 2350 | ||
2351 | #define TGT_Q(ha, t) (ha->otgt[t]) | 2351 | #define TGT_Q(ha, t) (ha->otgt[t]) |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 694d09f3a43b..bebc32eb5869 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
@@ -21,8 +21,6 @@ | |||
21 | #ifndef __QLA_FW_H | 21 | #ifndef __QLA_FW_H |
22 | #define __QLA_FW_H | 22 | #define __QLA_FW_H |
23 | 23 | ||
24 | // ISP24xx | ||
25 | |||
26 | #define RISC_SADDRESS 0x100000 | 24 | #define RISC_SADDRESS 0x100000 |
27 | #define MBS_CHECKSUM_ERROR 0x4010 | 25 | #define MBS_CHECKSUM_ERROR 0x4010 |
28 | 26 | ||
@@ -60,7 +58,6 @@ struct port_database_24xx { | |||
60 | #define PDS_PORT_UNAVAILABLE 0x07 | 58 | #define PDS_PORT_UNAVAILABLE 0x07 |
61 | #define PDS_PRLO_PENDING 0x09 | 59 | #define PDS_PRLO_PENDING 0x09 |
62 | #define PDS_LOGO_PENDING 0x11 | 60 | #define PDS_LOGO_PENDING 0x11 |
63 | //FIXME | ||
64 | #define PDS_PRLI2_PENDING 0x12 | 61 | #define PDS_PRLI2_PENDING 0x12 |
65 | 62 | ||
66 | uint8_t hard_address[3]; | 63 | uint8_t hard_address[3]; |
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index ec5ecbfbc1f6..bfebfc356975 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c | |||
@@ -317,7 +317,7 @@ qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list) | |||
317 | * single call. Return a failed status, and let GA_NXT handle | 317 | * single call. Return a failed status, and let GA_NXT handle |
318 | * the overload. | 318 | * the overload. |
319 | */ | 319 | */ |
320 | if (i == MAX_FIBRE_DEVICES) | 320 | if (i == MAX_FIBRE_DEVICES) |
321 | rval = QLA_FUNCTION_FAILED; | 321 | rval = QLA_FUNCTION_FAILED; |
322 | } | 322 | } |
323 | 323 | ||
@@ -658,7 +658,7 @@ qla2x00_rsnn_nn(scsi_qla_host_t *ha) | |||
658 | 658 | ||
659 | /* Prepare CT arguments -- node_name, symbolic node_name, size */ | 659 | /* Prepare CT arguments -- node_name, symbolic node_name, size */ |
660 | memcpy(ct_req->req.rsnn_nn.node_name, ha->node_name, WWN_SIZE); | 660 | memcpy(ct_req->req.rsnn_nn.node_name, ha->node_name, WWN_SIZE); |
661 | 661 | ||
662 | /* Prepare the Symbolic Node Name */ | 662 | /* Prepare the Symbolic Node Name */ |
663 | /* Board type */ | 663 | /* Board type */ |
664 | snn = ct_req->req.rsnn_nn.sym_node_name; | 664 | snn = ct_req->req.rsnn_nn.sym_node_name; |
@@ -863,7 +863,7 @@ qla2x00_sns_gid_pt(scsi_qla_host_t *ha, sw_info_t *list) | |||
863 | * single call. Return a failed status, and let GA_NXT handle | 863 | * single call. Return a failed status, and let GA_NXT handle |
864 | * the overload. | 864 | * the overload. |
865 | */ | 865 | */ |
866 | if (i == MAX_FIBRE_DEVICES) | 866 | if (i == MAX_FIBRE_DEVICES) |
867 | rval = QLA_FUNCTION_FAILED; | 867 | rval = QLA_FUNCTION_FAILED; |
868 | } | 868 | } |
869 | 869 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 786f2648114d..d2a367882e8b 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -123,10 +123,10 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
123 | (rval = qla2x00_init_rings(ha)) == QLA_SUCCESS) { | 123 | (rval = qla2x00_init_rings(ha)) == QLA_SUCCESS) { |
124 | check_fw_ready_again: | 124 | check_fw_ready_again: |
125 | /* | 125 | /* |
126 | * Wait for a successful LIP up to a maximum | 126 | * Wait for a successful LIP up to a maximum |
127 | * of (in seconds): RISC login timeout value, | 127 | * of (in seconds): RISC login timeout value, |
128 | * RISC retry count value, and port down retry | 128 | * RISC retry count value, and port down retry |
129 | * value OR a minimum of 4 seconds OR If no | 129 | * value OR a minimum of 4 seconds OR If no |
130 | * cable, only 5 seconds. | 130 | * cable, only 5 seconds. |
131 | */ | 131 | */ |
132 | rval = qla2x00_fw_ready(ha); | 132 | rval = qla2x00_fw_ready(ha); |
@@ -389,7 +389,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) | |||
389 | int rval; | 389 | int rval; |
390 | 390 | ||
391 | /* Assume loading risc code */ | 391 | /* Assume loading risc code */ |
392 | rval = QLA_FUNCTION_FAILED; | 392 | rval = QLA_FUNCTION_FAILED; |
393 | 393 | ||
394 | if (ha->flags.disable_risc_code_load) { | 394 | if (ha->flags.disable_risc_code_load) { |
395 | DEBUG2(printk("scsi(%ld): RISC CODE NOT loaded\n", | 395 | DEBUG2(printk("scsi(%ld): RISC CODE NOT loaded\n", |
@@ -417,7 +417,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) | |||
417 | * Returns 0 on success. | 417 | * Returns 0 on success. |
418 | */ | 418 | */ |
419 | void | 419 | void |
420 | qla2x00_reset_chip(scsi_qla_host_t *ha) | 420 | qla2x00_reset_chip(scsi_qla_host_t *ha) |
421 | { | 421 | { |
422 | unsigned long flags = 0; | 422 | unsigned long flags = 0; |
423 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 423 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -673,7 +673,7 @@ qla2x00_chip_diag(scsi_qla_host_t *ha) | |||
673 | for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { | 673 | for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { |
674 | udelay(5); | 674 | udelay(5); |
675 | data = RD_MAILBOX_REG(ha, reg, 0); | 675 | data = RD_MAILBOX_REG(ha, reg, 0); |
676 | barrier(); | 676 | barrier(); |
677 | } | 677 | } |
678 | } else | 678 | } else |
679 | udelay(10); | 679 | udelay(10); |
@@ -988,7 +988,7 @@ qla2x00_update_fw_options(scsi_qla_host_t *ha) | |||
988 | emphasis = (ha->fw_seriallink_options[2] & | 988 | emphasis = (ha->fw_seriallink_options[2] & |
989 | (BIT_4 | BIT_3)) >> 3; | 989 | (BIT_4 | BIT_3)) >> 3; |
990 | tx_sens = ha->fw_seriallink_options[0] & | 990 | tx_sens = ha->fw_seriallink_options[0] & |
991 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); | 991 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); |
992 | rx_sens = (ha->fw_seriallink_options[0] & | 992 | rx_sens = (ha->fw_seriallink_options[0] & |
993 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; | 993 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; |
994 | ha->fw_options[10] = (emphasis << 14) | (swing << 8); | 994 | ha->fw_options[10] = (emphasis << 14) | (swing << 8); |
@@ -1006,7 +1006,7 @@ qla2x00_update_fw_options(scsi_qla_host_t *ha) | |||
1006 | (BIT_7 | BIT_6 | BIT_5)) >> 5; | 1006 | (BIT_7 | BIT_6 | BIT_5)) >> 5; |
1007 | emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0); | 1007 | emphasis = ha->fw_seriallink_options[3] & (BIT_1 | BIT_0); |
1008 | tx_sens = ha->fw_seriallink_options[1] & | 1008 | tx_sens = ha->fw_seriallink_options[1] & |
1009 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); | 1009 | (BIT_3 | BIT_2 | BIT_1 | BIT_0); |
1010 | rx_sens = (ha->fw_seriallink_options[1] & | 1010 | rx_sens = (ha->fw_seriallink_options[1] & |
1011 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; | 1011 | (BIT_7 | BIT_6 | BIT_5 | BIT_4)) >> 4; |
1012 | ha->fw_options[11] = (emphasis << 14) | (swing << 8); | 1012 | ha->fw_options[11] = (emphasis << 14) | (swing << 8); |
@@ -1171,7 +1171,7 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) | |||
1171 | rval = QLA_SUCCESS; | 1171 | rval = QLA_SUCCESS; |
1172 | 1172 | ||
1173 | /* 20 seconds for loop down. */ | 1173 | /* 20 seconds for loop down. */ |
1174 | min_wait = 20; | 1174 | min_wait = 20; |
1175 | 1175 | ||
1176 | /* | 1176 | /* |
1177 | * Firmware should take at most one RATOV to login, plus 5 seconds for | 1177 | * Firmware should take at most one RATOV to login, plus 5 seconds for |
@@ -1217,8 +1217,8 @@ qla2x00_fw_ready(scsi_qla_host_t *ha) | |||
1217 | (fw_state >= FSTATE_LOSS_OF_SYNC || | 1217 | (fw_state >= FSTATE_LOSS_OF_SYNC || |
1218 | fw_state == FSTATE_WAIT_AL_PA)) { | 1218 | fw_state == FSTATE_WAIT_AL_PA)) { |
1219 | /* Loop down. Timeout on min_wait for states | 1219 | /* Loop down. Timeout on min_wait for states |
1220 | * other than Wait for Login. | 1220 | * other than Wait for Login. |
1221 | */ | 1221 | */ |
1222 | if (time_after_eq(jiffies, mtime)) { | 1222 | if (time_after_eq(jiffies, mtime)) { |
1223 | qla_printk(KERN_INFO, ha, | 1223 | qla_printk(KERN_INFO, ha, |
1224 | "Cable is unplugged...\n"); | 1224 | "Cable is unplugged...\n"); |
@@ -1620,7 +1620,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1620 | * | 1620 | * |
1621 | * The driver waits for the link to come up after link down | 1621 | * The driver waits for the link to come up after link down |
1622 | * before returning I/Os to OS with "DID_NO_CONNECT". | 1622 | * before returning I/Os to OS with "DID_NO_CONNECT". |
1623 | */ | 1623 | */ |
1624 | if (nv->link_down_timeout == 0) { | 1624 | if (nv->link_down_timeout == 0) { |
1625 | ha->loop_down_abort_time = | 1625 | ha->loop_down_abort_time = |
1626 | (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT); | 1626 | (LOOP_DOWN_TIME - LOOP_DOWN_TIMEOUT); |
@@ -1628,7 +1628,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1628 | ha->link_down_timeout = nv->link_down_timeout; | 1628 | ha->link_down_timeout = nv->link_down_timeout; |
1629 | ha->loop_down_abort_time = | 1629 | ha->loop_down_abort_time = |
1630 | (LOOP_DOWN_TIME - ha->link_down_timeout); | 1630 | (LOOP_DOWN_TIME - ha->link_down_timeout); |
1631 | } | 1631 | } |
1632 | 1632 | ||
1633 | /* | 1633 | /* |
1634 | * Need enough time to try and get the port back. | 1634 | * Need enough time to try and get the port back. |
@@ -1730,7 +1730,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *ha, int flags) | |||
1730 | * 2 = database was full and device was not configured. | 1730 | * 2 = database was full and device was not configured. |
1731 | */ | 1731 | */ |
1732 | static int | 1732 | static int |
1733 | qla2x00_configure_loop(scsi_qla_host_t *ha) | 1733 | qla2x00_configure_loop(scsi_qla_host_t *ha) |
1734 | { | 1734 | { |
1735 | int rval; | 1735 | int rval; |
1736 | unsigned long flags, save_flags; | 1736 | unsigned long flags, save_flags; |
@@ -1838,7 +1838,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) | |||
1838 | * 0 = success. | 1838 | * 0 = success. |
1839 | */ | 1839 | */ |
1840 | static int | 1840 | static int |
1841 | qla2x00_configure_local_loop(scsi_qla_host_t *ha) | 1841 | qla2x00_configure_local_loop(scsi_qla_host_t *ha) |
1842 | { | 1842 | { |
1843 | int rval, rval2; | 1843 | int rval, rval2; |
1844 | int found_devs; | 1844 | int found_devs; |
@@ -1993,16 +1993,16 @@ cleanup_allocation: | |||
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | static void | 1995 | static void |
1996 | qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) | 1996 | qla2x00_probe_for_all_luns(scsi_qla_host_t *ha) |
1997 | { | 1997 | { |
1998 | fc_port_t *fcport; | 1998 | fc_port_t *fcport; |
1999 | 1999 | ||
2000 | qla2x00_mark_all_devices_lost(ha); | 2000 | qla2x00_mark_all_devices_lost(ha); |
2001 | list_for_each_entry(fcport, &ha->fcports, list) { | 2001 | list_for_each_entry(fcport, &ha->fcports, list) { |
2002 | if (fcport->port_type != FCT_TARGET) | 2002 | if (fcport->port_type != FCT_TARGET) |
2003 | continue; | 2003 | continue; |
2004 | 2004 | ||
2005 | qla2x00_update_fcport(ha, fcport); | 2005 | qla2x00_update_fcport(ha, fcport); |
2006 | } | 2006 | } |
2007 | } | 2007 | } |
2008 | 2008 | ||
@@ -2573,7 +2573,7 @@ qla2x00_find_new_loop_id(scsi_qla_host_t *ha, fc_port_t *dev) | |||
2573 | * Kernel context. | 2573 | * Kernel context. |
2574 | */ | 2574 | */ |
2575 | static int | 2575 | static int |
2576 | qla2x00_device_resync(scsi_qla_host_t *ha) | 2576 | qla2x00_device_resync(scsi_qla_host_t *ha) |
2577 | { | 2577 | { |
2578 | int rval; | 2578 | int rval; |
2579 | int rval2; | 2579 | int rval2; |
@@ -2837,8 +2837,8 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
2837 | * unrecoverable / not handled error | 2837 | * unrecoverable / not handled error |
2838 | */ | 2838 | */ |
2839 | DEBUG2(printk("%s(%ld): failed=%x port_id=%02x%02x%02x " | 2839 | DEBUG2(printk("%s(%ld): failed=%x port_id=%02x%02x%02x " |
2840 | "loop_id=%x jiffies=%lx.\n", | 2840 | "loop_id=%x jiffies=%lx.\n", |
2841 | __func__, ha->host_no, mb[0], | 2841 | __func__, ha->host_no, mb[0], |
2842 | fcport->d_id.b.domain, fcport->d_id.b.area, | 2842 | fcport->d_id.b.domain, fcport->d_id.b.area, |
2843 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); | 2843 | fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); |
2844 | 2844 | ||
@@ -2901,7 +2901,7 @@ qla2x00_local_device_login(scsi_qla_host_t *ha, uint16_t loop_id) | |||
2901 | * 0 = success | 2901 | * 0 = success |
2902 | */ | 2902 | */ |
2903 | int | 2903 | int |
2904 | qla2x00_loop_resync(scsi_qla_host_t *ha) | 2904 | qla2x00_loop_resync(scsi_qla_host_t *ha) |
2905 | { | 2905 | { |
2906 | int rval; | 2906 | int rval; |
2907 | uint32_t wait_time; | 2907 | uint32_t wait_time; |
@@ -2960,7 +2960,7 @@ qla2x00_rescan_fcports(scsi_qla_host_t *ha) | |||
2960 | 2960 | ||
2961 | rescan_done = 1; | 2961 | rescan_done = 1; |
2962 | } | 2962 | } |
2963 | qla2x00_probe_for_all_luns(ha); | 2963 | qla2x00_probe_for_all_luns(ha); |
2964 | } | 2964 | } |
2965 | 2965 | ||
2966 | /* | 2966 | /* |
@@ -3030,7 +3030,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3030 | 3030 | ||
3031 | ha->isp_ops.enable_intrs(ha); | 3031 | ha->isp_ops.enable_intrs(ha); |
3032 | 3032 | ||
3033 | ha->isp_abort_cnt = 0; | 3033 | ha->isp_abort_cnt = 0; |
3034 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); | 3034 | clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); |
3035 | } else { /* failed the ISP abort */ | 3035 | } else { /* failed the ISP abort */ |
3036 | ha->flags.online = 1; | 3036 | ha->flags.online = 1; |
@@ -3039,7 +3039,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3039 | qla_printk(KERN_WARNING, ha, | 3039 | qla_printk(KERN_WARNING, ha, |
3040 | "ISP error recovery failed - " | 3040 | "ISP error recovery failed - " |
3041 | "board disabled\n"); | 3041 | "board disabled\n"); |
3042 | /* | 3042 | /* |
3043 | * The next call disables the board | 3043 | * The next call disables the board |
3044 | * completely. | 3044 | * completely. |
3045 | */ | 3045 | */ |
@@ -3064,7 +3064,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3064 | status = 1; | 3064 | status = 1; |
3065 | } | 3065 | } |
3066 | } | 3066 | } |
3067 | 3067 | ||
3068 | } | 3068 | } |
3069 | 3069 | ||
3070 | if (status) { | 3070 | if (status) { |
@@ -3119,11 +3119,11 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3119 | } | 3119 | } |
3120 | 3120 | ||
3121 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3121 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3122 | 3122 | ||
3123 | status = qla2x00_setup_chip(ha); | 3123 | status = qla2x00_setup_chip(ha); |
3124 | 3124 | ||
3125 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3125 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3126 | 3126 | ||
3127 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { | 3127 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { |
3128 | /* Enable proper parity */ | 3128 | /* Enable proper parity */ |
3129 | if (IS_QLA2300(ha)) | 3129 | if (IS_QLA2300(ha)) |
@@ -3168,7 +3168,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3168 | } | 3168 | } |
3169 | 3169 | ||
3170 | /* if no cable then assume it's good */ | 3170 | /* if no cable then assume it's good */ |
3171 | if ((ha->device_flags & DFLG_NO_CABLE)) | 3171 | if ((ha->device_flags & DFLG_NO_CABLE)) |
3172 | status = 0; | 3172 | status = 0; |
3173 | 3173 | ||
3174 | DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", | 3174 | DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", |
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index a4357f0aeea3..98f60bde2d4f 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -30,7 +30,7 @@ static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t __iomem * | |||
30 | * register value. | 30 | * register value. |
31 | */ | 31 | */ |
32 | static __inline__ uint16_t | 32 | static __inline__ uint16_t |
33 | qla2x00_debounce_register(volatile uint16_t __iomem *addr) | 33 | qla2x00_debounce_register(volatile uint16_t __iomem *addr) |
34 | { | 34 | { |
35 | volatile uint16_t first; | 35 | volatile uint16_t first; |
36 | volatile uint16_t second; | 36 | volatile uint16_t second; |
@@ -78,7 +78,7 @@ static __inline__ int qla2x00_normalize_dma_addr( | |||
78 | * ffffabc1ffffeeee (0x100000000 + e_addr) | 78 | * ffffabc1ffffeeee (0x100000000 + e_addr) |
79 | * ffffabc100000000 (0x100000000 + e_addr) & ~(0xffffffff) | 79 | * ffffabc100000000 (0x100000000 + e_addr) & ~(0xffffffff) |
80 | * ffffabc100000000 (ne_addr) | 80 | * ffffabc100000000 (ne_addr) |
81 | * | 81 | * |
82 | * Compute length of second DMA segment: | 82 | * Compute length of second DMA segment: |
83 | * | 83 | * |
84 | * 00000000ffffeeee (e_addr & 0xffffffff) | 84 | * 00000000ffffeeee (e_addr & 0xffffffff) |
@@ -114,48 +114,18 @@ qla2x00_normalize_dma_addr( | |||
114 | } | 114 | } |
115 | 115 | ||
116 | static __inline__ void qla2x00_poll(scsi_qla_host_t *); | 116 | static __inline__ void qla2x00_poll(scsi_qla_host_t *); |
117 | static inline void | 117 | static inline void |
118 | qla2x00_poll(scsi_qla_host_t *ha) | 118 | qla2x00_poll(scsi_qla_host_t *ha) |
119 | { | 119 | { |
120 | ha->isp_ops.intr_handler(0, ha, NULL); | 120 | ha->isp_ops.intr_handler(0, ha, NULL); |
121 | } | 121 | } |
122 | 122 | ||
123 | static __inline__ int qla2x00_is_wwn_zero(uint8_t *); | ||
124 | |||
125 | /* | ||
126 | * qla2x00_is_wwn_zero - Check for zero node name | ||
127 | * | ||
128 | * Input: | ||
129 | * wwn = Pointer to WW name to check | ||
130 | * | ||
131 | * Returns: | ||
132 | * 1 if name is 0x00 else 0 | ||
133 | * | ||
134 | * Context: | ||
135 | * Kernel context. | ||
136 | */ | ||
137 | static __inline__ int | ||
138 | qla2x00_is_wwn_zero(uint8_t *wwn) | ||
139 | { | ||
140 | int cnt; | ||
141 | |||
142 | for (cnt = 0; cnt < WWN_SIZE ; cnt++, wwn++) { | ||
143 | if (*wwn != 0) | ||
144 | break; | ||
145 | } | ||
146 | /* if zero return 1 */ | ||
147 | if (cnt == WWN_SIZE) | ||
148 | return (1); | ||
149 | else | ||
150 | return (0); | ||
151 | } | ||
152 | |||
153 | static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *); | 123 | static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *); |
154 | /* | 124 | /* |
155 | * This routine will wait for fabric devices for | 125 | * This routine will wait for fabric devices for |
156 | * the reset delay. | 126 | * the reset delay. |
157 | */ | 127 | */ |
158 | static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) | 128 | static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) |
159 | { | 129 | { |
160 | uint16_t fw_state; | 130 | uint16_t fw_state; |
161 | 131 | ||
@@ -188,54 +158,6 @@ qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked) | |||
188 | return (QLA_SUCCESS); | 158 | return (QLA_SUCCESS); |
189 | } | 159 | } |
190 | 160 | ||
191 | static __inline__ void qla2x00_add_timer_to_cmd(srb_t *, int); | ||
192 | static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *); | ||
193 | |||
194 | /************************************************************************** | ||
195 | * qla2x00_add_timer_to_cmd | ||
196 | * | ||
197 | * Description: | ||
198 | * Creates a timer for the specified command. The timeout is usually | ||
199 | * the command time from kernel minus 2 secs. | ||
200 | * | ||
201 | * Input: | ||
202 | * sp - pointer to validate | ||
203 | * | ||
204 | * Returns: | ||
205 | * None. | ||
206 | **************************************************************************/ | ||
207 | static inline void | ||
208 | qla2x00_add_timer_to_cmd(srb_t *sp, int timeout) | ||
209 | { | ||
210 | init_timer(&sp->timer); | ||
211 | sp->timer.expires = jiffies + timeout * HZ; | ||
212 | sp->timer.data = (unsigned long) sp; | ||
213 | sp->timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout; | ||
214 | add_timer(&sp->timer); | ||
215 | } | ||
216 | |||
217 | /************************************************************************** | ||
218 | * qla2x00_delete_timer_from_cmd | ||
219 | * | ||
220 | * Description: | ||
221 | * Delete the timer for the specified command. | ||
222 | * | ||
223 | * Input: | ||
224 | * sp - pointer to validate | ||
225 | * | ||
226 | * Returns: | ||
227 | * None. | ||
228 | **************************************************************************/ | ||
229 | static inline void | ||
230 | qla2x00_delete_timer_from_cmd(srb_t *sp) | ||
231 | { | ||
232 | if (sp->timer.function != NULL) { | ||
233 | del_timer(&sp->timer); | ||
234 | sp->timer.function = NULL; | ||
235 | sp->timer.data = (unsigned long) NULL; | ||
236 | } | ||
237 | } | ||
238 | |||
239 | static inline uint8_t *host_to_fcp_swap(uint8_t *, uint32_t); | 161 | static inline uint8_t *host_to_fcp_swap(uint8_t *, uint32_t); |
240 | static inline uint8_t * | 162 | static inline uint8_t * |
241 | host_to_fcp_swap(uint8_t *fcp, uint32_t bsize) | 163 | host_to_fcp_swap(uint8_t *fcp, uint32_t bsize) |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 4343c65523a5..c43ca670748a 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -468,7 +468,7 @@ queuing_error: | |||
468 | * | 468 | * |
469 | * Returns non-zero if a failure occured, else zero. | 469 | * Returns non-zero if a failure occured, else zero. |
470 | */ | 470 | */ |
471 | int | 471 | int |
472 | __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, | 472 | __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, |
473 | uint8_t type) | 473 | uint8_t type) |
474 | { | 474 | { |
@@ -504,7 +504,7 @@ __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, | |||
504 | return (QLA_SUCCESS); | 504 | return (QLA_SUCCESS); |
505 | } | 505 | } |
506 | 506 | ||
507 | int | 507 | int |
508 | qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, | 508 | qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, |
509 | uint8_t type) | 509 | uint8_t type) |
510 | { | 510 | { |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index b960bdfe91e9..f6d94bea37f2 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -240,13 +240,13 @@ qla2x00_mbx_completion(scsi_qla_host_t *ha, uint16_t mb0) | |||
240 | wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 1); | 240 | wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 1); |
241 | 241 | ||
242 | for (cnt = 1; cnt < ha->mbx_count; cnt++) { | 242 | for (cnt = 1; cnt < ha->mbx_count; cnt++) { |
243 | if (IS_QLA2200(ha) && cnt == 8) | 243 | if (IS_QLA2200(ha) && cnt == 8) |
244 | wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 8); | 244 | wptr = (uint16_t __iomem *)MAILBOX_REG(ha, reg, 8); |
245 | if (cnt == 4 || cnt == 5) | 245 | if (cnt == 4 || cnt == 5) |
246 | ha->mailbox_out[cnt] = qla2x00_debounce_register(wptr); | 246 | ha->mailbox_out[cnt] = qla2x00_debounce_register(wptr); |
247 | else | 247 | else |
248 | ha->mailbox_out[cnt] = RD_REG_WORD(wptr); | 248 | ha->mailbox_out[cnt] = RD_REG_WORD(wptr); |
249 | 249 | ||
250 | wptr++; | 250 | wptr++; |
251 | } | 251 | } |
252 | 252 | ||
@@ -514,7 +514,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
514 | "Configuration change detected: value=%x.\n", mb[1]); | 514 | "Configuration change detected: value=%x.\n", mb[1]); |
515 | 515 | ||
516 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 516 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
517 | atomic_set(&ha->loop_state, LOOP_DOWN); | 517 | atomic_set(&ha->loop_state, LOOP_DOWN); |
518 | if (!atomic_read(&ha->loop_down_timer)) | 518 | if (!atomic_read(&ha->loop_down_timer)) |
519 | atomic_set(&ha->loop_down_timer, | 519 | atomic_set(&ha->loop_down_timer, |
520 | LOOP_DOWN_TIME); | 520 | LOOP_DOWN_TIME); |
@@ -846,7 +846,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
846 | qla_printk(KERN_WARNING, ha, "Status Entry invalid handle.\n"); | 846 | qla_printk(KERN_WARNING, ha, "Status Entry invalid handle.\n"); |
847 | 847 | ||
848 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 848 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
849 | if (ha->dpc_wait && !ha->dpc_active) | 849 | if (ha->dpc_wait && !ha->dpc_active) |
850 | up(ha->dpc_wait); | 850 | up(ha->dpc_wait); |
851 | 851 | ||
852 | return; | 852 | return; |
@@ -969,7 +969,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
969 | } | 969 | } |
970 | 970 | ||
971 | /* | 971 | /* |
972 | * Check to see if SCSI Status is non zero. If so report SCSI | 972 | * Check to see if SCSI Status is non zero. If so report SCSI |
973 | * Status. | 973 | * Status. |
974 | */ | 974 | */ |
975 | if (lscsi_status != 0) { | 975 | if (lscsi_status != 0) { |
@@ -991,7 +991,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
991 | sp->request_sense_length = sense_len; | 991 | sp->request_sense_length = sense_len; |
992 | sp->request_sense_ptr = cp->sense_buffer; | 992 | sp->request_sense_ptr = cp->sense_buffer; |
993 | 993 | ||
994 | if (sp->request_sense_length > 32) | 994 | if (sp->request_sense_length > 32) |
995 | sense_len = 32; | 995 | sense_len = 32; |
996 | 996 | ||
997 | memcpy(cp->sense_buffer, sense_data, sense_len); | 997 | memcpy(cp->sense_buffer, sense_data, sense_len); |
@@ -1096,7 +1096,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1096 | break; | 1096 | break; |
1097 | 1097 | ||
1098 | case CS_ABORTED: | 1098 | case CS_ABORTED: |
1099 | /* | 1099 | /* |
1100 | * hv2.19.12 - DID_ABORT does not retry the request if we | 1100 | * hv2.19.12 - DID_ABORT does not retry the request if we |
1101 | * aborted this request then abort otherwise it must be a | 1101 | * aborted this request then abort otherwise it must be a |
1102 | * reset. | 1102 | * reset. |
@@ -1137,7 +1137,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1137 | 1137 | ||
1138 | /* SCSI Mid-Layer handles device queue full */ | 1138 | /* SCSI Mid-Layer handles device queue full */ |
1139 | 1139 | ||
1140 | cp->result = DID_OK << 16 | lscsi_status; | 1140 | cp->result = DID_OK << 16 | lscsi_status; |
1141 | 1141 | ||
1142 | break; | 1142 | break; |
1143 | 1143 | ||
@@ -1178,7 +1178,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt) | |||
1178 | "sp=%p sp->state:%d\n", __func__, sp, sp->state)); | 1178 | "sp=%p sp->state:%d\n", __func__, sp, sp->state)); |
1179 | qla_printk(KERN_INFO, ha, | 1179 | qla_printk(KERN_INFO, ha, |
1180 | "cmd is NULL: already returned to OS (sp=%p)\n", | 1180 | "cmd is NULL: already returned to OS (sp=%p)\n", |
1181 | sp); | 1181 | sp); |
1182 | 1182 | ||
1183 | ha->status_srb = NULL; | 1183 | ha->status_srb = NULL; |
1184 | return; | 1184 | return; |
@@ -1223,7 +1223,7 @@ qla2x00_error_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) | |||
1223 | else if (pkt->entry_status & RF_INV_E_COUNT) | 1223 | else if (pkt->entry_status & RF_INV_E_COUNT) |
1224 | qla_printk(KERN_ERR, ha, "%s: Invalid Entry Count\n", __func__); | 1224 | qla_printk(KERN_ERR, ha, "%s: Invalid Entry Count\n", __func__); |
1225 | else if (pkt->entry_status & RF_INV_E_PARAM) | 1225 | else if (pkt->entry_status & RF_INV_E_PARAM) |
1226 | qla_printk(KERN_ERR, ha, | 1226 | qla_printk(KERN_ERR, ha, |
1227 | "%s: Invalid Entry Parameter\n", __func__); | 1227 | "%s: Invalid Entry Parameter\n", __func__); |
1228 | else if (pkt->entry_status & RF_INV_E_TYPE) | 1228 | else if (pkt->entry_status & RF_INV_E_TYPE) |
1229 | qla_printk(KERN_ERR, ha, "%s: Invalid Entry Type\n", __func__); | 1229 | qla_printk(KERN_ERR, ha, "%s: Invalid Entry Type\n", __func__); |
@@ -1365,7 +1365,6 @@ qla24xx_process_response_queue(struct scsi_qla_host *ha) | |||
1365 | DEBUG3(printk(KERN_INFO | 1365 | DEBUG3(printk(KERN_INFO |
1366 | "scsi(%ld): Process error entry.\n", ha->host_no)); | 1366 | "scsi(%ld): Process error entry.\n", ha->host_no)); |
1367 | 1367 | ||
1368 | //FIXME | ||
1369 | qla2x00_error_entry(ha, (sts_entry_t *) pkt); | 1368 | qla2x00_error_entry(ha, (sts_entry_t *) pkt); |
1370 | ((response_t *)pkt)->signature = RESPONSE_PROCESSED; | 1369 | ((response_t *)pkt)->signature = RESPONSE_PROCESSED; |
1371 | wmb(); | 1370 | wmb(); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index ab361be003d3..2731457911bf 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -294,7 +294,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
294 | "Mailbox command timeout occured. Scheduling ISP " | 294 | "Mailbox command timeout occured. Scheduling ISP " |
295 | "abort.\n"); | 295 | "abort.\n"); |
296 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 296 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
297 | if (ha->dpc_wait && !ha->dpc_active) | 297 | if (ha->dpc_wait && !ha->dpc_active) |
298 | up(ha->dpc_wait); | 298 | up(ha->dpc_wait); |
299 | 299 | ||
300 | } else if (!abort_active) { | 300 | } else if (!abort_active) { |
@@ -1753,18 +1753,18 @@ qla2x00_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, | |||
1753 | /* | 1753 | /* |
1754 | * qla2x00_login_local_device | 1754 | * qla2x00_login_local_device |
1755 | * Issue login loop port mailbox command. | 1755 | * Issue login loop port mailbox command. |
1756 | * | 1756 | * |
1757 | * Input: | 1757 | * Input: |
1758 | * ha = adapter block pointer. | 1758 | * ha = adapter block pointer. |
1759 | * loop_id = device loop ID. | 1759 | * loop_id = device loop ID. |
1760 | * opt = command options. | 1760 | * opt = command options. |
1761 | * | 1761 | * |
1762 | * Returns: | 1762 | * Returns: |
1763 | * Return status code. | 1763 | * Return status code. |
1764 | * | 1764 | * |
1765 | * Context: | 1765 | * Context: |
1766 | * Kernel context. | 1766 | * Kernel context. |
1767 | * | 1767 | * |
1768 | */ | 1768 | */ |
1769 | int | 1769 | int |
1770 | qla2x00_login_local_device(scsi_qla_host_t *ha, uint16_t loop_id, | 1770 | qla2x00_login_local_device(scsi_qla_host_t *ha, uint16_t loop_id, |
@@ -2070,7 +2070,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, | |||
2070 | } else { | 2070 | } else { |
2071 | DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " | 2071 | DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " |
2072 | "mb7=%x mb10=%x.\n", __func__, ha->host_no, | 2072 | "mb7=%x mb10=%x.\n", __func__, ha->host_no, |
2073 | mcp->mb[1], mcp->mb[2], mcp->mb[3], mcp->mb[6], mcp->mb[7], | 2073 | mcp->mb[1], mcp->mb[2], mcp->mb[3], mcp->mb[6], mcp->mb[7], |
2074 | mcp->mb[10])); | 2074 | mcp->mb[10])); |
2075 | 2075 | ||
2076 | if (cur_xchg_cnt) | 2076 | if (cur_xchg_cnt) |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 072906994bf5..fd7e730bb3ba 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -64,7 +64,7 @@ MODULE_PARM_DESC(ql2xplogiabsentdevice, | |||
64 | int ql2xenablezio = 0; | 64 | int ql2xenablezio = 0; |
65 | module_param(ql2xenablezio, int, S_IRUGO|S_IRUSR); | 65 | module_param(ql2xenablezio, int, S_IRUGO|S_IRUSR); |
66 | MODULE_PARM_DESC(ql2xenablezio, | 66 | MODULE_PARM_DESC(ql2xenablezio, |
67 | "Option to enable ZIO:If 1 then enable it otherwise" | 67 | "Option to enable ZIO:If 1 then enable it otherwise" |
68 | " use the default set in the NVRAM." | 68 | " use the default set in the NVRAM." |
69 | " Default is 0 : disabled"); | 69 | " Default is 0 : disabled"); |
70 | 70 | ||
@@ -89,7 +89,7 @@ static void qla2x00_free_device(scsi_qla_host_t *); | |||
89 | static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha); | 89 | static void qla2x00_config_dma_addressing(scsi_qla_host_t *ha); |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * SCSI host template entry points | 92 | * SCSI host template entry points |
93 | */ | 93 | */ |
94 | static int qla2xxx_slave_configure(struct scsi_device * device); | 94 | static int qla2xxx_slave_configure(struct scsi_device * device); |
95 | static int qla2xxx_slave_alloc(struct scsi_device *); | 95 | static int qla2xxx_slave_alloc(struct scsi_device *); |
@@ -280,7 +280,7 @@ char * | |||
280 | qla2x00_fw_version_str(struct scsi_qla_host *ha, char *str) | 280 | qla2x00_fw_version_str(struct scsi_qla_host *ha, char *str) |
281 | { | 281 | { |
282 | char un_str[10]; | 282 | char un_str[10]; |
283 | 283 | ||
284 | sprintf(str, "%d.%02d.%02d ", ha->fw_major_version, | 284 | sprintf(str, "%d.%02d.%02d ", ha->fw_major_version, |
285 | ha->fw_minor_version, | 285 | ha->fw_minor_version, |
286 | ha->fw_subminor_version); | 286 | ha->fw_subminor_version); |
@@ -504,14 +504,14 @@ qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) | |||
504 | 504 | ||
505 | /* | 505 | /* |
506 | * qla2x00_wait_for_hba_online | 506 | * qla2x00_wait_for_hba_online |
507 | * Wait till the HBA is online after going through | 507 | * Wait till the HBA is online after going through |
508 | * <= MAX_RETRIES_OF_ISP_ABORT or | 508 | * <= MAX_RETRIES_OF_ISP_ABORT or |
509 | * finally HBA is disabled ie marked offline | 509 | * finally HBA is disabled ie marked offline |
510 | * | 510 | * |
511 | * Input: | 511 | * Input: |
512 | * ha - pointer to host adapter structure | 512 | * ha - pointer to host adapter structure |
513 | * | 513 | * |
514 | * Note: | 514 | * Note: |
515 | * Does context switching-Release SPIN_LOCK | 515 | * Does context switching-Release SPIN_LOCK |
516 | * (if any) before calling this routine. | 516 | * (if any) before calling this routine. |
517 | * | 517 | * |
@@ -519,13 +519,13 @@ qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) | |||
519 | * Success (Adapter is online) : 0 | 519 | * Success (Adapter is online) : 0 |
520 | * Failed (Adapter is offline/disabled) : 1 | 520 | * Failed (Adapter is offline/disabled) : 1 |
521 | */ | 521 | */ |
522 | static int | 522 | static int |
523 | qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) | 523 | qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) |
524 | { | 524 | { |
525 | int return_status; | 525 | int return_status; |
526 | unsigned long wait_online; | 526 | unsigned long wait_online; |
527 | 527 | ||
528 | wait_online = jiffies + (MAX_LOOP_TIMEOUT * HZ); | 528 | wait_online = jiffies + (MAX_LOOP_TIMEOUT * HZ); |
529 | while (((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) || | 529 | while (((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) || |
530 | test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || | 530 | test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || |
531 | test_bit(ISP_ABORT_RETRY, &ha->dpc_flags) || | 531 | test_bit(ISP_ABORT_RETRY, &ha->dpc_flags) || |
@@ -533,8 +533,8 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) | |||
533 | 533 | ||
534 | msleep(1000); | 534 | msleep(1000); |
535 | } | 535 | } |
536 | if (ha->flags.online) | 536 | if (ha->flags.online) |
537 | return_status = QLA_SUCCESS; | 537 | return_status = QLA_SUCCESS; |
538 | else | 538 | else |
539 | return_status = QLA_FUNCTION_FAILED; | 539 | return_status = QLA_FUNCTION_FAILED; |
540 | 540 | ||
@@ -546,27 +546,27 @@ qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) | |||
546 | /* | 546 | /* |
547 | * qla2x00_wait_for_loop_ready | 547 | * qla2x00_wait_for_loop_ready |
548 | * Wait for MAX_LOOP_TIMEOUT(5 min) value for loop | 548 | * Wait for MAX_LOOP_TIMEOUT(5 min) value for loop |
549 | * to be in LOOP_READY state. | 549 | * to be in LOOP_READY state. |
550 | * Input: | 550 | * Input: |
551 | * ha - pointer to host adapter structure | 551 | * ha - pointer to host adapter structure |
552 | * | 552 | * |
553 | * Note: | 553 | * Note: |
554 | * Does context switching-Release SPIN_LOCK | 554 | * Does context switching-Release SPIN_LOCK |
555 | * (if any) before calling this routine. | 555 | * (if any) before calling this routine. |
556 | * | 556 | * |
557 | * | 557 | * |
558 | * Return: | 558 | * Return: |
559 | * Success (LOOP_READY) : 0 | 559 | * Success (LOOP_READY) : 0 |
560 | * Failed (LOOP_NOT_READY) : 1 | 560 | * Failed (LOOP_NOT_READY) : 1 |
561 | */ | 561 | */ |
562 | static inline int | 562 | static inline int |
563 | qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) | 563 | qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) |
564 | { | 564 | { |
565 | int return_status = QLA_SUCCESS; | 565 | int return_status = QLA_SUCCESS; |
566 | unsigned long loop_timeout ; | 566 | unsigned long loop_timeout ; |
567 | 567 | ||
568 | /* wait for 5 min at the max for loop to be ready */ | 568 | /* wait for 5 min at the max for loop to be ready */ |
569 | loop_timeout = jiffies + (MAX_LOOP_TIMEOUT * HZ); | 569 | loop_timeout = jiffies + (MAX_LOOP_TIMEOUT * HZ); |
570 | 570 | ||
571 | while ((!atomic_read(&ha->loop_down_timer) && | 571 | while ((!atomic_read(&ha->loop_down_timer) && |
572 | atomic_read(&ha->loop_state) == LOOP_DOWN) || | 572 | atomic_read(&ha->loop_state) == LOOP_DOWN) || |
@@ -577,7 +577,7 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) | |||
577 | break; | 577 | break; |
578 | } | 578 | } |
579 | } | 579 | } |
580 | return (return_status); | 580 | return (return_status); |
581 | } | 581 | } |
582 | 582 | ||
583 | /************************************************************************** | 583 | /************************************************************************** |
@@ -647,13 +647,13 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
647 | /* Wait for the command to be returned. */ | 647 | /* Wait for the command to be returned. */ |
648 | if (ret == SUCCESS) { | 648 | if (ret == SUCCESS) { |
649 | if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { | 649 | if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { |
650 | qla_printk(KERN_ERR, ha, | 650 | qla_printk(KERN_ERR, ha, |
651 | "scsi(%ld:%d:%d): Abort handler timed out -- %lx " | 651 | "scsi(%ld:%d:%d): Abort handler timed out -- %lx " |
652 | "%x.\n", ha->host_no, id, lun, serial, ret); | 652 | "%x.\n", ha->host_no, id, lun, serial, ret); |
653 | } | 653 | } |
654 | } | 654 | } |
655 | 655 | ||
656 | qla_printk(KERN_INFO, ha, | 656 | qla_printk(KERN_INFO, ha, |
657 | "scsi(%ld:%d:%d): Abort command issued -- %lx %x.\n", ha->host_no, | 657 | "scsi(%ld:%d:%d): Abort command issued -- %lx %x.\n", ha->host_no, |
658 | id, lun, serial, ret); | 658 | id, lun, serial, ret); |
659 | 659 | ||
@@ -668,7 +668,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
668 | * | 668 | * |
669 | * Input: | 669 | * Input: |
670 | * ha - pointer to scsi_qla_host structure. | 670 | * ha - pointer to scsi_qla_host structure. |
671 | * t - target | 671 | * t - target |
672 | * Returns: | 672 | * Returns: |
673 | * Either SUCCESS or FAILED. | 673 | * Either SUCCESS or FAILED. |
674 | * | 674 | * |
@@ -717,7 +717,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t) | |||
717 | * executing commands. | 717 | * executing commands. |
718 | * | 718 | * |
719 | * NOTE: The use of SP is undefined within this context. Do *NOT* | 719 | * NOTE: The use of SP is undefined within this context. Do *NOT* |
720 | * attempt to use this value, even if you determine it is | 720 | * attempt to use this value, even if you determine it is |
721 | * non-null. | 721 | * non-null. |
722 | * | 722 | * |
723 | * Input: | 723 | * Input: |
@@ -793,7 +793,7 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) | |||
793 | "commands\n", __func__, ha->host_no)); | 793 | "commands\n", __func__, ha->host_no)); |
794 | qla_printk(KERN_INFO, ha, | 794 | qla_printk(KERN_INFO, ha, |
795 | "%s: failed while waiting for commands\n", | 795 | "%s: failed while waiting for commands\n", |
796 | __func__); | 796 | __func__); |
797 | 797 | ||
798 | goto eh_dev_reset_done; | 798 | goto eh_dev_reset_done; |
799 | } | 799 | } |
@@ -959,7 +959,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
959 | 959 | ||
960 | /* | 960 | /* |
961 | * Fixme-may be dpc thread is active and processing | 961 | * Fixme-may be dpc thread is active and processing |
962 | * loop_resync,so wait a while for it to | 962 | * loop_resync,so wait a while for it to |
963 | * be completed and then issue big hammer.Otherwise | 963 | * be completed and then issue big hammer.Otherwise |
964 | * it may cause I/O failure as big hammer marks the | 964 | * it may cause I/O failure as big hammer marks the |
965 | * devices as lost kicking of the port_down_timer | 965 | * devices as lost kicking of the port_down_timer |
@@ -974,7 +974,7 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
974 | 974 | ||
975 | if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) | 975 | if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) |
976 | goto eh_host_reset_lock; | 976 | goto eh_host_reset_lock; |
977 | } | 977 | } |
978 | clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); | 978 | clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); |
979 | 979 | ||
980 | /* Waiting for our command in done_queue to be returned to OS.*/ | 980 | /* Waiting for our command in done_queue to be returned to OS.*/ |
@@ -1020,7 +1020,7 @@ qla2x00_loop_reset(scsi_qla_host_t *ha) | |||
1020 | } | 1020 | } |
1021 | 1021 | ||
1022 | if (status == QLA_SUCCESS && | 1022 | if (status == QLA_SUCCESS && |
1023 | ((!ha->flags.enable_target_reset && | 1023 | ((!ha->flags.enable_target_reset && |
1024 | !ha->flags.enable_lip_reset) || | 1024 | !ha->flags.enable_lip_reset) || |
1025 | ha->flags.enable_lip_full_login)) { | 1025 | ha->flags.enable_lip_full_login)) { |
1026 | 1026 | ||
@@ -1139,7 +1139,7 @@ qla2x00_config_dma_addressing(scsi_qla_host_t *ha) | |||
1139 | 1139 | ||
1140 | if (pci_set_consistent_dma_mask(ha->pdev, | 1140 | if (pci_set_consistent_dma_mask(ha->pdev, |
1141 | DMA_64BIT_MASK)) { | 1141 | DMA_64BIT_MASK)) { |
1142 | qla_printk(KERN_DEBUG, ha, | 1142 | qla_printk(KERN_DEBUG, ha, |
1143 | "Failed to set 64 bit PCI consistent mask; " | 1143 | "Failed to set 64 bit PCI consistent mask; " |
1144 | "using 32 bit.\n"); | 1144 | "using 32 bit.\n"); |
1145 | pci_set_consistent_dma_mask(ha->pdev, | 1145 | pci_set_consistent_dma_mask(ha->pdev, |
@@ -1666,7 +1666,7 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
1666 | { | 1666 | { |
1667 | if (atomic_read(&fcport->state) == FCS_ONLINE && fcport->rport) | 1667 | if (atomic_read(&fcport->state) == FCS_ONLINE && fcport->rport) |
1668 | fc_remote_port_block(fcport->rport); | 1668 | fc_remote_port_block(fcport->rport); |
1669 | /* | 1669 | /* |
1670 | * We may need to retry the login, so don't change the state of the | 1670 | * We may need to retry the login, so don't change the state of the |
1671 | * port but do the retries. | 1671 | * port but do the retries. |
1672 | */ | 1672 | */ |
@@ -1711,7 +1711,7 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
1711 | * Context: | 1711 | * Context: |
1712 | */ | 1712 | */ |
1713 | void | 1713 | void |
1714 | qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha) | 1714 | qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha) |
1715 | { | 1715 | { |
1716 | fc_port_t *fcport; | 1716 | fc_port_t *fcport; |
1717 | 1717 | ||
@@ -2061,11 +2061,11 @@ qla2x00_mem_free(scsi_qla_host_t *ha) | |||
2061 | * | 2061 | * |
2062 | * Context: | 2062 | * Context: |
2063 | * Kernel context. | 2063 | * Kernel context. |
2064 | * | 2064 | * |
2065 | * Note: Sets the ref_count for non Null sp to one. | 2065 | * Note: Sets the ref_count for non Null sp to one. |
2066 | */ | 2066 | */ |
2067 | static int | 2067 | static int |
2068 | qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) | 2068 | qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) |
2069 | { | 2069 | { |
2070 | int rval; | 2070 | int rval; |
2071 | 2071 | ||
@@ -2081,10 +2081,10 @@ qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) | |||
2081 | 2081 | ||
2082 | /* | 2082 | /* |
2083 | * This routine frees all adapter allocated memory. | 2083 | * This routine frees all adapter allocated memory. |
2084 | * | 2084 | * |
2085 | */ | 2085 | */ |
2086 | static void | 2086 | static void |
2087 | qla2x00_free_sp_pool( scsi_qla_host_t *ha) | 2087 | qla2x00_free_sp_pool( scsi_qla_host_t *ha) |
2088 | { | 2088 | { |
2089 | if (ha->srb_mempool) { | 2089 | if (ha->srb_mempool) { |
2090 | mempool_destroy(ha->srb_mempool); | 2090 | mempool_destroy(ha->srb_mempool); |
@@ -2223,7 +2223,7 @@ qla2x00_do_dpc(void *data) | |||
2223 | 2223 | ||
2224 | DEBUG(printk("scsi(%ld): port login OK: logged in ID 0x%x\n", | 2224 | DEBUG(printk("scsi(%ld): port login OK: logged in ID 0x%x\n", |
2225 | ha->host_no, fcport->loop_id)); | 2225 | ha->host_no, fcport->loop_id)); |
2226 | 2226 | ||
2227 | fcport->port_login_retry_count = | 2227 | fcport->port_login_retry_count = |
2228 | ha->port_down_retry_count * PORT_RETRY_TIME; | 2228 | ha->port_down_retry_count * PORT_RETRY_TIME; |
2229 | atomic_set(&fcport->state, FCS_ONLINE); | 2229 | atomic_set(&fcport->state, FCS_ONLINE); |
@@ -2254,7 +2254,7 @@ qla2x00_do_dpc(void *data) | |||
2254 | clear_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags); | 2254 | clear_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags); |
2255 | DEBUG(printk("scsi(%ld): qla2x00_login_retry()\n", | 2255 | DEBUG(printk("scsi(%ld): qla2x00_login_retry()\n", |
2256 | ha->host_no)); | 2256 | ha->host_no)); |
2257 | 2257 | ||
2258 | set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); | 2258 | set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); |
2259 | 2259 | ||
2260 | DEBUG(printk("scsi(%ld): qla2x00_login_retry - end\n", | 2260 | DEBUG(printk("scsi(%ld): qla2x00_login_retry - end\n", |
@@ -2315,7 +2315,7 @@ qla2x00_do_dpc(void *data) | |||
2315 | * ha = adapter block pointer. | 2315 | * ha = adapter block pointer. |
2316 | */ | 2316 | */ |
2317 | static void | 2317 | static void |
2318 | qla2x00_rst_aen(scsi_qla_host_t *ha) | 2318 | qla2x00_rst_aen(scsi_qla_host_t *ha) |
2319 | { | 2319 | { |
2320 | if (ha->flags.online && !ha->flags.reset_active && | 2320 | if (ha->flags.online && !ha->flags.reset_active && |
2321 | !atomic_read(&ha->loop_down_timer) && | 2321 | !atomic_read(&ha->loop_down_timer) && |
@@ -2386,7 +2386,7 @@ qla2x00_timer(scsi_qla_host_t *ha) | |||
2386 | * | 2386 | * |
2387 | * Whenever, a port is in the LOST state we start decrementing its port | 2387 | * Whenever, a port is in the LOST state we start decrementing its port |
2388 | * down timer every second until it reaches zero. Once it reaches zero | 2388 | * down timer every second until it reaches zero. Once it reaches zero |
2389 | * the port it marked DEAD. | 2389 | * the port it marked DEAD. |
2390 | */ | 2390 | */ |
2391 | t = 0; | 2391 | t = 0; |
2392 | list_for_each_entry(fcport, &ha->fcports, list) { | 2392 | list_for_each_entry(fcport, &ha->fcports, list) { |
@@ -2398,9 +2398,9 @@ qla2x00_timer(scsi_qla_host_t *ha) | |||
2398 | if (atomic_read(&fcport->port_down_timer) == 0) | 2398 | if (atomic_read(&fcport->port_down_timer) == 0) |
2399 | continue; | 2399 | continue; |
2400 | 2400 | ||
2401 | if (atomic_dec_and_test(&fcport->port_down_timer) != 0) | 2401 | if (atomic_dec_and_test(&fcport->port_down_timer) != 0) |
2402 | atomic_set(&fcport->state, FCS_DEVICE_DEAD); | 2402 | atomic_set(&fcport->state, FCS_DEVICE_DEAD); |
2403 | 2403 | ||
2404 | DEBUG(printk("scsi(%ld): fcport-%d - port retry count: " | 2404 | DEBUG(printk("scsi(%ld): fcport-%d - port retry count: " |
2405 | "%d remaining\n", | 2405 | "%d remaining\n", |
2406 | ha->host_no, | 2406 | ha->host_no, |
@@ -2422,7 +2422,7 @@ qla2x00_timer(scsi_qla_host_t *ha) | |||
2422 | ha->host_no)); | 2422 | ha->host_no)); |
2423 | 2423 | ||
2424 | if (!IS_QLA2100(ha) && ha->link_down_timeout) | 2424 | if (!IS_QLA2100(ha) && ha->link_down_timeout) |
2425 | atomic_set(&ha->loop_state, LOOP_DEAD); | 2425 | atomic_set(&ha->loop_state, LOOP_DEAD); |
2426 | 2426 | ||
2427 | /* Schedule an ISP abort to return any tape commands. */ | 2427 | /* Schedule an ISP abort to return any tape commands. */ |
2428 | spin_lock_irqsave(&ha->hardware_lock, cpu_flags); | 2428 | spin_lock_irqsave(&ha->hardware_lock, cpu_flags); |
diff --git a/drivers/scsi/qla2xxx/qla_rscn.c b/drivers/scsi/qla2xxx/qla_rscn.c index 416fb7308e87..af68590c3d11 100644 --- a/drivers/scsi/qla2xxx/qla_rscn.c +++ b/drivers/scsi/qla2xxx/qla_rscn.c | |||
@@ -82,7 +82,7 @@ static int qla2x00_send_login_iocb(scsi_qla_host_t *, struct io_descriptor *, | |||
82 | static int qla2x00_send_login_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, | 82 | static int qla2x00_send_login_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, |
83 | struct mbx_entry *); | 83 | struct mbx_entry *); |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Mailbox IOCB callback array. | 86 | * Mailbox IOCB callback array. |
87 | **/ | 87 | **/ |
88 | static int (*iocb_function_cb_list[LAST_IOCB_CB]) | 88 | static int (*iocb_function_cb_list[LAST_IOCB_CB]) |
@@ -95,7 +95,7 @@ static int (*iocb_function_cb_list[LAST_IOCB_CB]) | |||
95 | }; | 95 | }; |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Generic IO descriptor handle routines. | 99 | * Generic IO descriptor handle routines. |
100 | **/ | 100 | **/ |
101 | 101 | ||
@@ -169,7 +169,7 @@ qla2x00_handle_to_iodesc(scsi_qla_host_t *ha, uint32_t handle) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | 171 | ||
172 | /** | 172 | /** |
173 | * IO descriptor allocation routines. | 173 | * IO descriptor allocation routines. |
174 | **/ | 174 | **/ |
175 | 175 | ||
@@ -248,7 +248,7 @@ qla2x00_init_io_descriptors(scsi_qla_host_t *ha) | |||
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
251 | /** | 251 | /** |
252 | * IO descriptor timer routines. | 252 | * IO descriptor timer routines. |
253 | **/ | 253 | **/ |
254 | 254 | ||
@@ -299,7 +299,7 @@ qla2x00_add_iodesc_timer(struct io_descriptor *iodesc) | |||
299 | add_timer(&iodesc->timer); | 299 | add_timer(&iodesc->timer); |
300 | } | 300 | } |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * IO descriptor support routines. | 303 | * IO descriptor support routines. |
304 | **/ | 304 | **/ |
305 | 305 | ||
@@ -333,7 +333,7 @@ qla2x00_update_login_fcport(scsi_qla_host_t *ha, struct mbx_entry *mbxstat, | |||
333 | } | 333 | } |
334 | 334 | ||
335 | 335 | ||
336 | /** | 336 | /** |
337 | * Mailbox IOCB commands. | 337 | * Mailbox IOCB commands. |
338 | **/ | 338 | **/ |
339 | 339 | ||
@@ -383,7 +383,7 @@ qla2x00_get_mbx_iocb_entry(scsi_qla_host_t *ha, uint32_t handle) | |||
383 | * Returns QLA_SUCCESS if the IOCB was issued. | 383 | * Returns QLA_SUCCESS if the IOCB was issued. |
384 | */ | 384 | */ |
385 | static int | 385 | static int |
386 | qla2x00_send_abort_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, | 386 | qla2x00_send_abort_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, |
387 | uint32_t handle_to_abort, int ha_locked) | 387 | uint32_t handle_to_abort, int ha_locked) |
388 | { | 388 | { |
389 | unsigned long flags = 0; | 389 | unsigned long flags = 0; |
@@ -720,7 +720,7 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, | |||
720 | /* Only process the last command. */ | 720 | /* Only process the last command. */ |
721 | if (remote_fcport->iodesc_idx_sent != iodesc->idx) { | 721 | if (remote_fcport->iodesc_idx_sent != iodesc->idx) { |
722 | DEBUG14(printk("scsi(%ld): Login IOCB -- ignoring, sent to " | 722 | DEBUG14(printk("scsi(%ld): Login IOCB -- ignoring, sent to " |
723 | "[%02x%02x%02x], expected %x, received %x.\n", | 723 | "[%02x%02x%02x], expected %x, received %x.\n", |
724 | ha->host_no, iodesc->d_id.b.domain, iodesc->d_id.b.area, | 724 | ha->host_no, iodesc->d_id.b.domain, iodesc->d_id.b.area, |
725 | iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, | 725 | iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, |
726 | iodesc->idx)); | 726 | iodesc->idx)); |
@@ -754,9 +754,9 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, | |||
754 | 754 | ||
755 | DEBUG14(printk("scsi(%ld): Login IOCB -- status=%x mb1=%x pn=" | 755 | DEBUG14(printk("scsi(%ld): Login IOCB -- status=%x mb1=%x pn=" |
756 | "%02x%02x%02x%02x%02x%02x%02x%02x.\n", ha->host_no, status, | 756 | "%02x%02x%02x%02x%02x%02x%02x%02x.\n", ha->host_no, status, |
757 | mb[1], mbxstat->port_name[0], mbxstat->port_name[1], | 757 | mb[1], mbxstat->port_name[0], mbxstat->port_name[1], |
758 | mbxstat->port_name[2], mbxstat->port_name[3], | 758 | mbxstat->port_name[2], mbxstat->port_name[3], |
759 | mbxstat->port_name[4], mbxstat->port_name[5], | 759 | mbxstat->port_name[4], mbxstat->port_name[5], |
760 | mbxstat->port_name[6], mbxstat->port_name[7])); | 760 | mbxstat->port_name[6], mbxstat->port_name[7])); |
761 | 761 | ||
762 | memcpy(remote_fcport->node_name, mbxstat->node_name, WWN_SIZE); | 762 | memcpy(remote_fcport->node_name, mbxstat->node_name, WWN_SIZE); |
@@ -1052,7 +1052,7 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, | |||
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | 1054 | ||
1055 | /** | 1055 | /** |
1056 | * IO descriptor processing routines. | 1056 | * IO descriptor processing routines. |
1057 | **/ | 1057 | **/ |
1058 | 1058 | ||
@@ -1136,7 +1136,7 @@ qla2x00_handle_port_rscn(scsi_qla_host_t *ha, uint32_t rscn_entry, | |||
1136 | remote_fcport = rscn_fcport; | 1136 | remote_fcport = rscn_fcport; |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | /* | 1139 | /* |
1140 | * If the port is already in our fcport list and online, send an ADISC | 1140 | * If the port is already in our fcport list and online, send an ADISC |
1141 | * to see if it's still alive. Issue login if a new fcport or the known | 1141 | * to see if it's still alive. Issue login if a new fcport or the known |
1142 | * fcport is currently offline. | 1142 | * fcport is currently offline. |
@@ -1191,7 +1191,7 @@ qla2x00_handle_port_rscn(scsi_qla_host_t *ha, uint32_t rscn_entry, | |||
1191 | } | 1191 | } |
1192 | return (QLA_SUCCESS); | 1192 | return (QLA_SUCCESS); |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | /* Send ADISC if the fcport is online */ | 1195 | /* Send ADISC if the fcport is online */ |
1196 | if (atomic_read(&remote_fcport->state) == FCS_ONLINE || | 1196 | if (atomic_read(&remote_fcport->state) == FCS_ONLINE || |
1197 | remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED) { | 1197 | remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED) { |
@@ -1229,7 +1229,7 @@ qla2x00_handle_port_rscn(scsi_qla_host_t *ha, uint32_t rscn_entry, | |||
1229 | * abort. | 1229 | * abort. |
1230 | */ | 1230 | */ |
1231 | uint32_t handle_to_abort; | 1231 | uint32_t handle_to_abort; |
1232 | 1232 | ||
1233 | iodesc = &ha->io_descriptors[ | 1233 | iodesc = &ha->io_descriptors[ |
1234 | remote_fcport->iodesc_idx_sent]; | 1234 | remote_fcport->iodesc_idx_sent]; |
1235 | qla2x00_remove_iodesc_timer(iodesc); | 1235 | qla2x00_remove_iodesc_timer(iodesc); |
diff --git a/drivers/scsi/qla2xxx/qla_settings.h b/drivers/scsi/qla2xxx/qla_settings.h index c58f5faad9e1..a7d8ed08e06b 100644 --- a/drivers/scsi/qla2xxx/qla_settings.h +++ b/drivers/scsi/qla2xxx/qla_settings.h | |||
@@ -22,33 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #define DEBUG_QLA2100 0 /* For Debug of qla2x00 */ | 23 | #define DEBUG_QLA2100 0 /* For Debug of qla2x00 */ |
24 | 24 | ||
25 | #define STOP_ON_RESET 0 | ||
26 | #define USE_ABORT_TGT 1 /* Use Abort Target mbx cmd */ | 25 | #define USE_ABORT_TGT 1 /* Use Abort Target mbx cmd */ |
27 | 26 | ||
28 | #define VSA 0 /* Volume Set Addressing */ | ||
29 | |||
30 | /* Failover options */ | ||
31 | #define MAX_RECOVERYTIME 10 /* | ||
32 | * Max suspend time for a lun recovery | ||
33 | * time | ||
34 | */ | ||
35 | #define MAX_FAILBACKTIME 5 /* Max suspend time before fail back */ | ||
36 | |||
37 | #define QLA_CMD_TIMER_DELTA 3 | ||
38 | |||
39 | /* | ||
40 | * When a lun is suspended for the "Not Ready" condition then it will suspend | ||
41 | * the lun for increments of 6 sec delays. SUSPEND_COUNT is that count. | ||
42 | */ | ||
43 | #define SUSPEND_COUNT 10 /* 6 secs * 10 retries = 60 secs */ | ||
44 | |||
45 | /* | ||
46 | * Defines the time in seconds that the driver extends the command timeout to | ||
47 | * get around the problem where the mid-layer only allows 5 retries for | ||
48 | * commands that return BUS_BUSY | ||
49 | */ | ||
50 | #define EXTEND_CMD_TIMEOUT 60 | ||
51 | |||
52 | #define MAX_RETRIES_OF_ISP_ABORT 5 | 27 | #define MAX_RETRIES_OF_ISP_ABORT 5 |
53 | 28 | ||
54 | /* Max time to wait for the loop to be in LOOP_READY state */ | 29 | /* Max time to wait for the loop to be in LOOP_READY state */ |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index c95ef2bb089a..9cfac8c184de 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -31,7 +31,7 @@ static void qla2x00_nv_write(scsi_qla_host_t *, uint16_t); | |||
31 | */ | 31 | */ |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * qla2x00_lock_nvram_access() - | 34 | * qla2x00_lock_nvram_access() - |
35 | * @ha: HA context | 35 | * @ha: HA context |
36 | */ | 36 | */ |
37 | void | 37 | void |
@@ -64,7 +64,7 @@ qla2x00_lock_nvram_access(scsi_qla_host_t *ha) | |||
64 | } | 64 | } |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * qla2x00_unlock_nvram_access() - | 67 | * qla2x00_unlock_nvram_access() - |
68 | * @ha: HA context | 68 | * @ha: HA context |
69 | */ | 69 | */ |
70 | void | 70 | void |
@@ -542,18 +542,18 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, | |||
542 | 542 | ||
543 | conf_addr = flash_conf_to_access_addr(0x03d8); | 543 | conf_addr = flash_conf_to_access_addr(0x03d8); |
544 | switch (man_id) { | 544 | switch (man_id) { |
545 | case 0xbf: // STT flash | 545 | case 0xbf: /* STT flash. */ |
546 | rest_addr = 0x1fff; | 546 | rest_addr = 0x1fff; |
547 | sec_mask = 0x3e000; | 547 | sec_mask = 0x3e000; |
548 | if (flash_id == 0x80) | 548 | if (flash_id == 0x80) |
549 | conf_addr = flash_conf_to_access_addr(0x0352); | 549 | conf_addr = flash_conf_to_access_addr(0x0352); |
550 | break; | 550 | break; |
551 | case 0x13: // ST M25P80 | 551 | case 0x13: /* ST M25P80. */ |
552 | rest_addr = 0x3fff; | 552 | rest_addr = 0x3fff; |
553 | sec_mask = 0x3c000; | 553 | sec_mask = 0x3c000; |
554 | break; | 554 | break; |
555 | default: | 555 | default: |
556 | // Default to 64 kb sector size | 556 | /* Default to 64 kb sector size. */ |
557 | rest_addr = 0x3fff; | 557 | rest_addr = 0x3fff; |
558 | sec_mask = 0x3c000; | 558 | sec_mask = 0x3c000; |
559 | break; | 559 | break; |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 98e68867261a..232369d156c9 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | ******************************************************************************/ | 18 | ******************************************************************************/ |
19 | /* | 19 | /* |
20 | * Driver version | 20 | * Driver version |
21 | */ | 21 | */ |
22 | #define QLA2XXX_VERSION "8.00.02b5-k" | 22 | #define QLA2XXX_VERSION "8.00.02b5-k" |
23 | 23 | ||