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()
185 static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos, in pci_vc_do_save_buffer() argument
196 pci_vc_do_save_buffer(dev, pos, NULL, save)) { in pci_vc_do_save_buffer()
197 pci_err(dev, "VC save buffer size does not match @0x%x\n", pos); in pci_vc_do_save_buffer()
201 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP1, &cap1); in pci_vc_do_save_buffer()
217 pci_read_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
220 pci_write_config_word(dev, pos + PCI_VC_PORT_CTRL, in pci_vc_do_save_buffer()
234 pci_read_config_dword(dev, pos + PCI_VC_PORT_CAP2, &cap2); in pci_vc_do_save_buffer()
252 pos + vcarb_offset, in pci_vc_do_save_buffer()
260 pci_vc_load_arb_table(dev, pos); in pci_vc_do_save_buffer()
279 pci_read_config_dword(dev, pos + PCI_VC_RES_CAP + in pci_vc_do_save_buffer()
299 pos + parb_offset, in pci_vc_do_save_buffer()
309 int ctrl_pos = pos + PCI_VC_RES_CTRL + in pci_vc_do_save_buffer()
326 pci_vc_load_port_arb_table(dev, pos, i); in pci_vc_do_save_buffer()
329 pci_vc_enable(dev, pos, i); in pci_vc_do_save_buffer()
358 int pos, ret; in pci_save_vc_state() local
361 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_save_vc_state()
362 if (!pos) in pci_save_vc_state()
372 ret = pci_vc_do_save_buffer(dev, pos, save_state, true); in pci_save_vc_state()
395 int pos; in pci_restore_vc_state() local
398 pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_restore_vc_state()
400 if (!save_state || !pos) in pci_restore_vc_state()
403 pci_vc_do_save_buffer(dev, pos, save_state, false); in pci_restore_vc_state()
419 int len, pos = pci_find_ext_capability(dev, vc_caps[i].id); in pci_allocate_vc_save_buffers() local
421 if (!pos) in pci_allocate_vc_save_buffers()
424 len = pci_vc_do_save_buffer(dev, pos, NULL, false); in pci_allocate_vc_save_buffers()