drivers/usb/host/fhci-q.c
Source file repositories/reference/linux-study-clean/drivers/usb/host/fhci-q.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/host/fhci-q.c- Extension
.c- Size
- 6883 bytes
- Lines
- 282
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/types.hlinux/spinlock.hlinux/errno.hlinux/slab.hlinux/list.hlinux/usb.hlinux/usb/hcd.hfhci.h
Detected Declarations
function Copyrightfunction fhci_add_td_to_framefunction fhci_add_tds_to_edfunction fhci_move_td_from_ed_to_done_listfunction free_urb_privfunction fhci_urb_complete_freefunction fhci_done_tdfunction fhci_del_ed_list
Annotated Snippet
if (cc != USB_TD_OK) {
if (urb->status == -EINPROGRESS)
urb->status = status_to_error(cc);
}
/* count all non-empty packets except control SETUP packet */
if (td->type != FHCI_TA_SETUP || td->iso_index != 0)
urb->actual_length += td->actual_len;
}
}
/* there are some pedning request to unlink */
void fhci_del_ed_list(struct fhci_hcd *fhci, struct ed *ed)
{
struct td *td = peek_td_from_ed(ed);
struct urb *urb = td->urb;
struct urb_priv *urb_priv = urb->hcpriv;
if (urb_priv->state == URB_DEL) {
td = fhci_remove_td_from_ed(ed);
/* HC may have partly processed this TD */
if (td->status != USB_TD_INPROGRESS)
fhci_done_td(urb, td);
/* URB is done;clean up */
if (++(urb_priv->tds_cnt) == urb_priv->num_of_tds)
fhci_urb_complete_free(fhci, urb);
}
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/types.h`, `linux/spinlock.h`, `linux/errno.h`, `linux/slab.h`, `linux/list.h`, `linux/usb.h`, `linux/usb/hcd.h`.
- Detected declarations: `function Copyright`, `function fhci_add_td_to_frame`, `function fhci_add_tds_to_ed`, `function fhci_move_td_from_ed_to_done_list`, `function free_urb_priv`, `function fhci_urb_complete_free`, `function fhci_done_td`, `function fhci_del_ed_list`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.