* Re: [PATCH 04/22] usb: host: ehci-omap: deny IRQ0
[not found] <20211018183930.8448-5-s.shtylyov@omp.ru>
@ 2021-10-21 6:28 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-10-21 6:28 UTC (permalink / raw)
To: Sergey Shtylyov, linux-usb, Alan Stern, Greg Kroah-Hartman
Cc: llvm, kbuild-all, linux-omap
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-21 6:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20211018183930.8448-5-s.shtylyov@omp.ru>
2021-10-21 6:28 ` [PATCH 04/22] usb: host: ehci-omap: deny IRQ0 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox