search for: pci_enable_device

Displaying 20 results from an estimated 202 matches for "pci_enable_device".

2017 Nov 21
2
[PATCH v2] drm: don't continue with anything after the GPU couldn't be woken up
...nouveau_drm *drm = nouveau_drm(pci_get_drvdata(pdev)); + int ret; + + pci_set_power_state(pdev, PCI_D0); + /* abort if anything went wrong */ + if (pdev->current_state != PCI_D0) { + NV_ERROR(drm, "couldn't wake up GPU!\n"); + return -EBUSY; + } + pci_restore_state(pdev); + ret = pci_enable_device(pdev); + if (ret) + return ret; + + pci_set_master(pdev); + return 0; +} + int nouveau_pmops_resume(struct device *dev) { @@ -803,12 +824,9 @@ nouveau_pmops_resume(struct device *dev) drm_dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF) return 0; - pci_set_power_state(pdev...
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
When running RISC-V QEMU with the Bochs device attached via PCIe the probe of the Bochs device fails with: [drm:bochs_hw_init] *ERROR* ID mismatch This was introduced by this commit: 7780eb9ce8 bochs: convert to drm_dev_register To fix the error we ensure that pci_enable_device() is called before bochs_load(). Signed-off-by: Alistair Francis <alistair.francis at wdc.com> Reported-by: David Abdurachmanov <david.abdurachmanov at gmail.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_...
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
When running RISC-V QEMU with the Bochs device attached via PCIe the probe of the Bochs device fails with: [drm:bochs_hw_init] *ERROR* ID mismatch This was introduced by this commit: 7780eb9ce8 bochs: convert to drm_dev_register To fix the error we ensure that pci_enable_device() is called before bochs_load(). Signed-off-by: Alistair Francis <alistair.francis at wdc.com> Reported-by: David Abdurachmanov <david.abdurachmanov at gmail.com> --- drivers/gpu/drm/bochs/bochs_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bochs/bochs_...
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
...device attached via PCIe the > > probe of the Bochs device fails with: > > [drm:bochs_hw_init] *ERROR* ID mismatch > > > > This was introduced by this commit: > > 7780eb9ce8 bochs: convert to drm_dev_register > > > > To fix the error we ensure that pci_enable_device() is called before > > bochs_load(). > > > > Signed-off-by: Alistair Francis <alistair.francis at wdc.com> > > Reported-by: David Abdurachmanov <david.abdurachmanov at gmail.com> > > Pushed to drm-misc-fixes. Thanks. Any chance this will make it into 5.0?...
2019 Feb 21
2
[PATCH] drm/bochs: Fix the ID mismatch error
...device attached via PCIe the > > probe of the Bochs device fails with: > > [drm:bochs_hw_init] *ERROR* ID mismatch > > > > This was introduced by this commit: > > 7780eb9ce8 bochs: convert to drm_dev_register > > > > To fix the error we ensure that pci_enable_device() is called before > > bochs_load(). > > > > Signed-off-by: Alistair Francis <alistair.francis at wdc.com> > > Reported-by: David Abdurachmanov <david.abdurachmanov at gmail.com> > > Pushed to drm-misc-fixes. Thanks. Any chance this will make it into 5.0?...
2006 Aug 04
2
Dedicate PCI Devices to DomU?
...m1 it doesn''t load and seems to miss some of pci libraries..I am guessing this is due to stripped down version of DomU build by xen-unstable. This is what it throws! qla2xxx: Unknown symbol fc_attach_transport qla2xxx: Unknown symbol pci_set_consistent_dma_mask qla2xxx: Unknown symbol pci_enable_device qla2xxx: Unknown symbol fc_remote_port_add qla2xxx: Unknown symbol fc_remove_host qla2xxx: Unknown symbol pci_request_regions qla2xxx: Unknown symbol pci_bus_write_config_byte qla2xxx: Unknown symbol fc_remote_port_delete qla2xxx: Unknown symbol pci_bus_read_config_dword qla2xxx: Unknown sym...
2017 Nov 21
0
[PATCH v2] drm: don't continue with anything after the GPU couldn't be woken up
...0) { > + NV_ERROR(drm, "couldn't wake up GPU!\n"); > + return -EBUSY; > + } Looks to me like the more idiomatic way to do this is: ret = pci_set_power_state(pdev, PCI_D0); if (ret < 0 && ret != -EIO) return ret; > + pci_restore_state(pdev); > + ret = pci_enable_device(pdev); > + if (ret) > + return ret; > + > + pci_set_master(pdev); Looking closer it also seems like pci_enable_device() will already set the power state to D0 (via do_pci_enable_device()). Is the sequence above really necessary because the hardware is quirky, or was it cargo-culted?...
2015 Mar 29
1
[PATCH v5 06/10] virtio_pci: drop msi_off on probe
...io_pci_common.c @@ -501,9 +501,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, INIT_LIST_HEAD(&vp_dev->virtqueues); spin_lock_init(&vp_dev->lock); - /* Disable MSI/MSIX to bring device to a known good state. */ - pci_msi_off(pci_dev); - /* enable the device */ rc = pci_enable_device(pci_dev); if (rc) -- MST
2015 Mar 29
1
[PATCH v5 06/10] virtio_pci: drop msi_off on probe
...io_pci_common.c @@ -501,9 +501,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, INIT_LIST_HEAD(&vp_dev->virtqueues); spin_lock_init(&vp_dev->lock); - /* Disable MSI/MSIX to bring device to a known good state. */ - pci_msi_off(pci_dev); - /* enable the device */ rc = pci_enable_device(pci_dev); if (rc) -- MST
2007 Aug 30
4
free_irq_vector on ia64
Hi Alex: I was looking at an ia64 bug report and noticed that we don''t actually free IRQs in the free_irq_vector hypercall. This would eventually lead to alloc_irq_vector failing. Unless I''m mistaken something like calling pci_disable_device and pci_enable_device can lead to this situation. So I''m wondering what the original problem was and how could we resolve it without leaking the IRQ. Any ideas? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor....
2011 Feb 28
12
[RFC PATCH] set current_state to D0 in register_slot
...f a device doesn''t support power management (pm_cap == 0) but it is acpi_pci_power_manageable() because there is a _PS0 method declared for it and _EJ0 is also declared for the slot then nobody is going to set current_state = PCI_D0 for this device. This is what I think it is happening: pci_enable_device | __pci_enable_device_flags /* here we do not set current_state because !pm_cap */ | do_pci_enable_device | pci_set_power_state | __pci_start_power_transition | pci_platform_power_transition /* platform_pci_power_manageable() calls acpi_pci_power_manageable that * returns true...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...AL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) - goto free_dev; + return ret; ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl"); if (ret) @@ -101,7 +104,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev);...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...AL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) - goto free_dev; + return ret; ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl"); if (ret) @@ -101,7 +104,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev);...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...AL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) - goto free_dev; + return ret; ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl"); if (ret) @@ -101,7 +104,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev);...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...AL; /* TODO: ENODEV ? */ } - qdev = kzalloc(sizeof(struct qxl_device), GFP_KERNEL); - if (!qdev) + qdev = devm_drm_dev_alloc(&pdev->dev, &qxl_driver, + struct qxl_device, ddev); + if (IS_ERR(qdev)) { + pr_err("Unable to init drm dev"); return -ENOMEM; + } ret = pci_enable_device(pdev); if (ret) - goto free_dev; + return ret; ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl"); if (ret) @@ -101,7 +104,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } - ret = qxl_device_init(qdev, &qxl_driver, pdev);...
2014 Jul 04
2
How to check for proper MSI support?
...card has no problem. But you didn't answer what's the pci_enable_msi() return during it enable MSI fail. >>> >>> You can check PCI bus whether support MSI like: >>> >>> cat /sys/bus/pci/devices/00:0e.0/msi_bus >>> >>> Other, do you call pci_enable_device() before pci_enable_msi() ? >> >> Yes, the device is enabled. nouveau does generally work for most >> people :) And it works fine here if MSI is forced off. >> >> The problem here is that pci_enable_msi() succeeds, but it probably > > It's some strange, pci_e...
2019 May 07
2
[PATCH 1/5] drm: don't set the pci power state if the pci subsystem handles the ACPI bits
...untime_resume(struct device *dev) > return -EBUSY; > } > > - pci_set_power_state(pdev, PCI_D0); > + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; > + if (drm->runpm_dsm) > + pci_set_power_state(pdev, PCI_D0); > pci_restore_state(pdev); > ret = pci_enable_device(pdev); > if (ret) > diff --git a/drm/nouveau/nouveau_drv.h b/drm/nouveau/nouveau_drv.h > index da847244..941600e9 100644 > --- a/drm/nouveau/nouveau_drv.h > +++ b/drm/nouveau/nouveau_drv.h > @@ -214,6 +214,8 @@ struct nouveau_drm { > struct nouveau_svm *svm; > > s...
2011 Mar 10
2
[PATCH 11/21] Staging: hv: Make vmbus driver a platform pci driver
...el 0x%x (%x,%x)", - vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel)); - /* Todo: it is used for loglevel, to be ported to new kernel. */ + int err; - if (!dmi_check_system(microsoft_hv_dmi_table)) - return -ENODEV; + hv_pci_dev = pdev; - return vmbus_bus_init(); -} + err = pci_enable_device(pdev); + if (err) + return err; -static void __exit vmbus_exit(void) -{ - vmbus_bus_exit(); - /* Todo: it is used for loglevel, to be ported to new kernel. */ + err = vmbus_bus_init(); + if (err) + pci_disable_device(pdev); + + return err; } /* @@ -931,10 +921,29 @@ static const struct pci_...
2011 Mar 10
2
[PATCH 11/21] Staging: hv: Make vmbus driver a platform pci driver
...el 0x%x (%x,%x)", - vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel)); - /* Todo: it is used for loglevel, to be ported to new kernel. */ + int err; - if (!dmi_check_system(microsoft_hv_dmi_table)) - return -ENODEV; + hv_pci_dev = pdev; - return vmbus_bus_init(); -} + err = pci_enable_device(pdev); + if (err) + return err; -static void __exit vmbus_exit(void) -{ - vmbus_bus_exit(); - /* Todo: it is used for loglevel, to be ported to new kernel. */ + err = vmbus_bus_init(); + if (err) + pci_disable_device(pdev); + + return err; } /* @@ -931,10 +921,29 @@ static const struct pci_...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...'re inconsistent here, but some drivers have error logging on all branches, some dont. I'm just trying to go with the prevailing style. > With this fixed: Insisting on this or ok as-is? -Daniel > Acked-by: Sam Ravnborg <sam at ravnborg.org> > > > > > ret = pci_enable_device(pdev); > > if (ret) > > - goto free_dev; > > + return ret; > > > > ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "qxl"); > > if (ret) > > @@ -101,7 +104,7 @@ qxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id...