Author: mav
Date: Thu Aug 18 10:24:31 2016
New Revision: 304376
URL: https://svnweb.freebsd.org/changeset/base/304376

Log:
  MFC r302482: 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.

Modified:
  stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c
==============================================================================
--- stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c       Thu Aug 18 10:23:51 2016        
(r304375)
+++ stable/10/sys/dev/ntb/ntb_hw/ntb_hw.c       Thu Aug 18 10:24:31 2016        
(r304376)
@@ -1688,8 +1688,12 @@ xeon_set_sbar_base_and_limit(struct ntb_
        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
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to