From patchwork Fri Jun 23 06:45:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raveendra Padasalagi X-Patchwork-Id: 9805779 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F3A6260349 for ; Fri, 23 Jun 2017 06:46:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8879286EF for ; Fri, 23 Jun 2017 06:46:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBB922871D; Fri, 23 Jun 2017 06:46:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A7EA286EF for ; Fri, 23 Jun 2017 06:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754541AbdFWGqN (ORCPT ); Fri, 23 Jun 2017 02:46:13 -0400 Received: from mail-wr0-f178.google.com ([209.85.128.178]:32996 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754397AbdFWGqM (ORCPT ); Fri, 23 Jun 2017 02:46:12 -0400 Received: by mail-wr0-f178.google.com with SMTP id r103so52082558wrb.0 for ; Thu, 22 Jun 2017 23:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=U6tBU3SEX38GxPq0EvVRDyCDiiCE1ymGfJcGheItXS8=; b=KNBQWDkMvAsNUTaLBABAkyCXjPZLsyqcldAlIoO8DibwsVAXULrlfufau4e4iC5tG/ 8mn0Yh0mAn9oroeokzoKa+Y5Csx3hO93X1JvzsX6xrESr+BjyzVTkKCGxM6cuh5hB+H3 csEiH1chjGh42uBSZXakChzaHBqu3qYUH/22M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=U6tBU3SEX38GxPq0EvVRDyCDiiCE1ymGfJcGheItXS8=; b=QiISi8ZbFM9ckq7v8nW+ZDBa2ZIS+YM0lzl5R6LfzkySHhLqZp2csWynmGiCQXAsAj x4o8feqi8BLaTrrGV6OhaPYzn2u5TfYG1lhP4UqY8Gp27brCY+qGI2dFTegxDe8UBKNU WzL95m4my+/TTk9eNnbsxANxt5pUVs4FhyUtAXr0BUaqXKZ5+jazmZv/hyKvtSNWL+vj mxqpatTLM88qV1SRIj4rmfM0dn4gcMkKLIbFC52WB90OEa7llLNI+EFqwEntK4bhxJ+7 dpRoFZ8+GZLeELJ3GXjU0l8zhV2xwEkX9xnUHk0LGL57mxRwdOdAO5tbRSw+ulf3xs96 6nhw== X-Gm-Message-State: AKS2vOys2uzUoGzqTJHlTuk30v/5I0I5F3/zhC48ltgW9SDwgJQu+pxd I50qK22QQrOJCOls X-Received: by 10.28.209.4 with SMTP id i4mr4256160wmg.44.1498200370723; Thu, 22 Jun 2017 23:46:10 -0700 (PDT) Received: from rpadasal-OptiPlex-7010.dhcp.avagotech.net ([192.19.237.250]) by smtp.gmail.com with ESMTPSA id f199sm3134242wmd.33.2017.06.22.23.46.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 23:46:09 -0700 (PDT) From: Raveendra Padasalagi To: Herbert Xu , "David S. Miller" , Rob Rice , Scott Branden , Ray Jui , Steve Lin , linux-crypto@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, Raveendra Padasalagi Subject: [PATCH] crypto: brcm - Fix SHA3-512 algorithm failure Date: Fri, 23 Jun 2017 12:15:47 +0530 Message-Id: <1498200347-14580-1-git-send-email-raveendra.padasalagi@broadcom.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-Virus-Scanned: ClamAV using ClamSMTP In Broadcom SPU driver, due to missing break statement in spu2_hash_xlate() while mapping SPU2 equivalent SHA3-512 value, -EINVAL is chosen and hence leading to failure of SHA3-512 algorithm. This patch fixes the same. Signed-off-by: Raveendra Padasalagi Reviewed-by: Ray Jui Reviewed-by: Scott Branden --- drivers/crypto/bcm/spu2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c index ef04c97..bf7ac62 100644 --- a/drivers/crypto/bcm/spu2.c +++ b/drivers/crypto/bcm/spu2.c @@ -302,6 +302,7 @@ static int spu2_hash_mode_xlate(enum hash_mode hash_mode, break; case HASH_ALG_SHA3_512: *spu2_type = SPU2_HASH_TYPE_SHA3_512; + break; case HASH_ALG_LAST: default: err = -EINVAL;