On 02/21/2012 07:41 AM, Michael S. Tsirkin wrote:
pci_regs.h specifies many registers by mask +
shifted register values.
There's always some duplication when using such:
for example to override device type, we would need:
pci_word_test_and_clear_mask(cap + PCI_EXP_FLAGS,
PCI_EXP_FLAGS_TYPE
sounds good idea and the patch Looks good.
On Tue, Feb 21, 2012 at 03:41:30PM +0200, Michael S. Tsirkin wrote:
> pci_regs.h specifies many registers by mask +
> shifted register values.
> There's always some duplication when using such:
> for example to override device type, we would need:
>
> pc
pci_regs.h specifies many registers by mask +
shifted register values.
There's always some duplication when using such:
for example to override device type, we would need:
pci_word_test_and_clear_mask(cap + PCI_EXP_FLAGS,
PCI_EXP_FLAGS_TYPE);
pci_word_test_and_set_mask(cap + PCI_EXP_FLAGS,