Thread (18 messages) 18 messages, 3 authors, 2015-08-20

Re: [PATCH v1 3/4] Crypto: Add support for APM X-Gene SoC CRC32C h/w accelerator driver

flat view

From: Vinod Koul <hidden>
Date: 2015-08-20 05:46:25
Also in: linux-arm-kernel, linux-crypto, lkml

On Thu, Jul 30, 2015 at 05:41:07PM +0530, Rameshwar Prasad Sahu wrote:
quoted hunk ↗ jump to hunk
+	nents = sg_nents(req->src);
+	sg_count = dma_map_sg(dev, req->src, nents, DMA_TO_DEVICE);
+	if (!sg_count) {
+		dev_err(dev, "Failed to map src sg");
+		return -ENOMEM;
mapping error shouldn't be no mem error
quoted hunk ↗ jump to hunk
+	}
+
+	if (sg_count > XGENE_DMA_MAX_FLYBY_SRC_CNT) {
+		dev_err(dev, "Unsupported src sg len\n");
would be worth printing length
quoted hunk ↗ jump to hunk
+		goto err;
+	}
+
+	flags = DMA_CTRL_ACK;
why ACK?
quoted hunk ↗ jump to hunk
+
+	tx = dchan->device->device_prep_dma_crc32c(dchan, req->src,
+						   req->nbytes,
+						   reqctx->seed,
+						   req->result,
+						   flags);
We should add helper for this

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help