Message ID | 20200623030918.8409-3-peter.chen@nxp.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 813072b67ee97659807049d014c9d4e36fd62e94 |
Headers | show |
Series | usb: cdns3: bug-fixes for usb-linus | expand |
> >It should use the correct direction value from register, not depends >on previous software setting. It fixed the EP number wrong issue at >trace when the TRBERR interrupt occurs for EP0IN. > >When the EP0IN IOC has finished, software prepares the setup packet >request, the expected direction is OUT, but at that time, the TRBERR >for EP0IN may occur since it is DMULT mode, the DMA does not stop >until TRBERR has met. > >Cc: <stable@vger.kernel.org> >Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") >Signed-off-by: Peter Chen <peter.chen@nxp.com> Reviewed-by: Pawel Laszczak <pawell@cadence.com> >--- > drivers/usb/cdns3/trace.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/usb/cdns3/trace.h b/drivers/usb/cdns3/trace.h >index de2c34d5bfc5..0a2a3269bfac 100644 >--- a/drivers/usb/cdns3/trace.h >+++ b/drivers/usb/cdns3/trace.h >@@ -156,7 +156,7 @@ DECLARE_EVENT_CLASS(cdns3_log_ep0_irq, > __dynamic_array(char, str, CDNS3_MSG_MAX) > ), > TP_fast_assign( >- __entry->ep_dir = priv_dev->ep0_data_dir; >+ __entry->ep_dir = priv_dev->selected_ep; > __entry->ep_sts = ep_sts; > ), > TP_printk("%s", cdns3_decode_ep0_irq(__get_str(str), >-- >2.17.1
diff --git a/drivers/usb/cdns3/trace.h b/drivers/usb/cdns3/trace.h index de2c34d5bfc5..0a2a3269bfac 100644 --- a/drivers/usb/cdns3/trace.h +++ b/drivers/usb/cdns3/trace.h @@ -156,7 +156,7 @@ DECLARE_EVENT_CLASS(cdns3_log_ep0_irq, __dynamic_array(char, str, CDNS3_MSG_MAX) ), TP_fast_assign( - __entry->ep_dir = priv_dev->ep0_data_dir; + __entry->ep_dir = priv_dev->selected_ep; __entry->ep_sts = ep_sts; ), TP_printk("%s", cdns3_decode_ep0_irq(__get_str(str),
It should use the correct direction value from register, not depends on previous software setting. It fixed the EP number wrong issue at trace when the TRBERR interrupt occurs for EP0IN. When the EP0IN IOC has finished, software prepares the setup packet request, the expected direction is OUT, but at that time, the TRBERR for EP0IN may occur since it is DMULT mode, the DMA does not stop until TRBERR has met. Cc: <stable@vger.kernel.org> Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Peter Chen <peter.chen@nxp.com> --- drivers/usb/cdns3/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)