It looks like the breaks on lines starting with 2235 are indented too much. I don't have line 946, but please check whether there is an issue there. julia ---------- Forwarded message ---------- Date: Sat, 17 Mar 2018 04:56:27 +0800 From: kbuild test robot <fengguang.wu@xxxxxxxxx> To: kbuild@xxxxxx Cc: Julia Lawall <julia.lawall@xxxxxxx> Subject: Re: [PATCH 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support CC: kbuild-all@xxxxxx In-Reply-To: <5bb6a333b4bf915cbc17742cf9f6b01ee36a1e0a.1521187611.git.hminas@xxxxxxxxxxxx> References: <5bb6a333b4bf915cbc17742cf9f6b01ee36a1e0a.1521187611.git.hminas@xxxxxxxxxxxx> TO: Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx> CC: John Youn <John.Youn@xxxxxxxxxxxx>, Felipe Balbi <balbi@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-usb@xxxxxxxxxxxxxxx CC: Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx> Hi Minas, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5] [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/Minas-Harutyunyan/usb-dwc2-gadget-Update-ISOC-DDMA-flow/20180317-012732 :::::: branch date: 3 hours ago :::::: commit date: 3 hours ago >> drivers/usb/dwc2/gadget.c:2234:4-21: code aligned with following code on line 2235 drivers/usb/dwc2/gadget.c:2238:4-21: code aligned with following code on line 2239 drivers/usb/dwc2/gadget.c:2242:4-21: code aligned with following code on line 2243 drivers/usb/dwc2/gadget.c:946:3-45: code aligned with following code on line 948 # https://github.com/0day-ci/linux/commit/14c1c19514559aaf0b869c78c6bd012fc6d39b56 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 14c1c19514559aaf0b869c78c6bd012fc6d39b56 vim +2234 drivers/usb/dwc2/gadget.c 5b7d70c6 drivers/usb/gadget/s3c-hsotg.c Ben Dooks 2009-06-02 2066 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2067 static void dwc2_hsotg_ep_stop_xfr(struct dwc2_hsotg *hsotg, 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2068 struct dwc2_hsotg_ep *hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2069 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2070 /* 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2071 * dwc2_gadget_complete_isoc_request_ddma - complete an isoc request in DDMA 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2072 * @hs_ep: The endpoint the request was on. 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2073 * 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2074 * Get first request from the ep queue, determine descriptor on which complete 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2075 * happened. SW discovers which descriptor currently in use by HW, adjusts 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2076 * dma_address and calculates index of completed descriptor based on the value 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2077 * of DEPDMA register. Update actual length of request, giveback to gadget. 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2078 */ 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2079 static void dwc2_gadget_complete_isoc_request_ddma(struct dwc2_hsotg_ep *hs_ep) 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2080 { 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2081 struct dwc2_hsotg *hsotg = hs_ep->parent; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2082 struct dwc2_hsotg_req *hs_req; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2083 struct usb_request *ureq; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2084 int index, idx; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2085 dma_addr_t dma_addr; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2086 u32 dma_reg; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2087 u32 depdma; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2088 u32 desc_sts; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2089 u32 mask; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2090 int dpi; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2091 int ret; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2092 int sumofpid; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2093 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2094 dpi = 1; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2095 if (!hs_ep->dir_in) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2096 dpi = hs_ep->mc; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2097 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2098 hs_req = get_ep_head(hs_ep); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2099 if (!hs_req) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2100 hs_ep->target_frame = TARGET_FRAME_INITIAL; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2101 dwc2_hsotg_ep_stop_xfr(hsotg, hs_ep); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2102 dev_warn(hsotg->dev, "%s: ISOC EP queue empty\n", __func__); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2103 return; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2104 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2105 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2106 ureq = &hs_req->req; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2107 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2108 dma_addr = hs_ep->desc_list_dma; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2109 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2110 dma_reg = hs_ep->dir_in ? DIEPDMA(hs_ep->index) : DOEPDMA(hs_ep->index); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2111 depdma = dwc2_readl(hsotg->regs + dma_reg); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2112 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2113 index = (depdma - dma_addr) / sizeof(struct dwc2_dma_desc) - 1; 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2114 /* Check descriptor chain rollover */ 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2115 if (index < 0) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2116 index = dpi * MAX_DMA_DESC_NUM_GENERIC - 1; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2117 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2118 desc_sts = hs_ep->desc_list[index].status; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2119 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2120 if (dpi == 1) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2121 /* Check completion status for not High Bandwidth ISOC Out */ 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2122 if ((desc_sts & DEV_DMA_STS_MASK) >> DEV_DMA_STS_SHIFT == 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2123 DEV_DMA_STS_SUCC) { 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2124 mask = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_MASK : 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2125 DEV_DMA_ISOC_RX_NBYTES_MASK; 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2126 ureq->actual = ureq->length - 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2127 ((desc_sts & mask) >> 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2128 DEV_DMA_ISOC_NBYTES_SHIFT); 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2129 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2130 /* Adjust actual len for ISOC Out if len is 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2131 * not align of 4. 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2132 */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2133 if (!hs_ep->dir_in && dpi == 1 && ureq->length & 0x3) 95d2b037 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2134 ureq->actual += 4 - (ureq->length & 0x3); 95d2b037 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2135 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2136 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0); 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2137 } else { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2138 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2139 -ETIMEDOUT); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2140 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2141 } else { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2142 /* Check completion status for High Bandwidth ISOC Out. */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2143 ret = 0; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2144 /* Ignore interrupt if it not last in uframe. */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2145 if (((desc_sts & DEV_DMA_ISOC_PID_MASK) >> 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2146 DEV_DMA_ISOC_PID_SHIFT) == DEV_DMA_ISOC_PID_MDATA) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2147 return; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2148 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2149 idx = 0; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2150 /* Complete requests with NODATA if some uframes are skiped */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2151 while (hs_ep->target_frame != 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2152 (desc_sts & DEV_DMA_ISOC_FRNUM_MASK) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2153 >> DEV_DMA_ISOC_FRNUM_SHIFT) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2154 idx++; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2155 dwc2_hsotg_complete_request(hsotg, hs_ep, 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2156 hs_req, -ENODATA); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2157 hs_req = get_ep_head(hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2158 if (!hs_req) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2159 hs_ep->target_frame = TARGET_FRAME_INITIAL; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2160 dwc2_hsotg_ep_stop_xfr(hsotg, hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2161 dev_warn(hsotg->dev, "%s: ISOC EP queue empty\n", 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2162 __func__); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2163 /* Clear late XFERCOMPL interrupts if any */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2164 dwc2_writel(DXEPINT_XFERCOMPL, hsotg->regs + 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2165 DOEPINT(hs_ep->index)); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2166 return; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2167 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2168 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2169 ureq = &hs_req->req; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2170 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2171 dwc2_gadget_incr_frame_num(hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2172 hs_ep->target_frame &= (DEV_DMA_ISOC_FRNUM_MASK >> 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2173 DEV_DMA_ISOC_FRNUM_SHIFT); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2174 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2175 /* Increment 1 more to set target to next uframe */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2176 hs_ep->target_frame = (desc_sts & DEV_DMA_ISOC_FRNUM_MASK) >> 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2177 DEV_DMA_ISOC_FRNUM_SHIFT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2178 dwc2_gadget_incr_frame_num(hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2179 hs_ep->target_frame &= (DEV_DMA_ISOC_FRNUM_MASK >> 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2180 DEV_DMA_ISOC_FRNUM_SHIFT); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2181 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2182 /* Need to restart if any request completed in above loop */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2183 if (idx) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2184 dwc2_hsotg_complete_request(hsotg, hs_ep, 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2185 hs_req, -ENODATA); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2186 hs_req = get_ep_head(hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2187 if (!hs_req) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2188 hs_ep->target_frame = TARGET_FRAME_INITIAL; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2189 dwc2_hsotg_ep_stop_xfr(hsotg, hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2190 dev_warn(hsotg->dev, "%s: ISOC EP queue empty\n", 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2191 __func__); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2192 /* Clear any late XFERCOMPL interrupts if any */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2193 dwc2_writel(DXEPINT_XFERCOMPL, hsotg->regs + 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2194 DOEPINT(hs_ep->index)); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2195 return; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2196 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2197 goto out; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2198 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2199 ureq = &hs_req->req; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2200 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2201 /* Because of interrupt latency after receiving interrupt 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2202 * for 1st descriptor and when start handling the descriptor 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2203 * index can be shifted to second or third descriptor. 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2204 * On last descriptor (for uframe) completion process all 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2205 * descritors for current uframe. 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2206 */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2207 sumofpid = 0; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2208 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2209 for (idx = (index / dpi) * dpi; idx <= index; idx++) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2210 desc_sts = hs_ep->desc_list[idx].status; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2211 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2212 if ((desc_sts & DEV_DMA_STS_MASK) >> DEV_DMA_STS_SHIFT 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2213 == DEV_DMA_STS_SUCC) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2214 ureq->actual += hs_ep->ep.maxpacket - 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2215 ((desc_sts & 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2216 DEV_DMA_ISOC_RX_NBYTES_MASK) >> 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2217 DEV_DMA_ISOC_NBYTES_SHIFT); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2218 sumofpid += (desc_sts & DEV_DMA_ISOC_PID_MASK) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2219 >> DEV_DMA_ISOC_PID_SHIFT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2220 } else { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2221 ret = -ETIMEDOUT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2222 break; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2223 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2224 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2225 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2226 /* Safety check packets PID sequence based on sumofpids: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2227 * if packet count = 1 then sumofpid should be 0 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2228 * if packet count = 2 then sumofpid should be 3+2=5 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2229 * if packet count = 3 then sumofpid should be 3+3+1=7 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2230 */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2231 switch (index - (index / dpi) * dpi + 1) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2232 case 1: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2233 if (sumofpid != 0) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 @2234 ret = -ETIMEDOUT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 @2235 break; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2236 case 2: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2237 if (sumofpid != 5) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2238 ret = -ETIMEDOUT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2239 break; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2240 case 3: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2241 if (sumofpid != 7) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2242 ret = -ETIMEDOUT; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2243 break; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2244 default: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2245 dev_dbg(hsotg->dev, "%s: wrong sum of PID's %d\n", 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2246 __func__, sumofpid); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2247 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2248 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2249 /* Clear EOPF intr for frame if some descs should be skiped */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2250 if ((index - (index / dpi) * dpi + 1) < dpi) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2251 dwc2_writel(GINTSTS_EOPF, hsotg->regs + GINTSTS); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2252 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2253 /* Safety check */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2254 if (ureq->actual > ureq->length) 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2255 ureq->actual = ureq->length; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2256 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2257 dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, ret); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2258 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2259 /* If packet count in current uframe less than mult then need 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2260 * to skip unused for uframe descrioptors by restarting xfers 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2261 */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2262 idx = dpi - (index % dpi) - 1; 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2263 out: 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2264 if (idx > 0) { 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2265 dwc2_hsotg_ep_stop_xfr(hsotg, hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2266 dwc2_gadget_start_isoc_ddma(hs_ep); 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2267 } 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2268 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2269 /* Clear late XFERCOMPL and OUTTKNEPDIS interrupts if any */ 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2270 dwc2_writel(DXEPINT_XFERCOMPL || DXEPINT_OUTTKNEPDIS, 14c1c195 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2271 hsotg->regs + DOEPINT(hs_ep->index)); 3c229501 drivers/usb/dwc2/gadget.c Minas Harutyunyan 2018-03-16 2272 } 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2273 } 540ccba0 drivers/usb/dwc2/gadget.c Vahram Aharonyan 2016-11-14 2274 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html