From patchwork Wed Jan 13 12:10:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 8024351 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55315BEEE5 for ; Wed, 13 Jan 2016 12:10:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7985420458 for ; Wed, 13 Jan 2016 12:10:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78D2E20454 for ; Wed, 13 Jan 2016 12:10:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934514AbcAMMK2 (ORCPT ); Wed, 13 Jan 2016 07:10:28 -0500 Received: from mail-yk0-f175.google.com ([209.85.160.175]:36537 "EHLO mail-yk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934511AbcAMMK0 (ORCPT ); Wed, 13 Jan 2016 07:10:26 -0500 Received: by mail-yk0-f175.google.com with SMTP id v14so392220091ykd.3 for ; Wed, 13 Jan 2016 04:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=0BSQrEvzAPRP6X7Y8dwWXH/3STg3JKLvhW1Tkf1d0yI=; b=OEh5B+NOVfPfRMzN193feVEmBoVxIc2eyR344maXf7XW9Xn7LF7tguPyef55fJpWpM X0LFA2ktrjOSi6uhp+m1+rgfJkjfoPSwyjrBuLpYz3m0h7Yjgzsq3TAPxpoznffIG/pd /424BSiIwvG3FSAkRTwO5n6d3IWmrpqAhulTwKZV5pFCyMjKdxOTkdCFSIpyTrJRjgNI psDllvNm7YVK2eT7z9q4lqAsn0MmLlMckgbTF2TFDQ8I7/fcnSJdRZh0S02aotRxHcEs FvdQ3/CHsyUU7FkVLroIP+g9erHlRoAz1IioP6u/krHQUJBXsQw5OPygImywyv4Hnf1f atIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0BSQrEvzAPRP6X7Y8dwWXH/3STg3JKLvhW1Tkf1d0yI=; b=OZBUK7wiu22dE/utn36uqHEt/iKM5SU0k5+xwzvjyvFB+kyJDUOR44Y2bK8aIN6OIa LXRb5C/yTaqNq7DNqsPpySijcVTEoRBvjYIMJc1pNi6xUEqWUHM/o0Y9r1Zi3a6Z0UvE SqDRqZJUafTj8mJEX47tD+9lKfo5ovviLSUB2H/oqjTJ8xEWGJhlG84yWy2cKVGAspf7 jHr0ynLTFs/IlZy69NkwnfBYJojug3O8LyGYnGwxJN0uyIuUZ0Yw+mlV1y91q/MMTTAq icSMXmSW3o6VNXTsm93ClzM5Y+s/tcE518gwrjCKFRgb/j+Y5npMopqYv6abnd/qx+ng sUVQ== X-Gm-Message-State: ALoCoQlowmZx08f3YbPozr7e46PmVHwwchnJYiAJNWeC8XkSpYHL7Rjia9+1czTBheQtUrTzSU8et9Em0sQtZ8bhRqSc1A8yug== X-Received: by 10.13.227.196 with SMTP id m187mr8222894ywe.18.1452687026053; Wed, 13 Jan 2016 04:10:26 -0800 (PST) Received: from localhost.localdomain ([187.64.228.119]) by smtp.gmail.com with ESMTPSA id z201sm552346ywz.41.2016.01.13.04.10.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jan 2016 04:10:25 -0800 (PST) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: s.trumtrar@pengutronix.de, linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH] crypto: sahara: Fill the statesize field Date: Wed, 13 Jan 2016 10:10:05 -0200 Message-Id: <1452687005-16444-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Currently the sahara driver fails to probe: sahara: probe of 63ff8000.crypto failed with error -22 This happens since commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero"), which requires statesize to be filled. Pass the statesize members for sha1 and sha256, so we can probe the driver successfully again. Signed-off-by: Fabio Estevam --- Hi Steffen, Only 'probe' tested. Haven't run any crypto operations yet. drivers/crypto/sahara.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index f68c24a..d05d849 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -1260,6 +1260,7 @@ static struct ahash_alg sha_v3_algs[] = { .export = sahara_sha_export, .import = sahara_sha_import, .halg.digestsize = SHA1_DIGEST_SIZE, + .halg.statesize = sizeof(struct sahara_ctx), .halg.base = { .cra_name = "sha1", .cra_driver_name = "sahara-sha1", @@ -1287,6 +1288,7 @@ static struct ahash_alg sha_v4_algs[] = { .export = sahara_sha_export, .import = sahara_sha_import, .halg.digestsize = SHA256_DIGEST_SIZE, + .halg.statesize = sizeof(struct sahara_ctx), .halg.base = { .cra_name = "sha256", .cra_driver_name = "sahara-sha256",