Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
7c25867
Bluetooth: hidp: Initialize list header of hidp session user
tedd-an Jun 26, 2015
ab944c8
Bluetooth: Reinitialize the list after deletion for session user list
tedd-an Jun 30, 2015
f307170
netfilter: nf_queue: Don't recompute the hook_list head
ebiederm Jun 19, 2015
a1bc1b3
netfilter: bridge: fix CONFIG_NF_DEFRAG_IPV4/6 related warnings/errors
bthaler Jun 19, 2015
3bd2299
netfilter: arptables: use percpu jumpstack
Jun 30, 2015
dd302b5
netfilter: bridge: don't leak skb in error paths
Jun 30, 2015
6742b9e
netfilter: nfnetlink: keep going batch handling on missing modules
ummakynes Jul 1, 2015
25c14ef
enic: fix issues in enic_poll
Jul 1, 2015
c4555d1
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/ker…
davem330 Jul 2, 2015
462e1ea
bridge: vlan: fix usage of vlan 0 and 4095 again
Jul 2, 2015
8777531
net-ipv6: Delete an unnecessary check before the function call "free_…
elfring Jul 2, 2015
f6e1c91
net-RDS: Delete an unnecessary check before the function call "module…
elfring Jul 2, 2015
92b80eb
netlink: Delete an unnecessary check before the function call "module…
elfring Jul 2, 2015
4c938d2
ipv6: Make MLD packets to only be processed locally
Jul 3, 2015
fda8b18
cxgb4: Fix incorrect sequence numbers shown in devlog
Jul 3, 2015
acb33cc
crypto: omap-des - Fix unmapping of dma channels
lokeshvutla Jul 2, 2015
030f4e9
crypto: nx - Fix reentrancy bugs
herbertx Jul 7, 2015
91c269a
MAINTAINER: add bridge netfilter
ummakynes Jul 6, 2015
86e8971
netfilter: bridge: Use __in6_dev_get rather than in6_dev_get in br_va…
Jul 7, 2015
32f675b
net_sched: gen_estimator: extend pps limit
edumazet Jul 2, 2015
aa43c5f
NET: hamradio: Fix IP over bpq encapsulation.
ralfbaechle Jul 4, 2015
cfa5200
net: phy: add dependency on HAS_IOMEM to MDIO_BUS_MUX_MMIOREG
robherring Jul 5, 2015
f7e2965
bridge: mdb: start delete timer for temp static entries
Jul 6, 2015
142b942
rhashtable: fix for resize events during table walk
Jul 6, 2015
d339727
net: graceful exit from netif_alloc_netdev_queues()
edumazet Jul 6, 2015
95ec655
Revert "dev: set iflink to 0 for virtual interfaces"
NicolasDichtel Jul 6, 2015
cfbfd86
amd-xgbe: Fix DMA API debug warning
tlendacky Jul 6, 2015
6c3e921
net: fec: Ensure clocks are enabled while using mdio bus
lunn Jul 6, 2015
4f7d2cd
rtnetlink: verify IFLA_VF_INFO attributes before passing them to driver
borkmann Jul 6, 2015
fc24f2b
ip_tunnel: fix ipv4 pmtu check to honor inner ip header df
fabled Jul 7, 2015
b5a983f
bonding: "primary_reselect" with "failure" is not working properly
Jul 7, 2015
9e9f665
sfc: refactor code in efx_ef10_set_mac_address()
Jul 7, 2015
7a186f4
sfc: add legacy method for changing a PF's MAC address
Jul 7, 2015
535a617
sfc: suppress handled MCDI failures when changing the MAC address
Jul 7, 2015
4df48e8
Merge branch 'sfc-set-mac'
davem330 Jul 8, 2015
fdd75ea
net/tipc: initialize security state for new connection socket
stephensmalley Jul 7, 2015
1973db0
drivers: net: cpsw: fix crash while accessing second slave ethernet i…
mugunthanvnm Jul 7, 2015
f1158b7
bridge: mdb: zero out the local br_ip variable before use
NikAleksandrov Jul 7, 2015
671b53e
sfc: Ensure down_write(&filter_sem) and up_write() are matched before…
sshah-solarflare Jul 8, 2015
974d7af
ipv4: add support for linkdown sysctl to netconf
gospo Jul 7, 2015
0769636
vmxnet3: prevent receive getting out of sequence on napi poll
nhorman Jul 7, 2015
4eed4d8
3c59x: Fix shared IRQ handling
dvlasenk Jul 7, 2015
d065c3c
drivers/net/usb: add device id for NVIDIA Tegra USB 3.0 Ethernet
nv-zhliu Jul 7, 2015
c936835
sfc: Report TX completions to BQL after all TX events in interrupt
pdunning-xilinx Jul 8, 2015
ace15bb
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
davem330 Jul 9, 2015
d5de198
macvtap: Destroy minor_idr on module_exit
Jul 8, 2015
adb3505
net: systemport: Use eth_hw_addr_random
v-thakkar Jul 8, 2015
5a0266a
drivers: net: cpsw: fix disabling of tx interrupt in rx isr
mugunthanvnm Jul 8, 2015
4a0e3e9
cdc_ncm: Add support for moving NDP to end of NCM frame
mrkiko Jul 8, 2015
fecdf8b
net: pktgen: fix race between pktgen_thread_worker() and kthread_stop()
oleg-nesterov Jul 8, 2015
1fbe4b4
net: pktgen: kill the "Wait for kthread_stop" code in pktgen_thread_w…
oleg-nesterov Jul 8, 2015
fc5778c
Merge branch 'pktgen-races'
davem330 Jul 9, 2015
fcc028c
net: axienet: Fix devm_ioremap_resource return value check
krzk Jul 9, 2015
a7d35f9
bridge: fix potential crash in __netdev_pick_tx()
edumazet Jul 9, 2015
e9e4dd3
net: do not process device backlog during unregistration
Jul 9, 2015
2c17d27
net: call rcu_read_lock early in process_backlog
Jul 9, 2015
7234e03
Merge branch 'netdev_unregister_races'
davem330 Jul 11, 2015
51ed7f3
bridge: mdb: allow the user to delete mdb entry if there's a querier
Jul 9, 2015
8220ea2
net: inet_diag: always export IPV6_V6ONLY sockopt for listening sockets
Jul 10, 2015
145c370
Doc: z8530book: Fix typo in API-z8530-sync-txdma-open.html
standby24x7 Jul 10, 2015
22401ff
cdc_ncm: update specs URL
mrkiko Jul 11, 2015
c590032
net: bcmgenet: fix accounting of packet drops vs errors
Jul 10, 2015
2ee9401
net: switchdev: don't abort unsupported operations
vivien Jul 10, 2015
8f5063e
net: dsa: Test array index before use
ffainelli Jul 12, 2015
c8cf89f
net: dsa: Fix off-by-one in switch address parsing
ffainelli Jul 12, 2015
76b63da
Merge branch 'dsa-of-parsing-fixes'
davem330 Jul 12, 2015
5e63e6b
can: rcar_can: fix IRQ check
Jun 20, 2015
c1a4c87
can: rcar_can: print signed IRQ #
Jun 20, 2015
3255f68
can: rcar_can: fix typo in error message
Jun 20, 2015
ae185f1
can: rcar_can: print request_irq() error code
Jun 20, 2015
585bc2a
can: rcar_can: unify error messages
Jun 20, 2015
0333651
can: c_can: Fix default pinmux glitch at init
Jul 8, 2015
2acb5c3
ARM: dts: dra7x-evm: Prevent glitch on DCAN1 pinmux
Jul 7, 2015
d3b58c4
can: replace timestamp as unique skb attribute
hartkopp Jun 26, 2015
cee9f6d
Merge tag 'linux-can-fixes-for-4.2-20150712' of git://git.kernel.org/…
davem330 Jul 13, 2015
34bef46
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
torvalds Jul 13, 2015
f760b87
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
torvalds Jul 13, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7019,6 +7019,7 @@ F: include/uapi/linux/netfilter/
F: net/*/netfilter.c
F: net/*/netfilter/
F: net/netfilter/
F: net/bridge/br_netfilter*.c

NETLABEL
M: Paul Moore <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/boot/dts/dra7-evm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@

&dcan1 {
status = "ok";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&dcan1_pins_default>;
pinctrl-names = "default", "sleep", "active";
pinctrl-0 = <&dcan1_pins_sleep>;
pinctrl-1 = <&dcan1_pins_sleep>;
pinctrl-2 = <&dcan1_pins_default>;
};
5 changes: 3 additions & 2 deletions arch/arm/boot/dts/dra72-evm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,10 @@

&dcan1 {
status = "ok";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&dcan1_pins_default>;
pinctrl-names = "default", "sleep", "active";
pinctrl-0 = <&dcan1_pins_sleep>;
pinctrl-1 = <&dcan1_pins_sleep>;
pinctrl-2 = <&dcan1_pins_default>;
};

&qspi {
Expand Down
6 changes: 4 additions & 2 deletions drivers/crypto/nx/nx-aes-ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,9 @@ static int ccm_nx_encrypt(struct aead_request *req,
static int ccm4309_aes_nx_encrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
struct blkcipher_desc desc;
u8 *iv = nx_ctx->priv.ccm.iv;
u8 *iv = rctx->iv;

iv[0] = 3;
memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
Expand Down Expand Up @@ -525,8 +526,9 @@ static int ccm_aes_nx_encrypt(struct aead_request *req)
static int ccm4309_aes_nx_decrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
struct blkcipher_desc desc;
u8 *iv = nx_ctx->priv.ccm.iv;
u8 *iv = rctx->iv;

iv[0] = 3;
memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
Expand Down
7 changes: 4 additions & 3 deletions drivers/crypto/nx/nx-aes-ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int ctr3686_aes_nx_set_key(struct crypto_tfm *tfm,
if (key_len < CTR_RFC3686_NONCE_SIZE)
return -EINVAL;

memcpy(nx_ctx->priv.ctr.iv,
memcpy(nx_ctx->priv.ctr.nonce,
in_key + key_len - CTR_RFC3686_NONCE_SIZE,
CTR_RFC3686_NONCE_SIZE);

Expand Down Expand Up @@ -131,14 +131,15 @@ static int ctr3686_aes_nx_crypt(struct blkcipher_desc *desc,
unsigned int nbytes)
{
struct nx_crypto_ctx *nx_ctx = crypto_blkcipher_ctx(desc->tfm);
u8 *iv = nx_ctx->priv.ctr.iv;
u8 iv[16];

memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_IV_SIZE);
memcpy(iv + CTR_RFC3686_NONCE_SIZE,
desc->info, CTR_RFC3686_IV_SIZE);
iv[12] = iv[13] = iv[14] = 0;
iv[15] = 1;

desc->info = nx_ctx->priv.ctr.iv;
desc->info = iv;

return ctr_aes_nx_crypt(desc, dst, src, nbytes);
}
Expand Down
17 changes: 10 additions & 7 deletions drivers/crypto/nx/nx-aes-gcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ static int gcm_empty(struct aead_request *req, struct blkcipher_desc *desc,
static int gcm_aes_nx_crypt(struct aead_request *req, int enc)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
struct blkcipher_desc desc;
unsigned int nbytes = req->cryptlen;
Expand All @@ -326,7 +327,7 @@ static int gcm_aes_nx_crypt(struct aead_request *req, int enc)

spin_lock_irqsave(&nx_ctx->lock, irq_flags);

desc.info = nx_ctx->priv.gcm.iv;
desc.info = rctx->iv;
/* initialize the counter */
*(u32 *)(desc.info + NX_GCM_CTR_OFFSET) = 1;

Expand Down Expand Up @@ -424,8 +425,8 @@ static int gcm_aes_nx_crypt(struct aead_request *req, int enc)

static int gcm_aes_nx_encrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
char *iv = nx_ctx->priv.gcm.iv;
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
char *iv = rctx->iv;

memcpy(iv, req->iv, 12);

Expand All @@ -434,8 +435,8 @@ static int gcm_aes_nx_encrypt(struct aead_request *req)

static int gcm_aes_nx_decrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
char *iv = nx_ctx->priv.gcm.iv;
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
char *iv = rctx->iv;

memcpy(iv, req->iv, 12);

Expand All @@ -445,7 +446,8 @@ static int gcm_aes_nx_decrypt(struct aead_request *req)
static int gcm4106_aes_nx_encrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
char *iv = nx_ctx->priv.gcm.iv;
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
char *iv = rctx->iv;
char *nonce = nx_ctx->priv.gcm.nonce;

memcpy(iv, nonce, NX_GCM4106_NONCE_LEN);
Expand All @@ -457,7 +459,8 @@ static int gcm4106_aes_nx_encrypt(struct aead_request *req)
static int gcm4106_aes_nx_decrypt(struct aead_request *req)
{
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm);
char *iv = nx_ctx->priv.gcm.iv;
struct nx_gcm_rctx *rctx = aead_request_ctx(req);
char *iv = rctx->iv;
char *nonce = nx_ctx->priv.gcm.nonce;

memcpy(iv, nonce, NX_GCM4106_NONCE_LEN);
Expand Down
70 changes: 44 additions & 26 deletions drivers/crypto/nx/nx-aes-xcbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ static int nx_xcbc_set_key(struct crypto_shash *desc,
unsigned int key_len)
{
struct nx_crypto_ctx *nx_ctx = crypto_shash_ctx(desc);
struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;

switch (key_len) {
case AES_KEYSIZE_128:
Expand All @@ -51,7 +52,7 @@ static int nx_xcbc_set_key(struct crypto_shash *desc,
return -EINVAL;
}

memcpy(nx_ctx->priv.xcbc.key, in_key, key_len);
memcpy(csbcpb->cpb.aes_xcbc.key, in_key, key_len);

return 0;
}
Expand Down Expand Up @@ -148,32 +149,29 @@ static int nx_xcbc_empty(struct shash_desc *desc, u8 *out)
return rc;
}

static int nx_xcbc_init(struct shash_desc *desc)
static int nx_crypto_ctx_aes_xcbc_init2(struct crypto_tfm *tfm)
{
struct xcbc_state *sctx = shash_desc_ctx(desc);
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm);
struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
struct nx_sg *out_sg;
int len;
int err;

nx_ctx_init(nx_ctx, HCOP_FC_AES);
err = nx_crypto_ctx_aes_xcbc_init(tfm);
if (err)
return err;

memset(sctx, 0, sizeof *sctx);
nx_ctx_init(nx_ctx, HCOP_FC_AES);

NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128);
csbcpb->cpb.hdr.mode = NX_MODE_AES_XCBC_MAC;

memcpy(csbcpb->cpb.aes_xcbc.key, nx_ctx->priv.xcbc.key, AES_BLOCK_SIZE);
memset(nx_ctx->priv.xcbc.key, 0, sizeof *nx_ctx->priv.xcbc.key);

len = AES_BLOCK_SIZE;
out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
&len, nx_ctx->ap->sglen);
return 0;
}

if (len != AES_BLOCK_SIZE)
return -EINVAL;
static int nx_xcbc_init(struct shash_desc *desc)
{
struct xcbc_state *sctx = shash_desc_ctx(desc);

nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
memset(sctx, 0, sizeof *sctx);

return 0;
}
Expand All @@ -186,6 +184,7 @@ static int nx_xcbc_update(struct shash_desc *desc,
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;
struct nx_sg *in_sg;
struct nx_sg *out_sg;
u32 to_process = 0, leftover, total;
unsigned int max_sg_len;
unsigned long irq_flags;
Expand Down Expand Up @@ -213,6 +212,17 @@ static int nx_xcbc_update(struct shash_desc *desc,
max_sg_len = min_t(u64, max_sg_len,
nx_ctx->ap->databytelen/NX_PAGE_SIZE);

data_len = AES_BLOCK_SIZE;
out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
&len, nx_ctx->ap->sglen);

if (data_len != AES_BLOCK_SIZE) {
rc = -EINVAL;
goto out;
}

nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);

do {
to_process = total - to_process;
to_process = to_process & ~(AES_BLOCK_SIZE - 1);
Expand All @@ -235,8 +245,10 @@ static int nx_xcbc_update(struct shash_desc *desc,
(u8 *) sctx->buffer,
&data_len,
max_sg_len);
if (data_len != sctx->count)
return -EINVAL;
if (data_len != sctx->count) {
rc = -EINVAL;
goto out;
}
}

data_len = to_process - sctx->count;
Expand All @@ -245,8 +257,10 @@ static int nx_xcbc_update(struct shash_desc *desc,
&data_len,
max_sg_len);

if (data_len != to_process - sctx->count)
return -EINVAL;
if (data_len != to_process - sctx->count) {
rc = -EINVAL;
goto out;
}

nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) *
sizeof(struct nx_sg);
Expand Down Expand Up @@ -325,15 +339,19 @@ static int nx_xcbc_final(struct shash_desc *desc, u8 *out)
in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *)sctx->buffer,
&len, nx_ctx->ap->sglen);

