* [PATCH] NTB: Fix typo in setting one translation register
@ 2014-02-21 16:07 Roland Dreier
2014-02-21 23:13 ` Jon Mason
0 siblings, 1 reply; 2+ messages in thread
From: Roland Dreier @ 2014-02-21 16:07 UTC (permalink / raw)
To: Jon Mason; +Cc: linux-kernel
From: Roland Dreier <roland@purestorage.com>
In the code for Xeon devices in back-to-back mode with xeon_errata_workaround
disabled, the downstream device puts the wrong value in SNB_B2B_XLAT_OFFSETL
(SNB_MBAR01_DSD_ADDR vs. SNB_MBAR01_USD_ADDR).
This was spotted while reading code, since the typo has no practical effect,
at least for now: the low 32 bits of both constants are actually identical
anyway. However, it's clearer and safer to use the right name.
Signed-off-by: Roland Dreier <roland@purestorage.com>
---
drivers/ntb/ntb_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index 170e8e60cdb7..2774d356b689 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -785,7 +785,7 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
/* B2B_XLAT_OFFSET is a 64bit register, but can
* only take 32bit writes
*/
- writel(SNB_MBAR01_DSD_ADDR & 0xffffffff,
+ writel(SNB_MBAR01_USD_ADDR & 0xffffffff,
ndev->reg_base + SNB_B2B_XLAT_OFFSETL);
writel(SNB_MBAR01_USD_ADDR >> 32,
ndev->reg_base + SNB_B2B_XLAT_OFFSETU);
--
1.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] NTB: Fix typo in setting one translation register
2014-02-21 16:07 [PATCH] NTB: Fix typo in setting one translation register Roland Dreier
@ 2014-02-21 23:13 ` Jon Mason
0 siblings, 0 replies; 2+ messages in thread
From: Jon Mason @ 2014-02-21 23:13 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-kernel
On Fri, Feb 21, 2014 at 08:07:21AM -0800, Roland Dreier wrote:
> From: Roland Dreier <roland@purestorage.com>
>
> In the code for Xeon devices in back-to-back mode with xeon_errata_workaround
> disabled, the downstream device puts the wrong value in SNB_B2B_XLAT_OFFSETL
> (SNB_MBAR01_DSD_ADDR vs. SNB_MBAR01_USD_ADDR).
>
> This was spotted while reading code, since the typo has no practical effect,
> at least for now: the low 32 bits of both constants are actually identical
> anyway. However, it's clearer and safer to use the right name.
Good catch. Applied.
>
> Signed-off-by: Roland Dreier <roland@purestorage.com>
> ---
> drivers/ntb/ntb_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> index 170e8e60cdb7..2774d356b689 100644
> --- a/drivers/ntb/ntb_hw.c
> +++ b/drivers/ntb/ntb_hw.c
> @@ -785,7 +785,7 @@ static int ntb_xeon_setup(struct ntb_device *ndev)
> /* B2B_XLAT_OFFSET is a 64bit register, but can
> * only take 32bit writes
> */
> - writel(SNB_MBAR01_DSD_ADDR & 0xffffffff,
> + writel(SNB_MBAR01_USD_ADDR & 0xffffffff,
> ndev->reg_base + SNB_B2B_XLAT_OFFSETL);
> writel(SNB_MBAR01_USD_ADDR >> 32,
> ndev->reg_base + SNB_B2B_XLAT_OFFSETU);
> --
> 1.9.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-21 23:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-21 16:07 [PATCH] NTB: Fix typo in setting one translation register Roland Dreier
2014-02-21 23:13 ` Jon Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome