Print this page
8624 xhci and nvme can't bind DMA memory with IOMMU enabled
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/rootnex.c
          +++ new/usr/src/uts/i86pc/io/rootnex.c
↓ open down ↓ 2163 lines elided ↑ open up ↑
2164 2164           * the buffer shouldn't require more cookies than the driver/device can
2165 2165           * handle [sgllen]).
2166 2166           *
2167 2167           * Note that negative values of dma_attr_sgllen are supposed
2168 2168           * to mean unlimited, but we just cast them to mean a
2169 2169           * "ridiculous large limit".  This saves some extra checks on
2170 2170           * hot paths.
2171 2171           */
2172 2172          if ((sinfo->si_copybuf_req == 0) &&
2173 2173              (sinfo->si_sgl_size <= (unsigned)attr->dma_attr_sgllen) &&
2174      -            (dmao->dmao_size < dma->dp_maxxfer)) {
     2174 +            (dmao->dmao_size <= dma->dp_maxxfer)) {
2175 2175  fast:
2176 2176                  /*
2177 2177                   * If the driver supports FMA, insert the handle in the FMA DMA
2178 2178                   * handle cache.
2179 2179                   */
2180 2180                  if (attr->dma_attr_flags & DDI_DMA_FLAGERR)
2181 2181                          hp->dmai_error.err_cf = rootnex_dma_check;
2182 2182  
2183 2183                  /*
2184 2184                   * copy out the first cookie and ccountp, set the cookie
↓ open down ↓ 2988 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX