• Home
  • Raw
  • Download

Lines Matching refs:pos

24 #define PCI_word_BAD (pos & 1)
25 #define PCI_dword_BAD (pos & 3)
37 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
44 res = bus->ops->read(bus, devfn, pos, len, &data); \
52 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \
58 res = bus->ops->write(bus, devfn, pos, len, value); \
222 (struct pci_dev *dev, int pos, type *val) \
232 pos, sizeof(type), &data); \
242 (struct pci_dev *dev, int pos, type val) \
251 pos, sizeof(type), val); \
365 static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos) in pcie_capability_reg_implemented() argument
370 switch (pos) { in pcie_capability_reg_implemented()
405 int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val) in pcie_capability_read_word() argument
410 if (pos & 1) in pcie_capability_read_word()
413 if (pcie_capability_reg_implemented(dev, pos)) { in pcie_capability_read_word()
414 ret = pci_read_config_word(dev, pci_pcie_cap(dev) + pos, val); in pcie_capability_read_word()
433 pos == PCI_EXP_SLTSTA) in pcie_capability_read_word()
440 int pcie_capability_read_dword(struct pci_dev *dev, int pos, u32 *val) in pcie_capability_read_dword() argument
445 if (pos & 3) in pcie_capability_read_dword()
448 if (pcie_capability_reg_implemented(dev, pos)) { in pcie_capability_read_dword()
449 ret = pci_read_config_dword(dev, pci_pcie_cap(dev) + pos, val); in pcie_capability_read_dword()
461 pos == PCI_EXP_SLTSTA) in pcie_capability_read_dword()
468 int pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val) in pcie_capability_write_word() argument
470 if (pos & 1) in pcie_capability_write_word()
473 if (!pcie_capability_reg_implemented(dev, pos)) in pcie_capability_write_word()
476 return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val); in pcie_capability_write_word()
480 int pcie_capability_write_dword(struct pci_dev *dev, int pos, u32 val) in pcie_capability_write_dword() argument
482 if (pos & 3) in pcie_capability_write_dword()
485 if (!pcie_capability_reg_implemented(dev, pos)) in pcie_capability_write_dword()
488 return pci_write_config_dword(dev, pci_pcie_cap(dev) + pos, val); in pcie_capability_write_dword()
492 int pcie_capability_clear_and_set_word(struct pci_dev *dev, int pos, in pcie_capability_clear_and_set_word() argument
498 ret = pcie_capability_read_word(dev, pos, &val); in pcie_capability_clear_and_set_word()
502 ret = pcie_capability_write_word(dev, pos, val); in pcie_capability_clear_and_set_word()
509 int pcie_capability_clear_and_set_dword(struct pci_dev *dev, int pos, in pcie_capability_clear_and_set_dword() argument
515 ret = pcie_capability_read_dword(dev, pos, &val); in pcie_capability_clear_and_set_dword()
519 ret = pcie_capability_write_dword(dev, pos, val); in pcie_capability_clear_and_set_dword()