Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Merge 4.14.201 into neutrino-msm-hotdogb-4.14
Browse files Browse the repository at this point in the history
Changes in 4.14.201: (71 commits)
 	vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock
 	vsock/virtio: stop workers during the .remove()
 	vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock()
 	net: virtio_vsock: Enhance connection semantics
 	USB: gadget: f_ncm: Fix NDP16 datagram validation
 	gpio: tc35894: fix up tc35894 interrupt configuration
 	Input: i8042 - add nopnp quirk for Acer Aspire 5 A515
 	drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config
 	drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices
 	drm/sun4i: mixer: Extend regmap max_register
 	net: dec: de2104x: Increase receive ring size for Tulip
 	rndis_host: increase sleep time in the query-response loop
 	drivers/net/wan/lapbether: Make skb->protocol consistent with the header
 	drivers/net/wan/hdlc: Set skb->protocol before transmitting
 	mac80211: do not allow bigger VHT MPDUs than the hardware supports
 	spi: fsl-espi: Only process interrupts for expected events
 	nvme-fc: fail new connections to a deleted host or remote port
 	pinctrl: mvebu: Fix i2c sda definition for 98DX3236
 	nfs: Fix security label length not being reset
 	clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED
 	iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate()
 	i2c: cpm: Fix i2c_ram structure
 	Input: trackpoint - enable Synaptics trackpoints
 	random32: Restore __latent_entropy attribute on net_rand_state
 	net/packet: fix overflow in tpacket_rcv
 	epoll: do not insert into poll queues until all sanity checks are done
 	epoll: replace ->visited/visited_list with generation count
 	epoll: EPOLL_CTL_ADD: close the race in decision to take fast path
 	ep_create_wakeup_source(): dentry name can change under you...
 	netfilter: ctnetlink: add a range check for l3/l4 protonum
 	drm/syncobj: Fix drm_syncobj_handle_to_fd refcount leak
 	fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h
 	Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts
 	Revert "ravb: Fixed to be able to unload modules"
 	fbcon: Fix global-out-of-bounds read in fbcon_get_font()
 	net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()
 	usermodehelper: reset umask to default before executing user process
 	platform/x86: thinkpad_acpi: initialize tp_nvram_state variable
 	platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse
 	driver core: Fix probe_count imbalance in really_probe()
 	perf top: Fix stdio interface input handling with glibc 2.28+
 	mtd: rawnand: sunxi: Fix the probe error path
 	Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space
 	ftrace: Move RCU is watching check after recursion check
 	macsec: avoid use-after-free in macsec_handle_frame()
 	mm/khugepaged: fix filemap page_to_pgoff(page) != offset
 	cifs: Fix incomplete memory allocation on setxattr path
 	i2c: meson: fix clock setting overwrite
 	sctp: fix sctp_auth_init_hmacs() error path
 	team: set dev->needed_headroom in team_setup_by_port()
 	net: team: fix memory leak in __team_options_register
 	openvswitch: handle DNAT tuple collision
 	drm/amdgpu: prevent double kfree ttm->sg
 	xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate
 	xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate
 	xfrm: clone whole liftime_cur structure in xfrm_do_migrate
 	net: stmmac: removed enabling eee in EEE set callback
 	platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP
 	xfrm: Use correct address family in xfrm_state_find
 	bonding: set dev->needed_headroom in bond_setup_by_slave()
 	mdio: fix mdio-thunder.c dependency & build error
 	net: usb: ax88179_178a: fix missing stop entry in driver_info
 	rxrpc: Fix rxkad token xdr encoding
 	rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()
 	rxrpc: Fix some missing _bh annotations on locking conn->state_lock
 	rxrpc: Fix server keyring leak
 	perf: Fix task_function_call() error handling
 	mmc: core: don't set limits.discard_granularity as 0
 	mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged
 	net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails
	Linux 4.14.201

Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>

Conflicts:
	drivers/mmc/core/queue.c
	mm/page_alloc.c
  • Loading branch information
0ctobot committed Oct 14, 2020
2 parents f01803c + a21a9b5 commit 318110b
Show file tree
Hide file tree
Showing 80 changed files with 639 additions and 449 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 200
SUBLEVEL = 201
EXTRAVERSION =
NAME = Petit Gorille

Expand Down
5 changes: 3 additions & 2 deletions drivers/base/dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
drv->bus->name, __func__, drv->name, dev_name(dev));
if (!list_empty(&dev->devres_head)) {
dev_crit(dev, "Resources present before probing\n");
return -EBUSY;
ret = -EBUSY;
goto done;
}

re_probe:
Expand Down Expand Up @@ -507,7 +508,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
ret = 0;
done:
atomic_dec(&probe_count);
wake_up(&probe_waitqueue);
wake_up_all(&probe_waitqueue);
return ret;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/clk/samsung/clk-exynos4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ static const struct samsung_gate_clock exynos4210_gate_clks[] __initconst = {
GATE(CLK_PCIE, "pcie", "aclk133", GATE_IP_FSYS, 14, 0, 0),
GATE(CLK_SMMU_PCIE, "smmu_pcie", "aclk133", GATE_IP_FSYS, 18, 0, 0),
GATE(CLK_MODEMIF, "modemif", "aclk100", GATE_IP_PERIL, 28, 0, 0),
GATE(CLK_CHIPID, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, 0, 0),
GATE(CLK_CHIPID, "chipid", "aclk100", E4210_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0),
GATE(CLK_SYSREG, "sysreg", "aclk100", E4210_GATE_IP_PERIR, 0,
CLK_IGNORE_UNUSED, 0),
GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4210_GATE_IP_PERIR, 11, 0,
Expand Down Expand Up @@ -1116,7 +1116,7 @@ static const struct samsung_gate_clock exynos4x12_gate_clks[] __initconst = {
0),
GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0),
GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0),
GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0),
GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, CLK_IGNORE_UNUSED, 0),
GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
CLK_IGNORE_UNUSED, 0),
GATE(CLK_HDMI_CEC, "hdmi_cec", "aclk100", E4X12_GATE_IP_PERIR, 11, 0,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-tc3589x.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void tc3589x_gpio_irq_sync_unlock(struct irq_data *d)
continue;

tc3589x_gpio->oldregs[i][j] = new;
tc3589x_reg_write(tc3589x, regmap[i] + j * 8, new);
tc3589x_reg_write(tc3589x, regmap[i] + j, new);
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ int amdgpu_crtc_set_config(struct drm_mode_set *set,
take the current one */
if (active && !adev->have_disp_power_ref) {
adev->have_disp_power_ref = true;
goto out;
return ret;
}
/* if we have no active crtcs, then drop the power ref
we got before */
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ static int amdgpu_ttm_tt_pin_userptr(struct ttm_tt *ttm)

release_sg:
kfree(ttm->sg);
ttm->sg = NULL;
return r;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/drm_syncobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ static int drm_syncobj_handle_to_fd(struct drm_file *file_private,
return PTR_ERR(file);
}

drm_syncobj_get(syncobj);
fd_install(fd, file);

*p_fd = fd;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/sun4i/sun8i_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static struct regmap_config sun8i_mixer_regmap_config = {
.reg_bits = 32,
.val_bits = 32,
.reg_stride = 4,
.max_register = 0xbfffc, /* guessed */
.max_register = 0xffffc, /* guessed */
};

static int sun8i_mixer_bind(struct device *dev, struct device *master,
Expand Down
3 changes: 3 additions & 0 deletions drivers/i2c/busses/i2c-cpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ struct i2c_ram {
char res1[4]; /* Reserved */
ushort rpbase; /* Relocation pointer */
char res2[2]; /* Reserved */
/* The following elements are only for CPM2 */
char res3[4]; /* Reserved */
uint sdmatmp; /* Internal */
};

#define I2COM_START 0x80
Expand Down
19 changes: 18 additions & 1 deletion drivers/i2c/busses/i2c-meson.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* published by the Free Software Foundation.
*/

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/i2c.h>
Expand Down Expand Up @@ -39,6 +40,12 @@
#define REG_CTRL_CLKDIVEXT_SHIFT 28
#define REG_CTRL_CLKDIVEXT_MASK GENMASK(29, 28)

#define REG_SLV_ADDR GENMASK(7, 0)
#define REG_SLV_SDA_FILTER GENMASK(10, 8)
#define REG_SLV_SCL_FILTER GENMASK(13, 11)
#define REG_SLV_SCL_LOW GENMASK(27, 16)
#define REG_SLV_SCL_LOW_EN BIT(28)

#define I2C_TIMEOUT_MS 500

enum {
Expand Down Expand Up @@ -142,6 +149,9 @@ static void meson_i2c_set_clk_div(struct meson_i2c *i2c, unsigned int freq)
meson_i2c_set_mask(i2c, REG_CTRL, REG_CTRL_CLKDIVEXT_MASK,
(div >> 10) << REG_CTRL_CLKDIVEXT_SHIFT);

/* Disable HIGH/LOW mode */
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR, REG_SLV_SCL_LOW_EN, 0);

dev_dbg(i2c->dev, "%s: clk %lu, freq %u, div %u\n", __func__,
clk_rate, freq, div);
}
Expand Down Expand Up @@ -269,7 +279,10 @@ static void meson_i2c_do_start(struct meson_i2c *i2c, struct i2c_msg *msg)
token = (msg->flags & I2C_M_RD) ? TOKEN_SLAVE_ADDR_READ :
TOKEN_SLAVE_ADDR_WRITE;

writel(msg->addr << 1, i2c->regs + REG_SLAVE_ADDR);

meson_i2c_set_mask(i2c, REG_SLAVE_ADDR, REG_SLV_ADDR,
FIELD_PREP(REG_SLV_ADDR, msg->addr << 1));

meson_i2c_add_token(i2c, TOKEN_START);
meson_i2c_add_token(i2c, token);
}
Expand Down Expand Up @@ -425,6 +438,10 @@ static int meson_i2c_probe(struct platform_device *pdev)
return ret;
}

