mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
Merge 4.19.127 into android-4.19-stable
Changes in 4.19.127 Revert "cgroup: Add memory barriers to plug cgroup_rstat_updated() race window" libnvdimm: Fix endian conversion issues mm: Fix mremap not considering huge pmd devmap HID: sony: Fix for broken buttons on DS3 USB dongles HID: i2c-hid: add Schneider SCL142ALM to descriptor override p54usb: add AirVasT USB stick device-id kernel/relay.c: handle alloc_percpu returning NULL in relay_open mmc: fix compilation of user API scsi: ufs: Release clock if DMA map fails net: dsa: mt7530: set CPU port to fallback mode airo: Fix read overflows sending packets drm/i915: fix port checks for MST support on gen >= 11 scsi: hisi_sas: Check sas_port before using it powerpc/powernv: Avoid re-registration of imc debugfs directory spi: dw: use "smp_mb()" to avoid sending spi data error s390/ftrace: save traced function caller ARC: Fix ICCM & DCCM runtime size checks ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT evm: Fix RCU list related warnings i2c: altera: Fix race between xfer_msg and isr thread x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables net: bmac: Fix read of MAC address from ROM drm/edid: Add Oculus Rift S to non-desktop list s390/mm: fix set_huge_pte_at() for empty ptes null_blk: return error for invalid zone size net/ethernet/freescale: rework quiesce/activate for ucc_geth net: ethernet: stmmac: Enable interface clocks on probe for IPQ806x net: smsc911x: Fix runtime PM imbalance on error Linux 4.19.127 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I0ba65b19a1f1d3d1767e8f5cccef4b2f320cdd59
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 126
|
||||
SUBLEVEL = 127
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/of.h>
|
||||
@@ -406,12 +407,12 @@ static void arc_chk_core_config(void)
|
||||
if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr)
|
||||
panic("Linux built with incorrect DCCM Base address\n");
|
||||
|
||||
if (CONFIG_ARC_DCCM_SZ != cpu->dccm.sz)
|
||||
if (CONFIG_ARC_DCCM_SZ * SZ_1K != cpu->dccm.sz)
|
||||
panic("Linux built with incorrect DCCM Size\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_ICCM
|
||||
if (CONFIG_ARC_ICCM_SZ != cpu->iccm.sz)
|
||||
if (CONFIG_ARC_ICCM_SZ * SZ_1K != cpu->iccm.sz)
|
||||
panic("Linux built with incorrect ICCM Size\n");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
menuconfig ARC_PLAT_EZNPS
|
||||
bool "\"EZchip\" ARC dev platform"
|
||||
depends on ISA_ARCOMPACT
|
||||
select CPU_BIG_ENDIAN
|
||||
select CLKSRC_NPS if !PHYS_ADDR_T_64BIT
|
||||
select EZNPS_GIC
|
||||
|
||||
@@ -63,10 +63,6 @@ static void export_imc_mode_and_cmd(struct device_node *node,
|
||||
|
||||
imc_debugfs_parent = debugfs_create_dir("imc", powerpc_debugfs_root);
|
||||
|
||||
/*
|
||||
* Return here, either because 'imc' directory already exists,
|
||||
* Or failed to create a new one.
|
||||
*/
|
||||
if (!imc_debugfs_parent)
|
||||
return;
|
||||
|
||||
@@ -139,7 +135,6 @@ static int imc_get_mem_addr_nest(struct device_node *node,
|
||||
}
|
||||
|
||||
pmu_ptr->imc_counter_mmaped = true;
|
||||
export_imc_mode_and_cmd(node, pmu_ptr);
|
||||
kfree(base_addr_arr);
|
||||
kfree(chipid_arr);
|
||||
return 0;
|
||||
@@ -155,7 +150,7 @@ error:
|
||||
* and domain as the inputs.
|
||||
* Allocates memory for the struct imc_pmu, sets up its domain, size and offsets
|
||||
*/
|
||||
static int imc_pmu_create(struct device_node *parent, int pmu_index, int domain)
|
||||
static struct imc_pmu *imc_pmu_create(struct device_node *parent, int pmu_index, int domain)
|
||||
{
|
||||
int ret = 0;
|
||||
struct imc_pmu *pmu_ptr;
|
||||
@@ -163,27 +158,23 @@ static int imc_pmu_create(struct device_node *parent, int pmu_index, int domain)
|
||||
|
||||
/* Return for unknown domain */
|
||||
if (domain < 0)
|
||||
return -EINVAL;
|
||||
return NULL;
|
||||
|
||||
/* memory for pmu */
|
||||
pmu_ptr = kzalloc(sizeof(*pmu_ptr), GFP_KERNEL);
|
||||
if (!pmu_ptr)
|
||||
return -ENOMEM;
|
||||
return NULL;
|
||||
|
||||
/* Set the domain */
|
||||
pmu_ptr->domain = domain;
|
||||
|
||||
ret = of_property_read_u32(parent, "size", &pmu_ptr->counter_mem_size);
|
||||
if (ret) {
|
||||
ret = -EINVAL;
|
||||
if (ret)
|
||||
goto free_pmu;
|
||||
}
|
||||
|
||||
if (!of_property_read_u32(parent, "offset", &offset)) {
|
||||
if (imc_get_mem_addr_nest(parent, pmu_ptr, offset)) {
|
||||
ret = -EINVAL;
|
||||
if (imc_get_mem_addr_nest(parent, pmu_ptr, offset))
|
||||
goto free_pmu;
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to register IMC pmu */
|
||||
@@ -194,14 +185,14 @@ static int imc_pmu_create(struct device_node *parent, int pmu_index, int domain)
|
||||
if (pmu_ptr->domain == IMC_DOMAIN_NEST)
|
||||
kfree(pmu_ptr->mem_info);
|
||||
kfree(pmu_ptr);
|
||||
return ret;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return pmu_ptr;
|
||||
|
||||
free_pmu:
|
||||
kfree(pmu_ptr);
|
||||
return ret;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void disable_nest_pmu_counters(void)
|
||||
@@ -258,6 +249,7 @@ int get_max_nest_dev(void)
|
||||
static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *imc_dev = pdev->dev.of_node;
|
||||
struct imc_pmu *pmu;
|
||||
int pmu_count = 0, domain;
|
||||
bool core_imc_reg = false, thread_imc_reg = false;
|
||||
u32 type;
|
||||
@@ -273,6 +265,7 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
for_each_compatible_node(imc_dev, NULL, IMC_DTB_UNIT_COMPAT) {
|
||||
pmu = NULL;
|
||||
if (of_property_read_u32(imc_dev, "type", &type)) {
|
||||
pr_warn("IMC Device without type property\n");
|
||||
continue;
|
||||
@@ -294,9 +287,13 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!imc_pmu_create(imc_dev, pmu_count, domain)) {
|
||||
if (domain == IMC_DOMAIN_NEST)
|
||||
pmu = imc_pmu_create(imc_dev, pmu_count, domain);
|
||||
if (pmu != NULL) {
|
||||
if (domain == IMC_DOMAIN_NEST) {
|
||||
if (!imc_debugfs_parent)
|
||||
export_imc_mode_and_cmd(imc_dev, pmu);
|
||||
pmu_count++;
|
||||
}
|
||||
if (domain == IMC_DOMAIN_CORE)
|
||||
core_imc_reg = true;
|
||||
if (domain == IMC_DOMAIN_THREAD)
|
||||
@@ -304,10 +301,6 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
/* If none of the nest units are registered, remove debugfs interface */
|
||||
if (pmu_count == 0)
|
||||
debugfs_remove_recursive(imc_debugfs_parent);
|
||||
|
||||
/* If core imc is not registered, unregister thread-imc */
|
||||
if (!core_imc_reg && thread_imc_reg)
|
||||
unregister_thread_imc();
|
||||
|
||||
@@ -40,6 +40,7 @@ EXPORT_SYMBOL(_mcount)
|
||||
ENTRY(ftrace_caller)
|
||||
.globl ftrace_regs_caller
|
||||
.set ftrace_regs_caller,ftrace_caller
|
||||
stg %r14,(__SF_GPRS+8*8)(%r15) # save traced function caller
|
||||
lgr %r1,%r15
|
||||
#if !(defined(CC_USING_HOTPATCH) || defined(CC_USING_NOP_MCOUNT))
|
||||
aghi %r0,MCOUNT_RETURN_FIXUP
|
||||
|
||||
@@ -159,10 +159,13 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
rste &= ~_SEGMENT_ENTRY_NOEXEC;
|
||||
|
||||
/* Set correct table type for 2G hugepages */
|
||||
if ((pte_val(*ptep) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3)
|
||||
rste |= _REGION_ENTRY_TYPE_R3 | _REGION3_ENTRY_LARGE;
|
||||
else
|
||||
if ((pte_val(*ptep) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R3) {
|
||||
if (likely(pte_present(pte)))
|
||||
rste |= _REGION3_ENTRY_LARGE;
|
||||
rste |= _REGION_ENTRY_TYPE_R3;
|
||||
} else if (likely(pte_present(pte)))
|
||||
rste |= _SEGMENT_ENTRY_LARGE;
|
||||
|
||||
clear_huge_pte_skeys(mm, rste);
|
||||
pte_val(*ptep) = rste;
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ static inline int pmd_large(pmd_t pte)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
/* NOTE: when predicate huge page, consider also pmd_devmap, or use pmd_large */
|
||||
static inline int pmd_trans_huge(pmd_t pmd)
|
||||
{
|
||||
return (pmd_val(pmd) & (_PAGE_PSE|_PAGE_DEVMAP)) == _PAGE_PSE;
|
||||
|
||||
@@ -384,7 +384,7 @@ static void enter_uniprocessor(void)
|
||||
int cpu;
|
||||
int err;
|
||||
|
||||
if (downed_cpus == NULL &&
|
||||
if (!cpumask_available(downed_cpus) &&
|
||||
!alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) {
|
||||
pr_notice("Failed to allocate mask\n");
|
||||
goto out;
|
||||
@@ -414,7 +414,7 @@ static void leave_uniprocessor(void)
|
||||
int cpu;
|
||||
int err;
|
||||
|
||||
if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0)
|
||||
if (!cpumask_available(downed_cpus) || cpumask_weight(downed_cpus) == 0)
|
||||
return;
|
||||
pr_notice("Re-enabling CPUs...\n");
|
||||
for_each_cpu(cpu, downed_cpus) {
|
||||
|
||||
@@ -20,6 +20,10 @@ int null_zone_init(struct nullb_device *dev)
|
||||
pr_err("null_blk: zone_size must be power-of-two\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (dev->zone_size > dev->size) {
|
||||
pr_err("Zone size larger than device capacity\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev->zone_size_sects = dev->zone_size << ZONE_SIZE_SHIFT;
|
||||
dev->nr_zones = dev_size >>
|
||||
|
||||
@@ -206,10 +206,11 @@ static const struct edid_quirk {
|
||||
{ "HVR", 0xaa01, EDID_QUIRK_NON_DESKTOP },
|
||||
{ "HVR", 0xaa02, EDID_QUIRK_NON_DESKTOP },
|
||||
|
||||
/* Oculus Rift DK1, DK2, and CV1 VR Headsets */
|
||||
/* Oculus Rift DK1, DK2, CV1 and Rift S VR Headsets */
|
||||
{ "OVR", 0x0001, EDID_QUIRK_NON_DESKTOP },
|
||||
{ "OVR", 0x0003, EDID_QUIRK_NON_DESKTOP },
|
||||
{ "OVR", 0x0004, EDID_QUIRK_NON_DESKTOP },
|
||||
{ "OVR", 0x0012, EDID_QUIRK_NON_DESKTOP },
|
||||
|
||||
/* Windows Mixed Reality Headsets */
|
||||
{ "ACR", 0x7fce, EDID_QUIRK_NON_DESKTOP },
|
||||
|
||||
@@ -6288,11 +6288,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
|
||||
intel_connector->get_hw_state = intel_connector_get_hw_state;
|
||||
|
||||
/* init MST on ports that can support it */
|
||||
if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
|
||||
(port == PORT_B || port == PORT_C ||
|
||||
port == PORT_D || port == PORT_F))
|
||||
intel_dp_mst_encoder_init(intel_dig_port,
|
||||
intel_connector->base.base.id);
|
||||
intel_dp_mst_encoder_init(intel_dig_port,
|
||||
intel_connector->base.base.id);
|
||||
|
||||
if (!intel_edp_init_connector(intel_dp, intel_connector)) {
|
||||
intel_dp_aux_fini(intel_dp);
|
||||
|
||||
@@ -588,21 +588,31 @@ intel_dp_create_fake_mst_encoders(struct intel_digital_port *intel_dig_port)
|
||||
int
|
||||
intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_base_id)
|
||||
{
|
||||
struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
|
||||
struct intel_dp *intel_dp = &intel_dig_port->dp;
|
||||
struct drm_device *dev = intel_dig_port->base.base.dev;
|
||||
enum port port = intel_dig_port->base.port;
|
||||
int ret;
|
||||
|
||||
intel_dp->can_mst = true;
|
||||
if (!HAS_DP_MST(i915) || intel_dp_is_edp(intel_dp))
|
||||
return 0;
|
||||
|
||||
if (INTEL_GEN(i915) < 12 && port == PORT_A)
|
||||
return 0;
|
||||
|
||||
if (INTEL_GEN(i915) < 11 && port == PORT_E)
|
||||
return 0;
|
||||
|
||||
intel_dp->mst_mgr.cbs = &mst_cbs;
|
||||
|
||||
/* create encoders */
|
||||
intel_dp_create_fake_mst_encoders(intel_dig_port);
|
||||
ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev,
|
||||
ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, &i915->drm,
|
||||
&intel_dp->aux, 16, 3, conn_base_id);
|
||||
if (ret) {
|
||||
intel_dp->can_mst = false;
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
intel_dp->can_mst = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -869,6 +869,23 @@ static u8 *sony_report_fixup(struct hid_device *hdev, u8 *rdesc,
|
||||
if (sc->quirks & PS3REMOTE)
|
||||
return ps3remote_fixup(hdev, rdesc, rsize);
|
||||
|
||||
/*
|
||||
* Some knock-off USB dongles incorrectly report their button count
|
||||
* as 13 instead of 16 causing three non-functional buttons.
|
||||
*/
|
||||
if ((sc->quirks & SIXAXIS_CONTROLLER_USB) && *rsize >= 45 &&
|
||||
/* Report Count (13) */
|
||||
rdesc[23] == 0x95 && rdesc[24] == 0x0D &&
|
||||
/* Usage Maximum (13) */
|
||||
rdesc[37] == 0x29 && rdesc[38] == 0x0D &&
|
||||
/* Report Count (3) */
|
||||
rdesc[43] == 0x95 && rdesc[44] == 0x03) {
|
||||
hid_info(hdev, "Fixing up USB dongle report descriptor\n");
|
||||
rdesc[24] = 0x10;
|
||||
rdesc[38] = 0x10;
|
||||
rdesc[44] = 0x00;
|
||||
}
|
||||
|
||||
return rdesc;
|
||||
}
|
||||
|
||||
|
||||
@@ -381,6 +381,14 @@ static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = {
|
||||
},
|
||||
.driver_data = (void *)&sipodev_desc
|
||||
},
|
||||
{
|
||||
.ident = "Schneider SCL142ALM",
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SCHNEIDER"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SCL142ALM"),
|
||||
},
|
||||
.driver_data = (void *)&sipodev_desc
|
||||
},
|
||||
{ } /* Terminate list */
|
||||
};
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
* @isr_mask: cached copy of local ISR enables.
|
||||
* @isr_status: cached copy of local ISR status.
|
||||
* @lock: spinlock for IRQ synchronization.
|
||||
* @isr_mutex: mutex for IRQ thread.
|
||||
*/
|
||||
struct altr_i2c_dev {
|
||||
void __iomem *base;
|
||||
@@ -97,6 +98,7 @@ struct altr_i2c_dev {
|
||||
u32 isr_mask;
|
||||
u32 isr_status;
|
||||
spinlock_t lock; /* IRQ synchronization */
|
||||
struct mutex isr_mutex;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -256,10 +258,11 @@ static irqreturn_t altr_i2c_isr(int irq, void *_dev)
|
||||
struct altr_i2c_dev *idev = _dev;
|
||||
u32 status = idev->isr_status;
|
||||
|
||||
mutex_lock(&idev->isr_mutex);
|
||||
if (!idev->msg) {
|
||||
dev_warn(idev->dev, "unexpected interrupt\n");
|
||||
altr_i2c_int_clear(idev, ALTR_I2C_ALL_IRQ);
|
||||
return IRQ_HANDLED;
|
||||
goto out;
|
||||
}
|
||||
read = (idev->msg->flags & I2C_M_RD) != 0;
|
||||
|
||||
@@ -312,6 +315,8 @@ static irqreturn_t altr_i2c_isr(int irq, void *_dev)
|
||||
complete(&idev->msg_complete);
|
||||
dev_dbg(idev->dev, "Message Complete\n");
|
||||
}
|
||||
out:
|
||||
mutex_unlock(&idev->isr_mutex);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -323,6 +328,7 @@ static int altr_i2c_xfer_msg(struct altr_i2c_dev *idev, struct i2c_msg *msg)
|
||||
u32 value;
|
||||
u8 addr = i2c_8bit_addr_from_msg(msg);
|
||||
|
||||
mutex_lock(&idev->isr_mutex);
|
||||
idev->msg = msg;
|
||||
idev->msg_len = msg->len;
|
||||
idev->buf = msg->buf;
|
||||
@@ -347,6 +353,7 @@ static int altr_i2c_xfer_msg(struct altr_i2c_dev *idev, struct i2c_msg *msg)
|
||||
altr_i2c_int_enable(idev, imask, true);
|
||||
altr_i2c_fill_tx_fifo(idev);
|
||||
}
|
||||
mutex_unlock(&idev->isr_mutex);
|
||||
|
||||
time_left = wait_for_completion_timeout(&idev->msg_complete,
|
||||
ALTR_I2C_XFER_TIMEOUT);
|
||||
@@ -420,6 +427,7 @@ static int altr_i2c_probe(struct platform_device *pdev)
|
||||
idev->dev = &pdev->dev;
|
||||
init_completion(&idev->msg_complete);
|
||||
spin_lock_init(&idev->lock);
|
||||
mutex_init(&idev->isr_mutex);
|
||||
|
||||
ret = device_property_read_u32(idev->dev, "fifo-size",
|
||||
&idev->fifo_size);
|
||||
|
||||
@@ -860,10 +860,15 @@ mt7530_port_set_vlan_aware(struct dsa_switch *ds, int port)
|
||||
PCR_MATRIX_MASK, PCR_MATRIX(MT7530_ALL_MEMBERS));
|
||||
|
||||
/* Trapped into security mode allows packet forwarding through VLAN
|
||||
* table lookup.
|
||||
* table lookup. CPU port is set to fallback mode to let untagged
|
||||
* frames pass through.
|
||||
*/
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
|
||||
MT7530_PORT_SECURITY_MODE);
|
||||
if (dsa_is_cpu_port(ds, port))
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
|
||||
MT7530_PORT_FALLBACK_MODE);
|
||||
else
|
||||
mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
|
||||
MT7530_PORT_SECURITY_MODE);
|
||||
|
||||
/* Set the port as a user port which is to be able to recognize VID
|
||||
* from incoming packets before fetching entry within the VLAN table.
|
||||
|
||||
@@ -148,6 +148,12 @@ enum mt7530_port_mode {
|
||||
/* Port Matrix Mode: Frames are forwarded by the PCR_MATRIX members. */
|
||||
MT7530_PORT_MATRIX_MODE = PORT_VLAN(0),
|
||||
|
||||
/* Fallback Mode: Forward received frames with ingress ports that do
|
||||
* not belong to the VLAN member. Frames whose VID is not listed on
|
||||
* the VLAN table are forwarded by the PCR_MATRIX members.
|
||||
*/
|
||||
MT7530_PORT_FALLBACK_MODE = PORT_VLAN(1),
|
||||
|
||||
/* Security Mode: Discard any frame due to ingress membership
|
||||
* violation or VID missed on the VLAN table.
|
||||
*/
|
||||
|
||||
@@ -1181,7 +1181,7 @@ bmac_get_station_address(struct net_device *dev, unsigned char *ea)
|
||||
int i;
|
||||
unsigned short data;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
reset_and_select_srom(dev);
|
||||
data = read_srom(dev, i + EnetAddressOffset/2, SROMAddressBits);
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <soc/fsl/qe/ucc.h>
|
||||
#include <soc/fsl/qe/ucc_fast.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <net/sch_generic.h>
|
||||
|
||||
#include "ucc_geth.h"
|
||||
|
||||
@@ -1551,11 +1552,8 @@ static int ugeth_disable(struct ucc_geth_private *ugeth, enum comm_dir mode)
|
||||
|
||||
static void ugeth_quiesce(struct ucc_geth_private *ugeth)
|
||||
{
|
||||
/* Prevent any further xmits, plus detach the device. */
|
||||
netif_device_detach(ugeth->ndev);
|
||||
|
||||
/* Wait for any current xmits to finish. */
|
||||
netif_tx_disable(ugeth->ndev);
|
||||
/* Prevent any further xmits */
|
||||
netif_tx_stop_all_queues(ugeth->ndev);
|
||||
|
||||
/* Disable the interrupt to avoid NAPI rescheduling. */
|
||||
disable_irq(ugeth->ug_info->uf_info.irq);
|
||||
@@ -1568,7 +1566,10 @@ static void ugeth_activate(struct ucc_geth_private *ugeth)
|
||||
{
|
||||
napi_enable(&ugeth->napi);
|
||||
enable_irq(ugeth->ug_info->uf_info.irq);
|
||||
netif_device_attach(ugeth->ndev);
|
||||
|
||||
/* allow to xmit again */
|
||||
netif_tx_wake_all_queues(ugeth->ndev);
|
||||
__netdev_watchdog_up(ugeth->ndev);
|
||||
}
|
||||
|
||||
/* Called every time the controller might need to be made
|
||||
|
||||
@@ -2515,20 +2515,20 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
|
||||
|
||||
retval = smsc911x_init(dev);
|
||||
if (retval < 0)
|
||||
goto out_disable_resources;
|
||||
goto out_init_fail;
|
||||
|
||||
netif_carrier_off(dev);
|
||||
|
||||
retval = smsc911x_mii_init(pdev, dev);
|
||||
if (retval) {
|
||||
SMSC_WARN(pdata, probe, "Error %i initialising mii", retval);
|
||||
goto out_disable_resources;
|
||||
goto out_init_fail;
|
||||
}
|
||||
|
||||
retval = register_netdev(dev);
|
||||
if (retval) {
|
||||
SMSC_WARN(pdata, probe, "Error %i registering device", retval);
|
||||
goto out_disable_resources;
|
||||
goto out_init_fail;
|
||||
} else {
|
||||
SMSC_TRACE(pdata, probe,
|
||||
"Network interface: \"%s\"", dev->name);
|
||||
@@ -2569,9 +2569,10 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
|
||||
|
||||
return 0;
|
||||
|
||||
out_disable_resources:
|
||||
out_init_fail:
|
||||
pm_runtime_put(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
out_disable_resources:
|
||||
(void)smsc911x_disable_resources(pdev);
|
||||
out_enable_resources_fail:
|
||||
smsc911x_free_resources(pdev);
|
||||
|
||||
@@ -318,6 +318,19 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
|
||||
/* Enable PTP clock */
|
||||
regmap_read(gmac->nss_common, NSS_COMMON_CLK_GATE, &val);
|
||||
val |= NSS_COMMON_CLK_GATE_PTP_EN(gmac->id);
|
||||
switch (gmac->phy_mode) {
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
val |= NSS_COMMON_CLK_GATE_RGMII_RX_EN(gmac->id) |
|
||||
NSS_COMMON_CLK_GATE_RGMII_TX_EN(gmac->id);
|
||||
break;
|
||||
case PHY_INTERFACE_MODE_SGMII:
|
||||
val |= NSS_COMMON_CLK_GATE_GMII_RX_EN(gmac->id) |
|
||||
NSS_COMMON_CLK_GATE_GMII_TX_EN(gmac->id);
|
||||
break;
|
||||
default:
|
||||
/* We don't get here; the switch above will have errored out */
|
||||
unreachable();
|
||||
}
|
||||
regmap_write(gmac->nss_common, NSS_COMMON_CLK_GATE, val);
|
||||
|
||||
if (gmac->phy_mode == PHY_INTERFACE_MODE_SGMII) {
|
||||
|
||||
@@ -1928,6 +1928,10 @@ static netdev_tx_t mpi_start_xmit(struct sk_buff *skb,
|
||||
airo_print_err(dev->name, "%s: skb == NULL!",__func__);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (skb_padto(skb, ETH_ZLEN)) {
|
||||
dev->stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
npacks = skb_queue_len (&ai->txq);
|
||||
|
||||
if (npacks >= MAXTXQ - 1) {
|
||||
@@ -2130,6 +2134,10 @@ static netdev_tx_t airo_start_xmit(struct sk_buff *skb,
|
||||
airo_print_err(dev->name, "%s: skb == NULL!", __func__);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (skb_padto(skb, ETH_ZLEN)) {
|
||||
dev->stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
/* Find a vacant FID */
|
||||
for( i = 0; i < MAX_FIDS / 2 && (fids[i] & 0xffff0000); i++ );
|
||||
@@ -2204,6 +2212,10 @@ static netdev_tx_t airo_start_xmit11(struct sk_buff *skb,
|
||||
airo_print_err(dev->name, "%s: skb == NULL!", __func__);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (skb_padto(skb, ETH_ZLEN)) {
|
||||
dev->stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
/* Find a vacant FID */
|
||||
for( i = MAX_FIDS / 2; i < MAX_FIDS && (fids[i] & 0xffff0000); i++ );
|
||||
|
||||
@@ -64,6 +64,7 @@ static const struct usb_device_id p54u_table[] = {
|
||||
{USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */
|
||||
{USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
|
||||
{USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
|
||||
{USB_DEVICE(0x124a, 0x4026)}, /* AirVasT USB wireless device */
|
||||
{USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */
|
||||
{USB_DEVICE(0x15a9, 0x0002)}, /* Gemtek WUBI-100GW 802.11g */
|
||||
{USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */
|
||||
|
||||
@@ -400,9 +400,9 @@ static int btt_flog_write(struct arena_info *arena, u32 lane, u32 sub,
|
||||
arena->freelist[lane].sub = 1 - arena->freelist[lane].sub;
|
||||
if (++(arena->freelist[lane].seq) == 4)
|
||||
arena->freelist[lane].seq = 1;
|
||||
if (ent_e_flag(ent->old_map))
|
||||
if (ent_e_flag(le32_to_cpu(ent->old_map)))
|
||||
arena->freelist[lane].has_err = 1;
|
||||
arena->freelist[lane].block = le32_to_cpu(ent_lba(ent->old_map));
|
||||
arena->freelist[lane].block = ent_lba(le32_to_cpu(ent->old_map));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -568,8 +568,8 @@ static int btt_freelist_init(struct arena_info *arena)
|
||||
* FIXME: if error clearing fails during init, we want to make
|
||||
* the BTT read-only
|
||||
*/
|
||||
if (ent_e_flag(log_new.old_map) &&
|
||||
!ent_normal(log_new.old_map)) {
|
||||
if (ent_e_flag(le32_to_cpu(log_new.old_map)) &&
|
||||
!ent_normal(le32_to_cpu(log_new.old_map))) {
|
||||
arena->freelist[i].has_err = 1;
|
||||
ret = arena_clear_freelist_error(arena, i);
|
||||
if (ret)
|
||||
|
||||
@@ -1996,7 +1996,7 @@ static struct device *create_namespace_pmem(struct nd_region *nd_region,
|
||||
nd_mapping = &nd_region->mapping[i];
|
||||
label_ent = list_first_entry_or_null(&nd_mapping->labels,
|
||||
typeof(*label_ent), list);
|
||||
label0 = label_ent ? label_ent->label : 0;
|
||||
label0 = label_ent ? label_ent->label : NULL;
|
||||
|
||||
if (!label0) {
|
||||
WARN_ON(1);
|
||||
@@ -2332,8 +2332,9 @@ static struct device **scan_labels(struct nd_region *nd_region)
|
||||
continue;
|
||||
|
||||
/* skip labels that describe extents outside of the region */
|
||||
if (nd_label->dpa < nd_mapping->start || nd_label->dpa > map_end)
|
||||
continue;
|
||||
if (__le64_to_cpu(nd_label->dpa) < nd_mapping->start ||
|
||||
__le64_to_cpu(nd_label->dpa) > map_end)
|
||||
continue;
|
||||
|
||||
i = add_namespace_resource(nd_region, nd_label, devs, count);
|
||||
if (i < 0)
|
||||
|
||||
@@ -789,12 +789,13 @@ static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy)
|
||||
struct hisi_hba *hisi_hba = sas_ha->lldd_ha;
|
||||
struct hisi_sas_phy *phy = sas_phy->lldd_phy;
|
||||
struct asd_sas_port *sas_port = sas_phy->port;
|
||||
struct hisi_sas_port *port = to_hisi_sas_port(sas_port);
|
||||
struct hisi_sas_port *port;
|
||||
unsigned long flags;
|
||||
|
||||
if (!sas_port)
|
||||
return;
|
||||
|
||||
port = to_hisi_sas_port(sas_port);
|
||||
spin_lock_irqsave(&hisi_hba->lock, flags);
|
||||
port->port_attached = 1;
|
||||
port->id = phy->port_id;
|
||||
|
||||
@@ -2542,6 +2542,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
||||
|
||||
err = ufshcd_map_sg(hba, lrbp);
|
||||
if (err) {
|
||||
ufshcd_release(hba);
|
||||
lrbp->cmd = NULL;
|
||||
clear_bit_unlock(tag, &hba->lrb_in_use);
|
||||
goto out;
|
||||
|
||||
@@ -304,6 +304,9 @@ static int dw_spi_transfer_one(struct spi_controller *master,
|
||||
dws->len = transfer->len;
|
||||
spin_unlock_irqrestore(&dws->buf_lock, flags);
|
||||
|
||||
/* Ensure dw->rx and dw->rx_end are visible */
|
||||
smp_mb();
|
||||
|
||||
spi_enable_chip(dws, 0);
|
||||
|
||||
/* Handle per transfer options for bpw and speed */
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define LINUX_MMC_IOCTL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/major.h>
|
||||
|
||||
struct mmc_ioc_cmd {
|
||||
/* Implies direction of data. true = write, false = read */
|
||||
|
||||
@@ -32,12 +32,9 @@ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Paired with the one in cgroup_rstat_cpu_pop_upated(). Either we
|
||||
* see NULL updated_next or they see our updated stat.
|
||||
*/
|
||||
smp_mb();
|
||||
|
||||
/*
|
||||
* Speculative already-on-list test. This may race leading to
|
||||
* temporary inaccuracies, which is fine.
|
||||
*
|
||||
* Because @parent's updated_children is terminated with @parent
|
||||
* instead of NULL, we can tell whether @cgrp is on the list by
|
||||
* testing the next pointer for NULL.
|
||||
@@ -133,13 +130,6 @@ static struct cgroup *cgroup_rstat_cpu_pop_updated(struct cgroup *pos,
|
||||
*nextp = rstatc->updated_next;
|
||||
rstatc->updated_next = NULL;
|
||||
|
||||
/*
|
||||
* Paired with the one in cgroup_rstat_cpu_updated().
|
||||
* Either they see NULL updated_next or we see their
|
||||
* updated stat.
|
||||
*/
|
||||
smp_mb();
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
@@ -581,6 +581,11 @@ struct rchan *relay_open(const char *base_filename,
|
||||
return NULL;
|
||||
|
||||
chan->buf = alloc_percpu(struct rchan_buf *);
|
||||
if (!chan->buf) {
|
||||
kfree(chan);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
chan->version = RELAYFS_CHANNEL_VERSION;
|
||||
chan->n_subbufs = n_subbufs;
|
||||
chan->subbuf_size = subbuf_size;
|
||||
|
||||
@@ -221,7 +221,7 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
|
||||
new_pmd = alloc_new_pmd(vma->vm_mm, vma, new_addr);
|
||||
if (!new_pmd)
|
||||
break;
|
||||
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd)) {
|
||||
if (is_swap_pmd(*old_pmd) || pmd_trans_huge(*old_pmd) || pmd_devmap(*old_pmd)) {
|
||||
if (extent == HPAGE_PMD_SIZE) {
|
||||
bool moved;
|
||||
/* See comment in move_ptes() */
|
||||
|
||||
@@ -215,7 +215,7 @@ static int evm_calc_hmac_or_hash(struct dentry *dentry,
|
||||
data->hdr.length = crypto_shash_digestsize(desc->tfm);
|
||||
|
||||
error = -ENODATA;
|
||||
list_for_each_entry_rcu(xattr, &evm_config_xattrnames, list) {
|
||||
list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
|
||||
bool is_ima = false;
|
||||
|
||||
if (strcmp(xattr->name, XATTR_NAME_IMA) == 0)
|
||||
|
||||
@@ -102,7 +102,7 @@ static int evm_find_protected_xattrs(struct dentry *dentry)
|
||||
if (!(inode->i_opflags & IOP_XATTR))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
list_for_each_entry_rcu(xattr, &evm_config_xattrnames, list) {
|
||||
list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
|
||||
error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0);
|
||||
if (error < 0) {
|
||||
if (error == -ENODATA)
|
||||
@@ -233,7 +233,7 @@ static int evm_protected_xattr(const char *req_xattr_name)
|
||||
struct xattr_list *xattr;
|
||||
|
||||
namelen = strlen(req_xattr_name);
|
||||
list_for_each_entry_rcu(xattr, &evm_config_xattrnames, list) {
|
||||
list_for_each_entry_lockless(xattr, &evm_config_xattrnames, list) {
|
||||
if ((strlen(xattr->name) == namelen)
|
||||
&& (strncmp(req_xattr_name, xattr->name, namelen) == 0)) {
|
||||
found = 1;
|
||||
|
||||
@@ -237,7 +237,14 @@ static ssize_t evm_write_xattrs(struct file *file, const char __user *buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Guard against races in evm_read_xattrs */
|
||||
/*
|
||||
* xattr_list_mutex guards against races in evm_read_xattrs().
|
||||
* Entries are only added to the evm_config_xattrnames list
|
||||
* and never deleted. Therefore, the list is traversed
|
||||
* using list_for_each_entry_lockless() without holding
|
||||
* the mutex in evm_calc_hmac_or_hash(), evm_find_protected_xattrs()
|
||||
* and evm_protected_xattr().
|
||||
*/
|
||||
mutex_lock(&xattr_list_mutex);
|
||||
list_for_each_entry(tmp, &evm_config_xattrnames, list) {
|
||||
if (strcmp(xattr->name, tmp->name) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user