xref: /freebsd/sys/dev/aac/aac_debug.c (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1 /*-
2  * Copyright (c) 2000 Michael Smith
3  * Copyright (c) 2001 Scott Long
4  * Copyright (c) 2000 BSDi
5  * Copyright (c) 2001 Adaptec, Inc.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  */
29 
30 #include <sys/cdefs.h>
31 __FBSDID("$FreeBSD$");
32 
33 /*
34  * Debugging support.
35  */
36 #include "opt_aac.h"
37 
38 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/kernel.h>
41 #include <sys/conf.h>
42 
43 #include <sys/bus.h>
44 
45 #include <machine/resource.h>
46 #include <machine/bus.h>
47 
48 #include <dev/aac/aacreg.h>
49 #include <sys/aac_ioctl.h>
50 #include <dev/aac/aacvar.h>
51 
52 #ifdef AAC_DEBUG
53 void	aac_printstate0(void);
54 
55 /*
56  * Dump the command queue indices
57  */
58 void
59 aac_print_queues(struct aac_softc *sc)
60 {
61 	device_printf(sc->aac_dev, "FIB queue header at %p  queues at %p\n",
62 	    &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0],
63 	    &sc->aac_queues->qt_HostNormCmdQueue[0]);
64 	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n",
65 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
66 				      AAC_PRODUCER_INDEX],
67 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
68 				      AAC_CONSUMER_INDEX],
69 	    AAC_HOST_NORM_CMD_ENTRIES);
70 	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n",
71 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
72 				      AAC_PRODUCER_INDEX],
73 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
74 				      AAC_CONSUMER_INDEX],
75 	    AAC_HOST_HIGH_CMD_ENTRIES);
76 	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n",
77 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
78 				      AAC_PRODUCER_INDEX],
79 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
80 				      AAC_CONSUMER_INDEX],
81 	    AAC_ADAP_NORM_CMD_ENTRIES);
82 	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n",
83 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
84 				      AAC_PRODUCER_INDEX],
85 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
86 				      AAC_CONSUMER_INDEX],
87 	    AAC_ADAP_HIGH_CMD_ENTRIES);
88 	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n",
89 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
90 				      AAC_PRODUCER_INDEX],
91 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
92 				      AAC_CONSUMER_INDEX],
93 	    AAC_HOST_NORM_RESP_ENTRIES);
94 	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n",
95 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
96 				      AAC_PRODUCER_INDEX],
97 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
98 				      AAC_CONSUMER_INDEX],
99 	    AAC_HOST_HIGH_RESP_ENTRIES);
100 	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n",
101 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
102 				      AAC_PRODUCER_INDEX],
103 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
104 				      AAC_CONSUMER_INDEX],
105 	    AAC_ADAP_NORM_RESP_ENTRIES);
106 	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n",
107 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
108 				      AAC_PRODUCER_INDEX],
109 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
110 				      AAC_CONSUMER_INDEX],
111 	    AAC_ADAP_HIGH_RESP_ENTRIES);
112 	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n",
113 	    sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max);
114 	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n",
115 	    sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max);
116 	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n",
117 	    sc->aac_qstat[AACQ_READY].q_length,
118 	    sc->aac_qstat[AACQ_READY].q_max);
119 	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n",
120 	    sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max);
121 }
122 
123 /*
124  * Print the command queue states for controller 0 (callable from DDB)
125  */
126 void
127 aac_printstate0(void)
128 {
129 	struct aac_softc *sc;
130 
131 	sc = devclass_get_softc(devclass_find("aac"), 0);
132 
133 	aac_print_queues(sc);
134 	switch (sc->aac_hwif) {
135 	case AAC_HWIF_I960RX:
136 		device_printf(sc->aac_dev, "IDBR 0x%08x  IIMR 0x%08x  "
137 		    "IISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_IDBR),
138 		    AAC_GETREG4(sc, AAC_RX_IIMR), AAC_GETREG4(sc, AAC_RX_IISR));
139 		device_printf(sc->aac_dev, "ODBR 0x%08x  OIMR 0x%08x  "
140 		    "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR),
141 		    AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR));
142 		AAC_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY |
143 			    AAC_DB_RESPONSE_READY | AAC_DB_PRINTF)*/);
144 		device_printf(sc->aac_dev, "ODBR 0x%08x  OIMR 0x%08x  "
145 		    "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR),
146 		    AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR));
147 		break;
148 	case AAC_HWIF_STRONGARM:
149 		/* XXX implement */
150 		break;
151 	}
152 }
153 
154 /*
155  * Panic in a slightly informative fashion
156  */
157 void
158 aac_panic(struct aac_softc *sc, char *reason)
159 {
160 	aac_print_queues(sc);
161 	panic(reason);
162 }
163 
164 /*
165  * Print a FIB
166  */
167 void
168 aac_print_fib(struct aac_softc *sc, struct aac_fib *fib, const char *caller)
169 {
170 	if (fib == NULL) {
171 		device_printf(sc->aac_dev,
172 			      "aac_print_fib called with NULL fib\n");
173 		return;
174 	}
175 	device_printf(sc->aac_dev, "%s: FIB @ %p\n", caller, fib);
176 	device_printf(sc->aac_dev, "  XferState %b\n", fib->Header.XferState,
177 		      "\20"
178 		      "\1HOSTOWNED"
179 		      "\2ADAPTEROWNED"
180 		      "\3INITIALISED"
181 		      "\4EMPTY"
182 		      "\5FROMPOOL"
183 		      "\6FROMHOST"
184 		      "\7FROMADAP"
185 		      "\10REXPECTED"
186 		      "\11RNOTEXPECTED"
187 		      "\12DONEADAP"
188 		      "\13DONEHOST"
189 		      "\14HIGH"
190 		      "\15NORM"
191 		      "\16ASYNC"
192 		      "\17PAGEFILEIO"
193 		      "\20SHUTDOWN"
194 		      "\21LAZYWRITE"
195 		      "\22ADAPMICROFIB"
196 		      "\23BIOSFIB"
197 		      "\24FAST_RESPONSE"
198 		      "\25APIFIB\n");
199 	device_printf(sc->aac_dev, "  Command       %d\n", fib->Header.Command);
200 	device_printf(sc->aac_dev, "  StructType    %d\n",
201 		      fib->Header.StructType);
202 	device_printf(sc->aac_dev, "  Flags         0x%x\n", fib->Header.Flags);
203 	device_printf(sc->aac_dev, "  Size          %d\n", fib->Header.Size);
204 	device_printf(sc->aac_dev, "  SenderSize    %d\n",
205 		      fib->Header.SenderSize);
206 	device_printf(sc->aac_dev, "  SenderAddress 0x%x\n",
207 		      fib->Header.SenderFibAddress);
208 	device_printf(sc->aac_dev, "  RcvrAddress   0x%x\n",
209 		      fib->Header.ReceiverFibAddress);
210 	device_printf(sc->aac_dev, "  SenderData    0x%x\n",
211 		      fib->Header.SenderData);
212 	switch(fib->Header.Command) {
213 	case ContainerCommand:
214 	{
215 		struct aac_blockread *br;
216 		struct aac_blockwrite *bw;
217 		struct aac_sg_table *sg;
218 		int i;
219 
220 		br = (struct aac_blockread*)fib->data;
221 		bw = (struct aac_blockwrite*)fib->data;
222 		sg = NULL;
223 
224 		if (br->Command == VM_CtBlockRead) {
225 			device_printf(sc->aac_dev,
226 				      "  BlockRead: container %d  0x%x/%d\n",
227 				      br->ContainerId, br->BlockNumber,
228 				      br->ByteCount);
229 			sg = &br->SgMap;
230 		}
231 		if (bw->Command == VM_CtBlockWrite) {
232 			device_printf(sc->aac_dev,
233 				      "  BlockWrite: container %d  0x%x/%d "
234 				      "(%s)\n", bw->ContainerId,
235 				      bw->BlockNumber, bw->ByteCount,
236 				      bw->Stable == CSTABLE ? "stable" :
237 				      "unstable");
238 			sg = &bw->SgMap;
239 		}
240 		if (sg != NULL) {
241 			device_printf(sc->aac_dev,
242 				      "  %d s/g entries\n", sg->SgCount);
243 			for (i = 0; i < sg->SgCount; i++)
244 				device_printf(sc->aac_dev, "  0x%08x/%d\n",
245 					      sg->SgEntry[i].SgAddress,
246 					      sg->SgEntry[i].SgByteCount);
247 		}
248 		break;
249 	}
250 	default:
251 		device_printf(sc->aac_dev, "   %16D\n", fib->data, " ");
252 		device_printf(sc->aac_dev, "   %16D\n", fib->data + 16, " ");
253 		break;
254 	}
255 }
256 
257 /*
258  * Describe an AIF we have received.
259  */
260 void
261 aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif)
262 {
263 	switch(aif->command) {
264 	case AifCmdEventNotify:
265 		device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber);
266 		switch(aif->data.EN.type) {
267 		case AifEnGeneric:		/* Generic notification */
268 			device_printf(sc->aac_dev, "(Generic) %.*s\n",
269 				  (int)sizeof(aif->data.EN.data.EG),
270 				  aif->data.EN.data.EG.text);
271 			break;
272 		case AifEnTaskComplete:		/* Task has completed */
273 			device_printf(sc->aac_dev, "(TaskComplete)\n");
274 			break;
275 		case AifEnConfigChange:		/* Adapter configuration change
276 						 * occurred */
277 			device_printf(sc->aac_dev, "(ConfigChange)\n");
278 			break;
279 		case AifEnContainerChange:	/* Adapter specific container
280 						 * configuration change */
281 			device_printf(sc->aac_dev, "(ContainerChange) "
282 				      "container %d,%d\n",
283 				      aif->data.EN.data.ECC.container[0],
284 				      aif->data.EN.data.ECC.container[1]);
285 			break;
286 		case AifEnDeviceFailure:	/* SCSI device failed */
287 			device_printf(sc->aac_dev, "(DeviceFailure) "
288 				      "handle %d\n",
289 				      aif->data.EN.data.EDF.deviceHandle);
290 			break;
291 		case AifEnMirrorFailover:	/* Mirror failover started */
292 			device_printf(sc->aac_dev, "(MirrorFailover) "
293 				      "container %d failed, "
294 				      "migrating from slice %d to %d\n",
295 				      aif->data.EN.data.EMF.container,
296 				      aif->data.EN.data.EMF.failedSlice,
297 				      aif->data.EN.data.EMF.creatingSlice);
298 			break;
299 		case AifEnContainerEvent:	/* Significant container
300 						 * event */
301 			device_printf(sc->aac_dev, "(ContainerEvent) "
302 				      "container %d event "
303 				      "%d\n", aif->data.EN.data.ECE.container,
304 				      aif->data.EN.data.ECE.eventType);
305 			break;
306 		case AifEnFileSystemChange:	/* File system changed */
307 			device_printf(sc->aac_dev, "(FileSystemChange)\n");
308 			break;
309 		case AifEnConfigPause:		/* Container pause event */
310 			device_printf(sc->aac_dev, "(ConfigPause)\n");
311 			break;
312 		case AifEnConfigResume:		/* Container resume event */
313 			device_printf(sc->aac_dev, "(ConfigResume)\n");
314 			break;
315 		case AifEnFailoverChange:	/* Failover space assignment
316 						 * changed */
317 			device_printf(sc->aac_dev, "(FailoverChange)\n");
318 			break;
319 		case AifEnRAID5RebuildDone:	/* RAID5 rebuild finished */
320 			device_printf(sc->aac_dev, "(RAID5RebuildDone)\n");
321 			break;
322 		case AifEnEnclosureManagement:	/* Enclosure management event */
323 			device_printf(sc->aac_dev, "(EnclosureManagement) "
324 				      "EMPID %d unit %d "
325 				      "event %d\n", aif->data.EN.data.EEE.empID,
326 				      aif->data.EN.data.EEE.unitID,
327 				      aif->data.EN.data.EEE.eventType);
328 			break;
329 		case AifEnBatteryEvent:		/* Significant NV battery
330 						 * event */
331 			device_printf(sc->aac_dev, "(BatteryEvent) %d "
332 				      "(state was %d, is %d\n",
333 				      aif->data.EN.data.EBE.transition_type,
334 				      aif->data.EN.data.EBE.current_state,
335 				      aif->data.EN.data.EBE.prior_state);
336 			break;
337 		case AifEnAddContainer:		/* A new container was
338 						 * created. */
339 			device_printf(sc->aac_dev, "(AddContainer)\n");
340 			break;
341 		case AifEnDeleteContainer:	/* A container was deleted. */
342 			device_printf(sc->aac_dev, "(DeleteContainer)\n");
343 			break;
344 		case AifEnBatteryNeedsRecond:	/* The battery needs
345 						 * reconditioning */
346 			device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n");
347 			break;
348 		case AifEnClusterEvent:		/* Some cluster event */
349 			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n",
350 				      aif->data.EN.data.ECLE.eventType);
351 			break;
352 		case AifEnDiskSetEvent:		/* A disk set event occured. */
353 			device_printf(sc->aac_dev, "(DiskSetEvent) event %d "
354 				      "diskset %jd creator %jd\n",
355 				      aif->data.EN.data.EDS.eventType,
356 				      (intmax_t)aif->data.EN.data.EDS.DsNum,
357 				      (intmax_t)aif->data.EN.data.EDS.CreatorId);
358 			break;
359 		case AifDenMorphComplete: 	/* A morph operation
360 						 * completed */
361 			device_printf(sc->aac_dev, "(MorphComplete)\n");
362 			break;
363 		case AifDenVolumeExtendComplete: /* A volume expand operation
364 						  * completed */
365 			device_printf(sc->aac_dev, "(VolumeExtendComplete)\n");
366 			break;
367 		default:
368 			device_printf(sc->aac_dev, "(%d)\n", aif->data.EN.type);
369 			break;
370 		}
371 		break;
372 	case AifCmdJobProgress:
373 	{
374 		char	*status;
375 		switch(aif->data.PR[0].status) {
376 		case AifJobStsSuccess:
377 			status = "success"; break;
378 		case AifJobStsFinished:
379 			status = "finished"; break;
380 		case AifJobStsAborted:
381 			status = "aborted"; break;
382 		case AifJobStsFailed:
383 			status = "failed"; break;
384 		case AifJobStsSuspended:
385 			status = "suspended"; break;
386 		case AifJobStsRunning:
387 			status = "running"; break;
388 		default:
389 			status = "unknown status"; break;
390 		}
391 
392 		device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n",
393 			      aif->seqNumber, status,
394 			      aif->data.PR[0].currentTick,
395 			      aif->data.PR[0].finalTick);
396 		switch(aif->data.PR[0].jd.type) {
397 		case AifJobScsiZero:		/* SCSI dev clear operation */
398 			device_printf(sc->aac_dev, "(ScsiZero) handle %d\n",
399 				      aif->data.PR[0].jd.client.scsi_dh);
400 			break;
401 		case AifJobScsiVerify:		/* SCSI device Verify operation
402 						 * NO REPAIR */
403 			device_printf(sc->aac_dev, "(ScsiVerify) handle %d\n",
404 				      aif->data.PR[0].jd.client.scsi_dh);
405 			break;
406 		case AifJobScsiExercise:	/* SCSI device Exercise
407 						 * operation */
408 			device_printf(sc->aac_dev, "(ScsiExercise) handle %d\n",
409 				      aif->data.PR[0].jd.client.scsi_dh);
410 			break;
411 		case AifJobScsiVerifyRepair:	/* SCSI device Verify operation
412 						 * WITH repair */
413 			device_printf(sc->aac_dev,
414 				      "(ScsiVerifyRepair) handle %d\n",
415 				      aif->data.PR[0].jd.client.scsi_dh);
416 			break;
417 		case AifJobCtrZero:		/* Container clear operation */
418 			device_printf(sc->aac_dev,
419 				      "(ContainerZero) container %d\n",
420 				      aif->data.PR[0].jd.client.container.src);
421 			break;
422 		case AifJobCtrCopy:		/* Container copy operation */
423 			device_printf(sc->aac_dev,
424 				      "(ContainerCopy) container %d to %d\n",
425 				      aif->data.PR[0].jd.client.container.src,
426 				      aif->data.PR[0].jd.client.container.dst);
427 			break;
428 		case AifJobCtrCreateMirror:	/* Container Create Mirror
429 						 * operation */
430 			device_printf(sc->aac_dev,
431 				      "(ContainerCreateMirror) container %d\n",
432 				      aif->data.PR[0].jd.client.container.src);
433 				      /* XXX two containers? */
434 			break;
435 		case AifJobCtrMergeMirror:	/* Container Merge Mirror
436 						 * operation */
437 			device_printf(sc->aac_dev,
438 				      "(ContainerMergeMirror) container %d\n",
439 				      aif->data.PR[0].jd.client.container.src);
440 				      /* XXX two containers? */
441 			break;
442 		case AifJobCtrScrubMirror:	/* Container Scrub Mirror
443 						 * operation */
444 			device_printf(sc->aac_dev,
445 				      "(ContainerScrubMirror) container %d\n",
446 				      aif->data.PR[0].jd.client.container.src);
447 			break;
448 		case AifJobCtrRebuildRaid5:	/* Container Rebuild Raid5
449 						 * operation */
450 			device_printf(sc->aac_dev,
451 				      "(ContainerRebuildRaid5) container %d\n",
452 				      aif->data.PR[0].jd.client.container.src);
453 			break;
454 		case AifJobCtrScrubRaid5:	/* Container Scrub Raid5
455 						 * operation */
456 			device_printf(sc->aac_dev,
457 				      "(ContainerScrubRaid5) container %d\n",
458 				      aif->data.PR[0].jd.client.container.src);
459 			break;
460 		case AifJobCtrMorph:		/* Container morph operation */
461 			device_printf(sc->aac_dev,
462 				      "(ContainerMorph) container %d\n",
463 				      aif->data.PR[0].jd.client.container.src);
464 				      /* XXX two containers? */
465 			break;
466 		case AifJobCtrPartCopy:		/* Container Partition copy
467 						 * operation */
468 			device_printf(sc->aac_dev,
469 				      "(ContainerPartCopy) container %d to "
470 				      "%d\n",
471 				      aif->data.PR[0].jd.client.container.src,
472 				      aif->data.PR[0].jd.client.container.dst);
473 			break;
474 		case AifJobCtrRebuildMirror:	/* Container Rebuild Mirror
475 						 * operation */
476 			device_printf(sc->aac_dev,
477 				      "(ContainerRebuildMirror) container "
478 				      "%d\n",
479 				      aif->data.PR[0].jd.client.container.src);
480 			break;
481 		case AifJobCtrCrazyCache:	/* crazy cache */
482 			device_printf(sc->aac_dev,
483 				      "(ContainerCrazyCache) container %d\n",
484 				      aif->data.PR[0].jd.client.container.src);
485 				      /* XXX two containers? */
486 			break;
487 		case AifJobFsCreate:		/* File System Create
488 						 * operation */
489 			device_printf(sc->aac_dev, "(FsCreate)\n");
490 			break;
491 		case AifJobFsVerify:		/* File System Verify
492 						 * operation */
493 			device_printf(sc->aac_dev, "(FsVerivy)\n");
494 			break;
495 		case AifJobFsExtend:		/* File System Extend
496 						 * operation */
497 			device_printf(sc->aac_dev, "(FsExtend)\n");
498 			break;
499 		case AifJobApiFormatNTFS:	/* Format a drive to NTFS */
500 			device_printf(sc->aac_dev, "(FormatNTFS)\n");
501 			break;
502 		case AifJobApiFormatFAT:	/* Format a drive to FAT */
503 			device_printf(sc->aac_dev, "(FormatFAT)\n");
504 			break;
505 		case AifJobApiUpdateSnapshot:	/* update the read/write half
506 						 * of a snapshot */
507 			device_printf(sc->aac_dev, "(UpdateSnapshot)\n");
508 			break;
509 		case AifJobApiFormatFAT32:	/* Format a drive to FAT32 */
510 			device_printf(sc->aac_dev, "(FormatFAT32)\n");
511 			break;
512 		case AifJobCtlContinuousCtrVerify: /* Adapter operation */
513 			device_printf(sc->aac_dev, "(ContinuousCtrVerify)\n");
514 			break;
515 		default:
516 			device_printf(sc->aac_dev, "(%d)\n",
517 				      aif->data.PR[0].jd.type);
518 			break;
519 		}
520 		break;
521 	}
522 	case AifCmdAPIReport:
523 		device_printf(sc->aac_dev, "APIReport (%d)\n", aif->seqNumber);
524 		break;
525 	case AifCmdDriverNotify:
526 		device_printf(sc->aac_dev, "DriverNotify (%d)\n",
527 			      aif->seqNumber);
528 		break;
529 	default:
530 		device_printf(sc->aac_dev, "AIF %d (%d)\n", aif->command,
531 			      aif->seqNumber);
532 		break;
533 	}
534 }
535 #endif /* AAC_DEBUG */
536