tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/msi head: a06fcdc6b3ae3552cdc8c6326bd265e336fae9bf commit: 8c608074113b24ad54477ac8bf8a50edb32efe56 [3/5] PCI/MSI: Move MSI/MSI-X init to msi.c config: i386-randconfig-a006-20201204 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce (this is a W=1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?id=8c608074113b24ad54477ac8bf8a50edb32efe56 git remote add pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git git fetch --no-tags pci pci/msi git checkout 8c608074113b24ad54477ac8bf8a50edb32efe56 # save the attached .config to linux build tree make W=1 ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): ld: arch/x86/kernel/x86_init.o:arch/x86/kernel/x86_init.c:148: undefined reference to `default_restore_msi_irqs' ld: arch/x86/kernel/apic/msi.o:(.data+0xbc): undefined reference to `pci_msi_mask_irq' ld: arch/x86/kernel/apic/msi.o:(.data+0xc4): undefined reference to `pci_msi_unmask_irq' ld: arch/x86/kernel/apic/msi.o: in function `native_create_pci_msi_domain': arch/x86/kernel/apic/msi.c:227: undefined reference to `pci_msi_create_irq_domain' ld: kernel/irq/msi.o: in function `msi_check_reservation_mode': kernel/irq/msi.c:387: undefined reference to `pci_msi_ignore_mask' ld: drivers/pci/probe.o: in function `pci_dev_msi_domain': drivers/pci/probe.c:2429: undefined reference to `pci_msi_get_device_domain' ld: drivers/pci/pci.o: in function `pci_restore_state': drivers/pci/pci.c:1687: undefined reference to `pci_restore_msi_state' ld: drivers/pci/pci.o: in function `pcim_release': drivers/pci/pci.c:1977: undefined reference to `pci_disable_msi' ld: drivers/pci/pci.c:1979: undefined reference to `pci_disable_msix' ld: drivers/pci/pci.o: in function `pci_setup': drivers/pci/pci.c:6500: undefined reference to `pci_no_msi' ld: drivers/pci/irq.o: in function `pci_request_irq': drivers/pci/irq.c:48: undefined reference to `pci_irq_vector' ld: drivers/pci/irq.o: in function `pci_free_irq': drivers/pci/irq.c:72: undefined reference to `pci_irq_vector' ld: drivers/pci/pci-acpi.o: in function `acpi_pci_init': drivers/pci/pci-acpi.c:1351: undefined reference to `pci_no_msi' ld: drivers/pci/quirks.o: in function `quirk_disable_all_msi': drivers/pci/quirks.c:2514: undefined reference to `pci_no_msi' ld: drivers/pci/quirks.o: in function `__nv_msi_ht_cap_quirk': drivers/pci/quirks.c:2904: undefined reference to `pci_msi_enabled' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_msi_unmask_irq': drivers/pci/controller/dwc/pcie-designware-host.c:38: undefined reference to `pci_msi_unmask_irq' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_msi_mask_irq': drivers/pci/controller/dwc/pcie-designware-host.c:32: undefined reference to `pci_msi_mask_irq' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_pcie_allocate_domains': drivers/pci/controller/dwc/pcie-designware-host.c:247: undefined reference to `pci_msi_create_irq_domain' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_pcie_host_init': drivers/pci/controller/dwc/pcie-designware-host.c:360: undefined reference to `pci_msi_enabled' ld: drivers/pci/controller/dwc/pcie-designware-host.c:424: undefined reference to `pci_msi_enabled' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_pcie_host_deinit': drivers/pci/controller/dwc/pcie-designware-host.c:434: undefined reference to `pci_msi_enabled' ld: drivers/pci/controller/dwc/pcie-designware-host.o: in function `dw_pcie_setup_rc': drivers/pci/controller/dwc/pcie-designware-host.c:545: undefined reference to `pci_msi_enabled' ld: drivers/acpi/pci_root.o: in function `negotiate_os_control': drivers/acpi/pci_root.c:441: undefined reference to `pci_msi_enabled' ld: drivers/tty/serial/8250/8250_pci.o: in function `pci_alloc_irq_vectors': include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: drivers/tty/serial/8250/8250_pci.o: in function `pciserial_init_ports': drivers/tty/serial/8250/8250_pci.c:3961: undefined reference to `pci_irq_vector' ld: drivers/tty/serial/8250/8250_exar.o: in function `pci_alloc_irq_vectors': include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: drivers/tty/serial/8250/8250_exar.o: in function `exar_pci_probe': drivers/tty/serial/8250/8250_exar.c:618: undefined reference to `pci_irq_vector' ld: drivers/tty/serial/8250/8250_lpss.o: in function `lpss8250_remove': drivers/tty/serial/8250/8250_lpss.c:352: undefined reference to `pci_free_irq_vectors' ld: drivers/tty/serial/8250/8250_lpss.o: in function `qrk_serial_setup_dma': drivers/tty/serial/8250/8250_lpss.c:186: undefined reference to `pci_irq_vector' ld: drivers/tty/serial/8250/8250_lpss.o: in function `pci_alloc_irq_vectors': include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: drivers/tty/serial/8250/8250_lpss.o: in function `lpss8250_probe': drivers/tty/serial/8250/8250_lpss.c:305: undefined reference to `pci_irq_vector' ld: drivers/tty/serial/8250/8250_lpss.c:340: undefined reference to `pci_free_irq_vectors' ld: drivers/tty/serial/8250/8250_mid.o: in function `pci_alloc_irq_vectors': include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: drivers/tty/serial/8250/8250_mid.o: in function `dnv_setup': drivers/tty/serial/8250/8250_mid.c:171: undefined reference to `pci_irq_vector' ld: drivers/tty/serial/8250/8250_mid.c:174: undefined reference to `pci_irq_vector' ld: drivers/misc/mei/pci-me.o: in function `mei_me_pci_suspend': >> drivers/misc/mei/pci-me.c:354: undefined reference to `pci_disable_msi' ld: drivers/misc/mei/pci-me.o: in function `mei_me_probe': >> drivers/misc/mei/pci-me.c:211: undefined reference to `pci_enable_msi' ld: drivers/misc/mei/pci-me.o: in function `mei_me_pci_resume': drivers/misc/mei/pci-me.c:370: undefined reference to `pci_enable_msi' ld: drivers/misc/mei/pci-txe.o: in function `mei_txe_pci_suspend': drivers/misc/mei/pci-txe.c:231: undefined reference to `pci_disable_msi' ld: drivers/misc/mei/pci-txe.o: in function `mei_txe_probe': drivers/misc/mei/pci-txe.c:90: undefined reference to `pci_enable_msi' ld: drivers/misc/mei/pci-txe.o: in function `mei_txe_pci_resume': drivers/misc/mei/pci-txe.c:246: undefined reference to `pci_enable_msi' ld: drivers/thunderbolt/nhi.o: in function `ring_request_msix': drivers/thunderbolt/nhi.c:409: undefined reference to `pci_irq_vector' ld: drivers/thunderbolt/nhi.o: in function `pci_alloc_irq_vectors': include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: include/linux/pci.h:1803: undefined reference to `pci_alloc_irq_vectors_affinity' ld: drivers/thunderbolt/nhi.o: in function `nhi_init_msi': drivers/thunderbolt/nhi.c:1064: undefined reference to `pci_irq_vector' vim +354 drivers/misc/mei/pci-me.c c919951d940f28 Tomas Winkler 2014-05-13 149 2703d4b2e673cc Tomas Winkler 2013-02-06 150 /** ce23139c6c2ee9 Alexander Usyskin 2014-09-29 151 * mei_me_probe - Device Initialization Routine 2703d4b2e673cc Tomas Winkler 2013-02-06 152 * 2703d4b2e673cc Tomas Winkler 2013-02-06 153 * @pdev: PCI device structure 2703d4b2e673cc Tomas Winkler 2013-02-06 154 * @ent: entry in kcs_pci_tbl 2703d4b2e673cc Tomas Winkler 2013-02-06 155 * a8605ea2c20c2b Alexander Usyskin 2014-09-29 156 * Return: 0 on success, <0 on failure. 2703d4b2e673cc Tomas Winkler 2013-02-06 157 */ b68301e9acd30f Tomas Winkler 2013-03-27 158 static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 2703d4b2e673cc Tomas Winkler 2013-02-06 159 { f5ac3c49ff0b36 Tomas Winkler 2017-06-14 160 const struct mei_cfg *cfg; 2703d4b2e673cc Tomas Winkler 2013-02-06 161 struct mei_device *dev; 52c34561415b42 Tomas Winkler 2013-02-06 162 struct mei_me_hw *hw; 1fa55b4e0e161b Alexander Usyskin 2015-08-02 163 unsigned int irqflags; 2703d4b2e673cc Tomas Winkler 2013-02-06 164 int err; 2703d4b2e673cc Tomas Winkler 2013-02-06 165 f5ac3c49ff0b36 Tomas Winkler 2017-06-14 166 cfg = mei_me_get_cfg(ent->driver_data); f5ac3c49ff0b36 Tomas Winkler 2017-06-14 167 if (!cfg) f5ac3c49ff0b36 Tomas Winkler 2017-06-14 168 return -ENODEV; 2703d4b2e673cc Tomas Winkler 2013-02-06 169 c919951d940f28 Tomas Winkler 2014-05-13 170 if (!mei_me_quirk_probe(pdev, cfg)) c919951d940f28 Tomas Winkler 2014-05-13 171 return -ENODEV; 2703d4b2e673cc Tomas Winkler 2013-02-06 172 2703d4b2e673cc Tomas Winkler 2013-02-06 173 /* enable pci dev */ f8a096059fc5f7 Tomas Winkler 2017-01-26 174 err = pcim_enable_device(pdev); 2703d4b2e673cc Tomas Winkler 2013-02-06 175 if (err) { 2703d4b2e673cc Tomas Winkler 2013-02-06 176 dev_err(&pdev->dev, "failed to enable pci device.\n"); 2703d4b2e673cc Tomas Winkler 2013-02-06 177 goto end; 2703d4b2e673cc Tomas Winkler 2013-02-06 178 } 2703d4b2e673cc Tomas Winkler 2013-02-06 179 /* set PCI host mastering */ 2703d4b2e673cc Tomas Winkler 2013-02-06 180 pci_set_master(pdev); f8a096059fc5f7 Tomas Winkler 2017-01-26 181 /* pci request regions and mapping IO device memory for mei driver */ f8a096059fc5f7 Tomas Winkler 2017-01-26 182 err = pcim_iomap_regions(pdev, BIT(0), KBUILD_MODNAME); 2703d4b2e673cc Tomas Winkler 2013-02-06 183 if (err) { 2703d4b2e673cc Tomas Winkler 2013-02-06 184 dev_err(&pdev->dev, "failed to get pci regions.\n"); f8a096059fc5f7 Tomas Winkler 2017-01-26 185 goto end; 2703d4b2e673cc Tomas Winkler 2013-02-06 186 } 3ecfb168a51ddf Tomas Winkler 2013-12-17 187 3ecfb168a51ddf Tomas Winkler 2013-12-17 188 if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) || 3ecfb168a51ddf Tomas Winkler 2013-12-17 189 dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { 3ecfb168a51ddf Tomas Winkler 2013-12-17 190 3ecfb168a51ddf Tomas Winkler 2013-12-17 191 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); 3ecfb168a51ddf Tomas Winkler 2013-12-17 192 if (err) 3ecfb168a51ddf Tomas Winkler 2013-12-17 193 err = dma_set_coherent_mask(&pdev->dev, 3ecfb168a51ddf Tomas Winkler 2013-12-17 194 DMA_BIT_MASK(32)); 3ecfb168a51ddf Tomas Winkler 2013-12-17 195 } 3ecfb168a51ddf Tomas Winkler 2013-12-17 196 if (err) { 3ecfb168a51ddf Tomas Winkler 2013-12-17 197 dev_err(&pdev->dev, "No usable DMA configuration, aborting\n"); f8a096059fc5f7 Tomas Winkler 2017-01-26 198 goto end; 3ecfb168a51ddf Tomas Winkler 2013-12-17 199 } 3ecfb168a51ddf Tomas Winkler 2013-12-17 200 2703d4b2e673cc Tomas Winkler 2013-02-06 201 /* allocates and initializes the mei dev structure */ 907b471ca228a5 Tomas Winkler 2019-11-07 202 dev = mei_me_dev_init(&pdev->dev, cfg); 2703d4b2e673cc Tomas Winkler 2013-02-06 203 if (!dev) { 2703d4b2e673cc Tomas Winkler 2013-02-06 204 err = -ENOMEM; f8a096059fc5f7 Tomas Winkler 2017-01-26 205 goto end; 2703d4b2e673cc Tomas Winkler 2013-02-06 206 } 52c34561415b42 Tomas Winkler 2013-02-06 207 hw = to_me_hw(dev); f8a096059fc5f7 Tomas Winkler 2017-01-26 208 hw->mem_addr = pcim_iomap_table(pdev)[0]; 261e071acd9bcb Tomas Winkler 2019-11-07 209 hw->read_fws = mei_me_read_fws; f8a096059fc5f7 Tomas Winkler 2017-01-26 210 2703d4b2e673cc Tomas Winkler 2013-02-06 @211 pci_enable_msi(pdev); 2703d4b2e673cc Tomas Winkler 2013-02-06 212 fec874a81b3ec2 Benjamin Lee 2020-04-17 213 hw->irq = pdev->irq; fec874a81b3ec2 Benjamin Lee 2020-04-17 214 2703d4b2e673cc Tomas Winkler 2013-02-06 215 /* request and enable interrupt */ 1fa55b4e0e161b Alexander Usyskin 2015-08-02 216 irqflags = pci_dev_msi_enabled(pdev) ? IRQF_ONESHOT : IRQF_SHARED; 1fa55b4e0e161b Alexander Usyskin 2015-08-02 217 2703d4b2e673cc Tomas Winkler 2013-02-06 218 err = request_threaded_irq(pdev->irq, 06ecd645980096 Tomas Winkler 2013-02-06 219 mei_me_irq_quick_handler, 06ecd645980096 Tomas Winkler 2013-02-06 220 mei_me_irq_thread_handler, 1fa55b4e0e161b Alexander Usyskin 2015-08-02 221 irqflags, KBUILD_MODNAME, dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 222 if (err) { 2703d4b2e673cc Tomas Winkler 2013-02-06 223 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", 2703d4b2e673cc Tomas Winkler 2013-02-06 224 pdev->irq); f8a096059fc5f7 Tomas Winkler 2017-01-26 225 goto end; 2703d4b2e673cc Tomas Winkler 2013-02-06 226 } 2703d4b2e673cc Tomas Winkler 2013-02-06 227 c4d589be4405d4 Tomas Winkler 2013-03-27 228 if (mei_start(dev)) { 2703d4b2e673cc Tomas Winkler 2013-02-06 229 dev_err(&pdev->dev, "init hw failure.\n"); 2703d4b2e673cc Tomas Winkler 2013-02-06 230 err = -ENODEV; 2703d4b2e673cc Tomas Winkler 2013-02-06 231 goto release_irq; 2703d4b2e673cc Tomas Winkler 2013-02-06 232 } 2703d4b2e673cc Tomas Winkler 2013-02-06 233 180ea05bcedbd6 Tomas Winkler 2014-03-18 234 pm_runtime_set_autosuspend_delay(&pdev->dev, MEI_ME_RPM_TIMEOUT); 180ea05bcedbd6 Tomas Winkler 2014-03-18 235 pm_runtime_use_autosuspend(&pdev->dev); 180ea05bcedbd6 Tomas Winkler 2014-03-18 236 f3d8e8788b4efb Alexander Usyskin 2014-06-23 237 err = mei_register(dev, &pdev->dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 238 if (err) 1f7e489a285c8b Alexander Usyskin 2016-02-07 239 goto stop; 2703d4b2e673cc Tomas Winkler 2013-02-06 240 2703d4b2e673cc Tomas Winkler 2013-02-06 241 pci_set_drvdata(pdev, dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 242 557909e195aea2 Alexander Usyskin 2017-08-03 243 /* 557909e195aea2 Alexander Usyskin 2017-08-03 244 * MEI requires to resume from runtime suspend mode 557909e195aea2 Alexander Usyskin 2017-08-03 245 * in order to perform link reset flow upon system suspend. 557909e195aea2 Alexander Usyskin 2017-08-03 246 */ e07515563d010d Rafael J. Wysocki 2020-04-18 247 dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE); 557909e195aea2 Alexander Usyskin 2017-08-03 248 e13fa90ce42d8e Tomas Winkler 2014-03-18 249 /* b42dc0635bf0a6 Alexander Usyskin 2017-09-26 250 * ME maps runtime suspend/resume to D0i states, b42dc0635bf0a6 Alexander Usyskin 2017-09-26 251 * hence we need to go around native PCI runtime service which b42dc0635bf0a6 Alexander Usyskin 2017-09-26 252 * eventually brings the device into D3cold/hot state, b42dc0635bf0a6 Alexander Usyskin 2017-09-26 253 * but the mei device cannot wake up from D3 unlike from D0i3. b42dc0635bf0a6 Alexander Usyskin 2017-09-26 254 * To get around the PCI device native runtime pm, b42dc0635bf0a6 Alexander Usyskin 2017-09-26 255 * ME uses runtime pm domain handlers which take precedence b42dc0635bf0a6 Alexander Usyskin 2017-09-26 256 * over the driver's pm handlers. e13fa90ce42d8e Tomas Winkler 2014-03-18 257 */ e13fa90ce42d8e Tomas Winkler 2014-03-18 258 mei_me_set_pm_domain(dev); e13fa90ce42d8e Tomas Winkler 2014-03-18 259 cc365dcf0e5627 Tomas Winkler 2018-01-02 260 if (mei_pg_is_enabled(dev)) { 180ea05bcedbd6 Tomas Winkler 2014-03-18 261 pm_runtime_put_noidle(&pdev->dev); cc365dcf0e5627 Tomas Winkler 2018-01-02 262 if (hw->d0i3_supported) cc365dcf0e5627 Tomas Winkler 2018-01-02 263 pm_runtime_allow(&pdev->dev); cc365dcf0e5627 Tomas Winkler 2018-01-02 264 } 180ea05bcedbd6 Tomas Winkler 2014-03-18 265 c4e87b525936da Alexander Usyskin 2013-10-21 266 dev_dbg(&pdev->dev, "initialization successful.\n"); 2703d4b2e673cc Tomas Winkler 2013-02-06 267 2703d4b2e673cc Tomas Winkler 2013-02-06 268 return 0; 2703d4b2e673cc Tomas Winkler 2013-02-06 269 1f7e489a285c8b Alexander Usyskin 2016-02-07 270 stop: 1f7e489a285c8b Alexander Usyskin 2016-02-07 271 mei_stop(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 272 release_irq: dc844b0d99b853 Tomas Winkler 2013-11-11 273 mei_cancel_work(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 274 mei_disable_interrupts(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 275 free_irq(pdev->irq, dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 276 end: 2703d4b2e673cc Tomas Winkler 2013-02-06 277 dev_err(&pdev->dev, "initialization failed.\n"); 2703d4b2e673cc Tomas Winkler 2013-02-06 278 return err; 2703d4b2e673cc Tomas Winkler 2013-02-06 279 } 2703d4b2e673cc Tomas Winkler 2013-02-06 280 5c4c0106e94493 Tomas Winkler 2017-03-20 281 /** 5c4c0106e94493 Tomas Winkler 2017-03-20 282 * mei_me_shutdown - Device Removal Routine 5c4c0106e94493 Tomas Winkler 2017-03-20 283 * 5c4c0106e94493 Tomas Winkler 2017-03-20 284 * @pdev: PCI device structure 5c4c0106e94493 Tomas Winkler 2017-03-20 285 * 5c4c0106e94493 Tomas Winkler 2017-03-20 286 * mei_me_shutdown is called from the reboot notifier 5c4c0106e94493 Tomas Winkler 2017-03-20 287 * it's a simplified version of remove so we go down 5c4c0106e94493 Tomas Winkler 2017-03-20 288 * faster. 5c4c0106e94493 Tomas Winkler 2017-03-20 289 */ 5c4c0106e94493 Tomas Winkler 2017-03-20 290 static void mei_me_shutdown(struct pci_dev *pdev) 5c4c0106e94493 Tomas Winkler 2017-03-20 291 { 5c4c0106e94493 Tomas Winkler 2017-03-20 292 struct mei_device *dev; 5c4c0106e94493 Tomas Winkler 2017-03-20 293 5c4c0106e94493 Tomas Winkler 2017-03-20 294 dev = pci_get_drvdata(pdev); 5c4c0106e94493 Tomas Winkler 2017-03-20 295 if (!dev) 5c4c0106e94493 Tomas Winkler 2017-03-20 296 return; 5c4c0106e94493 Tomas Winkler 2017-03-20 297 5c4c0106e94493 Tomas Winkler 2017-03-20 298 dev_dbg(&pdev->dev, "shutdown\n"); 5c4c0106e94493 Tomas Winkler 2017-03-20 299 mei_stop(dev); 5c4c0106e94493 Tomas Winkler 2017-03-20 300 5c4c0106e94493 Tomas Winkler 2017-03-20 301 mei_me_unset_pm_domain(dev); 5c4c0106e94493 Tomas Winkler 2017-03-20 302 5c4c0106e94493 Tomas Winkler 2017-03-20 303 mei_disable_interrupts(dev); 5c4c0106e94493 Tomas Winkler 2017-03-20 304 free_irq(pdev->irq, dev); 5c4c0106e94493 Tomas Winkler 2017-03-20 305 } 5c4c0106e94493 Tomas Winkler 2017-03-20 306 2703d4b2e673cc Tomas Winkler 2013-02-06 307 /** ce23139c6c2ee9 Alexander Usyskin 2014-09-29 308 * mei_me_remove - Device Removal Routine 2703d4b2e673cc Tomas Winkler 2013-02-06 309 * 2703d4b2e673cc Tomas Winkler 2013-02-06 310 * @pdev: PCI device structure 2703d4b2e673cc Tomas Winkler 2013-02-06 311 * 5c4c0106e94493 Tomas Winkler 2017-03-20 312 * mei_me_remove is called by the PCI subsystem to alert the driver 2703d4b2e673cc Tomas Winkler 2013-02-06 313 * that it should release a PCI device. 2703d4b2e673cc Tomas Winkler 2013-02-06 314 */ b68301e9acd30f Tomas Winkler 2013-03-27 315 static void mei_me_remove(struct pci_dev *pdev) 2703d4b2e673cc Tomas Winkler 2013-02-06 316 { 2703d4b2e673cc Tomas Winkler 2013-02-06 317 struct mei_device *dev; 2703d4b2e673cc Tomas Winkler 2013-02-06 318 2703d4b2e673cc Tomas Winkler 2013-02-06 319 dev = pci_get_drvdata(pdev); 2703d4b2e673cc Tomas Winkler 2013-02-06 320 if (!dev) 2703d4b2e673cc Tomas Winkler 2013-02-06 321 return; 2703d4b2e673cc Tomas Winkler 2013-02-06 322 180ea05bcedbd6 Tomas Winkler 2014-03-18 323 if (mei_pg_is_enabled(dev)) 180ea05bcedbd6 Tomas Winkler 2014-03-18 324 pm_runtime_get_noresume(&pdev->dev); 180ea05bcedbd6 Tomas Winkler 2014-03-18 325 ed6f7ac1dcae0b Paul Bolle 2013-10-17 326 dev_dbg(&pdev->dev, "stop\n"); 7cb035d9e619a8 Tomas Winkler 2013-03-10 327 mei_stop(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 328 e13fa90ce42d8e Tomas Winkler 2014-03-18 329 mei_me_unset_pm_domain(dev); e13fa90ce42d8e Tomas Winkler 2014-03-18 330 2703d4b2e673cc Tomas Winkler 2013-02-06 331 mei_disable_interrupts(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 332 2703d4b2e673cc Tomas Winkler 2013-02-06 333 free_irq(pdev->irq, dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 334 30e53bb8ffb1f3 Tomas Winkler 2013-04-05 335 mei_deregister(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 336 } f8a096059fc5f7 Tomas Winkler 2017-01-26 337 16833257a1ee9f Alexander Usyskin 2014-02-18 338 #ifdef CONFIG_PM_SLEEP b68301e9acd30f Tomas Winkler 2013-03-27 339 static int mei_me_pci_suspend(struct device *device) 2703d4b2e673cc Tomas Winkler 2013-02-06 340 { 2703d4b2e673cc Tomas Winkler 2013-02-06 341 struct pci_dev *pdev = to_pci_dev(device); 2703d4b2e673cc Tomas Winkler 2013-02-06 342 struct mei_device *dev = pci_get_drvdata(pdev); 2703d4b2e673cc Tomas Winkler 2013-02-06 343 2703d4b2e673cc Tomas Winkler 2013-02-06 344 if (!dev) 2703d4b2e673cc Tomas Winkler 2013-02-06 345 return -ENODEV; 2703d4b2e673cc Tomas Winkler 2013-02-06 346 ed6f7ac1dcae0b Paul Bolle 2013-10-17 347 dev_dbg(&pdev->dev, "suspend\n"); 2703d4b2e673cc Tomas Winkler 2013-02-06 348 7cb035d9e619a8 Tomas Winkler 2013-03-10 349 mei_stop(dev); 7cb035d9e619a8 Tomas Winkler 2013-03-10 350 7cb035d9e619a8 Tomas Winkler 2013-03-10 351 mei_disable_interrupts(dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 352 2703d4b2e673cc Tomas Winkler 2013-02-06 353 free_irq(pdev->irq, dev); 2703d4b2e673cc Tomas Winkler 2013-02-06 @354 pci_disable_msi(pdev); 2703d4b2e673cc Tomas Winkler 2013-02-06 355 7cb035d9e619a8 Tomas Winkler 2013-03-10 356 return 0; 2703d4b2e673cc Tomas Winkler 2013-02-06 357 } 2703d4b2e673cc Tomas Winkler 2013-02-06 358 :::::: The code at line 354 was first introduced by commit :::::: 2703d4b2e673cc240ad06d79d131fd1d0f77d65d mei: sperate interface and pci code into two files :::::: TO: Tomas Winkler <tomas.winkler@xxxxxxxxx> :::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip