From patchwork Thu Apr 2 19:12:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228254 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DDA9C43331 for ; Thu, 2 Apr 2020 19:11:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54F2520719 for ; Thu, 2 Apr 2020 19:11:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eNn4Mp8o" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389086AbgDBTLb (ORCPT ); Thu, 2 Apr 2020 15:11:31 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45828 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388862AbgDBTLa (ORCPT ); Thu, 2 Apr 2020 15:11:30 -0400 Received: by mail-wr1-f65.google.com with SMTP id t7so5533382wrw.12 for ; Thu, 02 Apr 2020 12:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=j0HDrtJ40KGmrEyhgHoOvV9sWkXPbMSoXXYHiNuzqAk=; b=eNn4Mp8oJ024yJBucYA9tWm9H0uF397pe4c8k4Uponeuvhb/AxEhgVGSaxdacnysZQ z3ZsF45MY3fpdqjI2m6rquBup8iVibJd9fh+7+LfgYWMeDts7R7LCDPUfJeW2wW4ayhA LSh1nL3rfTwT3Bqb6dJp9+uOwr6eUWrHOLslgzDFpi0b7CGUTk+RZdKAks42zJNCfC8e v3o9FKra619lN7zmjF+gHID/b7Cjq9C9zcsTZcp78xMcJBafvILNgm+6F496WN1znxZZ lBVGG7esAcvQ2c9ltmUhm5PYXaUoqt1txIAJhacRnxqNlD3BnUGJbccZDOE8hrSVYJ0J p09Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=j0HDrtJ40KGmrEyhgHoOvV9sWkXPbMSoXXYHiNuzqAk=; b=GWICX3y56eu9sYPR9dpfj5y7Ki6Pd4tRRAj/5Pr2JzxkIj3PWswjEU9dZoXSZkbpD7 zbQd4bewjovCfzxwMcNB9pT/hPtZpr3fB3myfH62/0m/a7d9UR6oKWgf/HI1C7FZR+hq KIGjJcuQcGP5zycOLmq8jXUJVYv5pfM7HXcaoPhGEIfWijvfZhtevW0g+zDZiYFZJrpH 5CsilOvQuNGBOnDJyzWm1nD4STrM3plyUdqOGzO4KMgXDpc9j66vYk2QxiiFaq3HSRRS fScXruWOkmitgJEunJez8PNt5Aw0LmYTINQolkTtfqMXmXyADQWjxU1J3WnHzrBcz7aD CSSw== X-Gm-Message-State: AGi0Pub/INZqjrFzBRlJXpTGn9//NjZwJWbHYjmlvhJD+b5GBGaEtCoV IYe22vIx69Lm7PMjVDlYze6WBkgqGW8hpg== X-Google-Smtp-Source: APiQypKjF2Hj85dBFTOHYy1Bf+xTgqi89lsutY9GXwH/nF3fcz97O+/NnXxITgLS75AUeVu8fB6u4w== X-Received: by 2002:adf:f1c2:: with SMTP id z2mr5194765wro.40.1585854687383; Thu, 02 Apr 2020 12:11:27 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:26 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 01/14] clk: qcom: rcg: Return failure for RCG update Date: Thu, 2 Apr 2020 20:12:07 +0100 Message-Id: <20200402191220.787381-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Taniya Das [ Upstream commit 21ea4b62e1f3dc258001a68da98c9663a9dbd6c7 ] In case of update config failure, return -EBUSY, so that consumers could handle the failure gracefully. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1557339895-21952-2-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd Signed-off-by: Lee Jones --- drivers/clk/qcom/clk-rcg2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index ee693e15d9ebc..f420f0c968775 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -105,7 +105,7 @@ static int update_config(struct clk_rcg2 *rcg) } WARN(1, "%s: rcg didn't update its configuration.", name); - return 0; + return -EBUSY; } static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index) From patchwork Thu Apr 2 19:12:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC5DC2BA18 for ; Thu, 2 Apr 2020 19:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BA9120719 for ; Thu, 2 Apr 2020 19:11:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nRTlfCtx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389092AbgDBTLc (ORCPT ); Thu, 2 Apr 2020 15:11:32 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42517 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389074AbgDBTLb (ORCPT ); Thu, 2 Apr 2020 15:11:31 -0400 Received: by mail-wr1-f66.google.com with SMTP id h15so5559785wrx.9 for ; Thu, 02 Apr 2020 12:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=+qhXDspqzMy/AjzcIY5DO4b+V5ek/qsdVK5p3wmyDGc=; b=nRTlfCtxh8R+Xsr8S/GGhQawNSlBDgKQDrA81PnsqxO8bll9BdxG2OdHpZGEJbm/ZD mzACxZTy1SoQj++8D1dVc3XqZgEWi2YCmbCRGj1vzEUovvt/W4wCeUJutdTAS4eNEPND g5yCFm4Oq7rmqYuuG3YIPHbF2WBpBP9NIIix4WRMQiu2hnFp8AiNFsyWMB9nK6fpQIWw bunxAGmtnSERUgoThBIoRqD4nPm3vIkwCrhtDsvrc6puGiiFcJb5OM6+/FVM/DAZEY9D /l+TX30Se7021Id0x7/qIyQybcLliMwC/yCqwBjFTuvHzlELWn7MLb1bRQ4iZt8Ckeun e0Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+qhXDspqzMy/AjzcIY5DO4b+V5ek/qsdVK5p3wmyDGc=; b=BqWECWiFSa/6ajNAk+z/3eU+9a9O46GV2kGEuWY3Jl1pE79diDkfGvhgwDZvMAxbTH 2oQm1rTqWr2mrEwitcgcMTqwz7+u8wDx6QkVca0leOD2gLf5it1+ILsiK34Q6V0UY5a2 KYHtg674rfLGDBJD1LwOn5jRCizduwbJyZeoTSWfWUABnXr5saWEDrOOrq/MS5wamzwO aoeVhgtnoYHUPgvlmuQ0uj2LT3c+etj8A4I6C8W4KcJXgXxgFbK5EdQWIwfSwcEOzqCP skYSOKvqiKb4GM5+pm2ZmHfhEYt/9hZC6ch6HQSWG3p5tJocQEzuXmsmTk093B1iEG0N YiTw== X-Gm-Message-State: AGi0PuY/LKXVbemVkHIp+bHHt5II37Yhoy9d0YN351c2vWtvOsr3lGMR 66ztml9lHk8s779+kA/LIZmsXaDkw2daFw== X-Google-Smtp-Source: APiQypJ7iSyoLb4OfeEET68pkp5ItMoMPynZI9EqngYhJX3pJniJa9AjKMhYf3QGzdpsaK4Lp4U4pA== X-Received: by 2002:adf:ff8b:: with SMTP id j11mr5215654wrr.117.1585854689602; Thu, 02 Apr 2020 12:11:29 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:28 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 03/14] arm64: Fix size of __early_cpu_boot_status Date: Thu, 2 Apr 2020 20:12:09 +0100 Message-Id: <20200402191220.787381-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arun KS [ Upstream commit 61cf61d81e326163ce1557ceccfca76e11d0e57c ] __early_cpu_boot_status is of type long. Use quad assembler directive to allocate proper size. Acked-by: Mark Rutland Signed-off-by: Arun KS Signed-off-by: Will Deacon Signed-off-by: Lee Jones --- arch/arm64/kernel/head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 06058fba5f86c..d22ab8d9edc95 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -667,7 +667,7 @@ ENTRY(__boot_cpu_mode) * with MMU turned off. */ ENTRY(__early_cpu_boot_status) - .long 0 + .quad 0 .popsection From patchwork Thu Apr 2 19:12:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3D30C43331 for ; Thu, 2 Apr 2020 19:11:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8BFE320719 for ; Thu, 2 Apr 2020 19:11:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JvXVuFjJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389155AbgDBTLe (ORCPT ); Thu, 2 Apr 2020 15:11:34 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41573 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731689AbgDBTLe (ORCPT ); Thu, 2 Apr 2020 15:11:34 -0400 Received: by mail-wr1-f65.google.com with SMTP id h9so5579666wrc.8 for ; Thu, 02 Apr 2020 12:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=u/8Oj2Ff4RNeFgOmfCdgYmb1Rv0nrDRFoL1TCNAUQ/o=; b=JvXVuFjJNiudwYQJwM3L7Jke5bLiUlsCa+y+LtVQvhAutACNI7kv6N/6jG57CrFkpl rIwvK8v2AZaOLUqzAU2mMg5e4mnJ4zDnq7SwpEWbGAncf9qxxqsb/VPgcQhQ5XvOdu3h krUxV0HwAuifQvlxoSZScc/YVpNfC+4wATxlDwNvVS7Gu3jzzauYn4nTvYKIeIaYx1op 1+/jKxeiiwzL5NsMbRaeNNC78uupV91wa11e8tiIUCx1uVQR2G1XgfjVz00VM5T/7DDT ZqlgYawku68GavMfGCmFi41WNPDlK6E/plgDITCiOP4zeKDnZng4Lg3sNJyEenfSXNBw zqhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u/8Oj2Ff4RNeFgOmfCdgYmb1Rv0nrDRFoL1TCNAUQ/o=; b=s2ypudpy0SN7e3Fpf6sEiEktxA180Jhsoknl1B0k6OkRLA/p06aZ90UJk095LoSu7z NRkmbHfuboqdRR0cprVJQ8hdgG/h/5C3UDxG9y+27O30tUkKADe+PVGw8flBQVWVcAex Fig21GuPd7BwkbRTPKsJShWXHNJGlEEQUtf8wtue24H4qsOinCeLZ6eByD6YCoIM/NN0 hq6IhVwbCG0wHMP4S7PmaovEZIPKWVZ0OEjJ3Lw1OfPU77TygfthSnbVq5ZYJb2oCjmk f5dUrf8dUJN1JCUaSanwP8Cu9VqYCA7EknQRmWPNYXypCAQxvLMY+KBKWerLsUlDA1+0 PetA== X-Gm-Message-State: AGi0PuZ3cuSClofWo2bUZjkTFPGNcFNwPKiRsz4wrxGJQQFxYvNABH3l lRVlc1pB9I/ZpblK6SolWZ0zRst2UFXfWw== X-Google-Smtp-Source: APiQypLFNa0iq7FcJIsNnR0q+E2j2o7kKhdFBPxwEhRWY0x22Ax8qUNIEA1qWVfl+NNn9FY0tHMS0Q== X-Received: by 2002:adf:b189:: with SMTP id q9mr4629573wra.373.1585854691656; Thu, 02 Apr 2020 12:11:31 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:30 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 05/14] wil6210: check rx_buff_mgmt before accessing it Date: Thu, 2 Apr 2020 20:12:11 +0100 Message-Id: <20200402191220.787381-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dedy Lansky [ Upstream commit d6a553c0c61b0b0219764e4d4fc14e385085f374 ] Make sure rx_buff_mgmt is initialized before accessing it. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones --- drivers/net/wireless/ath/wil6210/txrx_edma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c index 5fa8d6ad66482..03d0e6c550b98 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.c +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c @@ -268,6 +268,9 @@ static void wil_move_all_rx_buff_to_free_list(struct wil6210_priv *wil, struct list_head *active = &wil->rx_buff_mgmt.active; dma_addr_t pa; + if (!wil->rx_buff_mgmt.buff_arr) + return; + while (!list_empty(active)) { struct wil_rx_buff *rx_buff = list_first_entry(active, struct wil_rx_buff, list); From patchwork Thu Apr 2 19:12:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB49FC43331 for ; Thu, 2 Apr 2020 19:11:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEE7520719 for ; Thu, 2 Apr 2020 19:11:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fYhkKqZm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389224AbgDBTLj (ORCPT ); Thu, 2 Apr 2020 15:11:39 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55493 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731689AbgDBTLj (ORCPT ); Thu, 2 Apr 2020 15:11:39 -0400 Received: by mail-wm1-f66.google.com with SMTP id r16so4609259wmg.5 for ; Thu, 02 Apr 2020 12:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rizpshgRSVswJNtjW2UZ/pm8CNXM39+z2QpqQR8eHr8=; b=fYhkKqZm/pPmdPk67spI3EjYS3skZCNKAxBDtNoWwknyhXMVs1QLwn6rj7OZNAMeM8 vdttxOkxxbBZI3XAaazlVKJw6wHKiq1a2bNzROdl1Fg+uNTXb/sJO5kiE2fi+oX0B9Y1 mQhKkY/v2/YpYMAxeMokI1HOOXaOZyMKHqQlKZvcz0uK1f2ypI0xYJIBA3hQ4GriZNm9 jlxO0UjCt+DuElLOP4IFzcnWlwn1aHEs1j6iSPpiG7Tk6uQzfKl1DLRlnXUck1OPUJFz 3h65rmYjcVm5rCCq8rjb4mfHxCh/KE9drl4Wm/+DJZ8mcQFVNnmAdXjW47Gn7uv/9hM7 8hRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rizpshgRSVswJNtjW2UZ/pm8CNXM39+z2QpqQR8eHr8=; b=NRGHH2o0lWnpoDZf8aFLqKT649TDR7vaZP2zOaBYWP5po8In2Kaxr2yeQGSqxbs7Ed tTpBE9QUp/wZc0GMhmfNqQZz/1EE+2qLYv1zhMeutbnvMSwysCrgOTAdUwA5fzHyj9tU mXoB3v7kMGxregkBHm9CKht+Sl/90RqWGSeEqi4YB57H6F9tSyf5wLKo+mw5Mqdoiq7Y nXXRC0K3dVmgG/Vmns189j5GTy4Od05evqiknM45eAeOMrFmHHUPibIfft/kDvakGQFj 5jOZBzE7+frgTZhYsI2Sw/YfZ99bfsIl0Q4YEi1feuYjab+d0rfXnzMyQ6S0u/MXnam8 h0gw== X-Gm-Message-State: AGi0PuZTH/xU3uletRMkXp7FQWL/C2MdC7tGVySX9qizJZm+wABQr0Lh juRXSxr9aD47O8TqPgM9TYIkJHvRzIMQiA== X-Google-Smtp-Source: APiQypJflW9Wbdga//xMAXLUIXGFXs9d4XFyVNilxNCUeuhYZUjnDNQe6rBI27dVKyapvNm9QnBhkg== X-Received: by 2002:a1c:41d4:: with SMTP id o203mr4652372wma.1.1585854694388; Thu, 02 Apr 2020 12:11:34 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:33 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 07/14] wil6210: add general initialization/size checks Date: Thu, 2 Apr 2020 20:12:13 +0100 Message-Id: <20200402191220.787381-7-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexei Avshalom Lazar [ Upstream commit ac0e541ab2f2951845acee784ef487be40fb4c77 ] Initialize unset variable, and verify that mid is valid. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Lee Jones --- drivers/net/wireless/ath/wil6210/debugfs.c | 2 ++ drivers/net/wireless/ath/wil6210/wmi.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c index 44296c0159252..acd95ca0430b9 100644 --- a/drivers/net/wireless/ath/wil6210/debugfs.c +++ b/drivers/net/wireless/ath/wil6210/debugfs.c @@ -991,6 +991,8 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf, int rc; void *frame; + memset(¶ms, 0, sizeof(params)); + if (!len) return -EINVAL; diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 8a603432f5317..3928b13ae0266 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -2802,7 +2802,7 @@ static void wmi_event_handle(struct wil6210_priv *wil, if (mid == MID_BROADCAST) mid = 0; - if (mid >= wil->max_vifs) { + if (mid >= ARRAY_SIZE(wil->vifs) || mid >= wil->max_vifs) { wil_dbg_wmi(wil, "invalid mid %d, event skipped\n", mid); return; From patchwork Thu Apr 2 19:12:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C623C2BA18 for ; Thu, 2 Apr 2020 19:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3390920737 for ; Thu, 2 Apr 2020 19:11:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uFy/GCfG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389109AbgDBTLk (ORCPT ); Thu, 2 Apr 2020 15:11:40 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50680 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731689AbgDBTLk (ORCPT ); Thu, 2 Apr 2020 15:11:40 -0400 Received: by mail-wm1-f66.google.com with SMTP id t128so4646402wma.0 for ; Thu, 02 Apr 2020 12:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Jummrcf5rvKAi6eH2KyVwYJGqNxV7PrPZlMxGnwq5Ts=; b=uFy/GCfGdxFp2lryU43f5joIxwAkP+0y5u8w2OaclI2U1iFS0lteQiiS4s+Ao+X6C1 OQXH8Z5N0YGhAckdFWoCD60dxsTZDEvAbgBF5n27CqOgGAHKcJh36oyisayOIVZMJbnb jFddnNzLrmCSkc5AeMZ6v4HHcaHwP+XI4UcO1gOIkk/Ygzjl6alnKOmUvHDlVkP5Bc4c 1PIUS9YC30zYsithwh5j7TvsmXp3dRK6/qH3BSbHx0ZHyzXCdsne/+eV+HvzTyqUvr9E 4wBzcGbcWNlnmgfnw04Qvqmnsgba2ixXcPipm4hirW/w74Z1GZravr4Twu0jRLKZaomd bPEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Jummrcf5rvKAi6eH2KyVwYJGqNxV7PrPZlMxGnwq5Ts=; b=X/bU6po4AimDl6NxgX7sEeWkwInd0ypIAxfX5gJh022Z+EFSaprbe3WkX3nBei7HzJ gdGINoxPJC7XbkME4MFvF+O4Ih55i3bHjLJH6MVguTmLxpHfnRXl/wd9EeToYdMeDTPE /eALKpuMGYJQcK15vSX8JSsWQ5ycN9Xw3CzeKcUcu0jjQ/VX5SfIXwG71GUiT6d8DJfE mRauCIs0rbnCB2EGl/NM9rdUVdWjKeJT3mDpfGco9UIYvElKaKFG/wMfbuPKNmV+YTh4 T5aAprd0sOmJWZK8PkkDNIhtvng90mV9HcFYVjLOvdmBN4x0PxDM4Q8lpFaVBYANq1qm IgWw== X-Gm-Message-State: AGi0PubyLWdT8w39Vj3JyZ/SpO4FoV/WBKsd4o6NjE2D5NmjlLjQRWY8 pi73CG2hhPYjwBPqKBFi9ztOa+VioMEOfw== X-Google-Smtp-Source: APiQypK15qQS8QfvOaOTO5oUSlCHjy5bGszydTXCBRWiPzNJwrSqI/ak0pPcUKbCZMGfqUGwAyk+Wg== X-Received: by 2002:a1c:b743:: with SMTP id h64mr4803580wmf.88.1585854696559; Thu, 02 Apr 2020 12:11:36 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:35 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 09/14] rpmsg: glink: Remove chunk size word align warning Date: Thu, 2 Apr 2020 20:12:15 +0100 Message-Id: <20200402191220.787381-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chris Lew [ Upstream commit f0beb4ba9b185d497c8efe7b349363700092aee0 ] It is possible for the chunk sizes coming from the non RPM remote procs to not be word aligned. Remove the alignment warning and continue to read from the FIFO so execution is not stalled. Signed-off-by: Chris Lew Signed-off-by: Arun Kumar Neelakantam Signed-off-by: Bjorn Andersson Signed-off-by: Lee Jones --- drivers/rpmsg/qcom_glink_native.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 25c394a7077b8..facc577ab0acc 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -813,9 +813,6 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail) return -EAGAIN; } - if (WARN(chunk_size % 4, "Incoming data must be word aligned\n")) - return -EINVAL; - rcid = le16_to_cpu(hdr.msg.param1); spin_lock_irqsave(&glink->idr_lock, flags); channel = idr_find(&glink->rcids, rcid); From patchwork Thu Apr 2 19:12:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1718CC43331 for ; Thu, 2 Apr 2020 19:11:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E462120719 for ; Thu, 2 Apr 2020 19:11:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kho8ap0J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731689AbgDBTLl (ORCPT ); Thu, 2 Apr 2020 15:11:41 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43260 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731892AbgDBTLl (ORCPT ); Thu, 2 Apr 2020 15:11:41 -0400 Received: by mail-wr1-f68.google.com with SMTP id 91so3638153wri.10 for ; Thu, 02 Apr 2020 12:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bQSVQUznH72WQBKL04U2uoQruvsVD6tJ6h7LJtSHrIo=; b=kho8ap0JYcgB9oWLy3A7108PGVWxZvJV1ULlUNbQ0QdD5X1gb+a+aP+cfUo+MmGbzM ASSqq734wF1sXcv8uymzczG3nt61zBvpb5I7/uhxbRxijDtrZWxChIvWKPI+1peiCxG6 TDoSJ67rzfbkgDEVnPMwcXCB1j8fLy2d+QDl29AC4mb5LEEx2sUuLk72pUa/LPP8r41U YmdpCYYqbB0DoqX7fXOZfOmrXUUIes6yonERyllxXGU95S+ljhXg0kXldfjzK5C4jKMR Nb1/Vhcm3iYSBB0VpDY8dL74DZvtoysmoA5gtu7Lo3WjoAUWvAp0zXnzLBe+Bg6KKSpB 6MUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bQSVQUznH72WQBKL04U2uoQruvsVD6tJ6h7LJtSHrIo=; b=W+mtahxXqyXg/VR+B7ZZI3EI0ybyNRMYHog5UQu9zrG0FijHIzjvakWrEmd0/oC7G7 a3voAJHUaTrnEVrHCNFoxWedbZiYRfIhXqoeRqC1lmRMiTCv2Trj/nyyBMIL1YbzYNfw EzI+4u3nabi3l32I1JoiIce3yNyKNODXlC0bRslL45eaBKD7U442NyUDsfLIY/zqe304 +HgGNVnkDfcuR/bR5BlT1DW9fZNEl+RDu6MH+pfYR209swsSoGyxPLeC5R3Xi3dJm/nI GMy44uadOPZGTioGPEdTjYVZrRRlyNJe6hfmblGslT6ecCpsdrVsMWa1XnkFDDe47nxg EWIQ== X-Gm-Message-State: AGi0PuaTvt/25oBru5hi9fDyOaMRHIN7WfvMVTY14xNvv7UjMnQXZ8oi o8EBRGqjD5n+J9d3y1cqkRedAKic5wJxAw== X-Google-Smtp-Source: APiQypIAK03g1fhrjDS3Nm6nMU103S5AUxgPb75DMKDG5HdCIaZPXSPEO/3oHE157riZ+ABBRn3RZw== X-Received: by 2002:adf:dd86:: with SMTP id x6mr4868672wrl.169.1585854699080; Thu, 02 Apr 2020 12:11:39 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:38 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 11/14] perf/core: Reattach a misplaced comment Date: Thu, 2 Apr 2020 20:12:17 +0100 Message-Id: <20200402191220.787381-11-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexander Shishkin [ Upstream commit f25d8ba9e1b204b90fbf55970ea6e68955006068 ] A comment is in a wrong place in perf_event_create_kernel_counter(). Fix that. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/20191030134731.5437-2-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar Signed-off-by: Lee Jones --- kernel/events/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 8c70ee23fbe91..16f268475e8e4 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10954,10 +10954,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, struct perf_event *event; int err; - /* - * Get the target context (task or percpu): - */ - event = perf_event_alloc(attr, cpu, task, NULL, NULL, overflow_handler, context, -1); if (IS_ERR(event)) { @@ -10968,6 +10964,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu, /* Mark owner so we could distinguish it from user events. */ event->owner = TASK_TOMBSTONE; + /* + * Get the target context (task or percpu): + */ ctx = find_get_context(event->pmu, task, event); if (IS_ERR(ctx)) { err = PTR_ERR(ctx); From patchwork Thu Apr 2 19:12:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 228248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45892C2BA16 for ; Thu, 2 Apr 2020 19:11:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D2EF20737 for ; Thu, 2 Apr 2020 19:11:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ufXA8Oc/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731892AbgDBTLo (ORCPT ); Thu, 2 Apr 2020 15:11:44 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36202 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389300AbgDBTLo (ORCPT ); Thu, 2 Apr 2020 15:11:44 -0400 Received: by mail-wm1-f68.google.com with SMTP id d202so4962992wmd.1 for ; Thu, 02 Apr 2020 12:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0AIBR/Fbp1+bL9hbHwPNzEV1sMWpxsi1yYPh/RkQmpU=; b=ufXA8Oc/iUdNyM66V8ojp5G07h2ci4rxmG5al1cypMqIVATJZ6Vq5aEOFbk4MkP4S/ abXbQTnCFBCa5jdYDasbHu7+ZR8fD3dcokDwE5/vaYBzgwjVAFL4X9vTW97A5rjENzNZ L78EGwvOEj23BhIRYj/dHBktCWA+N3gHOa3stDkQcjcZFeQfOEQZm5K0POObq5Yk5J+Q QUIBVNMTh1/FVU4qs1mrLgvhLzGYDaB/qt3AvZlk6BMvaKil6kQZK3sDWP4t/+4FZgnk MLwnvcleufC/gjeHZPWRGkAd49weqztrrBh1OXhwKZomImZJCHsVOwpPxAp0OkrjIDAN flhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0AIBR/Fbp1+bL9hbHwPNzEV1sMWpxsi1yYPh/RkQmpU=; b=Z4THoE3RwNYnmPGFJVuRXbU8qzhpS8HcBLwBKAPt69bPhfm/fW5EFxF9Z6Z+zLvf0Q lclRb6hH9qp/5L1/ktRN7w2GvS8Sv8nIgZmGg8ASVZtmN9/rbklUZ1m2J3tKwbI5JM2K OyF+NNasI6RAG2mO5LstmOiEM/NH67yr0NrUR+CtdB5fnY9VAO42QQrAW/h+I0OJBLZh 0CTatFLJMSSnvbs183PsEdzuc+5b9SShOuDmWPYFUO2Kv1kkuIUT7aqaptmAiezASTqu r2LRS7RhMXguQDojDLRUVYbZBRB+kci042SXCO5MMVit4B2EKYyYqRW27CCs7R3Bt9Zk BCEw== X-Gm-Message-State: AGi0PuYBIbXN8YjSHdspWlQUSN28LgqY0STtinb/u1yr1r0YHMb6pDjK veDnaxKYLrtmY5vw/qrMQhvxyjVvKqkiLA== X-Google-Smtp-Source: APiQypI644GUVorFjUXsJh2EJFKPXskXczJvmNNn+pJS3eHxlN5NcgExeZL3Al+91k/+n++VDkKKGw== X-Received: by 2002:a7b:c401:: with SMTP id k1mr4708719wmi.152.1585854701169; Thu, 02 Apr 2020 12:11:41 -0700 (PDT) Received: from localhost.localdomain ([95.149.164.95]) by smtp.gmail.com with ESMTPSA id s15sm8442164wrt.16.2020.04.02.12.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 12:11:40 -0700 (PDT) From: Lee Jones To: stable@vger.kernel.org Subject: [PATCH 4.19 13/14] usb: dwc3: don't set gadget->is_otg flag Date: Thu, 2 Apr 2020 20:12:19 +0100 Message-Id: <20200402191220.787381-13-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402191220.787381-1-lee.jones@linaro.org> References: <20200402191220.787381-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Roger Quadros [ Upstream commit c09b73cfac2a9317f1104169045c519c6021aa1d ] This reverts commit 6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.") We don't yet support any of the OTG mechanisms (HNP/SRP/ADP) and are not setting gadget->otg_caps, so don't set gadget->is_otg flag. If we do then we end up publishing a OTG1.0 descriptor in the gadget descriptor which causes device enumeration to fail if we are connected to a host with CONFIG_USB_OTG enabled. Host side log without this patch [ 96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 96.901391] usb 1-1: Dual-Role OTG device on non-HNP port [ 96.907552] usb 1-1: set a_alt_hnp_support failed: -32 [ 97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd [ 97.241378] usb 1-1: Dual-Role OTG device on non-HNP port [ 97.247536] usb 1-1: set a_alt_hnp_support failed: -32 [ 97.253606] usb usb1-port1: attempt power cycle [ 97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd [ 98.141383] usb 1-1: Dual-Role OTG device on non-HNP port [ 98.147540] usb 1-1: set a_alt_hnp_support failed: -32 [ 98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd [ 98.481391] usb 1-1: Dual-Role OTG device on non-HNP port [ 98.487545] usb 1-1: set a_alt_hnp_support failed: -32 [ 98.493532] usb usb1-port1: unable to enumerate USB device Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Lee Jones --- drivers/usb/dwc3/gadget.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index d482f89ffae2d..773d5dcaefcfb 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3166,7 +3166,6 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.speed = USB_SPEED_UNKNOWN; dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; - dwc->gadget.is_otg = dwc->dr_mode == USB_DR_MODE_OTG; /* * FIXME We might be setting max_speed to