Displaying 20 results from an estimated 49 matches for "hdr_type".
2019 Jul 08
2
[PATCH v2] PCI: Expose hidden NVIDIA HDA controllers
...uirk_gpu_hda);
+/*
+ * Many laptop BIOSes hide the integrated HDA controller on NVIDIA GPUs
+ * via a special bit. This prevents Linux from seeing and using it.
+ * Unhide it here.
+ * https://devtalk.nvidia.com/default/topic/1024022
+ */
+static void quirk_nvidia_hda(struct pci_dev *gpu)
+{
+ u8 hdr_type;
+ u32 val;
+
+ /* there was no integrated HDA controller before MCP89 */
+ if (gpu->device < PCI_DEVICE_ID_NVIDIA_GEFORCE_320M)
+ return;
+
+ /* bit 25 at offset 0x488 hides or exposes the HDA controller */
+ pci_read_config_dword(gpu, 0x488, &val);
+ pci_write_config_dword(gpu, 0x488,...
2004 Oct 29
9
xen and pci
hello,
I''m running XEN 2.0 on IBM ThinkPad T23.
Now the weird thing is that I get two different outputs from /sbin/lspci
depending on whether I run 2.6.8.1-xen0 or 2.6.8.1-bproc.
In particular the output from 2.6.8.1-xen0 seems to be missing those 4
lines
0000:00:01.0 PCI bridge: Intel Corp. 82830 830 Chipset AGP Bridge (rev 02)
0000:00:1e.0 PCI bridge: Intel Corp. 82801BAM/CAM PCI
2018 Sep 13
4
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...try,
+ bool force)
{
int index;
for (index = end; index >= start; index--)
pci_restore_config_dword(pdev, 4 * index,
pdev->saved_config_space[index],
- retry);
+ retry, force);
}
static void pci_restore_config_space(struct pci_dev *pdev)
{
if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
- pci_restore_config_space_range(pdev, 10, 15, 0);
+ pci_restore_config_space_range(pdev, 10, 15, 0, false);
/* Restore BARs before the command register. */
- pci_restore_config_space_range(pdev, 4, 9, 10);
- pci_restore_config_space_range(pdev, 0, 3, 0);
+ pci_...
2019 Jul 31
3
[PATCH] Revert "PCI: Enable NVIDIA HDA controllers"
...IDIA, PCI_ANY_ID,
PCI_CLASS_SERIAL_UNKNOWN, 8,
quirk_gpu_usb_typec_ucsi);
-/*
- * Enable the NVIDIA GPU integrated HDA controller if the BIOS left it
- * disabled. https://devtalk.nvidia.com/default/topic/1024022
- */
-static void quirk_nvidia_hda(struct pci_dev *gpu)
-{
- u8 hdr_type;
- u32 val;
-
- /* There was no integrated HDA controller before MCP89 */
- if (gpu->device < PCI_DEVICE_ID_NVIDIA_GEFORCE_320M)
- return;
-
- /* Bit 25 at offset 0x488 enables the HDA controller */
- pci_read_config_dword(gpu, 0x488, &val);
- if (val & BIT(25))
- return;
-
- pci_in...
2019 Jun 13
5
[PATCH] PCI: Expose hidden NVIDIA HDA controllers
...uirk_gpu_hda);
+/*
+ * Many laptop BIOSes hide the integrated HDA controller on NVIDIA GPUs
+ * via a special bit. This prevents Linux from seeing and using it.
+ * Unhide it here.
+ * https://devtalk.nvidia.com/default/topic/1024022
+ */
+static void quirk_nvidia_hda(struct pci_dev *gpu)
+{
+ u8 hdr_type;
+ u32 val;
+
+ /* there was no integrated HDA controller before MCP89 */
+ if (gpu->device < PCI_DEVICE_ID_NVIDIA_GEFORCE_320M)
+ return;
+
+ /* bit 25 at offset 0x488 hides or exposes the HDA controller */
+ pci_read_config_dword(gpu, 0x488, &val);
+ pci_write_config_dword(gpu, 0x488,...
2019 Jul 10
0
[PATCH v2] PCI: Expose hidden NVIDIA HDA controllers
...ions:
- Don't write the enable bit if it's already set.
- Log a note when enabling the HDA. I don't like writing
undocumented config bits in *every* current and future NVIDIA GPU,
so the note is just a hint that we're doing something slightly
risky.
- Use "hdr_type & 0x80" to match the other places we set
pdev->multifunction.
- Remove the commit log parts that don't seem relevant for future
maintenance and add the URL to the original posting.
Let me know if I broke anything.
commit b678f90a1a6f
Author: Lukas Wunner <lukas at wu...
2018 Sep 12
3
[PATCH v2] PCI: Reprogram bridge prefetch registers on resume
...try,
+ bool force)
{
int index;
for (index = end; index >= start; index--)
pci_restore_config_dword(pdev, 4 * index,
pdev->saved_config_space[index],
- retry);
+ retry, force);
}
static void pci_restore_config_space(struct pci_dev *pdev)
{
if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
- pci_restore_config_space_range(pdev, 10, 15, 0);
+ pci_restore_config_space_range(pdev, 10, 15, 0, false);
/* Restore BARs before the command register. */
- pci_restore_config_space_range(pdev, 4, 9, 10);
- pci_restore_config_space_range(pdev, 0, 3, 0);
+ pci_...
2019 Jun 13
0
[PATCH] PCI: Expose hidden NVIDIA HDA controllers
...p BIOSes hide the integrated HDA controller on NVIDIA GPUs
> + * via a special bit. This prevents Linux from seeing and using it.
> + * Unhide it here.
> + * https://devtalk.nvidia.com/default/topic/1024022
> + */
> +static void quirk_nvidia_hda(struct pci_dev *gpu)
> +{
> + u8 hdr_type;
> + u32 val;
> +
> + /* there was no integrated HDA controller before MCP89 */
> + if (gpu->device < PCI_DEVICE_ID_NVIDIA_GEFORCE_320M)
> + return;
> +
> + /* bit 25 at offset 0x488 hides or exposes the HDA controller */
> + pci_read_config_dword(gpu, 0x488, &val...
2019 Jun 13
0
[PATCH] PCI: Expose hidden NVIDIA HDA controllers
...es hide the integrated HDA controller on NVIDIA GPUs
> + * via a special bit. This prevents Linux from seeing and using it.
> + * Unhide it here.
> + * https://devtalk.nvidia.com/default/topic/1024022
> + */
> +static void quirk_nvidia_hda(struct pci_dev *gpu)
> +{
> + u8 hdr_type;
> + u32 val;
> +
> + /* there was no integrated HDA controller before MCP89 */
> + if (gpu->device < PCI_DEVICE_ID_NVIDIA_GEFORCE_320M)
> + return;
> +
> + /* bit 25 at offset 0x488 hides or exposes the HDA controller */
> +...
2018 Sep 27
2
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...)
> > pci_restore_config_dword(pdev, 4 * index,
> > pdev->saved_config_space[index],
> > - retry);
> > + retry, force);
> > }
> >
> > static void pci_restore_config_space(struct pci_dev *pdev)
> > {
> > if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
> > - pci_restore_config_space_range(pdev, 10, 15, 0);
> > + pci_restore_config_space_range(pdev, 10, 15, 0, false);
> > /* Restore BARs before the command register. */
> > - pci_restore_config_space_range(pdev, 4, 9, 10);
> > - pci_...
2008 Oct 08
8
[PATCH] dom0 linux: Reassign memory resources to device for pci passthrough.
...n_resources", set_reassign_resources);
+
/* This quirk function enables us to force all memory resources which are
* assigned to PCI devices, to be page-aligned.
*/
@@ -41,6 +54,42 @@
int i;
struct resource *r;
resource_size_t old_start;
+
+ if (reassign_resources) {
+ if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
+ (dev->class >> 8) == PCI_CLASS_BRIDGE_HOST) {
+ /* PCI Host Bridge isn''t a target device */
+ return;
+ }
+ if (is_reassigndev(dev)) {
+ printk(KERN_INFO
+ "PCI: Disable device and release resources"
+ " [%s...
2018 Sep 13
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...pdev->saved_config_space[index],
> - retry);
> + retry, force);
> }
>
> static void pci_restore_config_space(struct pci_dev *pdev)
> {
> if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
> - pci_restore_config_space_range(pdev, 10, 15, 0);
> + pci_restore_config_space_range(pdev, 10, 15, 0, false);
> /* Restore BARs before the command register. */
> - pci_restore_config_space_range(pd...
2018 Sep 18
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...for (index = end; index >= start; index--)
> pci_restore_config_dword(pdev, 4 * index,
> pdev->saved_config_space[index],
> - retry);
> + retry, force);
> }
>
> static void pci_restore_config_space(struct pci_dev *pdev)
> {
> if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
> - pci_restore_config_space_range(pdev, 10, 15, 0);
> + pci_restore_config_space_range(pdev, 10, 15, 0, false);
> /* Restore BARs before the command register. */
> - pci_restore_config_space_range(pdev, 4, 9, 10);
> - pci_restore_config_space_rang...
2018 Sep 12
0
[PATCH v2] PCI: Reprogram bridge prefetch registers on resume
...pdev->saved_config_space[index],
> - retry);
> + retry, force);
> }
>
> static void pci_restore_config_space(struct pci_dev *pdev)
> {
> if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
> - pci_restore_config_space_range(pdev, 10, 15, 0);
> + pci_restore_config_space_range(pdev, 10, 15, 0, false);
> /* Restore BARs before the command register. */
> - pci_restore_config_space_range(pd...
2018 Sep 29
0
[PATCH v3] PCI: Reprogram bridge prefetch registers on resume
...fig_dword(pdev, 4 * index,
>>> pdev->saved_config_space[index],
>>> - retry);
>>> + retry, force);
>>> }
>>>
>>> static void pci_restore_config_space(struct pci_dev *pdev)
>>> {
>>> if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
>>> - pci_restore_config_space_range(pdev, 10, 15, 0);
>>> + pci_restore_config_space_range(pdev, 10, 15, 0, false);
>>> /* Restore BARs before the command register. */
>>> - pci_restore_config_space_range(pdev, 4, 9, 10);
>...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...hink if
> there's another way to avoid adding the is_noiommu function. Thanks,
I think something like this would do it.
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -1214,6 +1214,22 @@ static int vfio_pci_probe(struct pci_dev *pdev, const str
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL)
return -EINVAL;
+ /*
+ * Filter out virtio devices that do not honor the iommu,
+ * but only for real iommu groups.
+ */
+ if (vfio_pci_is_virtio(pdev)) {
+ struct iommu_group *tmp = iommu_group_get(&pde...
2016 Aug 30
2
[PATCH v2 2/2] vfio: add virtio pci quirk
...hink if
> there's another way to avoid adding the is_noiommu function. Thanks,
I think something like this would do it.
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -1214,6 +1214,22 @@ static int vfio_pci_probe(struct pci_dev *pdev, const str
if (pdev->hdr_type != PCI_HEADER_TYPE_NORMAL)
return -EINVAL;
+ /*
+ * Filter out virtio devices that do not honor the iommu,
+ * but only for real iommu groups.
+ */
+ if (vfio_pci_is_virtio(pdev)) {
+ struct iommu_group *tmp = iommu_group_get(&pde...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...t cpcihp_generic_init(void)
bus = pci_find_bus(0, bridge_busnr);
if (!bus) {
- err("Invalid bus number %d", bridge_busnr);
+ pr_err("Invalid bus number %d\n", bridge_busnr);
return -EINVAL;
}
dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0));
if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
- err("Invalid bridge device %s", bridge);
+ pr_err("Invalid bridge device %s\n", bridge);
pci_dev_put(dev);
return -EINVAL;
}
@@ -174,30 +172,30 @@ static int __init cpcihp_generic_init(void)
status = cpci_hp_register_controller(&g...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...t cpcihp_generic_init(void)
bus = pci_find_bus(0, bridge_busnr);
if (!bus) {
- err("Invalid bus number %d", bridge_busnr);
+ pr_err("Invalid bus number %d\n", bridge_busnr);
return -EINVAL;
}
dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0));
if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
- err("Invalid bridge device %s", bridge);
+ pr_err("Invalid bridge device %s\n", bridge);
pci_dev_put(dev);
return -EINVAL;
}
@@ -174,30 +172,30 @@ static int __init cpcihp_generic_init(void)
status = cpci_hp_register_controller(&g...
2011 Jun 02
0
[PATCH] pci: Use pr_<level> and pr_fmt
...t cpcihp_generic_init(void)
bus = pci_find_bus(0, bridge_busnr);
if (!bus) {
- err("Invalid bus number %d", bridge_busnr);
+ pr_err("Invalid bus number %d\n", bridge_busnr);
return -EINVAL;
}
dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0));
if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) {
- err("Invalid bridge device %s", bridge);
+ pr_err("Invalid bridge device %s\n", bridge);
pci_dev_put(dev);
return -EINVAL;
}
@@ -174,30 +172,30 @@ static int __init cpcihp_generic_init(void)
status = cpci_hp_register_controller(&g...