Subject: Re: Will DiskOnKey work?
To: Steve Bellovin <smb@research.att.com>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-users
Date: 07/30/2001 22:53:47
--y0ulUmNC+osPPQO6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

>>Has anyone tried a DiskOnKey USB "disk drive" on NetBSD?  They claim 
>>that Win98 ME, Win2K, MacOS 9, and Linux 2.4 support it with no special
>>drivers needed.  (www.diskonkey.com)
>...
>i bought one anyway.

it arrived today.  i shoved it into the usb port and the kernel said:

   umass0 at uhub0 port 1 configuration 1 interface 0
   umass0: M-Systems DiskOnKey, rev 1.00/2.00, addr 2
   umass0: using SCSI over BBB-P
   scsibus0 at umass0: 2 targets, 1 luns per target
   scsibus0: waiting 2 seconds for devices to settle...
   sd0 at scsibus0 target 1 lun 0: <M-Sys, DiskOnKey, 2.01> SCSI0 0/direct removable
   sd0: mode sense (4) returned nonsense; using fictitious geometry
   sd0: 31824 KB, 31 cyl, 64 head, 32 sec, 512 bytes/sect x 63648 sectors

but any attempts to ask it cause the kernel to say:

   sd0: mode sense (4) returned nonsense; using fictitious geometry

and the process gets stuck in disk wait.  at that point, all i could
think of was yanking the thing out, which sort of works.  the process
dies and everything gets detached properly.

but if i do this more than two or three more times, the machine will
wedge and not respond to anything.

after adding UMASS_DEBUG to my kernel config and rebooting (and
setting umassdebug to -1 via ddb), i get the attached output when i
plug the thing in, but i don't really know what's wrong.

help?  hints?  maybe some quirks?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."

--y0ulUmNC+osPPQO6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=messages

umass0 at uhub0 port 1 configuration 1 interface 0
umass0: M-Systems DiskOnKey, rev 1.00/2.00, addr 2
umass0: using SCSI over BBB-P
umass0: Get Max Lun
umass0: Get Max Lun SHORT_XFER
scsibus0 at umass0: 2 targets, 1 luns per target
scsibus0: waiting 2 seconds for devices to settle...
umass0: umass_scsi_cmd: at 996526457.730050: 1:0 xs=0xc082d000 cmd=0x00 datalen=0 (quirks=0x0, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 42: cmd = 6b (0x000000000000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 42: sig = 0x53425355 (valid), tag = 42, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.733739, delta=3689: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.733739: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 996526457.734066: 1:0 xs=0xc082d000 cmd=0x12 datalen=74 (quirks=0x0, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=74
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 43: cmd = 6b (0x120000004a00), data = 74 bytes, dir = in
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: start xfer buffer=0xcf5ab000 buflen=74 flags=0x5 timeout=10403
umass0: Handling BBB state 2 (BBB Data), xfer=0xc0812700, NORMAL_COMPLETION
umass0: 0x 00800001750000004d2d537973202020 buffer=0xcf34f484, buflen=74
umass0: 0x 4469736b4f6e4b657920202020202020
umass0: 0x 322e3031000000000000000000000000 ...
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 43: sig = 0x53425355 (valid), tag = 43, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.739764, delta=5698: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.739764: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd0 at scsibus0 target 1 lun 0: <M-Sys, DiskOnKey, 2.01> SCSI0 0/direct removable
umass0: umass_scsi_cmd: at 996526457.740576: 1:0 xs=0xc082d000 cmd=0x1b datalen=0 (quirks=0x10, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x1b
umass0: CBW 44: cmd = 6b (0x1b0000000100), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 44: sig = 0x53425355 (valid), tag = 44, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.743722, delta=3146: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.743722: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 996526457.744324: 1:0 xs=0xc082d000 cmd=0x1a datalen=44 (quirks=0x10, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=44
umass0: umass_bbb_transfer cmd=0x1a
umass0: CBW 45: cmd = 6b (0x1a0004002c00), data = 44 bytes, dir = in
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: start xfer buffer=0xcf5ab000 buflen=44 flags=0x5 timeout=10403
umass0: Handling BBB state 2 (BBB Data), xfer=0xc0812700, NORMAL_COMPLETION
umass0: 0x 00000000000000000000000000000000 buffer=0xcf34f360, buflen=44
umass0: 0x 00000000000000000000000000000000
umass0: 0x 000000000000000000000000
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 45: sig = 0x53425355 (valid), tag = 45, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.749720, delta=5396: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.749720: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd0: mode sense (4) returned nonsense; using fictitious geometry
umass0: umass_scsi_cmd: at 996526457.750288: 1:0 xs=0xc082d000 cmd=0x25 datalen=8 (quirks=0x10, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=8
umass0: umass_bbb_transfer cmd=0x25
umass0: CBW 46: cmd = 10b (0x250000000000...), data = 8 bytes, dir = in
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: start xfer buffer=0xcf5ab000 buflen=8 flags=0x5 timeout=10403
umass0: Handling BBB state 2 (BBB Data), xfer=0xc0812700, NORMAL_COMPLETION
umass0: 0x 0000f89f00000200 buffer=0xcf34f328, buflen=8
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 46: sig = 0x53425355 (valid), tag = 46, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.755721, delta=5433: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.755721: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd0: 31824 KB, 31 cyl, 64 head, 32 sec, 512 bytes/sect x 63648 sectors
umass0: umass_scsi_cmd: at 996526457.756226: 1:0 xs=0xc082d000 cmd=0x00 datalen=0 (quirks=0x10, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 47: cmd = 6b (0x000000000000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc082ac5c buflen=31 flags=0x0 timeout=10403
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc07a5c00, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc082ac7b buflen=13 flags=0x0 timeout=10403
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc07a5500, NORMAL_COMPLETION
umass0: CSW 47: sig = 0x53425355 (valid), tag = 47, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 996526457.760710, delta=4484: xs=0xc082d000 residue=0 status=0
umass_scsipi_cb: at 996526457.760710: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: Attach finished

--y0ulUmNC+osPPQO6--