From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DDBBBA4A; Sat, 6 Sep 2025 12:04:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757160284; cv=pass; b=N7bf0a0sushFUIEVLz364lmyrwKOCc3F20XawBji31kZwS9jDCh5MXsOdP0kW4HQOFdVPh1Vkewzem6Ficj7Lw5Xn+YpyrvN3Oikxiw20mfCBnmnBXmrd/kR0NDq61RIvHox1p7dh3b3wUW56pCgc13poFB13mwb/mgtxLCCXTY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757160284; c=relaxed/simple; bh=mWcHetSjsF2dlN8vR/mVQ5wk5y7HtVkm+F1SdIZ/jIA=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=Derrn5ZXc57waQ0u9QGjHiDGzlgAt76cONE5WNJRYG6Kbr82fUI65SVD3Jr20u2JVYlIdhkkRptb7WHa5AFgOnprzbTOngQZ9V5FVT8wkssrE+HGwWO5h8cSvsIpnY+uHQ3aafHiItIamqPvZHK8yYjc9G/9RW/adnsFfzZvR3I= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=daniel.almeida@collabora.com header.b=XTipPaZH; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=daniel.almeida@collabora.com header.b="XTipPaZH" ARC-Seal: i=1; a=rsa-sha256; t=1757160263; cv=none; d=zohomail.com; s=zohoarc; b=Y/FL/n/QhKVZ+Lt9Ka1jOT7vZnBwSUTz3K/C+m+h9724Jdh4h7LpHdi1ysK5q951d/I2MoEAfrlqyiiwVLsh2/NGre3rFFo9fbbtjJBgsCegFZWMFUbBqH8LNqU5rUgXglsFZAR4o3k5SHYJxLfM8nBrWz3CmwKUB8trqyFF8oA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757160263; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=cgS2LFhfqoOwMMZF35dVsRyk0A8wU/fwZfnbwYwViMQ=; b=Pba9uHYSEK/tnxqoyHyCwmMLrwfmIQooxFes4JmHF3zDn0Xwavh55D3Wrrq1wW2S7ZwfDZ7pn9geKRpXEq4FTtIqjmWqR7vav6Q6s6pzN6PSxyD9KgvLFgn2aOHpnIlxHGym/1VkIbQQvZwWTjo9qAzg/3QuKU0waciFcGbRpzA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=daniel.almeida@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1757160263; s=zohomail; d=collabora.com; i=daniel.almeida@collabora.com; h=Content-Type:Mime-Version:Subject:Subject:From:From:In-Reply-To:Date:Date:Cc:Cc:Content-Transfer-Encoding:Message-Id:Message-Id:References:To:To:Reply-To; bh=cgS2LFhfqoOwMMZF35dVsRyk0A8wU/fwZfnbwYwViMQ=; b=XTipPaZH81StLxyWq/eav9OBZXpKPBzYNbfzFxGi0sEhnrRj5u6IPmzaYuJ++JXG krmVYhpcyP+ThBy6ziN0ogDyBPVDIKRxHHBxj5Jg49/Vz4HtRBGRh3+REqto7NFSzs8 mfCu4zRjYkc4vgJ11jkx+ICigXR8z4+LPkB67idU= Received: by mx.zohomail.com with SMTPS id 1757160261040224.5192787006066; Sat, 6 Sep 2025 05:04:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [PATCH 2/2] samples: rust: add a USB driver sample From: Daniel Almeida In-Reply-To: <2025090618-smudgy-cringing-a7a4@gregkh> Date: Sat, 6 Sep 2025 09:04:04 -0300 Cc: Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-usb@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20250825-b4-usb-v1-0-7aa024de7ae8@collabora.com> <20250825-b4-usb-v1-2-7aa024de7ae8@collabora.com> <2025090618-smudgy-cringing-a7a4@gregkh> To: Greg Kroah-Hartman X-Mailer: Apple Mail (2.3826.700.81) X-ZohoMailClient: External Hi Greg, [=E2=80=A6] >=20 > Sorry for the delay. >=20 > But these bindings really are only for a usb interface = probe/disconnect > sequence, right? no real data flow at all? >=20 > I recommend looking at the usb-skeleton.c driver, and implementing = that > as your sample driver for rust. That will ensure that you actually = have > the correct apis implemented and the reference count logic working > properly. You have urb anchors and callbacks and other stuff as well = to > ensure that you get right. That driver pretty much should handle > everything that you need to do to write a usb driver for any type of > "real" device. >=20 > thanks, >=20 > greg k-h I thought that an iterative approach would work here, i.e.: merge this, = then URBs, then more stuff, etc. In any case that=E2=80=99s OK. I will work on the other stuff you listed = here. =E2=80=94 Daniel=