svn commit: r291029 - head/sys/dev/ntb/ntb_hw
Conrad E. Meyer
cem at FreeBSD.org
Wed Nov 18 22:20:05 UTC 2015
Author: cem
Date: Wed Nov 18 22:20:04 2015
New Revision: 291029
URL: https://svnweb.freebsd.org/changeset/base/291029
Log:
NTB: Fix 32-bit BAR size validation
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/dev/ntb/ntb_hw/ntb_hw.c
Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==============================================================================
--- head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 18 22:19:55 2015 (r291028)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Wed Nov 18 22:20:04 2015 (r291029)
@@ -2575,9 +2575,9 @@ ntb_mw_set_trans(struct ntb_softc *ntb,
} else {
/* Configure 32-bit (split) BAR MW */
- if ((addr & ~UINT32_MAX) != 0)
+ if ((addr & UINT32_MAX) != addr)
return (EINVAL);
- if (((addr + size) & ~UINT32_MAX) != 0)
+ if (((addr + size) & UINT32_MAX) != (addr + size))
return (EINVAL);
base = ntb_reg_read(4, base_reg);
More information about the svn-src-head
mailing list