From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, Kannappan R <r.kannappan@intel.com>,
Amardeep Rai <amardeep.rai@intel.com>
Subject: Re: [PATCH] USB: core: Add eUSB2 descriptor and parsing in USB core
Date: Fri, 21 Feb 2025 10:53:08 +0200 [thread overview]
Message-ID: <01300a1a-a2f1-4816-9341-933ef236e887@linux.intel.com> (raw)
In-Reply-To: <2025022056-confess-unlovely-da5a@gregkh>
On 20.2.2025 18.35, Greg KH wrote:
> On Thu, Feb 20, 2025 at 04:13:39PM +0200, Mathias Nyman wrote:
>> From: Kannappan R <r.kannappan@intel.com>
>> --->> @@ -64,9 +65,10 @@ struct ep_device;
>> * descriptor within an active interface in a given USB configuration.
>> */
>> struct usb_host_endpoint {
>> - struct usb_endpoint_descriptor desc;
>> - struct usb_ss_ep_comp_descriptor ss_ep_comp;
>> - struct usb_ssp_isoc_ep_comp_descriptor ssp_isoc_ep_comp;
>> + struct usb_endpoint_descriptor desc;
>> + struct usb_ss_ep_comp_descriptor ss_ep_comp;
>> + struct usb_ssp_isoc_ep_comp_descriptor ssp_isoc_ep_comp;
>> + struct usb_eusb2_isoc_ep_comp_descriptor eusb2_isoc_ep_comp;
>
> No real need to indent any of these, but oh well :)
It looked odd when adding one new variable off by a space compared to all the
other neatly tab-aligned variables. So I shifted them all right.
>> +/* USB_DT_EUSB2_ISOC_ENDPOINT_COMP: eUSB2 Isoch Endpoint Companion descriptor */
>> +struct usb_eusb2_isoc_ep_comp_descriptor {
>> + __u8 bLength;
>> + __u8 bDescriptorType;
>> + __le16 wMaxPacketSize;
>> + __le32 dwBytesPerInterval;
>> +} __attribute__ ((packed));
>> +
>> +#define USB_DT_EUSB2_ISOC_EP_COMP_SIZE 8
>
> Can't we use a sizeof() for this as well? I guess we don't do it for
> other structures, so maybe not.
>
> Anyway, this looks fine, if you want to just send an update for the
> 0x0220 later on if you think it's needed, please do.
Thanks for looking at this.
We did consider defining 0x0220, but checked that usb core uses magic numbers
for bcdUSB in other places:
hcd.c: if (le16_to_cpu(usb_dev->descriptor.bcdUSB) >= 0x0201) {
hub.c: (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) {
hub.c: if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0201) {
hub.c: if (le16_to_cpu(udev->descriptor.bcdUSB) >= 0x0200
hub.h: le16_to_cpu(hdev->descriptor.bcdUSB) >= 0x0310 &&
Makes sense to add a separate patch later on that define all these.
Thanks
Mathias
next prev parent reply other threads:[~2025-02-21 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 14:13 [PATCH] USB: core: Add eUSB2 descriptor and parsing in USB core Mathias Nyman
2025-02-20 15:31 ` Alan Stern
2025-02-20 16:35 ` Greg KH
2025-02-21 8:53 ` Mathias Nyman [this message]
2025-02-21 14:59 ` Alan Stern
2025-02-20 21:56 ` Thinh Nguyen
2025-02-21 12:19 ` Mathias Nyman
2025-02-21 22:41 ` Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01300a1a-a2f1-4816-9341-933ef236e887@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=amardeep.rai@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=r.kannappan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox