/drivers/staging/greybus/ |
D | authentication.c | 50 struct gb_cap *cap = container_of(kref, struct gb_cap, kref); in cap_kref_release() local 52 kfree(cap); in cap_kref_release() 60 static void put_cap(struct gb_cap *cap) in put_cap() argument 62 kref_put(&cap->kref, cap_kref_release); in put_cap() 68 struct gb_cap *cap; in get_cap() local 72 list_for_each_entry(cap, &cap_list, node) { in get_cap() 73 if (&cap->cdev == cdev) { in get_cap() 74 kref_get(&cap->kref); in get_cap() 79 cap = NULL; in get_cap() 84 return cap; in get_cap() [all …]
|
/drivers/net/ethernet/samsung/sxgbe/ |
D | sxgbe_reg.h | 412 #define SXGBE_HW_FEAT_GMII(cap) ((cap & 0x00000002) >> 1) argument 413 #define SXGBE_HW_FEAT_VLAN_HASH_FILTER(cap) ((cap & 0x00000010) >> 4) argument 414 #define SXGBE_HW_FEAT_SMA(cap) ((cap & 0x00000020) >> 5) argument 415 #define SXGBE_HW_FEAT_PMT_TEMOTE_WOP(cap) ((cap & 0x00000040) >> 6) argument 416 #define SXGBE_HW_FEAT_PMT_MAGIC_PKT(cap) ((cap & 0x00000080) >> 7) argument 417 #define SXGBE_HW_FEAT_RMON(cap) ((cap & 0x00000100) >> 8) argument 418 #define SXGBE_HW_FEAT_ARP_OFFLOAD(cap) ((cap & 0x00000200) >> 9) argument 419 #define SXGBE_HW_FEAT_IEEE1500_2008(cap) ((cap & 0x00001000) >> 12) argument 420 #define SXGBE_HW_FEAT_EEE(cap) ((cap & 0x00002000) >> 13) argument 421 #define SXGBE_HW_FEAT_TX_CSUM_OFFLOAD(cap) ((cap & 0x00004000) >> 14) argument [all …]
|
/drivers/thunderbolt/ |
D | cap.c | 21 static bool tb_cap_is_basic(struct tb_cap_any *cap) in tb_cap_is_basic() argument 24 return cap->basic.cap != 5; in tb_cap_is_basic() 27 static bool tb_cap_is_long(struct tb_cap_any *cap) in tb_cap_is_long() argument 29 return !tb_cap_is_basic(cap) in tb_cap_is_long() 30 && cap->extended_short.next == 0 in tb_cap_is_long() 31 && cap->extended_short.length == 0; in tb_cap_is_long() 34 static enum tb_cap tb_cap(struct tb_cap_any *cap) in tb_cap() argument 36 if (tb_cap_is_basic(cap)) in tb_cap() 37 return cap->basic.cap; in tb_cap() 40 return cap->extended_short.cap; in tb_cap() [all …]
|
/drivers/char/tpm/ |
D | tpm-sysfs.c | 91 cap_t cap; in pcrs_show() local 98 rc = tpm_getcap(chip, TPM_CAP_PROP_PCR, &cap, in pcrs_show() 103 num_pcrs = be32_to_cpu(cap.num_pcrs); in pcrs_show() 120 cap_t cap; in enabled_show() local 123 rc = tpm_getcap(to_tpm_chip(dev), TPM_CAP_FLAG_PERM, &cap, in enabled_show() 128 rc = sprintf(buf, "%d\n", !cap.perm_flags.disable); in enabled_show() 136 cap_t cap; in active_show() local 139 rc = tpm_getcap(to_tpm_chip(dev), TPM_CAP_FLAG_PERM, &cap, in active_show() 144 rc = sprintf(buf, "%d\n", !cap.perm_flags.deactivated); in active_show() 152 cap_t cap; in owned_show() local [all …]
|
/drivers/staging/lustre/lnet/libcfs/linux/ |
D | linux-curproc.c | 54 void cfs_cap_raise(cfs_cap_t cap) in cfs_cap_raise() argument 60 cap_raise(cred->cap_effective, cap); in cfs_cap_raise() 66 void cfs_cap_lower(cfs_cap_t cap) in cfs_cap_lower() argument 72 cap_lower(cred->cap_effective, cap); in cfs_cap_lower() 78 int cfs_cap_raised(cfs_cap_t cap) in cfs_cap_raised() argument 80 return cap_raised(current_cap(), cap); in cfs_cap_raised() 84 static void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap) in cfs_kernel_cap_pack() argument 87 *cap = kcap.cap[0]; in cfs_kernel_cap_pack() 92 cfs_cap_t cap; in cfs_curproc_cap_pack() local 94 cfs_kernel_cap_pack(current_cap(), &cap); in cfs_curproc_cap_pack() [all …]
|
/drivers/media/platform/exynos4-is/ |
D | common.c | 40 void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap, in __fimc_vidioc_querycap() argument 43 strlcpy(cap->driver, dev->driver->name, sizeof(cap->driver)); in __fimc_vidioc_querycap() 44 strlcpy(cap->card, dev->driver->name, sizeof(cap->card)); in __fimc_vidioc_querycap() 45 snprintf(cap->bus_info, sizeof(cap->bus_info), in __fimc_vidioc_querycap() 47 cap->device_caps = caps; in __fimc_vidioc_querycap() 48 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; in __fimc_vidioc_querycap()
|
/drivers/infiniband/hw/hfi1/ |
D | common.h | 94 #define HFI1_CAP_KSET(cap) ({ hfi1_cap_mask |= HFI1_CAP_##cap; hfi1_cap_mask; }) argument 95 #define HFI1_CAP_KCLEAR(cap) \ argument 97 hfi1_cap_mask &= ~HFI1_CAP_##cap; \ 100 #define HFI1_CAP_USET(cap) \ argument 102 hfi1_cap_mask |= (HFI1_CAP_##cap << HFI1_CAP_USER_SHIFT); \ 105 #define HFI1_CAP_UCLEAR(cap) \ argument 107 hfi1_cap_mask &= ~(HFI1_CAP_##cap << HFI1_CAP_USER_SHIFT); \ 110 #define HFI1_CAP_SET(cap) \ argument 112 hfi1_cap_mask |= (HFI1_CAP_##cap | (HFI1_CAP_##cap << \ 116 #define HFI1_CAP_CLEAR(cap) \ argument [all …]
|
/drivers/pci/ |
D | pci.c | 181 u8 pos, int cap, int *ttl) in __pci_find_next_cap_ttl() argument 197 if (id == cap) in __pci_find_next_cap_ttl() 205 u8 pos, int cap) in __pci_find_next_cap() argument 209 return __pci_find_next_cap_ttl(bus, devfn, pos, cap, &ttl); in __pci_find_next_cap() 212 int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap) in pci_find_next_capability() argument 215 pos + PCI_CAP_LIST_NEXT, cap); in pci_find_next_capability() 258 int pci_find_capability(struct pci_dev *dev, int cap) in pci_find_capability() argument 264 pos = __pci_find_next_cap(dev->bus, dev->devfn, pos, cap); in pci_find_capability() 283 int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) in pci_bus_find_capability() argument 292 pos = __pci_find_next_cap(bus, devfn, pos, cap); in pci_bus_find_capability() [all …]
|
/drivers/net/arcnet/ |
D | capmode.c | 77 memcpy(pktbuf, pkthdrbuf, ARC_HDR_SIZE + sizeof(pkt->soft.cap.proto)); in rx() 78 memcpy(pktbuf + ARC_HDR_SIZE + sizeof(pkt->soft.cap.proto) + sizeof(int), in rx() 79 pkthdrbuf + ARC_HDR_SIZE + sizeof(pkt->soft.cap.proto), in rx() 80 sizeof(struct archdr) - ARC_HDR_SIZE - sizeof(pkt->soft.cap.proto)); in rx() 107 *((int *)&pkt->soft.cap.cookie[0])); in build_header() 148 *((int *)&pkt->soft.cap.cookie[0])); in prepare_tx() 171 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft.cap.proto, in prepare_tx() 172 sizeof(pkt->soft.cap.proto)); in prepare_tx() 178 ((unsigned char *)&pkt->soft.cap.mes), length - 1); in prepare_tx() 212 ackpkt->soft.cap.proto = 0; /* using protocol 0 for acknowledge */ in ack_tx() [all …]
|
/drivers/media/i2c/m5mols/ |
D | m5mols_capture.c | 61 struct m5mols_exif *exif = &info->cap.exif; in m5mols_capture_info() 97 ret = m5mols_read_u32(sd, CAPC_IMAGE_SIZE, &info->cap.main); in m5mols_capture_info() 99 ret = m5mols_read_u32(sd, CAPC_THUMB_SIZE, &info->cap.thumb); in m5mols_capture_info() 101 info->cap.total = info->cap.main + info->cap.thumb; in m5mols_capture_info() 108 unsigned int framesize = info->cap.buf_size - M5MOLS_JPEG_TAGS_SIZE; in m5mols_start_capture() 150 size = captured ? info->cap.main : 0; in m5mols_start_capture() 152 __func__, size, info->cap.thumb); in m5mols_start_capture()
|
/drivers/rtc/ |
D | rtc-efi.c | 166 efi_time_cap_t cap; in efi_read_time() local 168 status = efi.get_time(&eft, &cap); in efi_read_time() 197 efi_time_cap_t cap; in efi_procfs() local 202 memset(&cap, 0, sizeof(cap)); in efi_procfs() 204 efi.get_time(&eft, &cap); in efi_procfs() 246 cap.resolution, cap.accuracy, cap.sets_to_zero); in efi_procfs() 263 efi_time_cap_t cap; in efi_rtc_probe() local 266 if (efi.get_time(&eft, &cap) != EFI_SUCCESS) in efi_rtc_probe()
|
/drivers/infiniband/sw/rxe/ |
D | rxe_qp.c | 52 static int rxe_qp_chk_cap(struct rxe_dev *rxe, struct ib_qp_cap *cap, in rxe_qp_chk_cap() argument 55 if (cap->max_send_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap() 57 cap->max_send_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 61 if (cap->max_send_sge > rxe->attr.max_sge) { in rxe_qp_chk_cap() 63 cap->max_send_sge, rxe->attr.max_sge); in rxe_qp_chk_cap() 68 if (cap->max_recv_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap() 70 cap->max_recv_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 74 if (cap->max_recv_sge > rxe->attr.max_sge) { in rxe_qp_chk_cap() 76 cap->max_recv_sge, rxe->attr.max_sge); in rxe_qp_chk_cap() 81 if (cap->max_inline_data > rxe->max_inline_data) { in rxe_qp_chk_cap() [all …]
|
/drivers/pci/pcie/ |
D | ptm.c | 43 u32 cap, ctrl; in pci_ptm_init() local 63 pci_read_config_dword(dev, pos + PCI_PTM_CAP, &cap); in pci_ptm_init() 64 local_clock = (cap & PCI_PTM_GRANULARITY_MASK) >> 8; in pci_ptm_init() 80 if (cap & PCI_PTM_CAP_ROOT) { in pci_ptm_init() 98 u32 cap, ctrl; in pci_enable_ptm() local 108 pci_read_config_dword(dev, pos + PCI_PTM_CAP, &cap); in pci_enable_ptm() 109 if (!(cap & PCI_PTM_CAP_REQ)) in pci_enable_ptm()
|
D | pcie-dpc.c | 92 u16 ctl, cap; in dpc_probe() local 111 pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CAP, &cap); in dpc_probe() 118 cap & 0xf, FLAG(cap, PCI_EXP_DPC_CAP_RP_EXT), in dpc_probe() 119 FLAG(cap, PCI_EXP_DPC_CAP_POISONED_TLP), in dpc_probe() 120 FLAG(cap, PCI_EXP_DPC_CAP_SW_TRIGGER), (cap >> 8) & 0xf, in dpc_probe() 121 FLAG(cap, PCI_EXP_DPC_CAP_DL_ACTIVE)); in dpc_probe()
|
/drivers/infiniband/hw/mlx5/ |
D | gsi.c | 46 struct ib_qp_cap cap; member 81 wr = &gsi->outstanding_wrs[index % gsi->cap.max_send_wr]; in generate_completions() 145 gsi->outstanding_wrs = kcalloc(init_attr->cap.max_send_wr, in mlx5_ib_gsi_create_qp() 166 gsi->cap = init_attr->cap; in mlx5_ib_gsi_create_qp() 171 gsi->cq = ib_alloc_cq(pd->device, gsi, init_attr->cap.max_send_wr, 0, in mlx5_ib_gsi_create_qp() 183 hw_init_attr.cap.max_send_wr = 0; in mlx5_ib_gsi_create_qp() 184 hw_init_attr.cap.max_send_sge = 0; in mlx5_ib_gsi_create_qp() 185 hw_init_attr.cap.max_inline_data = 0; in mlx5_ib_gsi_create_qp() 259 .cap = { in create_gsi_ud_qp() 260 .max_send_wr = gsi->cap.max_send_wr, in create_gsi_ud_qp() [all …]
|
/drivers/net/ethernet/sfc/ |
D | mcdi_port.c | 175 static u32 mcdi_to_ethtool_cap(u32 media, u32 cap) in mcdi_to_ethtool_cap() argument 182 if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) in mcdi_to_ethtool_cap() 184 if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) in mcdi_to_ethtool_cap() 186 if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) in mcdi_to_ethtool_cap() 194 if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) in mcdi_to_ethtool_cap() 196 if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) in mcdi_to_ethtool_cap() 198 if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) in mcdi_to_ethtool_cap() 204 if (cap & (1 << MC_CMD_PHY_CAP_10HDX_LBN)) in mcdi_to_ethtool_cap() 206 if (cap & (1 << MC_CMD_PHY_CAP_10FDX_LBN)) in mcdi_to_ethtool_cap() 208 if (cap & (1 << MC_CMD_PHY_CAP_100HDX_LBN)) in mcdi_to_ethtool_cap() [all …]
|
/drivers/infiniband/hw/hns/ |
D | hns_roce_qp.c | 257 struct ib_qp_cap *cap, int is_user, int has_srq, in hns_roce_set_rq_size() argument 264 if (cap->max_recv_wr > hr_dev->caps.max_wqes || in hns_roce_set_rq_size() 265 cap->max_recv_sge > hr_dev->caps.max_rq_sg) { in hns_roce_set_rq_size() 267 cap->max_recv_wr, cap->max_recv_sge); in hns_roce_set_rq_size() 273 if (cap->max_recv_wr) { in hns_roce_set_rq_size() 280 if (is_user && (!cap->max_recv_wr || !cap->max_recv_sge)) { in hns_roce_set_rq_size() 286 max_cnt = cap->max_recv_wr > HNS_ROCE_MIN_WQE_NUM ? in hns_roce_set_rq_size() 287 cap->max_recv_wr : HNS_ROCE_MIN_WQE_NUM; in hns_roce_set_rq_size() 295 max_cnt = max(1U, cap->max_recv_sge); in hns_roce_set_rq_size() 301 cap->max_recv_wr = hr_qp->rq.max_post = hr_qp->rq.wqe_cnt; in hns_roce_set_rq_size() [all …]
|
/drivers/media/pci/zoran/ |
D | zr36016.c | 311 struct vfe_settings *cap, in zr36016_set_video() argument 318 cap->x, cap->y, cap->width, cap->height, in zr36016_set_video() 319 cap->decimation); in zr36016_set_video() 324 ptr->width = cap->width; in zr36016_set_video() 325 ptr->height = cap->height; in zr36016_set_video() 332 ptr->xoff = (norm->HStart ? norm->HStart : 1) + cap->x; in zr36016_set_video() 337 ptr->yoff = norm->VStart + cap->y; in zr36016_set_video() 339 ptr->xdec = ((cap->decimation & 0xff) == 1) ? 0 : 1; in zr36016_set_video() 340 ptr->ydec = (((cap->decimation >> 8) & 0xff) == 1) ? 0 : 1; in zr36016_set_video()
|
D | zr36060.c | 596 struct vfe_settings *cap, in zr36060_set_video() argument 604 cap->x, cap->y, cap->width, cap->height, cap->decimation); in zr36060_set_video() 609 ptr->width = cap->width / (cap->decimation & 0xff); in zr36060_set_video() 610 ptr->height = cap->height / (cap->decimation >> 8); in zr36060_set_video() 630 switch (cap->decimation & 0xff) { in zr36060_set_video() 644 switch (cap->decimation >> 8) { in zr36060_set_video() 692 reg = cap->y + norm->VStart; /* Vstart */ in zr36060_set_video() 696 reg += cap->height; /* Vend */ in zr36060_set_video() 700 reg = cap->x + norm->HStart; /* Hstart */ in zr36060_set_video() 704 reg += cap->width; /* Hend */ in zr36060_set_video() [all …]
|
/drivers/platform/x86/ |
D | acer-wmi.c | 653 static bool has_cap(u32 cap) in has_cap() argument 655 if ((interface->capability & cap) != 0) in has_cap() 692 static acpi_status AMW0_get_u32(u32 *value, u32 cap) in AMW0_get_u32() argument 697 switch (cap) { in AMW0_get_u32() 762 static acpi_status AMW0_set_u32(u32 value, u32 cap) in AMW0_set_u32() argument 770 switch (cap) { in AMW0_set_u32() 976 static acpi_status WMID_get_u32(u32 *value, u32 cap) in WMID_get_u32() argument 982 switch (cap) { in WMID_get_u32() 1012 static acpi_status WMID_set_u32(u32 value, u32 cap) in WMID_set_u32() argument 1017 switch (cap) { in WMID_set_u32() [all …]
|
/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_dcb.c | 373 struct qlcnic_dcb_capability *cap = &dcb->cfg->capability; in __qlcnic_dcb_get_capability() local 377 memset(cap, 0, sizeof(struct qlcnic_dcb_capability)); in __qlcnic_dcb_get_capability() 385 cap->tsa_capability = true; in __qlcnic_dcb_get_capability() 388 cap->ets_capability = true; in __qlcnic_dcb_get_capability() 390 cap->max_num_tc = QLC_DCB_MAX_NUM_TC(mbx_out); in __qlcnic_dcb_get_capability() 391 cap->max_ets_tc = QLC_DCB_MAX_NUM_ETS_TC(mbx_out); in __qlcnic_dcb_get_capability() 392 cap->max_pfc_tc = QLC_DCB_MAX_NUM_PFC_TC(mbx_out); in __qlcnic_dcb_get_capability() 394 if (cap->max_num_tc > QLC_DCB_MAX_TC || in __qlcnic_dcb_get_capability() 395 cap->max_ets_tc > cap->max_num_tc || in __qlcnic_dcb_get_capability() 396 cap->max_pfc_tc > cap->max_num_tc) { in __qlcnic_dcb_get_capability() [all …]
|
/drivers/input/keyboard/ |
D | cap11xx.c | 343 const struct cap11xx_hw_model *cap; in cap11xx_i2c_probe() local 353 cap = &cap11xx_devices[id->driver_data]; in cap11xx_i2c_probe() 354 if (!cap || !cap->num_channels) { in cap11xx_i2c_probe() 361 cap->num_channels * sizeof(priv->keycodes[0]), in cap11xx_i2c_probe() 374 if (val != cap->product_id) { in cap11xx_i2c_probe() 376 val, cap->product_id); in cap11xx_i2c_probe() 413 for (i = 0; i < cap->num_channels; i++) in cap11xx_i2c_probe() 417 priv->keycodes, cap->num_channels); in cap11xx_i2c_probe() 441 for (i = 0; i < cap->num_channels; i++) in cap11xx_i2c_probe() 448 priv->idev->keycodemax = cap->num_channels; in cap11xx_i2c_probe() [all …]
|
/drivers/ata/ |
D | libahci.c | 260 return sprintf(buf, "%x\n", hpriv->cap); in ahci_show_host_caps() 442 u32 cap, cap2, vers, port_map; in ahci_save_initial_config() local 451 hpriv->saved_cap = cap = readl(mmio + HOST_CAP); in ahci_save_initial_config() 463 if ((cap & HOST_CAP_64) && (hpriv->flags & AHCI_HFLAG_32BIT_ONLY)) { in ahci_save_initial_config() 465 cap &= ~HOST_CAP_64; in ahci_save_initial_config() 468 if ((cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_NO_NCQ)) { in ahci_save_initial_config() 470 cap &= ~HOST_CAP_NCQ; in ahci_save_initial_config() 473 if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) { in ahci_save_initial_config() 475 cap |= HOST_CAP_NCQ; in ahci_save_initial_config() 478 if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { in ahci_save_initial_config() [all …]
|
/drivers/xen/xen-pciback/ |
D | conf_space_capability.c | 33 static inline void register_capability(struct xen_pcibk_config_capability *cap) in register_capability() argument 35 list_add_tail(&cap->cap_list, &capabilities); in register_capability() 41 struct xen_pcibk_config_capability *cap; in xen_pcibk_config_capability_add_fields() local 44 list_for_each_entry(cap, &capabilities, cap_list) { in xen_pcibk_config_capability_add_fields() 45 cap_offset = pci_find_capability(dev, cap->capability); in xen_pcibk_config_capability_add_fields() 48 cap->capability, cap_offset); in xen_pcibk_config_capability_add_fields() 56 cap->fields, in xen_pcibk_config_capability_add_fields()
|
/drivers/char/ |
D | efirtc.c | 153 efi_time_cap_t cap; in efi_rtc_ioctl() local 176 status = efi.get_time(&eft, &cap); in efi_rtc_ioctl() 302 efi_time_cap_t cap; in efi_rtc_proc_show() local 308 memset(&cap, 0, sizeof(cap)); in efi_rtc_proc_show() 312 efi.get_time(&eft, &cap); in efi_rtc_proc_show() 357 cap.resolution, cap.accuracy, cap.sets_to_zero); in efi_rtc_proc_show()
|