From patchwork Thu Sep 12 09:56:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 173686 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1896300ilq; Thu, 12 Sep 2019 02:57:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHf5yAx2jL+MCDqZJQSwhN9gazA+50pQTsHXJdSS26EOtLl/LqVZLlyfdbmSZyrGv+M600 X-Received: by 2002:a17:906:22d0:: with SMTP id q16mr33326200eja.115.1568282222693; Thu, 12 Sep 2019 02:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568282222; cv=none; d=google.com; s=arc-20160816; b=MSCu+LGWOSDYNloMNF0+R/vbAmfrgWjG+BnMZ35EM8qtlP6bWgovnKUxzIhkbkS9XQ NjJjlCEY/DnutGZi5ap4jKHdMb+J432YiMn3NjijBhzFDg5Va3pI6BtZ+IkzTAXDi+7/ vsrJBPyZrPSXrkbr4XRl0A6UBBG74cK4CKiD6yzyIdtsKFn0VNo8aauuQ3o7zG38PJOs Jq8vAbNf1sXxK77YoibQb3iymr8ne7QtfhDJ/QZVg2ZT9MXJ+9IZ8yAlBcoIuYX6c22v I3bI+HK4Wh0Ejf77BvMmNQcezbh1scH+7yAz1NNcTLBpKkWfN8NF0DviGtubEexh8y01 7MaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=SX+o9/FEi65b1oyDU5HFq8JmcRvafnDJmexe0JZ5F0U=; b=APJRM3mpYKDHiF3CeFQtPf+3ZmA/KZqrB6dBkOY5lCo4h9Vn9CKZfD3H24mXPgDOft DGQuyrFljOOXF+g3IMuSVaaGAIyK3pPdUwpPd8SIGUpjelLM5pevRdXmk3sesSVtz0AR hfrKLDmfNq0b76dooQ1y9ZzbkksW9eORJOwU3m9/yJgV90FRBeZY8rm+tEHOw05qaWOt y0krs2huFA/YahrjRcyknUQwQFe8PFPgcsB/+FrMDQTIFG2e93VBVpAHg3KbmV4sreGO HYuelJmZ4Wlhti9OH2jwkdHq9a2WxNaAYJkX/GcrAFaWdqdQxs2t+KEKTWeQHGtbjZQt cKPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l21si12845074ejr.124.2019.09.12.02.57.02; Thu, 12 Sep 2019 02:57:02 -0700 (PDT) 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; 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 S1730977AbfILJ5B (ORCPT + 27 others); Thu, 12 Sep 2019 05:57:01 -0400 Received: from mx.socionext.com ([202.248.49.38]:43784 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730458AbfILJ5B (ORCPT ); Thu, 12 Sep 2019 05:57:01 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 12 Sep 2019 18:57:00 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 53CB6180077; Thu, 12 Sep 2019 18:57:00 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 12 Sep 2019 18:57:00 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id D975E1A04FC; Thu, 12 Sep 2019 18:56:59 +0900 (JST) From: Kunihiko Hayashi To: Kishon Vijay Abraham I , Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH] PCI: endpoint: Fix clearing start entry in configfs Date: Thu, 12 Sep 2019 18:56:51 +0900 Message-Id: <1568282211-24713-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The value of 'start' entry is no change whenever writing 0 to configfs. So the endpoint that stopped once can't restart. Fixes: d74679911610 ("PCI: endpoint: Introduce configfs entry for configuring EP functions") Cc: Kishon Vijay Abraham I Signed-off-by: Kunihiko Hayashi --- drivers/pci/endpoint/pci-ep-cfs.c | 1 + 1 file changed, 1 insertion(+) Since the possibility of restarting endpoint is up to each controller, if restart is prohibited on purpose for some reason, this patch can be ignored. -- 2.7.4 diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index d1288a0..4fead88 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -58,6 +58,7 @@ static ssize_t pci_epc_start_store(struct config_item *item, const char *page, if (!start) { pci_epc_stop(epc); + epc_group->start = 0; return len; }