/linux/net/bluetooth/cmtp/ |
H A D | capi.c | 3 Copyright (C) 2002-2003 Marcel Holtmann <marcel@holtmann.org> 82 app->state = BT_OPEN; in cmtp_application_add() 83 app->appl = appl; in cmtp_application_add() 85 list_add_tail(&app->list, &session->applications); in cmtp_application_add() 95 list_del(&app->list); in cmtp_application_del() 104 list_for_each_entry(app, &session->applications, list) { in cmtp_application_get() 107 if (app->msgnum == value) in cmtp_application_get() 111 if (app->appl == value) in cmtp_application_get() 115 if (app->mapping == value) in cmtp_application_get() 126 session->msgnum++; in cmtp_msgnum_get() [all …]
|
/linux/drivers/nvme/host/ |
H A D | tcp.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include <linux/nvme-tcp.h> 13 #include <linux/nvme-keyring.h> 19 #include <linux/blk-mq.h> 30 * A non-zero value being sufficient to indicate general consideration of any 44 MODULE_PARM_DESC(wq_unbound, "Use unbound workqueue for nvme-tcp IO context (default false)"); 60 * sk_lock -> mmap_lock (page fault) -> fs locks -> sk_lock 61 * because dependencies are tracked for both nvme-tcp and user contexts. Using 62 * a separate class prevents lockdep from conflating nvme-tcp socket use with 63 * user-space socket API use. [all …]
|
H A D | fabrics.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2015-2016 HGST, a Western Digital Company. 15 #include <linux/nvme-keyring.h> 33 kref_init(&host->ref); in nvmf_host_alloc() 34 uuid_copy(&host->id, id); in nvmf_host_alloc() 35 strscpy(host->nqn, hostnqn, NVMF_NQN_SIZE); in nvmf_host_alloc() 53 bool same_hostnqn = !strcmp(host->nqn, hostnqn); in nvmf_host_add() 54 bool same_hostid = uuid_equal(&host->id, id); in nvmf_host_add() 57 kref_get(&host->ref); in nvmf_host_add() 63 host = ERR_PTR(-EINVAL); in nvmf_host_add() [all …]
|
/linux/drivers/spmi/ |
H A D | spmi-apple-controller.c | 1 // SPDX-License-Identifier: GPL-2.0 10 * hisi-spmi-controller.c 11 * spmi-pmic-arb.c Copyright (c) 2021, The Linux Foundation. 36 readl_poll_timeout((spmi)->regs + (reg), (val), (cond), \ 39 static inline u32 apple_spmi_pack_cmd(u8 opc, u8 sid, u16 saddr, size_t len) in apple_spmi_pack_cmd() argument 41 return opc | sid << 8 | saddr << 16 | (len - 1) | (1 << 15); in apple_spmi_pack_cmd() 45 static int apple_spmi_wait_rx_not_empty(struct spmi_controller *ctrl) in apple_spmi_wait_rx_not_empty() argument 47 struct apple_spmi *spmi = spmi_controller_get_drvdata(ctrl); in apple_spmi_wait_rx_not_empty() 53 dev_err(&ctrl->dev, in apple_spmi_wait_rx_not_empty() 61 static int spmi_read_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid, in spmi_read_cmd() argument [all …]
|
H A D | spmi-mtk-pmif.c | 1 // SPDX-License-Identifier: GPL-2.0 267 return readl(arb->base + arb->data->regs[reg]); in pmif_readl() 272 writel(val, arb->base + arb->data->regs[reg]); in pmif_writel() 277 writel(val, arb->spmimst_base + arb->data->spmimst_regs[reg]); in mtk_spmi_writel() 284 reg_rdata = pmif_readl(arb, arb->chan.ch_sta); in pmif_is_fsm_vldclr() 289 static int pmif_arb_cmd(struct spmi_controller *ctrl, u8 opc, u8 sid) in pmif_arb_cmd() argument 291 struct pmif *arb = spmi_controller_get_drvdata(ctrl); in pmif_arb_cmd() 297 return -EINVAL; in pmif_arb_cmd() 299 cmd = opc - SPMI_CMD_RESET; in pmif_arb_cmd() 302 ret = readl_poll_timeout_atomic(arb->spmimst_base + arb->data->spmimst_regs[SPMI_OP_ST_STA], in pmif_arb_cmd() [all …]
|
/linux/arch/arm64/kernel/ |
H A D | hw_breakpoint.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, 10 #define pr_fmt(fmt) "hw-breakpoint: " fmt 23 #include <asm/debug-monitors.h> 36 /* Currently stepping a per-CPU kernel breakpoint. */ 150 return -EINVAL; in debug_exception_level() 163 struct task_struct *tsk = bp->hw.target; in is_compat_bp() 166 * tsk can be NULL for per-cpu (non-ptrace) breakpoints. in is_compat_bp() 176 * hw_breakpoint_slot_setup - Find and setup a perf slot according to 186 * -ENOSPC if no slot is available/matches [all …]
|
/linux/drivers/scsi/arm/ |
H A D | cumana_1.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright 1995-2002, Russell King 17 #define priv(host) ((struct NCR5380_hostdata *)(host)->hostdata) 31 unsigned ctrl 39 #define CTRL 0x16fc macro 45 unsigned char *addr, int len) in cumanascsi_pwrite() argument 48 u8 __iomem *base = hostdata->io; in cumanascsi_pwrite() 49 u8 __iomem *dma = hostdata->pdma_io + 0x2000; in cumanascsi_pwrite() 51 if(!len) return 0; in cumanascsi_pwrite() 53 writeb(0x02, base + CTRL); in cumanascsi_pwrite() [all …]
|
/linux/sound/soc/codecs/ |
H A D | sigmadsp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2009-2014 Analog Devices Inc. 90 __le16 len; member 96 const uint8_t data[], size_t len) in sigmadsp_write() argument 98 return sigmadsp->write(sigmadsp->control_data, addr, data, len); in sigmadsp_write() 102 uint8_t data[], size_t len) in sigmadsp_read() argument 104 return sigmadsp->read(sigmadsp->control_data, addr, data, len); in sigmadsp_read() 110 struct sigmadsp_control *ctrl = (void *)kcontrol->private_value; in sigmadsp_ctrl_info() local 112 info->type = SNDRV_CTL_ELEM_TYPE_BYTES; in sigmadsp_ctrl_info() 113 info->count = ctrl->num_bytes; in sigmadsp_ctrl_info() [all …]
|
/linux/drivers/misc/mei/ |
H A D | dma-ring.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright(c) 2016-2018 Intel Corporation. All rights reserved. 5 #include <linux/dma-mapping.h> 11 * mei_dmam_dscr_alloc() - allocate a managed coherent buffer 17 * * 0 - on success or zero allocation request 18 * * -EINVAL - if size is not power of 2 19 * * -ENOMEM - of allocation has failed 24 if (!dscr->size) in mei_dmam_dscr_alloc() 27 if (WARN_ON(!is_power_of_2(dscr->size))) in mei_dmam_dscr_alloc() 28 return -EINVAL; in mei_dmam_dscr_alloc() [all …]
|
/linux/drivers/media/pci/cx25821/ |
H A D | cx25821-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 27 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \ 38 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() 39 struct cx25821_dev *dev = bus->dev; in i2c_slave_did_ack() 40 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 45 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() 46 struct cx25821_dev *dev = bus->dev; in i2c_is_busy() 47 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 69 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() 70 struct cx25821_dev *dev = bus->dev; in i2c_sendbytes() [all …]
|
/linux/drivers/usb/gadget/function/ |
H A D | f_uac1_legacy.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * f_audio.c -- USB Audio class function driver 26 * We have two interfaces- AudioControl and AudioStreaming 52 /* B.3.2 Class-Specific AC Interface Descriptor */ 146 /* B.4.2 Class-Specific AS Interface Descriptor */ 179 /* Class-specific AS ISO OUT Endpoint Descriptor */ 230 .language = 0x0409, /* en-us */ 243 /*-------------------------------------------------------------------------*/ 256 return ERR_PTR(-ENOMEM); in f_audio_buffer_alloc() 258 copy_buf->buf = kzalloc(buf_size, GFP_ATOMIC); in f_audio_buffer_alloc() [all …]
|
/linux/include/linux/ |
H A D | spmi.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 34 * struct spmi_device - Basic representation of an SPMI device 36 * @ctrl: SPMI controller managing the bus hosting this device. 41 struct spmi_controller *ctrl; member 52 return dev_get_drvdata(&sdev->dev); in spmi_device_get_drvdata() 57 dev_set_drvdata(&sdev->dev, data); in spmi_device_set_drvdata() 60 struct spmi_device *spmi_device_alloc(struct spmi_controller *ctrl); 65 put_device(&sdev->dev); in spmi_device_put() 73 * struct spmi_controller - interface to the SPMI master controller [all …]
|
/linux/drivers/media/pci/cx23885/ |
H A D | cx23885-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 #include <media/v4l2-common.h> 39 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() 40 struct cx23885_dev *dev = bus->dev; in i2c_slave_did_ack() 41 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 46 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() 47 struct cx23885_dev *dev = bus->dev; in i2c_is_busy() 48 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 70 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() 71 struct cx23885_dev *dev = bus->dev; in i2c_sendbytes() [all …]
|
/linux/drivers/nvme/target/ |
H A D | admin-cmd.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (c) 2015-2016 HGST, a Western Digital Company. 17 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_delete_sq() local 18 u16 sqid = le16_to_cpu(req->cmd->delete_queue.qid); in nvmet_execute_delete_sq() 21 if (!nvmet_is_pci_ctrl(ctrl)) { in nvmet_execute_delete_sq() 31 status = nvmet_check_sqid(ctrl, sqid, false); in nvmet_execute_delete_sq() 35 status = ctrl->ops->delete_sq(ctrl, sqid); in nvmet_execute_delete_sq() 43 struct nvmet_ctrl *ctrl = req->sq->ctrl; in nvmet_execute_create_sq() local 44 struct nvme_command *cmd = req->cmd; in nvmet_execute_create_sq() 45 u16 sqid = le16_to_cpu(cmd->create_sq.sqid); in nvmet_execute_create_sq() [all …]
|
H A D | auth.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * NVMe over Fabrics DH-HMAC-CHAP authentication. 17 #include <linux/nvme-auth.h> 18 #include <linux/nvme-keyring.h> 31 kfree(host->dhchap_ctrl_secret); in nvmet_auth_set_key() 32 host->dhchap_ctrl_secret = NULL; in nvmet_auth_set_key() 33 host->dhchap_ctrl_key_hash = 0; in nvmet_auth_set_key() 35 kfree(host->dhchap_secret); in nvmet_auth_set_key() 36 host->dhchap_secret = NULL; in nvmet_auth_set_key() 37 host->dhchap_key_hash = 0; in nvmet_auth_set_key() [all …]
|
/linux/arch/arm/kernel/ |
H A D | hw_breakpoint.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * HW_breakpoint: a unified kernel/user-space hardware breakpoint facility, 13 #define pr_fmt(fmt) "hw-breakpoint: " fmt 151 /* We don't support the memory-mapped interface. */ in debug_arch_supported() 216 return core_has_mismatch_brps() ? brps - 1 : brps; in get_num_brps() 257 return -ENODEV; in enable_monitor_mode() 265 return -EPERM; in enable_monitor_mode() 293 * Check if 8-bit byte-address select is available. 299 struct arch_hw_breakpoint_ctrl ctrl; in get_max_wp_len() local 305 memset(&ctrl, 0, sizeof(ctrl)); in get_max_wp_len() [all …]
|
/linux/drivers/scsi/be2iscsi/ |
H A D | be_mgmt.c | 16 * OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH 22 * linux-drivers@broadcom.com 26 #include <linux/bsg-lib.h> 33 unsigned int mgmt_vendor_specific_fw_cmd(struct be_ctrl_info *ctrl, in mgmt_vendor_specific_fw_cmd() argument 41 struct iscsi_bsg_request *bsg_req = job->request; in mgmt_vendor_specific_fw_cmd() 42 struct be_bsg_vendor_cmd *req = nonemb_cmd->va; in mgmt_vendor_specific_fw_cmd() 45 nonemb_cmd->size = job->request_payload.payload_len; in mgmt_vendor_specific_fw_cmd() 46 memset(nonemb_cmd->va, 0, nonemb_cmd->size); in mgmt_vendor_specific_fw_cmd() 47 region = bsg_req->rqst_data.h_vendor.vendor_cmd[1]; in mgmt_vendor_specific_fw_cmd() 48 sector_size = bsg_req->rqst_data.h_vendor.vendor_cmd[2]; in mgmt_vendor_specific_fw_cmd() [all …]
|
/linux/drivers/pci/hotplug/ |
H A D | shpchp_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Copyright (c) 2001,2003 Greg Kroah-Hartman (greg@kroah.com) 29 size_t len = 0; in show_ctrl() local 33 bus = pdev->subordinate; in show_ctrl() 35 len += sysfs_emit_at(buf, len, "Free resources: memory\n"); in show_ctrl() 37 if (res && (res->flags & IORESOURCE_MEM) && in show_ctrl() 38 !(res->flags & IORESOURCE_PREFETCH)) { in show_ctrl() 39 len += sysfs_emit_at(buf, len, in show_ctrl() 41 (unsigned long long)res->start, in show_ctrl() 45 len += sysfs_emit_at(buf, len, "Free resources: prefetchable memory\n"); in show_ctrl() [all …]
|
/linux/drivers/slimbus/ |
H A D | messaging.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2011-2017, The Linux Foundation 11 * slim_msg_response() - Deliver Message response received from a device to the 14 * @ctrl: Controller handle 17 * @len: Length of the reply 20 * This helps in making the API asynchronous, and controller-driver doesn't need 24 void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len) in slim_msg_response() argument 30 spin_lock_irqsave(&ctrl->txn_lock, flags); in slim_msg_response() 31 txn = idr_find(&ctrl->tid_idr, tid); in slim_msg_response() 32 spin_unlock_irqrestore(&ctrl->txn_lock, flags); in slim_msg_response() [all …]
|
/linux/drivers/hid/surface-hid/ |
H A D | surface_kbd.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright (C) 2019-2021 Maximilian Luz <luzmaximilian@gmail.com> 22 /* -- SAM interface (KBD). -------------------------------------------------- */ 34 static int ssam_kbd_get_descriptor(struct surface_hid_device *shid, u8 entry, u8 *buf, size_t len) in ssam_kbd_get_descriptor() argument 40 rqst.target_category = shid->uid.category; in ssam_kbd_get_descriptor() 41 rqst.target_id = shid->uid.target; in ssam_kbd_get_descriptor() 43 rqst.instance_id = shid->uid.instance; in ssam_kbd_get_descriptor() 48 rsp.capacity = len; in ssam_kbd_get_descriptor() 52 status = ssam_retry(ssam_request_do_sync_onstack, shid->ctrl, &rqst, &rsp, sizeof(entry)); in ssam_kbd_get_descriptor() 56 if (rsp.length != len) { in ssam_kbd_get_descriptor() [all …]
|
/linux/drivers/mtd/nand/raw/ |
H A D | fsl_ifc_nand.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2011-2012 Freescale Semiconductor, Inc 32 struct fsl_ifc_ctrl *ctrl; member 51 unsigned int eccread; /* Non zero for a full-page ECC read */ 67 .offs = 2, /* 0 on 8-bit small page */ 68 .len = 4, 77 .offs = 2, /* 0 on 8-bit small page */ 78 .len = 4, 90 return -ERANGE; in fsl_ifc_ooblayout_ecc() 92 oobregion->offset = 8; in fsl_ifc_ooblayout_ecc() [all …]
|
/linux/drivers/net/ethernet/freescale/fs_enet/ |
H A D | mii-bitbang.c | 1 // SPDX-License-Identifier: GPL-2.0-only 20 #include <linux/mdio-bitbang.h> 28 struct mdiobb_ctrl ctrl; member 55 static inline void mdio_dir(struct mdiobb_ctrl *ctrl, int dir) in mdio_dir() argument 57 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_dir() 60 bb_set(bitbang->dir, bitbang->mdio_msk); in mdio_dir() 62 bb_clr(bitbang->dir, bitbang->mdio_msk); in mdio_dir() 65 in_be32(bitbang->dir); in mdio_dir() 68 static inline int mdio_read(struct mdiobb_ctrl *ctrl) in mdio_read() argument 70 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_read() [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | dma.c | 1 // SPDX-License-Identifier: ISC 6 #include <linux/dma-mapping.h> 15 if ((_q)->flags & MT_QFLAG_WED) \ 16 _val = mtk_wed_device_reg_read((_q)->wed, \ 17 ((_q)->wed_regs + \ 20 _val = readl(&(_q)->regs->_field); \ 26 if ((_q)->flags & MT_QFLAG_WED) \ 27 mtk_wed_device_reg_write((_q)->wed, \ 28 ((_q)->wed_regs + _offset), \ 31 writel(_val, &(_q)->regs->_field); \ [all …]
|
/linux/include/soc/fsl/ |
H A D | dpaa2-fd.h | 1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 3 * Copyright 2014-2016 Freescale Semiconductor Inc. 14 * DOC: DPAA2 FD - Frame Descriptor APIs for DPAA2 27 * struct dpaa2_fd - Struct describing FDs 30 * @len: length in the FD 32 * @format_offset: format, offset, and short-length fields 34 * @ctrl: control bits...including dd, sc, va, err, etc 44 __le32 len; member 48 __le32 ctrl; member 80 /* Error bits in FD CTRL */ [all …]
|
/linux/drivers/i2c/busses/ |
H A D | i2c-microchip-corei2c.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2018-2022 Microchip Corporation. All rights reserved. 93 * struct mchp_corei2c_dev - Microchip CoreI2C device private data 131 u8 ctrl = readb(idev->base + CORE_I2C_CTRL); in mchp_corei2c_core_disable() local 133 ctrl &= ~CTRL_ENS1; in mchp_corei2c_core_disable() 134 writeb(ctrl, idev->base + CORE_I2C_CTRL); in mchp_corei2c_core_disable() 139 u8 ctrl = readb(idev->base + CORE_I2C_CTRL); in mchp_corei2c_core_enable() local 141 ctrl |= CTRL_ENS1; in mchp_corei2c_core_enable() 142 writeb(ctrl, idev->base + CORE_I2C_CTRL); in mchp_corei2c_core_enable() 153 u8 ctrl = readb(idev->base + CORE_I2C_CTRL); in mchp_corei2c_stop() local [all …]
|