Lines Matching refs:tok
53 char *buf2, *tok, *ptr, *end, *optkey = NULL; in xlu_pci_parse_bdf() local
58 for(tok = ptr, end = ptr + strlen(ptr) + 1; ptr < end; ptr++) { in xlu_pci_parse_bdf()
64 if ( hex_convert(tok, &dom, 0xffff) ) in xlu_pci_parse_bdf()
66 tok = ptr + 1; in xlu_pci_parse_bdf()
73 if ( hex_convert(tok, &bus, 0xff) ) in xlu_pci_parse_bdf()
75 tok = ptr + 1; in xlu_pci_parse_bdf()
83 if ( hex_convert(tok, &dev, 0xff) ) in xlu_pci_parse_bdf()
85 tok = ptr + 1; in xlu_pci_parse_bdf()
92 if ( hex_convert(tok, &dev, 0xff) ) in xlu_pci_parse_bdf()
94 tok = ptr + 1; in xlu_pci_parse_bdf()
111 if ( !strcmp(tok, "*") ) { in xlu_pci_parse_bdf()
114 if ( hex_convert(tok, &func, 0x7) ) in xlu_pci_parse_bdf()
118 tok = ptr + 1; in xlu_pci_parse_bdf()
125 if ( hex_convert(tok, &vslot, 0xff) ) in xlu_pci_parse_bdf()
127 tok = ptr + 1; in xlu_pci_parse_bdf()
134 optkey = tok; in xlu_pci_parse_bdf()
135 tok = ptr + 1; in xlu_pci_parse_bdf()
143 pcidev->msitranslate = atoi(tok); in xlu_pci_parse_bdf()
145 pcidev->power_mgmt = atoi(tok); in xlu_pci_parse_bdf()
147 pcidev->permissive = atoi(tok); in xlu_pci_parse_bdf()
149 pcidev->seize = atoi(tok); in xlu_pci_parse_bdf()
151 if (!strcmp(tok, "strict")) { in xlu_pci_parse_bdf()
153 } else if (!strcmp(tok, "relaxed")) { in xlu_pci_parse_bdf()
158 tok); in xlu_pci_parse_bdf()
164 tok = ptr + 1; in xlu_pci_parse_bdf()
171 if ( tok != ptr || state != STATE_TERMINAL ) in xlu_pci_parse_bdf()
191 char *buf2, *tok, *ptr, *end; in xlu_rdm_parse() local
196 for (tok = ptr, end = ptr + strlen(ptr) + 1; ptr < end; ptr++) { in xlu_rdm_parse()
201 if (!strcmp(tok, "strategy")) { in xlu_rdm_parse()
203 } else if (!strcmp(tok, "policy")) { in xlu_rdm_parse()
206 XLU__PCI_ERR(cfg, "Unknown RDM state option: %s", tok); in xlu_rdm_parse()
209 tok = ptr + 1; in xlu_rdm_parse()
216 if (!strcmp(tok, "host")) { in xlu_rdm_parse()
219 XLU__PCI_ERR(cfg, "Unknown RDM strategy option: %s", tok); in xlu_rdm_parse()
222 tok = ptr + 1; in xlu_rdm_parse()
229 if (!strcmp(tok, "strict")) { in xlu_rdm_parse()
231 } else if (!strcmp(tok, "relaxed")) { in xlu_rdm_parse()
235 tok); in xlu_rdm_parse()
238 tok = ptr + 1; in xlu_rdm_parse()
245 if (tok != ptr || state != STATE_TERMINAL) in xlu_rdm_parse()