xen-netfront: fix feature detection
Current netfront code relies on xs_scanf returning a value < 0 on error, which is not right, xs_scanf returns a positive value on error. MFC after: 3 days Tested by: Stephen Jones <StephenJo@LivingComputerMuseum.org> Sponsored by: Citrix Systems R&D
This commit is contained in:
parent
7deb99d785
commit
107cfbb743
|
@ -2016,7 +2016,7 @@ xn_query_features(struct netfront_info *np)
|
|||
device_printf(np->xbdev, "backend features:");
|
||||
|
||||
if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev),
|
||||
"feature-sg", NULL, "%d", &val) < 0)
|
||||
"feature-sg", NULL, "%d", &val) != 0)
|
||||
val = 0;
|
||||
|
||||
np->maxfrags = 1;
|
||||
|
@ -2026,7 +2026,7 @@ xn_query_features(struct netfront_info *np)
|
|||
}
|
||||
|
||||
if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev),
|
||||
"feature-gso-tcpv4", NULL, "%d", &val) < 0)
|
||||
"feature-gso-tcpv4", NULL, "%d", &val) != 0)
|
||||
val = 0;
|
||||
|
||||
np->xn_ifp->if_capabilities &= ~(IFCAP_TSO4|IFCAP_LRO);
|
||||
|
|
Loading…
Reference in New Issue