Displaying 2 results from an estimated 2 matches for "virtio_pci_config_len".
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...{
err = -ENOMEM;
goto out_info;
@@ -390,11 +328,25 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
vp_dev->vdev.id.vendor = pci_dev->subsystem_vendor;
vp_dev->vdev.id.device = pci_dev->subsystem_device;
+ vp_dev->config_len = ioread32(vp_dev->ioaddr + VIRTIO_PCI_CONFIG_LEN);
+ if (vp_dev->config_len) {
+ /* round up to nearest page size to ensure proper alignment */
+ vp_dev->config = kzalloc(PAGE_ALIGN(vp_dev->config_len),
+ GFP_KERNEL);
+ if (vp_dev->config == NULL)
+ goto out_set_drvdata;
+
+ /* tell the host about our config space */
+ iow...
2007 Nov 10
2
[PATCH] Change virtio_pci to use a shared memory area for config
...{
err = -ENOMEM;
goto out_info;
@@ -390,11 +328,25 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
vp_dev->vdev.id.vendor = pci_dev->subsystem_vendor;
vp_dev->vdev.id.device = pci_dev->subsystem_device;
+ vp_dev->config_len = ioread32(vp_dev->ioaddr + VIRTIO_PCI_CONFIG_LEN);
+ if (vp_dev->config_len) {
+ /* round up to nearest page size to ensure proper alignment */
+ vp_dev->config = kzalloc(PAGE_ALIGN(vp_dev->config_len),
+ GFP_KERNEL);
+ if (vp_dev->config == NULL)
+ goto out_set_drvdata;
+
+ /* tell the host about our config space */
+ iow...