Home
last modified time | relevance | path

Searched +full:lock +full:- +full:status (Results 1 – 25 of 1046) sorted by relevance

12345678910>>...42

/linux/fs/ocfs2/dlm/
H A Ddlmlock.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * underlying calls for lock creation
45 struct dlm_lock *lock, int flags);
49 static void dlm_lock_detach_lockres(struct dlm_lock *lock);
57 return -ENOMEM; in dlm_init_lock_cache()
66 /* Tell us whether we can grant a new lock request.
68 * caller needs: res->spinlock
71 * returns: 1 if the lock can be granted, 0 otherwise.
74 struct dlm_lock *lock) in dlm_can_grant_new_lock() argument
78 list_for_each_entry(tmplock, &res->granted, list) { in dlm_can_grant_new_lock()
[all …]
H A Ddlmunlock.c1 // SPDX-License-Identifier: GPL-2.0-or-later
43 struct dlm_lock *lock,
48 struct dlm_lock *lock,
54 struct dlm_lock *lock,
67 * So to unlock a converting lock, you must first cancel the
76 * taken: res->spinlock and lock->spinlock taken and dropped
78 * returns: DLM_NORMAL, DLM_NOLOCKMGR, status from network
79 * all callers should have taken an extra ref on lock coming in
83 struct dlm_lock *lock, in dlmunlock_common() argument
88 enum dlm_status status; in dlmunlock_common() local
[all …]
H A Ddlmconvert.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * underlying calls for lock conversion
37 * needs a spinlock held on entry (res->spinlock) and it is the
38 * only one that holds a lock on exit (res->spinlock).
43 struct dlm_lock *lock, int flags,
48 struct dlm_lock *lock, int flags, int type);
55 * taken: takes and drops res->spinlock
61 struct dlm_lock *lock, int flags, int type) in dlmconvert_master() argument
64 enum dlm_status status; in dlmconvert_master() local
66 spin_lock(&res->spinlock); in dlmconvert_master()
[all …]
/linux/drivers/acpi/acpica/
H A Dutlock.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: utlock - Reader/Writer lock interfaces
6 * Copyright (C) 2000 - 2025, Intel Corp.
21 * PARAMETERS: lock - Pointer to a valid RW lock
23 * RETURN: Status
25 * DESCRIPTION: Reader/writer lock creation and deletion interfaces.
28 acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock) in acpi_ut_create_rw_lock() argument
30 acpi_status status; in acpi_ut_create_rw_lock() local
32 lock->num_readers = 0; in acpi_ut_create_rw_lock()
33 status = acpi_os_create_mutex(&lock->reader_mutex); in acpi_ut_create_rw_lock()
[all …]
H A Devglock.c1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: evglock - Global Lock support
6 * Copyright (C) 2000 - 2025, Intel Corp.
27 * RETURN: Status
29 * DESCRIPTION: Install a handler for the global lock release event
35 acpi_status status; in acpi_ev_init_global_lock_handler() local
39 /* If Hardware Reduced flag is set, there is no global lock */ in acpi_ev_init_global_lock_handler()
49 /* Attempt installation of the global lock handler */ in acpi_ev_init_global_lock_handler()
51 status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, in acpi_ev_init_global_lock_handler()
56 * If the global lock does not exist on this platform, the attempt to in acpi_ev_init_global_lock_handler()
[all …]
/linux/drivers/infiniband/hw/usnic/
H A Dusnic_fwd.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
45 int status; in usnic_fwd_devcmd_locked() local
46 struct net_device *netdev = ufdev->netdev; in usnic_fwd_devcmd_locked()
48 lockdep_assert_held(&ufdev->lock); in usnic_fwd_devcmd_locked()
50 status = enic_api_devcmd_proxy_by_index(netdev, in usnic_fwd_devcmd_locked()
55 if (status) { in usnic_fwd_devcmd_locked()
56 if (status == ERR_EINVAL && cmd == CMD_DEL_FILTER) { in usnic_fwd_devcmd_locked()
58 ufdev->name, vnic_idx, cmd); in usnic_fwd_devcmd_locked()
60 usnic_err("Dev %s vnic idx %u cmd %u failed with status %d\n", in usnic_fwd_devcmd_locked()
[all …]
/linux/drivers/media/dvb-frontends/
H A Dcxd2099.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2010-2013 Digital Devices GmbH
47 struct mutex lock; /* device access lock */ member
55 int status = 0; in read_block() local
57 if (ci->lastaddress != adr) in read_block()
58 status = regmap_write(ci->regmap, 0, adr); in read_block()
59 if (!status) { in read_block()
60 ci->lastaddress = adr; in read_block()
65 if (ci->cfg.max_i2c && len > ci->cfg.max_i2c) in read_block()
66 len = ci->cfg.max_i2c; in read_block()
[all …]
/linux/drivers/usb/host/
H A Dehci-hub.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2001-2004 by David Brownell
6 /* this file is part of ehci-hcd.c */
8 /*-------------------------------------------------------------------------*/
16 /*-------------------------------------------------------------------------*/
26 return !udev->maxchild && udev->persist_enabled && in persist_enabled_on_companion()
27 udev->bus->root_hub->speed < USB_SPEED_HIGH; in persist_enabled_on_companion()
36 u32 status; in ehci_handover_companion_ports() local
41 if (!ehci->owned_ports) in ehci_handover_companion_ports()
55 port = HCS_N_PORTS(ehci->hcs_params); in ehci_handover_companion_ports()
[all …]
H A Dxen-hcd.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * xen-hcd.c
25 /* Private per-URB data */
31 int status; member
35 /* virtual roothub port status */
37 __u32 status; member
43 /* status of attached device */
46 enum usb_device_state status; member
64 spinlock_t lock; member
102 return (struct xenhcd_info *)hcd->hcd_priv; in xenhcd_hcd_to_info()
[all …]
/linux/drivers/pinctrl/
H A Dpinctrl-mcp23s08.c1 // SPDX-License-Identifier: GPL-2.0-only
20 #include <linux/pinctrl/pinconf-generic.h>
22 #include "pinctrl-mcp23s08.h"
77 .disable_locking = true, /* mcp->lock protects the regmap */
112 .disable_locking = true, /* mcp->lock protects the regmap */
118 return regmap_read(mcp->regmap, reg << mcp->reg_shift, val); in mcp_read()
123 return regmap_write(mcp->regmap, reg << mcp->reg_shift, val); in mcp_write()
129 return regmap_update_bits(mcp->regmap, reg << mcp->reg_shift, in mcp_update_bits()
186 return -ENOTSUPP; in mcp_pinctrl_get_group_pins()
204 unsigned int data, status; in mcp_pinconf_get() local
[all …]
/linux/drivers/platform/surface/aggregator/
H A Dcontroller.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
38 /* -- Safe counters. -------------------------------------------------------- */
41 * ssh_seq_reset() - Reset/initialize sequence ID counter.
46 WRITE_ONCE(c->value, 0); in ssh_seq_reset()
50 * ssh_seq_next() - Get next sequence ID.
57 u8 old = READ_ONCE(c->value); in ssh_seq_next()
61 while (unlikely((ret = cmpxchg(&c->value, old, new)) != old)) { in ssh_seq_next()
70 * ssh_rqid_reset() - Reset/initialize request ID counter.
75 WRITE_ONCE(c->value, 0); in ssh_rqid_reset()
[all …]
H A Dssh_request_layer.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
11 #include <linux/error-injection.h>
29 * SSH_RTL_REQUEST_TIMEOUT - Request timeout.
32 * response in this time-frame after finishing the underlying packet
33 * transmission, the request will be completed with %-ETIMEDOUT as status
39 * SSH_RTL_REQUEST_TIMEOUT_RESOLUTION - Request timeout granularity.
41 * Time-resolution for timeouts. Should be larger than one jiffy to avoid
42 * direct re-scheduling of reaper work_struct.
47 * SSH_RTL_MAX_PENDING - Maximum number of pending requests.
[all …]
H A Dssh_packet_layer.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2019-2022 Maximilian Luz <luzmaximilian@gmail.com>
10 #include <linux/error-injection.h>
34 * system below is similar to a state-machine for packets, however, there are
41 * - submit
42 * - transmission start (process next item in queue)
43 * - transmission finished (guaranteed to never be parallel to transmission
45 * - ACK received
46 * - NAK received (this is equivalent to issuing re-submit for all pending
48 * - timeout (this is equivalent to re-issuing a submit or canceling)
[all …]
/linux/drivers/hwmon/
H A Dadcxx.c1 // SPDX-License-Identifier: GPL-2.0-or-later
32 #include <linux/hwmon-sysfs.h>
41 struct mutex lock; member
55 int status; in adcxx_show() local
58 if (mutex_lock_interruptible(&adc->lock)) in adcxx_show()
59 return -ERESTARTSYS; in adcxx_show()
61 if (adc->channels == 1) { in adcxx_show()
62 status = spi_read(spi, rx_buf, sizeof(rx_buf)); in adcxx_show()
64 tx_buf[0] = attr->index << 3; /* other bits are don't care */ in adcxx_show()
65 status = spi_write_then_read(spi, tx_buf, sizeof(tx_buf), in adcxx_show()
[all …]
/linux/drivers/usb/gadget/udc/
H A Dgr_udc.c1 // SPDX-License-Identifier: GPL-2.0+
14 * - Andreas Larsson <andreas@gaisler.com>
15 * - Marko Isomaki
36 #include <linux/dma-mapping.h>
54 /* USB speed and corresponding string calculated from status register value */
55 #define GR_SPEED(status) \ argument
56 ((status & GR_STATUS_SP) ? USB_SPEED_FULL : USB_SPEED_HIGH)
57 #define GR_SPEED_STR(status) usb_speed_string(GR_SPEED(status)) argument
64 /* ---------------------------------------------------------------------- */
93 int buflen = ep->is_in ? req->req.length : req->req.actual; in gr_dbgprint_request()
[all …]
/linux/drivers/platform/surface/
H A Dsurface_aggregator_cdev.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Provides user-space access to the SSAM EC via the /dev/surface/aggregator
6 * Copyright (C) 2020-2022 Maximilian Luz <luzmaximilian@gmail.com>
30 /* -- Main structures. ------------------------------------------------------ */
38 struct rw_semaphore lock; member
79 kref_get(&cdev->kref); in ssam_cdev_get()
87 kref_put(&cdev->kref, __ssam_cdev_release); in ssam_cdev_put()
91 /* -- Notifier handling. ---------------------------------------------------- */
96 struct ssam_cdev_client *client = cdev_nf->client; in ssam_cdev_notifier()
98 size_t n = struct_size(&event, data, in->length); in ssam_cdev_notifier()
[all …]
/linux/drivers/usb/serial/
H A Doti6858.c1 // SPDX-License-Identifier: GPL-2.0
3 * Ours Technology Inc. OTi-6858 USB to serial adapter driver.
6 * Copyright (C) 2006 Tomasz Michal Lukaszewski (FIXME: add e-mail)
7 * Copyright (C) 2001-2004 Greg Kroah-Hartman (greg@kroah.com)
11 * are heavily based on pl2303 code, buffering code is a 1-to-1 copy.
17 * - analyzing traffic between device and the M$ Windows 2000 driver,
18 * - trying different bit combinations and checking pin states
20 * - receiving malformed frames and producing buffer overflows
22 * So, THIS CODE CAN DESTROY OTi-6858 AND ANY OTHER DEVICES, THAT ARE
25 * See Documentation/usb/usb-serial.rst for more information on using this
[all …]
H A Dgeneric.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2010 - 2013 Johan Hovold (jhovold@gmail.com)
6 * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
40 struct device *dev = &serial->interface->dev; in usb_serial_generic_probe()
42 dev_info(dev, "The \"generic\" usb-serial driver is only for testing and one-off prototypes.\n"); in usb_serial_generic_probe()
43 dev_info(dev, "Tell linux-usb@vger.kernel.org to add your device to a proper driver.\n"); in usb_serial_generic_probe()
51 struct device *dev = &serial->interface->dev; in usb_serial_generic_calc_num_ports()
54 num_ports = max(epds->num_bulk_in, epds->num_bulk_out); in usb_serial_generic_calc_num_ports()
58 return -ENODEV; in usb_serial_generic_calc_num_ports()
109 clear_bit(USB_SERIAL_THROTTLED, &port->flags); in usb_serial_generic_open()
[all …]
/linux/drivers/usb/usbip/
H A Dvudc_sysfs.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright (C) 2015-2016 Samsung Electronics
22 /* called with udc->lock held */
26 struct vep *ep0 = to_vep(udc->gadget.ep0); in get_gadget_descs()
27 struct usb_device_descriptor *ddesc = &udc->dev_desc; in get_gadget_descs()
31 if (!udc->driver || !udc->pullup) in get_gadget_descs()
32 return -EINVAL; in get_gadget_descs()
40 spin_unlock(&udc->lock); in get_gadget_descs()
41 ret = udc->driver->setup(&(udc->gadget), &req); in get_gadget_descs()
42 spin_lock(&udc->lock); in get_gadget_descs()
[all …]
/linux/drivers/base/power/
H A Druntime.c1 // SPDX-License-Identifier: GPL-2.0
3 * drivers/base/power/runtime.c - Helper functions for device runtime PM
30 if (dev->driver && dev->driver->pm) in __rpm_get_driver_callback()
31 return get_callback_ptr(dev->driver->pm, cb_offset); in __rpm_get_driver_callback()
41 if (dev->pm_domain) in __rpm_get_callback()
42 ops = &dev->pm_domain->ops; in __rpm_get_callback()
43 else if (dev->type && dev->type->pm) in __rpm_get_callback()
44 ops = dev->type->pm; in __rpm_get_callback()
45 else if (dev->class && dev->class->pm) in __rpm_get_callback()
46 ops = dev->class->pm; in __rpm_get_callback()
[all …]
/linux/drivers/dma/hsu/
H A Dhsu.c1 // SPDX-License-Identifier: GPL-2.0-only
23 #include <linux/dma-mapping.h>
28 #include <linux/percpu-defs.h>
54 if (hsuc->direction == DMA_MEM_TO_DEV) in hsu_chan_enable()
56 else if (hsuc->direction == DMA_DEV_TO_MEM) in hsu_chan_enable()
64 struct dma_slave_config *config = &hsuc->config; in hsu_dma_chan_start()
65 struct hsu_dma_desc *desc = hsuc->desc; in hsu_dma_chan_start()
70 if (hsuc->direction == DMA_MEM_TO_DEV) { in hsu_dma_chan_start()
71 bsr = config->dst_maxburst; in hsu_dma_chan_start()
72 mtsr = config->dst_addr_width; in hsu_dma_chan_start()
[all …]
/linux/drivers/usb/gadget/function/
H A Df_printer.c1 // SPDX-License-Identifier: GPL-2.0+
3 * f_printer.c - USB printer function driver
8 * printer.c -- Printer gadget driver
10 * Copyright (C) 2003-2005 David Brownell
64 /*-------------------------------------------------------------------------*/
67 spinlock_t lock; /* lock this structure */ member
68 /* lock buffer lists during read/write calls */
104 /*-------------------------------------------------------------------------*/
120 .bInterfaceSubClass = 1, /* Printer Sub-Class */
121 .bInterfaceProtocol = 2, /* Bi-Directional */
[all …]
/linux/drivers/platform/goldfish/
H A Dgoldfish_pipe.c1 // SPDX-License-Identifier: GPL-2.0
6 * Copyright (C) 2011-2016 Google, Inc.
62 #include <linux/dma-mapping.h>
84 /* A per-pipe command structure, shared with the host */
86 s32 cmd; /* PipeCmdCode, guest -> host */
87 s32 id; /* pipe id, guest -> host */
88 s32 status; /* command execution status, host -> guest */ member
89 s32 reserved; /* to pad to 64-bit boundary */
93 /* number of buffers, guest -> host */
95 /* number of consumed bytes, host -> guest */
[all …]
/linux/drivers/acpi/
H A Dsbshc.c1 // SPDX-License-Identifier: GPL-2.0-only
23 struct mutex lock; member
47 .name = "acpi-smbus-hc",
55 u8 status:5; member
78 ACPI_SMB_STATUS = 1, /* status */
89 return ec_read(hc->offset + address, data); in smb_hc_read()
94 return ec_write(hc->offset + address, data); in smb_hc_write()
99 if (wait_event_timeout(hc->wait, hc->done, msecs_to_jiffies(timeout))) in wait_transaction_complete()
101 return -ETIME; in wait_transaction_complete()
107 int ret = -EFAULT, i; in acpi_smbus_transaction()
[all …]
/linux/drivers/infiniband/core/
H A Dmulticast.c14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
34 #include <linux/dma-mapping.h>
62 spinlock_t lock; member
100 spinlock_t lock; member
124 static void join_handler(int status, struct ib_sa_mcmember_rec *rec,
126 static void leave_handler(int status, struct ib_sa_mcmember_rec *rec,
132 struct rb_node *node = port->table.rb_node; in mcast_find()
138 ret = memcmp(mgid->raw, group->rec.mgid.raw, sizeof *mgid); in mcast_find()
143 node = node->rb_left; in mcast_find()
[all …]

12345678910>>...42