From: kernel test robot <lkp@intel.com>
To: Manish Narani <manish.narani@xilinx.com>
Cc: oe-kbuild-all@lists.linux.dev, git@amd.com,
Michal Simek <monstr@monstr.eu>
Subject: [xilinx-xlnx:pr/146 11930/14527] drivers/usb/dwc3/gadget_hibernation.c:383: warning: Function parameter or member '_dwc' not described in 'dwc3_gadget_exit_hibernation'
Date: Wed, 11 Oct 2023 13:40:44 +0800 [thread overview]
Message-ID: <202310111301.DiF8Nlc9-lkp@intel.com> (raw)
Hi Manish,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx pr/146
head: 38b0c0cf11566882cda99f8e4f2243924a684be5
commit: 719080ff0022e05bb4cb8043d62739feebcd8dbc [11930/14527] usb: dwc3: gadget: Add hibernation support when operating in gadget mode
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20231011/202310111301.DiF8Nlc9-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231011/202310111301.DiF8Nlc9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310111301.DiF8Nlc9-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/usb/dwc3/gadget_hibernation.c:16: warning: cannot understand function prototype: 'u32 save_reg_addr[] = '
drivers/usb/dwc3/gadget_hibernation.c:74: warning: Function parameter or member 'epnum' not described in 'restart_ep0_trans'
>> drivers/usb/dwc3/gadget_hibernation.c:383: warning: Function parameter or member '_dwc' not described in 'dwc3_gadget_exit_hibernation'
>> drivers/usb/dwc3/gadget_hibernation.c:383: warning: Excess function parameter 'dwc' description in 'dwc3_gadget_exit_hibernation'
vim +383 drivers/usb/dwc3/gadget_hibernation.c
377
378 /**
379 * dwc3_gadget_exit_hibernation - Interrupt handler of wakeup
380 * @dwc: pointer to our controller context structure
381 */
382 void dwc3_gadget_exit_hibernation(void *_dwc)
> 383 {
384 struct dwc3 *dwc = (struct dwc3 *)(_dwc);
385
386 u32 reg, link_state;
387 int ret, retries;
388 bool enter_hiber = false;
389
390 /* On USB 2.0 we observed back to back wakeup interrupts */
391 if (!dwc->is_hibernated) {
392 dev_dbg(dwc->dev, "Not in hibernated state\n");
393 goto err;
394 }
395
396 restore_regs(dwc);
397
398 /* Initialize the core and restore the saved registers */
399 dwc3_core_init(dwc);
400
401 /* ask controller to save the non-sticky registers */
402 reg = dwc3_readl(dwc->regs, DWC3_DCTL);
403 reg |= DWC3_DCTL_CRS;
404 dwc3_writel(dwc->regs, DWC3_DCTL, reg);
405
406 /* Wait till non-sticky registers are restored */
407 retries = DWC3_NON_STICKY_RESTORE_RETRIES;
408 do {
409 reg = dwc3_readl(dwc->regs, DWC3_DSTS);
410 if (!(reg & DWC3_DSTS_RSS))
411 break;
412
413 udelay(DWC3_NON_STICKY_RESTORE_DELAY);
414 } while (--retries);
415
416 if (retries < 0 || (reg & DWC3_DSTS_SRE)) {
417 dev_err(dwc->dev, "Failed to restore non-sticky regs\n");
418 goto err;
419 }
420
421 /* restore ep0 endpoints */
422 ret = restore_ep0(dwc);
423 if (ret) {
424 dev_err(dwc->dev, "Failed in restorig EP0 states\n");
425 goto err;
426 }
427
428 /* start the controller */
429 ret = dwc3_gadget_run_stop(dwc, true, false);
430 if (ret < 0) {
431 dev_err(dwc->dev, "USB core failed to start on wakeup\n");
432 goto err;
433 }
434
435 /* Wait until device controller is ready */
436 retries = DWC3_DEVICE_CTRL_READY_RETRIES;
437 while (--retries) {
438 reg = dwc3_readl(dwc->regs, DWC3_DSTS);
439 if (reg & DWC3_DSTS_DCNRD)
440 udelay(DWC3_DEVICE_CTRL_READY_DELAY);
441 else
442 break;
443 }
444
445 if (retries < 0) {
446 dev_err(dwc->dev, "USB core failed to restore controller\n");
447 goto err;
448 }
449
450 /*
451 * As some suprious signals also cause wakeup event, wait for some time
452 * and check the link state to confirm if the wakeup signal is real
453 */
454 udelay(10);
455
456 link_state = dwc3_gadget_get_link_state(dwc);
457
458 /* check if the link state is in a valid state */
459 switch (link_state) {
460 case DWC3_LINK_STATE_RESET:
461 /* Reset devaddr */
462 reg = dwc3_readl(dwc->regs, DWC3_DCFG);
463 reg &= ~(DWC3_DCFG_DEVADDR_MASK);
464 dwc3_writel(dwc->regs, DWC3_DCFG, reg);
465
466 /* issue recovery on the link */
467 ret = dwc3_gadget_set_link_state(dwc, DWC3_LINK_STATE_RECOV);
468 if (ret < 0) {
469 dev_err(dwc->dev,
470 "Failed to set link state to Recovery\n");
471 goto err;
472 }
473
474 break;
475
476 case DWC3_LINK_STATE_SS_DIS:
477 /* Clear keep connect from reconnecting to HOST */
478 reg = dwc3_readl(dwc->regs, DWC3_DCTL);
479 reg &= ~DWC3_DCTL_KEEP_CONNECT;
480 dwc3_writel(dwc->regs, DWC3_DCTL, reg);
481 /* fall through */
482 case DWC3_LINK_STATE_U3:
483 /* Ignore wakeup event as the link is still in U3 state */
484 dev_dbg(dwc->dev, "False wakeup event %d\n", link_state);
485
486 if (!dwc->force_hiber_wake)
487 enter_hiber = true;
488 break;
489
490 default:
491 /* issue recovery on the link */
492 ret = dwc3_gadget_set_link_state(dwc, DWC3_LINK_STATE_RECOV);
493 if (ret < 0) {
494 dev_err(dwc->dev,
495 "Failed to set link state to Recovery\n");
496 goto err;
497 }
498
499 break;
500 }
501
502 if (link_state != DWC3_LINK_STATE_SS_DIS) {
503 /* Restore non EP0 EPs */
504 ret = restore_eps(dwc);
505 if (ret) {
506 dev_err(dwc->dev, "Failed restoring non-EP0 states\n");
507 goto err;
508 }
509 }
510
511 /* clear the flag */
512 dwc->is_hibernated = false;
513
514 if (enter_hiber) {
515 /*
516 * as the wakeup was because of the spurious signals,
517 * enter hibernation again
518 */
519 dwc3_gadget_enter_hibernation(dwc);
520 return;
521 }
522
523 dev_dbg(dwc->dev, "We are back from hibernation!\n");
524 return;
525
526 err:
527 dev_err(dwc->dev, "Fail in handling Wakeup Interrupt\n");
528 return;
529 }
530
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-10-11 5:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-11 5:40 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-25 0:10 [xilinx-xlnx:pr/146 11930/14527] drivers/usb/dwc3/gadget_hibernation.c:383: warning: Function parameter or member '_dwc' not described in 'dwc3_gadget_exit_hibernation' kernel test robot
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=202310111301.DiF8Nlc9-lkp@intel.com \
--to=lkp@intel.com \
--cc=git@amd.com \
--cc=manish.narani@xilinx.com \
--cc=monstr@monstr.eu \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.