aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_proc.c')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_proc.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c
index 27dbfccea774..add2da581d66 100644
--- a/drivers/scsi/aic7xxx/aic79xx_proc.c
+++ b/drivers/scsi/aic7xxx/aic79xx_proc.c
@@ -97,7 +97,7 @@ ahd_format_transinfo(struct seq_file *m, struct ahd_transinfo *tinfo)
97 u_int mb; 97 u_int mb;
98 98
99 if (tinfo->period == AHD_PERIOD_UNKNOWN) { 99 if (tinfo->period == AHD_PERIOD_UNKNOWN) {
100 seq_printf(m, "Renegotiation Pending\n"); 100 seq_puts(m, "Renegotiation Pending\n");
101 return; 101 return;
102 } 102 }
103 speed = 3300; 103 speed = 3300;
@@ -119,40 +119,38 @@ ahd_format_transinfo(struct seq_file *m, struct ahd_transinfo *tinfo)
119 printed_options = 0; 119 printed_options = 0;
120 seq_printf(m, " (%d.%03dMHz", freq / 1000, freq % 1000); 120 seq_printf(m, " (%d.%03dMHz", freq / 1000, freq % 1000);
121 if ((tinfo->ppr_options & MSG_EXT_PPR_RD_STRM) != 0) { 121 if ((tinfo->ppr_options & MSG_EXT_PPR_RD_STRM) != 0) {
122 seq_printf(m, " RDSTRM"); 122 seq_puts(m, " RDSTRM");
123 printed_options++; 123 printed_options++;
124 } 124 }
125 if ((tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0) { 125 if ((tinfo->ppr_options & MSG_EXT_PPR_DT_REQ) != 0) {
126 seq_printf(m, "%s", printed_options ? "|DT" : " DT"); 126 seq_puts(m, printed_options ? "|DT" : " DT");
127 printed_options++; 127 printed_options++;
128 } 128 }
129 if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) != 0) { 129 if ((tinfo->ppr_options & MSG_EXT_PPR_IU_REQ) != 0) {
130 seq_printf(m, "%s", printed_options ? "|IU" : " IU"); 130 seq_puts(m, printed_options ? "|IU" : " IU");
131 printed_options++; 131 printed_options++;
132 } 132 }
133 if ((tinfo->ppr_options & MSG_EXT_PPR_RTI) != 0) { 133 if ((tinfo->ppr_options & MSG_EXT_PPR_RTI) != 0) {
134 seq_printf(m, "%s", 134 seq_puts(m, printed_options ? "|RTI" : " RTI");
135 printed_options ? "|RTI" : " RTI");
136 printed_options++; 135 printed_options++;
137 } 136 }
138 if ((tinfo->ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) { 137 if ((tinfo->ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) {
139 seq_printf(m, "%s", 138 seq_puts(m, printed_options ? "|QAS" : " QAS");
140 printed_options ? "|QAS" : " QAS");
141 printed_options++; 139 printed_options++;
142 } 140 }
143 } 141 }
144 142
145 if (tinfo->width > 0) { 143 if (tinfo->width > 0) {
146 if (freq != 0) { 144 if (freq != 0) {
147 seq_printf(m, ", "); 145 seq_puts(m, ", ");
148 } else { 146 } else {
149 seq_printf(m, " ("); 147 seq_puts(m, " (");
150 } 148 }
151 seq_printf(m, "%dbit)", 8 * (0x01 << tinfo->width)); 149 seq_printf(m, "%dbit)", 8 * (0x01 << tinfo->width));
152 } else if (freq != 0) { 150 } else if (freq != 0) {
153 seq_printf(m, ")"); 151 seq_putc(m, ')');
154 } 152 }
155 seq_printf(m, "\n"); 153 seq_putc(m, '\n');
156} 154}
157 155
158static void 156static void
@@ -167,15 +165,15 @@ ahd_dump_target_state(struct ahd_softc *ahd, struct seq_file *m,
167 tinfo = ahd_fetch_transinfo(ahd, channel, our_id, 165 tinfo = ahd_fetch_transinfo(ahd, channel, our_id,
168 target_id, &tstate); 166 target_id, &tstate);
169 seq_printf(m, "Target %d Negotiation Settings\n", target_id); 167 seq_printf(m, "Target %d Negotiation Settings\n", target_id);
170 seq_printf(m, "\tUser: "); 168 seq_puts(m, "\tUser: ");
171 ahd_format_transinfo(m, &tinfo->user); 169 ahd_format_transinfo(m, &tinfo->user);
172 starget = ahd->platform_data->starget[target_id]; 170 starget = ahd->platform_data->starget[target_id];
173 if (starget == NULL) 171 if (starget == NULL)
174 return; 172 return;
175 173
176 seq_printf(m, "\tGoal: "); 174 seq_puts(m, "\tGoal: ");
177 ahd_format_transinfo(m, &tinfo->goal); 175 ahd_format_transinfo(m, &tinfo->goal);
178 seq_printf(m, "\tCurr: "); 176 seq_puts(m, "\tCurr: ");
179 ahd_format_transinfo(m, &tinfo->curr); 177 ahd_format_transinfo(m, &tinfo->curr);
180 178
181 for (lun = 0; lun < AHD_NUM_LUNS; lun++) { 179 for (lun = 0; lun < AHD_NUM_LUNS; lun++) {
@@ -291,19 +289,19 @@ ahd_linux_show_info(struct seq_file *m, struct Scsi_Host *shost)
291 max_targ = 16; 289 max_targ = 16;
292 290
293 if (ahd->seep_config == NULL) 291 if (ahd->seep_config == NULL)
294 seq_printf(m, "No Serial EEPROM\n"); 292 seq_puts(m, "No Serial EEPROM\n");
295 else { 293 else {
296 seq_printf(m, "Serial EEPROM:\n"); 294 seq_puts(m, "Serial EEPROM:\n");
297 for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) { 295 for (i = 0; i < sizeof(*ahd->seep_config)/2; i++) {
298 if (((i % 8) == 0) && (i != 0)) { 296 if (((i % 8) == 0) && (i != 0)) {
299 seq_printf(m, "\n"); 297 seq_putc(m, '\n');
300 } 298 }
301 seq_printf(m, "0x%.4x ", 299 seq_printf(m, "0x%.4x ",
302 ((uint16_t*)ahd->seep_config)[i]); 300 ((uint16_t*)ahd->seep_config)[i]);
303 } 301 }
304 seq_printf(m, "\n"); 302 seq_putc(m, '\n');
305 } 303 }
306 seq_printf(m, "\n"); 304 seq_putc(m, '\n');
307 305
308 if ((ahd->features & AHD_WIDE) == 0) 306 if ((ahd->features & AHD_WIDE) == 0)
309 max_targ = 8; 307 max_targ = 8;