[PATCH] ntb: ntb_hw_intel: Skylake doorbells should be 32bits, not 64bits

26 views
Skip to first unread message

Dave Jiang

unread,
Jun 7, 2017, 5:27:20 PM6/7/17
to jdm...@kudzu.us, linu...@googlegroups.com, allen...@emc.com, ujjal...@intel.com
Fixing doorbell register length to 32bits per spec. On Skylake NTB, the
doorbell registers are 32bit write only registers. The source for the
doorbell is a 64bit register that shows the interrupt bits.

Signed-off-by: Dave Jiang <dave....@intel.com>
---
drivers/ntb/hw/intel/ntb_hw_intel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index c002384..859ba7ef 100644
--- a/drivers/ntb/hw/intel/ntb_hw_intel.c
+++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
@@ -1658,7 +1658,7 @@ static u64 skx_db_ioread(void __iomem *mmio)

static void skx_db_iowrite(u64 bits, void __iomem *mmio)
{
- iowrite64(bits, mmio);
+ iowrite32((u32)bits, mmio);
}

static int skx_init_isr(struct intel_ntb_dev *ndev)
@@ -2878,7 +2878,7 @@ static const struct intel_ntb_reg skx_reg = {
.link_is_up = xeon_link_is_up,
.db_ioread = skx_db_ioread,
.db_iowrite = skx_db_iowrite,
- .db_size = sizeof(u64),
+ .db_size = sizeof(u32),
.ntb_ctl = SKX_NTBCNTL_OFFSET,
.mw_bar = {2, 4},
};

Dave Jiang

unread,
Jun 8, 2017, 3:46:55 PM6/8/17
to jdm...@kudzu.us, linu...@googlegroups.com, allen...@emc.com, ujjal...@intel.com
Fixing doorbell register length to 32bits per spec. On Skylake NTB, the
doorbell registers are 32bit write only registers. The source for the
doorbell is a 64bit register that shows the interrupt bits.

Signed-off-by: Dave Jiang <dave....@intel.com>
---

v2: Allen: remove unnecessary change to code.

drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c b/drivers/ntb/hw/intel/ntb_hw_intel.c
index c002384..7b3b6fd 100644
--- a/drivers/ntb/hw/intel/ntb_hw_intel.c
+++ b/drivers/ntb/hw/intel/ntb_hw_intel.c

Allen Hubbe

unread,
Jun 9, 2017, 9:51:47 AM6/9/17
to Dave Jiang, jdm...@kudzu.us, linu...@googlegroups.com, ujjal...@intel.com
From: Dave Jiang
> Fixing doorbell register length to 32bits per spec. On Skylake NTB, the
> doorbell registers are 32bit write only registers. The source for the doorbell is
> a 64bit register that shows the interrupt bits.
>
> Signed-off-by: Dave Jiang <dave....@intel.com>

Acked-by: Allen Hubbe <Allen...@dell.com>

Jon Mason

unread,
Jun 9, 2017, 5:08:23 PM6/9/17
to Allen Hubbe, Dave Jiang, linu...@googlegroups.com, ujjal...@intel.com
On Fri, Jun 09, 2017 at 09:51:30AM -0400, Allen Hubbe wrote:
> From: Dave Jiang
> > Fixing doorbell register length to 32bits per spec. On Skylake NTB, the
> > doorbell registers are 32bit write only registers. The source for the doorbell is
> > a 64bit register that shows the interrupt bits.
> >
> > Signed-off-by: Dave Jiang <dave....@intel.com>
>
> Acked-by: Allen Hubbe <Allen...@dell.com>

Adding to my ntb branch with the following line:
Fixes: 783dfa6cc41b ("ntb: Adding Skylake Xeon NTB support")

This enables the stable kernels it is a bug fix and to pick it up.

Thanks,
Jon

>
> > ---
> >
> > v2: Allen: remove unnecessary change to code.
> >
> > drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/ntb/hw/intel/ntb_hw_intel.c
> > b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > index c002384..7b3b6fd 100644
> > --- a/drivers/ntb/hw/intel/ntb_hw_intel.c
> > +++ b/drivers/ntb/hw/intel/ntb_hw_intel.c
> > @@ -2878,7 +2878,7 @@ static const struct intel_ntb_reg skx_reg = {
> > .link_is_up = xeon_link_is_up,
> > .db_ioread = skx_db_ioread,
> > .db_iowrite = skx_db_iowrite,
> > - .db_size = sizeof(u64),
> > + .db_size = sizeof(u32),
> > .ntb_ctl = SKX_NTBCNTL_OFFSET,
> > .mw_bar = {2, 4},
> > };
>
>
> --
> You received this message because you are subscribed to the Google Groups "linux-ntb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+...@googlegroups.com.
> To post to this group, send email to linu...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/000001d2e127%247fb8d740%247f2a85c0%24%40dell.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages