--- zzzz-none-000/linux-4.4.271/drivers/usb/core/hcd.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/drivers/usb/core/hcd.c 2023-01-11 09:25:42.000000000 +0000 @@ -1610,7 +1610,10 @@ 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 * valid and usb_buffer_{sync,unmap}() not be needed, since @@ -1632,6 +1635,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); @@ -1720,6 +1727,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)) @@ -2865,6 +2876,10 @@ if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) usb_hcd_poll_rh_status(hcd); +#ifdef AVM_USB_TRACE + avm_usb_register_trace_device (hcd); +#endif + return retval; error_create_attr_group: @@ -2982,6 +2997,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);