47 static void ahd_dump_target_state(
struct ahd_softc *ahd,
53 static int ahd_proc_write_seeprom(
struct ahd_softc *ahd,
63 } scsi_syncrates[] = {
81 for (i = 0; i <
ARRAY_SIZE(scsi_syncrates); i++) {
83 if (period_factor == scsi_syncrates[i].period_factor) {
85 return (100000000 / scsi_syncrates[i].
period);
93 return (10000000 / (period_factor * 4 * 10));
113 info->
pos += partial;
135 copy_mem_info(info, buf, len);
147 copy_info(info,
"Renegotiation Pending\n");
153 freq = ahd_calc_syncsrate(tinfo->
period);
156 speed *= (0x01 << tinfo->
width);
159 copy_info(info,
"%d.%03dMB/s transfers", mb, speed % 1000);
161 copy_info(info,
"%dKB/s transfers", speed);
167 copy_info(info,
" (%d.%03dMHz", freq / 1000, freq % 1000);
169 copy_info(info,
" RDSTRM");
173 copy_info(info,
"%s", printed_options ?
"|DT" :
" DT");
177 copy_info(info,
"%s", printed_options ?
"|IU" :
" IU");
181 copy_info(info,
"%s",
182 printed_options ?
"|RTI" :
" RTI");
186 copy_info(info,
"%s",
187 printed_options ?
"|QAS" :
" QAS");
192 if (tinfo->
width > 0) {
194 copy_info(info,
", ");
196 copy_info(info,
" (");
198 copy_info(info,
"%dbit)", 8 * (0x01 << tinfo->
width));
199 }
else if (freq != 0) {
200 copy_info(info,
")");
202 copy_info(info,
"\n");
216 copy_info(info,
"Target %d Negotiation Settings\n", target_id);
217 copy_info(info,
"\tUser: ");
218 ahd_format_transinfo(info, &tinfo->
user);
223 copy_info(info,
"\tGoal: ");
224 ahd_format_transinfo(info, &tinfo->
goal);
225 copy_info(info,
"\tCurr: ");
226 ahd_format_transinfo(info, &tinfo->
curr);
236 ahd_dump_device_state(info, dev);
245 copy_info(info,
"\tChannel %c Target %d Lun %d Settings\n",
250 copy_info(info,
"\t\tCommands Active %d\n", dev->
active);
251 copy_info(info,
"\t\tCommand Openings %d\n", dev->
openings);
252 copy_info(info,
"\t\tMax Tagged Openings %d\n", dev->
maxtags);
253 copy_info(info,
"\t\tDevice Queue Frozen Count %d\n", dev->
qfrozen);
275 printk(
"ahd_proc_write_seeprom: incorrect buffer size\n");
280 if (have_seeprom == 0) {
281 printk(
"ahd_proc_write_seeprom: cksum verification failed\n");
287 printk(
"ahd_proc_write_seeprom: No Serial EEPROM\n");
295 printk(
"aic79xx: Unable to allocate serial "
296 "eeprom buffer. Write failing\n");
300 printk(
"aic79xx: Writing Serial EEPROM\n");
301 start_addr = 32 * (ahd->
channel -
'A');
323 off_t offset,
int length,
int inout)
334 retval = ahd_proc_write_seeprom(ahd, buffer, length);
346 copy_info(&info,
"Adaptec AIC79xx driver version: %s\n",
350 copy_info(&info,
"%s\n", ahd_info);
351 copy_info(&info,
"Allocated SCBs: %d, SG List Length: %d\n\n",
357 copy_info(&info,
"No Serial EEPROM\n");
359 copy_info(&info,
"Serial EEPROM:\n");
360 for (i = 0; i <
sizeof(*ahd->
seep_config)/2; i++) {
361 if (((i % 8) == 0) && (i != 0)) {
362 copy_info(&info,
"\n");
364 copy_info(&info,
"0x%.4x ",
367 copy_info(&info,
"\n");
369 copy_info(&info,
"\n");
374 for (i = 0; i < max_targ; i++) {
376 ahd_dump_target_state(ahd, &info, ahd->
our_id,
'A',