From patchwork Wed Jul 24 19:19:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169643 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10668927ilk; Wed, 24 Jul 2019 12:54:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVgwj0RDx8fwG3slPgW4P6NQ19HbIf4XYHr33BmfoGuWIh7eWWsscviV11AA7T0sj0UVUT X-Received: by 2002:a17:902:5ac4:: with SMTP id g4mr89405800plm.80.1563998090017; Wed, 24 Jul 2019 12:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563998090; cv=none; d=google.com; s=arc-20160816; b=d2tDxWBSiGhqyrI1A+r/piZIMRHL+7XDMYgpm7w/an7QKXHx1T/lc/8ko8nC7aPvfD eBWgge60OFuFuzasqZx9CGc2hG5JVDu6qRCHbfzogQdHjKFHu3+wKfZI9AweKq5jpMh0 X3HGedUSB2SIF525tLA1PvXAjhrZkub8n3ZA53dav1ugV3QotdQOYUWX3sEOskaiuvzC sNUeXfv7ecriaiIkf0+jW2WDa2R7X46UNFyB8KSBYYsiDJSdZPMWL7GBqzxpAmE92BFB 32ojQm9gVw4+mrZoU9veLTZckHB2i0OlcFVWBa6xqAUwkhy7ZtWKDlGYUDzmYfdrYRVd isZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=d4IleqVCMpD24qc4AjeXmpiov2Xz5NbR6H+dsC0FKIY=; b=wlI7teyC2rzHZx/6tQbmxgqL4JMmuqcOhFdkzUoeVKtUAU8KdrzDpfvGclmcnbpCKg Q8/hfMAj7BVVk2VwYFilUN6Kx2dQT0HCECqvK2Z94zhWADjt1roXgsbYafw4GEftK6mH c7DaOCyHqlSIZiTbvAI6ks3M2GuvUH4k+DvIDY/zPx1pX3DorzCxW76XrBZdek5LZh9+ v26WtyrJ4rFwLmrIBFT0jEyHp0RaSIjvsiqk7W5rAPf7dkOSEj5EECyefo7wUZBfymdW b7N0Kz0QhBBW7zeCRawnxuhxuCM9CYLYmyVx8hxxaRC4qGs99aQiP93+HPcdGLN4s7he KQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1h5fMK45; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 65si9214942pgj.19.2019.07.24.12.54.49; Wed, 24 Jul 2019 12:54:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1h5fMK45; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404442AbfGXTys (ORCPT + 29 others); Wed, 24 Jul 2019 15:54:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:37972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404020AbfGXTyq (ORCPT ); Wed, 24 Jul 2019 15:54:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E204322BEB; Wed, 24 Jul 2019 19:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998085; bh=PHgtucqGihDJ5d34ZJmWIWSwxfyLfx7UyvkpviJT8xk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1h5fMK45epHgk0AsWpR1DeC6US1W85DRparrCM7+RiUjWAN/VK+5sXdJbzD2H8ALd TL5qclCfQNmLpCzVVWWUIjq0jPPJho/Xisq7scGId5/LP4ygJM/wlKPOowjWfDWgRZ UaZGd++lhQDACvVBYqCkMr+A4ntj4a2vZNdoaSF0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Horia Geanta , Iuliana Prodan , Sascha Hauer , Ard Biesheuvel , Herbert Xu Subject: [PATCH 5.1 240/371] crypto: caam - limit output IV to CBC to work around CTR mode DMA issue Date: Wed, 24 Jul 2019 21:19:52 +0200 Message-Id: <20190724191742.711810766@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b upstream. The CAAM driver currently violates an undocumented and slightly controversial requirement imposed by the crypto stack that a buffer referred to by the request structure via its virtual address may not be modified while any scatterlists passed via the same request structure are mapped for inbound DMA. This may result in errors like alg: aead: decryption failed on test 1 for gcm_base(ctr-aes-caam,ghash-generic): ret=74 alg: aead: Failed to load transform for gcm(aes): -2 on non-cache coherent systems, due to the fact that the GCM driver passes an IV buffer by virtual address which shares a cacheline with the auth_tag buffer passed via a scatterlist, resulting in corruption of the auth_tag when the IV is updated while the DMA mapping is live. Since the IV that is returned to the caller is only valid for CBC mode, and given that the in-kernel users of CBC (such as CTS) don't trigger the same issue as the GCM driver, let's just disable the output IV generation for all modes except CBC for the time being. Fixes: 854b06f76879 ("crypto: caam - properly set IV after {en,de}crypt") Cc: Horia Geanta Cc: Iuliana Prodan Reported-by: Sascha Hauer Cc: Signed-off-by: Ard Biesheuvel Reviewed-by: Horia Geanta Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/caam/caamalg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -965,6 +965,7 @@ static void skcipher_encrypt_done(struct struct skcipher_request *req = context; struct skcipher_edesc *edesc; struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); + struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher); int ivsize = crypto_skcipher_ivsize(skcipher); #ifdef DEBUG @@ -989,9 +990,9 @@ static void skcipher_encrypt_done(struct /* * The crypto API expects us to set the IV (req->iv) to the last - * ciphertext block. This is used e.g. by the CTS mode. + * ciphertext block when running in CBC mode. */ - if (ivsize) + if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC) scatterwalk_map_and_copy(req->iv, req->dst, req->cryptlen - ivsize, ivsize, 0); @@ -1809,9 +1810,9 @@ static int skcipher_decrypt(struct skcip /* * The crypto API expects us to set the IV (req->iv) to the last - * ciphertext block. + * ciphertext block when running in CBC mode. */ - if (ivsize) + if ((ctx->cdata.algtype & OP_ALG_AAI_MASK) == OP_ALG_AAI_CBC) scatterwalk_map_and_copy(req->iv, req->src, req->cryptlen - ivsize, ivsize, 0); From patchwork Wed Jul 24 19:20:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169649 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10688195ilk; Wed, 24 Jul 2019 13:13:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrxH1KG2XxH52BTVVW6Un/qeRQqZZ1s/Wp8ndT7wQFa48smz37QOpoHdnOchEGPyEsMXfK X-Received: by 2002:a62:ab18:: with SMTP id p24mr13086874pff.113.1563999187867; Wed, 24 Jul 2019 13:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563999187; cv=none; d=google.com; s=arc-20160816; b=Bd//F2FvMOlEDsDqAGgNlPzW/EqGhwb3gumB04B+lKjvOOZBU7U+tUDhYyW2x8BQDI 3MHlaayEhG5TVwQelCeaSjECcdGgJZNkrv+59qukw4rkUzUPlJzjXpqyt5eEuhV9tFe9 JLlR2kf0Kw4xgdWjGRDBFu2E6tR1pdW2yByC5oIKfaHwoyoXkgQVrtZva49hhuxiH8mD DBUwPFh18KjR6eJvJhHniEsOxMqXmx9nR7dIud6SWObIaegblfs8ZOZYuSvde0rOFZum 0iuJUiR5VbTxZIQgUke7bE03wS8T8YDcADq6AodXaCqfaXMaZPKzwdb1ael9kauLIco9 IdvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Obi7vl3LWQ1KWnZRIHh6xI3zEZ7w/0FUDxeNQH+d4+w=; b=Mf1M8PiVkr5UY3+pP3Gh/F/PaUKoqkZHKUKi65CsOf5Xkt7Dp6oPfXJjzRsmEmPcYS LNgBQls7PcNxYtaeTIof5EV0xE/17I5wL9VYCIvYiBtI+xIcER6RCpw9fWxegSorf5YH HzJjNPPvd+tdLVOs617284anGCbcA7A0QhwKBzr79Oq0yVjtN4Ip1NdEukBQwHz7m8ao gQwE2JXYE7YHbtWql7VLfEKrrNrht2k2ZtSttOyT/r9E2FFyk2qG7ZMMC6RZzjwVzC3n 1+mEykCjxdfEv3uDuoOUKeSJvd7aHA6ZHPZvvrRnbVR0wzx9xZmXc6N704l9b6JeobLm dd3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mYIEsNRv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si14611943plx.344.2019.07.24.13.13.07; Wed, 24 Jul 2019 13:13:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mYIEsNRv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391979AbfGXUNG (ORCPT + 29 others); Wed, 24 Jul 2019 16:13:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:41628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404450AbfGXT4v (ORCPT ); Wed, 24 Jul 2019 15:56:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2992205C9; Wed, 24 Jul 2019 19:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998210; bh=sekeUZsFe40A6R5S9zKi9lEAV1KgH2ez1/bzAXZ8O9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYIEsNRvCDF8YpGkySy8BNonyxjsdNtnBvNobxW6Vdh9bFTOsIXwV3r3/HM6rwm5y JcS+LVVVkzNHKGT9QNzZilvxg4vxoHZUJ9Qx3ivxoOstKZHw93RTyYEikB9i5I4QL8 mKXmL3MejLUri/cRVpxmrAqYx6I3u/IuiY1MbtRA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown Subject: [PATCH 5.1 284/371] ASoC: dapm: Adapt for debugfs API change Date: Wed, 24 Jul 2019 21:20:36 +0200 Message-Id: <20190724191745.653534180@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mark Brown commit ceaea851b9ea75f9ea2bbefb53ff0d4b27cd5a6e upstream. Back in ff9fb72bc07705c (debugfs: return error values, not NULL) the debugfs APIs were changed to return error pointers rather than NULL pointers on error, breaking the error checking in ASoC. Update the code to use IS_ERR() and log the codes that are returned as part of the error messages. Fixes: ff9fb72bc07705c (debugfs: return error values, not NULL) Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-dapm.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2154,23 +2154,25 @@ void snd_soc_dapm_debugfs_init(struct sn { struct dentry *d; - if (!parent) + if (!parent || IS_ERR(parent)) return; dapm->debugfs_dapm = debugfs_create_dir("dapm", parent); - if (!dapm->debugfs_dapm) { + if (IS_ERR(dapm->debugfs_dapm)) { dev_warn(dapm->dev, - "ASoC: Failed to create DAPM debugfs directory\n"); + "ASoC: Failed to create DAPM debugfs directory %ld\n", + PTR_ERR(dapm->debugfs_dapm)); return; } d = debugfs_create_file("bias_level", 0444, dapm->debugfs_dapm, dapm, &dapm_bias_fops); - if (!d) + if (IS_ERR(d)) dev_warn(dapm->dev, - "ASoC: Failed to create bias level debugfs file\n"); + "ASoC: Failed to create bias level debugfs file: %ld\n", + PTR_ERR(d)); } static void dapm_debugfs_add_widget(struct snd_soc_dapm_widget *w) @@ -2184,10 +2186,10 @@ static void dapm_debugfs_add_widget(stru d = debugfs_create_file(w->name, 0444, dapm->debugfs_dapm, w, &dapm_widget_power_fops); - if (!d) + if (IS_ERR(d)) dev_warn(w->dapm->dev, - "ASoC: Failed to create %s debugfs file\n", - w->name); + "ASoC: Failed to create %s debugfs file: %ld\n", + w->name, PTR_ERR(d)); } static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm) From patchwork Wed Jul 24 19:21:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169646 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10671500ilk; Wed, 24 Jul 2019 12:58:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBj1832IzIWYBbe3LezuagfSqfch/1Aq6k2quILPgkMFBkRbExnbEhL34lI9MPoWRY7Hll X-Received: by 2002:a65:5183:: with SMTP id h3mr82721745pgq.250.1563998291343; Wed, 24 Jul 2019 12:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563998291; cv=none; d=google.com; s=arc-20160816; b=QAbz01CKsCyzN3OfUOdC0ryJuuZibFzuSm4bUIDeuCWI+7v9t+T0R7cY5vE1+tri+N 6n+4dYOnX/rMAWYsuUlIQcyPESs0IWZletNDRRoYKiwc8puFrPqbZXkVxEoufef4I76G LgeiZsuwRojAkHh11uQ0bLH1+g+3zWVqoXWkkVMxtELeftd5sxmsxoDACiX4DZTRZF8H 8MJQq0oOQ/22za/RC6GrcIwg/PBwKUcgPPYuboC6hVx0Q690ZROla4ItwdIhxYYtmfIu 9SsMFALpiHaWIElHaxrcAGgJ4yYDD0cx+6rdcjsE+7G8/flCA5d4Mn6BzngUGRQsRbKk 2D1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J1+ZBL9OV9qV915bHuza42D7YMTZ5YpAP3HbsmGPS6o=; b=jdeiJ8qQAAksYDa6li9B/NF7y367fudaZEJfNyvbf+WXoqLYomJnRl/Rl4fC8XDg3R rAG3GkLqanpouU4kqxxn8q9T5yZ4qEqPGvynUOwV2T4/g6JE5fmTeZehguPZPe/Fvmnz vIRfY2iBFh6ZdVXAIKDjQuyxUsljGoNsO2848EsQfdKxQrjIgIXN9gzCoMS5Ufa0uSDH 8cDkZobuZ30kacpnu/RGRDCUT9TGmX2nM6Mm38VeKUKml4OZSXUB0Eggf8SCSV8wqBFF quv1wZrOCe0zcRDMD8tCzZ+IGeH2Ve3T6OJG8f2WBGMg//1kEvoFenG2a63ZQQ0E5GcR 6ioA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CdFeRLZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si14845540pfi.265.2019.07.24.12.58.11; Wed, 24 Jul 2019 12:58:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CdFeRLZM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404590AbfGXT6J (ORCPT + 29 others); Wed, 24 Jul 2019 15:58:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:44340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404463AbfGXT6H (ORCPT ); Wed, 24 Jul 2019 15:58:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4366D205C9; Wed, 24 Jul 2019 19:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998286; bh=umptgDMJtNhneGaoTDOXdRurRf8fDTFuJGUd/2Z2I84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CdFeRLZMOm5DrX5avEXCu5jpk/fqjV1woMVAU3wHfnv2i3hTWWLj7NYtFDvNH3+pa +eT2U7mwdbqegLUFvJvNloZtQmI3NCvsiawYWZpnqKTvSrxRkJB0E4lM/t/xFlo8F7 sPmWkoOcYIL/n6EQYl/XtSmBLa9hPwZB7Wb1hv+E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Linus Walleij , Olof Johansson Subject: [PATCH 5.1 313/371] ARM: dts: gemini: Set DIR-685 SPI CS as active low Date: Wed, 24 Jul 2019 21:21:05 +0200 Message-Id: <20190724191747.621408188@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij commit f90b8fda3a9d72a9422ea80ae95843697f94ea4a upstream. The SPI to the display on the DIR-685 is active low, we were just saved by the SPI library enforcing active low on everything before, so set it as active low to avoid ambiguity. Link: https://lore.kernel.org/r/20190715202101.16060-1-linus.walleij@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/gemini-dlink-dir-685.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts @@ -64,7 +64,7 @@ gpio-sck = <&gpio1 5 GPIO_ACTIVE_HIGH>; gpio-miso = <&gpio1 8 GPIO_ACTIVE_HIGH>; gpio-mosi = <&gpio1 7 GPIO_ACTIVE_HIGH>; - cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; num-chipselects = <1>; panel: display@0 { From patchwork Wed Jul 24 19:21:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 169647 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp10673216ilk; Wed, 24 Jul 2019 13:00:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTnw/hB056TFkV14m+OFQkmqi5ZSZELJaN+A1fpfuwdRG3Qz17xMXUSu+XzEudASYT6vNl X-Received: by 2002:a63:2b84:: with SMTP id r126mr38826334pgr.308.1563998415012; Wed, 24 Jul 2019 13:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563998415; cv=none; d=google.com; s=arc-20160816; b=Pg+V3J+I2j77v+IRGNDRTpSJO9N5/5wIbNoLyN5uyTpXcurp7g2E3Nv8xMInaz7T4S L3yrM41twXg9749fVYWdaVC1gjqtk3zbIJdZkylYyowi4TStS9iuqvtEcxw6md4BlkBa XnRAkusjjzxEMJoO1WNpot+FhlgRS2mvzgPK6BqPDtvz6+ndsijEn3iq4Wo/1AYj3Keo dDaeLqM31ExIwqC1CPynZ9gIHedrVeuJzoVUWWnty8/U5F5q9o7sDhthIeVkPU78jq4Y Gsya+9oFunjxSw8bxordhyKHPIWDAoDxXEy2XL0jYX42YHrGRzROgVB/M+8QC6lFF/M4 /5ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AkVstSVnl+LvYb1c0UOjGq0BUL7a9Vs2w7FlAPyr784=; b=V8Q6nGeDjrpb/xQyGb6GRRbtKJTPwXLpRdTgOCWO0fn1iBw8V5ZIyhvbJexlKZmgIM VPeeAu9zNZHYV4IH5fkJZYzl6pPipHQGLppMVDnkBXJY5qVyOBcppGSZFaElbvxtTEOI 59cuLC5pbthDVpGyWPXMtz/gODjBdV9Jb3V1M4t4OJr1Lx1DwiEgWgR51scSsMcmDxYG bwYXnhKiz6PKsxAgnmBQJbmAWG1FMDuH6A1L/jjNLG63Xdw2mfYciSb4Oa0dhDSYpoBa 6o6uRUO874HzukBhxg4a2DMMvF2jihsykFOD2YnbyFQlzxvtfKlIOnyKfS3le/jnYQt0 Dx7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0mU5Gzon; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si14254218pgk.437.2019.07.24.13.00.14; Wed, 24 Jul 2019 13:00:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0mU5Gzon; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405198AbfGXUAN (ORCPT + 29 others); Wed, 24 Jul 2019 16:00:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405181AbfGXUAJ (ORCPT ); Wed, 24 Jul 2019 16:00:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B2CD205C9; Wed, 24 Jul 2019 20:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998408; bh=KA3Z+uT9YKRz0tLsoqjBeY0+gyv4LdT1Si7fJUJ72t8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0mU5GzonPSoaN7WtRTKqM6YLfzQJuw2uXlnqHV7fmeXaf+qOyTLm0fIv5UrFv1VkX LJqb363K13MYnfIr8sUr3wNh9Dz6Ilt6RvmS3t47kgz3SOl/vZQnCev2KELMYU+5TB IIhbsZaMt34z/K2LKTgqAIikxc/yDju+P3utHbFE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jorge Ramirez-Ortiz , Bjorn Andersson , Vinod Koul , Adrian Hunter , Ulf Hansson Subject: [PATCH 5.1 356/371] mmc: sdhci-msm: fix mutex while in spinlock Date: Wed, 24 Jul 2019 21:21:48 +0200 Message-Id: <20190724191750.757264008@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jorge Ramirez-Ortiz commit 5e6b6651d22de109ebf48ca00d0373bc2c0cc080 upstream. mutexes can sleep and therefore should not be taken while holding a spinlock. move clk_get_rate (can sleep) outside the spinlock protected region. Fixes: 83736352e0ca ("mmc: sdhci-msm: Update DLL reset sequence") Cc: stable@vger.kernel.org Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Reviewed-by: Vinod Koul Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-msm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -584,11 +584,14 @@ static int msm_init_cm_dll(struct sdhci_ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host); int wait_cnt = 50; - unsigned long flags; + unsigned long flags, xo_clk = 0; u32 config; const struct sdhci_msm_offset *msm_offset = msm_host->offset; + if (msm_host->use_14lpp_dll_reset && !IS_ERR_OR_NULL(msm_host->xo_clk)) + xo_clk = clk_get_rate(msm_host->xo_clk); + spin_lock_irqsave(&host->lock, flags); /* @@ -636,10 +639,10 @@ static int msm_init_cm_dll(struct sdhci_ config &= CORE_FLL_CYCLE_CNT; if (config) mclk_freq = DIV_ROUND_CLOSEST_ULL((host->clock * 8), - clk_get_rate(msm_host->xo_clk)); + xo_clk); else mclk_freq = DIV_ROUND_CLOSEST_ULL((host->clock * 4), - clk_get_rate(msm_host->xo_clk)); + xo_clk); config = readl_relaxed(host->ioaddr + msm_offset->core_dll_config_2);