mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: endpoint: Fix clearing start entry in configfs
@ 2019-09-12  9:56 Kunihiko Hayashi
  2019-12-11  3:26 ` Kunihiko Hayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Kunihiko Hayashi @ 2019-09-12  9:56 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Lorenzo Pieralisi
  Cc: linux-pci, linux-kernel, Kunihiko Hayashi

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 <kishon@ti.com>
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 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.

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;
 	}
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: endpoint: Fix clearing start entry in configfs
  2019-09-12  9:56 [PATCH] PCI: endpoint: Fix clearing start entry in configfs Kunihiko Hayashi
@ 2019-12-11  3:26 ` Kunihiko Hayashi
  0 siblings, 0 replies; 2+ messages in thread
From: Kunihiko Hayashi @ 2019-12-11  3:26 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Lorenzo Pieralisi; +Cc: linux-pci, linux-kernel

Hi,

Is there any comments about this?
I think this fix needs to stop and restart endpoint controller
using configfs 'logically' at least.

Thank you,

On Thu, 12 Sep 2019 18:56:51 +0900 <hayashi.kunihiko@socionext.com> wrote:

> 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 <kishon@ti.com>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> ---
>  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.
> 
> 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;
>  	}
>  
> -- 
> 2.7.4

---
Best Regards,
Kunihiko Hayashi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-11  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12  9:56 [PATCH] PCI: endpoint: Fix clearing start entry in configfs Kunihiko Hayashi
2019-12-11  3:26 ` Kunihiko Hayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®