if (len != sctx->count)
return -EINVAL;
if (len != sctx->count) {
rc = -EINVAL;
goto out;
}

len = AES_BLOCK_SIZE;
out_sg = nx_build_sg_list(nx_ctx->out_sg, out, &len,
nx_ctx->ap->sglen);

if (len != AES_BLOCK_SIZE)
return -EINVAL;
if (len != AES_BLOCK_SIZE) {
rc = -EINVAL;
goto out;
}

nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg);
nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
Expand Down Expand Up @@ -372,7 +390,7 @@ struct shash_alg nx_shash_aes_xcbc_alg = {
.cra_blocksize = AES_BLOCK_SIZE,
.cra_module = THIS_MODULE,
.cra_ctxsize = sizeof(struct nx_crypto_ctx),
.cra_init = nx_crypto_ctx_aes_xcbc_init,
.cra_init = nx_crypto_ctx_aes_xcbc_init2,
.cra_exit = nx_crypto_ctx_exit,
}
};
43 changes: 24 additions & 19 deletions drivers/crypto/nx/nx-sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,28 @@
#include "nx.h"


static int nx_sha256_init(struct shash_desc *desc)
static int nx_crypto_ctx_sha256_init(struct crypto_tfm *tfm)
{
struct sha256_state *sctx = shash_desc_ctx(desc);
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
struct nx_sg *out_sg;
int len;
u32 max_sg_len;
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm);
int err;

