Discussion:
[9fans] no luck with usb cdrom
(too old to reply)
erik quanstrom
2013-02-05 04:06:00 UTC
Permalink
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
[...]
Richard Miller
2013-02-05 11:24:38 UTC
Permalink
Post by erik quanstrom
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?
erik quanstrom
2013-02-05 15:16:09 UTC
Permalink
Post by Richard Miller
Post by erik quanstrom
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.
Post by Richard Miller
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
Post by Richard Miller
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

Loading...