From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 944862FD1CF; Tue, 23 Sep 2025 14:25:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758637551; cv=none; b=fmw9Y/YA9g9wlt5beQqFvWnkYZXbBDGa8n6D971jGTkM7WOSgn/MHun/cuSWzqVbGXXK0ul4bEP8D7FQ9c1xyH/WZiNn2pmNnnHjXHiU1DkarsKxsOQD+D9ivq7kJTVqGmJVgLQL79II204PdKZ4Co+iE4w0ey9m111ZItKb1LE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758637551; c=relaxed/simple; bh=B62fy58K218VlBt3HtXEYP+rlRS1dhQAoP6Mpc2NLVQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u0r5d2ms8Dw/Xg3MreZvHtfos65MHx6Pk2ar5q3oTsBGuDl9/XOJ5BQyBPRxLqioqZcTJIqjShKlVsJygn+GqB+tx7N8rvtPQGOtdqJedVVzW+wgqXiX7Yhjriss8QX8Do3K7Mr//YVlD+aFPaMJh1m8hrCFNJwkDSlcpKP3L+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RY8x6hpO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RY8x6hpO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A9DEC113CF; Tue, 23 Sep 2025 14:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758637551; bh=B62fy58K218VlBt3HtXEYP+rlRS1dhQAoP6Mpc2NLVQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=RY8x6hpOsdeNgW62Dzv+sDzuhIdKC17nyPDC9mzl1NbMgEnMFrRaKCBnIWyQ9Mica SiX6I9xxM35Pk/nYDVoneTJM57+rkGpuZQZjVoIbwzMA+H8/F3wd/j+pah0DhL18q7 UqS5qJXkx3QlMY9lZP1S2vMM8Xjy/81wqIwpmlZbW6Vb2E4CuibuD+zuFrp0QKoCQG EEGxeDkfgLmuedfJDLdPbkU6X13UJNfM+ziVdECGGq1fls42YQif2gYZN19d35oFKI FnFDD3JW+FdgLK0yn8tu0/UTfioRjmdvVrgmHAKfAMEyuIMcxHFSkqqbh7TyJjejRi RaAGk/e6DFUPg== Message-ID: <13ce0ad0-f0d5-4579-9a48-db727baa177f@kernel.org> Date: Tue, 23 Sep 2025 16:25:46 +0200 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] rust: usb: add basic USB abstractions To: Greg Kroah-Hartman Cc: Oliver Neukum , Daniel Almeida , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-usb@vger.kernel.org References: <20250825-b4-usb-v1-0-7aa024de7ae8@collabora.com> <20250825-b4-usb-v1-1-7aa024de7ae8@collabora.com> <2025092356-rounding-eligibly-c4b7@gregkh> <2025092307-scoop-challenge-4054@gregkh> From: Danilo Krummrich Content-Language: en-US In-Reply-To: <2025092307-scoop-challenge-4054@gregkh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 9/23/25 4:22 PM, Greg Kroah-Hartman wrote: > On Tue, Sep 23, 2025 at 04:16:36PM +0200, Oliver Neukum wrote: >> On 23.09.25 16:13, Greg Kroah-Hartman wrote: >> >>> Functions like usb_fill_bulk_urb() takes a pointer to a usb_device, not >>> an interface. Yes, we should fix that, but that "mistake" dates way way >>> way back to the original USB api decades ago. So much so that I didn't >>> even remember that we used that pointer there :) >> >> How would we do that? We need to be able to send at least control >> request to devices before we have established which configurations >> or interfaces the device has. > > Oops, I thought that usb_dev in struct usb_interface was a pointer to > struct usb_device, but no, it's something else... So no, we need to > keep that as-is for now. You can still get it via interface_to_usbdev(), no?