Lines Matching refs:pos

27 static void pci_vc_save_restore_dwords(struct pci_dev *dev, int pos,  in pci_vc_save_restore_dwords()  argument
34 pci_read_config_dword(dev, pos + (i * 4), buf); in pci_vc_save_restore_dwords()
36 pci_write_config_dword(dev, pos + (i * 4), *buf); in pci_vc_save_restore_dwords()
49 static void pci_vc_load_arb_table(struct pci_dev *dev, int pos) in pci_vc_load_arb_table() argument
53 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, &ctrl); in pci_vc_load_arb_table()
54 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_load_arb_table()
56 if (pci_wait_for_pending(dev, pos + PCI_VC_PORT_STATUS, in pci_vc_load_arb_table()
73 static void pci_vc_load_port_arb_table(struct pci_dev *dev, int pos, int res) in pci_vc_load_port_arb_table() argument
78 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
79 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
104 static void pci_vc_enable(struct pci_dev *dev, int pos, int res) in pci_vc_enable() argument
115 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
116 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
121 pci_read_config_dword(dev, pos, &header); in pci_vc_enable()
187 static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos, in pci_vc_do_save_buffer() argument
198 pci_vc_do_save_buffer(dev, pos, NULL, save)) { in pci_vc_do_save_buffer()
200 "VC save buffer size does not match @0x%x\n", pos); in pci_vc_do_save_buffer()
204 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP1, &cap1); in pci_vc_do_save_buffer()
220 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
223 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
237 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP2, &cap2); in pci_vc_do_save_buffer()
255 pos + vcarb_offset, in pci_vc_do_save_buffer()
263 pci_vc_load_arb_table(dev, pos); in pci_vc_do_save_buffer()
282 pci_read_config_dword(dev, pos + PCI_VC_RES_CAP + in pci_vc_do_save_buffer()
302 pos + parb_offset, in pci_vc_do_save_buffer()
312 int ctrl_pos = pos + PCI_VC_RES_CTRL + in pci_vc_do_save_buffer()
329 pci_vc_load_port_arb_table(dev, pos, i); in pci_vc_do_save_buffer()
332 pci_vc_enable(dev, pos, i); in pci_vc_do_save_buffer()
361 int pos, ret; in pci_save_vc_state() local
364 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_save_vc_state()
365 if (!pos) in pci_save_vc_state()
375 ret = pci_vc_do_save_buffer(dev, pos, save_state, true); in pci_save_vc_state()
398 int pos; in pci_restore_vc_state() local
401 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_restore_vc_state()
403 if (!save_state || !pos) in pci_restore_vc_state()
406 pci_vc_do_save_buffer(dev, pos, save_state, false); in pci_restore_vc_state()
423 int len, pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_allocate_vc_save_buffers() local
425 if (!pos) in pci_allocate_vc_save_buffers()
428 len = pci_vc_do_save_buffer(dev, pos, NULL, false); in pci_allocate_vc_save_buffers()