Lines Matching refs:pos
24 static void pci_vc_save_restore_dwords(struct pci_dev *dev, int pos, in pci_vc_save_restore_dwords() argument
31 pci_read_config_dword(dev, pos + (i * 4), buf); in pci_vc_save_restore_dwords()
33 pci_write_config_dword(dev, pos + (i * 4), *buf); in pci_vc_save_restore_dwords()
46 static void pci_vc_load_arb_table(struct pci_dev *dev, int pos) in pci_vc_load_arb_table() argument
50 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, &ctrl); in pci_vc_load_arb_table()
51 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_load_arb_table()
53 if (pci_wait_for_pending(dev, pos + PCI_VC_PORT_STATUS, in pci_vc_load_arb_table()
70 static void pci_vc_load_port_arb_table(struct pci_dev *dev, int pos, int res) in pci_vc_load_port_arb_table() argument
75 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
76 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
101 static void pci_vc_enable(struct pci_dev *dev, int pos, int res) in pci_vc_enable() argument
111 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
112 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
117 pci_read_config_dword(dev, pos, &header); in pci_vc_enable()
183 static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos, in pci_vc_do_save_buffer() argument
194 pci_vc_do_save_buffer(dev, pos, NULL, save)) { in pci_vc_do_save_buffer()
195 pci_err(dev, "VC save buffer size does not match @0x%x\n", pos); in pci_vc_do_save_buffer()
199 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP1, &cap1); in pci_vc_do_save_buffer()
215 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
218 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
232 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP2, &cap2); in pci_vc_do_save_buffer()
250 pos + vcarb_offset, in pci_vc_do_save_buffer()
258 pci_vc_load_arb_table(dev, pos); in pci_vc_do_save_buffer()
277 pci_read_config_dword(dev, pos + PCI_VC_RES_CAP + in pci_vc_do_save_buffer()
297 pos + parb_offset, in pci_vc_do_save_buffer()
307 int ctrl_pos = pos + PCI_VC_RES_CTRL + in pci_vc_do_save_buffer()
324 pci_vc_load_port_arb_table(dev, pos, i); in pci_vc_do_save_buffer()
327 pci_vc_enable(dev, pos, i); in pci_vc_do_save_buffer()
356 int pos, ret; in pci_save_vc_state() local
359 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_save_vc_state()
360 if (!pos) in pci_save_vc_state()
370 ret = pci_vc_do_save_buffer(dev, pos, save_state, true); in pci_save_vc_state()
393 int pos; in pci_restore_vc_state() local
396 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_restore_vc_state()
398 if (!save_state || !pos) in pci_restore_vc_state()
401 pci_vc_do_save_buffer(dev, pos, save_state, false); in pci_restore_vc_state()
418 int len, pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_allocate_vc_save_buffers() local
420 if (!pos) in pci_allocate_vc_save_buffers()
423 len = pci_vc_do_save_buffer(dev, pos, NULL, false); in pci_allocate_vc_save_buffers()