9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] no luck with usb cdrom
@ 2013-02-05  4:06 erik quanstrom
  2013-02-05 11:24 ` Richard Miller
  0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2013-02-05  4:06 UTC (permalink / raw)
  To: 9fans

has anyone seen this?  ideas?  it seems like the ctlrhalt/stalled might be
self inflicted?

- erik

harness# cdfs -d /dev/sdU0.0
qhintr: td 0xfffffffff0b64680 csw 0x800d8d40 error 0x40 endpoint stalled
usb epctl clrhalt
[... more of the same]
scsi⇒ lun 0 Rcapacity [8] 00 00 00 00 00 00 00 00
scsi← lun 0 Rcapacity good [8] 
qhintr: td 0xfffffffff0b64680 csw 0x800d8d40 error 0x40 endpoint stalled
usb epctl clrhalt
ep clrhalt for io 0xfffffffff0efcd40
[...; why is nwa never right?]
nwa is 218419 but invis track starts blk 0
cdfs: nwa from drive 0 != computed nwa 218,267
	be careful!  assuming computed nwa
usb epctl clrhalt
ep clrhalt for io 0xfffffffff0efcd40
qhintr: td 0xfffffffff0b64680 csw 0xd8d40 error 0x40 endpoint stalled
[...]
harness# cat d000>/dev/null &
harness# usb epctl clrhalt
ep clrhalt for io 0xfffffffff0efcd40
qhintr: td 0xfffffffff0b64680 csw 0xd8d40 error 0x40 endpoint stalled
usb epctl clrhalt
[... was the command ever sent?]
cat: error reading d000: cmd #a8: no additional sense information
usb epctl clrhalt
ep clrhalt for io 0xfffffffff0efcd40
qhintr: td 0xfffffffff0b64680 csw 0xd8d40 error 0x40 endpoint stalled
[...]



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

* Re: [9fans] no luck with usb cdrom
  2013-02-05  4:06 [9fans] no luck with usb cdrom erik quanstrom
@ 2013-02-05 11:24 ` Richard Miller
  2013-02-05 15:16   ` erik quanstrom
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Miller @ 2013-02-05 11:24 UTC (permalink / raw)
  To: 9fans

> it seems like the ctlrhalt/stalled might be
> self inflicted?

Endpoint stalled is not necessarily an error condition - the usb
mass storage protocol uses it fairly freely to signal that something
or other needs to be done.  I would guess that your device and the
driver are not quite in agreement over the protocol.

What does usb/probe tell you about the csp?

Can you read the raw /dev/sdU0.0/data successfully?




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

* Re: [9fans] no luck with usb cdrom
  2013-02-05 11:24 ` Richard Miller
@ 2013-02-05 15:16   ` erik quanstrom
  0 siblings, 0 replies; 3+ messages in thread
From: erik quanstrom @ 2013-02-05 15:16 UTC (permalink / raw)
  To: 9fans

On Tue Feb  5 06:25:43 EST 2013, 9fans@hamnavoe.com wrote:
> > it seems like the ctlrhalt/stalled might be
> > self inflicted?
>
> Endpoint stalled is not necessarily an error condition - the usb
> mass storage protocol uses it fairly freely to signal that something
> or other needs to be done.  I would guess that your device and the
> driver are not quite in agreement over the protocol.

it's interesting that the stalled dance continues after usb/disk has given up.

> What does usb/probe tell you about the csp?

harness# usb/probe
ep1.0 roothub csp 0x000009 ports 2 uhci
ep2.0 roothub csp 0x000009 ports 2 uhci
ep3.0 roothub csp 0x000009 ports 2 uhci
ep4.0 roothub csp 0x000009 ports 2 uhci
ep5.0 roothub csp 0x000009 ports 8 ehci
ep6.0 storage csp 0x500508 vid 0x0411 did 0x0165 BUFFALO 'BUFFALO Optical Drive' ehci

> Can you read the raw /dev/sdU0.0/data successfully?

no.

harness# ls -l
--rw-rw-r-- M 48 bootes bootes 0 Feb  5 10:06 ctl
--rw-r----- M 48 bootes bootes 0 Feb  5 10:06 data
--rw-r----- M 48 bootes bootes 0 Feb  5 10:06 raw

(i did modify usb/disk/disk.c slightly

/n/sources/plan9/sys/src/cmd/usb/disk/disk.c:151,157 - disk.c:125,132
  				GETBELONG(data + 4);
  		}
  	}
- 	lun->blocks++; /* SRcapacity returns LBA of last block */
+ 	if(lun->blocks != 0)
+ 		lun->blocks++; /* SRcapacity returns LBA of last block */
  	lun->capacity = (vlong)lun->blocks * lun->lbsize;
  	if(diskdebug)
  		fprint(2, "disk: logical block size %lud, # blocks %llud\n",
)

  this disk reads and writes fine with a sata drive & cdfs.

harness# scuzz /dev/sdU0.0
inquiry
 05 80 00 32 5B 00 00 00	Optiarc DVD RW AD-7560S SB01 Mar30,2009
ok 0
capacity
 0 2048
ok 8
rdiscinfo
	data length: 0x20
	info[2] 0x05
		Incomplete disc (Appendable)
		Incomplete Session
	Number of First Track on Disc 1
	Number of Sessions 1
	First Track Number in Last Session 1
	Last Track Number in Last Session 2
	info[7] 0x80
		Disc ID Valid
	info[8] 0x00
		CD-DA or CD-ROM Disc
	Last Session lead-in Start Time M/S/F: 0x61/0x1A/0x42
	Last Possible Start Time for Start of lead-out M/S/F: 0x4F/0x3B/0x4A
 00 20 05 01 01 01 02 80 00 00 00 00 00 75 24 13
 00 61 1A 42 00 4F 3B 4A 00 00 00 00 00 00 00 00
 00 00 00 00
ok 36
rtrackinfo
	data length: 0x1E
Track Number 0
Session Number 1
	info[4] 0x04
		Track Mode 0x04: Data track, recorded uninterrupted
	info[6] 0x01
		Data Mode 0x01: Mode 1 (ISO/IEC 10149)
	Track Start Address 0xFFFFD28E
	Free Blocks 0x00000000
	Track Size 0x00002CDC
 00 1E 00 01 00 04 01 00 FF FF D2 8E 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 2C DC 00 00 00 00ok 32



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

end of thread, other threads:[~2013-02-05 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05  4:06 [9fans] no luck with usb cdrom erik quanstrom
2013-02-05 11:24 ` Richard Miller
2013-02-05 15:16   ` erik quanstrom

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).