public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sergey Shtylyov <s.shtylyov@omp.ru>,
	linux-usb@vger.kernel.org, Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 04/22] usb: host: ehci-omap: deny IRQ0
Date: Thu, 21 Oct 2021 14:28:30 +0800	[thread overview]
Message-ID: <202110211409.4QDUnQrN-lkp@intel.com> (raw)
In-Reply-To: <20211018183930.8448-5-s.shtylyov@omp.ru>

[-- Attachment #1: Type: text/plain, Size: 6967 bytes --]

Hi Sergey,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v5.15-rc6 next-20211020]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sergey-Shtylyov/Explicitly-deny-IRQ0-in-the-USB-host-drivers/20211019-024031
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-randconfig-c002-20211021 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 3cea2505fd8d99a9ba0cb625aecfe28a47c4e3f8)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/cafbcf482dba9f0918ee071d03683bc2e8681d73
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Sergey-Shtylyov/Explicitly-deny-IRQ0-in-the-USB-host-drivers/20211019-024031
        git checkout cafbcf482dba9f0918ee071d03683bc2e8681d73
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/usb/host/ehci-omap.c:121:11: error: use of undeclared identifier 'ENIVAL'
                   return -ENIVAL;
                           ^
   1 error generated.


vim +/ENIVAL +121 drivers/usb/host/ehci-omap.c

    77	
    78	/**
    79	 * ehci_hcd_omap_probe - initialize TI-based HCDs
    80	 * @pdev: Pointer to this platform device's information
    81	 *
    82	 * Allocates basic resources for this USB host controller, and
    83	 * then invokes the start() method for the HCD associated with it
    84	 * through the hotplug entry's driver_data.
    85	 */
    86	static int ehci_hcd_omap_probe(struct platform_device *pdev)
    87	{
    88		struct device *dev = &pdev->dev;
    89		struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev);
    90		struct resource	*res;
    91		struct usb_hcd	*hcd;
    92		void __iomem *regs;
    93		int ret;
    94		int irq;
    95		int i;
    96		struct omap_hcd	*omap;
    97	
    98		if (usb_disabled())
    99			return -ENODEV;
   100	
   101		if (!dev->parent) {
   102			dev_err(dev, "Missing parent device\n");
   103			return -ENODEV;
   104		}
   105	
   106		/* For DT boot, get platform data from parent. i.e. usbhshost */
   107		if (dev->of_node) {
   108			pdata = dev_get_platdata(dev->parent);
   109			dev->platform_data = pdata;
   110		}
   111	
   112		if (!pdata) {
   113			dev_err(dev, "Missing platform data\n");
   114			return -ENODEV;
   115		}
   116	
   117		irq = platform_get_irq(pdev, 0);
   118		if (irq < 0)
   119			return irq;
   120		if (!irq)
 > 121			return -ENIVAL;
   122	
   123		res =  platform_get_resource(pdev, IORESOURCE_MEM, 0);
   124		regs = devm_ioremap_resource(dev, res);
   125		if (IS_ERR(regs))
   126			return PTR_ERR(regs);
   127	
   128		/*
   129		 * Right now device-tree probed devices don't get dma_mask set.
   130		 * Since shared usb code relies on it, set it here for now.
   131		 * Once we have dma capability bindings this can go away.
   132		 */
   133		ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
   134		if (ret)
   135			return ret;
   136	
   137		ret = -ENODEV;
   138		hcd = usb_create_hcd(&ehci_omap_hc_driver, dev,
   139				dev_name(dev));
   140		if (!hcd) {
   141			dev_err(dev, "Failed to create HCD\n");
   142			return -ENOMEM;
   143		}
   144	
   145		hcd->rsrc_start = res->start;
   146		hcd->rsrc_len = resource_size(res);
   147		hcd->regs = regs;
   148		hcd_to_ehci(hcd)->caps = regs;
   149	
   150		omap = (struct omap_hcd *)hcd_to_ehci(hcd)->priv;
   151		omap->nports = pdata->nports;
   152	
   153		platform_set_drvdata(pdev, hcd);
   154	
   155		/* get the PHY devices if needed */
   156		for (i = 0 ; i < omap->nports ; i++) {
   157			struct usb_phy *phy;
   158	
   159			/* get the PHY device */
   160			phy = devm_usb_get_phy_by_phandle(dev, "phys", i);
   161			if (IS_ERR(phy)) {
   162				ret = PTR_ERR(phy);
   163				if (ret == -ENODEV) { /* no PHY */
   164					phy = NULL;
   165					continue;
   166				}
   167	
   168				if (ret != -EPROBE_DEFER)
   169					dev_err(dev, "Can't get PHY for port %d: %d\n",
   170						i, ret);
   171				goto err_phy;
   172			}
   173	
   174			omap->phy[i] = phy;
   175	
   176			if (pdata->port_mode[i] == OMAP_EHCI_PORT_MODE_PHY) {
   177				usb_phy_init(omap->phy[i]);
   178				/* bring PHY out of suspend */
   179				usb_phy_set_suspend(omap->phy[i], 0);
   180			}
   181		}
   182	
   183		pm_runtime_enable(dev);
   184		pm_runtime_get_sync(dev);
   185	
   186		/*
   187		 * An undocumented "feature" in the OMAP3 EHCI controller,
   188		 * causes suspended ports to be taken out of suspend when
   189		 * the USBCMD.Run/Stop bit is cleared (for example when
   190		 * we do ehci_bus_suspend).
   191		 * This breaks suspend-resume if the root-hub is allowed
   192		 * to suspend. Writing 1 to this undocumented register bit
   193		 * disables this feature and restores normal behavior.
   194		 */
   195		ehci_write(regs, EHCI_INSNREG04,
   196					EHCI_INSNREG04_DISABLE_UNSUSPEND);
   197	
   198		ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
   199		if (ret) {
   200			dev_err(dev, "failed to add hcd with err %d\n", ret);
   201			goto err_pm_runtime;
   202		}
   203		device_wakeup_enable(hcd->self.controller);
   204	
   205		/*
   206		 * Bring PHYs out of reset for non PHY modes.
   207		 * Even though HSIC mode is a PHY-less mode, the reset
   208		 * line exists between the chips and can be modelled
   209		 * as a PHY device for reset control.
   210		 */
   211		for (i = 0; i < omap->nports; i++) {
   212			if (!omap->phy[i] ||
   213			     pdata->port_mode[i] == OMAP_EHCI_PORT_MODE_PHY)
   214				continue;
   215	
   216			usb_phy_init(omap->phy[i]);
   217			/* bring PHY out of suspend */
   218			usb_phy_set_suspend(omap->phy[i], 0);
   219		}
   220	
   221		return 0;
   222	
   223	err_pm_runtime:
   224		pm_runtime_put_sync(dev);
   225		pm_runtime_disable(dev);
   226	
   227	err_phy:
   228		for (i = 0; i < omap->nports; i++) {
   229			if (omap->phy[i])
   230				usb_phy_shutdown(omap->phy[i]);
   231		}
   232	
   233		usb_put_hcd(hcd);
   234	
   235		return ret;
   236	}
   237	

