All of lore.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: kbuild-all@lists.01.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 04/22] usb: host: ehci-omap: deny IRQ0
Date: Sun, 31 Oct 2021 03:49:45 +0800	[thread overview]
Message-ID: <202110310310.dDfSnTiN-lkp@intel.com> (raw)
In-Reply-To: <20211026173943.6829-5-s.shtylyov@omp.ru>

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

Hi Sergey,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on peter-chen-usb/for-usb-next balbi-usb/testing/next v5.15-rc7 next-20211029]
[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/20211027-015925
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/0day-ci/linux/commit/99339edc4591ee2104acf45913d0dcb2a75bf1bf
        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/20211027-015925
        git checkout 99339edc4591ee2104acf45913d0dcb2a75bf1bf
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/usb/

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: In function 'ehci_hcd_omap_probe':
>> drivers/usb/host/ehci-omap.c:121:25: error: 'ENIVAL' undeclared (first use in this function); did you mean 'EINVAL'?
     121 |                 return -ENIVAL;
         |                         ^~~~~~
         |                         EINVAL
   drivers/usb/host/ehci-omap.c:121:25: note: each undeclared identifier is reported only once for each function it appears in


vim +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: 55370 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 04/22] usb: host: ehci-omap: deny IRQ0
Date: Sun, 31 Oct 2021 03:49:45 +0800	[thread overview]
Message-ID: <202110310310.dDfSnTiN-lkp@intel.com> (raw)
In-Reply-To: <20211026173943.6829-5-s.shtylyov@omp.ru>

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

Hi Sergey,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on peter-chen-usb/for-usb-next balbi-usb/testing/next v5.15-rc7 next-20211029]
[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/20211027-015925
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/0day-ci/linux/commit/99339edc4591ee2104acf45913d0dcb2a75bf1bf
        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/20211027-015925
        git checkout 99339edc4591ee2104acf45913d0dcb2a75bf1bf
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/usb/

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: In function 'ehci_hcd_omap_probe':
>> drivers/usb/host/ehci-omap.c:121:25: error: 'ENIVAL' undeclared (first use in this function); did you mean 'EINVAL'?
     121 |                 return -ENIVAL;
         |                         ^~~~~~
         |                         EINVAL
   drivers/usb/host/ehci-omap.c:121:25: note: each undeclared identifier is reported only once for each function it appears in


vim +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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 55370 bytes --]

  reply	other threads:[~2021-10-30 19:50 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26 17:39 [PATCH v2 00/22] Explicitly deny IRQ0 in the USB host drivers Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 01/22] usb: host: ehci-exynos: deny IRQ0 Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-30  8:54   ` Greg Kroah-Hartman
2021-10-30  8:54     ` Greg Kroah-Hartman
2021-11-01 20:39     ` Sergey Shtylyov
2021-11-01 20:39       ` Sergey Shtylyov
2021-11-02 13:55       ` Greg Kroah-Hartman
2021-11-02 13:55         ` Greg Kroah-Hartman
2021-11-02 20:45         ` Sergey Shtylyov
2021-11-02 20:45           ` Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 02/22] usb: host: ehci-mv: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 03/22] usb: host: ehci-npcm7xx: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 04/22] usb: host: ehci-omap: " Sergey Shtylyov
2021-10-30 19:49   ` kernel test robot [this message]
2021-10-30 19:49     ` kernel test robot
2021-10-26 17:39 ` [PATCH v2 05/22] usb: host: ehci-platform: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 06/22] usb: host: ehci-spear: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 07/22] usb: host: ehci-st: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-27  6:08   ` Patrice CHOTARD
2021-10-27  6:08     ` Patrice CHOTARD
2021-10-26 17:39 ` [PATCH v2 08/22] usb: host: ohci-at91: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 09/22] usb: host: ohci-da8xx: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 10/22] usb: host: ohci-exynos: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 11/22] usb: host: ohci-nxp: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 18:25   ` Vladimir Zapolskiy
2021-10-26 18:25     ` Vladimir Zapolskiy
2021-10-26 17:39 ` [PATCH v2 12/22] usb: host: ohci-omap: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 13/22] usb: host: ohci-platform: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 14/22] usb: host: ohci-pxa27x: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 15/22] usb: host: ohci-sm501: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 16/22] usb: host: ohci-spear: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 17/22] usb: host: ohci-st: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-27  6:08   ` Patrice CHOTARD
2021-10-27  6:08     ` Patrice CHOTARD
2021-10-26 17:39 ` [PATCH v2 18/22] usb: host: ohci-tmio: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 19/22] usb: host: xhci-histb: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 20/22] usb: host: xhci-mtk: " Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-26 17:39   ` Sergey Shtylyov
2021-10-27  8:54   ` Chunfeng Yun
2021-10-27  8:54     ` Chunfeng Yun
2021-10-27  8:54     ` Chunfeng Yun
2021-10-27  9:18   ` Chunfeng Yun
2021-10-27  9:18     ` Chunfeng Yun
2021-10-27  9:18     ` Chunfeng Yun
2021-10-27  9:25     ` Sergey Shtylyov
2021-10-27  9:25       ` Sergey Shtylyov
2021-10-27  9:25       ` Sergey Shtylyov
2021-10-27  9:35       ` Chunfeng Yun
2021-10-27  9:35         ` Chunfeng Yun
2021-10-27  9:35         ` Chunfeng Yun
2021-10-26 17:39 ` [PATCH v2 21/22] usb: host: xhci-plat: " Sergey Shtylyov
2021-10-26 17:39 ` [PATCH v2 22/22] usb: host: xhci-tegra: " Sergey Shtylyov
2021-10-30 22:08   ` kernel test robot
2021-10-30 22:08     ` 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=202110310310.dDfSnTiN-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=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 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.