* [PATCH] ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0
@ 2019-07-16 17:34 Alexander Fomichev
2019-07-16 17:41 ` Logan Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Fomichev @ 2019-07-16 17:34 UTC (permalink / raw)
To: linux-ntb, linux-pci; +Cc: Logan Gunthorpe, Allen Hubbe, linux
On switchtec_ntb_mw_set_trans() call, when (only) address == 0, it acts as
ntb_mw_clear_trans(). Fix this, since address == 0 and size != 0 is valid
combination for setting translation.
Signed-off-by: Alexander Fomichev <fomichev.ru@gmail.com>
---
drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index db49677..45b9513 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -305,7 +305,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
if (rc)
return rc;
- if (addr == 0 || size == 0) {
+ if (size == 0) {
if (widx < nr_direct_mw)
switchtec_ntb_mw_clr_direct(sndev, widx);
else
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0
2019-07-16 17:34 [PATCH] ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0 Alexander Fomichev
@ 2019-07-16 17:41 ` Logan Gunthorpe
2019-09-10 16:41 ` Jon Mason
0 siblings, 1 reply; 3+ messages in thread
From: Logan Gunthorpe @ 2019-07-16 17:41 UTC (permalink / raw)
To: Alexander Fomichev, linux-ntb, linux-pci; +Cc: Allen Hubbe, linux
On 2019-07-16 11:34 a.m., Alexander Fomichev wrote:
> On switchtec_ntb_mw_set_trans() call, when (only) address == 0, it acts as
> ntb_mw_clear_trans(). Fix this, since address == 0 and size != 0 is valid
> combination for setting translation.
>
> Signed-off-by: Alexander Fomichev <fomichev.ru@gmail.com>
Looks good, thanks.
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
> ---
> drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> index db49677..45b9513 100644
> --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> @@ -305,7 +305,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
> if (rc)
> return rc;
>
> - if (addr == 0 || size == 0) {
> + if (size == 0) {
> if (widx < nr_direct_mw)
> switchtec_ntb_mw_clr_direct(sndev, widx);
> else
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0
2019-07-16 17:41 ` Logan Gunthorpe
@ 2019-09-10 16:41 ` Jon Mason
0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2019-09-10 16:41 UTC (permalink / raw)
To: Logan Gunthorpe
Cc: Alexander Fomichev, linux-ntb, linux-pci, Allen Hubbe, linux
On Tue, Jul 16, 2019 at 6:41 PM Logan Gunthorpe <logang@deltatee.com> wrote:
>
>
>
> On 2019-07-16 11:34 a.m., Alexander Fomichev wrote:
> > On switchtec_ntb_mw_set_trans() call, when (only) address == 0, it acts as
> > ntb_mw_clear_trans(). Fix this, since address == 0 and size != 0 is valid
> > combination for setting translation.
> >
> > Signed-off-by: Alexander Fomichev <fomichev.ru@gmail.com>
>
> Looks good, thanks.
>
> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Applied to ntb-next, thanks
>
> > ---
> > drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > index db49677..45b9513 100644
> > --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
> > @@ -305,7 +305,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx,
> > if (rc)
> > return rc;
> >
> > - if (addr == 0 || size == 0) {
> > + if (size == 0) {
> > if (widx < nr_direct_mw)
> > switchtec_ntb_mw_clr_direct(sndev, widx);
> > else
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-09-10 16:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16 17:34 [PATCH] ntb_hw_switchtec: make ntb_mw_set_trans() work when addr == 0 Alexander Fomichev
2019-07-16 17:41 ` Logan Gunthorpe
2019-09-10 16:41 ` Jon Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).