Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2885217rwb; Mon, 15 Aug 2022 13:17:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5F6p11lZ8OvR/YtLvib88I1/7rNWc0uFUI1k95JW1oKgU+JS/pBQ/zbKnsbuaahpUZbZio X-Received: by 2002:aa7:ce88:0:b0:442:30f5:433f with SMTP id y8-20020aa7ce88000000b0044230f5433fmr15887418edv.317.1660594669726; Mon, 15 Aug 2022 13:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594669; cv=none; d=google.com; s=arc-20160816; b=VrBa0lAO1LL8078SS6mU26dN0pnsxOxjMcyxKzpgttQnj/HmKZl7mJoarFxUl2JzkH DX4eGk2Z2b3WqS+YgsWFYcaIoqRrx6mSL4yd1y/4FgdwNXkVCx4y8rdg4wcGyoRHZ/Mm CB1SDvYkm91FffzqU1+sTovuwk+LtdZSJQ8tzmylP7GoReJdN6NaAa3+6CTxBpqONB1L xfGFqyCkReaKb53N0JGZY+MLJnOjHVhJKT/iuNi1qVUmWuiu2UEnfajhQlOn0DLW5ybT nQKnbTTSx6BNQjYsV5tQdeAVE55hCte7s1x7L0aT28s6rUuqaRx4x1mTKJDcK4dZg8+m 49JA== 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=LQbT4iHEjOxFf4e/wxhA0H1cyDQ6n9KbGDG/RXzOQzIPU1IQMfba0ARKXYgV5HV8XR goxdPpWkw0SU3uD516YGpcBZr++NKnVudSWLyXaFezO0OuP3MmFNJF3Ns02vhW4057gg 7q+JZx9VV+kim29lQQCke6c28nBkuS6L6SrVU72+jAkYzVqFmF1coxeYnLFAZiDWtP7l LJm/w/PxWlYOLQ6It4bPbzkuD4PWy5KClrXVRFqUhSO9Siq5uCdjUuady7ayDKDP+Noy yDUKPMJXjjpkZ7eNlfVUtZuuhRnpv3FdPzU7OadryPnjfUvFSeVBfT7qZ+OptzJh0sGF OgIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gZgpwNRG; 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 t16-20020a056402241000b004436bac7e37si5061451eda.596.2022.08.15.13.17.22; Mon, 15 Aug 2022 13:17:49 -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=gZgpwNRG; 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 S241318AbiHOTPF (ORCPT + 99 others); Mon, 15 Aug 2022 15:15:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344160AbiHOTLw (ORCPT ); Mon, 15 Aug 2022 15:11:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDB5450718; Mon, 15 Aug 2022 11:37:22 -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 15F7360FC4; Mon, 15 Aug 2022 18:37:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D8C6C433D7; Mon, 15 Aug 2022 18:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588641; bh=sT5pL6cUl6cZxcolgG5Lty5iulljWSDOK+DQZab1v8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gZgpwNRGPncyC6KhrIjcPYPe3zAxzX+xdVQrwrIGuna5I/8smZg4k2ozEFtpEFw17 GT9dvyKe4g7x9EtjFaIv8DAZ7wWe1yngtxzkHfBeQLY8QWkoox1owL6h+Butq8FHWR B6zOzPCMjbV076VTBuYMnpsBA5mIKeSgF9tB//iI= 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.15 469/779] PCI: endpoint: Dont stop controller when unbinding endpoint function Date: Mon, 15 Aug 2022 20:01:53 +0200 Message-Id: <20220815180357.348803001@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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