9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] usb serial bug
Date: Wed, 13 Feb 2013 22:46:03 -0500	[thread overview]
Message-ID: <4442f092af66fdb18489c9e964583fb8@brasstown.quanstro.net> (raw)

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



             reply	other threads:[~2013-02-14  3:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14  3:46 erik quanstrom [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4442f092af66fdb18489c9e964583fb8@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).