nx_ctx_init(nx_ctx, HCOP_FC_SHA);
err = nx_crypto_ctx_sha_init(tfm);
if (err)
return err;

memset(sctx, 0, sizeof *sctx);
nx_ctx_init(nx_ctx, HCOP_FC_SHA);

nx_ctx->ap = &nx_ctx->props[NX_PROPS_SHA256];

NX_CPB_SET_DIGEST_SIZE(nx_ctx->csbcpb, NX_DS_SHA256);

max_sg_len = min_t(u64, nx_ctx->ap->sglen,
nx_driver.of.max_sg_len/sizeof(struct nx_sg));
max_sg_len = min_t(u64, max_sg_len,
nx_ctx->ap->databytelen/NX_PAGE_SIZE);
return 0;
}

len = SHA256_DIGEST_SIZE;
out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
&len, max_sg_len);
nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);
static int nx_sha256_init(struct shash_desc *desc) {
struct sha256_state *sctx = shash_desc_ctx(desc);

if (len != SHA256_DIGEST_SIZE)
return -EINVAL;
memset(sctx, 0, sizeof *sctx);

sctx->state[0] = __cpu_to_be32(SHA256_H0);
sctx->state[1] = __cpu_to_be32(SHA256_H1);
Expand All @@ -78,6 +72,7 @@ static int nx_sha256_update(struct shash_desc *desc, const u8 *data,
struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb;
struct nx_sg *in_sg;
struct nx_sg *out_sg;
u64 to_process = 0, leftover, total;
unsigned long irq_flags;
int rc = 0;
Expand Down Expand Up @@ -108,6 +103,16 @@ static int nx_sha256_update(struct shash_desc *desc, const u8 *data,
max_sg_len = min_t(u64, max_sg_len,
nx_ctx->ap->databytelen/NX_PAGE_SIZE);

data_len = SHA256_DIGEST_SIZE;
out_sg = nx_build_sg_list(nx_ctx->out_sg, (u8 *)sctx->state,
&data_len, max_sg_len);
nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg);

if (data_len != SHA256_DIGEST_SIZE) {
rc = -EINVAL;
goto out;
}

do {
/*
* to_process: the SHA256_BLOCK_SIZE data chunk to process in
Expand Down Expand Up @@ -282,7 +287,7 @@ struct shash_alg nx_shash_sha256_alg = {
.cra_blocksize = SHA256_BLOCK_SIZE,
.cra_module = THIS_MODULE,
.cra_ctxsize = sizeof(struct nx_crypto_ctx),
.cra_init = nx_crypto_ctx_sha_init,
.cra_init = nx_crypto_ctx_sha256_init,
.cra_exit = nx_crypto_ctx_exit,
}
};
Loading