usb_create_shared_hcd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

usb_create_shared_hcd(9) πŸŽ€

okay so this is the Kernel API Manual page for usb_create_shared_hcd(9), and it’s literally the β€œcreate and initialize an HCD structure” function. bestie, it’s giving kernel-core setup energy, no cap. πŸ’…


πŸ’– NAME πŸ’–

usb_create_shared_hcd β€” create and initialize an HCD structure ✨

✨ SYNOPSIS ✨

struct usb_hcd * usb_create_shared_hcd (const struct hc_driver *driver ,
       struct device *dev , const char *bus_name , struct usb_hcd *primary_hcd
       );

🫢 ARGUMENTS 🫢

  • driver β€” HC driver that will use this hcd πŸ‘‘
  • dev β€” device for this HC, stored in hcd->self.controller πŸŽ€
  • bus_name β€” value to store in hcd->self.bus_name πŸ¦‹
  • primary_hcd β€” a pointer to the usb_hcd structure that is sharing the PCI device. Only allocate certain resources for the primary HCD πŸ’…

😴 CONTEXT 😴

task context, might sleep. literally nap-coded. 😴

🌸 DESCRIPTION 🌸

Allocate a struct usb_hcd, with extra space at the end for the HC driver's private data. Initialize the generic members of the hcd structure. it’s giving β€œbuild the shared-HCD foundation and make it cute,” and honestly? iconic. ✨

🎁 RETURN 🎁

On success, a pointer to the created and initialized HCD structure. On failure (e.g. if memory is unavailable), NULL. 😭

πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./drivers/usb/core/hcd.c β€” yes bestie, that one β€” plus the whole SEE ALSO squad: ascii2desc(9), rh_string(9), usb_bus_init(9), usb_register_bus(9), usb_deregister_bus(9), register_root_hub(9), usb_calc_bus_time(9), usb_hcd_link_urb_to_ep(9), usb_hcd_check_unlink_urb(9), usb_hcd_unlink_urb_from_ep(9), usb_hcd_giveback_urb(9), usb_hcd_alloc_bandwidth(9), usb_hcd_reset_endpoint(9), usb_alloc_streams(9), usb_free_streams(9), usb_hcd_resume_root_hub(9), usb_bus_start_enum(9), usb_hcd_irq(9), usb_hc_died(9), usb_create_hcd(9), usb_stop_hcd(9), usb_add_hcd(9), usb_remove_hcd(9). 🫢πŸ”₯


cute lil sign-off: source/version ./drivers/usb/core, date October 2026 β€” mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from