/* Disable filtering */
meson_i2c_set_mask(i2c, REG_SLAVE_ADDR,
REG_SLV_SDA_FILTER | REG_SLV_SCL_FILTER, 0);

meson_i2c_set_clk_div(i2c, timings.bus_freq_hz);

return 0;
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/mouse/trackpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse,
case TP_VARIANT_ALPS:
case TP_VARIANT_ELAN:
case TP_VARIANT_NXP:
case TP_VARIANT_JYT_SYNAPTICS:
case TP_VARIANT_SYNAPTICS:
if (variant_id)
*variant_id = param[0];
if (firmware_id)
Expand Down
7 changes: 7 additions & 0 deletions drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = {
DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
},
},
{
/* Acer Aspire 5 A515 */
.matches = {
DMI_MATCH(DMI_BOARD_NAME, "Grumpy_PK"),
DMI_MATCH(DMI_BOARD_VENDOR, "PK"),
},
},
{ }
};

Expand Down
8 changes: 6 additions & 2 deletions drivers/iommu/exynos-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,13 +1296,17 @@ static int exynos_iommu_of_xlate(struct device *dev,
return -ENODEV;

data = platform_get_drvdata(sysmmu);
if (!data)
if (!data) {
put_device(&sysmmu->dev);
return -ENODEV;
}

if (!owner) {
owner = kzalloc(sizeof(*owner), GFP_KERNEL);
if (!owner)
if (!owner) {
put_device(&sysmmu->dev);
return -ENOMEM;
}

INIT_LIST_HEAD(&owner->controllers);
mutex_init(&owner->rpm_lock);
Expand Down
2 changes: 1 addition & 1 deletion drivers/mmc/core/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
q->limits.discard_granularity = card->pref_erase << 9;
/* granularity must not be greater than max. discard */
if (card->pref_erase > max_discard)
q->limits.discard_granularity = 0;
q->limits.discard_granularity = SECTOR_SIZE;
if (mmc_can_secure_erase_trim(card))
queue_flag_set_unlocked(QUEUE_FLAG_SECERASE, q);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/sunxi_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
dev_err(dev, "failed to register mtd device: %d\n", ret);
nand_release(nand);
nand_cleanup(nand);
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ static void bond_setup_by_slave(struct net_device *bond_dev,

bond_dev->type = slave_dev->type;
bond_dev->hard_header_len = slave_dev->hard_header_len;
bond_dev->needed_headroom = slave_dev->needed_headroom;
bond_dev->addr_len = slave_dev->addr_len;

memcpy(bond_dev->broadcast, slave_dev->broadcast,
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/dec/tulip/de2104x.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ MODULE_PARM_DESC (rx_copybreak, "de2104x Breakpoint at which Rx packets are copi
#define DSL CONFIG_DE2104X_DSL
#endif

#define DE_RX_RING_SIZE 64
#define DE_RX_RING_SIZE 128
#define DE_TX_RING_SIZE 64
#define DE_RING_BYTES \
((sizeof(struct de_desc) * DE_RX_RING_SIZE) + \
Expand Down
110 changes: 55 additions & 55 deletions drivers/net/ethernet/renesas/ravb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,51 +1374,6 @@ static inline int ravb_hook_irq(unsigned int irq, irq_handler_t handler,
return error;
}

/* MDIO bus init function */
static int ravb_mdio_init(struct ravb_private *priv)
{
struct platform_device *pdev = priv->pdev;
struct device *dev = &pdev->dev;
int error;

/* Bitbang init */
priv->mdiobb.ops = &bb_ops;

/* MII controller setting */
priv->mii_bus = alloc_mdio_bitbang(&priv->mdiobb);
if (!priv->mii_bus)
return -ENOMEM;

/* Hook up MII support for ethtool */
priv->mii_bus->name = "ravb_mii";
priv->mii_bus->parent = dev;
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
pdev->name, pdev->id);

/* Register MDIO bus */
error = of_mdiobus_register(priv->mii_bus, dev->of_node);
if (error)
goto out_free_bus;

return 0;

out_free_bus:
free_mdio_bitbang(priv->mii_bus);
return error;
}

/* MDIO bus release function */
static int ravb_mdio_release(struct ravb_private *priv)
{
/* Unregister mdio bus */
mdiobus_unregister(priv->mii_bus);

/* Free bitbang info */
free_mdio_bitbang(priv->mii_bus);

return 0;
}

/* Network device open function for Ethernet AVB */
static int ravb_open(struct net_device *ndev)
{
Expand All @@ -1427,13 +1382,6 @@ static int ravb_open(struct net_device *ndev)
struct device *dev = &pdev->dev;
int error;

/* MDIO bus init */
error = ravb_mdio_init(priv);
if (error) {
netdev_err(ndev, "failed to initialize MDIO\n");
return error;
}

napi_enable(&priv->napi[RAVB_BE]);
napi_enable(&priv->napi[RAVB_NC]);

Expand Down Expand Up @@ -1511,7 +1459,6 @@ static int ravb_open(struct net_device *ndev)
out_napi_off:
napi_disable(&priv->napi[RAVB_NC]);
napi_disable(&priv->napi[RAVB_BE]);
ravb_mdio_release(priv);
return error;
}

Expand Down Expand Up @@ -1810,8 +1757,6 @@ static int ravb_close(struct net_device *ndev)
ravb_ring_free(ndev, RAVB_BE);
ravb_ring_free(ndev, RAVB_NC);

ravb_mdio_release(priv);

return 0;
}

Expand Down Expand Up @@ -1913,6 +1858,51 @@ static const struct net_device_ops ravb_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
};

/* MDIO bus init function */
static int ravb_mdio_init(struct ravb_private *priv)
{
struct platform_device *pdev = priv->pdev;
struct device *dev = &pdev->dev;
int error;

/* Bitbang init */
priv->mdiobb.ops = &bb_ops;

/* MII controller setting */
priv->mii_bus = alloc_mdio_bitbang(&priv->mdiobb);
if (!priv->mii_bus)
return -ENOMEM;

/* Hook up MII support for ethtool */
priv->mii_bus->name = "ravb_mii";
priv->mii_bus->parent = dev;
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
pdev->name, pdev->id);

/* Register MDIO bus */
error = of_mdiobus_register(priv->mii_bus, dev->of_node);
if (error)
goto out_free_bus;

return 0;

out_free_bus:
free_mdio_bitbang(priv->mii_bus);
return error;
}

/* MDIO bus release function */
static int ravb_mdio_release(struct ravb_private *priv)
{
/* Unregister mdio bus */
mdiobus_unregister(priv->mii_bus);

/* Free bitbang info */
free_mdio_bitbang(priv->mii_bus);

return 0;
}

static const struct of_device_id ravb_match_table[] = {
{ .compatible = "renesas,etheravb-r8a7790", .data = (void *)RCAR_GEN2 },
{ .compatible = "renesas,etheravb-r8a7794", .data = (void *)RCAR_GEN2 },
Expand Down Expand Up @@ -2142,6 +2132,13 @@ static int ravb_probe(struct platform_device *pdev)
eth_hw_addr_random(ndev);
}

/* MDIO bus init */
error = ravb_mdio_init(priv);
if (error) {
dev_err(&pdev->dev, "failed to initialize MDIO\n");
goto out_dma_free;
}

netif_napi_add(ndev, &priv->napi[RAVB_BE], ravb_poll, 64);
netif_napi_add(ndev, &priv->napi[RAVB_NC], ravb_poll, 64);

Expand All @@ -2164,6 +2161,8 @@ static int ravb_probe(struct platform_device *pdev)
out_napi_del:
netif_napi_del(&priv->napi[RAVB_NC]);
netif_napi_del(&priv->napi[RAVB_BE]);
ravb_mdio_release(priv);
out_dma_free:
dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat,
priv->desc_bat_dma);

Expand Down Expand Up @@ -2196,6 +2195,7 @@ static int ravb_remove(struct platform_device *pdev)
unregister_netdev(ndev);
netif_napi_del(&priv->napi[RAVB_NC]);
netif_napi_del(&priv->napi[RAVB_BE]);
ravb_mdio_release(priv);
pm_runtime_disable(&pdev->dev);
free_netdev(ndev);
platform_set_drvdata(pdev, NULL);
Expand Down
Loading

0 comments on commit 318110b

Please sign in to comment.