From nobody Tue Oct 11 10:05:47 2022 X-Original-To: freebsd-usb@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 4MmrzW5p9kz4fQBF for ; Tue, 11 Oct 2022 10:06:47 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net [IPv6:2403:5800:5200:4700:225:90ff:fe47:39b4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "dons.net.au", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MmrzT3W56z3Qsv for ; Tue, 11 Oct 2022 10:06:44 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.17.1/8.16.1) with ESMTPS id 29BA63gU049300 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 11 Oct 2022 20:36:12 +1030 (ACDT) (envelope-from darius@dons.net.au) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dons.net.au; s=default; t=1665482775; bh=2LM67W6KVkk7kY89gl3+NM/MzE+eb6rQJw65e/dlSm8=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=CT45IgyUC7XAMQTJEvGtQTr8KUTG06tBin95+s6klwd5xAbfFZ+iC4pZP6CVfgIRO lk/GZfQ23SexISEvPV60Y+cQZ2cFKN98fBe4zb+Nw1b6W8RtzhGDXwVc2yvovsdQYU +B9fnXGtyoQqW/md71qm9FN9WzoXtjVmAimsCmIs= Received: (from mailnull@localhost) by midget.dons.net.au (8.17.1/8.16.1/Submit) id 29BA5w7w049297 for ; Tue, 11 Oct 2022 20:35:58 +1030 (ACDT) (envelope-from darius@dons.net.au) X-MIMEDefang-Relay-a1a524833438212bf543e143edafb27bc4d2c346: 2403:5800:5200:4700:51af:7369:9766:f233 Received: from smtpclient.apple ([IPv6:2403:5800:5200:4700:51af:7369:9766:f233] [2403:5800:5200:4700:51af:7369:9766:f233]) by 2403-5800-5200-4700-225-90ff-fe47-39b4.ip6.aussiebb.net (envelope-sender ) (MIMEDefang) with ESMTP id 29BA5vsc049289; Tue, 11 Oct 2022 20:35:58 +1030 Content-Type: text/plain; charset=us-ascii List-Id: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Failed control transfer From: "Daniel O'Connor" In-Reply-To: <7e1de023-094f-4247-146d-9e8f498ae0e7@selasky.org> Date: Tue, 11 Oct 2022 20:35:47 +1030 Cc: freebsd-usb@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <7FF9CB5C-26B0-4DBA-B7E4-80DBF50A80BB@dons.net.au> <7e1de023-094f-4247-146d-9e8f498ae0e7@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE,SPF_HELO_NONE, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.5 X-Scanned-By: MIMEDefang 2.84 on 10.0.2.1 X-Rspamd-Queue-Id: 4MmrzT3W56z3Qsv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=dons.net.au header.s=default header.b=CT45IgyU; dmarc=pass (policy=quarantine) header.from=dons.net.au; spf=pass (mx1.freebsd.org: domain of darius@dons.net.au designates 2403:5800:5200:4700:225:90ff:fe47:39b4 as permitted sender) smtp.mailfrom=darius@dons.net.au X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[dons.net.au,quarantine]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[dons.net.au:s=default]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-usb@freebsd.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[dons.net.au:+]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:4764, ipnet:2403:5800::/32, country:AU]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N > On 11 Oct 2022, at 17:27, Hans Petter Selasky wrote: >=20 > On 10/11/22 06:18, Daniel O'Connor wrote: >> I am trying to fix a bug in xc3sprog whereby it can't read the = hardware ID (serial number) from the Xilinx programming tool. >=20 > Sometimes you need to ask for 255 bytes and allow the control transfer = to short terminate. Many USB devices are broken this way, that they = cannot return partial USB descriptors. I tried that but no dice: In [6]: d.ctrl_transfer(0xc0, 176, 0x42, 0, 256, 1000) = --------------------------------------------------------------------------= - USBError Traceback (most recent call = last) ... USBError: [Errno 19] No device The device does do short transfers for other requests, eg a version = request: In [7]: d.ctrl_transfer(0xc0, 176, 0x50, 258, 2, 100) Out[7]: array('B', [5, 0]) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum