mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
FROMLIST: usb: host: export symbols for xhci hooks usage
Export symbols for xhci hooks usage:
xhci_ring_free
- Allow xhci hook to free xhci_ring.
xhci_get_slot_ctx
- Allow xhci hook to get slot_ctx from the xhci_container_ctx
for getting the slot_ctx information to know which slot is
offloading and compare the context in remote subsystem memory
if needed.
xhci_get_ep_ctx
- Allow xhci hook to get ep_ctx from the xhci_container_ctx for
getting the ep_ctx information to know which ep is offloading and
comparing the context in remote subsystem memory if needed.
xhci_handle_event
- Allow xhci hook to handle the xhci events from the USB
controller.
xhci_update_erst_dequeue
- If xhci events was handle by xhci hook, it needs to update
the erst dequeue pointer to let the USB controller know the
events was handled.
Signed-off-by: Howard Yen <howardyen@google.com>
Bug: 175358363
Link: https://lore.kernel.org/r/20210119101044.1637023-1-howardyen@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic7511048c009a2ff5f2832eee971140216105f6e
This commit is contained in:
parent
ed626b01e5
commit
26afe6712d
|
|
@ -292,6 +292,7 @@ void xhci_ring_free(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
|||
|
||||
kfree(ring);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_ring_free);
|
||||
|
||||
void xhci_initialize_ring_info(struct xhci_ring *ring,
|
||||
unsigned int cycle_state)
|
||||
|
|
@ -554,6 +555,7 @@ struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci,
|
|||
return (struct xhci_slot_ctx *)
|
||||
(ctx->bytes + CTX_SIZE(xhci->hcc_params));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_get_slot_ctx);
|
||||
|
||||
struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci,
|
||||
struct xhci_container_ctx *ctx,
|
||||
|
|
@ -567,6 +569,7 @@ struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci,
|
|||
return (struct xhci_ep_ctx *)
|
||||
(ctx->bytes + (ep_index * CTX_SIZE(xhci->hcc_params)));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_get_ep_ctx);
|
||||
|
||||
|
||||
/***************** Streams structures manipulation *************************/
|
||||
|
|
|
|||
|
|
@ -2897,7 +2897,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
|||
* Returns >0 for "possibly more events to process" (caller should call again),
|
||||
* otherwise 0 if done. In future, <0 returns should indicate error code.
|
||||
*/
|
||||
static int xhci_handle_event(struct xhci_hcd *xhci)
|
||||
int xhci_handle_event(struct xhci_hcd *xhci)
|
||||
{
|
||||
union xhci_trb *event;
|
||||
int update_ptrs = 1;
|
||||
|
|
@ -2966,13 +2966,14 @@ static int xhci_handle_event(struct xhci_hcd *xhci)
|
|||
*/
|
||||
return 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_handle_event);
|
||||
|
||||
/*
|
||||
* Update Event Ring Dequeue Pointer:
|
||||
* - When all events have finished
|
||||
* - To avoid "Event Ring Full Error" condition
|
||||
*/
|
||||
static void xhci_update_erst_dequeue(struct xhci_hcd *xhci,
|
||||
void xhci_update_erst_dequeue(struct xhci_hcd *xhci,
|
||||
union xhci_trb *event_ring_deq)
|
||||
{
|
||||
u64 temp_64;
|
||||
|
|
@ -3002,6 +3003,7 @@ static void xhci_update_erst_dequeue(struct xhci_hcd *xhci,
|
|||
temp_64 |= ERST_EHB;
|
||||
xhci_write_64(xhci, temp_64, &xhci->ir_set->erst_dequeue);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xhci_update_erst_dequeue);
|
||||
|
||||
static irqreturn_t xhci_vendor_queue_irq_work(struct xhci_hcd *xhci)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user