Lines Matching defs:pos

91 	int pos;
93 pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_PASID);
94 if (!pos) {
103 pci_read_config_word(dev, pos + PCI_PASID_CAP, &val);
113 int pos;
115 pos = find_dvsec(dev, OCXL_DVSEC_TL_ID);
116 if (!pos && PCI_FUNC(dev->devfn) == 0) {
120 if (pos && PCI_FUNC(dev->devfn) != 0) {
124 fn->dvsec_tl_pos = pos;
130 int pos, afu_present;
133 pos = find_dvsec(dev, OCXL_DVSEC_FUNC_ID);
134 if (!pos) {
138 fn->dvsec_function_pos = pos;
140 pci_read_config_dword(dev, pos + OCXL_DVSEC_FUNC_OFF_INDEX, &val);
157 int pos;
164 pos = find_dvsec(dev, OCXL_DVSEC_AFU_INFO_ID);
165 if (!pos) {
169 fn->dvsec_afu_info_pos = pos;
175 int pos;
189 pos = find_dvsec(dev, OCXL_DVSEC_VENDOR_ID);
190 if (!pos)
193 pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_CFG_VERS, &cfg);
194 pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_TLX_VERS, &tlx);
195 pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_DLX_VERS, &dlx);
196 pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_RESET_RELOAD,
222 int pos;
231 pos = find_dvsec(dev, OCXL_DVSEC_VENDOR_ID);
232 if (!pos) {
237 *out_pos = pos;
245 int pos;
247 if (get_dvsec_vendor0(dev, &dev0, &pos))
250 pci_read_config_dword(dev0, pos + OCXL_DVSEC_VENDOR_RESET_RELOAD,
261 int pos;
263 if (get_dvsec_vendor0(dev, &dev0, &pos))
266 pci_read_config_dword(dev0, pos + OCXL_DVSEC_VENDOR_RESET_RELOAD,
272 pci_write_config_dword(dev0, pos + OCXL_DVSEC_VENDOR_RESET_RELOAD,
340 int pos = fn->dvsec_afu_info_pos;
348 pci_write_config_dword(dev, pos + OCXL_DVSEC_AFU_INFO_OFF, offset);
349 pci_read_config_dword(dev, pos + OCXL_DVSEC_AFU_INFO_OFF, &val);
358 pci_read_config_dword(dev, pos + OCXL_DVSEC_AFU_INFO_OFF, &val);
360 pci_read_config_dword(dev, pos + OCXL_DVSEC_AFU_INFO_DATA, data);
500 int pos;
504 pos = find_dvsec_afu_ctrl(dev, afu->idx);
505 if (!pos) {
510 afu->dvsec_afu_control_pos = pos;
512 pci_read_config_byte(dev, pos + OCXL_DVSEC_AFU_CTRL_PASID_SUP, &val8);
515 pci_read_config_word(dev, pos + OCXL_DVSEC_AFU_CTRL_ACTAG_SUP, &val16);
750 void ocxl_config_set_afu_actag(struct pci_dev *dev, int pos, int actag_base,
756 pci_write_config_byte(dev, pos + OCXL_DVSEC_AFU_CTRL_ACTAG_EN, val);
759 pci_write_config_dword(dev, pos + OCXL_DVSEC_AFU_CTRL_ACTAG_BASE, val);
768 void ocxl_config_set_afu_pasid(struct pci_dev *dev, int pos, int pasid_base,
775 pci_write_config_byte(dev, pos + OCXL_DVSEC_AFU_CTRL_PASID_EN, val8);
777 pci_read_config_dword(dev, pos + OCXL_DVSEC_AFU_CTRL_PASID_BASE,
781 pci_write_config_dword(dev, pos + OCXL_DVSEC_AFU_CTRL_PASID_BASE,
786 void ocxl_config_set_afu_state(struct pci_dev *dev, int pos, int enable)
790 pci_read_config_byte(dev, pos + OCXL_DVSEC_AFU_CTRL_ENABLE, &val);
795 pci_write_config_byte(dev, pos + OCXL_DVSEC_AFU_CTRL_ENABLE, val);