From nobody Mon Feb 21 10:44:27 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC4AE19C914D for ; Mon, 21 Feb 2022 10:44:38 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2JpF4cdvz4kl3 for ; Mon, 21 Feb 2022 10:44:37 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.16.1) with ESMTPS id 21LAiSZm092247 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 21 Feb 2022 11:44:28 +0100 (CET) (envelope-from wojtek@puchar.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puchar.net; s=default; t=1645440268; bh=2P+vyF3iR+XidYZFWzQ1UuOIAFgLSNhxakXtM74fuCg=; h=Date:From:To:Subject; b=m1nC7OwIe3LJnwVkC+caAiWX04OMU2D31bmOUq6T0j+hmRMHBXTZ94JuVbUF+PsBO t/YWJu6wip9hEuFdh1LCdaW8W94gHGaw6WOa7Hvttk5aLJicAUfRPTaR4yQEV0PcZE vOSnoI78PSKpAPAqjzazphAsqAdJex5sZYPayuQ0= Received: from wojtek.intra (localhost [127.0.0.1]) by wojtek.intra (8.16.1/8.16.1) with ESMTP id 21LAiRH9006240 for ; Mon, 21 Feb 2022 11:44:27 +0100 (CET) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by wojtek.intra (8.16.1/8.16.1/Submit) with ESMTP id 21LAiRGV006237 for ; Mon, 21 Feb 2022 11:44:27 +0100 (CET) (envelope-from wojtek@puchar.net) X-Authentication-Warning: wojtek.intra: wojtek owned process doing -bs Date: Mon, 21 Feb 2022 11:44:27 +0100 (CET) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Subject: problem with USB-CD drive Message-ID: <197d435-6c4b-a60-4e6f-ea4ee515b8f4@puchar.net> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Rspamd-Queue-Id: 4K2JpF4cdvz4kl3 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=puchar.net header.s=default header.b=m1nC7OwI; dmarc=none; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-3.50 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[puchar.net:s=default]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; HAS_XAW(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[puchar.net:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_NA(0.00)[puchar.net]; MLMMJ_DEST(0.00)[freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I wrote software for microcontroller with USB device port that presents itself as USB CD and includes ISO9660 image. 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: at usbus1 umass0 on uhub5 umass0: 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: 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?