| /freebsd-12.1/lib/libusb/ |
| H A D | libusb20.c | 475 struct libusb20_device *pdev = xfer->pdev; in libusb20_tr_bulk_intr_sync() local 604 error = pdev->beMethods->close_device(pdev); in libusb20_dev_close() 681 xfer->pdev = pdev; in libusb20_dev_open() 710 error = pdev->methods->reset_device(pdev); in libusb20_dev_reset() 719 error = pdev->methods->check_connected(pdev); in libusb20_dev_check_connected() 764 memcpy(buf, pdev->port_path, pdev->port_level); in libusb20_dev_get_port_path() 806 error = pdev->methods->do_request_sync(pdev, in libusb20_dev_request_sync() 999 pdev = malloc(sizeof(*pdev)); in libusb20_dev_alloc() 1003 memset(pdev, 0, sizeof(*pdev)); in libusb20_dev_alloc() 1058 error = pdev->methods->process(pdev); in libusb20_dev_process() [all …]
|
| H A D | libusb20_ugen20.c | 148 pdev->bus_number, pdev->device_address); in ugen20_enumerate() 217 snprintf(pdev->usb_desc, sizeof(pdev->usb_desc), in ugen20_enumerate() 304 if (pdev == NULL) { in ugen20_init_backend() 387 pdev->bus_number, pdev->device_address); in ugen20_open_device() 413 pdev->file = f; in ugen20_open_device() 414 pdev->file_ctrl = g; in ugen20_open_device() 431 pdev->file = -1; in ugen20_open_device() 451 pdev->nTransfer = 0; in ugen20_close_device() 453 close(pdev->file); in ugen20_close_device() 455 pdev->file = -1; in ugen20_close_device() [all …]
|
| H A D | libusb20.h | 240 const char *libusb20_dev_get_desc(struct libusb20_device *pdev); 241 int libusb20_dev_close(struct libusb20_device *pdev); 244 int libusb20_dev_get_debug(struct libusb20_device *pdev); 245 int libusb20_dev_get_fd(struct libusb20_device *pdev); 248 int libusb20_dev_process(struct libusb20_device *pdev); 252 int libusb20_dev_reset(struct libusb20_device *pdev); 253 int libusb20_dev_check_connected(struct libusb20_device *pdev); 265 uint8_t libusb20_dev_get_address(struct libusb20_device *pdev); 269 uint8_t libusb20_dev_get_mode(struct libusb20_device *pdev); 270 uint8_t libusb20_dev_get_speed(struct libusb20_device *pdev); [all …]
|
| H A D | libusb10.c | 280 pdev = NULL; in libusb_get_device_list() 282 while ((pdev = libusb20_be_device_foreach(usb_backend, pdev))) in libusb_get_device_list() 523 *devh = pdev; in libusb_open() 547 pdev = NULL; in libusb_open_device_with_vid_pid() 567 return (pdev); in libusb_open_device_with_vid_pid() 576 if (pdev == NULL) in libusb_close() 596 if (pdev == NULL) in libusb_get_device() 751 pdev, libusb20_dev_get_fd(pdev), in libusb_set_interface_alt_setting() 822 pdev, libusb20_dev_get_fd(pdev), in libusb_reset_device() 846 if (pdev == NULL) in libusb_kernel_driver_active() [all …]
|
| H A D | libusb20_int.h | 59 typedef int (libusb20_close_device_t)(struct libusb20_device *pdev); 63 typedef int (libusb20_open_device_t)(struct libusb20_device *pdev, uint16_t transfer_count_max); 104 typedef int (libusb20_get_config_index_t)(struct libusb20_device *pdev, uint8_t *pindex); 106 typedef int (libusb20_process_t)(struct libusb20_device *pdev); 107 typedef int (libusb20_reset_device_t)(struct libusb20_device *pdev); 108 typedef int (libusb20_set_power_mode_t)(struct libusb20_device *pdev, uint8_t power_mode); 109 typedef int (libusb20_get_power_mode_t)(struct libusb20_device *pdev, uint8_t *power_mode); 110 typedef int (libusb20_get_power_usage_t)(struct libusb20_device *pdev, uint16_t *power_usage); 112 typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t index); 113 typedef int (libusb20_check_connected_t)(struct libusb20_device *pdev); [all …]
|
| H A D | libusb01.c | 553 pdev = (void *)udev; in usb_fetch_and_parse_descriptors() 890 udev = pdev->privLuData; in usb_find_devices() 892 libusb20_dev_free(pdev); in usb_find_devices() 911 pdev = NULL; in usb_find_devices() 912 while ((pdev = libusb20_be_device_foreach(usb_backend, pdev))) { in usb_find_devices() 949 udev->dev = pdev; in usb_find_devices() 969 pdev = (void *)dev; in usb_device() 987 pdev = (void *)dev; in usb_get_driver_np() 989 if (pdev == NULL) in usb_get_driver_np() 1014 pdev = (void *)dev; in usb_detach_kernel_driver_np() [all …]
|
| /freebsd-12.1/sys/dev/xen/pcifront/ |
| H A D | pcifront.c | 139 pdev = NULL; in alloc_pdev() 158 return pdev; in alloc_pdev() 165 pdev->ref_cnt++; in get_pdev() 178 xenbus_free_evtchn(pdev->xdev, pdev->evtchn); in put_pdev() 196 err = xenbus_grant_ring(pdev->xdev, virt_to_mfn(pdev->sh_info)); in pcifront_publish_info() 204 err = xenbus_alloc_evtchn(pdev->xdev, &pdev->evtchn); in pcifront_publish_info() 264 pdev->ndev = BUS_ADD_CHILD(nexus, 0, "xpcife", pdev->unit); in pcifront_connect() 269 get_pdev(pdev); in pcifront_connect() 270 device_set_ivars(pdev->ndev, pdev); in pcifront_connect() 320 put_pdev(pdev); in pcifront_probe() [all …]
|
| /freebsd-12.1/tools/tools/usbtest/ |
| H A D | usb_control_ep_test.c | 90 if (pdev == NULL) { in usb_control_ep_error_test() 97 libusb20_dev_free(pdev); in usb_control_ep_error_test() 158 libusb20_dev_free(pdev); in usb_control_ep_error_test() 174 if (pdev == NULL) { in usb_get_string_desc_test() 235 libusb20_dev_free(pdev); in usb_get_string_desc_test() 256 if (pdev == NULL) { in usb_port_reset_test() 319 if (pdev == NULL) { in usb_set_config_test() 373 if (pdev == NULL) { in usb_get_descriptor_test() 407 if (pdev == NULL) { in usb_suspend_resume_test() 482 if (pdev == NULL) { in usb_set_and_clear_stall_test() [all …]
|
| H A D | usb_msc_test.c | 876 pdev = NULL; in show_host_device_selection() 881 while ((pdev = libusb20_be_device_foreach(pbe, pdev))) { in show_host_device_selection() 925 while ((pdev = libusb20_be_device_foreach(pbe, pdev))) { in find_usb_device() 942 return (pdev); in find_usb_device() 1023 if (pdev == NULL) { in exec_host_msc_test() 1031 libusb20_dev_free(pdev); in exec_host_msc_test() 1039 libusb20_dev_free(pdev); in exec_host_msc_test() 1049 libusb20_dev_free(pdev); in exec_host_msc_test() 1056 libusb20_dev_free(pdev); in exec_host_msc_test() 1059 usb_pdev = pdev; in exec_host_msc_test() [all …]
|
| H A D | usb_modem_test.c | 433 struct libusb20_device *pdev; in exec_host_modem_test() local 443 pdev = find_usb_device(vid, pid); in exec_host_modem_test() 444 if (pdev == NULL) { in exec_host_modem_test() 456 libusb20_dev_free(pdev); in exec_host_modem_test() 460 libusb20_dev_get_desc(pdev), iface); in exec_host_modem_test() 462 if (libusb20_dev_open(pdev, 2)) { in exec_host_modem_test() 464 libusb20_dev_free(pdev); in exec_host_modem_test() 474 libusb20_dev_free(pdev); in exec_host_modem_test() 481 libusb20_dev_free(pdev); in exec_host_modem_test() 484 p->usb_dev = pdev; in exec_host_modem_test() [all …]
|
| /freebsd-12.1/sys/compat/linuxkpi/common/src/ |
| H A D | linux_pci.c | 129 struct pci_dev *pdev; in linux_pci_attach() local 161 pdev->dev.dma_mask = &pdev->dma_mask; in linux_pci_attach() 162 pdev->pdrv = pdrv; in linux_pci_attach() 172 pdev->irq = pdev->dev.irq; in linux_pci_attach() 175 pbus->self = pdev; in linux_pci_attach() 177 pdev->bus = pbus; in linux_pci_attach() 198 struct pci_dev *pdev; in linux_pci_detach() local 203 pdev->pdrv->remove(pdev); in linux_pci_detach() 229 error = -pdev->pdrv->suspend(pdev, pm); in linux_pci_suspend() 251 error = -pdev->pdrv->resume(pdev); in linux_pci_resume() [all …]
|
| /freebsd-12.1/sys/compat/linuxkpi/common/include/linux/ |
| H A D | pci.h | 259 struct pci_dev *pdev; in linux_pci_find_irq_dev() local 266 (irq >= pdev->dev.irq_start && irq < pdev->dev.irq_end)) { in linux_pci_find_irq_dev() 267 found = &pdev->dev; in linux_pci_find_irq_dev() 448 pdev->dev.irq_start = 0; in pci_disable_msix() 449 pdev->dev.irq_end = 0; in pci_disable_msix() 461 pdev->dev.irq_start = 0; in linux_pci_disable_msi() 462 pdev->dev.irq_end = 0; in linux_pci_disable_msi() 463 pdev->irq = pdev->dev.irq; in linux_pci_disable_msi() 464 pdev->msi_enabled = false; in linux_pci_disable_msi() 652 pdev->irq = rle->start; in pci_enable_msi() [all …]
|
| /freebsd-12.1/sys/dev/ow/ |
| H A D | own.h | 44 device_t ndev = device_get_parent(pdev); in own_send_command() 56 own_acquire_bus(device_t pdev, int how) in own_acquire_bus() argument 58 device_t ndev = device_get_parent(pdev); in own_acquire_bus() 60 return OWN_ACQUIRE_BUS(ndev, pdev, how); in own_acquire_bus() 64 own_release_bus(device_t pdev) in own_release_bus() argument 66 device_t ndev = device_get_parent(pdev); in own_release_bus() 68 OWN_RELEASE_BUS(ndev, pdev); in own_release_bus() 85 mep = ow_get_romid(pdev); in own_self_command() 98 rv = own_acquire_bus(pdev, OWN_WAIT); in own_command_wait() 101 rv = own_send_command(pdev, cmd); in own_command_wait() [all …]
|
| H A D | ow.c | 541 ow_print_child(device_t ndev, device_t pdev) in ow_print_child() argument 546 di = device_get_ivars(pdev); in ow_print_child() 548 retval += bus_print_child_header(ndev, pdev); in ow_print_child() 550 retval += bus_print_child_footer(ndev, pdev); in ow_print_child() 560 di = device_get_ivars(pdev); in ow_probe_nomatch() 573 if (sc->owner == pdev) in ow_acquire_bus() 576 device_get_nameunit(pdev)); in ow_acquire_bus() 584 sc->owner = pdev; in ow_acquire_bus() 591 ow_release_bus(device_t ndev, device_t pdev) in ow_release_bus() argument 600 device_get_nameunit(pdev)); in ow_release_bus() [all …]
|
| /freebsd-12.1/usr.sbin/usbconfig/ |
| H A D | dump.c | 271 dump_endpoint(struct libusb20_device *pdev, in dump_endpoint() argument 283 dump_iface(struct libusb20_device *pdev, in dump_iface() argument 295 dump_endpoint(pdev, iface->endpoints + z); in dump_iface() 307 usage = libusb20_dev_get_power_usage(pdev); in dump_device_info() 310 libusb20_dev_get_desc(pdev), in dump_device_info() 311 libusb20_dev_get_config_index(pdev), in dump_device_info() 312 dump_mode(libusb20_dev_get_mode(pdev)), in dump_device_info() 326 libusb20_dev_get_bus_number(pdev), in dump_device_info() 435 dump_iface(pdev, pcfg->interface + x); in dump_config() 439 dump_iface(pdev, in dump_config() [all …]
|
| H A D | usbconfig.c | 324 struct libusb20_device *pdev = NULL; in flush_command() local 381 while ((pdev = libusb20_be_device_foreach(pbe, pdev))) { in flush_command() 415 if (libusb20_dev_open(pdev, 0)) { in flush_command() 465 if (libusb20_dev_reset(pdev)) { in flush_command() 512 dump_device_info(pdev, in flush_command() 517 dump_device_desc(pdev); in flush_command() 521 dump_config(pdev, 1); in flush_command() 524 dump_config(pdev, 0); in flush_command() 527 dump_device_desc(pdev); in flush_command() 528 dump_config(pdev, 1); in flush_command() [all …]
|
| /freebsd-12.1/sys/dev/extres/clk/ |
| H A D | clkdev_if.m | 39 device_t pdev; 42 if (pdev == NULL) 51 device_t pdev; 54 if (pdev == NULL) 64 device_t pdev; 67 if (pdev == NULL) 76 device_t pdev; 79 if (pdev == NULL) 82 CLKDEV_DEVICE_LOCK(pdev); 88 device_t pdev; [all …]
|
| /freebsd-12.1/sys/dev/mthca/ |
| H A D | mthca_reset.c | 77 while ((bridge = pci_get_device(mdev->pdev->vendor, in mthca_reset() 78 mdev->pdev->device + 2, in mthca_reset() 81 bridge->subordinate == mdev->pdev->bus) { in mthca_reset() 95 pci_name(mdev->pdev)); in mthca_reset() 116 if (pci_read_config_dword(mdev->pdev, i * 4, hca_header + i)) { in mthca_reset() 124 hca_pcix_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX); in mthca_reset() 125 hca_pcie_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP); in mthca_reset() 159 void __iomem *reset = ioremap(pci_resource_start(mdev->pdev, 0) + in mthca_reset() 246 if (pci_write_config_dword(mdev->pdev, hca_pcix_cap, in mthca_reset() 278 if (pci_write_config_dword(mdev->pdev, i * 4, hca_header[i])) { in mthca_reset() [all …]
|
| H A D | mthca_main.c | 144 if (pcix_set_mmrbc(mdev->pdev, pcix_get_max_mmrbc(mdev->pdev))) { in mthca_tune_pci() 768 dev->pdev->irq); in mthca_setup_hca() 907 pci_name(pdev)); in __mthca_init_one() 941 pci_set_master(pdev); in __mthca_init_one() 975 mdev->pdev = pdev; in __mthca_init_one() 1021 pci_disable_msix(pdev); in __mthca_init_one() 1065 pci_disable_msix(pdev); in __mthca_init_one() 1079 pci_disable_device(pdev); in __mthca_init_one() 1116 pci_disable_msix(pdev); in __mthca_remove_one() 1134 __mthca_remove_one(pdev); in __mthca_restart_one() [all …]
|
| /freebsd-12.1/sys/dev/mlx5/mlx5_core/ |
| H A D | mlx5_main.c | 219 struct pci_dev *pdev = dev->pdev; in mlx5_pci_enable_device() local 235 struct pci_dev *pdev = dev->pdev; in mlx5_pci_disable_device() local 239 pci_disable_device(pdev); in mlx5_pci_disable_device() 854 struct pci_dev *pdev = dev->pdev; in mlx5_pci_init() local 873 err = request_bar(pdev); in mlx5_pci_init() 879 pci_set_master(pdev); in mlx5_pci_init() 898 release_bar(dev->pdev); in mlx5_pci_init() 908 release_bar(dev->pdev); in mlx5_pci_close() 1313 dev->pdev = pdev; in init_one() 1466 pci_set_master(pdev); in mlx5_pci_slot_reset() [all …]
|
| /freebsd-12.1/sys/dev/ena/ |
| H A D | ena.c | 301 device_t pdev = adapter->pdev; in ena_allocate_pci_resources() local 320 device_t pdev = adapter->pdev; in ena_free_pci_resources() local 2546 if_initname(ifp, device_get_name(pdev), device_get_unit(pdev)); in ena_setup_ifnet() 2547 if_setdev(ifp, pdev); in ena_setup_ifnet() 3250 device_printf(pdev, in ena_device_init() 3267 device_printf(pdev, in ena_device_init() 3639 ena_attach(device_t pdev) in ena_attach() argument 3651 adapter->pdev = pdev; in ena_attach() 3678 ena_dev->dmadev = pdev; in ena_attach() 3765 device_printf(pdev, in ena_attach() [all …]
|
| /freebsd-12.1/sys/dev/flash/ |
| H A D | n25q.c | 149 device_t pdev; in n25q_wait_for_device_ready() local 153 pdev = device_get_parent(dev); in n25q_wait_for_device_ready() 167 device_t pdev; in n25q_get_device_ident() local 171 pdev = device_get_parent(sc->dev); in n25q_get_device_ident() 194 device_t pdev; in n25q_write() local 197 pdev = device_get_parent(dev); in n25q_write() 202 err = QSPI_ERASE(pdev, dev, offset); in n25q_write() 216 device_t pdev; in n25q_read() local 219 pdev = device_get_parent(dev); in n25q_read() 244 device_t pdev; in n25q_set_4b_mode() local [all …]
|
| /freebsd-12.1/sys/dev/mlx4/mlx4_core/ |
| H A D | mlx4_reset.c | 79 pcie_cap = pci_pcie_cap(dev->persist->pdev); in mlx4_reset() 84 if (pci_read_config_dword(dev->persist->pdev, i * 4, in mlx4_reset() 92 reset = ioremap(pci_resource_start(dev->persist->pdev, 0) + in mlx4_reset() 127 if (!pci_read_config_word(dev->persist->pdev, PCI_VENDOR_ID, in mlx4_reset() 143 if (pcie_capability_write_word(dev->persist->pdev, in mlx4_reset() 151 if (pcie_capability_write_word(dev->persist->pdev, in mlx4_reset() 164 if (pci_write_config_dword(dev->persist->pdev, i * 4, in mlx4_reset() 173 if (pci_write_config_dword(dev->persist->pdev, PCI_COMMAND, in mlx4_reset()
|
| H A D | mlx4_main.c | 176 struct pci_dev *pdev; member 3050 return PCI_SLOT(pdev->devfn) * 8 + PCI_FUNC(pdev->devfn); in extended_func_num() 3174 struct pci_dev *pdev = dev->persist->pdev; in mlx4_pci_enable_device() local 3190 struct pci_dev *pdev = dev->persist->pdev; in mlx4_pci_disable_device() local 3638 dev_err(&pdev->dev, in __mlx4_init_one() 3647 dev_err(&pdev->dev, in __mlx4_init_one() 3676 pci_set_master(pdev); in __mlx4_init_one() 3769 dev->persist->pdev = pdev; in mlx4_init_one() 3932 mlx4_unload_one(pdev); in mlx4_remove_one() 3980 mlx4_unload_one(pdev); in mlx4_restart_one() [all …]
|
| /freebsd-12.1/sys/dev/mlx5/mlx5_fpga/ |
| H A D | core.h | 87 dev_dbg(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \ 91 dev_err(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \ 95 dev_warn(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d:(pid %d): " format, \ 99 dev_warn_ratelimited(&(__adev)->mdev->pdev->dev, "FPGA: %s:%d: " \ 103 dev_notice(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__) 106 dev_info(&(__adev)->mdev->pdev->dev, "FPGA: " format, ##__VA_ARGS__)
|