Re: [PATCH] device-assignment: register a reset function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 16.09.2010 17:48, schrieb ext Alex Williamson:
+static void reset_assigned_device(void *opaque)
>  +{
>  +    PCIDevice *d = (PCIDevice *)opaque;
>  +    uint32_t conf;
>  +
>  +    /* reset the bus master bit to avoid further DMA transfers */
>  +    conf = assigned_dev_pci_read_config(d, 0x04, 0x02);
>  +    conf&= ~0x04;
>  +    assigned_dev_pci_write_config(d, 0x04, conf, 0x02);
This should use defined macros, PCI_COMMAND&  PCI_COMMAND_MASTER.
Otherwise seems ok.  Thanks,

Alex

Thanks for the review. Will be fixed in v2.

Bernhard
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux