git: 9front

Download patch

ref: f48b71b1a985df4b87e9169c893ee79eae456ac5
parent: 00f7f2ceb6a1818e2975baf6f5c55c1d2d4ecb6e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Feb 23 13:01:15 EST 2022

nusb/ether: use setalt()

--- a/sys/src/cmd/nusb/ether/ether.c
+++ b/sys/src/cmd/nusb/ether/ether.c
@@ -610,13 +610,9 @@
 				*eout = ep;
 		}
 		if(*ein != nil && *eout != nil)
-			goto Found;
+			return setalt(d, iface);
 	}
 	return -1;
-Found:
-	if(usbcmd(d, Rh2d|Rstd|Riface, Rsetiface, iface->alt, iface->id, nil, 0) < 0)
-		dprint(2, "%s: setalt ifc %d alt %d: %r\n", argv0, iface->id, iface->alt);
-	return 0;
 }
 
 int
--