From b02676a2cbf7dc2fe7c1eb2895667fa846030cd8 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 25 May 2020 23:20:33 +0000 Subject: [PATCH] Update sec(4) for separate output buffers changes in r361481. This does not add support for separate output buffers but updates the driver to cope with the changes. Pointy hat to: jhb --- sys/dev/sec/sec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sec/sec.c b/sys/dev/sec/sec.c index 17696b65e7e..a3c4fdac3de 100644 --- a/sys/dev/sec/sec.c +++ b/sys/dev/sec/sec.c @@ -842,14 +842,14 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_mem *dma_mem, if (dma_mem->dma_vaddr != NULL) return (EBUSY); - switch (crp->crp_buf_type) { + switch (crp->crp_buf.cb_type) { case CRYPTO_BUF_CONTIG: break; case CRYPTO_BUF_UIO: size = SEC_FREE_LT_CNT(sc) * SEC_MAX_DMA_BLOCK_SIZE; break; case CRYPTO_BUF_MBUF: - size = m_length(crp->crp_mbuf, NULL); + size = m_length(crp->crp_buf.cb_mbuf, NULL); break; default: return (EINVAL); @@ -1245,7 +1245,7 @@ sec_process(device_t dev, struct cryptop *crp, int hint) csp = crypto_get_params(crp->crp_session); /* Check for input length */ - if (crp->crp_ilen > SEC_MAX_DMA_BLOCK_SIZE) { + if (crypto_buffer_len(&crp->crp_buf) > SEC_MAX_DMA_BLOCK_SIZE) { crp->crp_etype = E2BIG; crypto_done(crp); return (0);