Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3260175rwb; Mon, 15 Aug 2022 22:34:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR4QEnUkPZvb0gJvswGMkYOkCH20oOBNK9BQ79WmxBYSvOWKYKNb9a1yBPT6ROe8ehKZl2ec X-Received: by 2002:a05:6402:449a:b0:442:c81c:b938 with SMTP id er26-20020a056402449a00b00442c81cb938mr17061762edb.289.1660628067900; Mon, 15 Aug 2022 22:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628067; cv=none; d=google.com; s=arc-20160816; b=YurgEYAS8sBZ2u7NJzo2kYmvmoD8HpsVupvtuZh3zbvKER+SE/avhtiEFDafQOTEIi NGrBjxZc+DjMb2yGzJobNedQ5VN1IR8LCnkar+m7SP8kzCUjXWpTn1uVDwY5dAGbw0vX 0Lxuo/P78em6PdApIHI+gcmy3YxltIOFB4N5D8AR9f3szTEH7j16zrhQd2V7omgC7Bqy vxdO8A7qdjWMgJnj5F5YMLl2Nx7riEyYH5V+uMjmLlExuPAf4aiezV24lVelswRaXkq+ KGNZuPAWZPj+7SD+Cme8quqyfKjHIkjNl8C4DWCVLZ/WM4D6MYj+/mc7Jf1FZSymKoNz 2+Eg== 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=0mQJTAyWV6PGlsF2i/ASTPgTJ9wgAXSeYA7Dl8wijj4=; b=eKEpmCnL443SKS7ttUXSVfXMW5w1ZKIzQOsxGb0v9c9sC9F+ls0lrs265n+rHhK+C1 3yV/r62+1dk0WSH32IbC7+jZuHS0IQm/In7QImKOzRCf4Uq9CNZfeQtSVrGQFptM3695 wOrPJsICHt1yqvGax+ogQijeuw59C/hd3PCKSeeojZTR7vvvjeBH9PXCZErVNALHAwDd oh8ppnIIFhvQQh2JIg7FUk3ZexJUDcYTDGgGJUGPOHBeGyG/3V0p5j390zsTAkGk1HfO V7BVHLgaJqDaGuJpjxUJ7y6dkzikbuSjalYqC/6HgPweBZttCsTWSDNOpeaznM8J13Y8 n0fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nV3NqBTj; 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 bv18-20020a170906b1d200b0072aef5bb6fesi8297211ejb.183.2022.08.15.22.34.02; Mon, 15 Aug 2022 22:34: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=nV3NqBTj; 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 S231966AbiHPEmk (ORCPT + 99 others); Tue, 16 Aug 2022 00:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231690AbiHPEkP (ORCPT ); Tue, 16 Aug 2022 00:40:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6605FA4B33; Mon, 15 Aug 2022 13:31:34 -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 ams.source.kernel.org (Postfix) with ESMTPS id 21047B80EB1; Mon, 15 Aug 2022 20:31:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5996CC433C1; Mon, 15 Aug 2022 20:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595491; bh=sT5pL6cUl6cZxcolgG5Lty5iulljWSDOK+DQZab1v8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nV3NqBTjoBHbcIW/hegfSRpfozF9y3UFqNPVgUy0Xsk5K7jvjHi2xSiHmA2YbQxXt sia6MCedH26eEy+lbRYnl/pcMt8v0DZs+EdtFj78bMDfqQPGEgd2p/BJmiUYQov6E1 TVFVwjgm/8zpgpRhWwSCongWguOhAHbK04noyqkk= 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.19 0781/1157] PCI: endpoint: Dont stop controller when unbinding endpoint function Date: Mon, 15 Aug 2022 20:02:17 +0200 Message-Id: <20220815180510.738460720@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 5b833f00e980..a5ed779b0a51 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -627,7 +627,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