mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
This is the 4.19.115 stable release
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl6USBUACgkQONu9yGCS
aT6dNxAA1BJKHbO1TOMTYi21N8XNbMOOblVxrLDe+Y2nEj2KIqiehlsoreV34F/g
IswNAuA3JXp7pU53RIKsTIWvx9CvNit55sJ1eKWTfFZGCotsBWH9Xzeh9Ao1wURG
vhE5tX8PUwEzZ/sFphVmVvv5oUkQyHYKpEosyVOqL5eIQe5E430PxB/xvz4I0Vyq
HHiXmrNekXi5kY156k1RqLQ/RhKMFPNi7swm1uFKLS1qrcIlQzgq5MFk5l59oEMo
xob25EeeddVa/4roNSVk9IZGZjXpRPsvRM8kxjSXn2KVz1aO8TgYXF1RyWeNthsZ
VXf6XkasSh3bwMX6imhV1fGmepG3OvSZg0k2EvRTpcY84kFlIrC1l2YuOHrCETgL
GkptUtGK0a2FEiyBK/0nxvf2E6iaoT4NeTYlyTkL8iOgJ+xMvuSzCpFfQjfkOjGz
h3AD+Twqu7lqY54nOvyAkA94joEFzVuzSoYCABAImFq4kvu4khhWBXTmkqUf47aI
1O3m4bMEMLDBRwiBpRsu5c0C+ghHHQtOWTH/UjyOI1aGEKFZyBe5CHYmRo2W9tDg
rrlymg1iVMR1o9pvzzRroCokKCzBSirEWKxyyMIFWko5xQvTvae5fTIaAWlvBGjP
oH3eIPDWw1ZD1WxiSGzM2Wx4AyumZ1y3pnOHV3uUnYb3cM0l9g8=
=bfll
-----END PGP SIGNATURE-----
Merge 4.19.115 into android-4.19
Changes in 4.19.115
ipv4: fix a RCU-list lock in fib_triestat_seq_show
net, ip_tunnel: fix interface lookup with no key
sctp: fix refcount bug in sctp_wfree
sctp: fix possibly using a bad saddr with a given dst
nvme-rdma: Avoid double freeing of async event data
drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
drm/bochs: downgrade pci_request_region failure from error to warning
initramfs: restore default compression behavior
drm/amdgpu: fix typo for vcn1 idle check
tools/power turbostat: Fix gcc build warnings
tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
drm/etnaviv: replace MMU flush marker with flush sequence
media: rc: IR signal for Panasonic air conditioner too long
misc: rtsx: set correct pcr_ops for rts522A
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
coresight: do not use the BIT() macro in the UAPI header
mei: me: add cedar fork device ids
extcon: axp288: Add wakeup support
power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
rxrpc: Fix sendmsg(MSG_WAITALL) handling
net: Fix Tx hash bound checking
padata: always acquire cpu_hotplug_lock before pinst->lock
bitops: protect variables in set_mask_bits() macro
include/linux/notifier.h: SRCU: fix ctags
mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
ipv6: don't auto-add link-local address to lag ports
net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
net: dsa: bcm_sf2: Ensure correct sub-node is parsed
net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
slcan: Don't transmit uninitialized stack data in padding
mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
random: always use batched entropy for get_random_u{32,64}
usb: dwc3: gadget: Wrap around when skip TRBs
tools/accounting/getdelays.c: fix netlink attribute length
hwrng: imx-rngc - fix an error path
ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
IB/hfi1: Fix memory leaks in sysfs registration and unregistration
ceph: remove the extra slashes in the server path
ceph: canonicalize server path in place
RDMA/ucma: Put a lock around every call to the rdma_cm layer
RDMA/cma: Teach lockdep about the order of rtnl and lock
Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
fbcon: fix null-ptr-deref in fbcon_switch
clk: qcom: rcg: Return failure for RCG update
drm/msm: stop abusing dma_map/unmap for cache
arm64: Fix size of __early_cpu_boot_status
rpmsg: glink: Remove chunk size word align warning
usb: dwc3: don't set gadget->is_otg flag
drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
drm/msm: Use the correct dma_sync calls in msm_gem
Linux 4.19.115
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc17d8aa387491167efc60df0a9764b82e4344da
This commit is contained in:
commit
2d2af525a7
54 changed files with 448 additions and 161 deletions
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 114
|
||||
SUBLEVEL = 115
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
|||
|
|
@ -674,7 +674,7 @@ ENTRY(__boot_cpu_mode)
|
|||
* with MMU turned off.
|
||||
*/
|
||||
ENTRY(__early_cpu_boot_status)
|
||||
.long 0
|
||||
.quad 0
|
||||
|
||||
.popsection
|
||||
|
||||
|
|
|
|||
|
|
@ -111,8 +111,10 @@ static int imx_rngc_self_test(struct imx_rngc *rngc)
|
|||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
if (rngc->err_reg != 0)
|
||||
if (rngc->err_reg != 0) {
|
||||
imx_rngc_irq_mask_clear(rngc);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2146,11 +2146,11 @@ struct batched_entropy {
|
|||
|
||||
/*
|
||||
* Get a random word for internal kernel use only. The quality of the random
|
||||
* number is either as good as RDRAND or as good as /dev/urandom, with the
|
||||
* goal of being quite fast and not depleting entropy. In order to ensure
|
||||
* number is good as /dev/urandom, but there is no backtrack protection, with
|
||||
* the goal of being quite fast and not depleting entropy. In order to ensure
|
||||
* that the randomness provided by this function is okay, the function
|
||||
* wait_for_random_bytes() should be called and return 0 at least once
|
||||
* at any point prior.
|
||||
* wait_for_random_bytes() should be called and return 0 at least once at any
|
||||
* point prior.
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct batched_entropy, batched_entropy_u64) = {
|
||||
.batch_lock = __SPIN_LOCK_UNLOCKED(batched_entropy_u64.lock),
|
||||
|
|
@ -2163,15 +2163,6 @@ u64 get_random_u64(void)
|
|||
struct batched_entropy *batch;
|
||||
static void *previous;
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
if (arch_get_random_long((unsigned long *)&ret))
|
||||
return ret;
|
||||
#else
|
||||
if (arch_get_random_long((unsigned long *)&ret) &&
|
||||
arch_get_random_long((unsigned long *)&ret + 1))
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
warn_unseeded_randomness(&previous);
|
||||
|
||||
batch = raw_cpu_ptr(&batched_entropy_u64);
|
||||
|
|
@ -2196,9 +2187,6 @@ u32 get_random_u32(void)
|
|||
struct batched_entropy *batch;
|
||||
static void *previous;
|
||||
|
||||
if (arch_get_random_int(&ret))
|
||||
return ret;
|
||||
|
||||
warn_unseeded_randomness(&previous);
|
||||
|
||||
batch = raw_cpu_ptr(&batched_entropy_u32);
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ static int update_config(struct clk_rcg2 *rcg)
|
|||
}
|
||||
|
||||
WARN(1, "%s: rcg didn't update its configuration.", name);
|
||||
return 0;
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index)
|
||||
|
|
|
|||
|
|
@ -428,9 +428,40 @@ static int axp288_extcon_probe(struct platform_device *pdev)
|
|||
/* Start charger cable type detection */
|
||||
axp288_extcon_enable(info);
|
||||
|
||||
device_init_wakeup(dev, true);
|
||||
platform_set_drvdata(pdev, info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused axp288_extcon_suspend(struct device *dev)
|
||||
{
|
||||
struct axp288_extcon_info *info = dev_get_drvdata(dev);
|
||||
|
||||
if (device_may_wakeup(dev))
|
||||
enable_irq_wake(info->irq[VBUS_RISING_IRQ]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused axp288_extcon_resume(struct device *dev)
|
||||
{
|
||||
struct axp288_extcon_info *info = dev_get_drvdata(dev);
|
||||
|
||||
/*
|
||||
* Wakeup when a charger is connected to do charger-type
|
||||
* connection and generate an extcon event which makes the
|
||||
* axp288 charger driver set the input current limit.
|
||||
*/
|
||||
if (device_may_wakeup(dev))
|
||||
disable_irq_wake(info->irq[VBUS_RISING_IRQ]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(axp288_extcon_pm_ops, axp288_extcon_suspend,
|
||||
axp288_extcon_resume);
|
||||
|
||||
static const struct platform_device_id axp288_extcon_table[] = {
|
||||
{ .name = "axp288_extcon" },
|
||||
{},
|
||||
|
|
@ -442,6 +473,7 @@ static struct platform_driver axp288_extcon_driver = {
|
|||
.id_table = axp288_extcon_table,
|
||||
.driver = {
|
||||
.name = "axp288_extcon",
|
||||
.pm = &axp288_extcon_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ static int vcn_v1_0_set_clockgating_state(void *handle,
|
|||
|
||||
if (enable) {
|
||||
/* wait for STATUS to clear */
|
||||
if (vcn_v1_0_is_idle(handle))
|
||||
if (!vcn_v1_0_is_idle(handle))
|
||||
return -EBUSY;
|
||||
vcn_v1_0_enable_clock_gating(adev);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2440,6 +2440,17 @@ static bool retrieve_link_cap(struct dc_link *link)
|
|||
sink_id.ieee_device_id,
|
||||
sizeof(sink_id.ieee_device_id));
|
||||
|
||||
/* Quirk Apple MBP 2017 15" Retina panel: Wrong DP_MAX_LINK_RATE */
|
||||
{
|
||||
uint8_t str_mbp_2017[] = { 101, 68, 21, 101, 98, 97 };
|
||||
|
||||
if ((link->dpcd_caps.sink_dev_id == 0x0010fa) &&
|
||||
!memcmp(link->dpcd_caps.sink_dev_id_str, str_mbp_2017,
|
||||
sizeof(str_mbp_2017))) {
|
||||
link->reported_link_cap.link_rate = 0x0c;
|
||||
}
|
||||
}
|
||||
|
||||
core_link_read_dpcd(
|
||||
link,
|
||||
DP_SINK_HW_REVISION_START,
|
||||
|
|
|
|||
|
|
@ -97,10 +97,8 @@ int bochs_hw_init(struct drm_device *dev, uint32_t flags)
|
|||
size = min(size, mem);
|
||||
}
|
||||
|
||||
if (pci_request_region(pdev, 0, "bochs-drm") != 0) {
|
||||
DRM_ERROR("Cannot request framebuffer\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
if (pci_request_region(pdev, 0, "bochs-drm") != 0)
|
||||
DRM_WARN("Cannot request framebuffer, boot fb still active?\n");
|
||||
|
||||
bochs->fb_map = ioremap(addr, size);
|
||||
if (bochs->fb_map == NULL) {
|
||||
|
|
|
|||
|
|
@ -439,6 +439,7 @@ static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx
|
|||
if (idx > raw->curlen)
|
||||
goto fail_len;
|
||||
repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx];
|
||||
idx++;
|
||||
if (idx > raw->curlen)
|
||||
goto fail_len;
|
||||
|
||||
|
|
|
|||
|
|
@ -311,6 +311,8 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
|
|||
u32 return_target, return_dwords;
|
||||
u32 link_target, link_dwords;
|
||||
bool switch_context = gpu->exec_state != exec_state;
|
||||
unsigned int new_flush_seq = READ_ONCE(gpu->mmu->flush_seq);
|
||||
bool need_flush = gpu->flush_seq != new_flush_seq;
|
||||
|
||||
lockdep_assert_held(&gpu->lock);
|
||||
|
||||
|
|
@ -325,14 +327,14 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
|
|||
* need to append a mmu flush load state, followed by a new
|
||||
* link to this buffer - a total of four additional words.
|
||||
*/
|
||||
if (gpu->mmu->need_flush || switch_context) {
|
||||
if (need_flush || switch_context) {
|
||||
u32 target, extra_dwords;
|
||||
|
||||
/* link command */
|
||||
extra_dwords = 1;
|
||||
|
||||
/* flush command */
|
||||
if (gpu->mmu->need_flush) {
|
||||
if (need_flush) {
|
||||
if (gpu->mmu->version == ETNAVIV_IOMMU_V1)
|
||||
extra_dwords += 1;
|
||||
else
|
||||
|
|
@ -345,7 +347,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
|
|||
|
||||
target = etnaviv_buffer_reserve(gpu, buffer, extra_dwords);
|
||||
|
||||
if (gpu->mmu->need_flush) {
|
||||
if (need_flush) {
|
||||
/* Add the MMU flush */
|
||||
if (gpu->mmu->version == ETNAVIV_IOMMU_V1) {
|
||||
CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_MMU,
|
||||
|
|
@ -365,7 +367,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state,
|
|||
SYNC_RECIPIENT_PE);
|
||||
}
|
||||
|
||||
gpu->mmu->need_flush = false;
|
||||
gpu->flush_seq = new_flush_seq;
|
||||
}
|
||||
|
||||
if (switch_context) {
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ struct etnaviv_gpu {
|
|||
|
||||
struct etnaviv_iommu *mmu;
|
||||
struct etnaviv_cmdbuf_suballoc *cmdbuf_suballoc;
|
||||
unsigned int flush_seq;
|
||||
|
||||
/* Power Control: */
|
||||
struct clk *clk_bus;
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ int etnaviv_iommu_map_gem(struct etnaviv_iommu *mmu,
|
|||
}
|
||||
|
||||
list_add_tail(&mapping->mmu_node, &mmu->mappings);
|
||||
mmu->need_flush = true;
|
||||
mmu->flush_seq++;
|
||||
unlock:
|
||||
mutex_unlock(&mmu->lock);
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ void etnaviv_iommu_unmap_gem(struct etnaviv_iommu *mmu,
|
|||
etnaviv_iommu_remove_mapping(mmu, mapping);
|
||||
|
||||
list_del(&mapping->mmu_node);
|
||||
mmu->need_flush = true;
|
||||
mmu->flush_seq++;
|
||||
mutex_unlock(&mmu->lock);
|
||||
}
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ int etnaviv_iommu_get_suballoc_va(struct etnaviv_gpu *gpu, dma_addr_t paddr,
|
|||
mutex_unlock(&mmu->lock);
|
||||
return ret;
|
||||
}
|
||||
gpu->mmu->need_flush = true;
|
||||
mmu->flush_seq++;
|
||||
mutex_unlock(&mmu->lock);
|
||||
|
||||
*iova = (u32)vram_node->start;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct etnaviv_iommu {
|
|||
struct mutex lock;
|
||||
struct list_head mappings;
|
||||
struct drm_mm mm;
|
||||
bool need_flush;
|
||||
unsigned int flush_seq;
|
||||
};
|
||||
|
||||
struct etnaviv_gem_object;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,46 @@ static bool use_pages(struct drm_gem_object *obj)
|
|||
return !msm_obj->vram_node;
|
||||
}
|
||||
|
||||
/*
|
||||
* Cache sync.. this is a bit over-complicated, to fit dma-mapping
|
||||
* API. Really GPU cache is out of scope here (handled on cmdstream)
|
||||
* and all we need to do is invalidate newly allocated pages before
|
||||
* mapping to CPU as uncached/writecombine.
|
||||
*
|
||||
* On top of this, we have the added headache, that depending on
|
||||
* display generation, the display's iommu may be wired up to either
|
||||
* the toplevel drm device (mdss), or to the mdp sub-node, meaning
|
||||
* that here we either have dma-direct or iommu ops.
|
||||
*
|
||||
* Let this be a cautionary tail of abstraction gone wrong.
|
||||
*/
|
||||
|
||||
static void sync_for_device(struct msm_gem_object *msm_obj)
|
||||
{
|
||||
struct device *dev = msm_obj->base.dev->dev;
|
||||
|
||||
if (get_dma_ops(dev)) {
|
||||
dma_sync_sg_for_device(dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
} else {
|
||||
dma_map_sg(dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
}
|
||||
}
|
||||
|
||||
static void sync_for_cpu(struct msm_gem_object *msm_obj)
|
||||
{
|
||||
struct device *dev = msm_obj->base.dev->dev;
|
||||
|
||||
if (get_dma_ops(dev)) {
|
||||
dma_sync_sg_for_cpu(dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
} else {
|
||||
dma_unmap_sg(dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
}
|
||||
}
|
||||
|
||||
/* allocate pages from VRAM carveout, used when no IOMMU: */
|
||||
static struct page **get_pages_vram(struct drm_gem_object *obj, int npages)
|
||||
{
|
||||
|
|
@ -108,8 +148,7 @@ static struct page **get_pages(struct drm_gem_object *obj)
|
|||
* because display controller, GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_map_sg(dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
sync_for_device(msm_obj);
|
||||
}
|
||||
|
||||
return msm_obj->pages;
|
||||
|
|
@ -138,9 +177,7 @@ static void put_pages(struct drm_gem_object *obj)
|
|||
* GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents,
|
||||
DMA_BIDIRECTIONAL);
|
||||
sync_for_cpu(msm_obj);
|
||||
|
||||
sg_free_table(msm_obj->sgt);
|
||||
kfree(msm_obj->sgt);
|
||||
|
|
|
|||
|
|
@ -2753,6 +2753,7 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)
|
|||
err2:
|
||||
kfree(route->path_rec);
|
||||
route->path_rec = NULL;
|
||||
route->num_paths = 0;
|
||||
err1:
|
||||
kfree(work);
|
||||
return ret;
|
||||
|
|
@ -4635,6 +4636,19 @@ static int __init cma_init(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* There is a rare lock ordering dependency in cma_netdev_callback()
|
||||
* that only happens when bonding is enabled. Teach lockdep that rtnl
|
||||
* must never be nested under lock so it can find these without having
|
||||
* to test with bonding.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_LOCKDEP)) {
|
||||
rtnl_lock();
|
||||
mutex_lock(&lock);
|
||||
mutex_unlock(&lock);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
cma_wq = alloc_ordered_workqueue("rdma_cm", WQ_MEM_RECLAIM);
|
||||
if (!cma_wq)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ struct ucma_context {
|
|||
|
||||
struct ucma_file *file;
|
||||
struct rdma_cm_id *cm_id;
|
||||
struct mutex mutex;
|
||||
u64 uid;
|
||||
|
||||
struct list_head list;
|
||||
|
|
@ -215,6 +216,7 @@ static struct ucma_context *ucma_alloc_ctx(struct ucma_file *file)
|
|||
init_completion(&ctx->comp);
|
||||
INIT_LIST_HEAD(&ctx->mc_list);
|
||||
ctx->file = file;
|
||||
mutex_init(&ctx->mutex);
|
||||
|
||||
mutex_lock(&mut);
|
||||
ctx->id = idr_alloc(&ctx_idr, ctx, 0, 0, GFP_KERNEL);
|
||||
|
|
@ -596,6 +598,7 @@ static int ucma_free_ctx(struct ucma_context *ctx)
|
|||
}
|
||||
|
||||
events_reported = ctx->events_reported;
|
||||
mutex_destroy(&ctx->mutex);
|
||||
kfree(ctx);
|
||||
return events_reported;
|
||||
}
|
||||
|
|
@ -665,7 +668,10 @@ static ssize_t ucma_bind_ip(struct ucma_file *file, const char __user *inbuf,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_bind_addr(ctx->cm_id, (struct sockaddr *) &cmd.addr);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -688,7 +694,9 @@ static ssize_t ucma_bind(struct ucma_file *file, const char __user *inbuf,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_bind_addr(ctx->cm_id, (struct sockaddr *) &cmd.addr);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -712,8 +720,10 @@ static ssize_t ucma_resolve_ip(struct ucma_file *file,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr,
|
||||
(struct sockaddr *) &cmd.dst_addr, cmd.timeout_ms);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -738,8 +748,10 @@ static ssize_t ucma_resolve_addr(struct ucma_file *file,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_resolve_addr(ctx->cm_id, (struct sockaddr *) &cmd.src_addr,
|
||||
(struct sockaddr *) &cmd.dst_addr, cmd.timeout_ms);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -759,7 +771,9 @@ static ssize_t ucma_resolve_route(struct ucma_file *file,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_resolve_route(ctx->cm_id, cmd.timeout_ms);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -848,6 +862,7 @@ static ssize_t ucma_query_route(struct ucma_file *file,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
memset(&resp, 0, sizeof resp);
|
||||
addr = (struct sockaddr *) &ctx->cm_id->route.addr.src_addr;
|
||||
memcpy(&resp.src_addr, addr, addr->sa_family == AF_INET ?
|
||||
|
|
@ -871,6 +886,7 @@ static ssize_t ucma_query_route(struct ucma_file *file,
|
|||
ucma_copy_iw_route(&resp, &ctx->cm_id->route);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ctx->mutex);
|
||||
if (copy_to_user(u64_to_user_ptr(cmd.response),
|
||||
&resp, sizeof(resp)))
|
||||
ret = -EFAULT;
|
||||
|
|
@ -1022,6 +1038,7 @@ static ssize_t ucma_query(struct ucma_file *file,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
switch (cmd.option) {
|
||||
case RDMA_USER_CM_QUERY_ADDR:
|
||||
ret = ucma_query_addr(ctx, response, out_len);
|
||||
|
|
@ -1036,6 +1053,7 @@ static ssize_t ucma_query(struct ucma_file *file,
|
|||
ret = -ENOSYS;
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&ctx->mutex);
|
||||
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
|
|
@ -1076,7 +1094,9 @@ static ssize_t ucma_connect(struct ucma_file *file, const char __user *inbuf,
|
|||
return PTR_ERR(ctx);
|
||||
|
||||
ucma_copy_conn_param(ctx->cm_id, &conn_param, &cmd.conn_param);
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_connect(ctx->cm_id, &conn_param);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1097,7 +1117,9 @@ static ssize_t ucma_listen(struct ucma_file *file, const char __user *inbuf,
|
|||
|
||||
ctx->backlog = cmd.backlog > 0 && cmd.backlog < max_backlog ?
|
||||
cmd.backlog : max_backlog;
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_listen(ctx->cm_id, ctx->backlog);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1120,13 +1142,17 @@ static ssize_t ucma_accept(struct ucma_file *file, const char __user *inbuf,
|
|||
if (cmd.conn_param.valid) {
|
||||
ucma_copy_conn_param(ctx->cm_id, &conn_param, &cmd.conn_param);
|
||||
mutex_lock(&file->mut);
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = __rdma_accept(ctx->cm_id, &conn_param, NULL);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
if (!ret)
|
||||
ctx->uid = cmd.uid;
|
||||
mutex_unlock(&file->mut);
|
||||
} else
|
||||
} else {
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = __rdma_accept(ctx->cm_id, NULL, NULL);
|
||||
|
||||
mutex_unlock(&ctx->mutex);
|
||||
}
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1145,7 +1171,9 @@ static ssize_t ucma_reject(struct ucma_file *file, const char __user *inbuf,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_reject(ctx->cm_id, cmd.private_data, cmd.private_data_len);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1164,7 +1192,9 @@ static ssize_t ucma_disconnect(struct ucma_file *file, const char __user *inbuf,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_disconnect(ctx->cm_id);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1195,7 +1225,9 @@ static ssize_t ucma_init_qp_attr(struct ucma_file *file,
|
|||
resp.qp_attr_mask = 0;
|
||||
memset(&qp_attr, 0, sizeof qp_attr);
|
||||
qp_attr.qp_state = cmd.qp_state;
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_init_qp_attr(ctx->cm_id, &qp_attr, &resp.qp_attr_mask);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
|
|
@ -1274,9 +1306,13 @@ static int ucma_set_ib_path(struct ucma_context *ctx,
|
|||
struct sa_path_rec opa;
|
||||
|
||||
sa_convert_path_ib_to_opa(&opa, &sa_path);
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_set_ib_path(ctx->cm_id, &opa);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
} else {
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_set_ib_path(ctx->cm_id, &sa_path);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -1309,7 +1345,9 @@ static int ucma_set_option_level(struct ucma_context *ctx, int level,
|
|||
|
||||
switch (level) {
|
||||
case RDMA_OPTION_ID:
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = ucma_set_option_id(ctx, optname, optval, optlen);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
break;
|
||||
case RDMA_OPTION_IB:
|
||||
ret = ucma_set_option_ib(ctx, optname, optval, optlen);
|
||||
|
|
@ -1369,8 +1407,10 @@ static ssize_t ucma_notify(struct ucma_file *file, const char __user *inbuf,
|
|||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mutex_lock(&ctx->mutex);
|
||||
if (ctx->cm_id->device)
|
||||
ret = rdma_notify(ctx->cm_id, (enum ib_event_type)cmd.event);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
|
||||
ucma_put_ctx(ctx);
|
||||
return ret;
|
||||
|
|
@ -1413,8 +1453,10 @@ static ssize_t ucma_process_join(struct ucma_file *file,
|
|||
mc->join_state = join_state;
|
||||
mc->uid = cmd->uid;
|
||||
memcpy(&mc->addr, addr, cmd->addr_size);
|
||||
mutex_lock(&ctx->mutex);
|
||||
ret = rdma_join_multicast(ctx->cm_id, (struct sockaddr *)&mc->addr,
|
||||
join_state, mc);
|
||||
mutex_unlock(&ctx->mutex);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
|
|
@ -1518,7 +1560,10 @@ static ssize_t ucma_leave_multicast(struct ucma_file *file,
|
|||
goto out;
|
||||
}
|
||||
|
||||
mutex_lock(&mc->ctx->mutex);
|
||||
rdma_leave_multicast(mc->ctx->cm_id, (struct sockaddr *) &mc->addr);
|
||||
mutex_unlock(&mc->ctx->mutex);
|
||||
|
||||
mutex_lock(&mc->ctx->file->mut);
|
||||
ucma_cleanup_mc_events(mc);
|
||||
list_del(&mc->list);
|
||||
|
|
|
|||
|
|
@ -670,7 +670,11 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num,
|
|||
dd_dev_err(dd,
|
||||
"Skipping sc2vl sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail;
|
||||
/*
|
||||
* Based on the documentation for kobject_init_and_add(), the
|
||||
* caller should call kobject_put even if this call fails.
|
||||
*/
|
||||
goto bail_sc2vl;
|
||||
}
|
||||
kobject_uevent(&ppd->sc2vl_kobj, KOBJ_ADD);
|
||||
|
||||
|
|
@ -680,7 +684,7 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num,
|
|||
dd_dev_err(dd,
|
||||
"Skipping sl2sc sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_sc2vl;
|
||||
goto bail_sl2sc;
|
||||
}
|
||||
kobject_uevent(&ppd->sl2sc_kobj, KOBJ_ADD);
|
||||
|
||||
|
|
@ -690,7 +694,7 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num,
|
|||
dd_dev_err(dd,
|
||||
"Skipping vl2mtu sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_sl2sc;
|
||||
goto bail_vl2mtu;
|
||||
}
|
||||
kobject_uevent(&ppd->vl2mtu_kobj, KOBJ_ADD);
|
||||
|
||||
|
|
@ -700,7 +704,7 @@ int hfi1_create_port_files(struct ib_device *ibdev, u8 port_num,
|
|||
dd_dev_err(dd,
|
||||
"Skipping Congestion Control sysfs info, (err %d) port %u\n",
|
||||
ret, port_num);
|
||||
goto bail_vl2mtu;
|
||||
goto bail_cc;
|
||||
}
|
||||
|
||||
kobject_uevent(&ppd->pport_cc_kobj, KOBJ_ADD);
|
||||
|
|
@ -738,7 +742,6 @@ bail_sl2sc:
|
|||
kobject_put(&ppd->sl2sc_kobj);
|
||||
bail_sc2vl:
|
||||
kobject_put(&ppd->sc2vl_kobj);
|
||||
bail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -858,8 +861,13 @@ bail:
|
|||
for (i = 0; i < ARRAY_SIZE(hfi1_attributes); ++i)
|
||||
device_remove_file(&dev->dev, hfi1_attributes[i]);
|
||||
|
||||
for (i = 0; i < dd->num_sdma; i++)
|
||||
kobject_del(&dd->per_sdma[i].kobj);
|
||||
/*
|
||||
* The function kobject_put() will call kobject_del() if the kobject
|
||||
* has been added successfully. The sysfs files created under the
|
||||
* kobject directory will also be removed during the process.
|
||||
*/
|
||||
for (; i >= 0; i--)
|
||||
kobject_put(&dd->per_sdma[i].kobj);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -872,6 +880,10 @@ void hfi1_verbs_unregister_sysfs(struct hfi1_devdata *dd)
|
|||
struct hfi1_pportdata *ppd;
|
||||
int i;
|
||||
|
||||
/* Unwind operations in hfi1_verbs_register_sysfs() */
|
||||
for (i = 0; i < dd->num_sdma; i++)
|
||||
kobject_put(&dd->per_sdma[i].kobj);
|
||||
|
||||
for (i = 0; i < dd->num_pports; i++) {
|
||||
ppd = &dd->pport[i];
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "rc-core-priv.h"
|
||||
#include <uapi/linux/lirc.h>
|
||||
|
||||
#define LIRCBUF_SIZE 256
|
||||
#define LIRCBUF_SIZE 1024
|
||||
|
||||
static dev_t lirc_base_dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -369,6 +369,7 @@ static const struct pcr_ops rts522a_pcr_ops = {
|
|||
void rts522a_init_params(struct rtsx_pcr *pcr)
|
||||
{
|
||||
rts5227_init_params(pcr);
|
||||
pcr->ops = &rts522a_pcr_ops;
|
||||
pcr->tx_initial_phase = SET_CLOCK_PHASE(20, 20, 11);
|
||||
pcr->reg_pm_ctrl3 = RTS522A_PM_CTRL3;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue