Merge 4.14.96 into android-4.14-p
Changes in 4.14.96
ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped address
mlxsw: spectrum: Disable lag port TX before removing it
mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion
net, skbuff: do not prefer skb allocation fails early
qmi_wwan: add MTU default to qmap network interface
r8169: Add support for new Realtek Ethernet
ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses
net: dsa: mv88x6xxx: mv88e6390 errata
gpio: pl061: Move irq_chip definition inside struct pl061
platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey
e1000e: allow non-monotonic SYSTIM readings
writeback: don't decrement wb->refcnt if !wb->bdi
serial: set suppress_bind_attrs flag only if builtin
ALSA: oxfw: add support for APOGEE duet FireWire
x86/mce: Fix -Wmissing-prototypes warnings
MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur
arm64: perf: set suppress_bind_attrs flag to true
usb: gadget: udc: renesas_usb3: add a safety connection way for forced_b_device
selinux: always allow mounting submounts
rxe: IB_WR_REG_MR does not capture MR's iova field
jffs2: Fix use of uninitialized delayed_work, lockdep breakage
clk: imx: make mux parent strings const
pstore/ram: Do not treat empty buffers as valid
powerpc/xmon: Fix invocation inside lock region
powerpc/pseries/cpuidle: Fix preempt warning
media: firewire: Fix app_info parameter type in avc_ca{,_app}_info
media: venus: core: Set dma maximum segment size
net: call sk_dst_reset when set SO_DONTROUTE
scsi: target: use consistent left-aligned ASCII INQUIRY data
selftests: do not macro-expand failed assertion expressions
clk: imx6q: reset exclusive gates on init
arm64: Fix minor issues with the dcache_by_line_op macro
kconfig: fix file name and line number of warn_ignored_character()
kconfig: fix memory leak when EOF is encountered in quotation
mmc: atmel-mci: do not assume idle after atmci_request_end
btrfs: improve error handling of btrfs_add_link
tty/serial: do not free trasnmit buffer page under port lock
perf intel-pt: Fix error with config term "pt=0"
perf svghelper: Fix unchecked usage of strncpy()
perf parse-events: Fix unchecked usage of strncpy()
netfilter: ipt_CLUSTERIP: check MAC address when duplicate config is set
dm crypt: use u64 instead of sector_t to store iv_offset
dm kcopyd: Fix bug causing workqueue stalls
tools lib subcmd: Don't add the kernel sources to the include path
dm snapshot: Fix excessive memory usage and workqueue stalls
quota: Lock s_umount in exclusive mode for Q_XQUOTA{ON,OFF} quotactls.
clocksource/drivers/integrator-ap: Add missing of_node_put()
ALSA: bebob: fix model-id of unit for Apogee Ensemble
sysfs: Disable lockdep for driver bind/unbind files
IB/usnic: Fix potential deadlock
scsi: smartpqi: correct lun reset issues
scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown()
scsi: megaraid: fix out-of-bound array accesses
ocfs2: fix panic due to unrecovered local alloc
mm/page-writeback.c: don't break integrity writeback on ->writepage() error
mm/swap: use nr_node_ids for avail_lists in swap_info_struct
mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps
nfs: fix a deadlock in nfs client initialization
ipmi:pci: Blacklist a Realtek "IPMI" device
cifs: allow disabling insecure dialects in the config
drm/i915/gvt: Fix mmap range check
PCI: dwc: Move interrupt acking into the proper callback
ipmi:ssif: Fix handling of multi-part return messages
Linux 4.14.96
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -497,7 +497,9 @@ manner. The codes are the following:
|
||||
|
||||
Note that there is no guarantee that every flag and associated mnemonic will
|
||||
be present in all further kernel releases. Things get changed, the flags may
|
||||
be vanished or the reverse -- new added.
|
||||
be vanished or the reverse -- new added. Interpretation of their meaning
|
||||
might change in future as well. So each consumer of these flags has to
|
||||
follow each specific kernel version for the exact semantic.
|
||||
|
||||
The "Name" field will only be present on a mapping that has been named by
|
||||
userspace, and will show the name passed in by userspace.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 14
|
||||
SUBLEVEL = 95
|
||||
SUBLEVEL = 96
|
||||
EXTRAVERSION =
|
||||
NAME = Petit Gorille
|
||||
|
||||
|
||||
@@ -373,27 +373,33 @@ alternative_endif
|
||||
* size: size of the region
|
||||
* Corrupts: kaddr, size, tmp1, tmp2
|
||||
*/
|
||||
.macro __dcache_op_workaround_clean_cache, op, kaddr
|
||||
alternative_if_not ARM64_WORKAROUND_CLEAN_CACHE
|
||||
dc \op, \kaddr
|
||||
alternative_else
|
||||
dc civac, \kaddr
|
||||
alternative_endif
|
||||
.endm
|
||||
|
||||
.macro dcache_by_line_op op, domain, kaddr, size, tmp1, tmp2
|
||||
dcache_line_size \tmp1, \tmp2
|
||||
add \size, \kaddr, \size
|
||||
sub \tmp2, \tmp1, #1
|
||||
bic \kaddr, \kaddr, \tmp2
|
||||
9998:
|
||||
.if (\op == cvau || \op == cvac)
|
||||
alternative_if_not ARM64_WORKAROUND_CLEAN_CACHE
|
||||
dc \op, \kaddr
|
||||
alternative_else
|
||||
dc civac, \kaddr
|
||||
alternative_endif
|
||||
.elseif (\op == cvap)
|
||||
alternative_if ARM64_HAS_DCPOP
|
||||
sys 3, c7, c12, 1, \kaddr // dc cvap
|
||||
alternative_else
|
||||
dc cvac, \kaddr
|
||||
alternative_endif
|
||||
.ifc \op, cvau
|
||||
__dcache_op_workaround_clean_cache \op, \kaddr
|
||||
.else
|
||||
.ifc \op, cvac
|
||||
__dcache_op_workaround_clean_cache \op, \kaddr
|
||||
.else
|
||||
.ifc \op, cvap
|
||||
sys 3, c7, c12, 1, \kaddr // dc cvap
|
||||
.else
|
||||
dc \op, \kaddr
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
add \kaddr, \kaddr, \tmp1
|
||||
cmp \kaddr, \size
|
||||
b.lo 9998b
|
||||
|
||||
@@ -1130,6 +1130,7 @@ static struct platform_driver armv8_pmu_driver = {
|
||||
.driver = {
|
||||
.name = ARMV8_PMU_PDEV_NAME,
|
||||
.of_match_table = armv8_pmu_of_device_ids,
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = armv8_pmu_device_probe,
|
||||
};
|
||||
|
||||
@@ -181,6 +181,9 @@ ENDPROC(__dma_clean_area)
|
||||
* - size - size in question
|
||||
*/
|
||||
ENTRY(__clean_dcache_area_pop)
|
||||
alternative_if_not ARM64_HAS_DCPOP
|
||||
b __clean_dcache_area_poc
|
||||
alternative_else_nop_endif
|
||||
dcache_by_line_op cvap, sy, x0, x1, x2, x3
|
||||
ret
|
||||
ENDPIPROC(__clean_dcache_area_pop)
|
||||
|
||||
@@ -800,6 +800,7 @@ config SIBYTE_SWARM
|
||||
select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select ZONE_DMA32 if 64BIT
|
||||
select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
|
||||
|
||||
config SIBYTE_LITTLESUR
|
||||
bool "Sibyte BCM91250C2-LittleSur"
|
||||
@@ -822,6 +823,7 @@ config SIBYTE_SENTOSA
|
||||
select SYS_HAS_CPU_SB1
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
|
||||
|
||||
config SIBYTE_BIGSUR
|
||||
bool "Sibyte BCM91480B-BigSur"
|
||||
@@ -835,6 +837,7 @@ config SIBYTE_BIGSUR
|
||||
select SYS_SUPPORTS_HIGHMEM
|
||||
select SYS_SUPPORTS_LITTLE_ENDIAN
|
||||
select ZONE_DMA32 if 64BIT
|
||||
select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
|
||||
|
||||
config SNI_RM
|
||||
bool "SNI RM200/300/400"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
obj-y := cfe.o
|
||||
obj-$(CONFIG_SWIOTLB) += dma.o
|
||||
obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o
|
||||
obj-$(CONFIG_SIBYTE_CFE_CONSOLE) += cfe_console.o
|
||||
obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o
|
||||
|
||||
14
arch/mips/sibyte/common/dma.c
Normal file
14
arch/mips/sibyte/common/dma.c
Normal file
@@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* DMA support for Broadcom SiByte platforms.
|
||||
*
|
||||
* Copyright (c) 2018 Maciej W. Rozycki
|
||||
*/
|
||||
|
||||
#include <linux/swiotlb.h>
|
||||
#include <asm/bootinfo.h>
|
||||
|
||||
void __init plat_swiotlb_setup(void)
|
||||
{
|
||||
swiotlb_init(1);
|
||||
}
|
||||
@@ -78,6 +78,9 @@ static int xmon_gate;
|
||||
#define xmon_owner 0
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
static int set_indicator_token = RTAS_UNKNOWN_SERVICE;
|
||||
#endif
|
||||
static unsigned long in_xmon __read_mostly = 0;
|
||||
static int xmon_on = IS_ENABLED(CONFIG_XMON_DEFAULT);
|
||||
|
||||
@@ -357,7 +360,6 @@ static inline void disable_surveillance(void)
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
/* Since this can't be a module, args should end up below 4GB. */
|
||||
static struct rtas_args args;
|
||||
int token;
|
||||
|
||||
/*
|
||||
* At this point we have got all the cpus we can into
|
||||
@@ -366,11 +368,11 @@ static inline void disable_surveillance(void)
|
||||
* If we did try to take rtas.lock there would be a
|
||||
* real possibility of deadlock.
|
||||
*/
|
||||
token = rtas_token("set-indicator");
|
||||
if (token == RTAS_UNKNOWN_SERVICE)
|
||||
if (set_indicator_token == RTAS_UNKNOWN_SERVICE)
|
||||
return;
|
||||
|
||||
rtas_call_unlocked(&args, token, 3, 1, NULL, SURVEILLANCE_TOKEN, 0, 0);
|
||||
rtas_call_unlocked(&args, set_indicator_token, 3, 1, NULL,
|
||||
SURVEILLANCE_TOKEN, 0, 0);
|
||||
|
||||
#endif /* CONFIG_PPC_PSERIES */
|
||||
}
|
||||
@@ -3472,6 +3474,14 @@ static void xmon_init(int enable)
|
||||
__debugger_iabr_match = xmon_iabr_match;
|
||||
__debugger_break_match = xmon_break_match;
|
||||
__debugger_fault_handler = xmon_fault_handler;
|
||||
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
/*
|
||||
* Get the token here to avoid trying to get a lock
|
||||
* during the crash, causing a deadlock.
|
||||
*/
|
||||
set_indicator_token = rtas_token("set-indicator");
|
||||
#endif
|
||||
} else {
|
||||
__debugger = NULL;
|
||||
__debugger_ipi = NULL;
|
||||
|
||||
@@ -104,9 +104,9 @@ extern int panic_on_unrecovered_nmi;
|
||||
|
||||
void math_emulate(struct math_emu_info *);
|
||||
#ifndef CONFIG_X86_32
|
||||
asmlinkage void smp_thermal_interrupt(void);
|
||||
asmlinkage void smp_threshold_interrupt(void);
|
||||
asmlinkage void smp_deferred_error_interrupt(void);
|
||||
asmlinkage void smp_thermal_interrupt(struct pt_regs *regs);
|
||||
asmlinkage void smp_threshold_interrupt(struct pt_regs *regs);
|
||||
asmlinkage void smp_deferred_error_interrupt(struct pt_regs *regs);
|
||||
#endif
|
||||
|
||||
extern void ist_enter(struct pt_regs *regs);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/string.h>
|
||||
|
||||
#include <asm/amd_nb.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/msr.h>
|
||||
@@ -99,7 +100,7 @@ static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init =
|
||||
[0 ... MAX_NR_BANKS - 1] = { [0 ... NR_BLOCKS - 1] = -1 }
|
||||
};
|
||||
|
||||
const char *smca_get_name(enum smca_bank_types t)
|
||||
static const char *smca_get_name(enum smca_bank_types t)
|
||||
{
|
||||
if (t >= N_SMCA_BANK_TYPES)
|
||||
return NULL;
|
||||
@@ -823,7 +824,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
|
||||
mce_log(&m);
|
||||
}
|
||||
|
||||
asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void)
|
||||
asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(struct pt_regs *regs)
|
||||
{
|
||||
entering_irq();
|
||||
trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/cpu.h>
|
||||
|
||||
#include <asm/processor.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/msr.h>
|
||||
@@ -390,7 +391,7 @@ static void unexpected_thermal_interrupt(void)
|
||||
|
||||
static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt;
|
||||
|
||||
asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
|
||||
asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *regs)
|
||||
{
|
||||
entering_irq();
|
||||
trace_thermal_apic_entry(THERMAL_APIC_VECTOR);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <linux/kernel.h>
|
||||
|
||||
#include <asm/irq_vectors.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/mce.h>
|
||||
#include <asm/trace/irq_vectors.h>
|
||||
@@ -18,7 +19,7 @@ static void default_threshold_interrupt(void)
|
||||
|
||||
void (*mce_threshold_vector)(void) = default_threshold_interrupt;
|
||||
|
||||
asmlinkage __visible void __irq_entry smp_threshold_interrupt(void)
|
||||
asmlinkage __visible void __irq_entry smp_threshold_interrupt(struct pt_regs *regs)
|
||||
{
|
||||
entering_irq();
|
||||
trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
|
||||
|
||||
@@ -33,6 +33,9 @@ static struct kset *system_kset;
|
||||
|
||||
#define to_drv_attr(_attr) container_of(_attr, struct driver_attribute, attr)
|
||||
|
||||
#define DRIVER_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
|
||||
struct driver_attribute driver_attr_##_name = \
|
||||
__ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
|
||||
|
||||
static int __must_check bus_rescan_devices_helper(struct device *dev,
|
||||
void *data);
|
||||
@@ -197,7 +200,7 @@ static ssize_t unbind_store(struct device_driver *drv, const char *buf,
|
||||
bus_put(bus);
|
||||
return err;
|
||||
}
|
||||
static DRIVER_ATTR_WO(unbind);
|
||||
static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, S_IWUSR, NULL, unbind_store);
|
||||
|
||||
/*
|
||||
* Manually attach a device to a driver.
|
||||
@@ -233,7 +236,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
|
||||
bus_put(bus);
|
||||
return err;
|
||||
}
|
||||
static DRIVER_ATTR_WO(bind);
|
||||
static DRIVER_ATTR_IGNORE_LOCKDEP(bind, S_IWUSR, NULL, bind_store);
|
||||
|
||||
static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf)
|
||||
{
|
||||
|
||||
@@ -2447,6 +2447,15 @@ static int ipmi_pci_probe_regspacing(struct smi_info *info)
|
||||
return DEFAULT_REGSPACING;
|
||||
}
|
||||
|
||||
static struct pci_device_id ipmi_pci_blacklist[] = {
|
||||
/*
|
||||
* This is a "Virtual IPMI device", whatever that is. It appears
|
||||
* as a KCS device by the class, but it is not one.
|
||||
*/
|
||||
{ PCI_VDEVICE(REALTEK, 0x816c) },
|
||||
{ 0, }
|
||||
};
|
||||
|
||||
static int ipmi_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
@@ -2454,6 +2463,9 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
|
||||
int class_type = pdev->class & PCI_ERMC_CLASSCODE_TYPE_MASK;
|
||||
struct smi_info *info;
|
||||
|
||||
if (pci_match_id(ipmi_pci_blacklist, pdev))
|
||||
return -ENODEV;
|
||||
|
||||
info = smi_info_alloc();
|
||||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -645,8 +645,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
|
||||
/* Remove the multi-part read marker. */
|
||||
len -= 2;
|
||||
data += 2;
|
||||
for (i = 0; i < len; i++)
|
||||
ssif_info->data[i] = data[i+2];
|
||||
ssif_info->data[i] = data[i];
|
||||
ssif_info->multi_len = len;
|
||||
ssif_info->multi_pos = 1;
|
||||
|
||||
@@ -674,8 +675,19 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
}
|
||||
|
||||
blocknum = data[0];
|
||||
len--;
|
||||
data++;
|
||||
|
||||
if (ssif_info->multi_len + len - 1 > IPMI_MAX_MSG_LENGTH) {
|
||||
if (blocknum != 0xff && len != 31) {
|
||||
/* All blocks but the last must have 31 data bytes. */
|
||||
result = -EIO;
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
pr_info("Received middle message <31\n");
|
||||
|
||||
goto continue_op;
|
||||
}
|
||||
|
||||
if (ssif_info->multi_len + len > IPMI_MAX_MSG_LENGTH) {
|
||||
/* Received message too big, abort the operation. */
|
||||
result = -E2BIG;
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_MSG)
|
||||
@@ -684,16 +696,14 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
goto continue_op;
|
||||
}
|
||||
|
||||
/* Remove the blocknum from the data. */
|
||||
len--;
|
||||
for (i = 0; i < len; i++)
|
||||
ssif_info->data[i + ssif_info->multi_len] = data[i + 1];
|
||||
ssif_info->data[i + ssif_info->multi_len] = data[i];
|
||||
ssif_info->multi_len += len;
|
||||
if (blocknum == 0xff) {
|
||||
/* End of read */
|
||||
len = ssif_info->multi_len;
|
||||
data = ssif_info->data;
|
||||
} else if (blocknum + 1 != ssif_info->multi_pos) {
|
||||
} else if (blocknum != ssif_info->multi_pos) {
|
||||
/*
|
||||
* Out of sequence block, just abort. Block
|
||||
* numbers start at zero for the second block,
|
||||
@@ -721,6 +731,7 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
}
|
||||
}
|
||||
|
||||
continue_op:
|
||||
if (result < 0) {
|
||||
ssif_inc_stat(ssif_info, receive_errors);
|
||||
} else {
|
||||
@@ -728,8 +739,6 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,
|
||||
ssif_inc_stat(ssif_info, received_message_parts);
|
||||
}
|
||||
|
||||
|
||||
continue_op:
|
||||
if (ssif_info->ssif_debug & SSIF_DEBUG_STATE)
|
||||
pr_info(PFX "DONE 1: state = %d, result=%d.\n",
|
||||
ssif_info->ssif_state, result);
|
||||
|
||||
@@ -154,7 +154,7 @@ static struct clk_ops clk_busy_mux_ops = {
|
||||
|
||||
struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift,
|
||||
u8 width, void __iomem *busy_reg, u8 busy_shift,
|
||||
const char **parent_names, int num_parents)
|
||||
const char * const *parent_names, int num_parents)
|
||||
{
|
||||
struct clk_busy_mux *busy;
|
||||
struct clk *clk;
|
||||
|
||||
@@ -70,7 +70,7 @@ static const struct clk_ops clk_fixup_mux_ops = {
|
||||
};
|
||||
|
||||
struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg,
|
||||
u8 shift, u8 width, const char **parents,
|
||||
u8 shift, u8 width, const char * const *parents,
|
||||
int num_parents, void (*fixup)(u32 *val))
|
||||
{
|
||||
struct clk_fixup_mux *fixup_mux;
|
||||
|
||||
@@ -515,8 +515,12 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
|
||||
* lvds1_gate and lvds2_gate are pseudo-gates. Both can be
|
||||
* independently configured as clock inputs or outputs. We treat
|
||||
* the "output_enable" bit as a gate, even though it's really just
|
||||
* enabling clock output.
|
||||
* enabling clock output. Initially the gate bits are cleared, as
|
||||
* otherwise the exclusive configuration gets locked in the setup done
|
||||
* by software running before the clock driver, with no way to change
|
||||
* it.
|
||||
*/
|
||||
writel(readl(base + 0x160) & ~0x3c00, base + 0x160);
|
||||
clk[IMX6QDL_CLK_LVDS1_GATE] = imx_clk_gate_exclusive("lvds1_gate", "lvds1_sel", base + 0x160, 10, BIT(12));
|
||||
clk[IMX6QDL_CLK_LVDS2_GATE] = imx_clk_gate_exclusive("lvds2_gate", "lvds2_sel", base + 0x160, 11, BIT(13));
|
||||
|
||||
|
||||
@@ -63,14 +63,14 @@ struct clk *imx_clk_busy_divider(const char *name, const char *parent_name,
|
||||
|
||||
struct clk *imx_clk_busy_mux(const char *name, void __iomem *reg, u8 shift,
|
||||
u8 width, void __iomem *busy_reg, u8 busy_shift,
|
||||
const char **parent_names, int num_parents);
|
||||
const char * const *parent_names, int num_parents);
|
||||
|
||||
struct clk *imx_clk_fixup_divider(const char *name, const char *parent,
|
||||
void __iomem *reg, u8 shift, u8 width,
|
||||
void (*fixup)(u32 *val));
|
||||
|
||||
struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg,
|
||||
u8 shift, u8 width, const char **parents,
|
||||
u8 shift, u8 width, const char * const *parents,
|
||||
int num_parents, void (*fixup)(u32 *val));
|
||||
|
||||
static inline struct clk *imx_clk_fixed(const char *name, int rate)
|
||||
@@ -79,7 +79,8 @@ static inline struct clk *imx_clk_fixed(const char *name, int rate)
|
||||
}
|
||||
|
||||
static inline struct clk *imx_clk_mux_ldb(const char *name, void __iomem *reg,
|
||||
u8 shift, u8 width, const char **parents, int num_parents)
|
||||
u8 shift, u8 width, const char * const *parents,
|
||||
int num_parents)
|
||||
{
|
||||
return clk_register_mux(NULL, name, parents, num_parents,
|
||||
CLK_SET_RATE_NO_REPARENT | CLK_SET_RATE_PARENT, reg,
|
||||
@@ -178,7 +179,8 @@ static inline struct clk *imx_clk_gate4(const char *name, const char *parent,
|
||||
}
|
||||
|
||||
static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
|
||||
u8 shift, u8 width, const char **parents, int num_parents)
|
||||
u8 shift, u8 width, const char * const *parents,
|
||||
int num_parents)
|
||||
{
|
||||
return clk_register_mux(NULL, name, parents, num_parents,
|
||||
CLK_SET_RATE_NO_REPARENT, reg, shift,
|
||||
@@ -186,7 +188,8 @@ static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
|
||||
}
|
||||
|
||||
static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,
|
||||
u8 shift, u8 width, const char **parents, int num_parents)
|
||||
u8 shift, u8 width, const char * const *parents,
|
||||
int num_parents)
|
||||
{
|
||||
return clk_register_mux(NULL, name, parents, num_parents,
|
||||
CLK_SET_RATE_NO_REPARENT | CLK_OPS_PARENT_ENABLE,
|
||||
@@ -194,8 +197,9 @@ static inline struct clk *imx_clk_mux2(const char *name, void __iomem *reg,
|
||||
}
|
||||
|
||||
static inline struct clk *imx_clk_mux_flags(const char *name,
|
||||
void __iomem *reg, u8 shift, u8 width, const char **parents,
|
||||
int num_parents, unsigned long flags)
|
||||
void __iomem *reg, u8 shift, u8 width,
|
||||
const char * const *parents, int num_parents,
|
||||
unsigned long flags)
|
||||
{
|
||||
return clk_register_mux(NULL, name, parents, num_parents,
|
||||
flags | CLK_SET_RATE_NO_REPARENT, reg, shift, width, 0,
|
||||
|
||||
@@ -181,8 +181,7 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
|
||||
int irq;
|
||||
struct clk *clk;
|
||||
unsigned long rate;
|
||||
struct device_node *pri_node;
|
||||
struct device_node *sec_node;
|
||||
struct device_node *alias_node;
|
||||
|
||||
base = of_io_request_and_map(node, 0, "integrator-timer");
|
||||
if (IS_ERR(base))
|
||||
@@ -204,7 +203,18 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
|
||||
return err;
|
||||
}
|
||||
|
||||
pri_node = of_find_node_by_path(path);
|
||||
alias_node = of_find_node_by_path(path);
|
||||
|
||||
/*
|
||||
* The pointer is used as an identifier not as a pointer, we
|
||||
* can drop the refcount on the of__node immediately after
|
||||
* getting it.
|
||||
*/
|
||||
of_node_put(alias_node);
|
||||
|
||||
if (node == alias_node)
|
||||
/* The primary timer lacks IRQ, use as clocksource */
|
||||
return integrator_clocksource_init(rate, base);
|
||||
|
||||
err = of_property_read_string(of_aliases,
|
||||
"arm,timer-secondary", &path);
|
||||
@@ -213,14 +223,11 @@ static int __init integrator_ap_timer_init_of(struct device_node *node)
|
||||
return err;
|
||||
}
|
||||
|
||||
alias_node = of_find_node_by_path(path);
|
||||
|
||||
sec_node = of_find_node_by_path(path);
|
||||
of_node_put(alias_node);
|
||||
|
||||
if (node == pri_node)
|
||||
/* The primary timer lacks IRQ, use as clocksource */
|
||||
return integrator_clocksource_init(rate, base);
|
||||
|
||||
if (node == sec_node) {
|
||||
if (node == alias_node) {
|
||||
/* The secondary timer will drive the clock event */
|
||||
irq = irq_of_parse_and_map(node, 0);
|
||||
return integrator_clockevent_init(rate, base, irq);
|
||||
|
||||
@@ -239,7 +239,13 @@ static int pseries_idle_probe(void)
|
||||
return -ENODEV;
|
||||
|
||||
if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
|
||||
if (lppaca_shared_proc(get_lppaca())) {
|
||||
/*
|
||||
* Use local_paca instead of get_lppaca() since
|
||||
* preemption is not disabled, and it is not required in
|
||||
* fact, since lppaca_ptr does not need to be the value
|
||||
* associated to the current CPU, it can be from any CPU.
|
||||
*/
|
||||
if (lppaca_shared_proc(local_paca->lppaca_ptr)) {
|
||||
cpuidle_state_table = shared_states;
|
||||
max_idle_state = ARRAY_SIZE(shared_states);
|
||||
} else {
|
||||
|
||||
@@ -54,6 +54,7 @@ struct pl061 {
|
||||
|
||||
void __iomem *base;
|
||||
struct gpio_chip gc;
|
||||
struct irq_chip irq_chip;
|
||||
int parent_irq;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -281,15 +282,6 @@ static int pl061_irq_set_wake(struct irq_data *d, unsigned int state)
|
||||
return irq_set_irq_wake(pl061->parent_irq, state);
|
||||
}
|
||||
|
||||
static struct irq_chip pl061_irqchip = {
|
||||
.name = "pl061",
|
||||
.irq_ack = pl061_irq_ack,
|
||||
.irq_mask = pl061_irq_mask,
|
||||
.irq_unmask = pl061_irq_unmask,
|
||||
.irq_set_type = pl061_irq_type,
|
||||
.irq_set_wake = pl061_irq_set_wake,
|
||||
};
|
||||
|
||||
static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
{
|
||||
struct device *dev = &adev->dev;
|
||||
@@ -328,6 +320,13 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
/*
|
||||
* irq_chip support
|
||||
*/
|
||||
pl061->irq_chip.name = dev_name(dev);
|
||||
pl061->irq_chip.irq_ack = pl061_irq_ack;
|
||||
pl061->irq_chip.irq_mask = pl061_irq_mask;
|
||||
pl061->irq_chip.irq_unmask = pl061_irq_unmask;
|
||||
pl061->irq_chip.irq_set_type = pl061_irq_type;
|
||||
pl061->irq_chip.irq_set_wake = pl061_irq_set_wake;
|
||||
|
||||
writeb(0, pl061->base + GPIOIE); /* disable irqs */
|
||||
irq = adev->irq[0];
|
||||
if (irq < 0) {
|
||||
@@ -336,14 +335,14 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
}
|
||||
pl061->parent_irq = irq;
|
||||
|
||||
ret = gpiochip_irqchip_add(&pl061->gc, &pl061_irqchip,
|
||||
ret = gpiochip_irqchip_add(&pl061->gc, &pl061->irq_chip,
|
||||
0, handle_bad_irq,
|
||||
IRQ_TYPE_NONE);
|
||||
if (ret) {
|
||||
dev_info(&adev->dev, "could not add irqchip\n");
|
||||
return ret;
|
||||
}
|
||||
gpiochip_set_chained_irqchip(&pl061->gc, &pl061_irqchip,
|
||||
gpiochip_set_chained_irqchip(&pl061->gc, &pl061->irq_chip,
|
||||
irq, pl061_irq_handler);
|
||||
|
||||
amba_set_drvdata(adev, pl061);
|
||||
|
||||
@@ -807,11 +807,18 @@ write_err:
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
static inline bool intel_vgpu_in_aperture(struct intel_vgpu *vgpu,
|
||||
unsigned long off)
|
||||
{
|
||||
return off >= vgpu_aperture_offset(vgpu) &&
|
||||
off < vgpu_aperture_offset(vgpu) + vgpu_aperture_sz(vgpu);
|
||||
}
|
||||
|
||||
static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma)
|
||||
{
|
||||
unsigned int index;
|
||||
u64 virtaddr;
|
||||
unsigned long req_size, pgoff = 0;
|
||||
unsigned long req_size, pgoff, req_start;
|
||||
pgprot_t pg_prot;
|
||||
struct intel_vgpu *vgpu = mdev_get_drvdata(mdev);
|
||||
|
||||
@@ -829,7 +836,17 @@ static int intel_vgpu_mmap(struct mdev_device *mdev, struct vm_area_struct *vma)
|
||||
pg_prot = vma->vm_page_prot;
|
||||
virtaddr = vma->vm_start;
|
||||
req_size = vma->vm_end - vma->vm_start;
|
||||
pgoff = vgpu_aperture_pa_base(vgpu) >> PAGE_SHIFT;
|
||||
pgoff = vma->vm_pgoff &
|
||||
((1U << (VFIO_PCI_OFFSET_SHIFT - PAGE_SHIFT)) - 1);
|
||||
req_start = pgoff << PAGE_SHIFT;
|
||||
|
||||
if (!intel_vgpu_in_aperture(vgpu, req_start))
|
||||
return -EINVAL;
|
||||
if (req_start + req_size >
|
||||
vgpu_aperture_offset(vgpu) + vgpu_aperture_sz(vgpu))
|
||||
return -EINVAL;
|
||||
|
||||
pgoff = (gvt_aperture_pa_base(vgpu->gvt) >> PAGE_SHIFT) + pgoff;
|
||||
|
||||
return remap_pfn_range(vma, virtaddr, pgoff, req_size, pg_prot);
|
||||
}
|
||||
|
||||
@@ -310,13 +310,16 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
|
||||
|
||||
usnic_dbg("\n");
|
||||
|
||||
mutex_lock(&us_ibdev->usdev_lock);
|
||||
if (ib_get_eth_speed(ibdev, port, &props->active_speed,
|
||||
&props->active_width)) {
|
||||
mutex_unlock(&us_ibdev->usdev_lock);
|
||||
&props->active_width))
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* usdev_lock is acquired after (and not before) ib_get_eth_speed call
|
||||
* because acquiring rtnl_lock in ib_get_eth_speed, while holding
|
||||
* usdev_lock could lead to a deadlock.
|
||||
*/
|
||||
mutex_lock(&us_ibdev->usdev_lock);
|
||||
/* props being zeroed by the caller, avoid zeroing it here */
|
||||
|
||||
props->lid = 0;
|
||||
|
||||
@@ -640,6 +640,7 @@ next_wqe:
|
||||
rmr->access = wqe->wr.wr.reg.access;
|
||||
rmr->lkey = wqe->wr.wr.reg.key;
|
||||
rmr->rkey = wqe->wr.wr.reg.key;
|
||||
rmr->iova = wqe->wr.wr.reg.mr->iova;
|
||||
wqe->state = wqe_state_done;
|
||||
wqe->status = IB_WC_SUCCESS;
|
||||
} else {
|
||||
|
||||
@@ -49,7 +49,7 @@ struct convert_context {
|
||||
struct bio *bio_out;
|
||||
struct bvec_iter iter_in;
|
||||
struct bvec_iter iter_out;
|
||||
sector_t cc_sector;
|
||||
u64 cc_sector;
|
||||
atomic_t cc_pending;
|
||||
union {
|
||||
struct skcipher_request *req;
|
||||
@@ -81,7 +81,7 @@ struct dm_crypt_request {
|
||||
struct convert_context *ctx;
|
||||
struct scatterlist sg_in[4];
|
||||
struct scatterlist sg_out[4];
|
||||
sector_t iv_sector;
|
||||
u64 iv_sector;
|
||||
};
|
||||
|
||||
struct crypt_config;
|
||||
@@ -172,7 +172,7 @@ struct crypt_config {
|
||||
struct iv_lmk_private lmk;
|
||||
struct iv_tcw_private tcw;
|
||||
} iv_gen_private;
|
||||
sector_t iv_offset;
|
||||
u64 iv_offset;
|
||||
unsigned int iv_size;
|
||||
unsigned short int sector_size;
|
||||
unsigned char sector_shift;
|
||||
|
||||
@@ -55,15 +55,17 @@ struct dm_kcopyd_client {
|
||||
struct dm_kcopyd_throttle *throttle;
|
||||
|
||||
/*
|
||||
* We maintain three lists of jobs:
|
||||
* We maintain four lists of jobs:
|
||||
*
|
||||
* i) jobs waiting for pages
|
||||
* ii) jobs that have pages, and are waiting for the io to be issued.
|
||||
* iii) jobs that have completed.
|
||||
* iii) jobs that don't need to do any IO and just run a callback
|
||||
* iv) jobs that have completed.
|
||||
*
|
||||
* All three of these are protected by job_lock.
|
||||
* All four of these are protected by job_lock.
|
||||
*/
|
||||
spinlock_t job_lock;
|
||||
struct list_head callback_jobs;
|
||||
struct list_head complete_jobs;
|
||||
struct list_head io_jobs;
|
||||
struct list_head pages_jobs;
|
||||
@@ -622,6 +624,7 @@ static void do_work(struct work_struct *work)
|
||||
struct dm_kcopyd_client *kc = container_of(work,
|
||||
struct dm_kcopyd_client, kcopyd_work);
|
||||
struct blk_plug plug;
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* The order that these are called is *very* important.
|
||||
@@ -630,6 +633,10 @@ static void do_work(struct work_struct *work)
|
||||
* list. io jobs call wake when they complete and it all
|
||||
* starts again.
|
||||
*/
|
||||
spin_lock_irqsave(&kc->job_lock, flags);
|
||||
list_splice_tail_init(&kc->callback_jobs, &kc->complete_jobs);
|
||||
spin_unlock_irqrestore(&kc->job_lock, flags);
|
||||
|
||||
blk_start_plug(&plug);
|
||||
process_jobs(&kc->complete_jobs, kc, run_complete_job);
|
||||
process_jobs(&kc->pages_jobs, kc, run_pages_job);
|
||||
@@ -647,7 +654,7 @@ static void dispatch_job(struct kcopyd_job *job)
|
||||
struct dm_kcopyd_client *kc = job->kc;
|
||||
atomic_inc(&kc->nr_jobs);
|
||||
if (unlikely(!job->source.count))
|
||||
push(&kc->complete_jobs, job);
|
||||
push(&kc->callback_jobs, job);
|
||||
else if (job->pages == &zero_page_list)
|
||||
push(&kc->io_jobs, job);
|
||||
else
|
||||
@@ -857,7 +864,7 @@ void dm_kcopyd_do_callback(void *j, int read_err, unsigned long write_err)
|
||||
job->read_err = read_err;
|
||||
job->write_err = write_err;
|
||||
|
||||
push(&kc->complete_jobs, job);
|
||||
push(&kc->callback_jobs, job);
|
||||
wake(kc);
|
||||
}
|
||||
EXPORT_SYMBOL(dm_kcopyd_do_callback);
|
||||
@@ -887,6 +894,7 @@ struct dm_kcopyd_client *dm_kcopyd_client_create(struct dm_kcopyd_throttle *thro
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
spin_lock_init(&kc->job_lock);
|
||||
INIT_LIST_HEAD(&kc->callback_jobs);
|
||||
INIT_LIST_HEAD(&kc->complete_jobs);
|
||||
INIT_LIST_HEAD(&kc->io_jobs);
|
||||
INIT_LIST_HEAD(&kc->pages_jobs);
|
||||
@@ -936,6 +944,7 @@ void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc)
|
||||
/* Wait for completion of all jobs submitted by this client. */
|
||||
wait_event(kc->destroyq, !atomic_read(&kc->nr_jobs));
|
||||
|
||||
BUG_ON(!list_empty(&kc->callback_jobs));
|
||||
BUG_ON(!list_empty(&kc->complete_jobs));
|
||||
BUG_ON(!list_empty(&kc->io_jobs));
|
||||
BUG_ON(!list_empty(&kc->pages_jobs));
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/dm-kcopyd.h>
|
||||
#include <linux/semaphore.h>
|
||||
|
||||
#include "dm.h"
|
||||
|
||||
@@ -105,6 +106,9 @@ struct dm_snapshot {
|
||||
/* The on disk metadata handler */
|
||||
struct dm_exception_store *store;
|
||||
|
||||
/* Maximum number of in-flight COW jobs. */
|
||||
struct semaphore cow_count;
|
||||
|
||||
struct dm_kcopyd_client *kcopyd_client;
|
||||
|
||||
/* Wait for events based on state_bits */
|
||||
@@ -145,6 +149,19 @@ struct dm_snapshot {
|
||||
#define RUNNING_MERGE 0
|
||||
#define SHUTDOWN_MERGE 1
|
||||
|
||||
/*
|
||||
* Maximum number of chunks being copied on write.
|
||||
*
|
||||
* The value was decided experimentally as a trade-off between memory
|
||||
* consumption, stalling the kernel's workqueues and maintaining a high enough
|
||||
* throughput.
|
||||
*/
|
||||
#define DEFAULT_COW_THRESHOLD 2048
|
||||
|
||||
static int cow_threshold = DEFAULT_COW_THRESHOLD;
|
||||
module_param_named(snapshot_cow_threshold, cow_threshold, int, 0644);
|
||||
MODULE_PARM_DESC(snapshot_cow_threshold, "Maximum number of chunks being copied on write");
|
||||
|
||||
DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(snapshot_copy_throttle,
|
||||
"A percentage of time allocated for copy on write");
|
||||
|
||||
@@ -1189,6 +1206,8 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||
goto bad_hash_tables;
|
||||
}
|
||||
|
||||
sema_init(&s->cow_count, (cow_threshold > 0) ? cow_threshold : INT_MAX);
|
||||
|
||||
s->kcopyd_client = dm_kcopyd_client_create(&dm_kcopyd_throttle);
|
||||
if (IS_ERR(s->kcopyd_client)) {
|
||||
r = PTR_ERR(s->kcopyd_client);
|
||||
@@ -1560,6 +1579,7 @@ static void copy_callback(int read_err, unsigned long write_err, void *context)
|
||||
}
|
||||
list_add(&pe->out_of_order_entry, lh);
|
||||
}
|
||||
up(&s->cow_count);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1583,6 +1603,7 @@ static void start_copy(struct dm_snap_pending_exception *pe)
|
||||
dest.count = src.count;
|
||||
|
||||
/* Hand over to kcopyd */
|
||||
down(&s->cow_count);
|
||||
dm_kcopyd_copy(s->kcopyd_client, &src, 1, &dest, 0, copy_callback, pe);
|
||||
}
|
||||
|
||||
@@ -1602,6 +1623,7 @@ static void start_full_bio(struct dm_snap_pending_exception *pe,
|
||||
pe->full_bio = bio;
|
||||
pe->full_bio_end_io = bio->bi_end_io;
|
||||
|
||||
down(&s->cow_count);
|
||||
callback_data = dm_kcopyd_prepare_callback(s->kcopyd_client,
|
||||
copy_callback, pe);
|
||||
|
||||
|
||||
@@ -968,7 +968,8 @@ static int get_ca_object_length(struct avc_response_frame *r)
|
||||
return r->operand[7];
|
||||
}
|
||||
|
||||
int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
|
||||
int avc_ca_app_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||
unsigned int *len)
|
||||
{
|
||||
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
||||
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
||||
@@ -1009,7 +1010,8 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len)
|
||||
int avc_ca_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||
unsigned int *len)
|
||||
{
|
||||
struct avc_command_frame *c = (void *)fdtv->avc_data;
|
||||
struct avc_response_frame *r = (void *)fdtv->avc_data;
|
||||
|
||||
@@ -124,8 +124,10 @@ int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
|
||||
struct dvb_diseqc_master_cmd *diseqcmd);
|
||||
void avc_remote_ctrl_work(struct work_struct *work);
|
||||
int avc_register_remote_control(struct firedtv *fdtv);
|
||||
int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
|
||||
int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
|
||||
int avc_ca_app_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||
unsigned int *len);
|
||||
int avc_ca_info(struct firedtv *fdtv, unsigned char *app_info,
|
||||
unsigned int *len);
|
||||
int avc_ca_reset(struct firedtv *fdtv);
|
||||
int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length);
|
||||
int avc_ca_get_time_date(struct firedtv *fdtv, int *interval);
|
||||
|
||||
@@ -187,6 +187,14 @@ static int venus_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!dev->dma_parms) {
|
||||
dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
|
||||
GFP_KERNEL);
|
||||
if (!dev->dma_parms)
|
||||
return -ENOMEM;
|
||||
}
|
||||
dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
|
||||
|
||||
INIT_LIST_HEAD(&core->instances);
|
||||
mutex_init(&core->lock);
|
||||
INIT_DELAYED_WORK(&core->work, venus_sys_error_handler);
|
||||
|
||||
@@ -1954,13 +1954,14 @@ static void atmci_tasklet_func(unsigned long priv)
|
||||
}
|
||||
|
||||
atmci_request_end(host, host->mrq);
|
||||
state = STATE_IDLE;
|
||||
goto unlock; /* atmci_request_end() sets host->state */
|
||||
break;
|
||||
}
|
||||
} while (state != prev_state);
|
||||
|
||||
host->state = state;
|
||||
|
||||
unlock:
|
||||
spin_unlock(&host->lock);
|
||||
}
|
||||
|
||||
|
||||
@@ -1979,6 +1979,107 @@ static int mv88e6xxx_g1_setup(struct mv88e6xxx_chip *chip)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The mv88e6390 has some hidden registers used for debug and
|
||||
* development. The errata also makes use of them.
|
||||
*/
|
||||
static int mv88e6390_hidden_write(struct mv88e6xxx_chip *chip, int port,
|
||||
int reg, u16 val)
|
||||
{
|
||||
u16 ctrl;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_port_write(chip, PORT_RESERVED_1A_DATA_PORT,
|
||||
PORT_RESERVED_1A, val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
ctrl = PORT_RESERVED_1A_BUSY | PORT_RESERVED_1A_WRITE |
|
||||
PORT_RESERVED_1A_BLOCK | port << PORT_RESERVED_1A_PORT_SHIFT |
|
||||
reg;
|
||||
|
||||
return mv88e6xxx_port_write(chip, PORT_RESERVED_1A_CTRL_PORT,
|
||||
PORT_RESERVED_1A, ctrl);
|
||||
}
|
||||
|
||||
static int mv88e6390_hidden_wait(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
return mv88e6xxx_wait(chip, PORT_RESERVED_1A_CTRL_PORT,
|
||||
PORT_RESERVED_1A, PORT_RESERVED_1A_BUSY);
|
||||
}
|
||||
|
||||
|
||||
static int mv88e6390_hidden_read(struct mv88e6xxx_chip *chip, int port,
|
||||
int reg, u16 *val)
|
||||
{
|
||||
u16 ctrl;
|
||||
int err;
|
||||
|
||||
ctrl = PORT_RESERVED_1A_BUSY | PORT_RESERVED_1A_READ |
|
||||
PORT_RESERVED_1A_BLOCK | port << PORT_RESERVED_1A_PORT_SHIFT |
|
||||
reg;
|
||||
|
||||
err = mv88e6xxx_port_write(chip, PORT_RESERVED_1A_CTRL_PORT,
|
||||
PORT_RESERVED_1A, ctrl);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6390_hidden_wait(chip);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6xxx_port_read(chip, PORT_RESERVED_1A_DATA_PORT,
|
||||
PORT_RESERVED_1A, val);
|
||||
}
|
||||
|
||||
/* Check if the errata has already been applied. */
|
||||
static bool mv88e6390_setup_errata_applied(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int port;
|
||||
int err;
|
||||
u16 val;
|
||||
|
||||
for (port = 0; port < mv88e6xxx_num_ports(chip); port++) {
|
||||
err = mv88e6390_hidden_read(chip, port, 0, &val);
|
||||
if (err) {
|
||||
dev_err(chip->dev,
|
||||
"Error reading hidden register: %d\n", err);
|
||||
return false;
|
||||
}
|
||||
if (val != 0x01c0)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* The 6390 copper ports have an errata which require poking magic
|
||||
* values into undocumented hidden registers and then performing a
|
||||
* software reset.
|
||||
*/
|
||||
static int mv88e6390_setup_errata(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int port;
|
||||
int err;
|
||||
|
||||
if (mv88e6390_setup_errata_applied(chip))
|
||||
return 0;
|
||||
|
||||
/* Set the ports into blocking mode */
|
||||
for (port = 0; port < mv88e6xxx_num_ports(chip); port++) {
|
||||
err = mv88e6xxx_port_set_state(chip, port, BR_STATE_DISABLED);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
for (port = 0; port < mv88e6xxx_num_ports(chip); port++) {
|
||||
err = mv88e6390_hidden_write(chip, port, 0, 0x01c0);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
return mv88e6xxx_software_reset(chip);
|
||||
}
|
||||
|
||||
static int mv88e6xxx_setup(struct dsa_switch *ds)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = ds->priv;
|
||||
@@ -1990,6 +2091,12 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
|
||||
|
||||
mutex_lock(&chip->reg_lock);
|
||||
|
||||
if (chip->info->ops->setup_errata) {
|
||||
err = chip->info->ops->setup_errata(chip);
|
||||
if (err)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Setup Switch Port Registers */
|
||||
for (i = 0; i < mv88e6xxx_num_ports(chip); i++) {
|
||||
err = mv88e6xxx_setup_port(chip, i);
|
||||
@@ -2652,6 +2759,7 @@ static const struct mv88e6xxx_ops mv88e6185_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6190_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
@@ -2687,6 +2795,7 @@ static const struct mv88e6xxx_ops mv88e6190_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6190x_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
@@ -2722,6 +2831,7 @@ static const struct mv88e6xxx_ops mv88e6190x_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6191_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
@@ -2793,6 +2903,7 @@ static const struct mv88e6xxx_ops mv88e6240_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6290_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
@@ -3030,6 +3141,7 @@ static const struct mv88e6xxx_ops mv88e6352_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6390_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
@@ -3068,6 +3180,7 @@ static const struct mv88e6xxx_ops mv88e6390_ops = {
|
||||
|
||||
static const struct mv88e6xxx_ops mv88e6390x_ops = {
|
||||
/* MV88E6XXX_FAMILY_6390 */
|
||||
.setup_errata = mv88e6390_setup_errata,
|
||||
.irl_init_all = mv88e6390_g2_irl_init_all,
|
||||
.get_eeprom = mv88e6xxx_g2_get_eeprom8,
|
||||
.set_eeprom = mv88e6xxx_g2_set_eeprom8,
|
||||
|
||||
@@ -222,6 +222,11 @@ struct mv88e6xxx_mdio_bus {
|
||||
};
|
||||
|
||||
struct mv88e6xxx_ops {
|
||||
/* Switch Setup Errata, called early in the switch setup to
|
||||
* allow any errata actions to be performed
|
||||
*/
|
||||
int (*setup_errata)(struct mv88e6xxx_chip *chip);
|
||||
|
||||
/* Ingress Rate Limit unit (IRL) operations */
|
||||
int (*irl_init_all)(struct mv88e6xxx_chip *chip, int port);
|
||||
|
||||
|
||||
@@ -236,6 +236,16 @@
|
||||
/* Offset 0x19: Port IEEE Priority Remapping Registers (4-7) */
|
||||
#define MV88E6095_PORT_IEEE_PRIO_REMAP_4567 0x19
|
||||
|
||||
/* Offset 0x1a: Magic undocumented errata register */
|
||||
#define PORT_RESERVED_1A 0x1a
|
||||
#define PORT_RESERVED_1A_BUSY BIT(15)
|
||||
#define PORT_RESERVED_1A_WRITE BIT(14)
|
||||
#define PORT_RESERVED_1A_READ 0
|
||||
#define PORT_RESERVED_1A_PORT_SHIFT 5
|
||||
#define PORT_RESERVED_1A_BLOCK (0xf << 10)
|
||||
#define PORT_RESERVED_1A_CTRL_PORT 4
|
||||
#define PORT_RESERVED_1A_DATA_PORT 5
|
||||
|
||||
int mv88e6xxx_port_read(struct mv88e6xxx_chip *chip, int port, int reg,
|
||||
u16 *val);
|
||||
int mv88e6xxx_port_write(struct mv88e6xxx_chip *chip, int port, int reg,
|
||||
|
||||
@@ -191,10 +191,14 @@ static int e1000e_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
|
||||
struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
|
||||
ptp_clock_info);
|
||||
unsigned long flags;
|
||||
u64 ns;
|
||||
u64 cycles, ns;
|
||||
|
||||
spin_lock_irqsave(&adapter->systim_lock, flags);
|
||||
ns = timecounter_read(&adapter->tc);
|
||||
|
||||
/* Use timecounter_cyc2time() to allow non-monotonic SYSTIM readings */
|
||||
cycles = adapter->cc.read(&adapter->cc);
|
||||
ns = timecounter_cyc2time(&adapter->tc, cycles);
|
||||
|
||||
spin_unlock_irqrestore(&adapter->systim_lock, flags);
|
||||
|
||||
*ts = ns_to_timespec64(ns);
|
||||
@@ -250,9 +254,12 @@ static void e1000e_systim_overflow_work(struct work_struct *work)
|
||||
systim_overflow_work.work);
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
struct timespec64 ts;
|
||||
u64 ns;
|
||||
|
||||
adapter->ptp_clock_info.gettime64(&adapter->ptp_clock_info, &ts);
|
||||
/* Update the timecounter */
|
||||
ns = timecounter_read(&adapter->tc);
|
||||
|
||||
ts = ns_to_timespec64(ns);
|
||||
e_dbg("SYSTIM overflow check at %lld.%09lu\n",
|
||||
(long long) ts.tv_sec, ts.tv_nsec);
|
||||
|
||||
|
||||
@@ -4276,12 +4276,15 @@ static int mlxsw_sp_netdevice_port_upper_event(struct net_device *lower_dev,
|
||||
lower_dev,
|
||||
upper_dev);
|
||||
} else if (netif_is_lag_master(upper_dev)) {
|
||||
if (info->linking)
|
||||
if (info->linking) {
|
||||
err = mlxsw_sp_port_lag_join(mlxsw_sp_port,
|
||||
upper_dev);
|
||||
else
|
||||
} else {
|
||||
mlxsw_sp_port_lag_tx_en_set(mlxsw_sp_port,
|
||||
false);
|
||||
mlxsw_sp_port_lag_leave(mlxsw_sp_port,
|
||||
upper_dev);
|
||||
}
|
||||
} else if (netif_is_ovs_master(upper_dev)) {
|
||||
if (info->linking)
|
||||
err = mlxsw_sp_port_ovs_join(mlxsw_sp_port);
|
||||
|
||||
@@ -1424,7 +1424,7 @@ static void
|
||||
mlxsw_sp_bridge_port_vlan_del(struct mlxsw_sp_port *mlxsw_sp_port,
|
||||
struct mlxsw_sp_bridge_port *bridge_port, u16 vid)
|
||||
{
|
||||
u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : vid;
|
||||
u16 pvid = mlxsw_sp_port->pvid == vid ? 0 : mlxsw_sp_port->pvid;
|
||||
struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan;
|
||||
|
||||
mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_vid(mlxsw_sp_port, vid);
|
||||
|
||||
@@ -324,6 +324,8 @@ enum cfg_version {
|
||||
};
|
||||
|
||||
static const struct pci_device_id rtl8169_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(REALTEK, 0x2502), RTL_CFG_1 },
|
||||
{ PCI_VDEVICE(REALTEK, 0x2600), RTL_CFG_1 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
|
||||
|
||||
@@ -123,6 +123,7 @@ static void qmimux_setup(struct net_device *dev)
|
||||
dev->addr_len = 0;
|
||||
dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
|
||||
dev->netdev_ops = &qmimux_netdev_ops;
|
||||
dev->mtu = 1500;
|
||||
dev->needs_free_netdev = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,19 @@ static int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size,
|
||||
return dw_pcie_write(pci->dbi_base + where, size, val);
|
||||
}
|
||||
|
||||
static void dwc_irq_ack(struct irq_data *d)
|
||||
{
|
||||
struct msi_desc *msi = irq_data_get_msi_desc(d);
|
||||
struct pcie_port *pp = msi_desc_to_pci_sysdata(msi);
|
||||
int pos = d->hwirq % 32;
|
||||
int i = d->hwirq / 32;
|
||||
|
||||
dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, BIT(pos));
|
||||
}
|
||||
|
||||
static struct irq_chip dw_msi_irq_chip = {
|
||||
.name = "PCI-MSI",
|
||||
.irq_ack = dwc_irq_ack,
|
||||
.irq_enable = pci_msi_unmask_irq,
|
||||
.irq_disable = pci_msi_mask_irq,
|
||||
.irq_mask = pci_msi_mask_irq,
|
||||
@@ -72,8 +83,6 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)
|
||||
pos)) != 32) {
|
||||
irq = irq_find_mapping(pp->irq_domain, i * 32 + pos);
|
||||
generic_handle_irq(irq);
|
||||
dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12,
|
||||
4, 1 << pos);
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
@@ -263,7 +272,7 @@ static struct msi_controller dw_pcie_msi_chip = {
|
||||
static int dw_pcie_msi_map(struct irq_domain *domain, unsigned int irq,
|
||||
irq_hw_number_t hwirq)
|
||||
{
|
||||
irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_simple_irq);
|
||||
irq_set_chip_and_handler(irq, &dw_msi_irq_chip, handle_edge_irq);
|
||||
irq_set_chip_data(irq, domain->host_data);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -2147,7 +2147,8 @@ static int asus_wmi_add(struct platform_device *pdev)
|
||||
err = asus_wmi_backlight_init(asus);
|
||||
if (err && err != -ENODEV)
|
||||
goto fail_backlight;
|
||||
}
|
||||
} else
|
||||
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL);
|
||||
|
||||
status = wmi_install_notify_handler(asus->driver->event_guid,
|
||||
asus_wmi_notify, asus);
|
||||
|
||||
@@ -1266,7 +1266,7 @@ void mr_update_load_balance_params(struct MR_DRV_RAID_MAP_ALL *drv_map,
|
||||
|
||||
for (ldCount = 0; ldCount < MAX_LOGICAL_DRIVES_EXT; ldCount++) {
|
||||
ld = MR_TargetIdToLdGet(ldCount, drv_map);
|
||||
if (ld >= MAX_LOGICAL_DRIVES_EXT) {
|
||||
if (ld >= MAX_LOGICAL_DRIVES_EXT - 1) {
|
||||
lbInfo[ldCount].loadBalanceFlag = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2529,7 +2529,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,
|
||||
device_id < instance->fw_supported_vd_count)) {
|
||||
|
||||
ld = MR_TargetIdToLdGet(device_id, local_map_ptr);
|
||||
if (ld >= instance->fw_supported_vd_count)
|
||||
if (ld >= instance->fw_supported_vd_count - 1)
|
||||
fp_possible = 0;
|
||||
else {
|
||||
raid = MR_LdRaidGet(ld, local_map_ptr);
|
||||
|
||||
@@ -2709,6 +2709,9 @@ static unsigned int pqi_process_io_intr(struct pqi_ctrl_info *ctrl_info,
|
||||
switch (response->header.iu_type) {
|
||||
case PQI_RESPONSE_IU_RAID_PATH_IO_SUCCESS:
|
||||
case PQI_RESPONSE_IU_AIO_PATH_IO_SUCCESS:
|
||||
if (io_request->scmd)
|
||||
io_request->scmd->result = 0;
|
||||
/* fall through */
|
||||
case PQI_RESPONSE_IU_GENERAL_MANAGEMENT:
|
||||
break;
|
||||
case PQI_RESPONSE_IU_TASK_MANAGEMENT:
|
||||
@@ -6700,6 +6703,7 @@ static void pqi_shutdown(struct pci_dev *pci_dev)
|
||||
* storage.
|
||||
*/
|
||||
rc = pqi_flush_cache(ctrl_info, SHUTDOWN);
|
||||
pqi_free_interrupts(ctrl_info);
|
||||
pqi_reset(ctrl_info);
|
||||
if (rc == 0)
|
||||
return;
|
||||
|
||||
@@ -108,12 +108,17 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf)
|
||||
|
||||
buf[7] = 0x2; /* CmdQue=1 */
|
||||
|
||||
memcpy(&buf[8], "LIO-ORG ", 8);
|
||||
memset(&buf[16], 0x20, 16);
|
||||
/*
|
||||
* ASCII data fields described as being left-aligned shall have any
|
||||
* unused bytes at the end of the field (i.e., highest offset) and the
|
||||
* unused bytes shall be filled with ASCII space characters (20h).
|
||||
*/
|
||||
memset(&buf[8], 0x20, 8 + 16 + 4);
|
||||
memcpy(&buf[8], "LIO-ORG", sizeof("LIO-ORG") - 1);
|
||||
memcpy(&buf[16], dev->t10_wwn.model,
|
||||
min_t(size_t, strlen(dev->t10_wwn.model), 16));
|
||||
strnlen(dev->t10_wwn.model, 16));
|
||||
memcpy(&buf[32], dev->t10_wwn.revision,
|
||||
min_t(size_t, strlen(dev->t10_wwn.revision), 4));
|
||||
strnlen(dev->t10_wwn.revision, 4));
|
||||
buf[4] = 31; /* Set additional length to 31 */
|
||||
|
||||
return 0;
|
||||
@@ -251,7 +256,9 @@ check_t10_vend_desc:
|
||||
buf[off] = 0x2; /* ASCII */
|
||||
buf[off+1] = 0x1; /* T10 Vendor ID */
|
||||
buf[off+2] = 0x0;
|
||||
memcpy(&buf[off+4], "LIO-ORG", 8);
|
||||
/* left align Vendor ID and pad with spaces */
|
||||
memset(&buf[off+4], 0x20, 8);
|
||||
memcpy(&buf[off+4], "LIO-ORG", sizeof("LIO-ORG") - 1);
|
||||
/* Extra Byte for NULL Terminator */
|
||||
id_len++;
|
||||
/* Identifier Length */
|
||||
|
||||
@@ -2800,6 +2800,7 @@ static struct platform_driver arm_sbsa_uart_platform_driver = {
|
||||
.name = "sbsa-uart",
|
||||
.of_match_table = of_match_ptr(sbsa_uart_of_match),
|
||||
.acpi_match_table = ACPI_PTR(sbsa_uart_acpi_match),
|
||||
.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2828,6 +2829,7 @@ static struct amba_driver pl011_driver = {
|
||||
.drv = {
|
||||
.name = "uart-pl011",
|
||||
.pm = &pl011_dev_pm_ops,
|
||||
.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_AMBA_PL011),
|
||||
},
|
||||
.id_table = pl011_ids,
|
||||
.probe = pl011_probe,
|
||||
|
||||
@@ -920,6 +920,7 @@ static struct platform_driver pic32_uart_platform_driver = {
|
||||
.driver = {
|
||||
.name = PIC32_DEV_NAME,
|
||||
.of_match_table = of_match_ptr(pic32_serial_dt_ids),
|
||||
.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_PIC32),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -218,10 +218,15 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state,
|
||||
if (!state->xmit.buf) {
|
||||
state->xmit.buf = (unsigned char *) page;
|
||||
uart_circ_clear(&state->xmit);
|
||||
uart_port_unlock(uport, flags);
|
||||
} else {
|
||||
uart_port_unlock(uport, flags);
|
||||
/*
|
||||
* Do not free() the page under the port lock, see
|
||||
* uart_shutdown().
|
||||
*/
|
||||
free_page(page);
|
||||
}
|
||||
uart_port_unlock(uport, flags);
|
||||
|
||||
retval = uport->ops->startup(uport);
|
||||
if (retval == 0) {
|
||||
@@ -281,6 +286,7 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
|
||||
struct uart_port *uport = uart_port_check(state);
|
||||
struct tty_port *port = &state->port;
|
||||
unsigned long flags = 0;
|
||||
char *xmit_buf = NULL;
|
||||
|
||||
/*
|
||||
* Set the TTY IO error marker
|
||||
@@ -311,14 +317,18 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
|
||||
tty_port_set_suspended(port, 0);
|
||||
|
||||
/*
|
||||
* Free the transmit buffer page.
|
||||
* Do not free() the transmit buffer page under the port lock since
|
||||
* this can create various circular locking scenarios. For instance,
|
||||
* console driver may need to allocate/free a debug object, which
|
||||
* can endup in printk() recursion.
|
||||
*/
|
||||
uart_port_lock(state, flags);
|
||||
if (state->xmit.buf) {
|
||||
free_page((unsigned long)state->xmit.buf);
|
||||
state->xmit.buf = NULL;
|
||||
}
|
||||
xmit_buf = state->xmit.buf;
|
||||
state->xmit.buf = NULL;
|
||||
uart_port_unlock(uport, flags);
|
||||
|
||||
if (xmit_buf)
|
||||
free_page((unsigned long)xmit_buf);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1644,6 +1644,7 @@ static struct platform_driver cdns_uart_platform_driver = {
|
||||
.name = CDNS_UART_NAME,
|
||||
.of_match_table = cdns_uart_of_match,
|
||||
.pm = &cdns_uart_dev_pm_ops,
|
||||
.suppress_bind_attrs = IS_BUILTIN(CONFIG_SERIAL_XILINX_PS_UART),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -352,6 +352,7 @@ struct renesas_usb3 {
|
||||
bool extcon_host; /* check id and set EXTCON_USB_HOST */
|
||||
bool extcon_usb; /* check vbus and set EXTCON_USB */
|
||||
bool forced_b_device;
|
||||
bool start_to_connect;
|
||||
};
|
||||
|
||||
#define gadget_to_renesas_usb3(_gadget) \
|
||||
@@ -470,7 +471,8 @@ static void usb3_init_axi_bridge(struct renesas_usb3 *usb3)
|
||||
static void usb3_init_epc_registers(struct renesas_usb3 *usb3)
|
||||
{
|
||||
usb3_write(usb3, ~0, USB3_USB_INT_STA_1);
|
||||
usb3_enable_irq_1(usb3, USB_INT_1_VBUS_CNG);
|
||||
if (!usb3->workaround_for_vbus)
|
||||
usb3_enable_irq_1(usb3, USB_INT_1_VBUS_CNG);
|
||||
}
|
||||
|
||||
static bool usb3_wakeup_usb2_phy(struct renesas_usb3 *usb3)
|
||||
@@ -676,8 +678,7 @@ static void usb3_mode_config(struct renesas_usb3 *usb3, bool host, bool a_dev)
|
||||
usb3_set_mode(usb3, host);
|
||||
usb3_vbus_out(usb3, a_dev);
|
||||
/* for A-Peripheral or forced B-device mode */
|
||||
if ((!host && a_dev) ||
|
||||
(usb3->workaround_for_vbus && usb3->forced_b_device))
|
||||
if ((!host && a_dev) || usb3->start_to_connect)
|
||||
usb3_connect(usb3);
|
||||
spin_unlock_irqrestore(&usb3->lock, flags);
|
||||
}
|
||||
@@ -2369,7 +2370,11 @@ static ssize_t renesas_usb3_b_device_write(struct file *file,
|
||||
if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
|
||||
return -EFAULT;
|
||||
|
||||
if (!strncmp(buf, "1", 1))
|
||||
usb3->start_to_connect = false;
|
||||
if (usb3->workaround_for_vbus && usb3->forced_b_device &&
|
||||
!strncmp(buf, "2", 1))
|
||||
usb3->start_to_connect = true;
|
||||
else if (!strncmp(buf, "1", 1))
|
||||
usb3->forced_b_device = true;
|
||||
else
|
||||
usb3->forced_b_device = false;
|
||||
@@ -2377,7 +2382,7 @@ static ssize_t renesas_usb3_b_device_write(struct file *file,
|
||||
if (usb3->workaround_for_vbus)
|
||||
usb3_disconnect(usb3);
|
||||
|
||||
/* Let this driver call usb3_connect() anyway */
|
||||
/* Let this driver call usb3_connect() if needed */
|
||||
usb3_check_id(usb3);
|
||||
|
||||
return count;
|
||||
|
||||
@@ -6594,14 +6594,19 @@ fail_dir_item:
|
||||
err = btrfs_del_root_ref(trans, fs_info, key.objectid,
|
||||
root->root_key.objectid, parent_ino,
|
||||
&local_index, name, name_len);
|
||||
|
||||
if (err)
|
||||
btrfs_abort_transaction(trans, err);
|
||||
} else if (add_backref) {
|
||||
u64 local_index;
|
||||
int err;
|
||||
|
||||
err = btrfs_del_inode_ref(trans, root, name, name_len,
|
||||
ino, parent_ino, &local_index);
|
||||
if (err)
|
||||
btrfs_abort_transaction(trans, err);
|
||||
}
|
||||
|
||||
/* Return the original error code */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,24 @@ config CIFS_STATS2
|
||||
Unless you are a developer or are doing network performance analysis
|
||||
or tuning, say N.
|
||||
|
||||
config CIFS_ALLOW_INSECURE_LEGACY
|
||||
bool "Support legacy servers which use less secure dialects"
|
||||
depends on CIFS
|
||||
default y
|
||||
help
|
||||
Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
|
||||
additional security features, including protection against
|
||||
man-in-the-middle attacks and stronger crypto hashes, so the use
|
||||
of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.
|
||||
|
||||
Disabling this option prevents users from using vers=1.0 or vers=2.0
|
||||
on mounts with cifs.ko
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
config CIFS_WEAK_PW_HASH
|
||||
bool "Support legacy servers which use weaker LANMAN security"
|
||||
depends on CIFS
|
||||
depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY
|
||||
help
|
||||
Modern CIFS servers including Samba and most Windows versions
|
||||
(since 1997) support stronger NTLM (and even NTLMv2 and Kerberos)
|
||||
|
||||
@@ -1130,6 +1130,7 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol)
|
||||
substring_t args[MAX_OPT_ARGS];
|
||||
|
||||
switch (match_token(value, cifs_smb_version_tokens, args)) {
|
||||
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
|
||||
case Smb_1:
|
||||
vol->ops = &smb1_operations;
|
||||
vol->vals = &smb1_values;
|
||||
@@ -1138,6 +1139,14 @@ cifs_parse_smb_version(char *value, struct smb_vol *vol)
|
||||
vol->ops = &smb20_operations;
|
||||
vol->vals = &smb20_values;
|
||||
break;
|
||||
#else
|
||||
case Smb_1:
|
||||
cifs_dbg(VFS, "vers=1.0 (cifs) mount not permitted when legacy dialects disabled\n");
|
||||
return 1;
|
||||
case Smb_20:
|
||||
cifs_dbg(VFS, "vers=2.0 mount not permitted when legacy dialects disabled\n");
|
||||
return 1;
|
||||
#endif /* CIFS_ALLOW_INSECURE_LEGACY */
|
||||
case Smb_21:
|
||||
vol->ops = &smb21_operations;
|
||||
vol->vals = &smb21_values;
|
||||
|
||||
@@ -101,7 +101,8 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
|
||||
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
|
||||
|
||||
#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
|
||||
cancel_delayed_work_sync(&c->wbuf_dwork);
|
||||
if (jffs2_is_writebuffered(c))
|
||||
cancel_delayed_work_sync(&c->wbuf_dwork);
|
||||
#endif
|
||||
|
||||
mutex_lock(&c->alloc_sem);
|
||||
|
||||
@@ -291,12 +291,23 @@ static struct nfs_client *nfs_match_client(const struct nfs_client_initdata *dat
|
||||
const struct sockaddr *sap = data->addr;
|
||||
struct nfs_net *nn = net_generic(data->net, nfs_net_id);
|
||||
|
||||
again:
|
||||
list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
|
||||
const struct sockaddr *clap = (struct sockaddr *)&clp->cl_addr;
|
||||
/* Don't match clients that failed to initialise properly */
|
||||
if (clp->cl_cons_state < 0)
|
||||
continue;
|
||||
|
||||
/* If a client is still initializing then we need to wait */
|
||||
if (clp->cl_cons_state > NFS_CS_READY) {
|
||||
atomic_inc(&clp->cl_count);
|
||||
spin_unlock(&nn->nfs_client_lock);
|
||||
nfs_wait_client_init_complete(clp);
|
||||
nfs_put_client(clp);
|
||||
spin_lock(&nn->nfs_client_lock);
|
||||
goto again;
|
||||
}
|
||||
|
||||
/* Different NFS versions cannot share the same nfs_client */
|
||||
if (clp->rpc_ops != data->nfs_mod->rpc_ops)
|
||||
continue;
|
||||
|
||||
@@ -404,15 +404,19 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp,
|
||||
if (error < 0)
|
||||
goto error;
|
||||
|
||||
if (!nfs4_has_session(clp))
|
||||
nfs_mark_client_ready(clp, NFS_CS_READY);
|
||||
|
||||
error = nfs4_discover_server_trunking(clp, &old);
|
||||
if (error < 0)
|
||||
goto error;
|
||||
|
||||
if (clp != old)
|
||||
if (clp != old) {
|
||||
clp->cl_preserve_clid = true;
|
||||
/*
|
||||
* Mark the client as having failed initialization so other
|
||||
* processes walking the nfs_client_list in nfs_match_client()
|
||||
* won't try to use it.
|
||||
*/
|
||||
nfs_mark_client_ready(clp, -EPERM);
|
||||
}
|
||||
nfs_put_client(clp);
|
||||
clear_bit(NFS_CS_TSM_POSSIBLE, &clp->cl_flags);
|
||||
return old;
|
||||
@@ -539,6 +543,9 @@ int nfs40_walk_client_list(struct nfs_client *new,
|
||||
spin_lock(&nn->nfs_client_lock);
|
||||
list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) {
|
||||
|
||||
if (pos == new)
|
||||
goto found;
|
||||
|
||||
status = nfs4_match_client(pos, new, &prev, nn);
|
||||
if (status < 0)
|
||||
goto out_unlock;
|
||||
@@ -559,6 +566,7 @@ int nfs40_walk_client_list(struct nfs_client *new,
|
||||
* way that a SETCLIENTID_CONFIRM to pos can succeed is
|
||||
* if new and pos point to the same server:
|
||||
*/
|
||||
found:
|
||||
atomic_inc(&pos->cl_count);
|
||||
spin_unlock(&nn->nfs_client_lock);
|
||||
|
||||
@@ -572,6 +580,7 @@ int nfs40_walk_client_list(struct nfs_client *new,
|
||||
case 0:
|
||||
nfs4_swap_callback_idents(pos, new);
|
||||
pos->cl_confirm = new->cl_confirm;
|
||||
nfs_mark_client_ready(pos, NFS_CS_READY);
|
||||
|
||||
prev = NULL;
|
||||
*result = pos;
|
||||
|
||||
@@ -345,13 +345,18 @@ int ocfs2_load_local_alloc(struct ocfs2_super *osb)
|
||||
if (num_used
|
||||
|| alloc->id1.bitmap1.i_used
|
||||
|| alloc->id1.bitmap1.i_total
|
||||
|| la->la_bm_off)
|
||||
mlog(ML_ERROR, "Local alloc hasn't been recovered!\n"
|
||||
|| la->la_bm_off) {
|
||||
mlog(ML_ERROR, "inconsistent detected, clean journal with"
|
||||
" unrecovered local alloc, please run fsck.ocfs2!\n"
|
||||
"found = %u, set = %u, taken = %u, off = %u\n",
|
||||
num_used, le32_to_cpu(alloc->id1.bitmap1.i_used),
|
||||
le32_to_cpu(alloc->id1.bitmap1.i_total),
|
||||
OCFS2_LOCAL_ALLOC(alloc)->la_bm_off);
|
||||
|
||||
status = -EINVAL;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
osb->local_alloc_bh = alloc_bh;
|
||||
osb->local_alloc_state = OCFS2_LA_ENABLED;
|
||||
|
||||
|
||||
@@ -488,6 +488,11 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig,
|
||||
sig ^= PERSISTENT_RAM_SIG;
|
||||
|
||||
if (prz->buffer->sig == sig) {
|
||||
if (buffer_size(prz) == 0) {
|
||||
pr_debug("found existing empty buffer\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (buffer_size(prz) > prz->buffer_size ||
|
||||
buffer_start(prz) > buffer_size(prz))
|
||||
pr_info("found existing invalid buffer, size %zu, start %zu\n",
|
||||
|
||||
@@ -793,7 +793,8 @@ static int quotactl_cmd_write(int cmd)
|
||||
/* Return true if quotactl command is manipulating quota on/off state */
|
||||
static bool quotactl_cmd_onoff(int cmd)
|
||||
{
|
||||
return (cmd == Q_QUOTAON) || (cmd == Q_QUOTAOFF);
|
||||
return (cmd == Q_QUOTAON) || (cmd == Q_QUOTAOFF) ||
|
||||
(cmd == Q_XQUOTAON) || (cmd == Q_XQUOTAOFF);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -233,6 +233,14 @@ static inline void wb_get(struct bdi_writeback *wb)
|
||||
*/
|
||||
static inline void wb_put(struct bdi_writeback *wb)
|
||||
{
|
||||
if (WARN_ON_ONCE(!wb->bdi)) {
|
||||
/*
|
||||
* A driver bug might cause a file to be removed before bdi was
|
||||
* initialized.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
if (wb != &wb->bdi->wb)
|
||||
percpu_ref_put(&wb->refcnt);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ struct swap_info_struct {
|
||||
unsigned long flags; /* SWP_USED etc: see above */
|
||||
signed short prio; /* swap priority of this type */
|
||||
struct plist_node list; /* entry in swap_active_head */
|
||||
struct plist_node avail_lists[MAX_NUMNODES];/* entry in swap_avail_heads */
|
||||
signed char type; /* strange name for an index */
|
||||
unsigned int max; /* extent of the swap_map */
|
||||
unsigned char *swap_map; /* vmalloc'ed array of usage counts */
|
||||
@@ -272,6 +271,16 @@ struct swap_info_struct {
|
||||
*/
|
||||
struct work_struct discard_work; /* discard worker */
|
||||
struct swap_cluster_list discard_clusters; /* discard clusters list */
|
||||
struct plist_node avail_lists[0]; /*
|
||||
* entries in swap_avail_heads, one
|
||||
* entry per node.
|
||||
* Must be last as the number of the
|
||||
* array is nr_node_ids, which is not
|
||||
* a fixed value so have to allocate
|
||||
* dynamically.
|
||||
* And it has to be an array so that
|
||||
* plist_for_each_* can work.
|
||||
*/
|
||||
};
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
|
||||
@@ -2157,6 +2157,7 @@ int write_cache_pages(struct address_space *mapping,
|
||||
{
|
||||
int ret = 0;
|
||||
int done = 0;
|
||||
int error;
|
||||
struct pagevec pvec;
|
||||
int nr_pages;
|
||||
pgoff_t uninitialized_var(writeback_index);
|
||||
@@ -2253,25 +2254,31 @@ continue_unlock:
|
||||
goto continue_unlock;
|
||||
|
||||
trace_wbc_writepage(wbc, inode_to_bdi(mapping->host));
|
||||
ret = (*writepage)(page, wbc, data);
|
||||
if (unlikely(ret)) {
|
||||
if (ret == AOP_WRITEPAGE_ACTIVATE) {
|
||||
error = (*writepage)(page, wbc, data);
|
||||
if (unlikely(error)) {
|
||||
/*
|
||||
* Handle errors according to the type of
|
||||
* writeback. There's no need to continue for
|
||||
* background writeback. Just push done_index
|
||||
* past this page so media errors won't choke
|
||||
* writeout for the entire file. For integrity
|
||||
* writeback, we must process the entire dirty
|
||||
* set regardless of errors because the fs may
|
||||
* still have state to clear for each page. In
|
||||
* that case we continue processing and return
|
||||
* the first error.
|
||||
*/
|
||||
if (error == AOP_WRITEPAGE_ACTIVATE) {
|
||||
unlock_page(page);
|
||||
ret = 0;
|
||||
} else {
|
||||
/*
|
||||
* done_index is set past this page,
|
||||
* so media errors will not choke
|
||||
* background writeout for the entire
|
||||
* file. This has consequences for
|
||||
* range_cyclic semantics (ie. it may
|
||||
* not be suitable for data integrity
|
||||
* writeout).
|
||||
*/
|
||||
error = 0;
|
||||
} else if (wbc->sync_mode != WB_SYNC_ALL) {
|
||||
ret = error;
|
||||
done_index = page->index + 1;
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
if (!ret)
|
||||
ret = error;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -2830,8 +2830,9 @@ static struct swap_info_struct *alloc_swap_info(void)
|
||||
struct swap_info_struct *p;
|
||||
unsigned int type;
|
||||
int i;
|
||||
int size = sizeof(*p) + nr_node_ids * sizeof(struct plist_node);
|
||||
|
||||
p = kvzalloc(sizeof(*p), GFP_KERNEL);
|
||||
p = kvzalloc(size, GFP_KERNEL);
|
||||
if (!p)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
@@ -5154,7 +5154,6 @@ struct sk_buff *alloc_skb_with_frags(unsigned long header_len,
|
||||
unsigned long chunk;
|
||||
struct sk_buff *skb;
|
||||
struct page *page;
|
||||
gfp_t gfp_head;
|
||||
int i;
|
||||
|
||||
*errcode = -EMSGSIZE;
|
||||
@@ -5164,12 +5163,8 @@ struct sk_buff *alloc_skb_with_frags(unsigned long header_len,
|
||||
if (npages > MAX_SKB_FRAGS)
|
||||
return NULL;
|
||||
|
||||
gfp_head = gfp_mask;
|
||||
if (gfp_head & __GFP_DIRECT_RECLAIM)
|
||||
gfp_head |= __GFP_RETRY_MAYFAIL;
|
||||
|
||||
*errcode = -ENOBUFS;
|
||||
skb = alloc_skb(header_len, gfp_head);
|
||||
skb = alloc_skb(header_len, gfp_mask);
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -735,6 +735,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
break;
|
||||
case SO_DONTROUTE:
|
||||
sock_valbool_flag(sk, SOCK_LOCALROUTE, valbool);
|
||||
sk_dst_reset(sk);
|
||||
break;
|
||||
case SO_BROADCAST:
|
||||
sock_valbool_flag(sk, SOCK_BROADCAST, valbool);
|
||||
|
||||
@@ -492,7 +492,8 @@ static int clusterip_tg_check(const struct xt_tgchk_param *par)
|
||||
if (IS_ERR(config))
|
||||
return PTR_ERR(config);
|
||||
}
|
||||
}
|
||||
} else if (memcmp(&config->clustermac, &cipinfo->clustermac, ETH_ALEN))
|
||||
return -EINVAL;
|
||||
|
||||
ret = nf_ct_netns_get(par->net, par->family);
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -333,6 +333,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
|
||||
/* Check if the address belongs to the host. */
|
||||
if (addr_type == IPV6_ADDR_MAPPED) {
|
||||
struct net_device *dev = NULL;
|
||||
int chk_addr_ret;
|
||||
|
||||
/* Binding to v4-mapped address on a v6-only socket
|
||||
@@ -343,9 +344,20 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
||||
goto out;
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
if (sk->sk_bound_dev_if) {
|
||||
dev = dev_get_by_index_rcu(net, sk->sk_bound_dev_if);
|
||||
if (!dev) {
|
||||
err = -ENODEV;
|
||||
goto out_unlock;
|
||||
}
|
||||
}
|
||||
|
||||
/* Reproduce AF_INET checks to make the bindings consistent */
|
||||
v4addr = addr->sin6_addr.s6_addr32[3];
|
||||
chk_addr_ret = inet_addr_type(net, v4addr);
|
||||
chk_addr_ret = inet_addr_type_dev_table(net, dev, v4addr);
|
||||
rcu_read_unlock();
|
||||
|
||||
if (!net->ipv4.sysctl_ip_nonlocal_bind &&
|
||||
!(inet->freebind || inet->transparent) &&
|
||||
v4addr != htonl(INADDR_ANY) &&
|
||||
|
||||
@@ -71,7 +71,7 @@ static void warn_ignored_character(char chr)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s:%d:warning: ignoring unsupported character '%c'\n",
|
||||
zconf_curname(), zconf_lineno(), chr);
|
||||
current_file->name, yylineno, chr);
|
||||
}
|
||||
%}
|
||||
|
||||
@@ -191,6 +191,8 @@ n [A-Za-z0-9_-]
|
||||
}
|
||||
<<EOF>> {
|
||||
BEGIN(INITIAL);
|
||||
yylval.string = text;
|
||||
return T_WORD_QUOTE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2837,7 +2837,7 @@ static int selinux_sb_kern_mount(struct super_block *sb, int flags, void *data)
|
||||
return rc;
|
||||
|
||||
/* Allow all mounts performed by the kernel */
|
||||
if (flags & MS_KERNMOUNT)
|
||||
if (flags & (MS_KERNMOUNT | MS_SUBMOUNT))
|
||||
return 0;
|
||||
|
||||
ad.type = LSM_AUDIT_DATA_DENTRY;
|
||||
|
||||
@@ -41,6 +41,7 @@ config SND_OXFW
|
||||
* Mackie(Loud) U.420/U.420d
|
||||
* TASCAM FireOne
|
||||
* Stanton Controllers & Systems 1 Deck/Mixer
|
||||
* APOGEE duet FireWire
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called snd-oxfw.
|
||||
|
||||
@@ -434,7 +434,7 @@ static const struct ieee1394_device_id bebob_id_table[] = {
|
||||
/* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */
|
||||
SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00010048, &spec_normal),
|
||||
/* Apogee Electronics, Ensemble */
|
||||
SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00001eee, &spec_normal),
|
||||
SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x01eeee, &spec_normal),
|
||||
/* ESI, Quatafire610 */
|
||||
SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal),
|
||||
/* AcousticReality, eARMasterOne */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define VENDOR_LACIE 0x00d04b
|
||||
#define VENDOR_TASCAM 0x00022e
|
||||
#define OUI_STANTON 0x001260
|
||||
#define OUI_APOGEE 0x0003db
|
||||
|
||||
#define MODEL_SATELLITE 0x00200f
|
||||
|
||||
@@ -442,6 +443,13 @@ static const struct ieee1394_device_id oxfw_id_table[] = {
|
||||
.vendor_id = OUI_STANTON,
|
||||
.model_id = 0x002000,
|
||||
},
|
||||
// APOGEE, duet FireWire
|
||||
{
|
||||
.match_flags = IEEE1394_MATCH_VENDOR_ID |
|
||||
IEEE1394_MATCH_MODEL_ID,
|
||||
.vendor_id = OUI_APOGEE,
|
||||
.model_id = 0x01dddd,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table);
|
||||
|
||||
@@ -36,8 +36,6 @@ endif
|
||||
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
|
||||
|
||||
CFLAGS += -I$(srctree)/tools/include/
|
||||
CFLAGS += -I$(srctree)/include/uapi
|
||||
CFLAGS += -I$(srctree)/include
|
||||
|
||||
SUBCMD_IN := $(OUTPUT)libsubcmd-in.o
|
||||
|
||||
|
||||
@@ -524,10 +524,21 @@ static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu,
|
||||
struct perf_evsel *evsel)
|
||||
{
|
||||
int err;
|
||||
char c;
|
||||
|
||||
if (!evsel)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* If supported, force pass-through config term (pt=1) even if user
|
||||
* sets pt=0, which avoids senseless kernel errors.
|
||||
*/
|
||||
if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 &&
|
||||
!(evsel->attr.config & 1)) {
|
||||
pr_warning("pt=0 doesn't make sense, forcing pt=1\n");
|
||||
evsel->attr.config |= 1;
|
||||
}
|
||||
|
||||
err = intel_pt_val_config_term(intel_pt_pmu, "caps/cycle_thresholds",
|
||||
"cyc_thresh", "caps/psb_cyc",
|
||||
evsel->attr.config);
|
||||
|
||||
@@ -2300,7 +2300,7 @@ restart:
|
||||
if (!name_only && strlen(syms->alias))
|
||||
snprintf(name, MAX_NAME_LEN, "%s OR %s", syms->symbol, syms->alias);
|
||||
else
|
||||
strncpy(name, syms->symbol, MAX_NAME_LEN);
|
||||
strlcpy(name, syms->symbol, MAX_NAME_LEN);
|
||||
|
||||
evt_list[evt_i] = strdup(name);
|
||||
if (evt_list[evt_i] == NULL)
|
||||
|
||||
@@ -334,7 +334,7 @@ static char *cpu_model(void)
|
||||
if (file) {
|
||||
while (fgets(buf, 255, file)) {
|
||||
if (strstr(buf, "model name")) {
|
||||
strncpy(cpu_m, &buf[13], 255);
|
||||
strlcpy(cpu_m, &buf[13], 255);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
* ASSERT_EQ(expected, measured): expected == measured
|
||||
*/
|
||||
#define ASSERT_EQ(expected, seen) \
|
||||
__EXPECT(expected, seen, ==, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, ==, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_NE(expected, seen)
|
||||
@@ -341,7 +341,7 @@
|
||||
* ASSERT_NE(expected, measured): expected != measured
|
||||
*/
|
||||
#define ASSERT_NE(expected, seen) \
|
||||
__EXPECT(expected, seen, !=, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, !=, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_LT(expected, seen)
|
||||
@@ -352,7 +352,7 @@
|
||||
* ASSERT_LT(expected, measured): expected < measured
|
||||
*/
|
||||
#define ASSERT_LT(expected, seen) \
|
||||
__EXPECT(expected, seen, <, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, <, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_LE(expected, seen)
|
||||
@@ -363,7 +363,7 @@
|
||||
* ASSERT_LE(expected, measured): expected <= measured
|
||||
*/
|
||||
#define ASSERT_LE(expected, seen) \
|
||||
__EXPECT(expected, seen, <=, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, <=, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_GT(expected, seen)
|
||||
@@ -374,7 +374,7 @@
|
||||
* ASSERT_GT(expected, measured): expected > measured
|
||||
*/
|
||||
#define ASSERT_GT(expected, seen) \
|
||||
__EXPECT(expected, seen, >, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, >, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_GE(expected, seen)
|
||||
@@ -385,7 +385,7 @@
|
||||
* ASSERT_GE(expected, measured): expected >= measured
|
||||
*/
|
||||
#define ASSERT_GE(expected, seen) \
|
||||
__EXPECT(expected, seen, >=, 1)
|
||||
__EXPECT(expected, #expected, seen, #seen, >=, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_NULL(seen)
|
||||
@@ -395,7 +395,7 @@
|
||||
* ASSERT_NULL(measured): NULL == measured
|
||||
*/
|
||||
#define ASSERT_NULL(seen) \
|
||||
__EXPECT(NULL, seen, ==, 1)
|
||||
__EXPECT(NULL, "NULL", seen, #seen, ==, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_TRUE(seen)
|
||||
@@ -405,7 +405,7 @@
|
||||
* ASSERT_TRUE(measured): measured != 0
|
||||
*/
|
||||
#define ASSERT_TRUE(seen) \
|
||||
ASSERT_NE(0, seen)
|
||||
__EXPECT(0, "0", seen, #seen, !=, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_FALSE(seen)
|
||||
@@ -415,7 +415,7 @@
|
||||
* ASSERT_FALSE(measured): measured == 0
|
||||
*/
|
||||
#define ASSERT_FALSE(seen) \
|
||||
ASSERT_EQ(0, seen)
|
||||
__EXPECT(0, "0", seen, #seen, ==, 1)
|
||||
|
||||
/**
|
||||
* ASSERT_STREQ(expected, seen)
|
||||
@@ -448,7 +448,7 @@
|
||||
* EXPECT_EQ(expected, measured): expected == measured
|
||||
*/
|
||||
#define EXPECT_EQ(expected, seen) \
|
||||
__EXPECT(expected, seen, ==, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, ==, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_NE(expected, seen)
|
||||
@@ -459,7 +459,7 @@
|
||||
* EXPECT_NE(expected, measured): expected != measured
|
||||
*/
|
||||
#define EXPECT_NE(expected, seen) \
|
||||
__EXPECT(expected, seen, !=, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, !=, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_LT(expected, seen)
|
||||
@@ -470,7 +470,7 @@
|
||||
* EXPECT_LT(expected, measured): expected < measured
|
||||
*/
|
||||
#define EXPECT_LT(expected, seen) \
|
||||
__EXPECT(expected, seen, <, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, <, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_LE(expected, seen)
|
||||
@@ -481,7 +481,7 @@
|
||||
* EXPECT_LE(expected, measured): expected <= measured
|
||||
*/
|
||||
#define EXPECT_LE(expected, seen) \
|
||||
__EXPECT(expected, seen, <=, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, <=, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_GT(expected, seen)
|
||||
@@ -492,7 +492,7 @@
|
||||
* EXPECT_GT(expected, measured): expected > measured
|
||||
*/
|
||||
#define EXPECT_GT(expected, seen) \
|
||||
__EXPECT(expected, seen, >, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, >, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_GE(expected, seen)
|
||||
@@ -503,7 +503,7 @@
|
||||
* EXPECT_GE(expected, measured): expected >= measured
|
||||
*/
|
||||
#define EXPECT_GE(expected, seen) \
|
||||
__EXPECT(expected, seen, >=, 0)
|
||||
__EXPECT(expected, #expected, seen, #seen, >=, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_NULL(seen)
|
||||
@@ -513,7 +513,7 @@
|
||||
* EXPECT_NULL(measured): NULL == measured
|
||||
*/
|
||||
#define EXPECT_NULL(seen) \
|
||||
__EXPECT(NULL, seen, ==, 0)
|
||||
__EXPECT(NULL, "NULL", seen, #seen, ==, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_TRUE(seen)
|
||||
@@ -523,7 +523,7 @@
|
||||
* EXPECT_TRUE(measured): 0 != measured
|
||||
*/
|
||||
#define EXPECT_TRUE(seen) \
|
||||
EXPECT_NE(0, seen)
|
||||
__EXPECT(0, "0", seen, #seen, !=, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_FALSE(seen)
|
||||
@@ -533,7 +533,7 @@
|
||||
* EXPECT_FALSE(measured): 0 == measured
|
||||
*/
|
||||
#define EXPECT_FALSE(seen) \
|
||||
EXPECT_EQ(0, seen)
|
||||
__EXPECT(0, "0", seen, #seen, ==, 0)
|
||||
|
||||
/**
|
||||
* EXPECT_STREQ(expected, seen)
|
||||
@@ -573,7 +573,7 @@
|
||||
if (_metadata->passed && _metadata->step < 255) \
|
||||
_metadata->step++;
|
||||
|
||||
#define __EXPECT(_expected, _seen, _t, _assert) do { \
|
||||
#define __EXPECT(_expected, _expected_str, _seen, _seen_str, _t, _assert) do { \
|
||||
/* Avoid multiple evaluation of the cases */ \
|
||||
__typeof__(_expected) __exp = (_expected); \
|
||||
__typeof__(_seen) __seen = (_seen); \
|
||||
@@ -582,8 +582,8 @@
|
||||
unsigned long long __exp_print = (uintptr_t)__exp; \
|
||||
unsigned long long __seen_print = (uintptr_t)__seen; \
|
||||
__TH_LOG("Expected %s (%llu) %s %s (%llu)", \
|
||||
#_expected, __exp_print, #_t, \
|
||||
#_seen, __seen_print); \
|
||||
_expected_str, __exp_print, #_t, \
|
||||
_seen_str, __seen_print); \
|
||||
_metadata->passed = 0; \
|
||||
/* Ensure the optional handler is triggered */ \
|
||||
_metadata->trigger = 1; \
|
||||
|
||||
Reference in New Issue
Block a user