From: kbuild test robot <lkp@intel.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org
Cc: kbuild-all@lists.01.org, John Youn <John.Youn@synopsys.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Subject: Re: [PATCH] usb: dwc3: gadget: Check for prepared TRBs
Date: Sat, 16 May 2020 09:50:24 +0800 [thread overview]
Message-ID: <202005160940.ZvsbE4LE%lkp@intel.com> (raw)
In-Reply-To: <dcb46412b7454e517255e64b1c70d3e402797dd8.1589585973.git.thinhn@synopsys.com>
[-- Attachment #1: Type: text/plain, Size: 3627 bytes --]
Hi Thinh,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on balbi-usb/next]
[also build test ERROR on usb/usb-testing peter.chen-usb/ci-for-usb-next v5.7-rc5 next-20200515]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Thinh-Nguyen/usb-dwc3-gadget-Check-for-prepared-TRBs/20200516-074413
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/usb/dwc3/gadget.c: In function 'dwc3_prepare_trbs':
>> drivers/usb/dwc3/gadget.c:1203:42: error: 'struct usb_request' has no member named 'is_last'
if (dep->stream_capable && req->request.is_last)
^
vim +1203 drivers/usb/dwc3/gadget.c
1166
1167 /*
1168 * dwc3_prepare_trbs - setup TRBs from requests
1169 * @dep: endpoint for which requests are being prepared
1170 *
1171 * The function goes through the requests list and sets up TRBs for the
1172 * transfers. The function returns once there are no more TRBs available or
1173 * it runs out of requests.
1174 */
1175 static void dwc3_prepare_trbs(struct dwc3_ep *dep)
1176 {
1177 struct dwc3_request *req, *n;
1178
1179 BUILD_BUG_ON_NOT_POWER_OF_2(DWC3_TRB_NUM);
1180
1181 /*
1182 * We can get in a situation where there's a request in the started list
1183 * but there weren't enough TRBs to fully kick it in the first time
1184 * around, so it has been waiting for more TRBs to be freed up.
1185 *
1186 * In that case, we should check if we have a request with pending_sgs
1187 * in the started list and prepare TRBs for that request first,
1188 * otherwise we will prepare TRBs completely out of order and that will
1189 * break things.
1190 */
1191 list_for_each_entry(req, &dep->started_list, list) {
1192 if (req->num_pending_sgs > 0)
1193 dwc3_prepare_one_trb_sg(dep, req);
1194
1195 if (!dwc3_calc_trbs_left(dep))
1196 return;
1197
1198 /*
1199 * Don't prepare beyond a transfer. In DWC_usb32, its transfer
1200 * burst capability may try to read and use TRBs beyond the
1201 * active transfer instead of stopping.
1202 */
> 1203 if (dep->stream_capable && req->request.is_last)
1204 return;
1205 }
1206
1207 list_for_each_entry_safe(req, n, &dep->pending_list, list) {
1208 struct dwc3 *dwc = dep->dwc;
1209 int ret;
1210
1211 ret = usb_gadget_map_request_by_dev(dwc->sysdev, &req->request,
1212 dep->direction);
1213 if (ret)
1214 return;
1215
1216 req->sg = req->request.sg;
1217 req->start_sg = req->sg;
1218 req->num_queued_sgs = 0;
1219 req->num_pending_sgs = req->request.num_mapped_sgs;
1220
1221 if (req->num_pending_sgs > 0)
1222 dwc3_prepare_one_trb_sg(dep, req);
1223 else
1224 dwc3_prepare_one_trb_linear(dep, req);
1225
1226 if (!dwc3_calc_trbs_left(dep))
1227 return;
1228 }
1229 }
1230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71303 bytes --]
next prev parent reply other threads:[~2020-05-16 2:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 23:40 [PATCH] usb: dwc3: gadget: Check for prepared TRBs Thinh Nguyen
2020-05-16 1:50 ` kbuild test robot [this message]
2020-05-16 2:04 ` Thinh Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202005160940.ZvsbE4LE%lkp@intel.com \
--to=lkp@intel.com \
--cc=John.Youn@synopsys.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox