On Sat, Dec 01, 2012 at 05:15:22PM +0000, Heptas Torres wrote: > Hi > I run OpenBSD in a VMware workstation and I would like to connect the > Edimax EW-7811Un nano USB wireless adapter: > http://www.edimax.com/en/produce_detail.php?pd_id=347&pl1_id=1&pl2_id=44. > I get the error: > urtwn0: timeout waiting for MAC auto ON
The driver believes that it is failing to power up the hardware. If the dongle works with OpenBSD on real hardware there is probably some problem with the way VMware handles USB devices. Do other USB devices work? Perhaps things just happen slower than the driver is expecting? The driver waits for 5 miliseconds before giving up. You could try increasing the timeout a little by tweaking the code as shown below. However, if this fixes the problem the driver might end up timing out elsewhere, so quite a few timeouts in the driver may need to be tweaked. Index: if_urtwn.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_urtwn.c,v retrieving revision 1.23 diff -u -p -r1.23 if_urtwn.c --- if_urtwn.c 17 Sep 2012 15:14:14 -0000 1.23 +++ if_urtwn.c 1 Dec 2012 17:49:53 -0000 @@ -2066,13 +2066,13 @@ urtwn_power_on(struct urtwn_softc *sc) /* Auto enable WLAN. */ urtwn_write_2(sc, R92C_APS_FSMCO, urtwn_read_2(sc, R92C_APS_FSMCO) | R92C_APS_FSMCO_APFM_ONMAC); - for (ntries = 0; ntries < 1000; ntries++) { + for (ntries = 0; ntries < 10000; ntries++) { if (urtwn_read_2(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_APFM_ONMAC) break; DELAY(5); } - if (ntries == 1000) { + if (ntries == 10000) { printf("%s: timeout waiting for MAC auto ON\n", sc->sc_dev.dv_xname); return (ETIMEDOUT);