/Linux-v6.1/net/caif/ |
D | cfpkt_skbuff.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson AB 2010 19 cfpkt_priv(pkt)->erronous = true; \ 20 skb_reset_tail_pointer(&pkt->skb); \ 47 return (struct cfpkt_priv_data *) pkt->skb.cb; in cfpkt_priv() 52 return cfpkt_priv(pkt)->erronous; in is_erronous() 57 return &pkt->skb; in pkt_to_skb() 68 cfpkt_priv(pkt)->erronous = false; in cfpkt_fromnative() 105 return skb->len > 0; in cfpkt_more() 112 memcpy(data, skb->data, len); in cfpkt_peek_head() [all …]
|
D | cfrfml.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson AB 2010 37 struct cfrfml *rfml = container_obj(&srvl->layer); in cfrfml_release() 39 if (rfml->incomplete_frm) in cfrfml_release() 40 cfpkt_destroy(rfml->incomplete_frm); in cfrfml_release() 54 cfsrvl_init(&this->serv, channel_id, dev_info, false); in cfrfml_create() 55 this->serv.release = cfrfml_release; in cfrfml_create() 56 this->serv.layer.receive = cfrfml_receive; in cfrfml_create() 57 this->serv.layer.transmit = cfrfml_transmit; in cfrfml_create() 60 tmp = (mtu_size - RFM_HEAD_SIZE - 6) / 16; in cfrfml_create() [all …]
|
D | cfveil.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson AB 2010 33 vei->layer.receive = cfvei_receive; in cfvei_create() 34 vei->layer.transmit = cfvei_transmit; in cfvei_create() 35 snprintf(vei->layer.name, CAIF_LAYER_NAME_SZ, "vei%d", channel_id); in cfvei_create() 36 return &vei->layer; in cfvei_create() 43 caif_assert(layr->up != NULL); in cfvei_receive() 44 caif_assert(layr->receive != NULL); in cfvei_receive() 45 caif_assert(layr->ctrlcmd != NULL); in cfvei_receive() 51 return -EPROTO; in cfvei_receive() [all …]
|
D | cfdgml.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson AB 2010 34 dgm->layer.receive = cfdgml_receive; in cfdgml_create() 35 dgm->layer.transmit = cfdgml_transmit; in cfdgml_create() 36 snprintf(dgm->layer.name, CAIF_LAYER_NAME_SZ, "dgm%d", channel_id); in cfdgml_create() 37 return &dgm->layer; in cfdgml_create() 42 u8 cmd = -1; in cfdgml_receive() 45 caif_assert(layr->up != NULL); in cfdgml_receive() 46 caif_assert(layr->receive != NULL); in cfdgml_receive() 47 caif_assert(layr->ctrlcmd != NULL); in cfdgml_receive() [all …]
|
D | cffrml.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) ST-Ericsson AB 2010 14 #include <linux/crc-ccitt.h> 40 this->pcpu_refcnt = alloc_percpu(int); in cffrml_create() 41 if (this->pcpu_refcnt == NULL) { in cffrml_create() 48 this->layer.receive = cffrml_receive; in cffrml_create() 49 this->layer.transmit = cffrml_transmit; in cffrml_create() 50 this->layer.ctrlcmd = cffrml_ctrlcmd; in cffrml_create() 51 snprintf(this->layer.name, CAIF_LAYER_NAME_SZ, "frm%d", phyid); in cffrml_create() 52 this->dofcs = use_fcs; in cffrml_create() [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | port.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 86 struct mlx5e_port_eth_proto eproto; in mlx5e_ptys_ext_supported() local 92 err = mlx5_port_query_eth_proto(mdev, 1, true, &eproto); in mlx5e_ptys_ext_supported() 96 return !!eproto.cap; in mlx5e_ptys_ext_supported() 111 struct mlx5e_port_eth_proto *eproto) in mlx5_port_query_eth_proto() argument 116 if (!eproto) in mlx5_port_query_eth_proto() 117 return -EINVAL; in mlx5_port_query_eth_proto() 123 eproto->cap = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, in mlx5_port_query_eth_proto() 125 eproto->admin = MLX5_GET_ETH_PROTO(ptys_reg, out, ext, eth_proto_admin); in mlx5_port_query_eth_proto() [all …]
|
/Linux-v6.1/net/rxrpc/ |
D | rxkad.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Kerberos-based RxRPC security 18 #include <linux/key-type.h> 21 #include <keys/rxrpc-type.h> 22 #include "ar-internal.h" 57 * The data should be the 8-byte secret key. 63 if (prep->datalen != 8) in rxkad_preparse_server_key() 64 return -EINVAL; in rxkad_preparse_server_key() 66 memcpy(&prep->payload.data[2], prep->data, 8); in rxkad_preparse_server_key() 74 if (crypto_skcipher_setkey(ci, prep->data, 8) < 0) in rxkad_preparse_server_key() [all …]
|
D | insecure.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 #include "ar-internal.h" 56 trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, in none_respond_to_challenge() 58 return -EPROTO; in none_respond_to_challenge() 67 trace_rxrpc_rx_eproto(NULL, sp->hdr.serial, in none_verify_response() 69 return -EPROTO; in none_verify_response() 86 * RxRPC Kerberos-based security
|
/Linux-v6.1/drivers/crypto/nx/ |
D | nx-common-powernv.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 #include "nx-842.h" 18 #include <asm/opal-api.h> 25 MODULE_ALIAS_CRYPTO("842-nx"); 76 * setup_indirect_dde - Setup an indirect DDE 85 dde->flags = 0; in setup_indirect_dde() 86 dde->count = dde_count; in setup_indirect_dde() 87 dde->index = 0; in setup_indirect_dde() 88 dde->length = cpu_to_be32(byte_count); in setup_indirect_dde() 89 dde->address = cpu_to_be64(nx842_get_pa(ddl)); in setup_indirect_dde() [all …]
|
/Linux-v6.1/drivers/rtc/ |
D | rtc-optee.c | 1 // SPDX-License-Identifier: GPL-2.0 40 * struct optee_rtc - OP-TEE RTC private data 41 * @dev: OP-TEE based RTC device. 42 * @ctx: OP-TEE context handler. 64 inv_arg.session = priv->session_id; in optee_rtc_readtime() 69 param[0].u.memref.shm = priv->shm; in optee_rtc_readtime() 72 ret = tee_client_invoke_func(priv->ctx, &inv_arg, param); in optee_rtc_readtime() 74 return ret ? ret : -EPROTO; in optee_rtc_readtime() 76 optee_tm = tee_shm_get_va(priv->shm, 0); in optee_rtc_readtime() 81 return -EPROTO; in optee_rtc_readtime() [all …]
|
/Linux-v6.1/drivers/hid/surface-hid/ |
D | surface_hid_core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright (C) 2019-2021 Maximilian Luz <luzmaximilian@gmail.com> 22 /* -- Utility functions. ---------------------------------------------------- */ 27 * Non-ssam client devices, i.e. platform client devices, cannot be in surface_hid_is_hot_removed() 28 * hot-removed. in surface_hid_is_hot_removed() 30 if (!is_ssam_device(shid->dev)) in surface_hid_is_hot_removed() 33 return ssam_device_is_hot_removed(to_ssam_device(shid->dev)); in surface_hid_is_hot_removed() 37 /* -- Device descriptor access. --------------------------------------------- */ 44 return -ENODEV; in surface_hid_load_hid_descriptor() 46 status = shid->ops.get_descriptor(shid, SURFACE_HID_DESC_HID, in surface_hid_load_hid_descriptor() [all …]
|
/Linux-v6.1/drivers/iio/common/ssp_sensors/ |
D | ssp_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 #define SSP_DEV (&data->spi->dev) 12 * SSP -> AP Instruction 15 * hrm etc. data. LIBRARY and META are mock-up's for now. 25 #define SSP_UNIMPLEMENTED -1 89 msg->buffer = kzalloc(SSP_HEADER_SIZE_ALIGNED + len, in ssp_create_msg() 91 if (!msg->buffer) { in ssp_create_msg() 96 msg->length = len; in ssp_create_msg() 97 msg->options = opt; in ssp_create_msg() 99 memcpy(msg->buffer, &h, SSP_HEADER_SIZE); in ssp_create_msg() [all …]
|
/Linux-v6.1/drivers/nfc/st-nci/ |
D | vendor_cmds.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2014-2015 STMicroelectronics SAS. All rights reserved. 14 #include "st-nci.h" 46 return -EINVAL; in st_nci_factory_mode() 52 test_and_set_bit(ST_NCI_FACTORY_MODE, &info->flags); in st_nci_factory_mode() 55 clear_bit(ST_NCI_FACTORY_MODE, &info->flags); in st_nci_factory_mode() 58 return -EINVAL; in st_nci_factory_mode() 104 HCI_DM_GET_INFO, skb->len); in st_nci_hci_dm_get_info() 106 r = -ENOMEM; in st_nci_hci_dm_get_info() 110 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, skb->len, skb->data)) { in st_nci_hci_dm_get_info() [all …]
|
/Linux-v6.1/drivers/nfc/s3fwrn5/ |
D | firmware.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 31 reinit_completion(&fw_info->completion); in s3fwrn5_fw_send_msg() 38 &fw_info->completion, msecs_to_jiffies(1000)); in s3fwrn5_fw_send_msg() 42 return -ENXIO; in s3fwrn5_fw_send_msg() 44 if (!fw_info->rsp) in s3fwrn5_fw_send_msg() 45 return -EINVAL; in s3fwrn5_fw_send_msg() 47 *rsp = fw_info->rsp; in s3fwrn5_fw_send_msg() 48 fw_info->rsp = NULL; in s3fwrn5_fw_send_msg() 59 hdr.type = type | fw_info->parity; in s3fwrn5_fw_prep_msg() 60 fw_info->parity ^= 0x80; in s3fwrn5_fw_prep_msg() [all …]
|
/Linux-v6.1/net/can/j1939/ |
D | address-claim.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2010-2011 EIA Electronics, 4 // Copyright (c) 2010-2011 EIA Electronics, 6 // Copyright (c) 2017-2019 Pengutronix, 7 // Marc Kleine-Budde <kernel@pengutronix.de> 8 // Copyright (c) 2017-2019 Pengutronix, 13 * - keeps track of the AC states of ECU's, 14 * - resolves NAME<=>SA taking into account the AC states of ECU's. 16 * All Address Claim msgs (including host-originated msg) are processed 30 #include "j1939-priv.h" [all …]
|
/Linux-v6.1/drivers/misc/mei/ |
D | hbm.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2003-2022, Intel Corporation. All rights reserved. 68 * mei_cl_conn_status_to_errno - convert client connect response 79 case MEI_CL_CONN_NOT_FOUND: return -ENOTTY; in mei_cl_conn_status_to_errno() 80 case MEI_CL_CONN_ALREADY_STARTED: return -EBUSY; in mei_cl_conn_status_to_errno() 81 case MEI_CL_CONN_OUT_OF_RESOURCES: return -EBUSY; in mei_cl_conn_status_to_errno() 82 case MEI_CL_CONN_MESSAGE_SMALL: return -EINVAL; in mei_cl_conn_status_to_errno() 83 case MEI_CL_CONN_NOT_ALLOWED: return -EBUSY; in mei_cl_conn_status_to_errno() 84 default: return -EINVAL; in mei_cl_conn_status_to_errno() 89 * mei_hbm_write_message - wrapper for sending hbm messages. [all …]
|
/Linux-v6.1/drivers/spi/ |
D | spi-dln2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for the Diolan DLN-2 USB-SPI adapter 111 tx.port = dln2->port; in dln2_spi_enable() 115 len -= sizeof(tx.wait_for_completion); in dln2_spi_enable() 121 return dln2_transfer_tx(dln2->pdev, cmd, &tx, len); in dln2_spi_enable() 129 * Ex: cs_mask = 0x03 -> CS0 & CS1 will be selected and the next WR/RD operation 139 tx.port = dln2->port; in dln2_spi_cs_set() 148 return dln2_transfer_tx(dln2->pdev, DLN2_SPI_SET_SS, &tx, sizeof(tx)); in dln2_spi_cs_set() 152 * Select one CS line. The other lines will be un-selected. 170 tx.port = dln2->port; in dln2_spi_cs_enable() [all …]
|
D | spi-cadence-xspi.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // Copyright (C) 2020-21 Cadence 19 #include <linux/spi/spi-mem.h> 26 #define CDNS_XSPI_NAME "cadence-xspi" 30 * configure XSPI controller pin-strap settings 153 FIELD_PREP(CDNS_XSPI_CMD_P1_R1_ADDR0, (op)->addr.val & 0xff)) 156 FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR1, ((op)->addr.val >> 8) & 0xFF) | \ 157 FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR2, ((op)->addr.val >> 16) & 0xFF) | \ 158 FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR3, ((op)->addr.val >> 24) & 0xFF) | \ 159 FIELD_PREP(CDNS_XSPI_CMD_P1_R2_ADDR4, ((op)->addr.val >> 32) & 0xFF)) [all …]
|
/Linux-v6.1/drivers/nfc/st21nfca/ |
D | vendor_cmds.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2014-2015 STMicroelectronics SAS. All rights reserved. 41 return -EINVAL; in st21nfca_factory_mode() 47 test_and_set_bit(ST21NFCA_FACTORY_MODE, &hdev->quirks); in st21nfca_factory_mode() 50 clear_bit(ST21NFCA_FACTORY_MODE, &hdev->quirks); in st21nfca_factory_mode() 53 return -EINVAL; in st21nfca_factory_mode() 101 HCI_DM_GET_INFO, skb->len); in st21nfca_hci_dm_get_info() 103 r = -ENOMEM; in st21nfca_hci_dm_get_info() 107 if (nla_put(msg, NFC_ATTR_VENDOR_DATA, skb->len, skb->data)) { in st21nfca_hci_dm_get_info() 109 r = -ENOBUFS; in st21nfca_hci_dm_get_info() [all …]
|
D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 27 * Reader gate for communication with contact-less cards using Type A 28 * protocol ISO14443-3 but not compliant with ISO14443-4 68 #define ST21NFCA_EVT_HOT_PLUG_IS_INHIBITED(x) (x->data[0] & 0x80) 121 * - It does useless EEPROM cycling in st21nfca_hci_load_session() 122 * - It might cause issue for secure elements support in st21nfca_hci_load_session() 125 * - get a pipe list for each host. in st21nfca_hci_load_session() 128 * - get pipe information in st21nfca_hci_load_session() 129 * - match retrieved pipe list in st21nfca_gates in st21nfca_hci_load_session() 148 for (i = 0; i < skb_pipe_list->len; i++) { in st21nfca_hci_load_session() [all …]
|
/Linux-v6.1/fs/afs/ |
D | misc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 22 case 13: return -EACCES; in afs_abort_to_error() 23 case 27: return -EFBIG; in afs_abort_to_error() 24 case 30: return -EROFS; in afs_abort_to_error() 26 /* VICE "special error" codes; 101 - 111 */ in afs_abort_to_error() 27 case VSALVAGE: return -EIO; in afs_abort_to_error() 28 case VNOVNODE: return -ENOENT; in afs_abort_to_error() 29 case VNOVOL: return -ENOMEDIUM; in afs_abort_to_error() 30 case VVOLEXISTS: return -EEXIST; in afs_abort_to_error() 31 case VNOSERVICE: return -EIO; in afs_abort_to_error() [all …]
|
/Linux-v6.1/drivers/base/ |
D | property.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * property.c - Unified device property interface. 22 return IS_ENABLED(CONFIG_OF) && dev->of_node ? in dev_fwnode() 23 of_fwnode_handle(dev->of_node) : dev->fwnode; in dev_fwnode() 28 * device_property_present - check if a property of a device is present 41 * fwnode_property_present - check if a property of a firmware node is present 57 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present() 62 * device_property_read_u8_array - return a u8 array property of a device 76 * %-EINVAL if given arguments are not valid, 77 * %-ENODATA if the property does not have a value, [all …]
|
/Linux-v6.1/net/nfc/nci/ |
D | hci.c | 1 // SPDX-License-Identifier: GPL-2.0-only 49 u8 header; /* type -cmd,evt,rsp- + instruction */ 101 return -EOPNOTSUPP; in nci_hci_result_to_errno() 103 return -ETIME; in nci_hci_result_to_errno() 105 return -1; in nci_hci_result_to_errno() 115 hdev->pipes[i].gate = NCI_HCI_INVALID_GATE; in nci_hci_reset_pipes() 116 hdev->pipes[i].host = NCI_HCI_INVALID_HOST; in nci_hci_reset_pipes() 118 memset(hdev->gate2pipe, NCI_HCI_INVALID_PIPE, sizeof(hdev->gate2pipe)); in nci_hci_reset_pipes() 126 if (ndev->hci_dev->pipes[i].host == host) { in nci_hci_reset_pipes_per_host() 127 ndev->hci_dev->pipes[i].gate = NCI_HCI_INVALID_GATE; in nci_hci_reset_pipes_per_host() [all …]
|
/Linux-v6.1/fs/dlm/ |
D | util.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 ** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved. 29 case -EDEADLK: in to_dlm_errno() 30 return -DLM_ERRNO_EDEADLK; in to_dlm_errno() 31 case -EBADR: in to_dlm_errno() 32 return -DLM_ERRNO_EBADR; in to_dlm_errno() 33 case -EBADSLT: in to_dlm_errno() 34 return -DLM_ERRNO_EBADSLT; in to_dlm_errno() 35 case -EPROTO: in to_dlm_errno() 36 return -DLM_ERRNO_EPROTO; in to_dlm_errno() [all …]
|
/Linux-v6.1/drivers/nfc/pn544/ |
D | pn544.c | 1 // SPDX-License-Identifier: GPL-2.0-only 131 mutex_lock(&info->info_lock); in pn544_hci_open() 133 if (info->state != PN544_ST_COLD) { in pn544_hci_open() 134 r = -EBUSY; in pn544_hci_open() 138 r = info->phy_ops->enable(info->phy_id); in pn544_hci_open() 141 info->state = PN544_ST_READY; in pn544_hci_open() 144 mutex_unlock(&info->info_lock); in pn544_hci_open() 152 mutex_lock(&info->info_lock); in pn544_hci_close() 154 if (info->state == PN544_ST_COLD) in pn544_hci_close() 157 info->phy_ops->disable(info->phy_id); in pn544_hci_close() [all …]
|