Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2020 23:20:33 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361490 - head/sys/dev/sec
Message-ID:  <202005252320.04PNKXeY043111@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon May 25 23:20:33 2020
New Revision: 361490
URL: https://svnweb.freebsd.org/changeset/base/361490

Log:
  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

Modified:
  head/sys/dev/sec/sec.c

Modified: head/sys/dev/sec/sec.c
==============================================================================
--- head/sys/dev/sec/sec.c	Mon May 25 23:12:49 2020	(r361489)
+++ head/sys/dev/sec/sec.c	Mon May 25 23:20:33 2020	(r361490)
@@ -842,14 +842,14 @@ sec_desc_map_dma(struct sec_softc *sc, struct sec_dma_
 	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 hin
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005252320.04PNKXeY043111>