From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 13 Feb 2013 22:46:03 -0500 To: 9fans@9fans.net Message-ID: <4442f092af66fdb18489c9e964583fb8@brasstown.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] usb serial bug Topicbox-Message-UUID: 176248f8-ead8-11e9-9d60-3106f5b1d025 lyons# 6.out ehci 0xfffffe00dfa23000: port 1 didn't reset within 500 ms; sts 0x1101 usb/hub... usb/serial... epout 1 epin 1 serial: open i/o ep data: '/dev/usb/ep4.1/data' permission denied 6.out: serial: serial: no endpoints found for ifc 0 139: 6.out: bootes: fault addr=0xfffffffe kpc=0x223be7 6.out 139: suicide: sys: trap: fault read addr=0xfffffffe pc=0x223be7 i think this is caused by devusb.c:/^usbopen insisting that the mode be OREAD or OWRITE. the little patch below disables the new code that tries to open the endpoint data ORDWR. (unless i've misread the code.) this is a WORKAROUND. a proper fix would be something like allowing ORDWR in usbopen if that is indeed the problem. ; diffy -c /sys/src/cmd/usb/serial/serial.c /n/dump/2013/0213/sys/src/cmd/usb/serial/serial.c:716,724 - /sys/src/cmd/usb/serial/serial.c:716,724 ep->dir == Ein && epintr == -1) epintr = ep->id; if(ep->type == Ebulk){ - if((ep->dir == Ein || ep->dir == Eboth) && epin == -1) + if((ep->dir == Ein /* || ep->dir == Eboth*/) && epin == -1) epin = ep->id; - if((ep->dir == Ein || ep->dir == Eboth) && epout == -1) + if((ep->dir == Ein /* || ep->dir == Eboth*/) && epout == -1) epout = ep->id; } } - erik