--- zzzz-none-000/linux-5.4.213/drivers/usb/core/hcd.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/usb/core/hcd.c 2024-08-14 09:02:08.000000000 +0000 @@ -1542,6 +1542,9 @@ atomic_inc(&urb->use_count); atomic_inc(&urb->dev->urbnum); usbmon_urb_submit(&hcd->self, urb); +#ifdef AVM_USB_TRACE + avm_usb_trace_submit(hcd, urb); +#endif /* NOTE requirements on root-hub callers (usbfs and the hub * driver, for now): URBs' urb->transfer_buffer must be @@ -1564,6 +1567,10 @@ if (unlikely(status)) { usbmon_urb_submit_error(&hcd->self, urb, status); +#ifdef AVM_USB_TRACE + avm_usb_trace_error(hcd, urb, status); +#endif + urb->hcpriv = NULL; INIT_LIST_HEAD(&urb->urb_list); atomic_dec(&urb->use_count); @@ -1658,6 +1665,10 @@ unmap_urb_for_dma(hcd, urb); usbmon_urb_complete(&hcd->self, urb, status); +#ifdef AVM_USB_TRACE + avm_usb_trace_complete(hcd, urb, status); +#endif + usb_anchor_suspend_wakeups(anchor); usb_unanchor_urb(urb); if (likely(status == 0)) @@ -2839,6 +2850,10 @@ usb_hcd_poll_rh_status(hcd); } +#ifdef AVM_USB_TRACE + avm_usb_register_trace_device(hcd); +#endif + return retval; err_register_root_hub: @@ -2936,6 +2951,10 @@ free_irq(hcd->irq, hcd); } +#ifdef AVM_USB_TRACE + avm_usb_deregister_trace_device(hcd); +#endif + usb_deregister_bus(&hcd->self); hcd_buffer_destroy(hcd);