diff options
| author | Garrett D'Amore <garrett@damore.org> | 2014-05-24 17:25:34 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2014-06-09 20:26:06 -0700 |
| commit | b89e420ae1290e425c29db875ec0c0546006eec7 (patch) | |
| tree | ec1e6dba5d4eaeda344d1e852cd1db39b0b36b90 /usr/src/uts/sun4 | |
| parent | 13bb82abd861fb185be572d7ae5710bf0f98a17a (diff) | |
| download | illumos-joyent-b89e420ae1290e425c29db875ec0c0546006eec7.tar.gz | |
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
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/uts/sun4')
| -rw-r--r-- | usr/src/uts/sun4/os/ddi_impl.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/usr/src/uts/sun4/os/ddi_impl.c b/usr/src/uts/sun4/os/ddi_impl.c index 6769c48b9d..2c64ae3556 100644 --- a/usr/src/uts/sun4/os/ddi_impl.c +++ b/usr/src/uts/sun4/os/ddi_impl.c @@ -24,7 +24,7 @@ * Use is subject to license terms. */ /* - * Copyright 2012 Garrett D'Amore <garrett@damore.org>. All rights reserved. + * Copyright 2014 Garrett D'Amore <garrett@damore.org> */ /* @@ -1131,6 +1131,30 @@ kfreea(void *addr) vmem_free(big_endian_arena, (void *)saddr[-2], saddr[-1]); } +/* + * This used to be ddi_iomin, but we were the only remaining caller, so + * we've made it private and moved it here. + */ +static int +i_ddi_iomin(dev_info_t *a, int i, int stream) +{ + int r; + + /* + * Make sure that the initial value is sane + */ + if (i & (i - 1)) + return (0); + if (i == 0) + i = (stream) ? 4 : 1; + + r = ddi_ctlops(a, a, + DDI_CTLOPS_IOMIN, (void *)(uintptr_t)stream, (void *)&i); + if (r != DDI_SUCCESS || (i & (i - 1))) + return (0); + return (i); +} + int i_ddi_mem_alloc(dev_info_t *dip, ddi_dma_attr_t *attr, size_t length, int cansleep, int flags, @@ -1181,7 +1205,7 @@ i_ddi_mem_alloc(dev_info_t *dip, ddi_dma_attr_t *attr, iomin = 1 << (ddi_fls(iomin) - 1); iomin = maxbit(iomin, attr->dma_attr_minxfer); iomin = maxbit(iomin, attr->dma_attr_align); - iomin = ddi_iomin(dip, iomin, streaming); + iomin = i_ddi_iomin(dip, iomin, streaming); if (iomin == 0) return (DDI_FAILURE); |
