Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7b91725 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6:
  virtio-pci: disable msi at startup
  virtio: return ENOMEM on out of memory
parents dee70a32 b03214d5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2292,6 +2292,7 @@ void pci_msi_off(struct pci_dev *dev)
		pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
	}
}
EXPORT_SYMBOL_GPL(pci_msi_off);

#ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE
int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size)
+3 −0
Original line number Diff line number Diff line
@@ -636,6 +636,9 @@ static int __devinit 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 */
	err = pci_enable_device(pci_dev);
	if (err)
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ static int vring_add_indirect(struct vring_virtqueue *vq,

	desc = kmalloc((out + in) * sizeof(struct vring_desc), gfp);
	if (!desc)
		return vq->vring.num;
		return -ENOMEM;

	/* Transfer entries from the sg list into the indirect page */
	for (i = 0; i < out; i++) {