---
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: 30132 bytes --]

  reply	other threads:[~2021-10-21  6:29 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 18:39 [PATCH 00/22] Explicitly deny IRQ0 in the USB host drivers Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 01/22] usb: host: ehci-exynos: deny IRQ0 Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 02/22] usb: host: ehci-mv: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 03/22] usb: host: ehci-npcm7xx: " Sergey Shtylyov
2021-10-19  7:11   ` Avi Fishman
2021-10-18 18:39 ` [PATCH 04/22] usb: host: ehci-omap: " Sergey Shtylyov
2021-10-21  6:28   ` kernel test robot [this message]
2021-10-18 18:39 ` [PATCH 05/22] usb: host: ehci-platform: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 06/22] usb: host: ehci-spear: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 07/22] usb: host: ehci-st: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 08/22] usb: host: ohci-at91: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 09/22] usb: host: ohci-da8xx: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 10/22] usb: host: ohci-exynos: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 11/22] usb: host: ohci-at91: " Sergey Shtylyov
2021-10-19 11:15   ` Alexander Dahl
2021-10-19 16:51     ` Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 12/22] usb: host: ohci-omap: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 13/22] usb: host: ohci-platform: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 14/22] usb: host: ohci-pxa27x: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 15/22] usb: host: ohci-sm501: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 16/22] usb: host: ohci-spear: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 17/22] usb: host: ohci-st: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 18/22] usb: host: ohci-tmio: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 19/22] usb: host: xhci-histb: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 20/22] usb: host: xhci-mtk: " Sergey Shtylyov
2021-10-20  7:32   ` Chunfeng Yun
2021-10-18 18:39 ` [PATCH 21/22] usb: host: xhci-plat: " Sergey Shtylyov
2021-10-18 18:39 ` [PATCH 22/22] usb: host: xhci-tegra: " Sergey Shtylyov
2021-10-21  9:09   ` Dmitry Osipenko
2021-10-26 18:24     ` Sergey Shtylyov
2021-10-27 11:13       ` Dmitry Osipenko
2021-10-19  1:35 ` [PATCH 00/22] Explicitly deny IRQ0 in the USB host drivers Alan Stern
2021-10-19  5:41 ` Greg Kroah-Hartman
2021-10-19  7:31   ` Greg Kroah-Hartman
2021-10-19 18:28     ` Sergey Shtylyov
2021-10-19 18:35       ` Alan Stern
2021-10-19 18:46         ` Sergey Shtylyov
2021-10-20 16:06           ` Sergey Shtylyov
2021-10-19 18:18   ` Sergey Shtylyov
2021-10-20 16:16 ` Greg Kroah-Hartman
2021-10-20 18:50   ` Sergey Shtylyov

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=202110211409.4QDUnQrN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=s.shtylyov@omp.ru \
    --cc=stern@rowland.harvard.edu \
    /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