cmd->acc_mbox.amb_data = htole32(ccb->ccb_sglistpa);
cmd->acc_mbox.amb_data = ccb->ccb_sglistpa;
ami_cmd(ccb, flags, wait)	struct ami_ccb *ccb;	int flags, wait;{	struct ami_softc *sc = ccb->ccb_sc;	bus_dmamap_t dmap = ccb->ccb_dmamap;	int error = 0, i;	if (ccb->ccb_data) {		struct ami_iocmd *cmd = ccb->ccb_cmd;		bus_dma_segment_t *sgd;		error = bus_dmamap_load(sc->dmat, dmap, ccb->ccb_data,		    ccb->ccb_len, NULL, flags);		if (error) {			if (error == EFBIG)				printf("more than %d dma segs\n", AMI_MAXOFFSETS);			else				printf("error %d loading dma map\n", error);			ami_put_ccb(ccb);			return error;		}		sgd = dmap->dm_segs;		AMI_DPRINTF(AMI_D_DMA, ("data=%p/%u<0x%lx/%u",		    ccb->ccb_data, ccb->ccb_len,		    sgd->ds_addr, sgd->ds_len));		if(dmap->dm_nsegs > 1) {			struct ami_sgent *sgl = ccb->ccb_sglist;			cmd->acc_mbox.amb_nsge = htole32(dmap->dm_nsegs);			cmd->acc_mbox.amb_data = htole32(ccb->ccb_sglistpa);			for (i = 0; i < dmap->dm_nsegs; i++, sgd++) {				sgl[i].asg_addr = htole32(sgd->ds_addr);				sgl[i].asg_len  = htole32(sgd->ds_len);				if (i)					AMI_DPRINTF(AMI_D_DMA, (",0x%lx/%u",					    sgd->ds_addr, sgd->ds_len));			}		} else {			cmd->acc_mbox.amb_nsge = htole32(0);			cmd->acc_mbox.amb_data = htole32(sgd->ds_addr);		}		AMI_DPRINTF(AMI_D_DMA, ("> "));		bus_dmamap_sync(sc->dmat, dmap, BUS_DMASYNC_PREWRITE);	}	bus_dmamap_sync(sc->dmat, sc->sc_cmdmap, BUS_DMASYNC_PREWRITE);	if ((error = ami_start(ccb, wait))) {		AMI_DPRINTF(AMI_D_DMA, ("error=%d ", error));		__asm __volatile(".globl _bpamierr\n_bpamierr:");		if (ccb->ccb_data)			bus_dmamap_unload(sc->dmat, dmap);		ami_put_ccb(ccb);	} else if (wait) {		AMI_DPRINTF(AMI_D_DMA, ("waiting "));		if ((error = ami_complete(ccb)))			ami_put_ccb(ccb);	}	return error;}