tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: c9bb389c50ce07f0e4e105eb84f5541916bea8e8 commit: 0e9bd6770c25a3dbd9cb1c9fc132b9e4a65da7cd [29/33] usb: dwc2: override PHY input signals with usb role switch support config: arm64-randconfig-s031-20200907 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-191-g10164920-dirty git checkout 0e9bd6770c25a3dbd9cb1c9fc132b9e4a65da7cd # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): drivers/usb/dwc2/drd.c: In function 'dwc2_drd_role_sw_set': >> drivers/usb/dwc2/drd.c:83:37: error: 'struct dwc2_hsotg' has no member named 'test_mode' 83 | if (role == USB_ROLE_NONE && hsotg->test_mode) { | ^~ # https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git/commit/?id=0e9bd6770c25a3dbd9cb1c9fc132b9e4a65da7cd git remote add balbi-usb https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git git fetch --no-tags balbi-usb testing/next git checkout 0e9bd6770c25a3dbd9cb1c9fc132b9e4a65da7cd vim +83 drivers/usb/dwc2/drd.c 68 69 static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) 70 { 71 struct dwc2_hsotg *hsotg = usb_role_switch_get_drvdata(sw); 72 unsigned long flags; 73 int already = 0; 74 75 /* Skip session not in line with dr_mode */ 76 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || 77 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) 78 return -EINVAL; 79 80 if (IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || 81 IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)) { 82 /* Skip session if core is in test mode */ > 83 if (role == USB_ROLE_NONE && hsotg->test_mode) { 84 dev_dbg(hsotg->dev, "Core is in test mode\n"); 85 return -EBUSY; 86 } 87 } 88 89 spin_lock_irqsave(&hsotg->lock, flags); 90 91 if (role == USB_ROLE_HOST) { 92 already = dwc2_ovr_avalid(hsotg, true); 93 } else if (role == USB_ROLE_DEVICE) { 94 already = dwc2_ovr_bvalid(hsotg, true); 95 /* This clear DCTL.SFTDISCON bit */ 96 dwc2_hsotg_core_connect(hsotg); 97 } else { 98 if (dwc2_is_device_mode(hsotg)) { 99 if (!dwc2_ovr_bvalid(hsotg, false)) 100 /* This set DCTL.SFTDISCON bit */ 101 dwc2_hsotg_core_disconnect(hsotg); 102 } else { 103 dwc2_ovr_avalid(hsotg, false); 104 } 105 } 106 107 spin_unlock_irqrestore(&hsotg->lock, flags); 108 109 if (!already && 110 role != USB_ROLE_NONE && hsotg->dr_mode == USB_DR_MODE_OTG) 111 /* This will raise a Connector ID Status Change Interrupt */ 112 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); 113 114 dev_dbg(hsotg->dev, "%s-session valid\n", 115 role == USB_ROLE_NONE ? "No" : 116 role == USB_ROLE_HOST ? "A" : "B"); 117 118 return 0; 119 } 120 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip