Page MenuHomeFreeBSD

LinuxKPI: usb.h additions
Needs ReviewPublic

Authored by bz on May 20 2022, 10:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 5:08 PM
Unknown Object (File)
Jan 10 2024, 7:20 PM
Unknown Object (File)
Dec 20 2023, 7:27 AM
Unknown Object (File)
Dec 15 2023, 4:37 AM
Unknown Object (File)
Jul 3 2023, 1:37 AM
Unknown Object (File)
Jun 3 2023, 5:02 PM
Unknown Object (File)
May 15 2023, 5:30 AM
This revision needs review, but all specified reviewers are disabled or inactive.

Details

Reviewers
hselasky
Summary

Add USB_DEVICE_AND_INTERFACE_INFO(), various usb_endpoint_*(),
usb_fill_control_urb(), struct usb_ctrlrequest, module_usb_driver(),
and a few skeleton functions to usb.h in order to go and see how
to proceed from here forward to accomodate wireless USB drivers.

Sponsored by: The FreeBSD Foundation (parts)
MFC after: 2 weeks

Test Plan

I mostly just want to get the changes out so that the actual
problem focus on working on the LinuxKPI USB implementation
is easier and not left in the noise.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45652
Build 42540: arc lint + arc unit

Event Timeline

bz requested review of this revision.May 20 2022, 10:04 PM
sys/compat/linuxkpi/common/include/linux/usb.h
59

Match flags should be:

.match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT | USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS | USB_DEVICE_ID_MATCH_INT_PROTOCOL,

Else you are only matching the two first fields :-)

156

Can you add the same for UE_ISOCHRONOUS, so the list is complete?

323

Just remove this /* unsigned int pipe */

and this:

/* urb->pipe = pipe; */

396

Remove "inline" here. The function is always static.

403

ditto.

415

Can you merge this with the function above:

void   *usbd_get_intfdata(struct usb_interface *intf);
423

We do have a USB device refcounting function, but I guess it is not needed?