Home
last modified time | relevance | path

Searched refs:a (Results 1 – 25 of 87) sorted by relevance

1234

/pciutils/lib/
H A Dinit.c247 …(a && a->error ? a->error : pci_generic_error)("Out of memory (allocation of %d bytes failed)", si… in pci_malloc()
467 memset(a, 0, sizeof(*a)); in pci_alloc()
478 return a; in pci_alloc()
484 if (!a->error) in pci_init_internal()
488 if (!a->debug) in pci_init_internal()
497 a->methods = pci_methods[a->method]; in pci_init_internal()
522 a->debug("Decided to use %s\n", a->methods->name); in pci_init_internal()
523 a->methods->init(a); in pci_init_internal()
564 if (a->methods) in pci_cleanup()
565 a->methods->cleanup(a); in pci_cleanup()
[all …]
H A Decam.c415 mcfg = pci_malloc(a, size); in get_system_firmware_table_acpi_mcfg()
526 a->debug("invalid...");
581 a->debug("not found...");
867 physmem_init_config(a);
968 if (physmem_access(a, 0))
978 eacc->physmem = physmem_open(a, a->writeable);
997 a->backend_data = eacc;
1042 physmem = physmem_open(a, a->writeable);
1055 a->backend_data = eacc;
1089 munmap_reg(a);
[all …]
H A Dnames-cache.c29 if (!a->id_cache_name) in get_cache_name()
36 a->id_cache_name = pci_strdup(a, name); in get_cache_name()
44 a->id_cache_name = pci_malloc(a, strlen(pw->pw_dir) + strlen(name+1) + 1); in get_cache_name()
49 return a->id_cache_name; in get_cache_name()
110 a->id_cache_status = 1; in pci_id_cache_load()
112 name = get_cache_name(a); in pci_id_cache_load()
182 a->id_cache_status = 0; in pci_id_cache_flush()
185 name = get_cache_name(a); in pci_id_cache_flush()
248 a->id_cache_status = 1; in pci_id_cache_load()
254 a->id_cache_status = 0; in pci_id_cache_flush()
[all …]
H A Dproc.c46 a->fd = -1; in proc_init()
52 if (a->fd >= 0) in proc_cleanup()
54 close(a->fd); in proc_cleanup()
55 a->fd = -1; in proc_cleanup()
139 if (a->cached_dev != d || a->fd_rw < rw) in proc_setup()
144 close(a->fd); in proc_setup()
150 a->fd_rw = a->writeable || rw; in proc_setup()
151 a->fd = open(buf, a->fd_rw ? O_RDWR : O_RDONLY); in proc_setup()
152 if (a->fd < 0) in proc_setup()
159 a->fd = open(buf, a->fd_rw ? O_RDWR : O_RDONLY); in proc_setup()
[all …]
H A Dsysfs.c44 a->debug("...cannot open %s", sysfs_name(a)); in sysfs_detect()
47 a->debug("...using %s", sysfs_name(a)); in sysfs_detect()
54 a->fd = -1; in sysfs_init()
55 a->fd_vpd = -1; in sysfs_init()
61 if (a->fd >= 0) in sysfs_flush_cache()
63 close(a->fd); in sysfs_flush_cache()
64 a->fd = -1; in sysfs_flush_cache()
532 if (a->fd < 0) in sysfs_setup()
535 a->fd_rw = a->writeable || intent == SETUP_WRITE_CONFIG; in sysfs_setup()
536 a->fd = open(namebuf, a->fd_rw ? O_RDWR : O_RDONLY); in sysfs_setup()
[all …]
H A Dwin32-cfgmgr32.c1510 pci_link_dev(a, d); in scan_devinst_id()
1516 if (!a->buscentric) in scan_devinst_id()
1520 if (!a->buscentric) in scan_devinst_id()
1523 if (!a->buscentric) in scan_devinst_id()
1531 if (!a->buscentric) in scan_devinst_id()
1591 if (!a->buscentric) in win32_cfgmgr32_scan()
1592 fill_drivers(a); in win32_cfgmgr32_scan()
1595 if (!a->buscentric) in win32_cfgmgr32_scan()
1725 if (a->writeable) in win32_cfgmgr32_init()
1743 if (a->writeable) in win32_cfgmgr32_init()
[all …]
H A Drt-thread-smart-dm.c46 a->fd = -1; in rt_thread_smart_dm_init()
52 if (a->fd >= 0) in rt_thread_smart_dm_cleanup()
54 close(a->fd); in rt_thread_smart_dm_cleanup()
55 a->fd = -1; in rt_thread_smart_dm_cleanup()
142 if (a->cached_dev != d || a->fd_rw < rw) in rt_thread_smart_dm_setup()
146 if (a->fd >= 0) in rt_thread_smart_dm_setup()
147 close(a->fd); in rt_thread_smart_dm_setup()
153 a->fd_rw = a->writeable || rw; in rt_thread_smart_dm_setup()
154 a->fd = open(buf, a->fd_rw ? O_RDWR : O_RDONLY); in rt_thread_smart_dm_setup()
155 if (a->fd < 0) in rt_thread_smart_dm_setup()
[all …]
H A Dmmio-ports.c34 munmap_regs(struct pci_access *a) in munmap_regs() argument
182 conf1_config(struct pci_access *a) in conf1_config() argument
184 physmem_init_config(a); in conf1_config()
191 physmem_init_config(a); in conf1_ext_config()
212 if (physmem_access(a, 1)) in detect()
223 conf1_detect(struct pci_access *a) in conf1_detect() argument
244 conf1_init(struct pci_access *a) in conf1_init() argument
258 physmem = physmem_open(a, 1); in conf1_init()
270 a->backend_data = macc; in conf1_init()
278 munmap_regs(a); in conf1_cleanup()
[all …]
H A Dwin32-kldbg.c468 win32_kldbg_setup(struct pci_access *a) in win32_kldbg_setup() argument
551 a->debug("Succeeded."); in win32_kldbg_setup()
572 if (!win32_kldbg_setup(a)) in win32_kldbg_detect()
579 win32_kldbg_init(struct pci_access *a) in win32_kldbg_init() argument
581 if (!win32_kldbg_setup(a)) in win32_kldbg_init()
583 a->debug("\n"); in win32_kldbg_init()
627 win32_kldbg_scan(struct pci_access *a) in win32_kldbg_scan() argument
653 pci_generic_scan_domain(a, 0); in win32_kldbg_scan()
677 mcfg = pci_malloc(a, size); in win32_kldbg_scan()
694 segments = pci_malloc(a, 0xFFFF/8); in win32_kldbg_scan()
[all …]
H A Dnames-parse.c57 #define pci_open(a) fopen(a->id_file_name, "r") argument
225 pci_free_name_list(a); in pci_load_name_list()
226 a->id_load_attempted = 1; in pci_load_name_list()
227 if (!(f = pci_open(a))) in pci_load_name_list()
233 a->error("%s at %s, line %d\n", err, a->id_file_name, lino); in pci_load_name_list()
240 pci_id_cache_flush(a); in pci_free_name_list()
241 pci_id_hash_free(a); in pci_free_name_list()
242 pci_id_hwdb_free(a); in pci_free_name_list()
249 if (a->free_id_name) in pci_set_name_list_path()
250 free(a->id_file_name); in pci_set_name_list_path()
[all …]
H A Daos-expansion.c60 a->backend_data = NULL; in aos_close_pci_interface()
70 if (NULL == a->backend_data) { in aos_open_pci_interface()
72 a->backend_data = pci; in aos_open_pci_interface()
76 aos_close_pci_interface(a); in aos_open_pci_interface()
101 pci = a->backend_data; in aos_expansion_detect()
107 aos_close_pci_interface(a); in aos_expansion_detect()
124 a->debug("\n"); in aos_expansion_init()
132 aos_close_pci_interface(a); in aos_expansion_cleanup()
146 pci = a->backend_data; in aos_expansion_scan()
151 d = pci_alloc_dev(a); in aos_expansion_scan()
[all …]
H A Dnames.c25 if ((flags & PCI_LOOKUP_CACHE) && !a->id_cache_status) in id_lookup()
27 if (pci_id_cache_load(a, flags)) in id_lookup()
46 pci_id_cache_dirty(a); in id_lookup()
67 d = id_lookup(a, flags, ID_DEVICE, iv, id, 0, 0); in id_lookup_subsys()
135 flags |= a->id_lookup_mode; in pci_lookup_name()
138 if (a->numeric_ids > 1) in pci_lookup_name()
140 else if (a->numeric_ids) in pci_lookup_name()
147 pci_load_name_list(a); in pci_lookup_name()
166 v = id_lookup(a, flags, ID_VENDOR, iv, 0, 0, 0); in pci_lookup_name()
167 d = id_lookup(a, flags, ID_DEVICE, iv, id, 0, 0); in pci_lookup_name()
[all …]
H A Dnames-hash.c37 if (!a->id_hash) in id_alloc()
39 a->id_hash = pci_malloc(a, sizeof(struct id_entry *) * HASH_SIZE); in id_alloc()
45 buck = pci_malloc(a, BUCKET_SIZE); in id_alloc()
47 a->current_id_bucket = buck; in id_alloc()
69 struct id_entry *n = a->id_hash ? a->id_hash[h] : NULL; in pci_id_insert()
82 n->next = a->id_hash[h]; in pci_id_insert()
83 a->id_hash[h] = n; in pci_id_insert()
94 if (a->id_hash) in pci_id_lookup()
122 pci_mfree(a->id_hash); in pci_id_hash_free()
123 a->id_hash = NULL; in pci_id_hash_free()
[all …]
H A Dfbsd-device.c63 a->fd = -1; in fbsd_init()
64 a->fd_rw = -1; in fbsd_init()
80 a->fd = fd; in fbsd_init()
84 a->fd_rw = fd; in fbsd_init()
90 if (a->fd >= 0) in fbsd_cleanup()
92 close(a->fd); in fbsd_cleanup()
93 a->fd = -1; in fbsd_cleanup()
95 if (a->fd_rw >= 0) in fbsd_cleanup()
97 close(a->fd_rw); in fbsd_cleanup()
98 a->fd_rw = -1; in fbsd_cleanup()
[all …]
H A Dphysmem-windows.c126 (p)->Attributes = (a); \
542 a->debug("failed: symbol not found."); in init_physmem_w32skrnl()
589 a->debug("success."); in init_physmem_w32skrnl()
660 a->debug("success."); in init_physmem_vxdcall()
711 a->debug("success."); in init_physmem_ntdll()
757 a->debug("failed."); in init_physmem_ntdll()
761 a->debug("failed: 0x%lx.", status); in init_physmem_ntdll()
780 a->debug("success."); in init_physmem_ntdll()
785 physmem_init_config(struct pci_access *a) in physmem_init_config() argument
795 physmem_access(struct pci_access *a, int w) in physmem_access() argument
[all …]
H A Dnames-hwdb.c70 if (!a->id_udev_hwdb) in pci_id_hwdb_lookup()
73 a->id_udev = udev_new(); in pci_id_hwdb_lookup()
74 a->id_udev_hwdb = udev_hwdb_new(a->id_udev); in pci_id_hwdb_lookup()
85 return pci_strdup(a, entry_value); in pci_id_hwdb_lookup()
94 pci_id_hwdb_free(struct pci_access *a) in pci_id_hwdb_free() argument
96 if (a->id_udev_hwdb) in pci_id_hwdb_free()
98 udev_hwdb_unref(a->id_udev_hwdb); in pci_id_hwdb_free()
99 a->id_udev_hwdb = NULL; in pci_id_hwdb_free()
101 if (a->id_udev) in pci_id_hwdb_free()
103 udev_unref(a->id_udev); in pci_id_hwdb_free()
[all …]
H A Dwin32-sysdbg.c117 win32_sysdbg_setup(struct pci_access *a) in win32_sysdbg_setup() argument
155 a->debug("NT SysDbg is not supported."); in win32_sysdbg_setup()
157 a->debug("NT SysDbg is disabled."); in win32_sysdbg_setup()
183 a->debug("Succeeded."); in win32_sysdbg_setup()
196 a->debug("NT SysDbg is not supported."); in win32_sysdbg_setup()
198 a->debug("NT SysDbg is disabled."); in win32_sysdbg_setup()
208 win32_sysdbg_detect(struct pci_access *a) in win32_sysdbg_detect() argument
210 if (!win32_sysdbg_setup(a)) in win32_sysdbg_detect()
217 win32_sysdbg_init(struct pci_access *a) in win32_sysdbg_init() argument
219 if (!win32_sysdbg_setup(a)) in win32_sysdbg_init()
[all …]
H A Di386-ports.c42 conf12_setup_io(struct pci_access *a) in conf12_setup_io() argument
50 conf12_init(struct pci_access *a) in conf12_init() argument
52 if (!conf12_setup_io(a)) in conf12_init()
57 conf12_cleanup(struct pci_access *a) in conf12_cleanup() argument
61 intel_cleanup_io(a); in conf12_cleanup()
83 a->debug("...sanity check"); in intel_sanity_check()
98 a->debug("...insane"); in intel_sanity_check()
109 conf1_detect(struct pci_access *a) in conf1_detect() argument
114 if (!conf12_setup_io(a)) in conf1_detect()
202 conf2_detect(struct pci_access *a) in conf2_detect() argument
[all …]
H A Dnbsd-libpci.c28 nbsd_config(struct pci_access *a) in nbsd_config() argument
34 nbsd_detect(struct pci_access *a) in nbsd_detect() argument
36 char *name = pci_get_param(a, "nbsd.path"); in nbsd_detect()
40 a->warning("Cannot open %s", name); in nbsd_detect()
45 a->writeable = O_RDWR; in nbsd_detect()
46 a->debug("...using %s", name); in nbsd_detect()
51 nbsd_init(struct pci_access *a) in nbsd_init() argument
56 a->fd = open(name, mode, 0); in nbsd_init()
57 if (a->fd < 0) in nbsd_init()
62 nbsd_cleanup(struct pci_access *a) in nbsd_cleanup() argument
[all …]
H A Daix-device.c49 aix_find_bus(struct pci_access *a, int bus_number) in aix_find_bus() argument
67 struct pci_access *a = d->access; in aix_bus_open() local
68 aix_pci_bus *bp = aix_find_bus(a, d->bus); in aix_bus_open()
127 aix_detect(struct pci_access *a) in aix_detect() argument
130 int mode = a->writeable ? W_OK : R_OK; in aix_detect()
149 name = (char *) pci_malloc(a, len + 1); in aix_detect()
155 a->debug("...using %s", name); in aix_detect()
157 a->debug(", %s", name); in aix_detect()
169 aix_init(struct pci_access *a) in aix_init() argument
182 aix_cleanup(struct pci_access *a) in aix_cleanup() argument
[all …]
H A Ddump.c24 dump_config(struct pci_access *a) in dump_config() argument
30 dump_detect(struct pci_access *a) in dump_detect() argument
32 char *name = pci_get_param(a, "dump.name"); in dump_detect()
59 dump_init(struct pci_access *a) in dump_init() argument
61 char *name = pci_get_param(a, "dump.name"); in dump_init()
68 a->error("dump: File name not given."); in dump_init()
89 dev = pci_get_dev(a, mn, bn, dn, fn); in dump_init()
91 pci_link_dev(a, dev); in dump_init()
128 a->error("dump: Malformed line"); in dump_init()
136 dump_cleanup(struct pci_access *a UNUSED) in dump_cleanup()
[all …]
H A Dobsd-device.c22 obsd_config(struct pci_access *a) in obsd_config() argument
28 obsd_detect(struct pci_access *a) in obsd_detect() argument
30 char *name = pci_get_param(a, "obsd.path"); in obsd_detect()
34 a->warning("Cannot open %s", name); in obsd_detect()
37 a->debug("...using %s", name); in obsd_detect()
42 obsd_init(struct pci_access *a) in obsd_init() argument
44 char *name = pci_get_param(a, "obsd.path"); in obsd_init()
46 a->fd = open(name, O_RDWR, 0); in obsd_init()
47 if (a->fd < 0) in obsd_init()
52 obsd_cleanup(struct pci_access *a) in obsd_cleanup() argument
[all …]
/pciutils/tests/
H A Dbroken-ecaps8 60: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
24 160: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
40 260: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
56 360: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
72 460: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
88 560: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
104 660: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
120 760: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
136 860: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
152 960: 7d 00 00 00 03 0f 6a 81 00 02 20 00 99 b8 01 00
[all …]
H A DPCI-X-bridges-and-domains49 b0: 01 b8 0a 76 00 00 00 00 0c 00 00 00 01 00 01 01
67 b0: 01 b8 0a 76 00 00 00 00 0c 00 00 00 01 00 01 01
85 b0: 01 b8 0a 76 00 00 00 00 0c 00 00 00 01 00 01 01
103 b0: 01 b8 0a 76 00 00 00 00 0c 00 00 00 01 00 01 01
121 b0: 01 b8 0a 76 00 00 00 00 0c 00 00 00 01 00 01 01
128 00: 00 10 21 00 57 01 30 02 01 00 00 01 20 4a 80 00
146 00: 00 10 21 00 57 01 30 02 01 00 00 01 20 4a 80 00
164 00: 86 80 29 12 47 01 90 02 0d 00 00 02 00 4a 00 00
182 00: 86 80 29 12 47 01 90 02 0d 00 00 02 00 4a 00 00
200 00: 88 33 21 00 47 01 90 02 13 00 04 06 08 4a 01 00
[all …]
/pciutils/
H A DCOPYING33 For example, if you distribute copies of such a program, whether
67 that is to say, a work containing the Program or a portion of it,
75 is covered only if its contents constitute a work based on the
87 You may charge a fee for the physical act of transferring a copy, and
91 of it, thus forming a work based on the Program, and copy and
114 These requirements apply to the modified work as a whole. If
119 distribute the same sections as part of a whole which is a work based
130 with the Program (or with a work based on the Program) on a volume of
197 7. If, as a consequence of a court judgment or allegation of patent
227 be a consequence of the rest of this License.
[all …]

1234