]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
NTB: Pull copy of soc_link_is_err out of recover_soc_link
authorcem <cem@FreeBSD.org>
Tue, 20 Oct 2015 01:45:57 +0000 (01:45 +0000)
committercem <cem@FreeBSD.org>
Tue, 20 Oct 2015 01:45:57 +0000 (01:45 +0000)
Sponsored by: EMC / Isilon Storage Division

sys/dev/ntb/ntb_hw/ntb_hw.c

index e6bafd8ec92d683add1364352bccbf9f12357099..1f9ccc6f5b259dc369255743f594d85c7b8ee036 100644 (file)
@@ -1759,12 +1759,7 @@ recover_soc_link(void *arg)
        status32 = arc4random() % SOC_LINK_RECOVERY_TIME;
        pause("Link", (SOC_LINK_RECOVERY_TIME + status32) * hz / 1000);
 
-       status32 = ntb_reg_read(4, SOC_LTSSMSTATEJMP_OFFSET);
-       if ((status32 & SOC_LTSSMSTATEJMP_FORCEDETECT) != 0)
-               goto retry;
-
-       status32 = ntb_reg_read(4, SOC_IBSTERRRCRVSTS0_OFFSET);
-       if ((status32 & SOC_IBIST_ERR_OFLOW) != 0)
+       if (soc_link_is_err(ntb))
                goto retry;
 
        status32 = ntb_reg_read(4, ntb->reg->ntb_ctl);