This is the 4.4.146 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAltoWioACgkQONu9yGCS aT6YrQ//d8dWKaNZK08Z/l2ZqRS56wlNTJyHIB81p1uM2PuPHfLjsZzLQ+HnZ3Ha G+fedEj3sbwJp8i61TRu9Q1p/PyLWsnaryWZaK3gm4Yo8GrdVbXAY47EHwz3fbUK yxrC0+zQmIlyZgwzbUNGspDuAdNt2MFDug97RFF8BdhJd84Rv0BbicGMwKJQFfFN g0Tv6yB+8cjmnCMjmLreLyi+puWvXZtZXAi+idl9eTC4ysGDKNvO1ERptv2NC5C6 171cbsS/ngpY5ZIUcmLy0QPPFh/ZCeoft22R3gOxZDkjT4Ro6lY5ubPKDEcn57Hv FSV5fuQ3cBtmsODn7LMIWqLDKuCRM/gTmvXrWxM91JDLSsuAdZWATj8k4iIoocmk l/3iOixBMFCGToQ1I2/O33QZOssKoDIz4bpG6+HM/Cj4anSnVZKjouJSTlNZr/3i ZJOXpu/MpQItc/RGo/PumzJLkXhS+HyGwPbTIOPy29NMqp+xvjZv4DttuJbqyHJ2 Pm/OZcvU7z1wSMhcTknvZLLMQVRIICQjfPJNDefqAdrCdd233cRo37cU8egg4A0l F3q+ZI/ny01YWQP8KrCJyWB5lHHbEc44wUHCxet0TPZ1qaqvVcXzaWhwxP2H0L3I 7r2u9bDg15ielw3jhPpRWZMvANbQlToNoj6YROqj5ArcIowcBPc= =7/iL -----END PGP SIGNATURE----- Merge 4.4.146 into android-4.4 Changes in 4.4.146 MIPS: Fix off-by-one in pci_resource_to_user() Input: elan_i2c - add ACPI ID for lenovo ideapad 330 Input: i8042 - add Lenovo LaVie Z to the i8042 reset list Input: elan_i2c - add another ACPI ID for Lenovo Ideapad 330-15AST tracing: Fix double free of event_trigger_data tracing: Fix possible double free in event_enable_trigger_func() tracing/kprobes: Fix trace_probe flags on enable_trace_kprobe() failure tracing: Quiet gcc warning about maybe unused link variable xen/netfront: raise max number of slots in xennet_get_responses() ALSA: emu10k1: add error handling for snd_ctl_add ALSA: fm801: add error handling for snd_ctl_add nfsd: fix potential use-after-free in nfsd4_decode_getdeviceinfo mm: vmalloc: avoid racy handling of debugobjects in vunmap mm/slub.c: add __printf verification to slab_err() rtc: ensure rtc_set_alarm fails when alarms are not supported netfilter: ipset: List timing out entries with "timeout 1" instead of zero infiniband: fix a possible use-after-free bug hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common() powerpc/64s: Fix compiler store ordering to SLB shadow area RDMA/mad: Convert BUG_ONs to error flows disable loading f2fs module on PAGE_SIZE > 4KB f2fs: fix to don't trigger writeback during recovery usbip: usbip_detach: Fix memory, udev context and udev leak perf/x86/intel/uncore: Correct fixed counter index check in generic code perf/x86/intel/uncore: Correct fixed counter index check for NHM iwlwifi: pcie: fix race in Rx buffer allocator Bluetooth: hci_qca: Fix "Sleep inside atomic section" warning Bluetooth: btusb: Add a new Realtek 8723DE ID 2ff8:b011 ASoC: dpcm: fix BE dai not hw_free and shutdown mfd: cros_ec: Fail early if we cannot identify the EC mwifiex: handle race during mwifiex_usb_disconnect wlcore: sdio: check for valid platform device data before suspend media: videobuf2-core: don't call memop 'finish' when queueing btrfs: add barriers to btrfs_sync_log before log_commit_wait wakeups btrfs: qgroup: Finish rescan when hit the last leaf of extent tree PCI: Prevent sysfs disable of device while driver is attached ath: Add regulatory mapping for FCC3_ETSIC ath: Add regulatory mapping for ETSI8_WORLD ath: Add regulatory mapping for APL13_WORLD ath: Add regulatory mapping for APL2_FCCA ath: Add regulatory mapping for Uganda ath: Add regulatory mapping for Tanzania ath: Add regulatory mapping for Serbia ath: Add regulatory mapping for Bermuda ath: Add regulatory mapping for Bahamas powerpc/32: Add a missing include header powerpc/chrp/time: Make some functions static, add missing header include powerpc/powermac: Add missing prototype for note_bootable_part() powerpc/powermac: Mark variable x as unused powerpc/8xx: fix invalid register expression in head_8xx.S pinctrl: at91-pio4: add missing of_node_put PCI: pciehp: Request control of native hotplug only if supported mwifiex: correct histogram data with appropriate index scsi: ufs: fix exception event handling ALSA: emu10k1: Rate-limit error messages about page errors regulator: pfuze100: add .is_enable() for pfuze100_swb_regulator_ops md: fix NULL dereference of mddev->pers in remove_and_add_spares() media: smiapp: fix timeout checking in smiapp_read_nvm ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback HID: hid-plantronics: Re-resend Update to map button for PTT products drm/radeon: fix mode_valid's return type powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled by Starlet HID: i2c-hid: check if device is there before really probing tty: Fix data race in tty_insert_flip_string_fixed_flag dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open() libata: Fix command retry decision media: saa7164: Fix driver name in debug output mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages brcmfmac: Add support for bcm43364 wireless chipset s390/cpum_sf: Add data entry sizes to sampling trailer entry perf: fix invalid bit in diagnostic entry scsi: 3w-9xxx: fix a missing-check bug scsi: 3w-xxxx: fix a missing-check bug scsi: megaraid: silence a static checker bug thermal: exynos: fix setting rising_threshold for Exynos5433 bpf: fix references to free_bpf_prog_info() in comments media: siano: get rid of __le32/__le16 cast warnings drm/atomic: Handling the case when setting old crtc for plane ALSA: hda/ca0132: fix build failure when a local macro is defined memory: tegra: Do not handle spurious interrupts memory: tegra: Apply interrupts mask per SoC drm/gma500: fix psb_intel_lvds_mode_valid()'s return type ipconfig: Correctly initialise ic_nameservers rsi: Fix 'invalid vdd' warning in mmc audit: allow not equal op for audit by executable microblaze: Fix simpleImage format generation usb: hub: Don't wait for connect state at resume for powered-off ports crypto: authencesn - don't leak pointers to authenc keys crypto: authenc - don't leak pointers to authenc keys media: omap3isp: fix unbalanced dma_iommu_mapping scsi: scsi_dh: replace too broad "TP9" string with the exact models scsi: megaraid_sas: Increase timeout by 1 sec for non-RAID fastpath IOs media: si470x: fix __be16 annotations drm: Add DP PSR2 sink enable bit random: mix rdrand with entropy sent in from userspace squashfs: be more careful about metadata corruption ext4: fix inline data updates with checksums enabled ext4: check for allocation block validity with block group locked dmaengine: pxa_dma: remove duplicate const qualifier ASoC: pxa: Fix module autoload for platform drivers ipv4: remove BUG_ON() from fib_compute_spec_dst net: fix amd-xgbe flow-control issue net: lan78xx: fix rx handling before first packet is send xen-netfront: wait xenbus state change when load module manually NET: stmmac: align DMA stuff to largest cache line length tcp: do not force quickack when receiving out-of-order packets tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode tcp: do not aggressively quick ack after ECN events tcp: refactor tcp_ecn_check_ce to remove sk type cast tcp: add one more quick ack after after ECN events inet: frag: enforce memory limits earlier net: dsa: Do not suspend/resume closed slave_dev netlink: Fix spectre v1 gadget in netlink_create() squashfs: more metadata hardening squashfs: more metadata hardenings can: ems_usb: Fix memory leak on ems_usb_disconnect() net: socket: fix potential spectre v1 gadget in socketcall virtio_balloon: fix another race between migration and ballooning kvm: x86: vmx: fix vpid leak crypto: padlock-aes - Fix Nano workaround data corruption scsi: sg: fix minor memory leak in error path Linux 4.4.146 Change-Id: Ia7e43a90d0f5603c741811436b8de41884cb2851 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
1396226023
127 changed files with 515 additions and 207 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 145
|
||||
SUBLEVEL = 146
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -21,17 +21,19 @@ $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
|
|||
quiet_cmd_cp = CP $< $@$2
|
||||
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
|
||||
|
||||
quiet_cmd_strip = STRIP $@
|
||||
quiet_cmd_strip = STRIP $< $@$2
|
||||
cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
|
||||
-K _fdt_start vmlinux -o $@
|
||||
-K _fdt_start $< -o $@$2
|
||||
|
||||
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
|
||||
UIMAGE_IN = $@
|
||||
UIMAGE_OUT = $@.ub
|
||||
|
||||
$(obj)/simpleImage.%: vmlinux FORCE
|
||||
$(call if_changed,cp,.unstrip)
|
||||
$(call if_changed,objcopy)
|
||||
$(call if_changed,uimage)
|
||||
$(call if_changed,strip)
|
||||
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
|
||||
$(call if_changed,strip,.strip)
|
||||
@echo 'Kernel: $(UIMAGE_OUT) is ready' ' (#'`cat .version`')'
|
||||
|
||||
clean-files += simpleImage.*.unstrip linux.bin.ub dts/*.dtb
|
||||
|
|
|
@ -89,7 +89,7 @@ static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
|
|||
phys_addr_t size = resource_size(rsrc);
|
||||
|
||||
*start = fixup_bigphys_addr(rsrc->start, size);
|
||||
*end = rsrc->start + size;
|
||||
*end = rsrc->start + size - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -720,7 +720,7 @@ start_here:
|
|||
tovirt(r6,r6)
|
||||
lis r5, abatron_pteptrs@h
|
||||
ori r5, r5, abatron_pteptrs@l
|
||||
stw r5, 0xf0(r0) /* Must match your Abatron config file */
|
||||
stw r5, 0xf0(0) /* Must match your Abatron config file */
|
||||
tophys(r5,r5)
|
||||
stw r6, 0(r5)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/of.h>
|
||||
|
|
|
@ -69,14 +69,14 @@ static inline void slb_shadow_update(unsigned long ea, int ssize,
|
|||
* updating it. No write barriers are needed here, provided
|
||||
* we only update the current CPU's SLB shadow buffer.
|
||||
*/
|
||||
p->save_area[index].esid = 0;
|
||||
p->save_area[index].vsid = cpu_to_be64(mk_vsid_data(ea, ssize, flags));
|
||||
p->save_area[index].esid = cpu_to_be64(mk_esid_data(ea, ssize, index));
|
||||
WRITE_ONCE(p->save_area[index].esid, 0);
|
||||
WRITE_ONCE(p->save_area[index].vsid, cpu_to_be64(mk_vsid_data(ea, ssize, flags)));
|
||||
WRITE_ONCE(p->save_area[index].esid, cpu_to_be64(mk_esid_data(ea, ssize, index)));
|
||||
}
|
||||
|
||||
static inline void slb_shadow_clear(enum slb_index index)
|
||||
{
|
||||
get_slb_shadow()->save_area[index].esid = 0;
|
||||
WRITE_ONCE(get_slb_shadow()->save_area[index].esid, 0);
|
||||
}
|
||||
|
||||
static inline void create_shadowed_slbe(unsigned long ea, int ssize,
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <asm/sections.h>
|
||||
#include <asm/time.h>
|
||||
|
||||
#include <platforms/chrp/chrp.h>
|
||||
|
||||
extern spinlock_t rtc_lock;
|
||||
|
||||
#define NVRAM_AS0 0x74
|
||||
|
@ -62,7 +64,7 @@ long __init chrp_time_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int chrp_cmos_clock_read(int addr)
|
||||
static int chrp_cmos_clock_read(int addr)
|
||||
{
|
||||
if (nvram_as1 != 0)
|
||||
outb(addr>>8, nvram_as1);
|
||||
|
@ -70,7 +72,7 @@ int chrp_cmos_clock_read(int addr)
|
|||
return (inb(nvram_data));
|
||||
}
|
||||
|
||||
void chrp_cmos_clock_write(unsigned long val, int addr)
|
||||
static void chrp_cmos_clock_write(unsigned long val, int addr)
|
||||
{
|
||||
if (nvram_as1 != 0)
|
||||
outb(addr>>8, nvram_as1);
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
*/
|
||||
#define HW_BROADWAY_ICR 0x00
|
||||
#define HW_BROADWAY_IMR 0x04
|
||||
#define HW_STARLET_ICR 0x08
|
||||
#define HW_STARLET_IMR 0x0c
|
||||
|
||||
|
||||
/*
|
||||
|
@ -74,6 +76,9 @@ static void hlwd_pic_unmask(struct irq_data *d)
|
|||
void __iomem *io_base = irq_data_get_irq_chip_data(d);
|
||||
|
||||
setbits32(io_base + HW_BROADWAY_IMR, 1 << irq);
|
||||
|
||||
/* Make sure the ARM (aka. Starlet) doesn't handle this interrupt. */
|
||||
clrbits32(io_base + HW_STARLET_IMR, 1 << irq);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -467,7 +467,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
|||
boot_infos_t *bi = (boot_infos_t *) r4;
|
||||
unsigned long hdr;
|
||||
unsigned long space;
|
||||
unsigned long ptr, x;
|
||||
unsigned long ptr;
|
||||
char *model;
|
||||
unsigned long offset = reloc_offset();
|
||||
|
||||
|
@ -561,6 +561,8 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
|
|||
* MMU switched OFF, so this should not be useful anymore.
|
||||
*/
|
||||
if (bi->version < 4) {
|
||||
unsigned long x __maybe_unused;
|
||||
|
||||
bootx_printf("Touching pages...\n");
|
||||
|
||||
/*
|
||||
|
|
|
@ -359,6 +359,7 @@ static int pmac_late_init(void)
|
|||
}
|
||||
machine_late_initcall(powermac, pmac_late_init);
|
||||
|
||||
void note_bootable_part(dev_t dev, int part, int goodness);
|
||||
/*
|
||||
* This is __init_refok because we check for "initializing" before
|
||||
* touching any of the __init sensitive things and "initializing"
|
||||
|
|
|
@ -113,7 +113,7 @@ struct hws_basic_entry {
|
|||
|
||||
struct hws_diag_entry {
|
||||
unsigned int def:16; /* 0-15 Data Entry Format */
|
||||
unsigned int R:14; /* 16-19 and 20-30 reserved */
|
||||
unsigned int R:15; /* 16-19 and 20-30 reserved */
|
||||
unsigned int I:1; /* 31 entry valid or invalid */
|
||||
u8 data[]; /* Machine-dependent sample data */
|
||||
} __packed;
|
||||
|
@ -129,7 +129,9 @@ struct hws_trailer_entry {
|
|||
unsigned int f:1; /* 0 - Block Full Indicator */
|
||||
unsigned int a:1; /* 1 - Alert request control */
|
||||
unsigned int t:1; /* 2 - Timestamp format */
|
||||
unsigned long long:61; /* 3 - 63: Reserved */
|
||||
unsigned int :29; /* 3 - 31: Reserved */
|
||||
unsigned int bsdes:16; /* 32-47: size of basic SDE */
|
||||
unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */
|
||||
};
|
||||
unsigned long long flags; /* 0 - 63: All indicators */
|
||||
};
|
||||
|
|
|
@ -229,7 +229,7 @@ void uncore_perf_event_update(struct intel_uncore_box *box, struct perf_event *e
|
|||
u64 prev_count, new_count, delta;
|
||||
int shift;
|
||||
|
||||
if (event->hw.idx >= UNCORE_PMC_IDX_FIXED)
|
||||
if (event->hw.idx == UNCORE_PMC_IDX_FIXED)
|
||||
shift = 64 - uncore_fixed_ctr_bits(box);
|
||||
else
|
||||
shift = 64 - uncore_perf_ctr_bits(box);
|
||||
|
|
|
@ -240,7 +240,7 @@ static void nhmex_uncore_msr_enable_event(struct intel_uncore_box *box, struct p
|
|||
{
|
||||
struct hw_perf_event *hwc = &event->hw;
|
||||
|
||||
if (hwc->idx >= UNCORE_PMC_IDX_FIXED)
|
||||
if (hwc->idx == UNCORE_PMC_IDX_FIXED)
|
||||
wrmsrl(hwc->config_base, NHMEX_PMON_CTL_EN_BIT0);
|
||||
else if (box->pmu->type->event_mask & NHMEX_PMON_CTL_EN_BIT0)
|
||||
wrmsrl(hwc->config_base, hwc->config | NHMEX_PMON_CTL_EN_BIT22);
|
||||
|
|
|
@ -6843,6 +6843,8 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
|
|||
HRTIMER_MODE_REL);
|
||||
vmx->nested.preemption_timer.function = vmx_preemption_timer_fn;
|
||||
|
||||
vmx->nested.vpid02 = allocate_vpid();
|
||||
|
||||
vmx->nested.vmxon = true;
|
||||
|
||||
skip_emulated_instruction(vcpu);
|
||||
|
@ -8887,10 +8889,8 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
|
|||
goto free_vmcs;
|
||||
}
|
||||
|
||||
if (nested) {
|
||||
if (nested)
|
||||
nested_vmx_setup_ctls_msrs(vmx);
|
||||
vmx->nested.vpid02 = allocate_vpid();
|
||||
}
|
||||
|
||||
vmx->nested.posted_intr_nv = -1;
|
||||
vmx->nested.current_vmptr = -1ull;
|
||||
|
@ -8899,7 +8899,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
|
|||
return &vmx->vcpu;
|
||||
|
||||
free_vmcs:
|
||||
free_vpid(vmx->nested.vpid02);
|
||||
free_loaded_vmcs(vmx->loaded_vmcs);
|
||||
free_msrs:
|
||||
kfree(vmx->guest_msrs);
|
||||
|
|
|
@ -108,6 +108,7 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
|
|||
CRYPTO_TFM_RES_MASK);
|
||||
|
||||
out:
|
||||
memzero_explicit(&keys, sizeof(keys));
|
||||
return err;
|
||||
|
||||
badkey:
|
||||
|
|
|
@ -90,6 +90,7 @@ static int crypto_authenc_esn_setkey(struct crypto_aead *authenc_esn, const u8 *
|
|||
CRYPTO_TFM_RES_MASK);
|
||||
|
||||
out:
|
||||
memzero_explicit(&keys, sizeof(keys));
|
||||
return err;
|
||||
|
||||
badkey:
|
||||
|
|
|
@ -472,9 +472,11 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
|
|||
}
|
||||
|
||||
control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL
|
||||
| OSC_PCI_EXPRESS_NATIVE_HP_CONTROL
|
||||
| OSC_PCI_EXPRESS_PME_CONTROL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
|
||||
control |= OSC_PCI_EXPRESS_NATIVE_HP_CONTROL;
|
||||
|
||||
if (pci_aer_available()) {
|
||||
if (aer_acpi_firmware_first())
|
||||
dev_info(&device->dev,
|
||||
|
|
|
@ -2198,12 +2198,16 @@ static void ata_eh_link_autopsy(struct ata_link *link)
|
|||
if (qc->err_mask & ~AC_ERR_OTHER)
|
||||
qc->err_mask &= ~AC_ERR_OTHER;
|
||||
|
||||
/* SENSE_VALID trumps dev/unknown error and revalidation */
|
||||
/*
|
||||
* SENSE_VALID trumps dev/unknown error and revalidation. Upper
|
||||
* layers will determine whether the command is worth retrying
|
||||
* based on the sense data and device class/type. Otherwise,
|
||||
* determine directly if the command is worth retrying using its
|
||||
* error mask and flags.
|
||||
*/
|
||||
if (qc->flags & ATA_QCFLAG_SENSE_VALID)
|
||||
qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
|
||||
|
||||
/* determine whether the command is worth retrying */
|
||||
if (ata_eh_worth_retry(qc))
|
||||
else if (ata_eh_worth_retry(qc))
|
||||
qc->flags |= ATA_QCFLAG_RETRY;
|
||||
|
||||
/* accumulate error info */
|
||||
|
|
|
@ -339,6 +339,9 @@ static const struct usb_device_id blacklist_table[] = {
|
|||
/* Additional Realtek 8723BU Bluetooth devices */
|
||||
{ USB_DEVICE(0x7392, 0xa611), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8723DE Bluetooth devices */
|
||||
{ USB_DEVICE(0x2ff8, 0xb011), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8821AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK },
|
||||
{ USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
|
||||
|
|
|
@ -884,7 +884,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
|
|||
*/
|
||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||
schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS));
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
set_current_state(TASK_RUNNING);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1503,14 +1503,22 @@ static int
|
|||
write_pool(struct entropy_store *r, const char __user *buffer, size_t count)
|
||||
{
|
||||
size_t bytes;
|
||||
__u32 buf[16];
|
||||
__u32 t, buf[16];
|
||||
const char __user *p = buffer;
|
||||
|
||||
while (count > 0) {
|
||||
int b, i = 0;
|
||||
|
||||
bytes = min(count, sizeof(buf));
|
||||
if (copy_from_user(&buf, p, bytes))
|
||||
return -EFAULT;
|
||||
|
||||
for (b = bytes ; b > 0 ; b -= sizeof(__u32), i++) {
|
||||
if (!arch_get_random_int(&t))
|
||||
break;
|
||||
buf[i] ^= t;
|
||||
}
|
||||
|
||||
count -= bytes;
|
||||
p += bytes;
|
||||
|
||||
|
|
|
@ -266,6 +266,8 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
|
|||
return;
|
||||
}
|
||||
|
||||
count -= initial;
|
||||
|
||||
if (initial)
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
|
||||
: "+S"(input), "+D"(output)
|
||||
|
@ -273,7 +275,7 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
|
|||
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
|
||||
: "+S"(input), "+D"(output)
|
||||
: "d"(control_word), "b"(key), "c"(count - initial));
|
||||
: "d"(control_word), "b"(key), "c"(count));
|
||||
}
|
||||
|
||||
static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
||||
|
@ -284,6 +286,8 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
|||
if (count < cbc_fetch_blocks)
|
||||
return cbc_crypt(input, output, key, iv, control_word, count);
|
||||
|
||||
count -= initial;
|
||||
|
||||
if (initial)
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
|
||||
: "+S" (input), "+D" (output), "+a" (iv)
|
||||
|
@ -291,7 +295,7 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
|
|||
|
||||
asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
|
||||
: "+S" (input), "+D" (output), "+a" (iv)
|
||||
: "d" (control_word), "b" (key), "c" (count-initial));
|
||||
: "d" (control_word), "b" (key), "c" (count));
|
||||
return iv;
|
||||
}
|
||||
|
||||
|
|
|
@ -1321,7 +1321,7 @@ static int pxad_init_phys(struct platform_device *op,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id const pxad_dt_ids[] = {
|
||||
static const struct of_device_id pxad_dt_ids[] = {
|
||||
{ .compatible = "marvell,pdma-1.0", },
|
||||
{}
|
||||
};
|
||||
|
|
|
@ -960,7 +960,9 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
|
|||
{
|
||||
struct drm_plane *plane = plane_state->plane;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
|
||||
/* Nothing to do for same crtc*/
|
||||
if (plane_state->crtc == crtc)
|
||||
return 0;
|
||||
if (plane_state->crtc) {
|
||||
crtc_state = drm_atomic_get_crtc_state(plane_state->state,
|
||||
plane_state->crtc);
|
||||
|
|
|
@ -252,7 +252,7 @@ extern int intelfb_remove(struct drm_device *dev,
|
|||
extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode,
|
||||
struct drm_display_mode *adjusted_mode);
|
||||
extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
extern enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode);
|
||||
extern int psb_intel_lvds_set_property(struct drm_connector *connector,
|
||||
struct drm_property *property,
|
||||
|
|
|
@ -343,7 +343,7 @@ static void psb_intel_lvds_restore(struct drm_connector *connector)
|
|||
}
|
||||
}
|
||||
|
||||
int psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = connector->dev->dev_private;
|
||||
|
|
|
@ -844,7 +844,7 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int radeon_lvds_mode_valid(struct drm_connector *connector,
|
||||
static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
|
||||
|
@ -993,7 +993,7 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int radeon_vga_mode_valid(struct drm_connector *connector,
|
||||
static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
|
@ -1136,7 +1136,7 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int radeon_tv_mode_valid(struct drm_connector *connector,
|
||||
static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
if ((mode->hdisplay > 1024) || (mode->vdisplay > 768))
|
||||
|
@ -1477,7 +1477,7 @@ static void radeon_dvi_force(struct drm_connector *connector)
|
|||
radeon_connector->use_digital = true;
|
||||
}
|
||||
|
||||
static int radeon_dvi_mode_valid(struct drm_connector *connector,
|
||||
static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
|
@ -1778,7 +1778,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int radeon_dp_mode_valid(struct drm_connector *connector,
|
||||
static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Plantronics USB HID Driver
|
||||
*
|
||||
* Copyright (c) 2014 JD Cole <jd.cole@plantronics.com>
|
||||
* Copyright (c) 2015 Terry Junge <terry.junge@plantronics.com>
|
||||
* Copyright (c) 2015-2018 Terry Junge <terry.junge@plantronics.com>
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -48,6 +48,10 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
|||
unsigned short mapped_key;
|
||||
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev);
|
||||
|
||||
/* special case for PTT products */
|
||||
if (field->application == HID_GD_JOYSTICK)
|
||||
goto defaulted;
|
||||
|
||||
/* handle volume up/down mapping */
|
||||
/* non-standard types or multi-HID interfaces - plt_type is PID */
|
||||
if (!(plt_type & HID_USAGE_PAGE)) {
|
||||
|
|
|
@ -1017,6 +1017,14 @@ static int i2c_hid_probe(struct i2c_client *client,
|
|||
pm_runtime_set_active(&client->dev);
|
||||
pm_runtime_enable(&client->dev);
|
||||
|
||||
/* Make sure there is something at this address */
|
||||
ret = i2c_smbus_read_byte(client);
|
||||
if (ret < 0) {
|
||||
dev_dbg(&client->dev, "nothing at this address: %d\n", ret);
|
||||
ret = -ENXIO;
|
||||
goto err_pm;
|
||||
}
|
||||
|
||||
ret = i2c_hid_fetch_hid_descriptor(ihid);
|
||||
if (ret < 0)
|
||||
goto err_pm;
|
||||
|
|
|
@ -1548,7 +1548,8 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
|
|||
mad_reg_req->oui, 3)) {
|
||||
method = &(*vendor_table)->vendor_class[
|
||||
vclass]->method_table[i];
|
||||
BUG_ON(!*method);
|
||||
if (!*method)
|
||||
goto error3;
|
||||
goto check_in_use;
|
||||
}
|
||||
}
|
||||
|
@ -1558,10 +1559,12 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
|
|||
vclass]->oui[i])) {
|
||||
method = &(*vendor_table)->vendor_class[
|
||||
vclass]->method_table[i];
|
||||
BUG_ON(*method);
|
||||
/* Allocate method table for this OUI */
|
||||
if ((ret = allocate_method_table(method)))
|
||||
goto error3;
|
||||
if (!*method) {
|
||||
ret = allocate_method_table(method);
|
||||
if (ret)
|
||||
goto error3;
|
||||
}
|
||||
memcpy((*vendor_table)->vendor_class[vclass]->oui[i],
|
||||
mad_reg_req->oui, 3);
|
||||
goto check_in_use;
|
||||
|
|
|
@ -217,7 +217,7 @@ static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx)
|
|||
return NULL;
|
||||
|
||||
mutex_lock(&mut);
|
||||
mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL);
|
||||
mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL);
|
||||
mutex_unlock(&mut);
|
||||
if (mc->id < 0)
|
||||
goto error;
|
||||
|
@ -1375,6 +1375,10 @@ static ssize_t ucma_process_join(struct ucma_file *file,
|
|||
goto err3;
|
||||
}
|
||||
|
||||
mutex_lock(&mut);
|
||||
idr_replace(&multicast_idr, mc, mc->id);
|
||||
mutex_unlock(&mut);
|
||||
|
||||
mutex_unlock(&file->mut);
|
||||
ucma_put_ctx(ctx);
|
||||
return 0;
|
||||
|
|
|
@ -1251,6 +1251,8 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
|||
{ "ELAN0611", 0 },
|
||||
{ "ELAN0612", 0 },
|
||||
{ "ELAN0618", 0 },
|
||||
{ "ELAN061D", 0 },
|
||||
{ "ELAN0622", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
};
|
||||
|
|
|
@ -527,6 +527,13 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Lenovo LaVie Z */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -6145,6 +6145,9 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
|
|||
struct md_rdev *rdev;
|
||||
int ret = -1;
|
||||
|
||||
if (!mddev->pers)
|
||||
return -ENODEV;
|
||||
|
||||
rdev = find_rdev(mddev, dev);
|
||||
if (!rdev)
|
||||
return -ENXIO;
|
||||
|
|
|
@ -35,7 +35,7 @@ void smsendian_handle_tx_message(void *buffer)
|
|||
switch (msg->x_msg_header.msg_type) {
|
||||
case MSG_SMS_DATA_DOWNLOAD_REQ:
|
||||
{
|
||||
msg->msg_data[0] = le32_to_cpu(msg->msg_data[0]);
|
||||
msg->msg_data[0] = le32_to_cpu((__force __le32)(msg->msg_data[0]));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void smsendian_handle_tx_message(void *buffer)
|
|||
sizeof(struct sms_msg_hdr))/4;
|
||||
|
||||
for (i = 0; i < msg_words; i++)
|
||||
msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
|
||||
msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void smsendian_handle_rx_message(void *buffer)
|
|||
{
|
||||
struct sms_version_res *ver =
|
||||
(struct sms_version_res *) msg;
|
||||
ver->chip_model = le16_to_cpu(ver->chip_model);
|
||||
ver->chip_model = le16_to_cpu((__force __le16)ver->chip_model);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ void smsendian_handle_rx_message(void *buffer)
|
|||
sizeof(struct sms_msg_hdr))/4;
|
||||
|
||||
for (i = 0; i < msg_words; i++)
|
||||
msg->msg_data[i] = le32_to_cpu(msg->msg_data[i]);
|
||||
msg->msg_data[i] = le32_to_cpu((__force __le32)msg->msg_data[i]);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -95,9 +95,9 @@ void smsendian_handle_message_header(void *msg)
|
|||
#ifdef __BIG_ENDIAN
|
||||
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
|
||||
|
||||
phdr->msg_type = le16_to_cpu(phdr->msg_type);
|
||||
phdr->msg_length = le16_to_cpu(phdr->msg_length);
|
||||
phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
|
||||
phdr->msg_type = le16_to_cpu((__force __le16)phdr->msg_type);
|
||||
phdr->msg_length = le16_to_cpu((__force __le16)phdr->msg_length);
|
||||
phdr->msg_flags = le16_to_cpu((__force __le16)phdr->msg_flags);
|
||||
#endif /* __BIG_ENDIAN */
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
|
||||
|
|
|
@ -981,7 +981,7 @@ static int smiapp_read_nvm(struct smiapp_sensor *sensor,
|
|||
if (rval)
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < 1000; i++) {
|
||||
for (i = 1000; i > 0; i--) {
|
||||
rval = smiapp_read(
|
||||
sensor,
|
||||
SMIAPP_REG_U8_DATA_TRANSFER_IF_1_STATUS, &s);
|
||||
|
@ -992,11 +992,10 @@ static int smiapp_read_nvm(struct smiapp_sensor *sensor,
|
|||
if (s & SMIAPP_DATA_TRANSFER_IF_1_STATUS_RD_READY)
|
||||
break;
|
||||
|
||||
if (--i == 0) {
|
||||
rval = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
}
|
||||
if (!i) {
|
||||
rval = -ETIMEDOUT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < SMIAPP_NVM_PAGE_SIZE; i++) {
|
||||
|
|
|
@ -430,7 +430,8 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev)
|
|||
__func__, fw->size);
|
||||
|
||||
if (fw->size != fwlength) {
|
||||
printk(KERN_ERR "xc5000: firmware incorrect size\n");
|
||||
printk(KERN_ERR "saa7164: firmware incorrect size %zu != %u\n",
|
||||
fw->size, fwlength);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -2077,6 +2077,7 @@ error_csiphy:
|
|||
|
||||
static void isp_detach_iommu(struct isp_device *isp)
|
||||
{
|
||||
arm_iommu_detach_device(isp->dev);
|
||||
arm_iommu_release_mapping(isp->mapping);
|
||||
isp->mapping = NULL;
|
||||
iommu_group_remove_device(isp->dev);
|
||||
|
@ -2110,8 +2111,7 @@ static int isp_attach_iommu(struct isp_device *isp)
|
|||
mapping = arm_iommu_create_mapping(&platform_bus_type, SZ_1G, SZ_2G);
|
||||
if (IS_ERR(mapping)) {
|
||||
dev_err(isp->dev, "failed to create ARM IOMMU mapping\n");
|
||||
ret = PTR_ERR(mapping);
|
||||
goto error;
|
||||
return PTR_ERR(mapping);
|
||||
}
|
||||
|
||||
isp->mapping = mapping;
|
||||
|
@ -2126,7 +2126,8 @@ static int isp_attach_iommu(struct isp_device *isp)
|
|||
return 0;
|
||||
|
||||
error:
|
||||
isp_detach_iommu(isp);
|
||||
arm_iommu_release_mapping(isp->mapping);
|
||||
isp->mapping = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1278,7 +1278,7 @@ static int jpu_open(struct file *file)
|
|||
/* ...issue software reset */
|
||||
ret = jpu_reset(jpu);
|
||||
if (ret)
|
||||
goto device_prepare_rollback;
|
||||
goto jpu_reset_rollback;
|
||||
}
|
||||
|
||||
jpu->ref_count++;
|
||||
|
@ -1286,6 +1286,8 @@ static int jpu_open(struct file *file)
|
|||
mutex_unlock(&jpu->mutex);
|
||||
return 0;
|
||||
|
||||
jpu_reset_rollback:
|
||||
clk_disable_unprepare(jpu->clk);
|
||||
device_prepare_rollback:
|
||||
mutex_unlock(&jpu->mutex);
|
||||
v4l_prepare_rollback:
|
||||
|
|
|
@ -96,7 +96,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
|
|||
*/
|
||||
int si470x_get_register(struct si470x_device *radio, int regnr)
|
||||
{
|
||||
u16 buf[READ_REG_NUM];
|
||||
__be16 buf[READ_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
|
@ -121,7 +121,7 @@ int si470x_get_register(struct si470x_device *radio, int regnr)
|
|||
int si470x_set_register(struct si470x_device *radio, int regnr)
|
||||
{
|
||||
int i;
|
||||
u16 buf[WRITE_REG_NUM];
|
||||
__be16 buf[WRITE_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
|
@ -151,7 +151,7 @@ int si470x_set_register(struct si470x_device *radio, int regnr)
|
|||
static int si470x_get_all_registers(struct si470x_device *radio)
|
||||
{
|
||||
int i;
|
||||
u16 buf[READ_REG_NUM];
|
||||
__be16 buf[READ_REG_NUM];
|
||||
struct i2c_msg msgs[1] = {
|
||||
{
|
||||
.addr = radio->client->addr,
|
||||
|
|
|
@ -870,9 +870,12 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
|
|||
dprintk(4, "done processing on buffer %d, state: %d\n",
|
||||
vb->index, state);
|
||||
|
||||
/* sync buffers */
|
||||
for (plane = 0; plane < vb->num_planes; ++plane)
|
||||
call_void_memop(vb, finish, vb->planes[plane].mem_priv);
|
||||
if (state != VB2_BUF_STATE_QUEUED &&
|
||||
state != VB2_BUF_STATE_REQUEUEING) {
|
||||
/* sync buffers */
|
||||
for (plane = 0; plane < vb->num_planes; ++plane)
|
||||
call_void_memop(vb, finish, vb->planes[plane].mem_priv);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&q->done_lock, flags);
|
||||
if (state == VB2_BUF_STATE_QUEUED ||
|
||||
|
|
|
@ -20,14 +20,6 @@
|
|||
#include "mc.h"
|
||||
|
||||
#define MC_INTSTATUS 0x000
|
||||
#define MC_INT_DECERR_MTS (1 << 16)
|
||||
#define MC_INT_SECERR_SEC (1 << 13)
|
||||
#define MC_INT_DECERR_VPR (1 << 12)
|
||||
#define MC_INT_INVALID_APB_ASID_UPDATE (1 << 11)
|
||||
#define MC_INT_INVALID_SMMU_PAGE (1 << 10)
|
||||
#define MC_INT_ARBITRATION_EMEM (1 << 9)
|
||||
#define MC_INT_SECURITY_VIOLATION (1 << 8)
|
||||
#define MC_INT_DECERR_EMEM (1 << 6)
|
||||
|
||||
#define MC_INTMASK 0x004
|
||||
|
||||
|
@ -248,12 +240,13 @@ static const char *const error_names[8] = {
|
|||
static irqreturn_t tegra_mc_irq(int irq, void *data)
|
||||
{
|
||||
struct tegra_mc *mc = data;
|
||||
unsigned long status, mask;
|
||||
unsigned long status;
|
||||
unsigned int bit;
|
||||
|
||||
/* mask all interrupts to avoid flooding */
|
||||
status = mc_readl(mc, MC_INTSTATUS);
|
||||
mask = mc_readl(mc, MC_INTMASK);
|
||||
status = mc_readl(mc, MC_INTSTATUS) & mc->soc->intmask;
|
||||
if (!status)
|
||||
return IRQ_NONE;
|
||||
|
||||
for_each_set_bit(bit, &status, 32) {
|
||||
const char *error = status_names[bit] ?: "unknown";
|
||||
|
@ -346,7 +339,6 @@ static int tegra_mc_probe(struct platform_device *pdev)
|
|||
const struct of_device_id *match;
|
||||
struct resource *res;
|
||||
struct tegra_mc *mc;
|
||||
u32 value;
|
||||
int err;
|
||||
|
||||
match = of_match_node(tegra_mc_of_match, pdev->dev.of_node);
|
||||
|
@ -414,11 +406,7 @@ static int tegra_mc_probe(struct platform_device *pdev)
|
|||
|
||||
WARN(!mc->soc->client_id_mask, "Missing client ID mask for this SoC\n");
|
||||
|
||||
value = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM;
|
||||
|
||||
mc_writel(mc, value, MC_INTMASK);
|
||||
mc_writel(mc, mc->soc->intmask, MC_INTMASK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
|
||||
#include <soc/tegra/mc.h>
|
||||
|
||||
#define MC_INT_DECERR_MTS (1 << 16)
|
||||
#define MC_INT_SECERR_SEC (1 << 13)
|
||||
#define MC_INT_DECERR_VPR (1 << 12)
|
||||
#define MC_INT_INVALID_APB_ASID_UPDATE (1 << 11)
|
||||
#define MC_INT_INVALID_SMMU_PAGE (1 << 10)
|
||||
#define MC_INT_ARBITRATION_EMEM (1 << 9)
|
||||
#define MC_INT_SECURITY_VIOLATION (1 << 8)
|
||||
#define MC_INT_DECERR_EMEM (1 << 6)
|
||||
|
||||
static inline u32 mc_readl(struct tegra_mc *mc, unsigned long offset)
|
||||
{
|
||||
return readl(mc->regs + offset);
|
||||
|
|
|
@ -930,4 +930,6 @@ const struct tegra_mc_soc tegra114_mc_soc = {
|
|||
.atom_size = 32,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra114_smmu_soc,
|
||||
.intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
|
||||
MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
|
|
@ -1019,6 +1019,9 @@ const struct tegra_mc_soc tegra124_mc_soc = {
|
|||
.smmu = &tegra124_smmu_soc,
|
||||
.emem_regs = tegra124_mc_emem_regs,
|
||||
.num_emem_regs = ARRAY_SIZE(tegra124_mc_emem_regs),
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
#endif /* CONFIG_ARCH_TEGRA_124_SOC */
|
||||
|
||||
|
@ -1041,5 +1044,8 @@ const struct tegra_mc_soc tegra132_mc_soc = {
|
|||
.atom_size = 32,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra132_smmu_soc,
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
#endif /* CONFIG_ARCH_TEGRA_132_SOC */
|
||||
|
|
|
@ -1077,4 +1077,7 @@ const struct tegra_mc_soc tegra210_mc_soc = {
|
|||
.atom_size = 64,
|
||||
.client_id_mask = 0xff,
|
||||
.smmu = &tegra210_smmu_soc,
|
||||
.intmask = MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
|
||||
MC_INT_INVALID_APB_ASID_UPDATE | MC_INT_INVALID_SMMU_PAGE |
|
||||
MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
|
|
@ -952,4 +952,6 @@ const struct tegra_mc_soc tegra30_mc_soc = {
|
|||
.atom_size = 16,
|
||||
.client_id_mask = 0x7f,
|
||||
.smmu = &tegra30_smmu_soc,
|
||||
.intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
|
||||
MC_INT_DECERR_EMEM,
|
||||
};
|
||||
|
|
|
@ -68,7 +68,11 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
|
|||
|
||||
mutex_init(&ec_dev->lock);
|
||||
|
||||
cros_ec_query_all(ec_dev);
|
||||
err = cros_ec_query_all(ec_dev);
|
||||
if (err) {
|
||||
dev_err(dev, "Cannot identify the EC: error %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = mfd_add_devices(ec_dev->dev, PLATFORM_DEVID_AUTO, &ec_cell, 1,
|
||||
NULL, ec_dev->irq, NULL);
|
||||
|
|
|
@ -449,9 +449,16 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
|
|||
|
||||
case NAND_CMD_READID:
|
||||
case NAND_CMD_PARAM: {
|
||||
/*
|
||||
* For READID, read 8 bytes that are currently used.
|
||||
* For PARAM, read all 3 copies of 256-bytes pages.
|
||||
*/
|
||||
int len = 8;
|
||||
int timing = IFC_FIR_OP_RB;
|
||||
if (command == NAND_CMD_PARAM)
|
||||
if (command == NAND_CMD_PARAM) {
|
||||
timing = IFC_FIR_OP_RBCD;
|
||||
len = 256 * 3;
|
||||
}
|
||||
|
||||
ifc_out32((IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) |
|
||||
(IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) |
|
||||
|
@ -461,12 +468,8 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
|
|||
&ifc->ifc_nand.nand_fcr0);
|
||||
ifc_out32(column, &ifc->ifc_nand.row3);
|
||||
|
||||
/*
|
||||
* although currently it's 8 bytes for READID, we always read
|
||||
* the maximum 256 bytes(for PARAM)
|
||||
*/
|
||||
ifc_out32(256, &ifc->ifc_nand.nand_fbcr);
|
||||
ifc_nand_ctrl->read_bytes = 256;
|
||||
ifc_out32(len, &ifc->ifc_nand.nand_fbcr);
|
||||
ifc_nand_ctrl->read_bytes = len;
|
||||
|
||||
set_addr(mtd, 0, 0, 0);
|
||||
fsl_ifc_run_command(mtd);
|
||||
|
|
|
@ -1078,6 +1078,7 @@ static void ems_usb_disconnect(struct usb_interface *intf)
|
|||
usb_free_urb(dev->intr_urb);
|
||||
|
||||
kfree(dev->intr_in_buffer);
|
||||
kfree(dev->tx_msg_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -872,14 +872,14 @@ static void xgbe_phy_adjust_link(struct xgbe_prv_data *pdata)
|
|||
|
||||
if (pdata->tx_pause != pdata->phy.tx_pause) {
|
||||
new_state = 1;
|
||||
pdata->hw_if.config_tx_flow_control(pdata);
|
||||
pdata->tx_pause = pdata->phy.tx_pause;
|
||||
pdata->hw_if.config_tx_flow_control(pdata);
|
||||
}
|
||||
|
||||
if (pdata->rx_pause != pdata->phy.rx_pause) {
|
||||
new_state = 1;
|
||||
pdata->hw_if.config_rx_flow_control(pdata);
|
||||
pdata->rx_pause = pdata->phy.rx_pause;
|
||||
pdata->hw_if.config_rx_flow_control(pdata);
|
||||
}
|
||||
|
||||
/* Speed support */
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include <linux/reset.h>
|
||||
#include <linux/of_mdio.h>
|
||||
|
||||
#define STMMAC_ALIGN(x) L1_CACHE_ALIGN(x)
|
||||
#define STMMAC_ALIGN(x) __ALIGN_KERNEL(x, SMP_CACHE_BYTES)
|
||||
|
||||
/* Module parameters */
|
||||
#define TX_TIMEO 5000
|
||||
|
|
|
@ -1361,6 +1361,8 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
|||
netif_dbg(dev, ifup, dev->net,
|
||||
"MAC address set to random addr");
|
||||
}
|
||||
|
||||
tasklet_schedule(&dev->bh);
|
||||
}
|
||||
|
||||
ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo);
|
||||
|
|
|
@ -68,12 +68,14 @@ enum CountryCode {
|
|||
CTRY_AUSTRALIA = 36,
|
||||
CTRY_AUSTRIA = 40,
|
||||
CTRY_AZERBAIJAN = 31,
|
||||
CTRY_BAHAMAS = 44,
|
||||
CTRY_BAHRAIN = 48,
|
||||
CTRY_BANGLADESH = 50,
|
||||
CTRY_BARBADOS = 52,
|
||||
CTRY_BELARUS = 112,
|
||||
CTRY_BELGIUM = 56,
|
||||
CTRY_BELIZE = 84,
|
||||
CTRY_BERMUDA = 60,
|
||||
CTRY_BOLIVIA = 68,
|
||||
CTRY_BOSNIA_HERZ = 70,
|
||||
CTRY_BRAZIL = 76,
|
||||
|
@ -159,6 +161,7 @@ enum CountryCode {
|
|||
CTRY_ROMANIA = 642,
|
||||
CTRY_RUSSIA = 643,
|
||||
CTRY_SAUDI_ARABIA = 682,
|
||||
CTRY_SERBIA = 688,
|
||||
CTRY_SERBIA_MONTENEGRO = 891,
|
||||
CTRY_SINGAPORE = 702,
|
||||
CTRY_SLOVAKIA = 703,
|
||||
|
@ -170,11 +173,13 @@ enum CountryCode {
|
|||
CTRY_SWITZERLAND = 756,
|
||||
CTRY_SYRIA = 760,
|
||||
CTRY_TAIWAN = 158,
|
||||
CTRY_TANZANIA = 834,
|
||||
CTRY_THAILAND = 764,
|
||||
CTRY_TRINIDAD_Y_TOBAGO = 780,
|
||||
CTRY_TUNISIA = 788,
|
||||
CTRY_TURKEY = 792,
|
||||
CTRY_UAE = 784,
|
||||
CTRY_UGANDA = 800,
|
||||
CTRY_UKRAINE = 804,
|
||||
CTRY_UNITED_KINGDOM = 826,
|
||||
CTRY_UNITED_STATES = 840,
|
||||
|
|
|
@ -35,6 +35,7 @@ enum EnumRd {
|
|||
FRANCE_RES = 0x31,
|
||||
FCC3_FCCA = 0x3A,
|
||||
FCC3_WORLD = 0x3B,
|
||||
FCC3_ETSIC = 0x3F,
|
||||
|
||||
ETSI1_WORLD = 0x37,
|
||||
ETSI3_ETSIA = 0x32,
|
||||
|
@ -44,6 +45,7 @@ enum EnumRd {
|
|||
ETSI4_ETSIC = 0x38,
|
||||
ETSI5_WORLD = 0x39,
|
||||
ETSI6_WORLD = 0x34,
|
||||
ETSI8_WORLD = 0x3D,
|
||||
ETSI_RESERVED = 0x33,
|
||||
|
||||
MKK1_MKKA = 0x40,
|
||||
|
@ -59,6 +61,7 @@ enum EnumRd {
|
|||
MKK1_MKKA1 = 0x4A,
|
||||
MKK1_MKKA2 = 0x4B,
|
||||
MKK1_MKKC = 0x4C,
|
||||
APL2_FCCA = 0x4D,
|
||||
|
||||
APL3_FCCA = 0x50,
|
||||
APL1_WORLD = 0x52,
|
||||
|
@ -67,6 +70,7 @@ enum EnumRd {
|
|||
APL1_ETSIC = 0x55,
|
||||
APL2_ETSIC = 0x56,
|
||||
APL5_WORLD = 0x58,
|
||||
APL13_WORLD = 0x5A,
|
||||
APL6_WORLD = 0x5B,
|
||||
APL7_FCCA = 0x5C,
|
||||
APL8_WORLD = 0x5D,
|
||||
|
@ -168,6 +172,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
|||
{FCC2_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_FCCA, CTL_FCC, CTL_FCC},
|
||||
{FCC3_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{FCC3_ETSIC, CTL_FCC, CTL_ETSI},
|
||||
{FCC4_FCCA, CTL_FCC, CTL_FCC},
|
||||
{FCC5_FCCA, CTL_FCC, CTL_FCC},
|
||||
{FCC6_FCCA, CTL_FCC, CTL_FCC},
|
||||
|
@ -179,6 +184,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
|||
{ETSI4_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{ETSI5_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{ETSI6_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{ETSI8_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
|
||||
/* XXX: For ETSI3_ETSIA, Was NO_CTL meant for the 2 GHz band ? */
|
||||
{ETSI3_ETSIA, CTL_ETSI, CTL_ETSI},
|
||||
|
@ -188,9 +194,11 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
|
|||
{FCC1_FCCA, CTL_FCC, CTL_FCC},
|
||||
{APL1_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{APL2_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{APL2_FCCA, CTL_FCC, CTL_FCC},
|
||||
{APL3_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{APL4_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{APL5_WORLD, CTL_FCC, CTL_ETSI},
|
||||
{APL13_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{APL6_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{APL8_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
{APL9_WORLD, CTL_ETSI, CTL_ETSI},
|
||||
|
@ -298,6 +306,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
|||
{CTRY_AUSTRALIA2, FCC6_WORLD, "AU"},
|
||||
{CTRY_AUSTRIA, ETSI1_WORLD, "AT"},
|
||||
{CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"},
|
||||
{CTRY_BAHAMAS, FCC3_WORLD, "BS"},
|
||||
{CTRY_BAHRAIN, APL6_WORLD, "BH"},
|
||||
{CTRY_BANGLADESH, NULL1_WORLD, "BD"},
|
||||
{CTRY_BARBADOS, FCC2_WORLD, "BB"},
|
||||
|
@ -305,6 +314,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
|||
{CTRY_BELGIUM, ETSI1_WORLD, "BE"},
|
||||
{CTRY_BELGIUM2, ETSI4_WORLD, "BL"},
|
||||
{CTRY_BELIZE, APL1_ETSIC, "BZ"},
|
||||
{CTRY_BERMUDA, FCC3_FCCA, "BM"},
|
||||
{CTRY_BOLIVIA, APL1_ETSIC, "BO"},
|
||||
{CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"},
|
||||
{CTRY_BRAZIL, FCC3_WORLD, "BR"},
|
||||
|
@ -444,6 +454,7 @@ static struct country_code_to_enum_rd allCountries[] = {
|
|||
{CTRY_ROMANIA, NULL1_WORLD, "RO"},
|
||||
{CTRY_RUSSIA, NULL1_WORLD, "RU"},
|
||||
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
|
||||
{CTRY_SERBIA, ETSI1_WORLD, "RS"},
|
||||
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},
|
||||
{CTRY_SINGAPORE, APL6_WORLD, "SG"},
|
||||
{CTRY_SLOVAKIA, ETSI1_WORLD, "SK"},
|
||||
|
@ -455,10 +466,12 @@ static struct country_code_to_enum_rd allCountries[] = {
|
|||
{CTRY_SWITZERLAND, ETSI1_WORLD, "CH"},
|
||||
{CTRY_SYRIA, NULL1_WORLD, "SY"},
|
||||
{CTRY_TAIWAN, APL3_FCCA, "TW"},
|
||||
{CTRY_TANZANIA, APL1_WORLD, "TZ"},
|
||||
{CTRY_THAILAND, FCC3_WORLD, "TH"},
|
||||
{CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"},
|
||||
{CTRY_TUNISIA, ETSI3_WORLD, "TN"},
|
||||
{CTRY_TURKEY, ETSI3_WORLD, "TR"},
|
||||
{CTRY_UGANDA, FCC3_WORLD, "UG"},
|
||||
{CTRY_UKRAINE, NULL1_WORLD, "UA"},
|
||||
{CTRY_UAE, NULL1_WORLD, "AE"},
|
||||
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
|
||||
|
|
|
@ -1109,6 +1109,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = {
|
|||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43340),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43341),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43362),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43364),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4335_4339),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43430),
|
||||
BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4345),
|
||||
|
|
|
@ -713,6 +713,8 @@ int iwl_pcie_rx_init(struct iwl_trans *trans)
|
|||
WQ_HIGHPRI | WQ_UNBOUND, 1);
|
||||
INIT_WORK(&rba->rx_alloc, iwl_pcie_rx_allocator_work);
|
||||
|
||||
cancel_work_sync(&rba->rx_alloc);
|
||||
|
||||
spin_lock(&rba->lock);
|
||||
atomic_set(&rba->req_pending, 0);
|
||||
atomic_set(&rba->req_ready, 0);
|
||||
|
|
|
@ -624,6 +624,9 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf)
|
|||
MWIFIEX_FUNC_SHUTDOWN);
|
||||
}
|
||||
|
||||
if (adapter->workqueue)
|
||||
flush_workqueue(adapter->workqueue);
|
||||
|
||||
mwifiex_usb_free(card);
|
||||
|
||||
mwifiex_dbg(adapter, FATAL,
|
||||
|
|
|
@ -702,12 +702,14 @@ void mwifiex_hist_data_set(struct mwifiex_private *priv, u8 rx_rate, s8 snr,
|
|||
s8 nflr)
|
||||
{
|
||||
struct mwifiex_histogram_data *phist_data = priv->hist_data;
|
||||
s8 nf = -nflr;
|
||||
s8 rssi = snr - nflr;
|
||||
|
||||
atomic_inc(&phist_data->num_samples);
|
||||
atomic_inc(&phist_data->rx_rate[rx_rate]);
|
||||
atomic_inc(&phist_data->snr[snr]);
|
||||
atomic_inc(&phist_data->noise_flr[128 + nflr]);
|
||||
atomic_inc(&phist_data->sig_str[nflr - snr]);
|
||||
atomic_inc(&phist_data->snr[snr + 128]);
|
||||
atomic_inc(&phist_data->noise_flr[nf + 128]);
|
||||
atomic_inc(&phist_data->sig_str[rssi + 128]);
|
||||
}
|
||||
|
||||
/* function to reset histogram data during init/reset */
|
||||
|
|
|
@ -155,7 +155,6 @@ static void rsi_reset_card(struct sdio_func *pfunction)
|
|||
int err;
|
||||
struct mmc_card *card = pfunction->card;
|
||||
struct mmc_host *host = card->host;
|
||||
s32 bit = (fls(host->ocr_avail) - 1);
|
||||
u8 cmd52_resp;
|
||||
u32 clock, resp, i;
|
||||
u16 rca;
|
||||
|
@ -175,7 +174,6 @@ static void rsi_reset_card(struct sdio_func *pfunction)
|
|||
msleep(20);
|
||||
|
||||
/* Initialize the SDIO card */
|
||||
host->ios.vdd = bit;
|
||||
host->ios.chip_select = MMC_CS_DONTCARE;
|
||||
host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN;
|
||||
host->ios.power_mode = MMC_POWER_UP;
|
||||
|
|
|
@ -388,6 +388,11 @@ static int wl1271_suspend(struct device *dev)
|
|||
mmc_pm_flag_t sdio_flags;
|
||||
int ret = 0;
|
||||
|
||||
if (!wl) {
|
||||
dev_err(dev, "no wilink module was probed\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "wl1271 suspend. wow_enabled: %d\n",
|
||||
wl->wow_enabled);
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ struct netfront_cb {
|
|||
/* IRQ name is queue name with "-tx" or "-rx" appended */
|
||||
#define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3)
|
||||
|
||||
static DECLARE_WAIT_QUEUE_HEAD(module_load_q);
|
||||
static DECLARE_WAIT_QUEUE_HEAD(module_unload_q);
|
||||
|
||||
struct netfront_stats {
|
||||
|
@ -238,7 +239,7 @@ static void rx_refill_timeout(unsigned long data)
|
|||
static int netfront_tx_slot_available(struct netfront_queue *queue)
|
||||
{
|
||||
return (queue->tx.req_prod_pvt - queue->tx.rsp_cons) <
|
||||
(NET_TX_RING_SIZE - MAX_SKB_FRAGS - 2);
|
||||
(NET_TX_RING_SIZE - XEN_NETIF_NR_SLOTS_MIN - 1);
|
||||
}
|
||||
|
||||
static void xennet_maybe_wake_tx(struct netfront_queue *queue)
|
||||
|
@ -775,7 +776,7 @@ static int xennet_get_responses(struct netfront_queue *queue,
|
|||
RING_IDX cons = queue->rx.rsp_cons;
|
||||
struct sk_buff *skb = xennet_get_rx_skb(queue, cons);
|
||||
grant_ref_t ref = xennet_get_rx_ref(queue, cons);
|
||||
int max = MAX_SKB_FRAGS + (rx->status <= RX_COPY_THRESHOLD);
|
||||
int max = XEN_NETIF_NR_SLOTS_MIN + (rx->status <= RX_COPY_THRESHOLD);
|
||||
int slots = 1;
|
||||
int err = 0;
|
||||
unsigned long ret;
|
||||
|
@ -1335,6 +1336,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
|
|||
netif_carrier_off(netdev);
|
||||
|
||||
xenbus_switch_state(dev, XenbusStateInitialising);
|
||||
wait_event(module_load_q,
|
||||
xenbus_read_driver_state(dev->otherend) !=
|
||||
XenbusStateClosed &&
|
||||
xenbus_read_driver_state(dev->otherend) !=
|
||||
XenbusStateUnknown);
|
||||
return netdev;
|
||||
|
||||
exit:
|
||||
|
|
|
@ -180,13 +180,16 @@ static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
|
|||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
if (!val) {
|
||||
if (pci_is_enabled(pdev))
|
||||
pci_disable_device(pdev);
|
||||
else
|
||||
result = -EIO;
|
||||
} else
|
||||
device_lock(dev);
|
||||
if (dev->driver)
|
||||
result = -EBUSY;
|
||||
else if (val)
|
||||
result = pci_enable_device(pdev);
|
||||
else if (pci_is_enabled(pdev))
|
||||
pci_disable_device(pdev);
|
||||
else
|
||||
result = -EIO;
|
||||
device_unlock(dev);
|
||||
|
||||
return result < 0 ? result : count;
|
||||
}
|
||||
|
|
|
@ -568,8 +568,10 @@ static int atmel_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
for_each_child_of_node(np_config, np) {
|
||||
ret = atmel_pctl_dt_subnode_to_map(pctldev, np, map,
|
||||
&reserved_maps, num_maps);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ static struct regulator_ops pfuze100_sw_regulator_ops = {
|
|||
static struct regulator_ops pfuze100_swb_regulator_ops = {
|
||||
.enable = regulator_enable_regmap,
|
||||
.disable = regulator_disable_regmap,
|
||||
.is_enabled = regulator_is_enabled_regmap,
|
||||
.list_voltage = regulator_list_voltage_table,
|
||||
.map_voltage = regulator_map_voltage_ascend,
|
||||
.set_voltage_sel = regulator_set_voltage_sel_regmap,
|
||||
|
|
|
@ -349,6 +349,11 @@ int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
|
|||
{
|
||||
int err;
|
||||
|
||||
if (!rtc->ops)
|
||||
return -ENODEV;
|
||||
else if (!rtc->ops->set_alarm)
|
||||
return -EINVAL;
|
||||
|
||||
err = rtc_valid_tm(&alarm->time);
|
||||
if (err != 0)
|
||||
return err;
|
||||
|
|
|
@ -889,6 +889,11 @@ static int twa_chrdev_open(struct inode *inode, struct file *file)
|
|||
unsigned int minor_number;
|
||||
int retval = TW_IOCTL_ERROR_OS_ENODEV;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN)) {
|
||||
retval = -EACCES;
|
||||
goto out;
|
||||
}
|
||||
|
||||
minor_number = iminor(inode);
|
||||
if (minor_number >= twa_device_extension_count)
|
||||
goto out;
|
||||
|
|
|
@ -1034,6 +1034,9 @@ static int tw_chrdev_open(struct inode *inode, struct file *file)
|
|||
|
||||
dprintk(KERN_WARNING "3w-xxxx: tw_ioctl_open()\n");
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EACCES;
|
||||
|
||||
minor_number = iminor(inode);
|
||||
if (minor_number >= tw_device_extension_count)
|
||||
return -ENODEV;
|
||||
|
|
|
@ -4197,6 +4197,9 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
int irq, i, j;
|
||||
int error = -ENODEV;
|
||||
|
||||
if (hba_count >= MAX_CONTROLLERS)
|
||||
goto out;
|
||||
|
||||
if (pci_enable_device(pdev))
|
||||
goto out;
|
||||
pci_set_master(pdev);
|
||||
|
|
|
@ -1886,6 +1886,9 @@ megasas_build_syspd_fusion(struct megasas_instance *instance,
|
|||
pRAID_Context->timeoutValue = cpu_to_le16(os_timeout_value);
|
||||
pRAID_Context->VirtualDiskTgtId = cpu_to_le16(device_id);
|
||||
} else {
|
||||
if (os_timeout_value)
|
||||
os_timeout_value++;
|
||||
|
||||
/* system pd Fast Path */
|
||||
io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST;
|
||||
timeout_limit = (scmd->device->type == TYPE_DISK) ?
|
||||
|
|
|
@ -58,7 +58,10 @@ static const struct scsi_dh_blist scsi_dh_blist[] = {
|
|||
{"IBM", "3526", "rdac", },
|
||||
{"IBM", "3542", "rdac", },
|
||||
{"IBM", "3552", "rdac", },
|
||||
{"SGI", "TP9", "rdac", },
|
||||
{"SGI", "TP9300", "rdac", },
|
||||
{"SGI", "TP9400", "rdac", },
|
||||
{"SGI", "TP9500", "rdac", },
|
||||
{"SGI", "TP9700", "rdac", },
|
||||
{"SGI", "IS", "rdac", },
|
||||
{"STK", "OPENstorage", "rdac", },
|
||||
{"STK", "FLEXLINE 380", "rdac", },
|
||||
|
|
|
@ -2195,6 +2195,7 @@ sg_add_sfp(Sg_device * sdp)
|
|||
write_lock_irqsave(&sdp->sfd_lock, iflags);
|
||||
if (atomic_read(&sdp->detaching)) {
|
||||
write_unlock_irqrestore(&sdp->sfd_lock, iflags);
|
||||
kfree(sfp);
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
list_add_tail(&sfp->sfd_siblings, &sdp->sfds);
|
||||
|
|
|
@ -3476,6 +3476,7 @@ static void ufshcd_exception_event_handler(struct work_struct *work)
|
|||
hba = container_of(work, struct ufs_hba, eeh_work);
|
||||
|
||||
pm_runtime_get_sync(hba->dev);
|
||||
scsi_block_requests(hba->host);
|
||||
err = ufshcd_get_ee_status(hba, &status);
|
||||
if (err) {
|
||||
dev_err(hba->dev, "%s: failed to get exception status %d\n",
|
||||
|
@ -3491,6 +3492,7 @@ static void ufshcd_exception_event_handler(struct work_struct *work)
|
|||
__func__, err);
|
||||
}
|
||||
out:
|
||||
scsi_unblock_requests(hba->host);
|
||||
pm_runtime_put_sync(hba->dev);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -585,6 +585,7 @@ static int exynos5433_tmu_initialize(struct platform_device *pdev)
|
|||
threshold_code = temp_to_code(data, temp);
|
||||
|
||||
rising_threshold = readl(data->base + rising_reg_offset);
|
||||
rising_threshold &= ~(0xff << j * 8);
|
||||
rising_threshold |= (threshold_code << j * 8);
|
||||
writel(rising_threshold, data->base + rising_reg_offset);
|
||||
|
||||
|
|
|
@ -323,7 +323,6 @@ static void udbg_init_opal_common(void)
|
|||
udbg_putc = udbg_opal_putc;
|
||||
udbg_getc = udbg_opal_getc;
|
||||
udbg_getc_poll = udbg_opal_getc_poll;
|
||||
tb_ticks_per_usec = 0x200; /* Make udelay not suck */
|
||||
}
|
||||
|
||||
void __init hvc_opal_init_early(void)
|
||||
|
|
|
@ -106,16 +106,19 @@ static void pty_unthrottle(struct tty_struct *tty)
|
|||
static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
|
||||
{
|
||||
struct tty_struct *to = tty->link;
|
||||
unsigned long flags;
|
||||
|
||||
if (tty->stopped)
|
||||
return 0;
|
||||
|
||||
if (c > 0) {
|
||||
spin_lock_irqsave(&to->port->lock, flags);
|
||||
/* Stuff the data into the input queue of the other end */
|
||||
c = tty_insert_flip_string(to->port, buf, c);
|
||||
/* And shovel */
|
||||
if (c)
|
||||
tty_flip_buffer_push(to->port);
|
||||
spin_unlock_irqrestore(&to->port->lock, flags);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -3308,6 +3308,10 @@ static int wait_for_ss_port_enable(struct usb_device *udev,
|
|||
while (delay_ms < 2000) {
|
||||
if (status || *portstatus & USB_PORT_STAT_CONNECTION)
|
||||
break;
|
||||
if (!port_is_power_on(hub, *portstatus)) {
|
||||
status = -ENODEV;
|
||||
break;
|
||||
}
|
||||
msleep(20);
|
||||
delay_ms += 20;
|
||||
status = hub_port_status(hub, *port1, portstatus, portchange);
|
||||
|
|
|
@ -479,7 +479,9 @@ static int virtballoon_migratepage(struct balloon_dev_info *vb_dev_info,
|
|||
tell_host(vb, vb->inflate_vq);
|
||||
|
||||
/* balloon's page migration 2nd step -- deflate "page" */
|
||||
spin_lock_irqsave(&vb_dev_info->pages_lock, flags);
|
||||
balloon_page_delete(page);
|
||||
spin_unlock_irqrestore(&vb_dev_info->pages_lock, flags);
|
||||
vb->num_pfns = VIRTIO_BALLOON_PAGES_PER_PAGE;
|
||||
set_page_pfns(vb, vb->pfns, page);
|
||||
tell_host(vb, vb->deflate_vq);
|
||||
|
|
|
@ -2185,6 +2185,21 @@ void assert_qgroups_uptodate(struct btrfs_trans_handle *trans)
|
|||
BUG();
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if the leaf is the last leaf. Which means all node pointers
|
||||
* are at their last position.
|
||||
*/
|
||||
static bool is_last_leaf(struct btrfs_path *path)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < BTRFS_MAX_LEVEL && path->nodes[i]; i++) {
|
||||
if (path->slots[i] != btrfs_header_nritems(path->nodes[i]) - 1)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* returns < 0 on error, 0 when more leafs are to be scanned.
|
||||
* returns 1 when done.
|
||||
|
@ -2198,6 +2213,7 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
|
|||
struct ulist *roots = NULL;
|
||||
struct seq_list tree_mod_seq_elem = SEQ_LIST_INIT(tree_mod_seq_elem);
|
||||
u64 num_bytes;
|
||||
bool done;
|
||||
int slot;
|
||||
int ret;
|
||||
|
||||
|
@ -2225,6 +2241,7 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
|
|||
mutex_unlock(&fs_info->qgroup_rescan_lock);
|
||||
return ret;
|
||||
}
|
||||
done = is_last_leaf(path);
|
||||
|
||||
btrfs_item_key_to_cpu(path->nodes[0], &found,
|
||||
btrfs_header_nritems(path->nodes[0]) - 1);
|
||||
|
@ -2271,6 +2288,8 @@ out:
|
|||
}
|
||||
btrfs_put_tree_mod_seq(fs_info, &tree_mod_seq_elem);
|
||||
|
||||
if (done && !ret)
|
||||
ret = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -2961,8 +2961,11 @@ out_wake_log_root:
|
|||
mutex_unlock(&log_root_tree->log_mutex);
|
||||
|
||||
/*
|
||||
* The barrier before waitqueue_active is implied by mutex_unlock
|
||||
* The barrier before waitqueue_active is needed so all the updates
|
||||
* above are seen by the woken threads. It might not be necessary, but
|
||||
* proving that seems to be hard.
|
||||
*/
|
||||
smp_mb();
|
||||
if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
|
||||
wake_up(&log_root_tree->log_commit_wait[index2]);
|
||||
out:
|
||||
|
@ -2973,8 +2976,11 @@ out:
|
|||
mutex_unlock(&root->log_mutex);
|
||||
|
||||
/*
|
||||
* The barrier before waitqueue_active is implied by mutex_unlock
|
||||
* The barrier before waitqueue_active is needed so all the updates
|
||||
* above are seen by the woken threads. It might not be necessary, but
|
||||
* proving that seems to be hard.
|
||||
*/
|
||||
smp_mb();
|
||||
if (waitqueue_active(&root->log_commit_wait[index1]))
|
||||
wake_up(&root->log_commit_wait[index1]);
|
||||
return ret;
|
||||
|
|
|
@ -378,6 +378,8 @@ static int ext4_validate_block_bitmap(struct super_block *sb,
|
|||
return -EFSCORRUPTED;
|
||||
|
||||
ext4_lock_group(sb, block_group);
|
||||
if (buffer_verified(bh))
|
||||
goto verified;
|
||||
if (unlikely(!ext4_block_bitmap_csum_verify(sb, block_group,
|
||||
desc, bh))) {
|
||||
ext4_unlock_group(sb, block_group);
|
||||
|
@ -400,6 +402,7 @@ static int ext4_validate_block_bitmap(struct super_block *sb,
|
|||
return -EFSCORRUPTED;
|
||||
}
|
||||
set_buffer_verified(bh);
|
||||
verified:
|
||||
ext4_unlock_group(sb, block_group);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,8 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
|
|||
return -EFSCORRUPTED;
|
||||
|
||||
ext4_lock_group(sb, block_group);
|
||||
if (buffer_verified(bh))
|
||||
goto verified;
|
||||
blk = ext4_inode_bitmap(sb, desc);
|
||||
if (!ext4_inode_bitmap_csum_verify(sb, block_group, desc, bh,
|
||||
EXT4_INODES_PER_GROUP(sb) / 8)) {
|
||||
|
@ -105,6 +107,7 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
|
|||
return -EFSBADCRC;
|
||||
}
|
||||
set_buffer_verified(bh);
|
||||
verified:
|
||||
ext4_unlock_group(sb, block_group);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -692,6 +692,10 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
|
|||
goto convert;
|
||||
}
|
||||
|
||||
ret = ext4_journal_get_write_access(handle, iloc.bh);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
flags |= AOP_FLAG_NOFS;
|
||||
|
||||
page = grab_cache_page_write_begin(mapping, 0, flags);
|
||||
|
@ -720,7 +724,7 @@ int ext4_try_to_write_inline_data(struct address_space *mapping,
|
|||
out_up_read:
|
||||
up_read(&EXT4_I(inode)->xattr_sem);
|
||||
out:
|
||||
if (handle)
|
||||
if (handle && (ret != 1))
|
||||
ext4_journal_stop(handle);
|
||||
brelse(iloc.bh);
|
||||
return ret;
|
||||
|
@ -762,6 +766,7 @@ int ext4_write_inline_data_end(struct inode *inode, loff_t pos, unsigned len,
|
|||
|
||||
ext4_write_unlock_xattr(inode, &no_expand);
|
||||
brelse(iloc.bh);
|
||||
mark_inode_dirty(inode);
|
||||
out:
|
||||
return copied;
|
||||
}
|
||||
|
@ -908,7 +913,6 @@ retry_journal:
|
|||
goto out;
|
||||
}
|
||||
|
||||
|
||||
page = grab_cache_page_write_begin(mapping, 0, flags);
|
||||
if (!page) {
|
||||
ret = -ENOMEM;
|
||||
|
@ -926,6 +930,9 @@ retry_journal:
|
|||
if (ret < 0)
|
||||
goto out_release_page;
|
||||
}
|
||||
ret = ext4_journal_get_write_access(handle, iloc.bh);
|
||||
if (ret)
|
||||
goto out_release_page;
|
||||
|
||||
up_read(&EXT4_I(inode)->xattr_sem);
|
||||
*pagep = page;
|
||||
|
@ -946,7 +953,6 @@ int ext4_da_write_inline_data_end(struct inode *inode, loff_t pos,
|
|||
unsigned len, unsigned copied,
|
||||
struct page *page)
|
||||
{
|
||||
int i_size_changed = 0;
|
||||
int ret;
|
||||
|
||||
ret = ext4_write_inline_data_end(inode, pos, len, copied, page);
|
||||
|
@ -964,10 +970,8 @@ int ext4_da_write_inline_data_end(struct inode *inode, loff_t pos,
|
|||
* But it's important to update i_size while still holding page lock:
|
||||
* page writeout could otherwise come in and zero beyond i_size.
|
||||
*/
|
||||
if (pos+copied > inode->i_size) {
|
||||
if (pos+copied > inode->i_size)
|
||||
i_size_write(inode, pos+copied);
|
||||
i_size_changed = 1;
|
||||
}
|
||||
unlock_page(page);
|
||||
page_cache_release(page);
|
||||
|
||||
|
@ -977,8 +981,7 @@ int ext4_da_write_inline_data_end(struct inode *inode, loff_t pos,
|
|||
* ordering of page lock and transaction start for journaling
|
||||
* filesystems.
|
||||
*/
|
||||
if (i_size_changed)
|
||||
mark_inode_dirty(inode);
|
||||
mark_inode_dirty(inode);
|
||||
|
||||
return copied;
|
||||
}
|
||||
|
|
|
@ -1175,10 +1175,11 @@ static int ext4_write_end(struct file *file,
|
|||
loff_t old_size = inode->i_size;
|
||||
int ret = 0, ret2;
|
||||
int i_size_changed = 0;
|
||||
int inline_data = ext4_has_inline_data(inode);
|
||||
|
||||
trace_android_fs_datawrite_end(inode, pos, len);
|
||||
trace_ext4_write_end(inode, pos, len, copied);
|
||||
if (ext4_has_inline_data(inode)) {
|
||||
if (inline_data) {
|
||||
ret = ext4_write_inline_data_end(inode, pos, len,
|
||||
copied, page);
|
||||
if (ret < 0) {
|
||||
|
@ -1206,7 +1207,7 @@ static int ext4_write_end(struct file *file,
|
|||
* ordering of page lock and transaction start for journaling
|
||||
* filesystems.
|
||||
*/
|
||||
if (i_size_changed)
|
||||
if (i_size_changed || inline_data)
|
||||
ext4_mark_inode_dirty(handle, inode);
|
||||
|
||||
if (pos + len > inode->i_size && ext4_can_truncate(inode))
|
||||
|
@ -1280,6 +1281,7 @@ static int ext4_journalled_write_end(struct file *file,
|
|||
int partial = 0;
|
||||
unsigned from, to;
|
||||
int size_changed = 0;
|
||||
int inline_data = ext4_has_inline_data(inode);
|
||||
|
||||
trace_android_fs_datawrite_end(inode, pos, len);
|
||||
trace_ext4_journalled_write_end(inode, pos, len, copied);
|
||||
|
@ -1288,7 +1290,7 @@ static int ext4_journalled_write_end(struct file *file,
|
|||
|
||||
BUG_ON(!ext4_handle_valid(handle));
|
||||
|
||||
if (ext4_has_inline_data(inode)) {
|
||||
if (inline_data) {
|
||||
ret = ext4_write_inline_data_end(inode, pos, len,
|
||||
copied, page);
|
||||
if (ret < 0) {
|
||||
|
@ -1319,7 +1321,7 @@ static int ext4_journalled_write_end(struct file *file,
|
|||
if (old_size < pos)
|
||||
pagecache_isize_extended(inode, old_size, pos);
|
||||
|
||||
if (size_changed) {
|
||||
if (size_changed || inline_data) {
|
||||
ret2 = ext4_mark_inode_dirty(handle, inode);
|
||||
if (!ret)
|
||||
ret = ret2;
|
||||
|
@ -1817,11 +1819,7 @@ static int __ext4_journalled_writepage(struct page *page,
|
|||
}
|
||||
|
||||
if (inline_data) {
|
||||
BUFFER_TRACE(inode_bh, "get write access");
|
||||
ret = ext4_journal_get_write_access(handle, inode_bh);
|
||||
|
||||
err = ext4_handle_dirty_metadata(handle, inode, inode_bh);
|
||||
|
||||
ret = ext4_mark_inode_dirty(handle, inode);
|
||||
} else {
|
||||
ret = ext4_walk_page_buffers(handle, page_bufs, 0, len, NULL,
|
||||
do_journal_get_write_access);
|
||||
|
|
|
@ -1538,6 +1538,8 @@ nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp,
|
|||
gdev->gd_maxcount = be32_to_cpup(p++);
|
||||
num = be32_to_cpup(p++);
|
||||
if (num) {
|
||||
if (num > 1000)
|
||||
goto xdr_error;
|
||||
READ_BUF(4 * num);
|
||||
gdev->gd_notify_types = be32_to_cpup(p++);
|
||||
for (i = 1; i < num; i++) {
|
||||
|
|
|
@ -340,6 +340,9 @@ int squashfs_read_metadata(struct super_block *sb, void *buffer,
|
|||
|
||||
TRACE("Entered squashfs_read_metadata [%llx:%x]\n", *block, *offset);
|
||||
|
||||
if (unlikely(length < 0))
|
||||
return -EIO;
|
||||
|
||||
while (length) {
|
||||
entry = squashfs_cache_get(sb, msblk->block_cache, *block, 0);
|
||||
if (entry->error) {
|
||||
|
|
|
@ -198,7 +198,11 @@ static long long read_indexes(struct super_block *sb, int n,
|
|||
}
|
||||
|
||||
for (i = 0; i < blocks; i++) {
|
||||
int size = le32_to_cpu(blist[i]);
|
||||
int size = squashfs_block_size(blist[i]);
|
||||
if (size < 0) {
|
||||
err = size;
|
||||
goto failure;
|
||||
}
|
||||
block += SQUASHFS_COMPRESSED_SIZE_BLOCK(size);
|
||||
}
|
||||
n -= blocks;
|
||||
|
@ -371,7 +375,7 @@ static int read_blocklist(struct inode *inode, int index, u64 *block)
|
|||
sizeof(size));
|
||||
if (res < 0)
|
||||
return res;
|
||||
return le32_to_cpu(size);
|
||||
return squashfs_block_size(size);
|
||||
}
|
||||
|
||||
/* Copy data into page cache */
|
||||
|
|
|
@ -49,11 +49,16 @@ int squashfs_frag_lookup(struct super_block *sb, unsigned int fragment,
|
|||
u64 *fragment_block)
|
||||
{
|
||||
struct squashfs_sb_info *msblk = sb->s_fs_info;
|
||||
int block = SQUASHFS_FRAGMENT_INDEX(fragment);
|
||||
int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
|
||||
u64 start_block = le64_to_cpu(msblk->fragment_index[block]);
|
||||
int block, offset, size;
|
||||
struct squashfs_fragment_entry fragment_entry;
|
||||
int size;
|
||||
u64 start_block;
|
||||
|
||||
if (fragment >= msblk->fragments)
|
||||
return -EIO;
|
||||
block = SQUASHFS_FRAGMENT_INDEX(fragment);
|
||||
offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
|
||||
|
||||
start_block = le64_to_cpu(msblk->fragment_index[block]);
|
||||
|
||||
size = squashfs_read_metadata(sb, &fragment_entry, &start_block,
|
||||
&offset, sizeof(fragment_entry));
|
||||
|
@ -61,9 +66,7 @@ int squashfs_frag_lookup(struct super_block *sb, unsigned int fragment,
|
|||
return size;
|
||||
|
||||
*fragment_block = le64_to_cpu(fragment_entry.start_block);
|
||||
size = le32_to_cpu(fragment_entry.size);
|
||||
|
||||
return size;
|
||||
return squashfs_block_size(fragment_entry.size);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -129,6 +129,12 @@
|
|||
|
||||
#define SQUASHFS_COMPRESSED_BLOCK(B) (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK))
|
||||
|
||||
static inline int squashfs_block_size(__le32 raw)
|
||||
{
|
||||
u32 size = le32_to_cpu(raw);
|
||||
return (size >> 25) ? -EIO : size;
|
||||
}
|
||||
|
||||
/*
|
||||
* Inode number ops. Inodes consist of a compressed block number, and an
|
||||
* uncompressed offset within that block
|
||||
|
|
|
@ -75,6 +75,7 @@ struct squashfs_sb_info {
|
|||
unsigned short block_log;
|
||||
long long bytes_used;
|
||||
unsigned int inodes;
|
||||
unsigned int fragments;
|
||||
int xattr_ids;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -176,6 +176,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
msblk->inode_table = le64_to_cpu(sblk->inode_table_start);
|
||||
msblk->directory_table = le64_to_cpu(sblk->directory_table_start);
|
||||
msblk->inodes = le32_to_cpu(sblk->inodes);
|
||||
msblk->fragments = le32_to_cpu(sblk->fragments);
|
||||
flags = le16_to_cpu(sblk->flags);
|
||||
|
||||
TRACE("Found valid superblock on %s\n", bdevname(sb->s_bdev, b));
|
||||
|
@ -186,7 +187,7 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
TRACE("Filesystem size %lld bytes\n", msblk->bytes_used);
|
||||
TRACE("Block size %d\n", msblk->block_size);
|
||||
TRACE("Number of inodes %d\n", msblk->inodes);
|
||||
TRACE("Number of fragments %d\n", le32_to_cpu(sblk->fragments));
|
||||
TRACE("Number of fragments %d\n", msblk->fragments);
|
||||
TRACE("Number of ids %d\n", le16_to_cpu(sblk->no_ids));
|
||||
TRACE("sblk->inode_table_start %llx\n", msblk->inode_table);
|
||||
TRACE("sblk->directory_table_start %llx\n", msblk->directory_table);
|
||||
|
@ -273,7 +274,7 @@ allocate_id_index_table:
|
|||
sb->s_export_op = &squashfs_export_ops;
|
||||
|
||||
handle_fragments:
|
||||
fragments = le32_to_cpu(sblk->fragments);
|
||||
fragments = msblk->fragments;
|
||||
if (fragments == 0)
|
||||
goto check_directory_table;
|
||||
|
||||
|
|
|
@ -342,6 +342,7 @@
|
|||
# define DP_PSR_FRAME_CAPTURE (1 << 3)
|
||||
# define DP_PSR_SELECTIVE_UPDATE (1 << 4)
|
||||
# define DP_PSR_IRQ_HPD_WITH_CRC_ERRORS (1 << 5)
|
||||
# define DP_PSR_ENABLE_PSR2 (1 << 6) /* eDP 1.4a */
|
||||
|
||||
#define DP_ADAPTER_CTRL 0x1a0
|
||||
# define DP_ADAPTER_CTRL_FORCE_LOAD_SENSE (1 << 0)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#define __DMA_IOMMU_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/types.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
#ifdef CONFIG_IOMMU_DMA
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#define SDIO_DEVICE_ID_BROADCOM_43341 0xa94d
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4335_4339 0x4335
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43362 0xa962
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43364 0xa9a4
|
||||
#define SDIO_DEVICE_ID_BROADCOM_43430 0xa9a6
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4345 0x4345
|
||||
#define SDIO_DEVICE_ID_BROADCOM_4354 0x4354
|
||||
|
|
|
@ -65,8 +65,14 @@ ip_set_timeout_set(unsigned long *timeout, u32 value)
|
|||
static inline u32
|
||||
ip_set_timeout_get(unsigned long *timeout)
|
||||
{
|
||||
return *timeout == IPSET_ELEM_PERMANENT ? 0 :
|
||||
jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC;
|
||||
u32 t;
|
||||
|
||||
if (*timeout == IPSET_ELEM_PERMANENT)
|
||||
return 0;
|
||||
|
||||
t = jiffies_to_msecs(*timeout - jiffies)/MSEC_PER_SEC;
|
||||
/* Zero value in userspace means no timeout */
|
||||
return t == 0 ? 1 : t;
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
@ -377,7 +377,7 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,
|
|||
struct pipe_inode_info *pipe, size_t len,
|
||||
unsigned int flags);
|
||||
|
||||
void tcp_enter_quickack_mode(struct sock *sk);
|
||||
void tcp_enter_quickack_mode(struct sock *sk, unsigned int max_quickacks);
|
||||
static inline void tcp_dec_quickack_mode(struct sock *sk,
|
||||
const unsigned int pkts)
|
||||
{
|
||||
|
|
|
@ -99,6 +99,8 @@ struct tegra_mc_soc {
|
|||
u8 client_id_mask;
|
||||
|
||||
const struct tegra_smmu_soc *smmu;
|
||||
|
||||
u32 intmask;
|
||||
};
|
||||
|
||||
struct tegra_mc {
|
||||
|
|
|
@ -406,7 +406,7 @@ static int audit_field_valid(struct audit_entry *entry, struct audit_field *f)
|
|||
return -EINVAL;
|
||||
break;
|
||||
case AUDIT_EXE:
|
||||
if (f->op != Audit_equal)
|
||||
if (f->op != Audit_not_equal && f->op != Audit_equal)
|
||||
return -EINVAL;
|
||||
if (entry->rule.listnr != AUDIT_FILTER_EXIT)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -470,6 +470,8 @@ static int audit_filter_rules(struct task_struct *tsk,
|
|||
break;
|
||||
case AUDIT_EXE:
|
||||
result = audit_exe_compare(tsk, rule->exe);
|
||||
if (f->op == Audit_not_equal)
|
||||
result = !result;
|
||||
break;
|
||||
case AUDIT_UID:
|
||||
result = audit_uid_comparator(cred->uid, f->op, f->uid);
|
||||
|
|
|
@ -2101,7 +2101,7 @@ static int replace_map_fd_with_map_ptr(struct verifier_env *env)
|
|||
/* hold the map. If the program is rejected by verifier,
|
||||
* the map will be released by release_maps() or it
|
||||
* will be used by the valid program until it's unloaded
|
||||
* and all maps are released in free_bpf_prog_info()
|
||||
* and all maps are released in free_used_maps()
|
||||
*/
|
||||
map = bpf_map_inc(map, false);
|
||||
if (IS_ERR(map)) {
|
||||
|
@ -2487,7 +2487,7 @@ free_log_buf:
|
|||
vfree(log_buf);
|
||||
if (!env->prog->aux->used_maps)
|
||||
/* if we didn't copy map pointers into bpf_prog_info, release
|
||||
* them now. Otherwise free_bpf_prog_info() will release them.
|
||||
* them now. Otherwise free_used_maps() will release them.
|
||||
*/
|
||||
release_maps(env);
|
||||
*prog = env->prog;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue