From patchwork Fri Nov 8 18:50:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 178938 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3132152ilf; Fri, 8 Nov 2019 11:01:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxSlSJdinS5OueBnOgLqRR6exQ2MTxKaYUlrVIAyGnfdZazztL1eGmpjvkWxefT2xmGs1EQ X-Received: by 2002:a05:6402:1a4f:: with SMTP id bf15mr12156861edb.160.1573239689108; Fri, 08 Nov 2019 11:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573239689; cv=none; d=google.com; s=arc-20160816; b=zhdMuBC4p6dc1A7U9xBABvbE/r8lVVQRTmhIZVSI9fFIJsi4COyNMBnpKMWSGGUFAz FiprmZcIaoK6JvBj4XIFJp0kWL6ATDJ8t01O0jczbL6jRqAwU697mJLJ3wNql/z1eIKd jfp85cOawzIpX7L6KIfjPPQaSQnkbDR1mpcJTk5TX6h/pqSWZlhsxIvWrJfkmjWQegpk 712Y5CT3qtkfiQrmUi/odGY4uaXIdmKWIE4R4gbFuGtpKsczYfOx1EAZMsn2mRBo7LM/ cbxuoCynmj+KWYEs6apgqo5LZAa4VOh8rSsX6YqJ1KEd+Gt0R029VmZyP3uS2q4uXIQV PnvQ== 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=5SVUAV4j70OChUIjaU7fXr4RiklrWY+1wgvloiRK64Y=; b=AnW1rjE63gifR/MNbP93X3tBB7GRqS244ir7EM7GdvaA+t+nEZXJblD6vN2cegxcW+ uCyaSxJVBJ43V2+TBpDrEVYRJqnsnEXGrjEkSpi29ABcB0sdXtyxO3UcGuFw04DxpGvu 1XGVkV64INl4mWKCmSHbKHzIYPe5fbCx15ZmsMtXvsXC6JnjQ9AVzg20iC6sXzMhvVKj g1ZUM9RlW31fjtaKtYPagpsKpXEbz1TrC2n0yb8oiOY0bTnc5c9jp1vQTtsfdvj5ZD2p wvVwU46FnqTjj+cD3nXcEiwA9cq5udBjAvjJwTl0SOhr0hEf+CdUNZHC56/9c9TLhoel Xrsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O1vVUv5T; 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 v27si4532928ejk.63.2019.11.08.11.01.28; Fri, 08 Nov 2019 11:01:29 -0800 (PST) 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=O1vVUv5T; 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 S2390157AbfKHTBV (ORCPT + 26 others); Fri, 8 Nov 2019 14:01:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:58612 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732355AbfKHTBQ (ORCPT ); Fri, 8 Nov 2019 14:01:16 -0500 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 D900721D7B; Fri, 8 Nov 2019 19:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573239676; bh=QqFSnW4VZGL4nSCk0yARCru6QsnD0NxO+LiLeXxNchw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O1vVUv5TLPKccXOwqQYuIgmVKUrqzih7Ytl6AlAMt35vMKe4CgFxIpZgqyFJONqAu ZH60LKfyi0AD0f/7oIQMY+4j/QkAUztCaRuLUtM+mTwJsCn/1XuiQKMEG2/nXlGhhR ga4m97T1o6oWUuK87R1lheeb4m0Vu0vpL5OrbTGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Sekhar Nori , Sasha Levin Subject: [PATCH 4.19 23/79] ARM: davinci: dm365: Fix McBSP dma_slave_map entry Date: Fri, 8 Nov 2019 19:50:03 +0100 Message-Id: <20191108174758.480429753@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191108174745.495640141@linuxfoundation.org> References: <20191108174745.495640141@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: Peter Ujfalusi [ Upstream commit 564b6bb9d42d31fc80c006658cf38940a9b99616 ] dm365 have only single McBSP, so the device name is without .0 Fixes: 0c750e1fe481d ("ARM: davinci: dm365: Add dma_slave_map to edma") Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori Signed-off-by: Sasha Levin --- arch/arm/mach-davinci/dm365.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 42665914166a3..83ca89a353002 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c @@ -458,8 +458,8 @@ static s8 dm365_queue_priority_mapping[][2] = { }; static const struct dma_slave_map dm365_edma_map[] = { - { "davinci-mcbsp.0", "tx", EDMA_FILTER_PARAM(0, 2) }, - { "davinci-mcbsp.0", "rx", EDMA_FILTER_PARAM(0, 3) }, + { "davinci-mcbsp", "tx", EDMA_FILTER_PARAM(0, 2) }, + { "davinci-mcbsp", "rx", EDMA_FILTER_PARAM(0, 3) }, { "davinci_voicecodec", "tx", EDMA_FILTER_PARAM(0, 2) }, { "davinci_voicecodec", "rx", EDMA_FILTER_PARAM(0, 3) }, { "spi_davinci.2", "tx", EDMA_FILTER_PARAM(0, 10) }, From patchwork Fri Nov 8 18:50:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 178939 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3136393ilf; Fri, 8 Nov 2019 11:04:20 -0800 (PST) X-Google-Smtp-Source: APXvYqz5CZ8gjZySqYXACeFp7VkhcjVGFtZ4mIlTrC1vaB3LzrPKWW8H06kiCrmy6QbMxlh4QoIM X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr10434423ejj.55.1573239860258; Fri, 08 Nov 2019 11:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573239860; cv=none; d=google.com; s=arc-20160816; b=Vq6mJ6PnfQ539npcsdnEi4l7yOBB/4ZkwFQ0avt+pzi7tIlsLhRnWXuTNSHTJu3Svb mD3S4/UKpYRJScCnhLDCFrYGSbN8b4WSo07o+9zlejfvBc3X6HWbyFyfHJWlfHH0NyQL XXk3LJqQ4sIYzK+/0+lruOiB2Pt4uCbojJD4rIGi5X4AkrxfquwXPFuDv087BoRWh79y bn5ypZYQEarC7PR9y+eOsV2Agzdw82yDpov1X2G6weX/HZlAhx5Sv3s7OMG7Ucsx6JtA V8msTtBhynrL6GCD1No/cYCz5OS2qhsrip5KEoFKWCIcwK3hyNRZEsOuxz7uIpI0ycjp VlVg== 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=UkuUeqWJcTSE8JVmadVn9G9An9NolDbtQGssTYhYzrE=; b=cY/hIGJl5y964ZCDT+P90epqaMd4TAMGcwXoucfnpXB8IKkKnyCZ1WQAAwawjcYDB1 dghHtNULKIJoUn7b1bpl1egZls3MkGVJxILafvbiAz3DyoGTBtHHClm2AjVESt8m+aRz 3zMsKFuTwAL5XpqudWe5dsCFSEafooIvP7Js1N3qU6UOGecuicM1qlGW04ZAfNhW2kYA x+5xFPDPmv44iFuRMQNn4WkntK5d+myejVQBmjBp4BKU1DxqCc65aFUxlmuS4oDDa90Y EhX4YUZ+jwHotLZ8V7oPn1wuKqBKmB4c9H5xMpbjmpCxRmRT1SRY1R9o3BIQc/O3dpet kVXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HCnaHklP; 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 p21si4878964edc.305.2019.11.08.11.04.20; Fri, 08 Nov 2019 11:04:20 -0800 (PST) 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=HCnaHklP; 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 S2390987AbfKHTEQ (ORCPT + 26 others); Fri, 8 Nov 2019 14:04:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:34088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732428AbfKHTEP (ORCPT ); Fri, 8 Nov 2019 14:04:15 -0500 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 04E282067B; Fri, 8 Nov 2019 19:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573239854; bh=zy4tbe8pw1MO7Bj4qek8GqStWBL+RTXZSE5eYlxDNkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCnaHklPiBqmaud6hLe+Bs1FpvuzA17jx7xiPY6IbzFizk61HW6Snnep3sMcXNtcq jd8w9AETkzRy8L784nLbvvW+S11tFl18ZUBnHgsKFQRra479J2JPCS4Xfh31+8N7Fl yUm4A/nhri1TThvV3zKD2q5etTM3O9tZSOdGnkbQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Ujfalusi , Mark Brown , Mathieu Poirier Subject: [PATCH 4.19 77/79] ASoC: pcm3168a: The codec does not support S32_LE Date: Fri, 8 Nov 2019 19:50:57 +0100 Message-Id: <20191108174829.033434277@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191108174745.495640141@linuxfoundation.org> References: <20191108174745.495640141@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: Peter Ujfalusi commit 7b2db65b59c30d58c129d3c8b2101feca686155a upstream. 24 bits is supported in all modes and 16 bit only when the codec is slave and the DAI is set to RIGHT_J. Remove the unsupported sample format. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20190919071652.31724-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/pcm3168a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -24,8 +24,7 @@ #define PCM3168A_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S24_3LE | \ - SNDRV_PCM_FMTBIT_S24_LE | \ - SNDRV_PCM_FMTBIT_S32_LE) + SNDRV_PCM_FMTBIT_S24_LE) #define PCM3168A_FMT_I2S 0x0 #define PCM3168A_FMT_LEFT_J 0x1 From patchwork Fri Nov 8 18:50:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 178941 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3136796ilf; Fri, 8 Nov 2019 11:04:39 -0800 (PST) X-Google-Smtp-Source: APXvYqy5q84/q7njj7+1+XZT4NIJbvvkTnRN90X/ike7okRzZ1GDa6xHRNWgDNT7Rs9DvSv5g7i8 X-Received: by 2002:a05:6402:13d4:: with SMTP id a20mr12120223edx.105.1573239879198; Fri, 08 Nov 2019 11:04:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573239879; cv=none; d=google.com; s=arc-20160816; b=SQiun6uQMIsJtK/xMH7ED4wYgbuuXRQUeaZArEoTZMf2y/n1OEM7hSeEFAUuXRbIpr GMXrtL8IemsLlwLkI3M4VCf2CAcG6niHZn2FDPDMT1OlaPUgtjZtB7m4jwypjCQtRhox tXZ9ZFSGHCzKarqNqtN9WuD2JL9HFhDnsln4WdjwsreFt2mv8r/FXa3abfOU9ndkvBC8 XJMVCaxCkYzzrs8Uh2NgXz4uHNxaJm4FUu12DaUFbW+p4Kts4xCSaXX6W1o5pJ9vIHRe Mg6Rt8S9ZjSnsKR0NLgdh97O/ha8sXdy2DmJBqJDTxt0RZMo63h7DGfv93lK5TbAJBVA io4A== 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=Ea8eOwKJYznyB/azB+xahcCoazucz3O//emYCAROR8E=; b=0krTc+GYJ96BMlsSG4bnfkgfQkQR6MVxgK9lcZ9vppBCiUe3vSgC16Rsi6Wb7evg4p Y9WKTNpuZpIc9K/Sf0o0l2u7yOVDcAtnwiep/xaXdEx8AtwOg/8mcZgTSNE+XkeDBb2N FlDKT7IeFfx0OGoyB9zzm5htxErEk9yFjxO4vj9iTQ+IM9InTh3UmMhyBoO+HUiXtMSt OxNKEbGm6GRv4xJQI9Xy3/6fKJQtUvktYa2NEfsfCFxSZsZXWedJ9cW3kU8KJqzweIPI J2pzRObM7s36A73kvzdVieUnkAztwPmlZu9KpqyPoTk1YRRKTTt1T4tQAdVym0rDH/Gg fJsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2hY34G5E; 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 f2si3961190ejr.260.2019.11.08.11.04.38; Fri, 08 Nov 2019 11:04:39 -0800 (PST) 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=2hY34G5E; 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 S2391012AbfKHTE3 (ORCPT + 26 others); Fri, 8 Nov 2019 14:04:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:34138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389782AbfKHTEY (ORCPT ); Fri, 8 Nov 2019 14:04:24 -0500 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 BA4802067B; Fri, 8 Nov 2019 19:04:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573239857; bh=dwVpEfb1cMtg/YqXg8bKLMmHaJGWaMQOLmtkdsLAl14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2hY34G5EBCg0cBDkxIAIc3woNLlQUqsXiEKqjWaG0thPpIxD5xJoay1M0yMIS9ca5 HqAexmDgHRKbljJxMhIM+fUFXKNWH7Zl2l8PJksjHSwrLh6VHP5t8pTGkrcbO8apkz Syi4HQfOAwEwLAisYhiU1Dv+nvQ9hA5eGtnYPnIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert Tivy , Suman Anna , Tero Kristo , Mathieu Poirier Subject: [PATCH 4.19 78/79] arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address Date: Fri, 8 Nov 2019 19:50:58 +0100 Message-Id: <20191108174829.580847686@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191108174745.495640141@linuxfoundation.org> References: <20191108174745.495640141@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: Suman Anna commit 389ce1a7c5279ebfb682fab220b4021b2bd49c8b upstream. The gic-its node unit-address has an additional zero compared to the actual reg value. Fix it. Fixes: ea47eed33a3f ("arm64: dts: ti: Add Support for AM654 SoC") Reported-by: Robert Tivy Signed-off-by: Suman Anna Signed-off-by: Tero Kristo Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi @@ -21,7 +21,7 @@ */ interrupts = ; - gic_its: gic-its@18200000 { + gic_its: gic-its@1820000 { compatible = "arm,gic-v3-its"; reg = <0x01820000 0x10000>; msi-controller; From patchwork Fri Nov 8 18:50:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 178940 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3136569ilf; Fri, 8 Nov 2019 11:04:28 -0800 (PST) X-Google-Smtp-Source: APXvYqyNXwlnUHS0iy8bRo8JE2BOx4P9Rc/E6n5ugZBttmI4TEvW1bRYXc/qHzDFPFzBIsGdvm3x X-Received: by 2002:a1c:40c1:: with SMTP id n184mr10218119wma.116.1573239868787; Fri, 08 Nov 2019 11:04:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573239868; cv=none; d=google.com; s=arc-20160816; b=TNRLlXDEsqkICnJBkKNBwST0zJJZWnG+S/tMvdAgxzj/s8mRxKvpmnKSDIZUBEzGqK 8U6oulPOirr5WKS8ZCU476vTvTXd0WNBYyIpgHPYwkTbZdc5KdSo1kdTJ4Hp9ZqrnLWd 1AW/GuhjZ6g26LX9aR8CYtzk8aowLhagCJNicvmoxjN5Ng84e7Wfxbj8fLXZDQTzLecK WoDca53pHh9X/a2+36opJBx+JN3dPfPEeX7R5G7znz5Gfcyl8bfkJBUQYSAzr7z7a2/I IN00QdNZrd3bCaFiBzs2VWRiyE0eMPquw5ym8C++DuVDN59y4okSvM+ZXf5/WjyZ5i2Z KzBA== 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=SGMyleZ8E58got52lPbFMD66bBffk/BBMqwgaGLsSmo=; b=XVXw9Uofi5mTzFJdT1CwO8uDc4j2GdguLYc2YiPY4+m6lq06K4n7sRjmXe4bE33cS2 zHoYO3havQtirCEJWd7pJVa8g2joNVzUoLPKmm9HWTwDtcbQf7PDfYPV0+vwJNoavzfe JKbcXr1iMkUhzbx74Hl4bhOYUuCTHASakDYmBVNVL9qew9r4sZzZAOWQPCrVTfQ+LKeD AEHxjVrODIoeHNervHfoVy6rDqL4XvpSAgsBmyf9WWOzMR3RaNEejPKZlfpGxdPc9MPd 71JBthXBX8GK4BRLHjVPmf6wE/NNmDbu6BBdap35U28nVtygH/XIxHeGbwBAU2hZUlBs RIMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1L2sbc+6; 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 p21si4878964edc.305.2019.11.08.11.04.28; Fri, 08 Nov 2019 11:04:28 -0800 (PST) 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=1L2sbc+6; 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 S2390992AbfKHTE1 (ORCPT + 26 others); Fri, 8 Nov 2019 14:04:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:34220 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388466AbfKHTEY (ORCPT ); Fri, 8 Nov 2019 14:04:24 -0500 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 D4B11214DB; Fri, 8 Nov 2019 19:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573239860; bh=v6nFBkWHje+2l2y3JQvhgZHFjpuNz+PM0WRCuLYQOo0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1L2sbc+6YtL8GzPTy7d0+D9oybGGy3JjEhaggZVYZcpr0fuEZyAuT6P6lCiEfr7ME DzHqzXhfrU/qzMhx8Ahsqm3gsQdOLa3zdeqivSepeWNGvTgb6QBux8ku2V9am6qfoW ncEHxCHLw/2t04yD/ol/ne5txCdlIJQ18PH8BYHs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Roger Quadros , Felipe Balbi , Mathieu Poirier Subject: [PATCH 4.19 79/79] usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails Date: Fri, 8 Nov 2019 19:50:59 +0100 Message-Id: <20191108174829.668154458@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191108174745.495640141@linuxfoundation.org> References: <20191108174745.495640141@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: Roger Quadros commit 163be6ff7739b12ff300d77897d340f661821da2 upstream. If a gadget driver is in the pending drivers list, a UDC becomes available and udc_bind_to_driver() fails, then it gets deleted from the pending list. i.e. list_del(&driver->pending) in check_pending_gadget_drivers(). Then if that gadget driver is unregistered, usb_gadget_unregister_driver() does a list_del(&driver->pending) again thus causing a page fault as that list entry has been poisoned by the previous list_del(). Fix this by using list_del_init() instead of list_del() in check_pending_gadget_drivers(). Test case: - Make sure no UDC is available - modprobe g_mass_storage file=wrongfile - Load UDC driver so it becomes available lun0: unable to open backing file: wrongfile - modprobe -r g_mass_storage [ 60.900431] Unable to handle kernel paging request at virtual address dead000000000108 [ 60.908346] Mem abort info: [ 60.911145] ESR = 0x96000044 [ 60.914227] Exception class = DABT (current EL), IL = 32 bits [ 60.920162] SET = 0, FnV = 0 [ 60.923217] EA = 0, S1PTW = 0 [ 60.926354] Data abort info: [ 60.929228] ISV = 0, ISS = 0x00000044 [ 60.933058] CM = 0, WnR = 1 [ 60.936011] [dead000000000108] address between user and kernel address ranges [ 60.943136] Internal error: Oops: 96000044 [#1] PREEMPT SMP [ 60.948691] Modules linked in: g_mass_storage(-) usb_f_mass_storage libcomposite xhci_plat_hcd xhci_hcd usbcore ti_am335x_adc kfifo_buf omap_rng cdns3 rng_core udc_core crc32_ce xfrm_user crct10dif_ce snd_so6 [ 60.993995] Process modprobe (pid: 834, stack limit = 0x00000000c2aebc69) [ 61.000765] CPU: 0 PID: 834 Comm: modprobe Not tainted 4.19.59-01963-g065f42a60499 #92 [ 61.008658] Hardware name: Texas Instruments SoC (DT) [ 61.014472] pstate: 60000005 (nZCv daif -PAN -UAO) [ 61.019253] pc : usb_gadget_unregister_driver+0x7c/0x108 [udc_core] [ 61.025503] lr : usb_gadget_unregister_driver+0x30/0x108 [udc_core] [ 61.031750] sp : ffff00001338fda0 [ 61.035049] x29: ffff00001338fda0 x28: ffff800846d40000 [ 61.040346] x27: 0000000000000000 x26: 0000000000000000 [ 61.045642] x25: 0000000056000000 x24: 0000000000000800 [ 61.050938] x23: ffff000008d7b0d0 x22: ffff0000088b07c8 [ 61.056234] x21: ffff000001100000 x20: ffff000002020260 [ 61.061530] x19: ffff0000010ffd28 x18: 0000000000000000 [ 61.066825] x17: 0000000000000000 x16: 0000000000000000 [ 61.072121] x15: 0000000000000000 x14: 0000000000000000 [ 61.077417] x13: ffff000000000000 x12: ffffffffffffffff [ 61.082712] x11: 0000000000000030 x10: 7f7f7f7f7f7f7f7f [ 61.088008] x9 : fefefefefefefeff x8 : 0000000000000000 [ 61.093304] x7 : ffffffffffffffff x6 : 000000000000ffff [ 61.098599] x5 : 8080000000000000 x4 : 0000000000000000 [ 61.103895] x3 : ffff000001100020 x2 : ffff800846d40000 [ 61.109190] x1 : dead000000000100 x0 : dead000000000200 [ 61.114486] Call trace: [ 61.116922] usb_gadget_unregister_driver+0x7c/0x108 [udc_core] [ 61.122828] usb_composite_unregister+0x10/0x18 [libcomposite] [ 61.128643] msg_cleanup+0x18/0xfce0 [g_mass_storage] [ 61.133682] __arm64_sys_delete_module+0x17c/0x1f0 [ 61.138458] el0_svc_common+0x90/0x158 [ 61.142192] el0_svc_handler+0x2c/0x80 [ 61.145926] el0_svc+0x8/0xc [ 61.148794] Code: eb03003f d10be033 54ffff21 a94d0281 (f9000420) [ 61.154869] ---[ end trace afb22e9b637bd9a7 ]--- Segmentation fault Acked-by: Alan Stern Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -1149,7 +1149,7 @@ static int check_pending_gadget_drivers( dev_name(&udc->dev)) == 0) { ret = udc_bind_to_driver(udc, driver); if (ret != -EPROBE_DEFER) - list_del(&driver->pending); + list_del_init(&driver->pending); break; }