Fix NTB_SDOORBELL_LOCKUP workaround.

Since SBARxSZ register can be write-once, it can be unusable for disabling
the SBAR.  For such case also set SBARxBASE to zero to not intersect with
config BAR.
This commit is contained in:
Alexander Motin 2016-07-09 09:34:24 +00:00
parent 0833e924c6
commit b56203ac03
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302482

View file

@ -1673,8 +1673,12 @@ xeon_set_sbar_base_and_limit(struct ntb_softc *ntb, uint64_t bar_addr,
uint32_t base_reg, lmt_reg;
bar_get_xlat_params(ntb, idx, &base_reg, NULL, &lmt_reg);
if (idx == regbar)
bar_addr += ntb->b2b_off;
if (idx == regbar) {
if (ntb->b2b_off)
bar_addr += ntb->b2b_off;
else
bar_addr = 0;
}
/*
* Set limit registers first to avoid an errata where setting the base