Re: [PATCH 1/2] fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE

2020-09-09 Thread Joel Stanley
On Mon, 27 Jul 2020 at 05:51, Benjamin Herrenschmidt
 wrote:
>
> On Fri, 2020-07-24 at 16:45 +0930, Joel Stanley wrote:
> > From: Joachim Fenkes 
> >
> > When the SBE requests a reset via the down FIFO, that is also the
> > FIFO we should go and reset ;)
>
> Is it ?
>
> I no longer work for IBM and dont have access to any of the
> documentation here but I had vague memories that we would get a reset
> request in the down fifo in order to reset the up one since we control
> the up one and the host controls the down one, no ?

Joachim, can you clarify the situation here?

>
> > Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
> > Signed-off-by: Joachim Fenkes 
> > Signed-off-by: Joel Stanley 
> > ---
> >  drivers/fsi/fsi-sbefifo.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
> > index f54df9ebc8b3..655b45c1f6ba 100644
> > --- a/drivers/fsi/fsi-sbefifo.c
> > +++ b/drivers/fsi/fsi-sbefifo.c
> > @@ -400,7 +400,7 @@ static int sbefifo_cleanup_hw(struct sbefifo
> > *sbefifo)
> >   /* The FIFO already contains a reset request from the SBE ? */
> >   if (down_status & SBEFIFO_STS_RESET_REQ) {
> >   dev_info(dev, "Cleanup: FIFO reset request set,
> > resetting\n");
> > - rc = sbefifo_regw(sbefifo, SBEFIFO_UP,
> > SBEFIFO_PERFORM_RESET);
> > + rc = sbefifo_regw(sbefifo, SBEFIFO_DOWN,
> > SBEFIFO_PERFORM_RESET);
> >   if (rc) {
> >   sbefifo->broken = true;
> >   dev_err(dev, "Cleanup: Reset reg write failed,
> > rc=%d\n", rc);
>


Re: [PATCH 1/2] fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE

2020-07-26 Thread Benjamin Herrenschmidt
On Fri, 2020-07-24 at 16:45 +0930, Joel Stanley wrote:
> From: Joachim Fenkes 
> 
> When the SBE requests a reset via the down FIFO, that is also the
> FIFO we should go and reset ;)

Is it ?

I no longer work for IBM and dont have access to any of the
documentation here but I had vague memories that we would get a reset
request in the down fifo in order to reset the up one since we control
the up one and the host controls the down one, no ?

Cheers,
Ben.

> Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
> Signed-off-by: Joachim Fenkes 
> Signed-off-by: Joel Stanley 
> ---
>  drivers/fsi/fsi-sbefifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
> index f54df9ebc8b3..655b45c1f6ba 100644
> --- a/drivers/fsi/fsi-sbefifo.c
> +++ b/drivers/fsi/fsi-sbefifo.c
> @@ -400,7 +400,7 @@ static int sbefifo_cleanup_hw(struct sbefifo
> *sbefifo)
>   /* The FIFO already contains a reset request from the SBE ? */
>   if (down_status & SBEFIFO_STS_RESET_REQ) {
>   dev_info(dev, "Cleanup: FIFO reset request set,
> resetting\n");
> - rc = sbefifo_regw(sbefifo, SBEFIFO_UP,
> SBEFIFO_PERFORM_RESET);
> + rc = sbefifo_regw(sbefifo, SBEFIFO_DOWN,
> SBEFIFO_PERFORM_RESET);
>   if (rc) {
>   sbefifo->broken = true;
>   dev_err(dev, "Cleanup: Reset reg write failed,
> rc=%d\n", rc);



[PATCH 1/2] fsi/sbefifo: Clean up correct FIFO when receiving reset request from SBE

2020-07-24 Thread Joel Stanley
From: Joachim Fenkes 

When the SBE requests a reset via the down FIFO, that is also the
FIFO we should go and reset ;)

Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO")
Signed-off-by: Joachim Fenkes 
Signed-off-by: Joel Stanley 
---
 drivers/fsi/fsi-sbefifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
index f54df9ebc8b3..655b45c1f6ba 100644
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -400,7 +400,7 @@ static int sbefifo_cleanup_hw(struct sbefifo *sbefifo)
/* The FIFO already contains a reset request from the SBE ? */
if (down_status & SBEFIFO_STS_RESET_REQ) {
dev_info(dev, "Cleanup: FIFO reset request set, resetting\n");
-   rc = sbefifo_regw(sbefifo, SBEFIFO_UP, SBEFIFO_PERFORM_RESET);
+   rc = sbefifo_regw(sbefifo, SBEFIFO_DOWN, SBEFIFO_PERFORM_RESET);
if (rc) {
sbefifo->broken = true;
dev_err(dev, "Cleanup: Reset reg write failed, 
rc=%d\n", rc);
-- 
2.27.0