2 * Copyright (c) 1997-2006 by Matthew Jacob
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. The name of the author may not be used to endorse or promote products
12 * derived from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
18 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
31 #include <sys/cdefs.h>
32 __FBSDID("$FreeBSD$");
34 #include <sys/param.h>
35 #include <sys/systm.h>
36 #include <sys/linker.h>
37 #include <sys/firmware.h>
39 #include <sys/kernel.h>
40 #include <sys/module.h>
41 #include <sys/resource.h>
43 #include <dev/ofw/ofw_bus.h>
44 #include <dev/ofw/openfirm.h>
46 #include <machine/bus.h>
47 #include <machine/ofw_machdep.h>
48 #include <machine/resource.h>
50 #include <sparc64/sbus/sbusvar.h>
52 #include <dev/isp/isp_freebsd.h>
54 static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int);
55 static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t);
56 static void isp_sbus_run_isr(ispsoftc_t *);
57 static int isp_sbus_mbxdma(ispsoftc_t *);
58 static void isp_sbus_mbxdmafree(ispsoftc_t *);
59 static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *);
60 static void isp_sbus_dumpregs(ispsoftc_t *, const char *);
62 static struct ispmdvec mdvec = {
68 isp_common_dmateardown,
72 BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64
75 static int isp_sbus_probe (device_t);
76 static int isp_sbus_attach (device_t);
77 static int isp_sbus_detach (device_t);
80 #define ISP_SBD(isp) ((struct isp_sbussoftc *)isp)->sbus_dev
81 struct isp_sbussoftc {
84 struct resource * regs;
89 int16_t sbus_poff[_NREG_BLKS];
91 struct isp_spi sbus_spi;
92 struct ispmdvec sbus_mdvec;
96 static device_method_t isp_sbus_methods[] = {
97 /* Device interface */
98 DEVMETHOD(device_probe, isp_sbus_probe),
99 DEVMETHOD(device_attach, isp_sbus_attach),
100 DEVMETHOD(device_detach, isp_sbus_detach),
104 static driver_t isp_sbus_driver = {
105 "isp", isp_sbus_methods, sizeof (struct isp_sbussoftc)
107 static devclass_t isp_devclass;
108 DRIVER_MODULE(isp, sbus, isp_sbus_driver, isp_devclass, 0, 0);
109 MODULE_DEPEND(isp, cam, 1, 1, 1);
110 MODULE_DEPEND(isp, firmware, 1, 1, 1);
113 isp_sbus_probe(device_t dev)
116 const char *name = ofw_bus_get_name(dev);
117 if (strcmp(name, "SUNW,isp") == 0 ||
118 strcmp(name, "QLGC,isp") == 0 ||
119 strcmp(name, "ptisp") == 0 ||
120 strcmp(name, "PTI,ptisp") == 0) {
126 if (isp_announced == 0 && bootverbose) {
127 printf("Qlogic ISP Driver, FreeBSD Version %d.%d, "
128 "Core Version %d.%d\n",
129 ISP_PLATFORM_VERSION_MAJOR, ISP_PLATFORM_VERSION_MINOR,
130 ISP_CORE_VERSION_MAJOR, ISP_CORE_VERSION_MINOR);
137 isp_sbus_attach(device_t dev)
139 struct isp_sbussoftc *sbs = device_get_softc(dev);
140 ispsoftc_t *isp = &sbs->sbus_isp;
141 int tval, isp_debug, role, ispburst, default_id;
144 sbs->sbus_mdvec = mdvec;
146 mtx_init(&isp->isp_lock, "isp", NULL, MTX_DEF);
149 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
150 "role", &role) == 0 &&
151 ((role & ~(ISP_ROLE_INITIATOR|ISP_ROLE_TARGET)) == 0)) {
152 device_printf(dev, "setting role to 0x%x\n", role);
154 role = ISP_DEFAULT_ROLES;
157 sbs->irq = sbs->regs = NULL;
158 sbs->rgd = sbs->iqd = 0;
160 sbs->regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sbs->rgd,
162 if (sbs->regs == NULL) {
163 device_printf(dev, "unable to map registers\n");
167 sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF;
168 sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF;
169 sbs->sbus_poff[SXP_BLOCK >> _BLK_REG_SHFT] = SBUS_SXP_REGS_OFF;
170 sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF;
171 sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF;
172 isp->isp_regs = sbs->regs;
173 isp->isp_mdvec = &sbs->sbus_mdvec;
174 isp->isp_bustype = ISP_BT_SBUS;
175 isp->isp_type = ISP_HA_SCSI_UNKNOWN;
176 isp->isp_param = &sbs->sbus_param;
177 isp->isp_osinfo.pc.ptr = &sbs->sbus_spi;
178 isp->isp_revision = 0; /* XXX */
181 ISP_FC_PC(isp, 0)->def_role = role;
184 * Get the clock frequency and convert it from HZ to MHz,
185 * rounding up. This defaults to 25MHz if there isn't a
186 * device specific one in the OFW device tree.
188 sbs->sbus_mdvec.dv_clock = (sbus_get_clockfreq(dev) + 500000)/1000000;
191 * Now figure out what the proper burst sizes, etc., to use.
192 * Unfortunately, there is no ddi_dma_burstsizes here which
193 * walks up the tree finding the limiting burst size node (if
194 * any). We just use what's here for isp.
196 ispburst = sbus_get_burstsz(dev);
198 ispburst = SBUS_BURST_32 - 1;
200 sbs->sbus_mdvec.dv_conf1 = 0;
201 if (ispburst & (1 << 5)) {
202 sbs->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_32;
203 } else if (ispburst & (1 << 4)) {
204 sbs->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_16;
205 } else if (ispburst & (1 << 3)) {
206 sbs->sbus_mdvec.dv_conf1 =
207 BIU_SBUS_CONF1_BURST8 | BIU_SBUS_CONF1_FIFO_8;
209 if (sbs->sbus_mdvec.dv_conf1) {
210 sbs->sbus_mdvec.dv_conf1 |= BIU_BURST_ENABLE;
214 * We don't trust NVRAM on SBus cards
216 isp->isp_confopts |= ISP_CFG_NONVRAM;
219 * Mark things if we're a PTI SBus adapter.
221 if (strcmp("PTI,ptisp", ofw_bus_get_name(dev)) == 0 ||
222 strcmp("ptisp", ofw_bus_get_name(dev)) == 0) {
223 SDPARAM(isp, 0)->isp_ptisp = 1;
226 isp->isp_osinfo.fw = firmware_get("isp_1000");
227 if (isp->isp_osinfo.fw) {
232 stupid.cp = isp->isp_osinfo.fw->data;
233 isp->isp_mdvec->dv_ispfw = stupid.sp;
237 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
238 "fwload_disable", &tval) == 0 && tval != 0) {
239 isp->isp_confopts |= ISP_CFG_NORELOAD;
243 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
244 "iid", &tval) == 0) {
246 isp->isp_confopts |= ISP_CFG_OWNLOOPID;
248 if (default_id == -1) {
249 default_id = OF_getscsinitid(dev);
251 ISP_SPI_PC(isp, 0)->iid = default_id;
254 (void) resource_int_value(device_get_name(dev), device_get_unit(dev),
255 "debug", &isp_debug);
257 sbs->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sbs->iqd,
258 RF_ACTIVE | RF_SHAREABLE);
259 if (sbs->irq == NULL) {
260 device_printf(dev, "could not allocate interrupt\n");
264 if (bus_setup_intr(dev, sbs->irq, ISP_IFLAGS, NULL, isp_platform_intr,
266 device_printf(dev, "could not setup interrupt\n");
267 (void) bus_release_resource(dev, SYS_RES_IRQ,
274 * Set up logging levels.
277 isp->isp_dblev = isp_debug;
279 isp->isp_dblev = ISP_LOGWARN|ISP_LOGERR;
282 isp->isp_dblev |= ISP_LOGCONFIG|ISP_LOGINFO;
286 * Make sure we're in reset state.
289 if (isp_reinit(isp, 1) != 0) {
294 if (isp_attach(isp)) {
303 if (isp->isp_nirq > 0) {
304 (void) bus_teardown_intr(dev, sbs->irq, sbs->ih);
305 (void) bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd,
310 (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd,
313 mtx_destroy(&isp->isp_lock);
318 isp_sbus_detach(device_t dev)
320 struct isp_sbussoftc *sbs = device_get_softc(dev);
321 ispsoftc_t *isp = &sbs->sbus_isp;
324 status = isp_detach(isp);
330 if (isp->isp_nirq > 0) {
331 (void) bus_teardown_intr(dev, sbs->irq, sbs->ih);
332 (void) bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd,
335 (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd, sbs->regs);
336 isp_sbus_mbxdmafree(isp);
337 mtx_destroy(&isp->isp_lock);
341 #define IspVirt2Off(a, x) \
342 (((struct isp_sbussoftc *)a)->sbus_poff[((x) & _BLK_REG_MASK) >> \
343 _BLK_REG_SHFT] + ((x) & 0xff))
345 #define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off))
348 isp_sbus_run_isr(ispsoftc_t *isp)
350 uint16_t isr, sema, info;
352 isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR));
353 sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA));
354 isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema);
355 isr &= INT_PENDING_MASK(isp);
356 sema &= BIU_SEMA_LOCK;
357 if (isr == 0 && sema == 0)
360 info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0));
361 if (info & MBOX_COMMAND_COMPLETE)
362 isp_intr_mbox(isp, info);
364 isp_intr_async(isp, info);
365 if (isp->isp_state == ISP_RUNSTATE)
369 ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT);
371 ISP_WRITE(isp, BIU_SEMA, 0);
375 isp_sbus_rd_reg(ispsoftc_t *isp, int regoff)
378 struct isp_sbussoftc *sbs = (struct isp_sbussoftc *) isp;
379 int offset = sbs->sbus_poff[(regoff & _BLK_REG_MASK) >> _BLK_REG_SHFT];
380 offset += (regoff & 0xff);
381 rval = BXR2(isp, offset);
382 isp_prt(isp, ISP_LOGDEBUG3,
383 "isp_sbus_rd_reg(off %x) = %x", regoff, rval);
388 isp_sbus_wr_reg(ispsoftc_t *isp, int regoff, uint32_t val)
390 struct isp_sbussoftc *sbs = (struct isp_sbussoftc *) isp;
391 int offset = sbs->sbus_poff[(regoff & _BLK_REG_MASK) >> _BLK_REG_SHFT];
392 offset += (regoff & 0xff);
393 isp_prt(isp, ISP_LOGDEBUG3,
394 "isp_sbus_wr_reg(off %x) = %x", regoff, val);
395 bus_write_2(isp->isp_regs, offset, val);
396 MEMORYBARRIER(isp, SYNC_REG, offset, 2, -1);
404 static void imc(void *, bus_dma_segment_t *, int, int);
407 imc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
409 struct imush *imushp = (struct imush *) arg;
411 if (!(imushp->error = error))
412 imushp->maddr = segs[0].ds_addr;
416 isp_sbus_mbxdma(ispsoftc_t *isp)
423 /* Already been here? If so, leave... */
424 if (isp->isp_xflist != NULL)
426 if (isp->isp_rquest != NULL && isp->isp_maxcmds == 0)
429 if (isp->isp_rquest != NULL)
432 if (bus_dma_tag_create(bus_get_dma_tag(ISP_SBD(isp)), 1,
433 BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT,
434 BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT,
435 ISP_NSEG_MAX, BUS_SPACE_MAXADDR_24BIT, 0,
436 busdma_lock_mutex, &isp->isp_lock, &isp->isp_osinfo.dmat)) {
437 isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
442 * Allocate and map the request queue.
444 len = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp));
445 if (bus_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT+1,
446 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
447 len, 1, len, 0, busdma_lock_mutex, &isp->isp_lock,
448 &isp->isp_osinfo.reqdmat)) {
449 isp_prt(isp, ISP_LOGERR, "cannot create request DMA tag");
452 if (bus_dmamem_alloc(isp->isp_osinfo.reqdmat, (void **)&base,
453 BUS_DMA_COHERENT, &isp->isp_osinfo.reqmap) != 0) {
454 isp_prt(isp, ISP_LOGERR, "cannot allocate request DMA memory");
455 bus_dma_tag_destroy(isp->isp_osinfo.reqdmat);
458 isp->isp_rquest = base;
460 if (bus_dmamap_load(isp->isp_osinfo.reqdmat, isp->isp_osinfo.reqmap,
461 base, len, imc, &im, 0) || im.error) {
462 isp_prt(isp, ISP_LOGERR, "error loading request DMA map %d", im.error);
465 isp_prt(isp, ISP_LOGDEBUG0, "request area @ 0x%jx/0x%jx",
466 (uintmax_t)im.maddr, (uintmax_t)len);
467 isp->isp_rquest_dma = im.maddr;
470 * Allocate and map the result queue.
472 len = ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
473 if (bus_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT+1,
474 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
475 len, 1, len, 0, busdma_lock_mutex, &isp->isp_lock,
476 &isp->isp_osinfo.respdmat)) {
477 isp_prt(isp, ISP_LOGERR, "cannot create response DMA tag");
480 if (bus_dmamem_alloc(isp->isp_osinfo.respdmat, (void **)&base,
481 BUS_DMA_COHERENT, &isp->isp_osinfo.respmap) != 0) {
482 isp_prt(isp, ISP_LOGERR, "cannot allocate response DMA memory");
483 bus_dma_tag_destroy(isp->isp_osinfo.respdmat);
486 isp->isp_result = base;
488 if (bus_dmamap_load(isp->isp_osinfo.respdmat, isp->isp_osinfo.respmap,
489 base, len, imc, &im, 0) || im.error) {
490 isp_prt(isp, ISP_LOGERR, "error loading response DMA map %d", im.error);
493 isp_prt(isp, ISP_LOGDEBUG0, "response area @ 0x%jx/0x%jx",
494 (uintmax_t)im.maddr, (uintmax_t)len);
495 isp->isp_result_dma = im.maddr;
497 if (isp->isp_maxcmds == 0) {
503 len = sizeof (struct isp_pcmd) * isp->isp_maxcmds;
504 isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *)
505 malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
506 for (i = 0; i < isp->isp_maxcmds; i++) {
507 struct isp_pcmd *pcmd = &isp->isp_osinfo.pcmd_pool[i];
508 error = bus_dmamap_create(isp->isp_osinfo.dmat, 0, &pcmd->dmap);
510 isp_prt(isp, ISP_LOGERR,
511 "error %d creating per-cmd DMA maps", error);
513 bus_dmamap_destroy(isp->isp_osinfo.dmat,
514 isp->isp_osinfo.pcmd_pool[i].dmap);
518 callout_init_mtx(&pcmd->wdog, &isp->isp_lock, 0);
519 if (i == isp->isp_maxcmds-1) {
522 pcmd->next = &isp->isp_osinfo.pcmd_pool[i+1];
525 isp->isp_osinfo.pcmd_free = &isp->isp_osinfo.pcmd_pool[0];
527 len = sizeof (isp_hdl_t *) * isp->isp_maxcmds;
528 isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
529 for (len = 0; len < isp->isp_maxcmds - 1; len++)
530 isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1];
531 isp->isp_xffree = isp->isp_xflist;
537 isp_sbus_mbxdmafree(isp);
543 isp_sbus_mbxdmafree(ispsoftc_t *isp)
547 if (isp->isp_xflist != NULL) {
548 free(isp->isp_xflist, M_DEVBUF);
549 isp->isp_xflist = NULL;
551 if (isp->isp_osinfo.pcmd_pool != NULL) {
552 for (i = 0; i < isp->isp_maxcmds; i++) {
553 bus_dmamap_destroy(isp->isp_osinfo.dmat,
554 isp->isp_osinfo.pcmd_pool[i].dmap);
556 free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);
557 isp->isp_osinfo.pcmd_pool = NULL;
559 if (isp->isp_result_dma != 0) {
560 bus_dmamap_unload(isp->isp_osinfo.respdmat,
561 isp->isp_osinfo.respmap);
562 isp->isp_result_dma = 0;
564 if (isp->isp_result != NULL) {
565 bus_dmamem_free(isp->isp_osinfo.respdmat, isp->isp_result,
566 isp->isp_osinfo.respmap);
567 bus_dma_tag_destroy(isp->isp_osinfo.respdmat);
568 isp->isp_result = NULL;
570 if (isp->isp_rquest_dma != 0) {
571 bus_dmamap_unload(isp->isp_osinfo.reqdmat,
572 isp->isp_osinfo.reqmap);
573 isp->isp_rquest_dma = 0;
575 if (isp->isp_rquest != NULL) {
576 bus_dmamem_free(isp->isp_osinfo.reqdmat, isp->isp_rquest,
577 isp->isp_osinfo.reqmap);
578 bus_dma_tag_destroy(isp->isp_osinfo.reqdmat);
579 isp->isp_rquest = NULL;
586 void *rq; /* original request */
590 #define MUSHERR_NOQENTRIES -2
593 dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
595 mush_t *mp = (mush_t *) arg;
596 ispsoftc_t *isp = mp->isp;
597 struct ccb_scsiio *csio = mp->cmd_token;
608 if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
609 ddir = ISP_FROM_DEVICE;
611 ddir = ISP_TO_DEVICE;
613 if ((csio->ccb_h.func_code == XPT_CONT_TARGET_IO) ^
614 ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)) {
615 sdir = BUS_DMASYNC_PREREAD;
617 sdir = BUS_DMASYNC_PREWRITE;
619 bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap,
623 if (isp_send_cmd(isp, mp->rq, dm_segs, nseg, XS_XFRLEN(csio),
624 ddir, NULL) != CMD_QUEUED) {
625 mp->error = MUSHERR_NOQENTRIES;
630 isp_sbus_dmasetup(ispsoftc_t *isp, struct ccb_scsiio *csio, void *ff)
637 mp->cmd_token = csio;
641 error = bus_dmamap_load_ccb(isp->isp_osinfo.dmat,
642 PISP_PCMD(csio)->dmap, (union ccb *)csio, dma2, mp, 0);
643 if (error == EINPROGRESS) {
644 bus_dmamap_unload(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap);
646 isp_prt(isp, ISP_LOGERR,
647 "deferred dma allocation not supported");
648 } else if (error && mp->error == 0) {
650 isp_prt(isp, ISP_LOGERR, "error %d in dma mapping code", error);
655 int retval = CMD_COMPLETE;
656 if (mp->error == MUSHERR_NOQENTRIES) {
658 } else if (mp->error == EFBIG) {
659 XS_SETERR(csio, CAM_REQ_TOO_BIG);
660 } else if (mp->error == EINVAL) {
661 XS_SETERR(csio, CAM_REQ_INVALID);
663 XS_SETERR(csio, CAM_UNREC_HBA_ERROR);
671 isp_sbus_dumpregs(ispsoftc_t *isp, const char *msg)
674 printf("%s: %s\n", device_get_nameunit(isp->isp_dev), msg);
676 printf("%s:\n", device_get_nameunit(isp->isp_dev));
677 printf(" biu_conf1=%x", ISP_READ(isp, BIU_CONF1));
678 printf(" biu_icr=%x biu_isr=%x biu_sema=%x ", ISP_READ(isp, BIU_ICR),
679 ISP_READ(isp, BIU_ISR), ISP_READ(isp, BIU_SEMA));
680 printf("risc_hccr=%x\n", ISP_READ(isp, HCCR));
683 ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE);
684 printf(" cdma_conf=%x cdma_sts=%x cdma_fifostat=%x\n",
685 ISP_READ(isp, CDMA_CONF), ISP_READ(isp, CDMA_STATUS),
686 ISP_READ(isp, CDMA_FIFO_STS));
687 printf(" ddma_conf=%x ddma_sts=%x ddma_fifostat=%x\n",
688 ISP_READ(isp, DDMA_CONF), ISP_READ(isp, DDMA_STATUS),
689 ISP_READ(isp, DDMA_FIFO_STS));
690 printf(" sxp_int=%x sxp_gross=%x sxp(scsi_ctrl)=%x\n",
691 ISP_READ(isp, SXP_INTERRUPT),
692 ISP_READ(isp, SXP_GROSS_ERR),
693 ISP_READ(isp, SXP_PINS_CTRL));
694 ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE);
695 printf(" mbox regs: %x %x %x %x %x\n",
696 ISP_READ(isp, OUTMAILBOX0), ISP_READ(isp, OUTMAILBOX1),
697 ISP_READ(isp, OUTMAILBOX2), ISP_READ(isp, OUTMAILBOX3),
698 ISP_READ(isp, OUTMAILBOX4));