9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] usb serial bug
@ 2013-02-14  3:46 erik quanstrom
  2013-02-14 10:23 ` Richard Miller
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2013-02-14  3:46 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-14 20:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14  3:46 [9fans] usb serial bug erik quanstrom
2013-02-14 10:23 ` Richard Miller
2013-02-14 14:33   ` erik quanstrom
2013-02-14 15:21     ` Jeff Sickel
2013-02-14 19:24     ` Richard Miller
2013-02-14 19:54       ` Gorka Guardiola
2013-02-14 20:16         ` Gorka Guardiola
2013-02-14 20:44           ` Richard Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).