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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/sunddi.c
          +++ new/usr/src/uts/common/os/sunddi.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
       24 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  25   25   */
  26   26  
  27   27  #include <sys/note.h>
  28   28  #include <sys/types.h>
  29   29  #include <sys/param.h>
  30   30  #include <sys/systm.h>
  31   31  #include <sys/buf.h>
  32   32  #include <sys/uio.h>
  33   33  #include <sys/cred.h>
  34   34  #include <sys/poll.h>
↓ open down ↓ 668 lines elided ↑ open up ↑
 703  703          fp = DEVI(d)->devi_ops->devo_bus_ops->bus_ctl;
 704  704          return ((*fp)(d, r, op, a, v));
 705  705  }
 706  706  
 707  707  #endif
 708  708  
 709  709  /*
 710  710   * DMA/DVMA setup
 711  711   */
 712  712  
 713      -#if defined(__sparc)
 714      -static ddi_dma_lim_t standard_limits = {
 715      -        (uint_t)0,      /* addr_t dlim_addr_lo */
 716      -        (uint_t)-1,     /* addr_t dlim_addr_hi */
 717      -        (uint_t)-1,     /* uint_t dlim_cntr_max */
 718      -        (uint_t)1,      /* uint_t dlim_burstsizes */
 719      -        (uint_t)1,      /* uint_t dlim_minxfer */
 720      -        0               /* uint_t dlim_dmaspeed */
 721      -};
 722      -#elif defined(__x86)
 723      -static ddi_dma_lim_t standard_limits = {
 724      -        (uint_t)0,              /* addr_t dlim_addr_lo */
 725      -        (uint_t)0xffffff,       /* addr_t dlim_addr_hi */
 726      -        (uint_t)0,              /* uint_t dlim_cntr_max */
 727      -        (uint_t)0x00000001,     /* uint_t dlim_burstsizes */
 728      -        (uint_t)DMA_UNIT_8,     /* uint_t dlim_minxfer */
 729      -        (uint_t)0,              /* uint_t dlim_dmaspeed */
 730      -        (uint_t)0x86<<24+0,     /* uint_t dlim_version */
 731      -        (uint_t)0xffff,         /* uint_t dlim_adreg_max */
 732      -        (uint_t)0xffff,         /* uint_t dlim_ctreg_max */
 733      -        (uint_t)512,            /* uint_t dlim_granular */
 734      -        (int)1,                 /* int dlim_sgllen */
 735      -        (uint_t)0xffffffff      /* uint_t dlim_reqsizes */
 736      -};
 737      -
 738      -#endif
 739      -
 740  713  #if !defined(__sparc)
 741  714  /*
 742  715   * Request bus_dma_ctl parent to fiddle with a dma request.
 743  716   *
 744  717   * (The sparc version is in sparc_subr.s)
 745  718   */
 746  719  int
 747  720  ddi_dma_mctl(dev_info_t *dip, dev_info_t *rdip,
 748  721      ddi_dma_handle_t handle, enum ddi_dma_ctlops request,
 749  722      off_t *offp, size_t *lenp, caddr_t *objp, uint_t flags)
↓ open down ↓ 21 lines elided ↑ open up ↑
 771  744  #define HD      ((ddi_dma_impl_t *)h)->dmai_rdip
 772  745  
 773  746  /*
 774  747   * This routine is left in place to satisfy link dependencies
 775  748   * for any 3rd party nexus drivers that rely on it.  It is never
 776  749   * called, though.
 777  750   */
 778  751  /*ARGSUSED*/
 779  752  int
 780  753  ddi_dma_map(dev_info_t *dip, dev_info_t *rdip,
 781      -        struct ddi_dma_req *dmareqp, ddi_dma_handle_t *handlep)
      754 +    struct ddi_dma_req *dmareqp, ddi_dma_handle_t *handlep)
 782  755  {
 783  756          return (DDI_FAILURE);
 784  757  }
 785  758  
 786  759  #if !defined(__sparc)
 787  760  
 788  761  /*
 789  762   * The SPARC versions of these routines are done in assembler to
 790  763   * save register windows, so they're in sparc_subr.s.
 791  764   */
↓ open down ↓ 132 lines elided ↑ open up ↑
 924  897  ddi_dma_burstsizes(ddi_dma_handle_t handle)
 925  898  {
 926  899          ddi_dma_impl_t *dimp = (ddi_dma_impl_t *)handle;
 927  900  
 928  901          if (!dimp)
 929  902                  return (0);
 930  903          else
 931  904                  return (dimp->dmai_burstsizes);
 932  905  }
 933  906  
 934      -int
 935      -ddi_iomin(dev_info_t *a, int i, int stream)
 936      -{
 937      -        int r;
 938      -
 939      -        /*
 940      -         * Make sure that the initial value is sane
 941      -         */
 942      -        if (i & (i - 1))
 943      -                return (0);
 944      -        if (i == 0)
 945      -                i = (stream) ? 4 : 1;
 946      -
 947      -        r = ddi_ctlops(a, a,
 948      -            DDI_CTLOPS_IOMIN, (void *)(uintptr_t)stream, (void *)&i);
 949      -        if (r != DDI_SUCCESS || (i & (i - 1)))
 950      -                return (0);
 951      -        return (i);
 952      -}
 953      -
 954  907  /*
 955  908   * Given two DMA attribute structures, apply the attributes
 956  909   * of one to the other, following the rules of attributes
 957  910   * and the wishes of the caller.
 958  911   *
 959  912   * The rules of DMA attribute structures are that you cannot
 960  913   * make things *less* restrictive as you apply one set
 961  914   * of attributes to another.
 962  915   *
 963  916   */
↓ open down ↓ 9108 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX