Hi Gevorg, Thank you for the patch! Yet something to improve: [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.17-rc6] [cannot apply to balbi-usb/next next-20180517] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gevorg-Sahakyan/usb-dwc2-Make-dwc2-endianness-agnostic/20180523-062909 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: i386-randconfig-x078-201820 (attached as .config) compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/usb/dwc2/gadget.c: In function 'dwc2_hsotg_ep_enable': >> drivers/usb/dwc2/gadget.c:3943:17: error: too few arguments to function 'dwc2_readl' u32 gsnpsid = dwc2_readl(hsotg->regs + GSNPSID); ^~~~~~~~~~ In file included from drivers/usb/dwc2/gadget.c:31:0: drivers/usb/dwc2/core.h:1085:19: note: declared here static inline u32 dwc2_readl(struct dwc2_hsotg *hsotg, u32 offset) ^~~~~~~~~~ vim +/dwc2_readl +3943 drivers/usb/dwc2/gadget.c a4f827714 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 3769 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3770 /** 1f91b4cc0 drivers/usb/dwc2/gadget.c Felipe Balbi 2015-08-06 3771 * dwc2_hsotg_ep_enable - enable the given endpoint 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3772 * @ep: The USB endpint to configure 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3773 * @desc: The USB endpoint descriptor to configure with. 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3774 * 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3775 * This is called from the USB gadget code's usb_ep_enable(). 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3776 */ 1f91b4cc0 drivers/usb/dwc2/gadget.c Felipe Balbi 2015-08-06 3777 static int dwc2_hsotg_ep_enable(struct usb_ep *ep, 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3778 const struct usb_endpoint_descriptor *desc) 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3779 { 1f91b4cc0 drivers/usb/dwc2/gadget.c Felipe Balbi 2015-08-06 3780 struct dwc2_hsotg_ep *hs_ep = our_ep(ep); 941fcce4f drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-11-11 3781 struct dwc2_hsotg *hsotg = hs_ep->parent; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3782 unsigned long flags; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3783 unsigned int index = hs_ep->index; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3784 u32 epctrl_reg; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3785 u32 epctrl; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3786 u32 mps; ee2c40de6 drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-11-08 3787 u32 mc; 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3788 u32 mask; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3789 unsigned int dir_in; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3790 unsigned int i, val, size; 19c190f9e drivers/usb/gadget/s3c-hsotg.c Julia Lawall 2010-03-29 3791 int ret = 0; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3792 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3793 dev_dbg(hsotg->dev, 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3794 "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3795 __func__, ep->name, desc->bEndpointAddress, desc->bmAttributes, 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3796 desc->wMaxPacketSize, desc->bInterval); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3797 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3798 /* not to be called for EP0 */ 8c3d60927 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-04-27 3799 if (index == 0) { 8c3d60927 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-04-27 3800 dev_err(hsotg->dev, "%s: called for EP 0\n", __func__); 8c3d60927 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-04-27 3801 return -EINVAL; 8c3d60927 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-04-27 3802 } 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3803 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3804 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3805 if (dir_in != hs_ep->dir_in) { 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3806 dev_err(hsotg->dev, "%s: direction mismatch!\n", __func__); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3807 return -EINVAL; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3808 } 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3809 29cc88979 drivers/usb/gadget/s3c-hsotg.c Kuninori Morimoto 2011-08-23 3810 mps = usb_endpoint_maxp(desc); ee2c40de6 drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-11-08 3811 mc = usb_endpoint_maxp_mult(desc); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3812 1f91b4cc0 drivers/usb/dwc2/gadget.c Felipe Balbi 2015-08-06 3813 /* note, we handle this here instead of dwc2_hsotg_set_ep_maxpacket */ 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3814 94cb8fd63 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3815 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3816 epctrl = dwc2_readl(hsotg, epctrl_reg); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3817 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3818 dev_dbg(hsotg->dev, "%s: read DxEPCTL=0x%08x from 0x%08x\n", 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3819 __func__, epctrl, epctrl_reg); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3820 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3821 /* Allocate DMA descriptor chain for non-ctrl endpoints */ 9383e084a drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2017-01-05 3822 if (using_desc_dma(hsotg) && !hs_ep->desc_list) { 9383e084a drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2017-01-05 3823 hs_ep->desc_list = dmam_alloc_coherent(hsotg->dev, 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3824 MAX_DMA_DESC_NUM_GENERIC * 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3825 sizeof(struct dwc2_dma_desc), 86e881e7d drivers/usb/dwc2/gadget.c Marek Szyprowski 2016-12-01 3826 &hs_ep->desc_list_dma, GFP_ATOMIC); 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3827 if (!hs_ep->desc_list) { 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3828 ret = -ENOMEM; 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3829 goto error2; 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3830 } 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3831 } 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3832 22258f490 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-06-14 3833 spin_lock_irqsave(&hsotg->lock, flags); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3834 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3835 epctrl &= ~(DXEPCTL_EPTYPE_MASK | DXEPCTL_MPS_MASK); 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3836 epctrl |= DXEPCTL_MPS(mps); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3837 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3838 /* 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3839 * mark the endpoint as active, otherwise the core may ignore 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3840 * transactions entirely for this endpoint 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3841 */ 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3842 epctrl |= DXEPCTL_USBACTEP; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3843 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3844 /* update the endpoint state */ ee2c40de6 drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-11-08 3845 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3846 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3847 /* default, set to non-periodic */ 1479e8411 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3848 hs_ep->isochronous = 0; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3849 hs_ep->periodic = 0; a18ed7b03 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-09-19 3850 hs_ep->halted = 0; 1479e8411 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3851 hs_ep->interval = desc->bInterval; 4fca54aa5 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3852 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3853 switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3854 case USB_ENDPOINT_XFER_ISOC: 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3855 epctrl |= DXEPCTL_EPTYPE_ISO; 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3856 epctrl |= DXEPCTL_SETEVENFR; 1479e8411 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3857 hs_ep->isochronous = 1; 142bd33fc drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3858 hs_ep->interval = 1 << (desc->bInterval - 1); 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3859 hs_ep->target_frame = TARGET_FRAME_INITIAL; ab7d21929 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 3860 hs_ep->isoc_chain_num = 0; ab7d21929 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 3861 hs_ep->next_desc = 0; 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3862 if (dir_in) { 1479e8411 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3863 hs_ep->periodic = 1; 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3864 mask = dwc2_readl(hsotg, DIEPMSK); 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3865 mask |= DIEPMSK_NAKMSK; 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3866 dwc2_writel(hsotg, mask, DIEPMSK); 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3867 } else { 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3868 mask = dwc2_readl(hsotg, DOEPMSK); 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3869 mask |= DOEPMSK_OUTTKNEPDISMSK; 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3870 dwc2_writel(hsotg, mask, DOEPMSK); 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3871 } 1479e8411 drivers/usb/gadget/s3c-hsotg.c Robert Baldyga 2013-10-09 3872 break; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3873 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3874 case USB_ENDPOINT_XFER_BULK: 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3875 epctrl |= DXEPCTL_EPTYPE_BULK; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3876 break; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3877 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3878 case USB_ENDPOINT_XFER_INT: b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3879 if (dir_in) 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3880 hs_ep->periodic = 1; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3881 142bd33fc drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3882 if (hsotg->gadget.speed == USB_SPEED_HIGH) 142bd33fc drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3883 hs_ep->interval = 1 << (desc->bInterval - 1); 142bd33fc drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3884 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3885 epctrl |= DXEPCTL_EPTYPE_INTERRUPT; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3886 break; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3887 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3888 case USB_ENDPOINT_XFER_CONTROL: 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3889 epctrl |= DXEPCTL_EPTYPE_CONTROL; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3890 break; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3891 } 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3892 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3893 /* 8b9bc4608 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-05-04 3894 * if the hardware has dedicated fifos, we must give each IN EP 10aebc772 drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2010-07-19 3895 * a unique tx-fifo even if it is non-periodic. 10aebc772 drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2010-07-19 3896 */ 21f3bb529 drivers/usb/dwc2/gadget.c Robert Baldyga 2016-08-29 3897 if (dir_in && hsotg->dedicated_fifos) { ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3898 u32 fifo_index = 0; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3899 u32 fifo_size = UINT_MAX; 9da519747 drivers/usb/dwc2/gadget.c John Youn 2017-01-17 3900 b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3901 size = hs_ep->ep.maxpacket * hs_ep->mc; 5f2196bd7 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3902 for (i = 1; i < hsotg->num_of_eps; ++i) { b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3903 if (hsotg->fifo_map & (1 << i)) b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3904 continue; 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3905 val = dwc2_readl(hsotg, DPTXFSIZN(i)); b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3906 val = (val >> FIFOSIZE_DEPTH_SHIFT) * 4; b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3907 if (val < size) b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3908 continue; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3909 /* Search for smallest acceptable fifo */ ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3910 if (val < fifo_size) { ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3911 fifo_size = val; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3912 fifo_index = i; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3913 } b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3914 } ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3915 if (!fifo_index) { 5f2196bd7 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3916 dev_err(hsotg->dev, 5f2196bd7 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3917 "%s: No suitable fifo found\n", __func__); b585a48b8 drivers/usb/dwc2/gadget.c Sudip Mukherjee 2014-10-17 3918 ret = -ENOMEM; 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3919 goto error1; b585a48b8 drivers/usb/dwc2/gadget.c Sudip Mukherjee 2014-10-17 3920 } ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3921 hsotg->fifo_map |= 1 << fifo_index; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3922 epctrl |= DXEPCTL_TXFNUM(fifo_index); ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3923 hs_ep->fifo_index = fifo_index; ca4c55ad8 drivers/usb/dwc2/gadget.c Mian Yousaf Kaukab 2015-01-09 3924 hs_ep->fifo_size = fifo_size; b203d0a2e drivers/usb/dwc2/gadget.c Robert Baldyga 2014-09-09 3925 } 10aebc772 drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2010-07-19 3926 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3927 /* for non control endpoints, set PID to D0 */ 837e9f00b drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2016-05-25 3928 if (index && !hs_ep->isochronous) 47a1685f1 drivers/usb/dwc2/gadget.c Dinh Nguyen 2014-04-14 3929 epctrl |= DXEPCTL_SETD0PID; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3930 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3931 /* WA for Full speed ISOC IN in DDMA mode. 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3932 * By Clear NAK status of EP, core will send ZLP 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3933 * to IN token and assert NAK interrupt relying 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3934 * on TxFIFO status only 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3935 */ 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3936 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3937 if (hsotg->gadget.speed == USB_SPEED_FULL && 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3938 hs_ep->isochronous && dir_in) { 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3939 /* The WA applies only to core versions from 2.72a 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3940 * to 4.00a (including both). Also for FS_IOT_1.00a 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3941 * and HS_IOT_1.00a. 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3942 */ 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 @3943 u32 gsnpsid = dwc2_readl(hsotg->regs + GSNPSID); 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3944 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3945 if ((gsnpsid >= DWC2_CORE_REV_2_72a && 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3946 gsnpsid <= DWC2_CORE_REV_4_00a) || 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3947 gsnpsid == DWC2_FS_IOT_REV_1_00a || 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3948 gsnpsid == DWC2_HS_IOT_REV_1_00a) 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3949 epctrl |= DXEPCTL_CNAK; 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3950 } 0ebf2a2c0 drivers/usb/dwc2/gadget.c Artur Petrosyan 2018-04-16 3951 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3952 dev_dbg(hsotg->dev, "%s: write DxEPCTL=0x%08x\n", 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3953 __func__, epctrl); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3954 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3955 dwc2_writel(hsotg, epctrl, epctrl_reg); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3956 dev_dbg(hsotg->dev, "%s: read DxEPCTL=0x%08x\n", 3d7a672f5 drivers/usb/dwc2/gadget.c Gevorg Sahakyan 2018-05-21 3957 __func__, dwc2_readl(hsotg, epctrl_reg)); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3958 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3959 /* enable the endpoint interrupt */ 1f91b4cc0 drivers/usb/dwc2/gadget.c Felipe Balbi 2015-08-06 3960 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3961 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3962 error1: 22258f490 drivers/usb/gadget/s3c-hsotg.c Lukasz Majewski 2012-06-14 3963 spin_unlock_irqrestore(&hsotg->lock, flags); 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3964 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3965 error2: 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3966 if (ret && using_desc_dma(hsotg) && hs_ep->desc_list) { 9383e084a drivers/usb/dwc2/gadget.c Vardan Mikayelyan 2017-01-05 3967 dmam_free_coherent(hsotg->dev, MAX_DMA_DESC_NUM_GENERIC * 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3968 sizeof(struct dwc2_dma_desc), 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3969 hs_ep->desc_list, hs_ep->desc_list_dma); 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3970 hs_ep->desc_list = NULL; 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3971 } 5f54c54b0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-09 3972 19c190f9e drivers/usb/gadget/s3c-hsotg.c Julia Lawall 2010-03-29 3973 return ret; 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3974 } 5b7d70c6d drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 3975 :::::: The code at line 3943 was first introduced by commit :::::: 0ebf2a2c02b0976e939e795b1b9a53d32aeac8bc usb: dwc2: WA for Full speed ISOC IN in DDMA mode. :::::: TO: Artur Petrosyan <Arthur.Petrosyan@xxxxxxxxxxxx> :::::: CC: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip