Lines Matching refs:pos

26 static void pci_vc_save_restore_dwords(struct pci_dev *dev, int pos,  in pci_vc_save_restore_dwords()  argument
33 pci_read_config_dword(dev, pos + (i * 4), buf); in pci_vc_save_restore_dwords()
35 pci_write_config_dword(dev, pos + (i * 4), *buf); in pci_vc_save_restore_dwords()
48 static void pci_vc_load_arb_table(struct pci_dev *dev, int pos) in pci_vc_load_arb_table() argument
52 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, &ctrl); in pci_vc_load_arb_table()
53 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_load_arb_table()
55 if (pci_wait_for_pending(dev, pos + PCI_VC_PORT_STATUS, in pci_vc_load_arb_table()
72 static void pci_vc_load_port_arb_table(struct pci_dev *dev, int pos, int res) in pci_vc_load_port_arb_table() argument
77 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
78 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_load_port_arb_table()
103 static void pci_vc_enable(struct pci_dev *dev, int pos, int res) in pci_vc_enable() argument
113 ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
114 status_pos = pos + PCI_VC_RES_STATUS + (res * PCI_CAP_VC_PER_VC_SIZEOF); in pci_vc_enable()
119 pci_read_config_dword(dev, pos, &header); in pci_vc_enable()
184 static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos, in pci_vc_do_save_buffer() argument
195 pci_vc_do_save_buffer(dev, pos, NULL, save)) { in pci_vc_do_save_buffer()
196 pci_err(dev, "VC save buffer size does not match @0x%x\n", pos); in pci_vc_do_save_buffer()
200 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP1, &cap1); in pci_vc_do_save_buffer()
216 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
219 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
233 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP2, &cap2); in pci_vc_do_save_buffer()
251 pos + vcarb_offset, in pci_vc_do_save_buffer()
259 pci_vc_load_arb_table(dev, pos); in pci_vc_do_save_buffer()
278 pci_read_config_dword(dev, pos + PCI_VC_RES_CAP + in pci_vc_do_save_buffer()
298 pos + parb_offset, in pci_vc_do_save_buffer()
308 int ctrl_pos = pos + PCI_VC_RES_CTRL + in pci_vc_do_save_buffer()
325 pci_vc_load_port_arb_table(dev, pos, i); in pci_vc_do_save_buffer()
328 pci_vc_enable(dev, pos, i); in pci_vc_do_save_buffer()
357 int pos, ret; in pci_save_vc_state() local
360 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_save_vc_state()
361 if (!pos) in pci_save_vc_state()
371 ret = pci_vc_do_save_buffer(dev, pos, save_state, true); in pci_save_vc_state()
394 int pos; in pci_restore_vc_state() local
397 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_restore_vc_state()
399 if (!save_state || !pos) in pci_restore_vc_state()
402 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()