mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
This is the 5.4.280 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmaY400ACgkQONu9yGCS aT4SOxAAsnnWA4GPcspY03fxcSwl+CdgDj22VVgxDW/va/rk7fcxo000snNgo2M+ K1x9qL3SPAXVEZNIUdSU001+/pnaaVdskXRNanwIvIuZMeh2cn8qmP+MFUPHLKWH aki1FPsh3lvI3x7JVioSWNvSuiaHgeXFBPKUB4wP5J51QYiuSWGb1gIrGCsCNiHI kboMmDEo1cxSLE+0wWzhBXn921FA1Vot10SqtYwQJnAICq2TsE2YPgshiMkrYZ4e 0KbTLizk390pDT+n+Nrnoi7wNoRX/KoHz7A/94l3zwp3/xv9glqeudt+Cy9esQjo yZQDkq6LtSW8ABWjcCXPMEg2r7p8HPmiOuCP8oHBo9kHNgyePbArEPWQP+xC3vzq zeMH09m+arw8njBYdKv3c+5VVY7ABHQK3Vfo2Z3MMf5ZZgTg7f+e7uBT4RcFBriq Eyne4CLPzuuzn/BEgcoPWxwaDs8mDThbxRlfSmnDbfE7IcuDGRH7EsvFuViSKE13 ncpLJu03bs/AhZe3eiLk+AWwb4gHJD1oBNWu1CkQ5XY2S0MxYxyYdlhNpGA5yvyO RqIhrTm+ye/NlD8X1jj2WAPTR3l94TTQoBsJAhsfceusC3OeS5537hKJNL4c8O1f GZM+vbAudy529iFVru84ZZLM31RwwOqRP3LRt1sOiSZs50FZ9HE= =Q9dw -----END PGP SIGNATURE----- Merge 5.4.280 into android11-5.4-lts Changes in 5.4.280 Compiler Attributes: Add __uninitialized macro drm/lima: fix shared irq handling on driver remove media: dvb: as102-fe: Fix as10x_register_addr packing media: dvb-usb: dib0700_devices: Add missing release_firmware() IB/core: Implement a limit on UMAD receive List scsi: qedf: Make qedf_execute_tmf() non-preemptible drm/amdgpu: Initialize timestamp for some legacy SOCs drm/amd/display: Skip finding free audio for unknown engine_id media: dw2102: Don't translate i2c read into write sctp: prefer struct_size over open coded arithmetic firmware: dmi: Stop decoding on broken entry Input: ff-core - prefer struct_size over open coded arithmetic net: dsa: mv88e6xxx: Correct check for empty list media: dvb-frontends: tda18271c2dd: Remove casting during div media: s2255: Use refcount_t instead of atomic_t for num_channels media: dvb-frontends: tda10048: Fix integer overflow i2c: i801: Annotate apanel_addr as __ro_after_init powerpc/64: Set _IO_BASE to POISON_POINTER_DELTA not 0 for CONFIG_PCI=n orangefs: fix out-of-bounds fsid access powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#" jffs2: Fix potential illegal address access in jffs2_free_inode s390/pkey: Wipe sensitive data on failure tcp: tcp_mark_head_lost is only valid for sack-tcp tcp: add ece_ack flag to reno sack functions net: tcp better handling of reordering then loss cases UPSTREAM: tcp: fix DSACK undo in fast recovery to call tcp_try_to_open() tcp_metrics: validate source addr length wifi: wilc1000: fix ies_len type in connect path bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set() selftests: fix OOM in msg_zerocopy selftest selftests: make order checking verbose in msg_zerocopy selftest inet_diag: Initialize pad field in struct inet_diag_req_v2 nilfs2: fix inode number range checks nilfs2: add missing check for inode numbers on directory entries mm: optimize the redundant loop of mm_update_owner_next() can: kvaser_usb: Explicitly initialize family in leafimx driver_info struct fsnotify: Do not generate events for O_PATH file descriptors Revert "mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again" drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes drm/amdgpu/atomfirmware: silence UBSAN warning bnx2x: Fix multiple UBSAN array-index-out-of-bounds media: dw2102: fix a potential buffer overflow i2c: pnx: Fix potential deadlock warning from del_timer_sync() call in isr ALSA: hda/realtek: Enable headset mic of JP-IK LEAP W502 with ALC897 nvme-multipath: find NUMA path only for online numa-node nilfs2: fix incorrect inode allocation from reserved inodes filelock: fix potential use-after-free in posix_lock_inode fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading vfs: don't mod negative dentry count when on shrinker list tcp: add TCP_INFO status for failed client TFO tcp: fix incorrect undo caused by DSACK of TLP retransmit octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability() net: lantiq_etop: add blank line after declaration net: ethernet: lantiq_etop: fix double free in detach ppp: reject claimed-as-LCP but actually malformed packets udp: Set SOCK_RCU_FREE earlier in udp_lib_get_port(). s390: Mark psw in __load_psw_mask() as __unitialized ARM: davinci: Convert comma to semicolon octeontx2-af: fix detection of IP layer USB: serial: option: add Telit generic core-dump composition USB: serial: option: add Telit FN912 rmnet compositions USB: serial: option: add Fibocom FM350-GL USB: serial: option: add support for Foxconn T99W651 USB: serial: option: add Netprisma LCUK54 series modules USB: serial: option: add Rolling RW350-GL variants USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k usb: gadget: configfs: Prevent OOB read/write in usb_string_copy() USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor hpet: Support 32-bit userspace nvmem: meson-efuse: Fix return value of nvmem callbacks ALSA: hda/realtek: Limit mic boost on VAIO PRO PX libceph: fix race between delayed_work() and ceph_monc_stop() SUNRPC: Fix RPC client cleaned up the freed pipefs dentries tcp: refactor tcp_retransmit_timer() net: tcp: fix unexcepted socket die when snd_wnd is 0 tcp: use signed arithmetic in tcp_rtx_probe0_timed_out() tcp: avoid too many retransmit packets nilfs2: fix kernel bug on rename operation of broken directory i2c: rcar: bring hardware to known state when probing Linux 5.4.280 Change-Id: Ic487769acece8eedb10cc2a310d97f453abba2f0 Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
f90cc3d8c1
73 changed files with 601 additions and 251 deletions
|
|
@ -1057,7 +1057,7 @@ static const struct pci_device_id i801_ids[] = {
|
|||
MODULE_DEVICE_TABLE(pci, i801_ids);
|
||||
|
||||
#if defined CONFIG_X86 && defined CONFIG_DMI
|
||||
static unsigned char apanel_addr;
|
||||
static unsigned char apanel_addr __ro_after_init;
|
||||
|
||||
/* Scan the system ROM for the signature "FJKEYINF" */
|
||||
static __init const void __iomem *bios_signature(const void __iomem *bios)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include <linux/ioport.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
|
@ -32,7 +31,6 @@ struct i2c_pnx_mif {
|
|||
int ret; /* Return value */
|
||||
int mode; /* Interface mode */
|
||||
struct completion complete; /* I/O completion */
|
||||
struct timer_list timer; /* Timeout */
|
||||
u8 * buf; /* Data buffer */
|
||||
int len; /* Length of data buffer */
|
||||
int order; /* RX Bytes to order via TX */
|
||||
|
|
@ -117,24 +115,6 @@ static inline int wait_reset(struct i2c_pnx_algo_data *data)
|
|||
return (timeout <= 0);
|
||||
}
|
||||
|
||||
static inline void i2c_pnx_arm_timer(struct i2c_pnx_algo_data *alg_data)
|
||||
{
|
||||
struct timer_list *timer = &alg_data->mif.timer;
|
||||
unsigned long expires = msecs_to_jiffies(alg_data->timeout);
|
||||
|
||||
if (expires <= 1)
|
||||
expires = 2;
|
||||
|
||||
del_timer_sync(timer);
|
||||
|
||||
dev_dbg(&alg_data->adapter.dev, "Timer armed at %lu plus %lu jiffies.\n",
|
||||
jiffies, expires);
|
||||
|
||||
timer->expires = jiffies + expires;
|
||||
|
||||
add_timer(timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* i2c_pnx_start - start a device
|
||||
* @slave_addr: slave address
|
||||
|
|
@ -259,8 +239,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data)
|
|||
~(mcntrl_afie | mcntrl_naie | mcntrl_drmie),
|
||||
I2C_REG_CTL(alg_data));
|
||||
|
||||
del_timer_sync(&alg_data->mif.timer);
|
||||
|
||||
dev_dbg(&alg_data->adapter.dev,
|
||||
"%s(): Waking up xfer routine.\n",
|
||||
__func__);
|
||||
|
|
@ -276,8 +254,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data)
|
|||
~(mcntrl_afie | mcntrl_naie | mcntrl_drmie),
|
||||
I2C_REG_CTL(alg_data));
|
||||
|
||||
/* Stop timer. */
|
||||
del_timer_sync(&alg_data->mif.timer);
|
||||
dev_dbg(&alg_data->adapter.dev,
|
||||
"%s(): Waking up xfer routine after zero-xfer.\n",
|
||||
__func__);
|
||||
|
|
@ -364,8 +340,6 @@ static int i2c_pnx_master_rcv(struct i2c_pnx_algo_data *alg_data)
|
|||
mcntrl_drmie | mcntrl_daie);
|
||||
iowrite32(ctl, I2C_REG_CTL(alg_data));
|
||||
|
||||
/* Kill timer. */
|
||||
del_timer_sync(&alg_data->mif.timer);
|
||||
complete(&alg_data->mif.complete);
|
||||
}
|
||||
}
|
||||
|
|
@ -400,8 +374,6 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
|
|||
mcntrl_drmie);
|
||||
iowrite32(ctl, I2C_REG_CTL(alg_data));
|
||||
|
||||
/* Stop timer, to prevent timeout. */
|
||||
del_timer_sync(&alg_data->mif.timer);
|
||||
complete(&alg_data->mif.complete);
|
||||
} else if (stat & mstatus_nai) {
|
||||
/* Slave did not acknowledge, generate a STOP */
|
||||
|
|
@ -419,8 +391,6 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
|
|||
/* Our return value. */
|
||||
alg_data->mif.ret = -EIO;
|
||||
|
||||
/* Stop timer, to prevent timeout. */
|
||||
del_timer_sync(&alg_data->mif.timer);
|
||||
complete(&alg_data->mif.complete);
|
||||
} else {
|
||||
/*
|
||||
|
|
@ -453,9 +423,8 @@ static irqreturn_t i2c_pnx_interrupt(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void i2c_pnx_timeout(struct timer_list *t)
|
||||
static void i2c_pnx_timeout(struct i2c_pnx_algo_data *alg_data)
|
||||
{
|
||||
struct i2c_pnx_algo_data *alg_data = from_timer(alg_data, t, mif.timer);
|
||||
u32 ctl;
|
||||
|
||||
dev_err(&alg_data->adapter.dev,
|
||||
|
|
@ -472,7 +441,6 @@ static void i2c_pnx_timeout(struct timer_list *t)
|
|||
iowrite32(ctl, I2C_REG_CTL(alg_data));
|
||||
wait_reset(alg_data);
|
||||
alg_data->mif.ret = -EIO;
|
||||
complete(&alg_data->mif.complete);
|
||||
}
|
||||
|
||||
static inline void bus_reset_if_active(struct i2c_pnx_algo_data *alg_data)
|
||||
|
|
@ -514,6 +482,7 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
|||
struct i2c_msg *pmsg;
|
||||
int rc = 0, completed = 0, i;
|
||||
struct i2c_pnx_algo_data *alg_data = adap->algo_data;
|
||||
unsigned long time_left;
|
||||
u32 stat;
|
||||
|
||||
dev_dbg(&alg_data->adapter.dev,
|
||||
|
|
@ -548,7 +517,6 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
|||
dev_dbg(&alg_data->adapter.dev, "%s(): mode %d, %d bytes\n",
|
||||
__func__, alg_data->mif.mode, alg_data->mif.len);
|
||||
|
||||
i2c_pnx_arm_timer(alg_data);
|
||||
|
||||
/* initialize the completion var */
|
||||
init_completion(&alg_data->mif.complete);
|
||||
|
|
@ -564,7 +532,10 @@ i2c_pnx_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
|
|||
break;
|
||||
|
||||
/* Wait for completion */
|
||||
wait_for_completion(&alg_data->mif.complete);
|
||||
time_left = wait_for_completion_timeout(&alg_data->mif.complete,
|
||||
alg_data->timeout);
|
||||
if (time_left == 0)
|
||||
i2c_pnx_timeout(alg_data);
|
||||
|
||||
if (!(rc = alg_data->mif.ret))
|
||||
completed++;
|
||||
|
|
@ -657,7 +628,10 @@ static int i2c_pnx_probe(struct platform_device *pdev)
|
|||
alg_data->adapter.algo_data = alg_data;
|
||||
alg_data->adapter.nr = pdev->id;
|
||||
|
||||
alg_data->timeout = I2C_PNX_TIMEOUT_DEFAULT;
|
||||
alg_data->timeout = msecs_to_jiffies(I2C_PNX_TIMEOUT_DEFAULT);
|
||||
if (alg_data->timeout <= 1)
|
||||
alg_data->timeout = 2;
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
alg_data->adapter.dev.of_node = of_node_get(pdev->dev.of_node);
|
||||
if (pdev->dev.of_node) {
|
||||
|
|
@ -677,8 +651,6 @@ static int i2c_pnx_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(alg_data->clk))
|
||||
return PTR_ERR(alg_data->clk);
|
||||
|
||||
timer_setup(&alg_data->mif.timer, i2c_pnx_timeout, 0);
|
||||
|
||||
snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name),
|
||||
"%s", pdev->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -218,6 +218,14 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv)
|
|||
|
||||
}
|
||||
|
||||
static void rcar_i2c_reset_slave(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
rcar_i2c_write(priv, ICSIER, 0);
|
||||
rcar_i2c_write(priv, ICSSR, 0);
|
||||
rcar_i2c_write(priv, ICSCR, SDBS);
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
}
|
||||
|
||||
static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -863,11 +871,8 @@ static int rcar_unreg_slave(struct i2c_client *slave)
|
|||
|
||||
/* ensure no irq is running before clearing ptr */
|
||||
disable_irq(priv->irq);
|
||||
rcar_i2c_write(priv, ICSIER, 0);
|
||||
rcar_i2c_write(priv, ICSSR, 0);
|
||||
rcar_i2c_reset_slave(priv);
|
||||
enable_irq(priv->irq);
|
||||
rcar_i2c_write(priv, ICSCR, SDBS);
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
|
||||
priv->slave = NULL;
|
||||
|
||||
|
|
@ -973,7 +978,9 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
|||
if (ret < 0)
|
||||
goto out_pm_put;
|
||||
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
/* Bring hardware to known state */
|
||||
rcar_i2c_init(priv);
|
||||
rcar_i2c_reset_slave(priv);
|
||||
|
||||
if (priv->devtype == I2C_RCAR_GEN3) {
|
||||
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue