From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9A48C433EF for ; Wed, 6 Apr 2022 17:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vJ0zPB/9toDf+UWXuS/BV6BS8mHK22RfmK7U6vGUAb8=; b=UCMZJORHujpmag HeuM24Fl3uBNIgV5hiCFt1N0PDDmpTQZ55kPdMZLj02uoBuea/Q6QzPrwXyv9l/gS1Zc3hOxvX3re bLewV8dI76C8KJaaZT08s0ZG2Q6Fha5Mudi1lYkGRkOP4sPJKPhw49Q12YYB9rhFJHpoe6V+wrzUR lVqDqYIbyWfKb4YfyNz7vLsvZnHJjPjwncQlxlzBTyPkvYluSZPYX9/NqRlHykhleGXHIljXsV+de GtOBJ9rqMhp4WCpxf4snfF62Vx2D1qENAYNH2YYIXhyD7FIiJQUM0G+w5+C9qq9BG0MHqO3kkY8tW yxYfnHoPA8nxHQXPEbyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc9Bu-007Icn-L7; Wed, 06 Apr 2022 17:11:34 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nc9Bp-007Ic0-Kt for linux-arm-kernel@lists.infradead.org; Wed, 06 Apr 2022 17:11:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649265089; x=1680801089; h=date:from:to:cc:subject:message-id:mime-version; bh=amqiKZmDb6gjMIW3L9C1vbDvz2dVutfo242V/rQDoes=; b=GKN73FGD+QhgDOPv66fOH6THF/F9g/ycXarcCilJ8Kg6o8E0tQgXCFTR c6Pk/QtDpw49lzJVispy1VNd425yckkajfiMnb0QhanbN3nEvMJ4Dg8cH sc10iy9AJU1pr2H/i6jHh6luvlX8a+E8k3SlB5iVRsuK7pNdg6K0GVg7+ 8AYDSWRZXvSYk7U792YlFtTZdfRox0OwSEYf2rySZrDmGhSOuCOEDH8cx SIBT8YFVQ3SIZjK9Ur5h93XfZZQcdqPn15wrp/+qR/7JOMEUooH6zGxlK UK688FmI6NuXTi3vq9gI7FlSRcAnqBWAavYPuMU1yl0MMdzFQ8LF3fZZC Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10309"; a="260805493" X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="260805493" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2022 10:11:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,240,1643702400"; d="scan'208";a="722600497" Received: from lkp-server02.sh.intel.com (HELO a44fdfb70b94) ([10.239.97.151]) by orsmga005.jf.intel.com with ESMTP; 06 Apr 2022 10:11:12 -0700 Received: from kbuild by a44fdfb70b94 with local (Exim 4.95) (envelope-from ) id 1nc9BX-0004aJ-AC; Wed, 06 Apr 2022 17:11:11 +0000 Date: Thu, 7 Apr 2022 01:10:50 +0800 From: kernel test robot To: Anurag Kumar Vulisha Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org, Michal Simek , Piyush Mehta , Manish Narani Subject: [xilinx-xlnx:xlnx_rebase_v5.15 394/1080] drivers/usb/dwc3/otg.c:291:13: warning: variable 'osts' set but not used Message-ID: <202204070132.GjEw2GSR-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_101129_800734_97495BE4 X-CRM114-Status: GOOD ( 14.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15 head: 6474115d882fd9e82731ac2473875dc3e8ac9acc commit: d0fdd1b604fc3e7687a1033469542076a6bb8733 [394/1080] usb: dwc3: gadget: Add new platform_data.h file config: sparc-randconfig-r032-20220406 (https://download.01.org/0day-ci/archive/20220407/202204070132.GjEw2GSR-lkp@intel.com/config) compiler: sparc64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/Xilinx/linux-xlnx/commit/d0fdd1b604fc3e7687a1033469542076a6bb8733 git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15 git checkout d0fdd1b604fc3e7687a1033469542076a6bb8733 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash drivers/usb/dwc3/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/usb/dwc3/otg.c: In function 'start_host': >> drivers/usb/dwc3/otg.c:291:13: warning: variable 'osts' set but not used [-Wunused-but-set-variable] 291 | u32 osts; | ^~~~ drivers/usb/dwc3/otg.c: At top level: >> drivers/usb/dwc3/otg.c:418:5: warning: no previous prototype for 'dwc3_otg_host_release' [-Wmissing-prototypes] 418 | int dwc3_otg_host_release(struct usb_hcd *hcd) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/usb/dwc3/otg.c:1323:5: warning: no previous prototype for 'otg_main_thread' [-Wmissing-prototypes] 1323 | int otg_main_thread(void *data) | ^~~~~~~~~~~~~~~ >> drivers/usb/dwc3/otg.c:1885:5: warning: no previous prototype for 'otg_host_release' [-Wmissing-prototypes] 1885 | int otg_host_release(struct usb_otg *otg) | ^~~~~~~~~~~~~~~~ drivers/usb/dwc3/otg.c: In function 'store_hnp': drivers/usb/dwc3/otg.c:1975:20: error: 'dwc->gadget' is a pointer; did you mean to use '->'? 1975 | dwc->gadget.host_request_flag = 1; | ^ | -> drivers/usb/dwc3/otg.c: At top level: >> drivers/usb/dwc3/otg.c:2040:6: warning: no previous prototype for 'dwc_usb3_remove_dev_files' [-Wmissing-prototypes] 2040 | void dwc_usb3_remove_dev_files(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/usb/dwc3/otg.c:2050:5: warning: no previous prototype for 'dwc3_otg_create_dev_files' [-Wmissing-prototypes] 2050 | int dwc3_otg_create_dev_files(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ vim +/osts +291 drivers/usb/dwc3/otg.c d50e8d7c931f49 Piyush Mehta 2022-01-26 285 d50e8d7c931f49 Piyush Mehta 2022-01-26 286 static int start_host(struct dwc3_otg *otg) d50e8d7c931f49 Piyush Mehta 2022-01-26 287 { d50e8d7c931f49 Piyush Mehta 2022-01-26 288 int ret = -ENODEV; d50e8d7c931f49 Piyush Mehta 2022-01-26 289 int flg; d50e8d7c931f49 Piyush Mehta 2022-01-26 290 u32 octl; d50e8d7c931f49 Piyush Mehta 2022-01-26 @291 u32 osts; d50e8d7c931f49 Piyush Mehta 2022-01-26 292 u32 ocfg; d50e8d7c931f49 Piyush Mehta 2022-01-26 293 u32 dctl; d50e8d7c931f49 Piyush Mehta 2022-01-26 294 struct usb_hcd *hcd; d50e8d7c931f49 Piyush Mehta 2022-01-26 295 struct xhci_hcd *xhci; d50e8d7c931f49 Piyush Mehta 2022-01-26 296 d50e8d7c931f49 Piyush Mehta 2022-01-26 297 otg_dbg(otg, "\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 298 d50e8d7c931f49 Piyush Mehta 2022-01-26 299 if (!otg->otg.host) d50e8d7c931f49 Piyush Mehta 2022-01-26 300 return -ENODEV; d50e8d7c931f49 Piyush Mehta 2022-01-26 301 d50e8d7c931f49 Piyush Mehta 2022-01-26 302 /* d50e8d7c931f49 Piyush Mehta 2022-01-26 303 * Prevent the host USBCMD.HCRST from resetting OTG core by setting d50e8d7c931f49 Piyush Mehta 2022-01-26 304 * OCFG.OTGSftRstMsk d50e8d7c931f49 Piyush Mehta 2022-01-26 305 */ d50e8d7c931f49 Piyush Mehta 2022-01-26 306 ocfg = otg_read(otg, OCFG); d50e8d7c931f49 Piyush Mehta 2022-01-26 307 ocfg |= DWC3_OCFG_SFTRSTMASK; d50e8d7c931f49 Piyush Mehta 2022-01-26 308 otg_write(otg, OCFG, ocfg); d50e8d7c931f49 Piyush Mehta 2022-01-26 309 d50e8d7c931f49 Piyush Mehta 2022-01-26 310 dctl = otg_read(otg, DCTL); d50e8d7c931f49 Piyush Mehta 2022-01-26 311 if (dctl & DWC3_DCTL_RUN_STOP) { d50e8d7c931f49 Piyush Mehta 2022-01-26 312 otg_dbg(otg, "Disabling the RUN/STOP bit\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 313 dctl &= ~DWC3_DCTL_RUN_STOP; d50e8d7c931f49 Piyush Mehta 2022-01-26 314 otg_write(otg, DCTL, dctl); d50e8d7c931f49 Piyush Mehta 2022-01-26 315 } d50e8d7c931f49 Piyush Mehta 2022-01-26 316 d50e8d7c931f49 Piyush Mehta 2022-01-26 317 if (!set_peri_mode(otg, PERI_MODE_HOST)) { d50e8d7c931f49 Piyush Mehta 2022-01-26 318 otg_err(otg, "Failed to start host\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 319 return -EINVAL; d50e8d7c931f49 Piyush Mehta 2022-01-26 320 } d50e8d7c931f49 Piyush Mehta 2022-01-26 321 d50e8d7c931f49 Piyush Mehta 2022-01-26 322 hcd = container_of(otg->otg.host, struct usb_hcd, self); d50e8d7c931f49 Piyush Mehta 2022-01-26 323 xhci = hcd_to_xhci(hcd); d50e8d7c931f49 Piyush Mehta 2022-01-26 324 otg_dbg(otg, "hcd=%p xhci=%p\n", hcd, xhci); d50e8d7c931f49 Piyush Mehta 2022-01-26 325 d50e8d7c931f49 Piyush Mehta 2022-01-26 326 if (otg->host_started) { d50e8d7c931f49 Piyush Mehta 2022-01-26 327 otg_info(otg, "Host already started\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 328 goto skip; d50e8d7c931f49 Piyush Mehta 2022-01-26 329 } d50e8d7c931f49 Piyush Mehta 2022-01-26 330 d50e8d7c931f49 Piyush Mehta 2022-01-26 331 /* Start host driver */ d50e8d7c931f49 Piyush Mehta 2022-01-26 332 d50e8d7c931f49 Piyush Mehta 2022-01-26 333 *(struct xhci_hcd **)hcd->hcd_priv = xhci; d50e8d7c931f49 Piyush Mehta 2022-01-26 334 ret = usb_add_hcd(hcd, otg->hcd_irq, IRQF_SHARED); d50e8d7c931f49 Piyush Mehta 2022-01-26 335 if (ret) { d50e8d7c931f49 Piyush Mehta 2022-01-26 336 otg_err(otg, "%s: failed to start primary hcd, ret=%d\n", d50e8d7c931f49 Piyush Mehta 2022-01-26 337 __func__, ret); d50e8d7c931f49 Piyush Mehta 2022-01-26 338 return ret; d50e8d7c931f49 Piyush Mehta 2022-01-26 339 } d50e8d7c931f49 Piyush Mehta 2022-01-26 340 d50e8d7c931f49 Piyush Mehta 2022-01-26 341 *(struct xhci_hcd **)xhci->shared_hcd->hcd_priv = xhci; d50e8d7c931f49 Piyush Mehta 2022-01-26 342 if (xhci->shared_hcd) { d50e8d7c931f49 Piyush Mehta 2022-01-26 343 ret = usb_add_hcd(xhci->shared_hcd, otg->hcd_irq, IRQF_SHARED); d50e8d7c931f49 Piyush Mehta 2022-01-26 344 if (ret) { d50e8d7c931f49 Piyush Mehta 2022-01-26 345 otg_err(otg, d50e8d7c931f49 Piyush Mehta 2022-01-26 346 "%s: failed to start secondary hcd, ret=%d\n", d50e8d7c931f49 Piyush Mehta 2022-01-26 347 __func__, ret); d50e8d7c931f49 Piyush Mehta 2022-01-26 348 usb_remove_hcd(hcd); d50e8d7c931f49 Piyush Mehta 2022-01-26 349 return ret; d50e8d7c931f49 Piyush Mehta 2022-01-26 350 } d50e8d7c931f49 Piyush Mehta 2022-01-26 351 } d50e8d7c931f49 Piyush Mehta 2022-01-26 352 d50e8d7c931f49 Piyush Mehta 2022-01-26 353 otg->host_started = 1; d50e8d7c931f49 Piyush Mehta 2022-01-26 354 skip: d50e8d7c931f49 Piyush Mehta 2022-01-26 355 hcd->self.otg_port = 1; d50e8d7c931f49 Piyush Mehta 2022-01-26 356 if (xhci->shared_hcd) d50e8d7c931f49 Piyush Mehta 2022-01-26 357 xhci->shared_hcd->self.otg_port = 1; d50e8d7c931f49 Piyush Mehta 2022-01-26 358 d50e8d7c931f49 Piyush Mehta 2022-01-26 359 set_capabilities(otg); d50e8d7c931f49 Piyush Mehta 2022-01-26 360 d50e8d7c931f49 Piyush Mehta 2022-01-26 361 /* Power the port only for A-host */ d50e8d7c931f49 Piyush Mehta 2022-01-26 362 if (otg->otg.state == OTG_STATE_A_WAIT_VRISE) { d50e8d7c931f49 Piyush Mehta 2022-01-26 363 /* Spin on xhciPrtPwr bit until it becomes 1 */ d50e8d7c931f49 Piyush Mehta 2022-01-26 364 osts = otg_read(otg, OSTS); d50e8d7c931f49 Piyush Mehta 2022-01-26 365 flg = otg3_handshake(otg, OSTS, d50e8d7c931f49 Piyush Mehta 2022-01-26 366 OSTS_XHCI_PRT_PWR, d50e8d7c931f49 Piyush Mehta 2022-01-26 367 OSTS_XHCI_PRT_PWR, d50e8d7c931f49 Piyush Mehta 2022-01-26 368 1000); d50e8d7c931f49 Piyush Mehta 2022-01-26 369 if (flg) { d50e8d7c931f49 Piyush Mehta 2022-01-26 370 otg_dbg(otg, "Port is powered by xhci-hcd\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 371 /* Set port power control bit */ d50e8d7c931f49 Piyush Mehta 2022-01-26 372 octl = otg_read(otg, OCTL); d50e8d7c931f49 Piyush Mehta 2022-01-26 373 octl |= OCTL_PRT_PWR_CTL; d50e8d7c931f49 Piyush Mehta 2022-01-26 374 otg_write(otg, OCTL, octl); d50e8d7c931f49 Piyush Mehta 2022-01-26 375 } else { d50e8d7c931f49 Piyush Mehta 2022-01-26 376 otg_dbg(otg, "Port is not powered by xhci-hcd\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 377 } d50e8d7c931f49 Piyush Mehta 2022-01-26 378 } d50e8d7c931f49 Piyush Mehta 2022-01-26 379 d50e8d7c931f49 Piyush Mehta 2022-01-26 380 return ret; d50e8d7c931f49 Piyush Mehta 2022-01-26 381 } d50e8d7c931f49 Piyush Mehta 2022-01-26 382 d50e8d7c931f49 Piyush Mehta 2022-01-26 383 static int stop_host(struct dwc3_otg *otg) d50e8d7c931f49 Piyush Mehta 2022-01-26 384 { d50e8d7c931f49 Piyush Mehta 2022-01-26 385 struct usb_hcd *hcd; d50e8d7c931f49 Piyush Mehta 2022-01-26 386 struct xhci_hcd *xhci; d50e8d7c931f49 Piyush Mehta 2022-01-26 387 d50e8d7c931f49 Piyush Mehta 2022-01-26 388 otg_dbg(otg, "\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 389 d50e8d7c931f49 Piyush Mehta 2022-01-26 390 if (!otg->host_started) { d50e8d7c931f49 Piyush Mehta 2022-01-26 391 otg_info(otg, "Host already stopped\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 392 return 1; d50e8d7c931f49 Piyush Mehta 2022-01-26 393 } d50e8d7c931f49 Piyush Mehta 2022-01-26 394 d50e8d7c931f49 Piyush Mehta 2022-01-26 395 if (!otg->otg.host) d50e8d7c931f49 Piyush Mehta 2022-01-26 396 return -ENODEV; d50e8d7c931f49 Piyush Mehta 2022-01-26 397 d50e8d7c931f49 Piyush Mehta 2022-01-26 398 otg_dbg(otg, "%s: turn off host %s\n", d50e8d7c931f49 Piyush Mehta 2022-01-26 399 __func__, otg->otg.host->bus_name); d50e8d7c931f49 Piyush Mehta 2022-01-26 400 d50e8d7c931f49 Piyush Mehta 2022-01-26 401 if (work_pending(&otg->hp_work.work)) { d50e8d7c931f49 Piyush Mehta 2022-01-26 402 while (!cancel_delayed_work(&otg->hp_work)) d50e8d7c931f49 Piyush Mehta 2022-01-26 403 msleep(20); d50e8d7c931f49 Piyush Mehta 2022-01-26 404 } d50e8d7c931f49 Piyush Mehta 2022-01-26 405 d50e8d7c931f49 Piyush Mehta 2022-01-26 406 hcd = container_of(otg->otg.host, struct usb_hcd, self); d50e8d7c931f49 Piyush Mehta 2022-01-26 407 xhci = hcd_to_xhci(hcd); d50e8d7c931f49 Piyush Mehta 2022-01-26 408 d50e8d7c931f49 Piyush Mehta 2022-01-26 409 if (xhci->shared_hcd) d50e8d7c931f49 Piyush Mehta 2022-01-26 410 usb_remove_hcd(xhci->shared_hcd); d50e8d7c931f49 Piyush Mehta 2022-01-26 411 usb_remove_hcd(hcd); d50e8d7c931f49 Piyush Mehta 2022-01-26 412 d50e8d7c931f49 Piyush Mehta 2022-01-26 413 otg->host_started = 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 414 otg->dev_enum = 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 415 return 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 416 } d50e8d7c931f49 Piyush Mehta 2022-01-26 417 d50e8d7c931f49 Piyush Mehta 2022-01-26 @418 int dwc3_otg_host_release(struct usb_hcd *hcd) d50e8d7c931f49 Piyush Mehta 2022-01-26 419 { d50e8d7c931f49 Piyush Mehta 2022-01-26 420 struct usb_bus *bus; d50e8d7c931f49 Piyush Mehta 2022-01-26 421 struct usb_device *rh; d50e8d7c931f49 Piyush Mehta 2022-01-26 422 struct usb_device *udev; d50e8d7c931f49 Piyush Mehta 2022-01-26 423 d50e8d7c931f49 Piyush Mehta 2022-01-26 424 if (!hcd) d50e8d7c931f49 Piyush Mehta 2022-01-26 425 return -EINVAL; d50e8d7c931f49 Piyush Mehta 2022-01-26 426 d50e8d7c931f49 Piyush Mehta 2022-01-26 427 bus = &hcd->self; d50e8d7c931f49 Piyush Mehta 2022-01-26 428 if (!bus->otg_port) d50e8d7c931f49 Piyush Mehta 2022-01-26 429 return 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 430 d50e8d7c931f49 Piyush Mehta 2022-01-26 431 rh = bus->root_hub; d50e8d7c931f49 Piyush Mehta 2022-01-26 432 udev = usb_hub_find_child(rh, bus->otg_port); d50e8d7c931f49 Piyush Mehta 2022-01-26 433 if (!udev) d50e8d7c931f49 Piyush Mehta 2022-01-26 434 return 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 435 d50e8d7c931f49 Piyush Mehta 2022-01-26 436 if (udev->config && udev->parent == udev->bus->root_hub) { d50e8d7c931f49 Piyush Mehta 2022-01-26 437 struct usb_otg20_descriptor *desc; d50e8d7c931f49 Piyush Mehta 2022-01-26 438 d50e8d7c931f49 Piyush Mehta 2022-01-26 439 if (__usb_get_extra_descriptor(udev->rawdescriptors[0], d50e8d7c931f49 Piyush Mehta 2022-01-26 440 le16_to_cpu(udev->config[0].desc.wTotalLength), d7c92a2d32b6fe Piyush Mehta 2022-01-26 441 USB_DT_OTG, (void **)&desc, sizeof(*desc)) == d7c92a2d32b6fe Piyush Mehta 2022-01-26 442 0) { d50e8d7c931f49 Piyush Mehta 2022-01-26 443 int err; d50e8d7c931f49 Piyush Mehta 2022-01-26 444 d50e8d7c931f49 Piyush Mehta 2022-01-26 445 dev_info(&udev->dev, "found OTG descriptor\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 446 if ((desc->bcdOTG >= 0x0200) && d50e8d7c931f49 Piyush Mehta 2022-01-26 447 (udev->speed == USB_SPEED_HIGH)) { d50e8d7c931f49 Piyush Mehta 2022-01-26 448 err = usb_control_msg(udev, d50e8d7c931f49 Piyush Mehta 2022-01-26 449 usb_sndctrlpipe(udev, 0), d50e8d7c931f49 Piyush Mehta 2022-01-26 450 USB_REQ_SET_FEATURE, 0, d50e8d7c931f49 Piyush Mehta 2022-01-26 451 USB_DEVICE_TEST_MODE, d50e8d7c931f49 Piyush Mehta 2022-01-26 452 7 << 8, d50e8d7c931f49 Piyush Mehta 2022-01-26 453 NULL, 0, USB_CTRL_SET_TIMEOUT); d50e8d7c931f49 Piyush Mehta 2022-01-26 454 if (err < 0) { d50e8d7c931f49 Piyush Mehta 2022-01-26 455 dev_info(&udev->dev, d50e8d7c931f49 Piyush Mehta 2022-01-26 456 "can't initiate HNP from host: %d\n", d50e8d7c931f49 Piyush Mehta 2022-01-26 457 err); d50e8d7c931f49 Piyush Mehta 2022-01-26 458 return -1; d50e8d7c931f49 Piyush Mehta 2022-01-26 459 } d50e8d7c931f49 Piyush Mehta 2022-01-26 460 } d50e8d7c931f49 Piyush Mehta 2022-01-26 461 } else { d50e8d7c931f49 Piyush Mehta 2022-01-26 462 dev_info(&udev->dev, "didn't find OTG descriptor\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 463 } d50e8d7c931f49 Piyush Mehta 2022-01-26 464 } else { d50e8d7c931f49 Piyush Mehta 2022-01-26 465 dev_info(&udev->dev, d50e8d7c931f49 Piyush Mehta 2022-01-26 466 "udev->config NULL or udev->parent != udev->bus->root_hub\n"); d50e8d7c931f49 Piyush Mehta 2022-01-26 467 } d50e8d7c931f49 Piyush Mehta 2022-01-26 468 d50e8d7c931f49 Piyush Mehta 2022-01-26 469 return 0; d50e8d7c931f49 Piyush Mehta 2022-01-26 470 } d50e8d7c931f49 Piyush Mehta 2022-01-26 471 :::::: The code at line 291 was first introduced by commit :::::: d50e8d7c931f49b3c396fd2aa71dc6f76604f61d usb: dwc3: otg: fix broken OTG HNP feature :::::: TO: Piyush Mehta :::::: CC: Michal Simek -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel