Lines Matching refs:value
24 #define is_enable_cmd(value) ((value)&(PCI_COMMAND_MEMORY|PCI_COMMAND_IO)) argument
25 #define is_master_cmd(value) ((value)&PCI_COMMAND_MASTER) argument
49 static int command_read(struct pci_dev *dev, int offset, u16 *value, void *data) in command_read() argument
51 int ret = pci_read_config_word(dev, offset, value); in command_read()
54 *value &= PCI_COMMAND_GUEST; in command_read()
55 *value |= cmd->val & ~PCI_COMMAND_GUEST; in command_read()
60 static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) in command_write() argument
68 if (!pci_is_enabled(dev) && is_enable_cmd(value)) { in command_write()
77 } else if (pci_is_enabled(dev) && !is_enable_cmd(value)) { in command_write()
86 if (!dev->is_busmaster && is_master_cmd(value)) { in command_write()
91 } else if (dev->is_busmaster && !is_master_cmd(value)) { in command_write()
99 (value & PCI_COMMAND_INVALIDATE)) { in command_write()
108 value &= ~PCI_COMMAND_INVALIDATE; in command_write()
111 !(value & PCI_COMMAND_INVALIDATE)) { in command_write()
119 cmd->val = value; in command_write()
126 if (err || val == value) in command_write()
129 value &= PCI_COMMAND_GUEST; in command_write()
130 value |= val & ~PCI_COMMAND_GUEST; in command_write()
132 return pci_write_config_word(dev, offset, value); in command_write()
135 static int rom_write(struct pci_dev *dev, int offset, u32 value, void *data) in rom_write() argument
148 if (value == ~PCI_ROM_ADDRESS_ENABLE) in rom_write()
153 if (tmpval != bar->val && value == bar->val) { in rom_write()
169 static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data) in bar_write() argument
182 if (value == ~0) in bar_write()
187 if (tmpval != bar->val && value == bar->val) { in bar_write()
197 static int bar_read(struct pci_dev *dev, int offset, u32 * value, void *data) in bar_read() argument
207 *value = bar->which ? bar->len_val : bar->val; in bar_read()
277 u16 *value, void *data) in xen_pcibk_read_vendor() argument
279 *value = dev->vendor; in xen_pcibk_read_vendor()
285 u16 *value, void *data) in xen_pcibk_read_device() argument
287 *value = dev->device; in xen_pcibk_read_device()
292 static int interrupt_read(struct pci_dev *dev, int offset, u8 * value, in interrupt_read() argument
295 *value = (u8) dev->irq; in interrupt_read()
300 static int bist_write(struct pci_dev *dev, int offset, u8 value, void *data) in bist_write() argument
309 if ((cur_value & ~PCI_BIST_START) == (value & ~PCI_BIST_START) in bist_write()
310 || value == PCI_BIST_START) in bist_write()
311 err = pci_write_config_byte(dev, offset, value); in bist_write()