Subject: USB again
To: None <current-users@NetBSD.org>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: current-users
Date: 08/15/2003 17:24:20
The perils of asking two questions in one posting - everyone always answers 
one and not the other...

I asked about possible quirk settings that might get a USB FlashDrive I have 
working (it works on MacOSX and Win2K) and got no responses to this.  Does 
this mean the behaviour I'm seeing doesn't equate to a quirk that is known?
How can I track this down further?

Below is the dmesg output again, this time with usbdebug and umassdebug flags 
set.

usbd_new_device bus=0xd1320000 port=1 depth=1 speed=2
usbd_setup_pipe: dev=0xd156e080 iface=0x0 ep=0xd156e0a4 pipe=0xd156e084
usbd_get_desc: type=1, index=0, len=8
usbd_new_device: adding unit addr=2, rev=200, class=9, subclass=0, protocol=0, maxpacket=64, len=18, speed=2
usbd_get_device_desc:
usbd_get_desc: type=1, index=0, len=18
usbd_new_device: new dev (addr 2), dev=0xd156e080, parent=0xd131bbc0
usbd_probe_and_attach: trying device specific drivers
uhub1 at uhub0 port 1
uhub1: Prolific Technology Inc. USB Embedded Hub, class 9/0, rev 2.00/0.01, addr 2
usbd_get_config_desc: confidx=0
usbd_get_desc: type=2, index=0, len=9
usbd_get_desc: type=2, index=0, len=34
usbd_set_config_index: status=0x0001, error=NORMAL_COMPLETION
usbd_set_config_index: (addr 1) cno=2 attr=0xc0, selfpowered=1, power=100
usbd_set_config_index: set config 1
usbd_fill_iface_data: ifaceidx=0 altidx=0
usbd_find_idesc: idx=0(-1) altidx=0(0) len=9 type=2
usbd_find_idesc: idx=0(-1) altidx=0(0) len=9 type=4
usbd_fill_iface_data: found idesc nendpt=1
uhub1: 1 port with 0 removable, self powered
usbd_open_pipe_intr: address=0x81 flags=0x4 len=1
usbd_open_pipe: iface=0xd13fcee0 address=0x81 flags=0x1
usbd_setup_pipe: dev=0xd156e080 iface=0xd13fcee0 ep=0xd14d6560 pipe=0xf3739488
usbd_reset_port: port 1 reset done, error=NORMAL_COMPLETION
usbd_new_device bus=0xd1320000 port=1 depth=2 speed=2
usbd_setup_pipe: dev=0xd14d0b00 iface=0x0 ep=0xd14d0b24 pipe=0xd14d0b04
usbd_get_desc: type=1, index=0, len=8
usbd_new_device: adding unit addr=3, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=2
usbd_get_device_desc:
usbd_get_desc: type=1, index=0, len=18
usbd_new_device: new dev (addr 3), dev=0xd14d0b00, parent=0xd17b8b00
usbd_probe_and_attach: trying device specific drivers
usbd_probe_and_attach: no device specific driver found
usbd_probe_and_attach: looping over 1 configurations
usbd_probe_and_attach: trying config idx=0
usbd_get_config_desc: confidx=0
usbd_get_desc: type=2, index=0, len=9
usbd_get_desc: type=2, index=0, len=32
usbd_set_config_index: status=0x0000, error=NORMAL_COMPLETION
usbd_set_config_index: (addr 1) cno=3 attr=0xc0, selfpowered=0, power=0
usbd_set_config_index: set config 1
usbd_fill_iface_data: ifaceidx=0 altidx=0
usbd_find_idesc: idx=0(-1) altidx=0(0) len=9 type=2
usbd_find_idesc: idx=0(-1) altidx=0(0) len=9 type=4
usbd_fill_iface_data: found idesc nendpt=2
umass0 at uhub1 port 1 configuration 1 interface 0
umass0: Prolific Technology Inc. USB Mass Storage Device, rev 2.00/0.01, addr 3
umass0: using ATAPI over Bulk-Only
umass0: Get Max Lun
umass0: Max Lun 0
usbd_open_pipe: iface=0xd13fe920 address=0x1 flags=0x1
usbd_setup_pipe: dev=0xd14d0b00 iface=0xd13fe920 ep=0xd1645790 pipe=0xf37394c8
usbd_open_pipe: iface=0xd13fe920 address=0x82 flags=0x1
usbd_setup_pipe: dev=0xd14d0b00 iface=0xd13fe920 ep=0xd1645798 pipe=0xf37394c8
usb_allocmem: large alloc 65536
umass0: umass_attach_bus: ATAPI
atapibus1 at umass0 channel 0: 2 targets
umass_atapi_probe_device: atapi=0xd182e9c0 target=0
umass_atapi_probe_device: doing inquiry
umass0: umass_scsi_cmd: at 1060865305.035419: 0:0 xs=0xd17ae000 cmd=0x12 datalen=74 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=12 datalen=36
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 50: cmdlen=12 (0x120000004a2400000000...), data = 36 bytes, dir = in
umass0: start xfer buffer=0xd1830e68 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xd1644d00, NORMAL_COMPLETION
umass0: start xfer buffer=0xf4498000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xd17a2300, NORMAL_COMPLETION
umass0: 0x 008000011f0000003235364d42202020 buffer=0xf37392e4, buflen=36
umass0: 0x 555342322e30466c6173684472697665
umass0: 0x 50312e30
umass0: start xfer buffer=0xd1830e87 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xd17a2800, NORMAL_COMPLETION
umass0: CSW 50: sig = 0x53425355 (valid), tag = 50, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1060865305.039879, delta=4460: xs=0xd17ae000 residue=0 status=0
umass_scsipi_cb: at 1060865305.039879: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass_atapi_probedev: doing atapi_probedev on '256MB' 'USB2.0FlashDrive' 'P1.0'
sd0 at atapibus1 drive 0: <256MB, USB2.0FlashDrive, P1.0> disk removable
umass0: umass_scsi_cmd: at 1060865305.040116: 0:0 xs=0xd17ae000 cmd=0x1b datalen=0 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=12 datalen=0
umass0: umass_bbb_transfer cmd=0x1b
umass0: CBW 51: cmdlen=12 (0x1b000000010000000000...), data = 0 bytes, dir = out
umass0: start xfer buffer=0xd1830e68 buflen=31 flags=0x0 timeout=65000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xd1644d00, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xd1830e87 buflen=13 flags=0x0 timeout=65000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xd17a2800, NORMAL_COMPLETION
umass0: CSW 51: sig = 0x53425355 (valid), tag = 51, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1060865305.042864, delta=2748: xs=0xd17ae000 residue=0 status=0
umass_scsipi_cb: at 1060865305.042864: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1060865305.042935: 0:0 xs=0xd17ae000 cmd=0x23 datalen=12 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=12 datalen=12
umass0: umass_bbb_transfer cmd=0x23
umass0: CBW 52: cmdlen=12 (0x23000000000000000c00...), data = 12 bytes, dir = in
umass0: start xfer buffer=0xd1830e68 buflen=31 flags=0x0 timeout=25000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xd1644d00, NORMAL_COMPLETION
umass0: start xfer buffer=0xf4498000 buflen=12 flags=0x5 timeout=25000
umass0: Handling BBB state 2 (BBB Data), xfer=0xd17a2300, STALLED
umass0: Data-in 12 failed, STALLED
umass0: Clear endpoint 0x82 stall
umass0: Handling BBB state 3 (BBB Data bulk-in/-out clear stall), xfer=0xd17a2000, NORMAL_COMPLETION
umass0: start xfer buffer=0xd1830e87 buflen=13 flags=0x0 timeout=25000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xd17a2800, NORMAL_COMPLETION
umass0: CSW 52: sig = 0x53425355 (valid), tag = 52, res = 12, status = 0x01 (failed)
umass0: Command Failed, res = 12
umass_scsipi_cb: at 1060865305.050883, delta=7948: xs=0xd17ae000 residue=12 status=2
umass0: umass_bbb_transfer cmd=0x03
umass0: CBW 53: cmdlen=6 (0x03000000200000000c00), data = 32 bytes, dir = in
umass0: start xfer buffer=0xd1830e68 buflen=31 flags=0x0 timeout=25000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xd1644d00, NORMAL_COMPLETION
umass0: start xfer buffer=0xf4498000 buflen=32 flags=0x5 timeout=25000
umass0: Handling BBB state 2 (BBB Data), xfer=0xd17a2300, NORMAL_COMPLETION
umass0: 0x 700002000000000a000000003a000000 buffer=0xd17ae05c, buflen=32
umass0: 0x 000042322e30466c6173684472697665
umass0: start xfer buffer=0xd1830e87 buflen=13 flags=0x0 timeout=25000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xd17a2800, NORMAL_COMPLETION
umass0: CSW 53: sig = 0x53425355 (valid), tag = 53, res = 0, status = 0x00 (good)
umass_scsipi_sense_cb: xs=0xd17ae000 residue=0 status=0
umass_scsipi_sense_cb: return xs->error=1, xs->xs_status=0x1 xs->resid=12
sd0(umass0:0:0):  Check Condition on CDB: 0x23 00 00 00 00 00 00 00 0c 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Medium Not Present

sd0: drive offline
umass_atapi_probe_device: atapi=0xd182e9c0 target=1
umass0: Attach finished
usb_event_thread: woke up
usb_discover
usb_event_thread: woke up
usb_discover


cheers
mark