2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 * Copyright (c) 1997-2006 by Matthew Jacob
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice immediately at the beginning of the file, without modification,
12 * this list of conditions, and the following disclaimer.
13 * 2. The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
33 #include <sys/cdefs.h>
34 __FBSDID("$FreeBSD$");
36 #include <sys/param.h>
37 #include <sys/systm.h>
38 #include <sys/linker.h>
39 #include <sys/firmware.h>
41 #include <sys/kernel.h>
42 #include <sys/module.h>
43 #include <sys/resource.h>
45 #include <dev/ofw/ofw_bus.h>
46 #include <dev/ofw/openfirm.h>
48 #include <machine/bus.h>
49 #include <machine/ofw_machdep.h>
50 #include <machine/resource.h>
52 #include <sparc64/sbus/sbusvar.h>
54 #include <dev/isp/isp_freebsd.h>
56 static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int);
57 static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t);
58 static void isp_sbus_run_isr(ispsoftc_t *);
59 static int isp_sbus_mbxdma(ispsoftc_t *);
60 static void isp_sbus_mbxdmafree(ispsoftc_t *);
61 static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *);
62 static void isp_sbus_dumpregs(ispsoftc_t *, const char *);
64 static struct ispmdvec mdvec = {
70 isp_common_dmateardown,
74 BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64
77 static int isp_sbus_probe (device_t);
78 static int isp_sbus_attach (device_t);
79 static int isp_sbus_detach (device_t);
82 #define ISP_SBD(isp) ((struct isp_sbussoftc *)isp)->sbus_dev
83 struct isp_sbussoftc {
86 struct resource * regs;
91 int16_t sbus_poff[_NREG_BLKS];
93 struct isp_spi sbus_spi;
94 struct ispmdvec sbus_mdvec;
98 static device_method_t isp_sbus_methods[] = {
99 /* Device interface */
100 DEVMETHOD(device_probe, isp_sbus_probe),
101 DEVMETHOD(device_attach, isp_sbus_attach),
102 DEVMETHOD(device_detach, isp_sbus_detach),
106 static driver_t isp_sbus_driver = {
107 "isp", isp_sbus_methods, sizeof (struct isp_sbussoftc)
109 static devclass_t isp_devclass;
110 DRIVER_MODULE(isp, sbus, isp_sbus_driver, isp_devclass, 0, 0);
111 MODULE_DEPEND(isp, cam, 1, 1, 1);
112 MODULE_DEPEND(isp, firmware, 1, 1, 1);
115 isp_sbus_probe(device_t dev)
118 const char *name = ofw_bus_get_name(dev);
119 if (strcmp(name, "SUNW,isp") == 0 ||
120 strcmp(name, "QLGC,isp") == 0 ||
121 strcmp(name, "ptisp") == 0 ||
122 strcmp(name, "PTI,ptisp") == 0) {
128 if (isp_announced == 0 && bootverbose) {
129 printf("Qlogic ISP Driver, FreeBSD Version %d.%d, "
130 "Core Version %d.%d\n",
131 ISP_PLATFORM_VERSION_MAJOR, ISP_PLATFORM_VERSION_MINOR,
132 ISP_CORE_VERSION_MAJOR, ISP_CORE_VERSION_MINOR);
139 isp_sbus_attach(device_t dev)
141 struct isp_sbussoftc *sbs = device_get_softc(dev);
142 ispsoftc_t *isp = &sbs->sbus_isp;
143 int tval, isp_debug, role, ispburst, default_id;
146 sbs->sbus_mdvec = mdvec;
148 mtx_init(&isp->isp_lock, "isp", NULL, MTX_DEF);
151 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
152 "role", &role) == 0 &&
153 ((role & ~(ISP_ROLE_INITIATOR|ISP_ROLE_TARGET)) == 0)) {
154 device_printf(dev, "setting role to 0x%x\n", role);
156 role = ISP_DEFAULT_ROLES;
159 sbs->irq = sbs->regs = NULL;
160 sbs->rgd = sbs->iqd = 0;
162 sbs->regs = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sbs->rgd,
164 if (sbs->regs == NULL) {
165 device_printf(dev, "unable to map registers\n");
169 sbs->sbus_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF;
170 sbs->sbus_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = SBUS_MBOX_REGS_OFF;
171 sbs->sbus_poff[SXP_BLOCK >> _BLK_REG_SHFT] = SBUS_SXP_REGS_OFF;
172 sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF;
173 sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF;
174 isp->isp_regs = sbs->regs;
175 isp->isp_mdvec = &sbs->sbus_mdvec;
176 isp->isp_bustype = ISP_BT_SBUS;
177 isp->isp_type = ISP_HA_SCSI_UNKNOWN;
178 isp->isp_param = &sbs->sbus_param;
179 isp->isp_osinfo.pc.ptr = &sbs->sbus_spi;
180 isp->isp_revision = 0; /* XXX */
183 ISP_FC_PC(isp, 0)->def_role = role;
186 * Get the clock frequency and convert it from HZ to MHz,
187 * rounding up. This defaults to 25MHz if there isn't a
188 * device specific one in the OFW device tree.
190 sbs->sbus_mdvec.dv_clock = (sbus_get_clockfreq(dev) + 500000)/1000000;
193 * Now figure out what the proper burst sizes, etc., to use.
194 * Unfortunately, there is no ddi_dma_burstsizes here which
195 * walks up the tree finding the limiting burst size node (if
196 * any). We just use what's here for isp.
198 ispburst = sbus_get_burstsz(dev);
200 ispburst = SBUS_BURST_32 - 1;
202 sbs->sbus_mdvec.dv_conf1 = 0;
203 if (ispburst & (1 << 5)) {
204 sbs->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_32;
205 } else if (ispburst & (1 << 4)) {
206 sbs->sbus_mdvec.dv_conf1 = BIU_SBUS_CONF1_FIFO_16;
207 } else if (ispburst & (1 << 3)) {
208 sbs->sbus_mdvec.dv_conf1 =
209 BIU_SBUS_CONF1_BURST8 | BIU_SBUS_CONF1_FIFO_8;
211 if (sbs->sbus_mdvec.dv_conf1) {
212 sbs->sbus_mdvec.dv_conf1 |= BIU_BURST_ENABLE;
216 * We don't trust NVRAM on SBus cards
218 isp->isp_confopts |= ISP_CFG_NONVRAM;
221 * Mark things if we're a PTI SBus adapter.
223 if (strcmp("PTI,ptisp", ofw_bus_get_name(dev)) == 0 ||
224 strcmp("ptisp", ofw_bus_get_name(dev)) == 0) {
225 SDPARAM(isp, 0)->isp_ptisp = 1;
228 isp->isp_osinfo.fw = firmware_get("isp_1000");
229 if (isp->isp_osinfo.fw) {
234 stupid.cp = isp->isp_osinfo.fw->data;
235 isp->isp_mdvec->dv_ispfw = stupid.sp;
239 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
240 "fwload_disable", &tval) == 0 && tval != 0) {
241 isp->isp_confopts |= ISP_CFG_NORELOAD;
245 if (resource_int_value(device_get_name(dev), device_get_unit(dev),
246 "iid", &tval) == 0) {
248 isp->isp_confopts |= ISP_CFG_OWNLOOPID;
250 if (default_id == -1) {
251 default_id = OF_getscsinitid(dev);
253 ISP_SPI_PC(isp, 0)->iid = default_id;
256 (void) resource_int_value(device_get_name(dev), device_get_unit(dev),
257 "debug", &isp_debug);
259 sbs->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sbs->iqd,
260 RF_ACTIVE | RF_SHAREABLE);
261 if (sbs->irq == NULL) {
262 device_printf(dev, "could not allocate interrupt\n");
266 if (bus_setup_intr(dev, sbs->irq, ISP_IFLAGS, NULL, isp_platform_intr,
268 device_printf(dev, "could not setup interrupt\n");
269 (void) bus_release_resource(dev, SYS_RES_IRQ,
276 * Set up logging levels.
279 isp->isp_dblev = isp_debug;
281 isp->isp_dblev = ISP_LOGWARN|ISP_LOGERR;
284 isp->isp_dblev |= ISP_LOGCONFIG|ISP_LOGINFO;
288 * Make sure we're in reset state.
291 if (isp_reinit(isp, 1) != 0) {
296 if (isp_attach(isp)) {
305 if (isp->isp_nirq > 0) {
306 (void) bus_teardown_intr(dev, sbs->irq, sbs->ih);
307 (void) bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd,
312 (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd,
315 mtx_destroy(&isp->isp_lock);
320 isp_sbus_detach(device_t dev)
322 struct isp_sbussoftc *sbs = device_get_softc(dev);
323 ispsoftc_t *isp = &sbs->sbus_isp;
326 status = isp_detach(isp);
332 if (isp->isp_nirq > 0) {
333 (void) bus_teardown_intr(dev, sbs->irq, sbs->ih);
334 (void) bus_release_resource(dev, SYS_RES_IRQ, sbs->iqd,
337 (void) bus_release_resource(dev, SYS_RES_MEMORY, sbs->rgd, sbs->regs);
338 isp_sbus_mbxdmafree(isp);
339 mtx_destroy(&isp->isp_lock);
343 #define IspVirt2Off(a, x) \
344 (((struct isp_sbussoftc *)a)->sbus_poff[((x) & _BLK_REG_MASK) >> \
345 _BLK_REG_SHFT] + ((x) & 0xff))
347 #define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off))
350 isp_sbus_run_isr(ispsoftc_t *isp)
352 uint16_t isr, sema, info;
354 isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR));
355 sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA));
356 isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema);
357 isr &= INT_PENDING_MASK(isp);
358 sema &= BIU_SEMA_LOCK;
359 if (isr == 0 && sema == 0)
362 info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0));
363 if (info & MBOX_COMMAND_COMPLETE)
364 isp_intr_mbox(isp, info);
366 isp_intr_async(isp, info);
367 if (isp->isp_state == ISP_RUNSTATE)
371 ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT);
373 ISP_WRITE(isp, BIU_SEMA, 0);
377 isp_sbus_rd_reg(ispsoftc_t *isp, int regoff)
380 struct isp_sbussoftc *sbs = (struct isp_sbussoftc *) isp;
381 int offset = sbs->sbus_poff[(regoff & _BLK_REG_MASK) >> _BLK_REG_SHFT];
382 offset += (regoff & 0xff);
383 rval = BXR2(isp, offset);
384 isp_prt(isp, ISP_LOGDEBUG3,
385 "isp_sbus_rd_reg(off %x) = %x", regoff, rval);
390 isp_sbus_wr_reg(ispsoftc_t *isp, int regoff, uint32_t val)
392 struct isp_sbussoftc *sbs = (struct isp_sbussoftc *) isp;
393 int offset = sbs->sbus_poff[(regoff & _BLK_REG_MASK) >> _BLK_REG_SHFT];
394 offset += (regoff & 0xff);
395 isp_prt(isp, ISP_LOGDEBUG3,
396 "isp_sbus_wr_reg(off %x) = %x", regoff, val);
397 bus_write_2(isp->isp_regs, offset, val);
398 MEMORYBARRIER(isp, SYNC_REG, offset, 2, -1);
406 static void imc(void *, bus_dma_segment_t *, int, int);
409 imc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
411 struct imush *imushp = (struct imush *) arg;
413 if (!(imushp->error = error))
414 imushp->maddr = segs[0].ds_addr;
418 isp_sbus_mbxdma(ispsoftc_t *isp)
425 /* Already been here? If so, leave... */
426 if (isp->isp_xflist != NULL)
428 if (isp->isp_rquest != NULL && isp->isp_maxcmds == 0)
431 if (isp->isp_rquest != NULL)
434 if (bus_dma_tag_create(bus_get_dma_tag(ISP_SBD(isp)), 1,
435 BUS_SPACE_MAXADDR_24BIT+1, BUS_SPACE_MAXADDR_32BIT,
436 BUS_SPACE_MAXADDR_32BIT, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT,
437 ISP_NSEG_MAX, BUS_SPACE_MAXADDR_24BIT, 0,
438 busdma_lock_mutex, &isp->isp_lock, &isp->isp_osinfo.dmat)) {
439 isp_prt(isp, ISP_LOGERR, "could not create master dma tag");
444 * Allocate and map the request queue.
446 len = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp));
447 if (bus_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT+1,
448 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
449 len, 1, len, 0, busdma_lock_mutex, &isp->isp_lock,
450 &isp->isp_osinfo.reqdmat)) {
451 isp_prt(isp, ISP_LOGERR, "cannot create request DMA tag");
454 if (bus_dmamem_alloc(isp->isp_osinfo.reqdmat, (void **)&base,
455 BUS_DMA_COHERENT, &isp->isp_osinfo.reqmap) != 0) {
456 isp_prt(isp, ISP_LOGERR, "cannot allocate request DMA memory");
457 bus_dma_tag_destroy(isp->isp_osinfo.reqdmat);
460 isp->isp_rquest = base;
462 if (bus_dmamap_load(isp->isp_osinfo.reqdmat, isp->isp_osinfo.reqmap,
463 base, len, imc, &im, 0) || im.error) {
464 isp_prt(isp, ISP_LOGERR, "error loading request DMA map %d", im.error);
467 isp_prt(isp, ISP_LOGDEBUG0, "request area @ 0x%jx/0x%jx",
468 (uintmax_t)im.maddr, (uintmax_t)len);
469 isp->isp_rquest_dma = im.maddr;
472 * Allocate and map the result queue.
474 len = ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
475 if (bus_dma_tag_create(isp->isp_osinfo.dmat, QENTRY_LEN, BUS_SPACE_MAXADDR_24BIT+1,
476 BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
477 len, 1, len, 0, busdma_lock_mutex, &isp->isp_lock,
478 &isp->isp_osinfo.respdmat)) {
479 isp_prt(isp, ISP_LOGERR, "cannot create response DMA tag");
482 if (bus_dmamem_alloc(isp->isp_osinfo.respdmat, (void **)&base,
483 BUS_DMA_COHERENT, &isp->isp_osinfo.respmap) != 0) {
484 isp_prt(isp, ISP_LOGERR, "cannot allocate response DMA memory");
485 bus_dma_tag_destroy(isp->isp_osinfo.respdmat);
488 isp->isp_result = base;
490 if (bus_dmamap_load(isp->isp_osinfo.respdmat, isp->isp_osinfo.respmap,
491 base, len, imc, &im, 0) || im.error) {
492 isp_prt(isp, ISP_LOGERR, "error loading response DMA map %d", im.error);
495 isp_prt(isp, ISP_LOGDEBUG0, "response area @ 0x%jx/0x%jx",
496 (uintmax_t)im.maddr, (uintmax_t)len);
497 isp->isp_result_dma = im.maddr;
499 if (isp->isp_maxcmds == 0) {
505 len = sizeof (struct isp_pcmd) * isp->isp_maxcmds;
506 isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *)
507 malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
508 for (i = 0; i < isp->isp_maxcmds; i++) {
509 struct isp_pcmd *pcmd = &isp->isp_osinfo.pcmd_pool[i];
510 error = bus_dmamap_create(isp->isp_osinfo.dmat, 0, &pcmd->dmap);
512 isp_prt(isp, ISP_LOGERR,
513 "error %d creating per-cmd DMA maps", error);
515 bus_dmamap_destroy(isp->isp_osinfo.dmat,
516 isp->isp_osinfo.pcmd_pool[i].dmap);
520 callout_init_mtx(&pcmd->wdog, &isp->isp_lock, 0);
521 if (i == isp->isp_maxcmds-1) {
524 pcmd->next = &isp->isp_osinfo.pcmd_pool[i+1];
527 isp->isp_osinfo.pcmd_free = &isp->isp_osinfo.pcmd_pool[0];
529 len = sizeof (isp_hdl_t *) * isp->isp_maxcmds;
530 isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO);
531 for (len = 0; len < isp->isp_maxcmds - 1; len++)
532 isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1];
533 isp->isp_xffree = isp->isp_xflist;
539 isp_sbus_mbxdmafree(isp);
545 isp_sbus_mbxdmafree(ispsoftc_t *isp)
549 if (isp->isp_xflist != NULL) {
550 free(isp->isp_xflist, M_DEVBUF);
551 isp->isp_xflist = NULL;
553 if (isp->isp_osinfo.pcmd_pool != NULL) {
554 for (i = 0; i < isp->isp_maxcmds; i++) {
555 bus_dmamap_destroy(isp->isp_osinfo.dmat,
556 isp->isp_osinfo.pcmd_pool[i].dmap);
558 free(isp->isp_osinfo.pcmd_pool, M_DEVBUF);
559 isp->isp_osinfo.pcmd_pool = NULL;
561 if (isp->isp_result_dma != 0) {
562 bus_dmamap_unload(isp->isp_osinfo.respdmat,
563 isp->isp_osinfo.respmap);
564 isp->isp_result_dma = 0;
566 if (isp->isp_result != NULL) {
567 bus_dmamem_free(isp->isp_osinfo.respdmat, isp->isp_result,
568 isp->isp_osinfo.respmap);
569 bus_dma_tag_destroy(isp->isp_osinfo.respdmat);
570 isp->isp_result = NULL;
572 if (isp->isp_rquest_dma != 0) {
573 bus_dmamap_unload(isp->isp_osinfo.reqdmat,
574 isp->isp_osinfo.reqmap);
575 isp->isp_rquest_dma = 0;
577 if (isp->isp_rquest != NULL) {
578 bus_dmamem_free(isp->isp_osinfo.reqdmat, isp->isp_rquest,
579 isp->isp_osinfo.reqmap);
580 bus_dma_tag_destroy(isp->isp_osinfo.reqdmat);
581 isp->isp_rquest = NULL;
588 void *rq; /* original request */
592 #define MUSHERR_NOQENTRIES -2
595 dma2(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
597 mush_t *mp = (mush_t *) arg;
598 ispsoftc_t *isp = mp->isp;
599 struct ccb_scsiio *csio = mp->cmd_token;
610 if ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
611 ddir = ISP_FROM_DEVICE;
613 ddir = ISP_TO_DEVICE;
615 if ((csio->ccb_h.func_code == XPT_CONT_TARGET_IO) ^
616 ((csio->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)) {
617 sdir = BUS_DMASYNC_PREREAD;
619 sdir = BUS_DMASYNC_PREWRITE;
621 bus_dmamap_sync(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap,
625 if (isp_send_cmd(isp, mp->rq, dm_segs, nseg, XS_XFRLEN(csio),
626 ddir, NULL) != CMD_QUEUED) {
627 mp->error = MUSHERR_NOQENTRIES;
632 isp_sbus_dmasetup(ispsoftc_t *isp, struct ccb_scsiio *csio, void *ff)
639 mp->cmd_token = csio;
643 error = bus_dmamap_load_ccb(isp->isp_osinfo.dmat,
644 PISP_PCMD(csio)->dmap, (union ccb *)csio, dma2, mp, 0);
645 if (error == EINPROGRESS) {
646 bus_dmamap_unload(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap);
648 isp_prt(isp, ISP_LOGERR,
649 "deferred dma allocation not supported");
650 } else if (error && mp->error == 0) {
652 isp_prt(isp, ISP_LOGERR, "error %d in dma mapping code", error);
657 int retval = CMD_COMPLETE;
658 if (mp->error == MUSHERR_NOQENTRIES) {
660 } else if (mp->error == EFBIG) {
661 XS_SETERR(csio, CAM_REQ_TOO_BIG);
662 } else if (mp->error == EINVAL) {
663 XS_SETERR(csio, CAM_REQ_INVALID);
665 XS_SETERR(csio, CAM_UNREC_HBA_ERROR);
673 isp_sbus_dumpregs(ispsoftc_t *isp, const char *msg)
676 printf("%s: %s\n", device_get_nameunit(isp->isp_dev), msg);
678 printf("%s:\n", device_get_nameunit(isp->isp_dev));
679 printf(" biu_conf1=%x", ISP_READ(isp, BIU_CONF1));
680 printf(" biu_icr=%x biu_isr=%x biu_sema=%x ", ISP_READ(isp, BIU_ICR),
681 ISP_READ(isp, BIU_ISR), ISP_READ(isp, BIU_SEMA));
682 printf("risc_hccr=%x\n", ISP_READ(isp, HCCR));
685 ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE);
686 printf(" cdma_conf=%x cdma_sts=%x cdma_fifostat=%x\n",
687 ISP_READ(isp, CDMA_CONF), ISP_READ(isp, CDMA_STATUS),
688 ISP_READ(isp, CDMA_FIFO_STS));
689 printf(" ddma_conf=%x ddma_sts=%x ddma_fifostat=%x\n",
690 ISP_READ(isp, DDMA_CONF), ISP_READ(isp, DDMA_STATUS),
691 ISP_READ(isp, DDMA_FIFO_STS));
692 printf(" sxp_int=%x sxp_gross=%x sxp(scsi_ctrl)=%x\n",
693 ISP_READ(isp, SXP_INTERRUPT),
694 ISP_READ(isp, SXP_GROSS_ERR),
695 ISP_READ(isp, SXP_PINS_CTRL));
696 ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE);
697 printf(" mbox regs: %x %x %x %x %x\n",
698 ISP_READ(isp, OUTMAILBOX0), ISP_READ(isp, OUTMAILBOX1),
699 ISP_READ(isp, OUTMAILBOX2), ISP_READ(isp, OUTMAILBOX3),
700 ISP_READ(isp, OUTMAILBOX4));