Print this page
4888 Undocument dma_req(9s)
4884 EOF scsi_hba_attach
4886 EOF ddi_dmae_getlim
4887 EOF ddi_iomin
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free
*** 17,29 ****
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2012 Gary Mills
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved.
*/
/*
* ISA bus nexus driver
*/
--- 17,29 ----
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright (c) 2012 Gary Mills
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
* ISA bus nexus driver
*/
*** 124,147 ****
static uchar_t asy_intr_override = 0;
/*
* Local data
*/
- static ddi_dma_lim_t ISA_dma_limits = {
- 0, /* address low */
- 0x00ffffff, /* address high */
- 0, /* counter max */
- 1, /* burstsize */
- DMA_UNIT_8, /* minimum xfer */
- 0, /* dma speed */
- (uint_t)DMALIM_VER0, /* version */
- 0x0000ffff, /* address register */
- 0x0000ffff, /* counter register */
- 1, /* sector size */
- 0x00000001, /* scatter/gather list length */
- (uint_t)0xffffffff /* request size */
- };
static ddi_dma_attr_t ISA_dma_attr = {
DMA_ATTR_V0,
(unsigned long long)0,
(unsigned long long)0x00ffffff,
--- 124,133 ----
*** 576,586 ****
isa_dma_mctl(dev_info_t *dip, dev_info_t *rdip,
ddi_dma_handle_t handle, enum ddi_dma_ctlops request,
off_t *offp, size_t *lenp, caddr_t *objp, uint_t flags)
{
int rval;
- ddi_dma_lim_t defalt;
int arg = (int)(uintptr_t)objp;
switch (request) {
case DDI_DMA_E_PROG:
--- 562,571 ----
*** 616,629 ****
case DDI_DMA_E_SWSTART:
i_dmae_swstart(rdip, arg);
return (DDI_SUCCESS);
- case DDI_DMA_E_GETLIM:
- bcopy(&ISA_dma_limits, objp, sizeof (ddi_dma_lim_t));
- return (DDI_SUCCESS);
-
case DDI_DMA_E_GETATTR:
bcopy(&ISA_dma_attr, objp, sizeof (ddi_dma_attr_t));
return (DDI_SUCCESS);
case DDI_DMA_E_1STPTY:
--- 601,610 ----
*** 637,654 ****
req1stpty.der_trans = DMAE_TRANS_CSCD;
}
return (i_dmae_prog(rdip, &req1stpty, NULL, arg));
}
- case DDI_DMA_IOPB_ALLOC: /* get contiguous DMA-able memory */
- case DDI_DMA_SMEM_ALLOC:
- if (!offp) {
- defalt = ISA_dma_limits;
- offp = (off_t *)&defalt;
- }
- /*FALLTHROUGH*/
default:
rval = ddi_dma_mctl(dip, rdip, handle, request, offp,
lenp, objp, flags);
}
return (rval);
}
--- 618,634 ----
req1stpty.der_trans = DMAE_TRANS_CSCD;
}
return (i_dmae_prog(rdip, &req1stpty, NULL, arg));
}
default:
+ /*
+ * We pass to rootnex, but it turns out that rootnex will just
+ * return failure, as we don't use ddi_dma_mctl() except
+ * for DMA engine (ISA) and DVMA (SPARC). Arguably we could
+ * just return an error direclty here, instead.
+ */
rval = ddi_dma_mctl(dip, rdip, handle, request, offp,
lenp, objp, flags);
}
return (rval);
}