Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Mar 2022 17:49:25 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Wojciech Puchar <wojtek@puchar.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: problem with USB-CD drive
Message-ID:  <20220302014925.GA88842@funkthat.com>
In-Reply-To: <197d435-6c4b-a60-4e6f-ea4ee515b8f4@puchar.net>
References:  <197d435-6c4b-a60-4e6f-ea4ee515b8f4@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220302014925.GA88842>