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: Re: [9fans] no luck with usb cdrom
Date: Tue,  5 Feb 2013 10:16:09 -0500	[thread overview]
Message-ID: <168d4ee0fc9620c3a2058b775a99084d@brasstown.quanstro.net> (raw)
In-Reply-To: <b4d5058ba100a419f79fbf5972f2186d@hamnavoe.com>

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



      reply	other threads:[~2013-02-05 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05  4:06 erik quanstrom
2013-02-05 11:24 ` Richard Miller
2013-02-05 15:16   ` erik quanstrom [this message]

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=168d4ee0fc9620c3a2058b775a99084d@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).