Lines Matching defs:prg_p
139 static int probe_dev(int fd, pcitool_reg_t *prg_p,
146 static int bytedump_get(int fd, int cmd, pcitool_reg_t *prg_p,
149 static int do_single_access(int fd, int cmd, pcitool_reg_t *prg_p,
587 * Probe device's functions. Modifies many fields in the prg_p.
590 probe_dev(int fd, pcitool_reg_t *prg_p, pcitool_uiargs_t *input_args_p)
601 } else if (supports_ari(fd, prg_p->bus_no) == SUCCESS) {
621 prg_p->func_no = func & 0x7;
622 prg_p->dev_no = (func >> 3) & 0x1f;
624 prg_p->func_no = func;
629 * 1) ioctl comes back as EFAULT and prg_p->status is
642 prg_p->status = PCITOOL_SUCCESS;
643 prg_p->offset = 0;
644 prg_p->data = 0;
645 prg_p->user_version = PCITOOL_VERSION;
646 if (((rval = ioctl(fd, PCITOOL_DEVICE_GET_REG, prg_p)) != 0) ||
647 (prg_p->data == 0xffffffff)) {
656 (prg_p->status == PCITOOL_OUT_OF_RANGE)) {
665 (prg_p->status == PCITOOL_IO_ERROR)) {
675 (prg_p->status != PCITOOL_INVALID_ADDRESS)) &&
676 (prg_p->data != 0xffffffff)) {
697 } else if (prg_p->data == 0) {
701 config_hdr.dwords[0] = (uint32_t)prg_p->data;
704 if ((rval = get_config_header(fd, prg_p->bus_no,
705 prg_p->dev_no, prg_p->func_no, &config_hdr)) !=
711 print_probe_info(&config_hdr, prg_p,
1015 bytedump_get(int fd, int cmd, pcitool_reg_t *prg_p,
1032 uint32_t dump_end = prg_p->offset + input_args_p->bytedump_amt;
1033 uint32_t dump_curr = prg_p->offset;
1069 local_prg = *prg_p; /* Make local copy. */
1265 do_single_access(int fd, int cmd, pcitool_reg_t *prg_p,
1281 if ((rval = ioctl(fd, cmd, prg_p)) != SUCCESS) {
1286 strerror(errno), strstatus(prg_p->status));
1299 if (prg_p->phys_addr == 0)
1300 prg_p->phys_addr = input_args_p->offset;
1304 prg_p->phys_addr, input_args_p->size,
1305 (input_args_p->big_endian ? "big" : "little"), prg_p->data);
1309 (void) printf("0x%" PRIx64 "\n", prg_p->data);