Re: problem with USB-CD drive

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Wed, 02 Mar 2022 01:49:25 UTC
Wojciech Puchar wrote this message on Mon, Feb 21, 2022 at 11:44 +0100:
> I wrote software for microcontroller with USB device port that presents 
> itself as USB CD and includes ISO9660 image.

Is this an ST micro?  I have a couple outstanding issues where ST hasn't
implemented the USB spec properly in their reference code causing issues
w/ FreeBSD...  This isn't in the CD code, but other reference device
classes...

> It works under windows - "CD" is detected and files readable
> it works under MacOS - same
> It mostly works under FreeBSD.
> 
> 
> FreeBSD detects it properly
> 
> 
> ugen1.5: <Digital Systems DS700> at usbus1
> umass0 on uhub5
> umass0: <Digital Systems DS700, class 0/0, rev 1.10/28.01, addr 5> on 
> usbus1
> umass0:  SCSI over Bulk-Only; quirks = 0x0100
> umass0:3:0: Attached to scbus3
> cd1 at umass-sim0 bus 0 scbus3 target 0 lun 0
> cd1: <Digital DS700 Virtual CD 0128> Removable CD-ROM SCSI-2 device
> cd1: Serial Number 220123456789
> cd1: 1.000MB/s transfers
> cd1: 16MB (8192 2048 byte sectors)
> cd1: quirks=0x10<10_BYTE_ONLY>
> 
> 
> 
> i can read sectors by dd, by single (bs=2k) or multiple.
> Other communication (vendor specific SCSI commands - used to 
> configure/control the device with our software) - works properly.
> 
> 
> If i make an image (first 34 sectors, device presents itself as 16MB
> to prevent problems with some OSes but everything later are zeros) - it is 
> good - did cmp with original image file.
> 
> i can do mdconfig, mount_cd9660 on this file and everything is fine.
> 
> 
> BUT
> 
> mount_cd9660 /dev/cd1 /mnt
> 
> results in:
> 
> mount_cd9660: /dev/cd1: Invalid argument
> 
> There is no kernel messages.
> 
> How could i find out what is exactly a problem?

run usbdump to see what the commands are, and see if there is anything
that could be causing issues.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."