All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 4/5] usb: core: hcd-pci: Let usb_hcd_pci_probe() indicate if RH has to be registered
Date: Tue, 24 Aug 2021 21:34:18 +0800	[thread overview]
Message-ID: <202108242106.eUafeLhC-lkp@intel.com> (raw)
In-Reply-To: <20210824105302.25382-5-kishon@ti.com>

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

Hi Kishon,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on v5.14-rc7 next-20210824]
[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/Kishon-Vijay-Abraham-I/Fix-cold-plugged-USB-device-on-certain-PCIe-USB-cards/20210824-185502
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: powerpc-akebono_defconfig (attached as .config)
compiler: powerpc-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/0day-ci/linux/commit/fd3b9b5ae10e49551c8b9635c004d54e8cf085ae
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kishon-Vijay-Abraham-I/Fix-cold-plugged-USB-device-on-certain-PCIe-USB-cards/20210824-185502
        git checkout fd3b9b5ae10e49551c8b9635c004d54e8cf085ae
        # 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=powerpc SHELL=/bin/bash drivers/usb/core/

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

All warnings (new ones prefixed by >>):

>> drivers/usb/core/hcd-pci.c:177: warning: expecting prototype for usb_hcd_pci_probe(). Prototype was for __usb_hcd_pci_probe() instead


vim +177 drivers/usb/core/hcd-pci.c

^1da177e4c3f41 Linus Torvalds         2005-04-16  157  
^1da177e4c3f41 Linus Torvalds         2005-04-16  158  /**
^1da177e4c3f41 Linus Torvalds         2005-04-16  159   * usb_hcd_pci_probe - initialize PCI-based HCDs
^1da177e4c3f41 Linus Torvalds         2005-04-16  160   * @dev: USB Host Controller being probed
^1da177e4c3f41 Linus Torvalds         2005-04-16  161   * @id: pci hotplug id connecting controller to HCD framework
ff4c65ca48f08f Vinod Koul             2020-05-14  162   * @driver: USB HC driver handle
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  163   * @register_hub: Flag to indicate of roothub has to be registered or not
41631d3616c363 Ahmed S. Darwish       2020-10-19  164   *
41631d3616c363 Ahmed S. Darwish       2020-10-19  165   * Context: task context, might sleep
^1da177e4c3f41 Linus Torvalds         2005-04-16  166   *
^1da177e4c3f41 Linus Torvalds         2005-04-16  167   * Allocates basic PCI resources for this USB host controller, and
^1da177e4c3f41 Linus Torvalds         2005-04-16  168   * then invokes the start() method for the HCD associated with it
^1da177e4c3f41 Linus Torvalds         2005-04-16  169   * through the hotplug entry's driver_data.
^1da177e4c3f41 Linus Torvalds         2005-04-16  170   *
^1da177e4c3f41 Linus Torvalds         2005-04-16  171   * Store this function in the HCD's struct pci_driver as probe().
626f090c5cbbe5 Yacine Belkadi         2013-08-02  172   *
626f090c5cbbe5 Yacine Belkadi         2013-08-02  173   * Return: 0 if successful.
^1da177e4c3f41 Linus Torvalds         2005-04-16  174   */
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  175  int __usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id,
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  176  			const struct hc_driver *driver, bool register_hub)
^1da177e4c3f41 Linus Torvalds         2005-04-16 @177  {
^1da177e4c3f41 Linus Torvalds         2005-04-16  178  	struct usb_hcd		*hcd;
^1da177e4c3f41 Linus Torvalds         2005-04-16  179  	int			retval;
00eed9c814cb8f Hannes Reinecke        2013-03-04  180  	int			hcd_irq = 0;
^1da177e4c3f41 Linus Torvalds         2005-04-16  181  
^1da177e4c3f41 Linus Torvalds         2005-04-16  182  	if (usb_disabled())
^1da177e4c3f41 Linus Torvalds         2005-04-16  183  		return -ENODEV;
^1da177e4c3f41 Linus Torvalds         2005-04-16  184  
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  185  	if (!id)
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  186  		return -EINVAL;
ff4c65ca48f08f Vinod Koul             2020-05-14  187  
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  188  	if (!driver)
^1da177e4c3f41 Linus Torvalds         2005-04-16  189  		return -EINVAL;
^1da177e4c3f41 Linus Torvalds         2005-04-16  190  
^1da177e4c3f41 Linus Torvalds         2005-04-16  191  	if (pci_enable_device(dev) < 0)
^1da177e4c3f41 Linus Torvalds         2005-04-16  192  		return -ENODEV;
^1da177e4c3f41 Linus Torvalds         2005-04-16  193  
00eed9c814cb8f Hannes Reinecke        2013-03-04  194  	/*
00eed9c814cb8f Hannes Reinecke        2013-03-04  195  	 * The xHCI driver has its own irq management
00eed9c814cb8f Hannes Reinecke        2013-03-04  196  	 * make sure irq setup is not touched for xhci in generic hcd code
68d07f64b8a11a Sarah Sharp            2012-02-13  197  	 */
8a1b2725a60d32 Mathias Nyman          2015-12-10  198  	if ((driver->flags & HCD_MASK) < HCD_USB3) {
306c54d0edb6ba Andy Shevchenko        2020-07-02  199  		retval = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY | PCI_IRQ_MSI);
306c54d0edb6ba Andy Shevchenko        2020-07-02  200  		if (retval < 0) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  201  			dev_err(&dev->dev,
^1da177e4c3f41 Linus Torvalds         2005-04-16  202  			"Found HC with no IRQ. Check BIOS/PCI %s setup!\n",
^1da177e4c3f41 Linus Torvalds         2005-04-16  203  				pci_name(dev));
^1da177e4c3f41 Linus Torvalds         2005-04-16  204  			retval = -ENODEV;
8766c815607e57 Sarah Sharp            2010-10-15  205  			goto disable_pci;
^1da177e4c3f41 Linus Torvalds         2005-04-16  206  		}
306c54d0edb6ba Andy Shevchenko        2020-07-02  207  		hcd_irq = pci_irq_vector(dev, 0);
00eed9c814cb8f Hannes Reinecke        2013-03-04  208  	}
^1da177e4c3f41 Linus Torvalds         2005-04-16  209  
^1da177e4c3f41 Linus Torvalds         2005-04-16  210  	hcd = usb_create_hcd(driver, &dev->dev, pci_name(dev));
^1da177e4c3f41 Linus Torvalds         2005-04-16  211  	if (!hcd) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  212  		retval = -ENOMEM;
306c54d0edb6ba Andy Shevchenko        2020-07-02  213  		goto free_irq_vectors;
^1da177e4c3f41 Linus Torvalds         2005-04-16  214  	}
^1da177e4c3f41 Linus Torvalds         2005-04-16  215  
7868943db1668f Huang Rui              2013-09-16  216  	hcd->amd_resume_bug = (usb_hcd_amd_remote_wakeup_quirk(dev) &&
7868943db1668f Huang Rui              2013-09-16  217  			driver->flags & (HCD_USB11 | HCD_USB3)) ? 1 : 0;
7868943db1668f Huang Rui              2013-09-16  218  
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  219  	if (driver->flags & HCD_MEMORY) {
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  220  		/* EHCI, OHCI */
^1da177e4c3f41 Linus Torvalds         2005-04-16  221  		hcd->rsrc_start = pci_resource_start(dev, 0);
^1da177e4c3f41 Linus Torvalds         2005-04-16  222  		hcd->rsrc_len = pci_resource_len(dev, 0);
76da906ad72704 Schmid, Carsten        2019-08-23  223  		if (!devm_request_mem_region(&dev->dev, hcd->rsrc_start,
76da906ad72704 Schmid, Carsten        2019-08-23  224  				hcd->rsrc_len, driver->description)) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  225  			dev_dbg(&dev->dev, "controller already in use\n");
^1da177e4c3f41 Linus Torvalds         2005-04-16  226  			retval = -EBUSY;
05768918b9a122 Alan Stern             2013-03-28  227  			goto put_hcd;
^1da177e4c3f41 Linus Torvalds         2005-04-16  228  		}
4bdc0d676a6431 Christoph Hellwig      2020-01-06  229  		hcd->regs = devm_ioremap(&dev->dev, hcd->rsrc_start,
76da906ad72704 Schmid, Carsten        2019-08-23  230  				hcd->rsrc_len);
^1da177e4c3f41 Linus Torvalds         2005-04-16  231  		if (hcd->regs == NULL) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  232  			dev_dbg(&dev->dev, "error mapping memory\n");
^1da177e4c3f41 Linus Torvalds         2005-04-16  233  			retval = -EFAULT;
76da906ad72704 Schmid, Carsten        2019-08-23  234  			goto put_hcd;
^1da177e4c3f41 Linus Torvalds         2005-04-16  235  		}
^1da177e4c3f41 Linus Torvalds         2005-04-16  236  
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  237  	} else {
34bbe4c16ca06c Greg Kroah-Hartman     2008-01-30  238  		/* UHCI */
^1da177e4c3f41 Linus Torvalds         2005-04-16  239  		int	region;
^1da177e4c3f41 Linus Torvalds         2005-04-16  240  
c9c13ba428ef90 Denis Efremov          2019-09-28  241  		for (region = 0; region < PCI_STD_NUM_BARS; region++) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  242  			if (!(pci_resource_flags(dev, region) &
^1da177e4c3f41 Linus Torvalds         2005-04-16  243  					IORESOURCE_IO))
^1da177e4c3f41 Linus Torvalds         2005-04-16  244  				continue;
^1da177e4c3f41 Linus Torvalds         2005-04-16  245  
^1da177e4c3f41 Linus Torvalds         2005-04-16  246  			hcd->rsrc_start = pci_resource_start(dev, region);
^1da177e4c3f41 Linus Torvalds         2005-04-16  247  			hcd->rsrc_len = pci_resource_len(dev, region);
76da906ad72704 Schmid, Carsten        2019-08-23  248  			if (devm_request_region(&dev->dev, hcd->rsrc_start,
76da906ad72704 Schmid, Carsten        2019-08-23  249  					hcd->rsrc_len, driver->description))
^1da177e4c3f41 Linus Torvalds         2005-04-16  250  				break;
^1da177e4c3f41 Linus Torvalds         2005-04-16  251  		}
^1da177e4c3f41 Linus Torvalds         2005-04-16  252  		if (region == PCI_ROM_RESOURCE) {
^1da177e4c3f41 Linus Torvalds         2005-04-16  253  			dev_dbg(&dev->dev, "no i/o regions available\n");
^1da177e4c3f41 Linus Torvalds         2005-04-16  254  			retval = -EBUSY;
05768918b9a122 Alan Stern             2013-03-28  255  			goto put_hcd;
^1da177e4c3f41 Linus Torvalds         2005-04-16  256  		}
^1da177e4c3f41 Linus Torvalds         2005-04-16  257  	}
^1da177e4c3f41 Linus Torvalds         2005-04-16  258  
^1da177e4c3f41 Linus Torvalds         2005-04-16  259  	pci_set_master(dev);
^1da177e4c3f41 Linus Torvalds         2005-04-16  260  
05768918b9a122 Alan Stern             2013-03-28  261  	/* Note: dev_set_drvdata must be called while holding the rwsem */
05768918b9a122 Alan Stern             2013-03-28  262  	if (dev->class == CL_EHCI) {
05768918b9a122 Alan Stern             2013-03-28  263  		down_write(&companions_rwsem);
05768918b9a122 Alan Stern             2013-03-28  264  		dev_set_drvdata(&dev->dev, hcd);
05768918b9a122 Alan Stern             2013-03-28  265  		for_each_companion(dev, hcd, ehci_pre_add);
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  266  		retval = __usb_add_hcd(hcd, hcd_irq, IRQF_SHARED, register_hub);
05768918b9a122 Alan Stern             2013-03-28  267  		if (retval != 0)
05768918b9a122 Alan Stern             2013-03-28  268  			dev_set_drvdata(&dev->dev, NULL);
05768918b9a122 Alan Stern             2013-03-28  269  		for_each_companion(dev, hcd, ehci_post_add);
05768918b9a122 Alan Stern             2013-03-28  270  		up_write(&companions_rwsem);
05768918b9a122 Alan Stern             2013-03-28  271  	} else {
05768918b9a122 Alan Stern             2013-03-28  272  		down_read(&companions_rwsem);
05768918b9a122 Alan Stern             2013-03-28  273  		dev_set_drvdata(&dev->dev, hcd);
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  274  		retval = __usb_add_hcd(hcd, hcd_irq, IRQF_SHARED, register_hub);
05768918b9a122 Alan Stern             2013-03-28  275  		if (retval != 0)
05768918b9a122 Alan Stern             2013-03-28  276  			dev_set_drvdata(&dev->dev, NULL);
05768918b9a122 Alan Stern             2013-03-28  277  		else
05768918b9a122 Alan Stern             2013-03-28  278  			for_each_companion(dev, hcd, non_ehci_add);
05768918b9a122 Alan Stern             2013-03-28  279  		up_read(&companions_rwsem);
05768918b9a122 Alan Stern             2013-03-28  280  	}
05768918b9a122 Alan Stern             2013-03-28  281  
^1da177e4c3f41 Linus Torvalds         2005-04-16  282  	if (retval != 0)
76da906ad72704 Schmid, Carsten        2019-08-23  283  		goto put_hcd;
3c9740a117d40a Peter Chen             2013-11-05  284  	device_wakeup_enable(hcd->self.controller);
3da7cff4e79e4a Alan Stern             2010-06-25  285  
3da7cff4e79e4a Alan Stern             2010-06-25  286  	if (pci_dev_run_wake(dev))
3da7cff4e79e4a Alan Stern             2010-06-25  287  		pm_runtime_put_noidle(&dev->dev);
^1da177e4c3f41 Linus Torvalds         2005-04-16  288  	return retval;
^1da177e4c3f41 Linus Torvalds         2005-04-16  289  
05768918b9a122 Alan Stern             2013-03-28  290  put_hcd:
^1da177e4c3f41 Linus Torvalds         2005-04-16  291  	usb_put_hcd(hcd);
306c54d0edb6ba Andy Shevchenko        2020-07-02  292  free_irq_vectors:
306c54d0edb6ba Andy Shevchenko        2020-07-02  293  	if ((driver->flags & HCD_MASK) < HCD_USB3)
306c54d0edb6ba Andy Shevchenko        2020-07-02  294  		pci_free_irq_vectors(dev);
8766c815607e57 Sarah Sharp            2010-10-15  295  disable_pci:
^1da177e4c3f41 Linus Torvalds         2005-04-16  296  	pci_disable_device(dev);
^1da177e4c3f41 Linus Torvalds         2005-04-16  297  	dev_err(&dev->dev, "init %s fail, %d\n", pci_name(dev), retval);
^1da177e4c3f41 Linus Torvalds         2005-04-16  298  	return retval;
^1da177e4c3f41 Linus Torvalds         2005-04-16  299  }
fd3b9b5ae10e49 Kishon Vijay Abraham I 2021-08-24  300  EXPORT_SYMBOL_GPL(__usb_hcd_pci_probe);
^1da177e4c3f41 Linus Torvalds         2005-04-16  301  
^1da177e4c3f41 Linus Torvalds         2005-04-16  302  

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

  parent reply	other threads:[~2021-08-24 13:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 10:52 [RFC PATCH 0/5] Fix cold plugged USB device on certain PCIe USB cards Kishon Vijay Abraham I
2021-08-24 10:52 ` [RFC PATCH 1/5] usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd() Kishon Vijay Abraham I
2021-08-24 13:06   ` Greg Kroah-Hartman
2021-08-24 15:18     ` Kishon Vijay Abraham I
2021-08-26 11:14       ` Greg Kroah-Hartman
2021-08-24 10:52 ` [RFC PATCH 2/5] usb: core: hcd: Let usb_add_hcd() indicate if roothub has to be registered Kishon Vijay Abraham I
2021-08-24 12:17   ` kernel test robot
2021-08-24 13:08   ` Greg Kroah-Hartman
2021-08-24 13:37   ` kernel test robot
2021-08-24 14:56   ` Alan Stern
2021-08-24 10:53 ` [RFC PATCH 3/5] usb: core: hcd: Add support for registering secondary RH along with primary HCD Kishon Vijay Abraham I
2021-08-24 11:55   ` Mathias Nyman
2021-08-24 10:53 ` [RFC PATCH 4/5] usb: core: hcd-pci: Let usb_hcd_pci_probe() indicate if RH has to be registered Kishon Vijay Abraham I
2021-08-24 13:09   ` Greg Kroah-Hartman
2021-08-24 13:34   ` kernel test robot [this message]
2021-08-24 13:55   ` kernel test robot
2021-08-24 10:53 ` [RFC PATCH 5/5] xhci-pci: Use flag to not register roothub while adding primary HCD Kishon Vijay Abraham I

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=202108242106.eUafeLhC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.