Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1878923rwb; Fri, 19 Aug 2022 10:57:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6KwOJsshJ1LZNT3wAQ57agrirVBelUkmbeXCiJ0n8YC2xmFi6dwU85NtNEhNo1bWJ4fZDg X-Received: by 2002:a17:90a:17e1:b0:1f2:2ff2:6cae with SMTP id q88-20020a17090a17e100b001f22ff26caemr15305884pja.196.1660931847536; Fri, 19 Aug 2022 10:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660931847; cv=none; d=google.com; s=arc-20160816; b=DC48RcCbLezrP4LaMvQsvBLRkeIBXZisf9hjaWNb+asz08gGfWn/Dh3Yj2jed2ekCd wZffbhlk6Wd5ImkM4wmLoISIaq30rj6JWeGg9iFr1x3+IN1BR2Nw3V17xWNUU3lSbM6A 0hx8CLJ64nM4JqMyWOSCmGrtF7hZH8quG4n5oVk7SgLMfqOL5sOq5EZbLXAZAZuuLAgA XinyBNKVWFokPKHdCyTOVPMh7QF0fS9stoGZLnFR8oTEerXeH5s8l/2RPMgiTNpNvBxV UdCrVT4yFbjtyXmXeH/dwI6yyoMdKjVz1w+k713UTlAJbsd1pQONS8zS4b6FMk4loxjl nvLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gH9X5Ry2Vdt0O1NonQhzaHn2QSYKBbfw9/f9vidHsmk=; b=em0GDup3k5/9Ljkyc91JuLNW2+1dacyTvqB7tUmy7abRjhfqlTzxg2eliGdsy/MaxU dFzLpLG+5uw/KPLcqGKpHv/BRKrUjNK1g5b4OePmFftxV4cGcOx6fdjKwls7yHmoIvR0 liA+TOXHtASa2ModsX5FqtJ6z81ALzbEvAFPHG6k6s+6EceEzvc+KxTjisg3A+ol26b6 PTxbMip/+1r4+zWQGMNh0nML49q21vearKzJEnHC62xB9Sv6IM/ddQ2HRx+v7eNrqSui Z3U4tGodRRz5pt4GVW7k/O1us8kGLJ0jT551tz7TWtY9wGMTXjWvm3iyejLzWWt2QlVf +mGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n1n6doKc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a170902b19700b0016c759a35c7si4218705plr.317.2022.08.19.10.57.16; Fri, 19 Aug 2022 10:57:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n1n6doKc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352604AbiHSQXz (ORCPT + 99 others); Fri, 19 Aug 2022 12:23:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352225AbiHSQUK (ORCPT ); Fri, 19 Aug 2022 12:20:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B28DAEC4F2; Fri, 19 Aug 2022 09:01:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4EC6D61644; Fri, 19 Aug 2022 16:01:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 519BEC433D6; Fri, 19 Aug 2022 16:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924870; bh=ktUX/xRIlbmoMXweSsX34bnEMpvixH05UbFNlBjznjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n1n6doKchbgbj1TJw0t0tZouBpMk7X0gQ+Bo3o+9A7c45ssRGbtUmPQIFMBnqZ3mn 2uppZyHGhJI03bfh8C2wGBxn8YbzsU8MkAeh1jBPyDVc7+YXPf/CXx0In3I3sxzalt UmIh0U0enXRdpyuR1lFpnBrzy/VQ2Q0feGvQL5+c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shunsuke Mie , Bjorn Helgaas , Kishon Vijay Abraham I , Sasha Levin Subject: [PATCH 5.10 308/545] PCI: endpoint: Dont stop controller when unbinding endpoint function Date: Fri, 19 Aug 2022 17:41:18 +0200 Message-Id: <20220819153843.136862754@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shunsuke Mie [ Upstream commit 1bc2b7bfba6e2f64edf5e246f3af2967261f6c3d ] Unbinding an endpoint function from the endpoint controller shouldn't stop the controller. This is especially a problem for multi-function endpoints where other endpoints may still be active. Don't stop the controller when unbinding one of its endpoints. Normally the controller is stopped via configfs. Fixes: 349e7a85b25f ("PCI: endpoint: functions: Add an EP function to test PCI") Link: https://lore.kernel.org/r/20220622040924.113279-1-mie@igel.co.jp Signed-off-by: Shunsuke Mie Signed-off-by: Bjorn Helgaas Acked-by: Kishon Vijay Abraham I Signed-off-by: Sasha Levin --- drivers/pci/endpoint/functions/pci-epf-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 262b2c4c70c9..ddfeca9016a0 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -623,7 +623,6 @@ static void pci_epf_test_unbind(struct pci_epf *epf) cancel_delayed_work(&epf_test->cmd_handler); pci_epf_test_clean_dma_chan(epf_test); - pci_epc_stop(epc); for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) { epf_bar = &epf->bar[bar]; -- 2.35.1