Merge 4.19.203 into android-4.19-stable
Changes in 4.19.203 Revert "ACPICA: Fix memory leak caused by _CID repair function" ALSA: seq: Fix racy deletion of subscriber ARM: imx: add missing iounmap() ARM: dts: colibri-imx6ull: limit SDIO clock to 25MHz ALSA: usb-audio: fix incorrect clock source setting clk: stm32f4: fix post divisor setup for I2S/SAI PLLs omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator scsi: sr: Return correct event when media event code is 3 media: videobuf2-core: dequeue if start_streaming fails net: natsemi: Fix missing pci_disable_device() in probe and remove sctp: move the active_key update after sh_keys is added nfp: update ethtool reporting of pauseframe control net: ipv6: fix returned variable type in ip6_skb_dst_mtu mips: Fix non-POSIX regexp bnx2x: fix an error code in bnx2x_nic_load() net: pegasus: fix uninit-value in get_interrupt_interval net: fec: fix use-after-free in fec_drv_remove net: vxge: fix use-after-free in vxge_device_unregister blk-iolatency: error out if blk_get_queue() failed in iolatency_set_limit() Bluetooth: defer cleanup of resources in hci_unregister_dev() USB: usbtmc: Fix RCU stall warning USB: serial: option: add Telit FD980 composition 0x1056 USB: serial: ch341: fix character loss at high transfer rates USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2 firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback firmware_loader: fix use-after-free in firmware_fallback_sysfs ALSA: usb-audio: Add registration quirk for JBL Quantum 600 usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers usb: gadget: f_hid: fixed NULL pointer dereference usb: gadget: f_hid: idle uses the highest byte for duration usb: otg-fsm: Fix hrtimer list corruption scripts/tracing: fix the bug that can't parse raw_trace_func tracing / histogram: Give calculation hist_fields a size tracing/histogram: Rename "cpu" to "common_cpu" optee: Clear stale cache entries during initialization staging: rtl8723bs: Fix a resource leak in sd_int_dpc media: rtl28xxu: fix zero-length control request pipe: increase minimum default pipe size to 2 pages ext4: fix potential htree corruption when growing large_dir directories serial: 8250: Mask out floating 16/32-bit bus bits MIPS: Malta: Do not byte-swap accesses to the CBUS UART pcmcia: i82092: fix a null pointer dereference bug KVM: x86: accept userspace interrupt only if no event is injected KVM: x86/mmu: Fix per-cpu counter corruption on 32-bit builds spi: meson-spicc: fix memory leak in meson_spicc_remove perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest qmi_wwan: add network device usage statistics for qmimux devices libata: fix ata_pio_sector for CONFIG_HIGHMEM reiserfs: add check for root_inode in reiserfs_fill_super reiserfs: check directory items on read from disk alpha: Send stop IPI to send to online CPUs net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset ARM: imx: add mmdc ipg clock operation for mmdc Linux 4.19.203 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I4adcce1092ab000faec667eda6cf569e7a269562
This commit is contained in:
@@ -191,7 +191,7 @@ Documentation written by Tom Zanussi
|
|||||||
with the event, in nanoseconds. May be
|
with the event, in nanoseconds. May be
|
||||||
modified by .usecs to have timestamps
|
modified by .usecs to have timestamps
|
||||||
interpreted as microseconds.
|
interpreted as microseconds.
|
||||||
cpu int the cpu on which the event occurred.
|
common_cpu int the cpu on which the event occurred.
|
||||||
====================== ==== =======================================
|
====================== ==== =======================================
|
||||||
|
|
||||||
Extended error information
|
Extended error information
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
VERSION = 4
|
VERSION = 4
|
||||||
PATCHLEVEL = 19
|
PATCHLEVEL = 19
|
||||||
SUBLEVEL = 202
|
SUBLEVEL = 203
|
||||||
EXTRAVERSION =
|
EXTRAVERSION =
|
||||||
NAME = "People's Front"
|
NAME = "People's Front"
|
||||||
|
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ void
|
|||||||
smp_send_stop(void)
|
smp_send_stop(void)
|
||||||
{
|
{
|
||||||
cpumask_t to_whom;
|
cpumask_t to_whom;
|
||||||
cpumask_copy(&to_whom, cpu_possible_mask);
|
cpumask_copy(&to_whom, cpu_online_mask);
|
||||||
cpumask_clear_cpu(smp_processor_id(), &to_whom);
|
cpumask_clear_cpu(smp_processor_id(), &to_whom);
|
||||||
#ifdef DEBUG_IPI_MSG
|
#ifdef DEBUG_IPI_MSG
|
||||||
if (hard_smp_processor_id() != boot_cpu_id)
|
if (hard_smp_processor_id() != boot_cpu_id)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
assigned-clock-rates = <0>, <198000000>;
|
assigned-clock-rates = <0>, <198000000>;
|
||||||
cap-power-off-card;
|
cap-power-off-card;
|
||||||
keep-power-in-suspend;
|
keep-power-in-suspend;
|
||||||
|
max-frequency = <25000000>;
|
||||||
mmc-pwrseq = <&wifi_pwrseq>;
|
mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
no-1-8-v;
|
no-1-8-v;
|
||||||
non-removable;
|
non-removable;
|
||||||
|
|||||||
@@ -33,14 +33,6 @@
|
|||||||
regulator-max-microvolt = <5000000>;
|
regulator-max-microvolt = <5000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vdds_1v8_main: fixedregulator-vdds_1v8_main {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "vdds_1v8_main";
|
|
||||||
vin-supply = <&smps7_reg>;
|
|
||||||
regulator-min-microvolt = <1800000>;
|
|
||||||
regulator-max-microvolt = <1800000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vmmcsd_fixed: fixedregulator-mmcsd {
|
vmmcsd_fixed: fixedregulator-mmcsd {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "vmmcsd_fixed";
|
regulator-name = "vmmcsd_fixed";
|
||||||
@@ -490,6 +482,7 @@
|
|||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vdds_1v8_main:
|
||||||
smps7_reg: smps7 {
|
smps7_reg: smps7 {
|
||||||
/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
|
/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
|
||||||
regulator-name = "smps7";
|
regulator-name = "smps7";
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
* http://www.gnu.org/copyleft/gpl.html
|
* http://www.gnu.org/copyleft/gpl.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <linux/clk.h>
|
||||||
#include <linux/hrtimer.h>
|
#include <linux/hrtimer.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
@@ -472,6 +473,7 @@ static int imx_mmdc_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
cpuhp_state_remove_instance_nocalls(cpuhp_mmdc_state, &pmu_mmdc->node);
|
||||||
perf_pmu_unregister(&pmu_mmdc->pmu);
|
perf_pmu_unregister(&pmu_mmdc->pmu);
|
||||||
|
iounmap(pmu_mmdc->mmdc_base);
|
||||||
kfree(pmu_mmdc);
|
kfree(pmu_mmdc);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -546,7 +548,20 @@ static int imx_mmdc_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
void __iomem *mmdc_base, *reg;
|
void __iomem *mmdc_base, *reg;
|
||||||
|
struct clk *mmdc_ipg_clk;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
/* the ipg clock is optional */
|
||||||
|
mmdc_ipg_clk = devm_clk_get(&pdev->dev, NULL);
|
||||||
|
if (IS_ERR(mmdc_ipg_clk))
|
||||||
|
mmdc_ipg_clk = NULL;
|
||||||
|
|
||||||
|
err = clk_prepare_enable(mmdc_ipg_clk);
|
||||||
|
if (err) {
|
||||||
|
dev_err(&pdev->dev, "Unable to enable mmdc ipg clock.\n");
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
mmdc_base = of_iomap(np, 0);
|
mmdc_base = of_iomap(np, 0);
|
||||||
WARN_ON(!mmdc_base);
|
WARN_ON(!mmdc_base);
|
||||||
@@ -564,7 +579,11 @@ static int imx_mmdc_probe(struct platform_device *pdev)
|
|||||||
val &= ~(1 << BP_MMDC_MAPSR_PSD);
|
val &= ~(1 << BP_MMDC_MAPSR_PSD);
|
||||||
writel_relaxed(val, reg);
|
writel_relaxed(val, reg);
|
||||||
|
|
||||||
return imx_mmdc_perf_init(pdev, mmdc_base);
|
err = imx_mmdc_perf_init(pdev, mmdc_base);
|
||||||
|
if (err)
|
||||||
|
iounmap(mmdc_base);
|
||||||
|
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int imx_mmdc_get_ddr_type(void)
|
int imx_mmdc_get_ddr_type(void)
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ KBUILD_LDFLAGS += -m $(ld-emul)
|
|||||||
|
|
||||||
ifdef CONFIG_MIPS
|
ifdef CONFIG_MIPS
|
||||||
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \
|
||||||
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
|
egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \
|
||||||
sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
|
sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ static struct plat_serial8250_port uart8250_data[] = {
|
|||||||
.mapbase = 0x1f000900, /* The CBUS UART */
|
.mapbase = 0x1f000900, /* The CBUS UART */
|
||||||
.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
|
.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2,
|
||||||
.uartclk = 3686400, /* Twice the usual clk! */
|
.uartclk = 3686400, /* Twice the usual clk! */
|
||||||
.iotype = UPIO_MEM32,
|
.iotype = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ?
|
||||||
|
UPIO_MEM32BE : UPIO_MEM32,
|
||||||
.flags = CBUS_UART_FLAGS,
|
.flags = CBUS_UART_FLAGS,
|
||||||
.regshift = 3,
|
.regshift = 3,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -799,9 +799,10 @@ void x86_pmu_stop(struct perf_event *event, int flags);
|
|||||||
|
|
||||||
static inline void x86_pmu_disable_event(struct perf_event *event)
|
static inline void x86_pmu_disable_event(struct perf_event *event)
|
||||||
{
|
{
|
||||||
|
u64 disable_mask = __this_cpu_read(cpu_hw_events.perf_ctr_virt_mask);
|
||||||
struct hw_perf_event *hwc = &event->hw;
|
struct hw_perf_event *hwc = &event->hw;
|
||||||
|
|
||||||
wrmsrl(hwc->config_base, hwc->config);
|
wrmsrl(hwc->config_base, hwc->config & ~disable_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void x86_pmu_enable_event(struct perf_event *event);
|
void x86_pmu_enable_event(struct perf_event *event);
|
||||||
|
|||||||
@@ -2042,7 +2042,7 @@ static int is_empty_shadow_page(u64 *spt)
|
|||||||
* aggregate version in order to make the slab shrinker
|
* aggregate version in order to make the slab shrinker
|
||||||
* faster
|
* faster
|
||||||
*/
|
*/
|
||||||
static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, unsigned long nr)
|
static inline void kvm_mod_used_mmu_pages(struct kvm *kvm, long nr)
|
||||||
{
|
{
|
||||||
kvm->arch.n_used_mmu_pages += nr;
|
kvm->arch.n_used_mmu_pages += nr;
|
||||||
percpu_counter_add(&kvm_total_used_mmu_pages, nr);
|
percpu_counter_add(&kvm_total_used_mmu_pages, nr);
|
||||||
|
|||||||
@@ -3366,8 +3366,17 @@ static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
|
|||||||
|
|
||||||
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
|
static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
return kvm_arch_interrupt_allowed(vcpu) &&
|
/*
|
||||||
kvm_cpu_accept_dm_intr(vcpu);
|
* Do not cause an interrupt window exit if an exception
|
||||||
|
* is pending or an event needs reinjection; userspace
|
||||||
|
* might want to inject the interrupt manually using KVM_SET_REGS
|
||||||
|
* or KVM_SET_SREGS. For that to work, we must be at an
|
||||||
|
* instruction boundary and with no events half-injected.
|
||||||
|
*/
|
||||||
|
return (kvm_arch_interrupt_allowed(vcpu) &&
|
||||||
|
kvm_cpu_accept_dm_intr(vcpu) &&
|
||||||
|
!kvm_event_needs_reinjection(vcpu) &&
|
||||||
|
!vcpu->arch.exception.pending);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
|
static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
|
||||||
|
|||||||
@@ -802,7 +802,11 @@ static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf,
|
|||||||
|
|
||||||
enable = iolatency_set_min_lat_nsec(blkg, lat_val);
|
enable = iolatency_set_min_lat_nsec(blkg, lat_val);
|
||||||
if (enable) {
|
if (enable) {
|
||||||
WARN_ON_ONCE(!blk_get_queue(blkg->q));
|
if (!blk_get_queue(blkg->q)) {
|
||||||
|
ret = -ENODEV;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
blkg_get(blkg);
|
blkg_get(blkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -375,13 +375,6 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info,
|
|||||||
|
|
||||||
(*element_ptr)->common.reference_count =
|
(*element_ptr)->common.reference_count =
|
||||||
original_ref_count;
|
original_ref_count;
|
||||||
|
|
||||||
/*
|
|
||||||
* The original_element holds a reference from the package object
|
|
||||||
* that represents _HID. Since a new element was created by _HID,
|
|
||||||
* remove the reference from the _CID package.
|
|
||||||
*/
|
|
||||||
acpi_ut_remove_reference(original_element);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
element_ptr++;
|
element_ptr++;
|
||||||
|
|||||||
@@ -657,6 +657,20 @@ unsigned int ata_sff_data_xfer32(struct ata_queued_cmd *qc, unsigned char *buf,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);
|
EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);
|
||||||
|
|
||||||
|
static void ata_pio_xfer(struct ata_queued_cmd *qc, struct page *page,
|
||||||
|
unsigned int offset, size_t xfer_size)
|
||||||
|
{
|
||||||
|
bool do_write = (qc->tf.flags & ATA_TFLAG_WRITE);
|
||||||
|
unsigned char *buf;
|
||||||
|
|
||||||
|
buf = kmap_atomic(page);
|
||||||
|
qc->ap->ops->sff_data_xfer(qc, buf + offset, xfer_size, do_write);
|
||||||
|
kunmap_atomic(buf);
|
||||||
|
|
||||||
|
if (!do_write && !PageSlab(page))
|
||||||
|
flush_dcache_page(page);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ata_pio_sector - Transfer a sector of data.
|
* ata_pio_sector - Transfer a sector of data.
|
||||||
* @qc: Command on going
|
* @qc: Command on going
|
||||||
@@ -668,11 +682,9 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);
|
|||||||
*/
|
*/
|
||||||
static void ata_pio_sector(struct ata_queued_cmd *qc)
|
static void ata_pio_sector(struct ata_queued_cmd *qc)
|
||||||
{
|
{
|
||||||
int do_write = (qc->tf.flags & ATA_TFLAG_WRITE);
|
|
||||||
struct ata_port *ap = qc->ap;
|
struct ata_port *ap = qc->ap;
|
||||||
struct page *page;
|
struct page *page;
|
||||||
unsigned int offset;
|
unsigned int offset;
|
||||||
unsigned char *buf;
|
|
||||||
|
|
||||||
if (!qc->cursg) {
|
if (!qc->cursg) {
|
||||||
qc->curbytes = qc->nbytes;
|
qc->curbytes = qc->nbytes;
|
||||||
@@ -690,13 +702,20 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
|||||||
|
|
||||||
DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");
|
DPRINTK("data %s\n", qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");
|
||||||
|
|
||||||
/* do the actual data transfer */
|
/*
|
||||||
buf = kmap_atomic(page);
|
* Split the transfer when it splits a page boundary. Note that the
|
||||||
ap->ops->sff_data_xfer(qc, buf + offset, qc->sect_size, do_write);
|
* split still has to be dword aligned like all ATA data transfers.
|
||||||
kunmap_atomic(buf);
|
*/
|
||||||
|
WARN_ON_ONCE(offset % 4);
|
||||||
|
if (offset + qc->sect_size > PAGE_SIZE) {
|
||||||
|
unsigned int split_len = PAGE_SIZE - offset;
|
||||||
|
|
||||||
if (!do_write && !PageSlab(page))
|
ata_pio_xfer(qc, page, offset, split_len);
|
||||||
flush_dcache_page(page);
|
ata_pio_xfer(qc, nth_page(page, 1), 0,
|
||||||
|
qc->sect_size - split_len);
|
||||||
|
} else {
|
||||||
|
ata_pio_xfer(qc, page, offset, qc->sect_size);
|
||||||
|
}
|
||||||
|
|
||||||
qc->curbytes += qc->sect_size;
|
qc->curbytes += qc->sect_size;
|
||||||
qc->cursg_ofs += qc->sect_size;
|
qc->cursg_ofs += qc->sect_size;
|
||||||
|
|||||||
@@ -86,12 +86,11 @@ static void __fw_load_abort(struct fw_priv *fw_priv)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* There is a small window in which user can write to 'loading'
|
* There is a small window in which user can write to 'loading'
|
||||||
* between loading done and disappearance of 'loading'
|
* between loading done/aborted and disappearance of 'loading'
|
||||||
*/
|
*/
|
||||||
if (fw_sysfs_done(fw_priv))
|
if (fw_state_is_aborted(fw_priv) || fw_sysfs_done(fw_priv))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
list_del_init(&fw_priv->pending_list);
|
|
||||||
fw_state_aborted(fw_priv);
|
fw_state_aborted(fw_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,7 +296,6 @@ static ssize_t firmware_loading_store(struct device *dev,
|
|||||||
* Same logic as fw_load_abort, only the DONE bit
|
* Same logic as fw_load_abort, only the DONE bit
|
||||||
* is ignored and we set ABORT only on failure.
|
* is ignored and we set ABORT only on failure.
|
||||||
*/
|
*/
|
||||||
list_del_init(&fw_priv->pending_list);
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
fw_state_aborted(fw_priv);
|
fw_state_aborted(fw_priv);
|
||||||
written = rc;
|
written = rc;
|
||||||
@@ -559,6 +557,11 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutex_lock(&fw_lock);
|
mutex_lock(&fw_lock);
|
||||||
|
if (fw_state_is_aborted(fw_priv)) {
|
||||||
|
mutex_unlock(&fw_lock);
|
||||||
|
retval = -EINTR;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
list_add(&fw_priv->pending_list, &pending_fw_head);
|
list_add(&fw_priv->pending_list, &pending_fw_head);
|
||||||
mutex_unlock(&fw_lock);
|
mutex_unlock(&fw_lock);
|
||||||
|
|
||||||
@@ -581,11 +584,10 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,
|
|||||||
if (fw_state_is_aborted(fw_priv)) {
|
if (fw_state_is_aborted(fw_priv)) {
|
||||||
if (retval == -ERESTARTSYS)
|
if (retval == -ERESTARTSYS)
|
||||||
retval = -EINTR;
|
retval = -EINTR;
|
||||||
else
|
|
||||||
retval = -EAGAIN;
|
|
||||||
} else if (fw_priv->is_paged_buf && !fw_priv->data)
|
} else if (fw_priv->is_paged_buf && !fw_priv->data)
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
|
|
||||||
|
out:
|
||||||
device_del(f_dev);
|
device_del(f_dev);
|
||||||
err_put_dev:
|
err_put_dev:
|
||||||
put_device(f_dev);
|
put_device(f_dev);
|
||||||
|
|||||||
@@ -106,8 +106,16 @@ static inline void __fw_state_set(struct fw_priv *fw_priv,
|
|||||||
|
|
||||||
WRITE_ONCE(fw_st->status, status);
|
WRITE_ONCE(fw_st->status, status);
|
||||||
|
|
||||||
if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED)
|
if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED) {
|
||||||
|
#ifdef CONFIG_FW_LOADER_USER_HELPER
|
||||||
|
/*
|
||||||
|
* Doing this here ensures that the fw_priv is deleted from
|
||||||
|
* the pending list in all abort/done paths.
|
||||||
|
*/
|
||||||
|
list_del_init(&fw_priv->pending_list);
|
||||||
|
#endif
|
||||||
complete_all(&fw_st->completion);
|
complete_all(&fw_st->completion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void fw_state_aborted(struct fw_priv *fw_priv)
|
static inline void fw_state_aborted(struct fw_priv *fw_priv)
|
||||||
|
|||||||
@@ -558,8 +558,10 @@ static void fw_abort_batch_reqs(struct firmware *fw)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
fw_priv = fw->priv;
|
fw_priv = fw->priv;
|
||||||
|
mutex_lock(&fw_lock);
|
||||||
if (!fw_state_is_aborted(fw_priv))
|
if (!fw_state_is_aborted(fw_priv))
|
||||||
fw_state_aborted(fw_priv);
|
fw_state_aborted(fw_priv);
|
||||||
|
mutex_unlock(&fw_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called from request_firmware() and request_firmware_work_func() */
|
/* called from request_firmware() and request_firmware_work_func() */
|
||||||
|
|||||||
@@ -454,7 +454,7 @@ struct stm32f4_pll {
|
|||||||
|
|
||||||
struct stm32f4_pll_post_div_data {
|
struct stm32f4_pll_post_div_data {
|
||||||
int idx;
|
int idx;
|
||||||
u8 pll_num;
|
int pll_idx;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *parent;
|
const char *parent;
|
||||||
u8 flag;
|
u8 flag;
|
||||||
@@ -485,13 +485,13 @@ static const struct clk_div_table post_divr_table[] = {
|
|||||||
|
|
||||||
#define MAX_POST_DIV 3
|
#define MAX_POST_DIV 3
|
||||||
static const struct stm32f4_pll_post_div_data post_div_data[MAX_POST_DIV] = {
|
static const struct stm32f4_pll_post_div_data post_div_data[MAX_POST_DIV] = {
|
||||||
{ CLK_I2SQ_PDIV, PLL_I2S, "plli2s-q-div", "plli2s-q",
|
{ CLK_I2SQ_PDIV, PLL_VCO_I2S, "plli2s-q-div", "plli2s-q",
|
||||||
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 0, 5, 0, NULL},
|
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 0, 5, 0, NULL},
|
||||||
|
|
||||||
{ CLK_SAIQ_PDIV, PLL_SAI, "pllsai-q-div", "pllsai-q",
|
{ CLK_SAIQ_PDIV, PLL_VCO_SAI, "pllsai-q-div", "pllsai-q",
|
||||||
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 8, 5, 0, NULL },
|
CLK_SET_RATE_PARENT, STM32F4_RCC_DCKCFGR, 8, 5, 0, NULL },
|
||||||
|
|
||||||
{ NO_IDX, PLL_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
|
{ NO_IDX, PLL_VCO_SAI, "pllsai-r-div", "pllsai-r", CLK_SET_RATE_PARENT,
|
||||||
STM32F4_RCC_DCKCFGR, 16, 2, 0, post_divr_table },
|
STM32F4_RCC_DCKCFGR, 16, 2, 0, post_divr_table },
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1499,7 +1499,7 @@ static void __init stm32f4_rcc_init(struct device_node *np)
|
|||||||
post_div->width,
|
post_div->width,
|
||||||
post_div->flag_div,
|
post_div->flag_div,
|
||||||
post_div->div_table,
|
post_div->div_table,
|
||||||
clks[post_div->pll_num],
|
clks[post_div->pll_idx],
|
||||||
&stm32f4_clk_lock);
|
&stm32f4_clk_lock);
|
||||||
|
|
||||||
if (post_div->idx != NO_IDX)
|
if (post_div->idx != NO_IDX)
|
||||||
|
|||||||
@@ -1391,6 +1391,7 @@ static int vb2_start_streaming(struct vb2_queue *q)
|
|||||||
int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
|
int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
|
||||||
{
|
{
|
||||||
struct vb2_buffer *vb;
|
struct vb2_buffer *vb;
|
||||||
|
enum vb2_buffer_state orig_state;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (q->error) {
|
if (q->error) {
|
||||||
@@ -1420,6 +1421,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
|
|||||||
* Add to the queued buffers list, a buffer will stay on it until
|
* Add to the queued buffers list, a buffer will stay on it until
|
||||||
* dequeued in dqbuf.
|
* dequeued in dqbuf.
|
||||||
*/
|
*/
|
||||||
|
orig_state = vb->state;
|
||||||
list_add_tail(&vb->queued_entry, &q->queued_list);
|
list_add_tail(&vb->queued_entry, &q->queued_list);
|
||||||
q->queued_count++;
|
q->queued_count++;
|
||||||
q->waiting_for_buffers = false;
|
q->waiting_for_buffers = false;
|
||||||
@@ -1450,8 +1452,17 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
|
|||||||
if (q->streaming && !q->start_streaming_called &&
|
if (q->streaming && !q->start_streaming_called &&
|
||||||
q->queued_count >= q->min_buffers_needed) {
|
q->queued_count >= q->min_buffers_needed) {
|
||||||
ret = vb2_start_streaming(q);
|
ret = vb2_start_streaming(q);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
/*
|
||||||
|
* Since vb2_core_qbuf will return with an error,
|
||||||
|
* we should return it to state DEQUEUED since
|
||||||
|
* the error indicates that the buffer wasn't queued.
|
||||||
|
*/
|
||||||
|
list_del(&vb->queued_entry);
|
||||||
|
q->queued_count--;
|
||||||
|
vb->state = orig_state;
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintk(2, "qbuf of buffer %d succeeded\n", vb->index);
|
dprintk(2, "qbuf of buffer %d succeeded\n", vb->index);
|
||||||
|
|||||||
@@ -50,7 +50,16 @@ static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req)
|
|||||||
} else {
|
} else {
|
||||||
/* read */
|
/* read */
|
||||||
requesttype = (USB_TYPE_VENDOR | USB_DIR_IN);
|
requesttype = (USB_TYPE_VENDOR | USB_DIR_IN);
|
||||||
pipe = usb_rcvctrlpipe(d->udev, 0);
|
|
||||||
|
/*
|
||||||
|
* Zero-length transfers must use usb_sndctrlpipe() and
|
||||||
|
* rtl28xxu_identify_state() uses a zero-length i2c read
|
||||||
|
* command to determine the chip type.
|
||||||
|
*/
|
||||||
|
if (req->size)
|
||||||
|
pipe = usb_rcvctrlpipe(d->udev, 0);
|
||||||
|
else
|
||||||
|
pipe = usb_sndctrlpipe(d->udev, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
|
ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
|
||||||
|
|||||||
@@ -2668,7 +2668,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allocated memory for FW statistics */
|
/* Allocated memory for FW statistics */
|
||||||
if (bnx2x_alloc_fw_stats_mem(bp))
|
rc = bnx2x_alloc_fw_stats_mem(bp);
|
||||||
|
if (rc)
|
||||||
LOAD_ERROR_EXIT(bp, load_error0);
|
LOAD_ERROR_EXIT(bp, load_error0);
|
||||||
|
|
||||||
/* request pf to initialize status blocks */
|
/* request pf to initialize status blocks */
|
||||||
|
|||||||
@@ -3733,13 +3733,13 @@ fec_drv_remove(struct platform_device *pdev)
|
|||||||
if (of_phy_is_fixed_link(np))
|
if (of_phy_is_fixed_link(np))
|
||||||
of_phy_deregister_fixed_link(np);
|
of_phy_deregister_fixed_link(np);
|
||||||
of_node_put(fep->phy_node);
|
of_node_put(fep->phy_node);
|
||||||
free_netdev(ndev);
|
|
||||||
|
|
||||||
clk_disable_unprepare(fep->clk_ahb);
|
clk_disable_unprepare(fep->clk_ahb);
|
||||||
clk_disable_unprepare(fep->clk_ipg);
|
clk_disable_unprepare(fep->clk_ipg);
|
||||||
pm_runtime_put_noidle(&pdev->dev);
|
pm_runtime_put_noidle(&pdev->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
|
free_netdev(ndev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -819,7 +819,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
printk(version);
|
printk(version);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
i = pci_enable_device(pdev);
|
i = pcim_enable_device(pdev);
|
||||||
if (i) return i;
|
if (i) return i;
|
||||||
|
|
||||||
/* natsemi has a non-standard PM control register
|
/* natsemi has a non-standard PM control register
|
||||||
@@ -852,7 +852,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
ioaddr = ioremap(iostart, iosize);
|
ioaddr = ioremap(iostart, iosize);
|
||||||
if (!ioaddr) {
|
if (!ioaddr) {
|
||||||
i = -ENOMEM;
|
i = -ENOMEM;
|
||||||
goto err_ioremap;
|
goto err_pci_request_regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Work around the dropped serial bit. */
|
/* Work around the dropped serial bit. */
|
||||||
@@ -974,9 +974,6 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
err_register_netdev:
|
err_register_netdev:
|
||||||
iounmap(ioaddr);
|
iounmap(ioaddr);
|
||||||
|
|
||||||
err_ioremap:
|
|
||||||
pci_release_regions(pdev);
|
|
||||||
|
|
||||||
err_pci_request_regions:
|
err_pci_request_regions:
|
||||||
free_netdev(dev);
|
free_netdev(dev);
|
||||||
return i;
|
return i;
|
||||||
@@ -3242,7 +3239,6 @@ static void natsemi_remove1(struct pci_dev *pdev)
|
|||||||
|
|
||||||
NATSEMI_REMOVE_FILE(pdev, dspcfg_workaround);
|
NATSEMI_REMOVE_FILE(pdev, dspcfg_workaround);
|
||||||
unregister_netdev (dev);
|
unregister_netdev (dev);
|
||||||
pci_release_regions (pdev);
|
|
||||||
iounmap(ioaddr);
|
iounmap(ioaddr);
|
||||||
free_netdev (dev);
|
free_netdev (dev);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3529,13 +3529,13 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)
|
|||||||
|
|
||||||
kfree(vdev->vpaths);
|
kfree(vdev->vpaths);
|
||||||
|
|
||||||
/* we are safe to free it now */
|
|
||||||
free_netdev(dev);
|
|
||||||
|
|
||||||
vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered",
|
vxge_debug_init(vdev->level_trace, "%s: ethernet device unregistered",
|
||||||
buf);
|
buf);
|
||||||
vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d Exiting...", buf,
|
vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d Exiting...", buf,
|
||||||
__func__, __LINE__);
|
__func__, __LINE__);
|
||||||
|
|
||||||
|
/* we are safe to free it now */
|
||||||
|
free_netdev(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -292,6 +292,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,
|
|||||||
|
|
||||||
/* Init to unknowns */
|
/* Init to unknowns */
|
||||||
ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
|
ethtool_link_ksettings_add_link_mode(cmd, supported, FIBRE);
|
||||||
|
ethtool_link_ksettings_add_link_mode(cmd, supported, Pause);
|
||||||
|
ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);
|
||||||
cmd->base.port = PORT_OTHER;
|
cmd->base.port = PORT_OTHER;
|
||||||
cmd->base.speed = SPEED_UNKNOWN;
|
cmd->base.speed = SPEED_UNKNOWN;
|
||||||
cmd->base.duplex = DUPLEX_UNKNOWN;
|
cmd->base.duplex = DUPLEX_UNKNOWN;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ static int ql_wait_for_drvr_lock(struct ql3_adapter *qdev)
|
|||||||
"driver lock acquired\n");
|
"driver lock acquired\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ssleep(1);
|
mdelay(1000);
|
||||||
} while (++i < 10);
|
} while (++i < 10);
|
||||||
|
|
||||||
netdev_err(qdev->ndev, "Timed out waiting for driver lock...\n");
|
netdev_err(qdev->ndev, "Timed out waiting for driver lock...\n");
|
||||||
@@ -3292,7 +3292,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
|
|||||||
if ((value & ISP_CONTROL_SR) == 0)
|
if ((value & ISP_CONTROL_SR) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ssleep(1);
|
mdelay(1000);
|
||||||
} while ((--max_wait_time));
|
} while ((--max_wait_time));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3328,7 +3328,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)
|
|||||||
ispControlStatus);
|
ispControlStatus);
|
||||||
if ((value & ISP_CONTROL_FSR) == 0)
|
if ((value & ISP_CONTROL_FSR) == 0)
|
||||||
break;
|
break;
|
||||||
ssleep(1);
|
mdelay(1000);
|
||||||
} while ((--max_wait_time));
|
} while ((--max_wait_time));
|
||||||
}
|
}
|
||||||
if (max_wait_time == 0)
|
if (max_wait_time == 0)
|
||||||
|
|||||||
@@ -750,12 +750,16 @@ static inline void disable_net_traffic(pegasus_t *pegasus)
|
|||||||
set_registers(pegasus, EthCtrl0, sizeof(tmp), &tmp);
|
set_registers(pegasus, EthCtrl0, sizeof(tmp), &tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void get_interrupt_interval(pegasus_t *pegasus)
|
static inline int get_interrupt_interval(pegasus_t *pegasus)
|
||||||
{
|
{
|
||||||
u16 data;
|
u16 data;
|
||||||
u8 interval;
|
u8 interval;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = read_eprom_word(pegasus, 4, &data);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
read_eprom_word(pegasus, 4, &data);
|
|
||||||
interval = data >> 8;
|
interval = data >> 8;
|
||||||
if (pegasus->usb->speed != USB_SPEED_HIGH) {
|
if (pegasus->usb->speed != USB_SPEED_HIGH) {
|
||||||
if (interval < 0x80) {
|
if (interval < 0x80) {
|
||||||
@@ -770,6 +774,8 @@ static inline void get_interrupt_interval(pegasus_t *pegasus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pegasus->intr_interval = interval;
|
pegasus->intr_interval = interval;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_carrier(struct net_device *net)
|
static void set_carrier(struct net_device *net)
|
||||||
@@ -1188,7 +1194,9 @@ static int pegasus_probe(struct usb_interface *intf,
|
|||||||
| NETIF_MSG_PROBE | NETIF_MSG_LINK);
|
| NETIF_MSG_PROBE | NETIF_MSG_LINK);
|
||||||
|
|
||||||
pegasus->features = usb_dev_id[dev_index].private;
|
pegasus->features = usb_dev_id[dev_index].private;
|
||||||
get_interrupt_interval(pegasus);
|
res = get_interrupt_interval(pegasus);
|
||||||
|
if (res)
|
||||||
|
goto out2;
|
||||||
if (reset_mac(pegasus)) {
|
if (reset_mac(pegasus)) {
|
||||||
dev_err(&intf->dev, "can't reset MAC\n");
|
dev_err(&intf->dev, "can't reset MAC\n");
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <linux/usb/cdc.h>
|
#include <linux/usb/cdc.h>
|
||||||
#include <linux/usb/usbnet.h>
|
#include <linux/usb/usbnet.h>
|
||||||
#include <linux/usb/cdc-wdm.h>
|
#include <linux/usb/cdc-wdm.h>
|
||||||
|
#include <linux/u64_stats_sync.h>
|
||||||
|
|
||||||
/* This driver supports wwan (3G/LTE/?) devices using a vendor
|
/* This driver supports wwan (3G/LTE/?) devices using a vendor
|
||||||
* specific management protocol called Qualcomm MSM Interface (QMI) -
|
* specific management protocol called Qualcomm MSM Interface (QMI) -
|
||||||
@@ -74,6 +75,7 @@ struct qmimux_hdr {
|
|||||||
struct qmimux_priv {
|
struct qmimux_priv {
|
||||||
struct net_device *real_dev;
|
struct net_device *real_dev;
|
||||||
u8 mux_id;
|
u8 mux_id;
|
||||||
|
struct pcpu_sw_netstats __percpu *stats64;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int qmimux_open(struct net_device *dev)
|
static int qmimux_open(struct net_device *dev)
|
||||||
@@ -100,19 +102,65 @@ static netdev_tx_t qmimux_start_xmit(struct sk_buff *skb, struct net_device *dev
|
|||||||
struct qmimux_priv *priv = netdev_priv(dev);
|
struct qmimux_priv *priv = netdev_priv(dev);
|
||||||
unsigned int len = skb->len;
|
unsigned int len = skb->len;
|
||||||
struct qmimux_hdr *hdr;
|
struct qmimux_hdr *hdr;
|
||||||
|
netdev_tx_t ret;
|
||||||
|
|
||||||
hdr = skb_push(skb, sizeof(struct qmimux_hdr));
|
hdr = skb_push(skb, sizeof(struct qmimux_hdr));
|
||||||
hdr->pad = 0;
|
hdr->pad = 0;
|
||||||
hdr->mux_id = priv->mux_id;
|
hdr->mux_id = priv->mux_id;
|
||||||
hdr->pkt_len = cpu_to_be16(len);
|
hdr->pkt_len = cpu_to_be16(len);
|
||||||
skb->dev = priv->real_dev;
|
skb->dev = priv->real_dev;
|
||||||
return dev_queue_xmit(skb);
|
ret = dev_queue_xmit(skb);
|
||||||
|
|
||||||
|
if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
|
||||||
|
struct pcpu_sw_netstats *stats64 = this_cpu_ptr(priv->stats64);
|
||||||
|
|
||||||
|
u64_stats_update_begin(&stats64->syncp);
|
||||||
|
stats64->tx_packets++;
|
||||||
|
stats64->tx_bytes += len;
|
||||||
|
u64_stats_update_end(&stats64->syncp);
|
||||||
|
} else {
|
||||||
|
dev->stats.tx_dropped++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void qmimux_get_stats64(struct net_device *net,
|
||||||
|
struct rtnl_link_stats64 *stats)
|
||||||
|
{
|
||||||
|
struct qmimux_priv *priv = netdev_priv(net);
|
||||||
|
unsigned int start;
|
||||||
|
int cpu;
|
||||||
|
|
||||||
|
netdev_stats_to_stats64(stats, &net->stats);
|
||||||
|
|
||||||
|
for_each_possible_cpu(cpu) {
|
||||||
|
struct pcpu_sw_netstats *stats64;
|
||||||
|
u64 rx_packets, rx_bytes;
|
||||||
|
u64 tx_packets, tx_bytes;
|
||||||
|
|
||||||
|
stats64 = per_cpu_ptr(priv->stats64, cpu);
|
||||||
|
|
||||||
|
do {
|
||||||
|
start = u64_stats_fetch_begin_irq(&stats64->syncp);
|
||||||
|
rx_packets = stats64->rx_packets;
|
||||||
|
rx_bytes = stats64->rx_bytes;
|
||||||
|
tx_packets = stats64->tx_packets;
|
||||||
|
tx_bytes = stats64->tx_bytes;
|
||||||
|
} while (u64_stats_fetch_retry_irq(&stats64->syncp, start));
|
||||||
|
|
||||||
|
stats->rx_packets += rx_packets;
|
||||||
|
stats->rx_bytes += rx_bytes;
|
||||||
|
stats->tx_packets += tx_packets;
|
||||||
|
stats->tx_bytes += tx_bytes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct net_device_ops qmimux_netdev_ops = {
|
static const struct net_device_ops qmimux_netdev_ops = {
|
||||||
.ndo_open = qmimux_open,
|
.ndo_open = qmimux_open,
|
||||||
.ndo_stop = qmimux_stop,
|
.ndo_stop = qmimux_stop,
|
||||||
.ndo_start_xmit = qmimux_start_xmit,
|
.ndo_start_xmit = qmimux_start_xmit,
|
||||||
|
.ndo_get_stats64 = qmimux_get_stats64,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void qmimux_setup(struct net_device *dev)
|
static void qmimux_setup(struct net_device *dev)
|
||||||
@@ -197,8 +245,19 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, pkt_len);
|
skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, pkt_len);
|
||||||
if (netif_rx(skbn) != NET_RX_SUCCESS)
|
if (netif_rx(skbn) != NET_RX_SUCCESS) {
|
||||||
|
net->stats.rx_errors++;
|
||||||
return 0;
|
return 0;
|
||||||
|
} else {
|
||||||
|
struct pcpu_sw_netstats *stats64;
|
||||||
|
struct qmimux_priv *priv = netdev_priv(net);
|
||||||
|
|
||||||
|
stats64 = this_cpu_ptr(priv->stats64);
|
||||||
|
u64_stats_update_begin(&stats64->syncp);
|
||||||
|
stats64->rx_packets++;
|
||||||
|
stats64->rx_bytes += pkt_len;
|
||||||
|
u64_stats_update_end(&stats64->syncp);
|
||||||
|
}
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
offset += len + qmimux_hdr_sz;
|
offset += len + qmimux_hdr_sz;
|
||||||
@@ -222,6 +281,12 @@ static int qmimux_register_device(struct net_device *real_dev, u8 mux_id)
|
|||||||
priv->mux_id = mux_id;
|
priv->mux_id = mux_id;
|
||||||
priv->real_dev = real_dev;
|
priv->real_dev = real_dev;
|
||||||
|
|
||||||
|
priv->stats64 = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
|
||||||
|
if (!priv->stats64) {
|
||||||
|
err = -ENOBUFS;
|
||||||
|
goto out_free_newdev;
|
||||||
|
}
|
||||||
|
|
||||||
err = register_netdevice(new_dev);
|
err = register_netdevice(new_dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out_free_newdev;
|
goto out_free_newdev;
|
||||||
@@ -252,6 +317,7 @@ static void qmimux_unregister_device(struct net_device *dev,
|
|||||||
struct qmimux_priv *priv = netdev_priv(dev);
|
struct qmimux_priv *priv = netdev_priv(dev);
|
||||||
struct net_device *real_dev = priv->real_dev;
|
struct net_device *real_dev = priv->real_dev;
|
||||||
|
|
||||||
|
free_percpu(priv->stats64);
|
||||||
netdev_upper_dev_unlink(real_dev, dev);
|
netdev_upper_dev_unlink(real_dev, dev);
|
||||||
unregister_netdevice_queue(dev, head);
|
unregister_netdevice_queue(dev, head);
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *i
|
|||||||
for (i = 0;i<socket_count;i++) {
|
for (i = 0;i<socket_count;i++) {
|
||||||
sockets[i].card_state = 1; /* 1 = present but empty */
|
sockets[i].card_state = 1; /* 1 = present but empty */
|
||||||
sockets[i].io_base = pci_resource_start(dev, 0);
|
sockets[i].io_base = pci_resource_start(dev, 0);
|
||||||
|
sockets[i].dev = dev;
|
||||||
sockets[i].socket.features |= SS_CAP_PCCARD;
|
sockets[i].socket.features |= SS_CAP_PCCARD;
|
||||||
sockets[i].socket.map_size = 0x1000;
|
sockets[i].socket.map_size = 0x1000;
|
||||||
sockets[i].socket.irq_mask = 0;
|
sockets[i].socket.irq_mask = 0;
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ static unsigned int sr_get_events(struct scsi_device *sdev)
|
|||||||
else if (med->media_event_code == 2)
|
else if (med->media_event_code == 2)
|
||||||
return DISK_EVENT_MEDIA_CHANGE;
|
return DISK_EVENT_MEDIA_CHANGE;
|
||||||
else if (med->media_event_code == 3)
|
else if (med->media_event_code == 3)
|
||||||
return DISK_EVENT_EJECT_REQUEST;
|
return DISK_EVENT_MEDIA_CHANGE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -599,6 +599,8 @@ static int meson_spicc_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
clk_disable_unprepare(spicc->core);
|
clk_disable_unprepare(spicc->core);
|
||||||
|
|
||||||
|
spi_master_put(spicc->master);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1077,6 +1077,8 @@ void sd_int_dpc(struct adapter *adapter)
|
|||||||
} else {
|
} else {
|
||||||
rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
|
rtw_c2h_wk_cmd(adapter, (u8 *)c2h_evt);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
kfree(c2h_evt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Error handling for malloc fail */
|
/* Error handling for malloc fail */
|
||||||
|
|||||||
@@ -413,11 +413,13 @@ void optee_enable_shm_cache(struct optee *optee)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* optee_disable_shm_cache() - Disables caching of some shared memory allocation
|
* __optee_disable_shm_cache() - Disables caching of some shared memory
|
||||||
* in OP-TEE
|
* allocation in OP-TEE
|
||||||
* @optee: main service struct
|
* @optee: main service struct
|
||||||
|
* @is_mapped: true if the cached shared memory addresses were mapped by this
|
||||||
|
* kernel, are safe to dereference, and should be freed
|
||||||
*/
|
*/
|
||||||
void optee_disable_shm_cache(struct optee *optee)
|
static void __optee_disable_shm_cache(struct optee *optee, bool is_mapped)
|
||||||
{
|
{
|
||||||
struct optee_call_waiter w;
|
struct optee_call_waiter w;
|
||||||
|
|
||||||
@@ -436,6 +438,13 @@ void optee_disable_shm_cache(struct optee *optee)
|
|||||||
if (res.result.status == OPTEE_SMC_RETURN_OK) {
|
if (res.result.status == OPTEE_SMC_RETURN_OK) {
|
||||||
struct tee_shm *shm;
|
struct tee_shm *shm;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Shared memory references that were not mapped by
|
||||||
|
* this kernel must be ignored to prevent a crash.
|
||||||
|
*/
|
||||||
|
if (!is_mapped)
|
||||||
|
continue;
|
||||||
|
|
||||||
shm = reg_pair_to_ptr(res.result.shm_upper32,
|
shm = reg_pair_to_ptr(res.result.shm_upper32,
|
||||||
res.result.shm_lower32);
|
res.result.shm_lower32);
|
||||||
tee_shm_free(shm);
|
tee_shm_free(shm);
|
||||||
@@ -446,6 +455,27 @@ void optee_disable_shm_cache(struct optee *optee)
|
|||||||
optee_cq_wait_final(&optee->call_queue, &w);
|
optee_cq_wait_final(&optee->call_queue, &w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optee_disable_shm_cache() - Disables caching of mapped shared memory
|
||||||
|
* allocations in OP-TEE
|
||||||
|
* @optee: main service struct
|
||||||
|
*/
|
||||||
|
void optee_disable_shm_cache(struct optee *optee)
|
||||||
|
{
|
||||||
|
return __optee_disable_shm_cache(optee, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optee_disable_unmapped_shm_cache() - Disables caching of shared memory
|
||||||
|
* allocations in OP-TEE which are not
|
||||||
|
* currently mapped
|
||||||
|
* @optee: main service struct
|
||||||
|
*/
|
||||||
|
void optee_disable_unmapped_shm_cache(struct optee *optee)
|
||||||
|
{
|
||||||
|
return __optee_disable_shm_cache(optee, false);
|
||||||
|
}
|
||||||
|
|
||||||
#define PAGELIST_ENTRIES_PER_PAGE \
|
#define PAGELIST_ENTRIES_PER_PAGE \
|
||||||
((OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(u64)) - 1)
|
((OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(u64)) - 1)
|
||||||
|
|
||||||
|
|||||||
@@ -619,6 +619,15 @@ static struct optee *optee_probe(struct device_node *np)
|
|||||||
optee->memremaped_shm = memremaped_shm;
|
optee->memremaped_shm = memremaped_shm;
|
||||||
optee->pool = pool;
|
optee->pool = pool;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure that there are no pre-existing shm objects before enabling
|
||||||
|
* the shm cache so that there's no chance of receiving an invalid
|
||||||
|
* address during shutdown. This could occur, for example, if we're
|
||||||
|
* kexec booting from an older kernel that did not properly cleanup the
|
||||||
|
* shm cache.
|
||||||
|
*/
|
||||||
|
optee_disable_unmapped_shm_cache(optee);
|
||||||
|
|
||||||
optee_enable_shm_cache(optee);
|
optee_enable_shm_cache(optee);
|
||||||
|
|
||||||
pr_info("initialized driver\n");
|
pr_info("initialized driver\n");
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session);
|
|||||||
|
|
||||||
void optee_enable_shm_cache(struct optee *optee);
|
void optee_enable_shm_cache(struct optee *optee);
|
||||||
void optee_disable_shm_cache(struct optee *optee);
|
void optee_disable_shm_cache(struct optee *optee);
|
||||||
|
void optee_disable_unmapped_shm_cache(struct optee *optee);
|
||||||
|
|
||||||
int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm,
|
||||||
struct page **pages, size_t num_pages,
|
struct page **pages, size_t num_pages,
|
||||||
|
|||||||
@@ -313,7 +313,11 @@ static const struct serial8250_config uart_config[] = {
|
|||||||
/* Uart divisor latch read */
|
/* Uart divisor latch read */
|
||||||
static int default_serial_dl_read(struct uart_8250_port *up)
|
static int default_serial_dl_read(struct uart_8250_port *up)
|
||||||
{
|
{
|
||||||
return serial_in(up, UART_DLL) | serial_in(up, UART_DLM) << 8;
|
/* Assign these in pieces to truncate any bits above 7. */
|
||||||
|
unsigned char dll = serial_in(up, UART_DLL);
|
||||||
|
unsigned char dlm = serial_in(up, UART_DLM);
|
||||||
|
|
||||||
|
return dll | dlm << 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Uart divisor latch write */
|
/* Uart divisor latch write */
|
||||||
@@ -1301,9 +1305,11 @@ static void autoconfig(struct uart_8250_port *up)
|
|||||||
serial_out(up, UART_LCR, 0);
|
serial_out(up, UART_LCR, 0);
|
||||||
|
|
||||||
serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
|
serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO);
|
||||||
scratch = serial_in(up, UART_IIR) >> 6;
|
|
||||||
|
|
||||||
switch (scratch) {
|
/* Assign this as it is to truncate any bits above 7. */
|
||||||
|
scratch = serial_in(up, UART_IIR);
|
||||||
|
|
||||||
|
switch (scratch >> 6) {
|
||||||
case 0:
|
case 0:
|
||||||
autoconfig_8250(up);
|
autoconfig_8250(up);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1537,17 +1537,10 @@ static void usbtmc_interrupt(struct urb *urb)
|
|||||||
dev_err(dev, "overflow with length %d, actual length is %d\n",
|
dev_err(dev, "overflow with length %d, actual length is %d\n",
|
||||||
data->iin_wMaxPacketSize, urb->actual_length);
|
data->iin_wMaxPacketSize, urb->actual_length);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case -ECONNRESET:
|
default:
|
||||||
case -ENOENT:
|
|
||||||
case -ESHUTDOWN:
|
|
||||||
case -EILSEQ:
|
|
||||||
case -ETIME:
|
|
||||||
case -EPIPE:
|
|
||||||
/* urb terminated, clean up */
|
/* urb terminated, clean up */
|
||||||
dev_dbg(dev, "urb terminated, status: %d\n", status);
|
dev_dbg(dev, "urb terminated, status: %d\n", status);
|
||||||
return;
|
return;
|
||||||
default:
|
|
||||||
dev_err(dev, "unknown status received: %d\n", status);
|
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
rv = usb_submit_urb(urb, GFP_ATOMIC);
|
rv = usb_submit_urb(urb, GFP_ATOMIC);
|
||||||
|
|||||||
@@ -193,7 +193,11 @@ static void otg_start_hnp_polling(struct otg_fsm *fsm)
|
|||||||
if (!fsm->host_req_flag)
|
if (!fsm->host_req_flag)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
|
if (!fsm->hnp_work_inited) {
|
||||||
|
INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
|
||||||
|
fsm->hnp_work_inited = true;
|
||||||
|
}
|
||||||
|
|
||||||
schedule_delayed_work(&fsm->hnp_polling_work,
|
schedule_delayed_work(&fsm->hnp_polling_work,
|
||||||
msecs_to_jiffies(T_HOST_REQ_POLL));
|
msecs_to_jiffies(T_HOST_REQ_POLL));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ struct f_hidg {
|
|||||||
unsigned char bInterfaceSubClass;
|
unsigned char bInterfaceSubClass;
|
||||||
unsigned char bInterfaceProtocol;
|
unsigned char bInterfaceProtocol;
|
||||||
unsigned char protocol;
|
unsigned char protocol;
|
||||||
|
unsigned char idle;
|
||||||
unsigned short report_desc_length;
|
unsigned short report_desc_length;
|
||||||
char *report_desc;
|
char *report_desc;
|
||||||
unsigned short report_length;
|
unsigned short report_length;
|
||||||
@@ -344,6 +345,11 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
|||||||
|
|
||||||
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
||||||
|
|
||||||
|
if (!hidg->req) {
|
||||||
|
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
||||||
|
return -ESHUTDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
#define WRITE_COND (!hidg->write_pending)
|
#define WRITE_COND (!hidg->write_pending)
|
||||||
try_again:
|
try_again:
|
||||||
/* write queue */
|
/* write queue */
|
||||||
@@ -364,8 +370,14 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
|||||||
count = min_t(unsigned, count, hidg->report_length);
|
count = min_t(unsigned, count, hidg->report_length);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
||||||
status = copy_from_user(req->buf, buffer, count);
|
|
||||||
|
|
||||||
|
if (!req) {
|
||||||
|
ERROR(hidg->func.config->cdev, "hidg->req is NULL\n");
|
||||||
|
status = -ESHUTDOWN;
|
||||||
|
goto release_write_pending;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = copy_from_user(req->buf, buffer, count);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
ERROR(hidg->func.config->cdev,
|
ERROR(hidg->func.config->cdev,
|
||||||
"copy_from_user error\n");
|
"copy_from_user error\n");
|
||||||
@@ -393,15 +405,18 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
|||||||
|
|
||||||
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
spin_unlock_irqrestore(&hidg->write_spinlock, flags);
|
||||||
|
|
||||||
status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC);
|
if (!hidg->in_ep->enabled) {
|
||||||
if (status < 0) {
|
ERROR(hidg->func.config->cdev, "in_ep is disabled\n");
|
||||||
ERROR(hidg->func.config->cdev,
|
status = -ESHUTDOWN;
|
||||||
"usb_ep_queue error on int endpoint %zd\n", status);
|
|
||||||
goto release_write_pending;
|
goto release_write_pending;
|
||||||
} else {
|
|
||||||
status = count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC);
|
||||||
|
if (status < 0)
|
||||||
|
goto release_write_pending;
|
||||||
|
else
|
||||||
|
status = count;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
release_write_pending:
|
release_write_pending:
|
||||||
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
||||||
@@ -529,6 +544,14 @@ static int hidg_setup(struct usb_function *f,
|
|||||||
goto respond;
|
goto respond;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8
|
||||||
|
| HID_REQ_GET_IDLE):
|
||||||
|
VDBG(cdev, "get_idle\n");
|
||||||
|
length = min_t(unsigned int, length, 1);
|
||||||
|
((u8 *) req->buf)[0] = hidg->idle;
|
||||||
|
goto respond;
|
||||||
|
break;
|
||||||
|
|
||||||
case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8
|
case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8
|
||||||
| HID_REQ_SET_REPORT):
|
| HID_REQ_SET_REPORT):
|
||||||
VDBG(cdev, "set_report | wLength=%d\n", ctrl->wLength);
|
VDBG(cdev, "set_report | wLength=%d\n", ctrl->wLength);
|
||||||
@@ -552,6 +575,14 @@ static int hidg_setup(struct usb_function *f,
|
|||||||
goto stall;
|
goto stall;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8
|
||||||
|
| HID_REQ_SET_IDLE):
|
||||||
|
VDBG(cdev, "set_idle\n");
|
||||||
|
length = 0;
|
||||||
|
hidg->idle = value >> 8;
|
||||||
|
goto respond;
|
||||||
|
break;
|
||||||
|
|
||||||
case ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8
|
case ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8
|
||||||
| USB_REQ_GET_DESCRIPTOR):
|
| USB_REQ_GET_DESCRIPTOR):
|
||||||
switch (value >> 8) {
|
switch (value >> 8) {
|
||||||
@@ -779,6 +810,7 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f)
|
|||||||
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
|
hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass;
|
||||||
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
|
hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol;
|
||||||
hidg->protocol = HID_REPORT_PROTOCOL;
|
hidg->protocol = HID_REPORT_PROTOCOL;
|
||||||
|
hidg->idle = 1;
|
||||||
hidg_ss_in_ep_desc.wMaxPacketSize = cpu_to_le16(hidg->report_length);
|
hidg_ss_in_ep_desc.wMaxPacketSize = cpu_to_le16(hidg->report_length);
|
||||||
hidg_ss_in_comp_desc.wBytesPerInterval =
|
hidg_ss_in_comp_desc.wBytesPerInterval =
|
||||||
cpu_to_le16(hidg->report_length);
|
cpu_to_le16(hidg->report_length);
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ static struct usb_serial_driver ch341_device = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = "ch341-uart",
|
.name = "ch341-uart",
|
||||||
},
|
},
|
||||||
|
.bulk_in_size = 512,
|
||||||
.id_table = id_table,
|
.id_table = id_table,
|
||||||
.num_ports = 1,
|
.num_ports = 1,
|
||||||
.open = ch341_open,
|
.open = ch341_open,
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ static const struct usb_device_id id_table_combined[] = {
|
|||||||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
|
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
|
||||||
{ USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) },
|
{ USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) },
|
||||||
{ USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) },
|
{ USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) },
|
||||||
|
{ USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) },
|
||||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) },
|
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) },
|
||||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) },
|
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) },
|
||||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
|
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
|
||||||
|
|||||||
@@ -159,6 +159,9 @@
|
|||||||
/* Vardaan Enterprises Serial Interface VEUSB422R3 */
|
/* Vardaan Enterprises Serial Interface VEUSB422R3 */
|
||||||
#define FTDI_VARDAAN_PID 0xF070
|
#define FTDI_VARDAAN_PID 0xF070
|
||||||
|
|
||||||
|
/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */
|
||||||
|
#define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Xsens Technologies BV products (http://www.xsens.com).
|
* Xsens Technologies BV products (http://www.xsens.com).
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1203,6 +1203,8 @@ static const struct usb_device_id option_ids[] = {
|
|||||||
.driver_info = NCTRL(2) | RSVD(3) },
|
.driver_info = NCTRL(2) | RSVD(3) },
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */
|
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */
|
||||||
.driver_info = NCTRL(0) | RSVD(1) },
|
.driver_info = NCTRL(0) | RSVD(1) },
|
||||||
|
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */
|
||||||
|
.driver_info = NCTRL(2) | RSVD(3) },
|
||||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
|
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),
|
||||||
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
.driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },
|
||||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
|
||||||
|
|||||||
@@ -2523,7 +2523,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
|
|||||||
goto journal_error;
|
goto journal_error;
|
||||||
err = ext4_handle_dirty_dx_node(handle, dir,
|
err = ext4_handle_dirty_dx_node(handle, dir,
|
||||||
frame->bh);
|
frame->bh);
|
||||||
if (err)
|
if (restart || err)
|
||||||
goto journal_error;
|
goto journal_error;
|
||||||
} else {
|
} else {
|
||||||
struct dx_root *dxroot;
|
struct dx_root *dxroot;
|
||||||
|
|||||||
19
fs/pipe.c
19
fs/pipe.c
@@ -29,6 +29,21 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* New pipe buffers will be restricted to this size while the user is exceeding
|
||||||
|
* their pipe buffer quota. The general pipe use case needs at least two
|
||||||
|
* buffers: one for data yet to be read, and one for new data. If this is less
|
||||||
|
* than two, then a write to a non-empty pipe may block even if the pipe is not
|
||||||
|
* full. This can occur with GNU make jobserver or similar uses of pipes as
|
||||||
|
* semaphores: multiple processes may be waiting to write tokens back to the
|
||||||
|
* pipe before reading tokens: https://lore.kernel.org/lkml/1628086770.5rn8p04n6j.none@localhost/.
|
||||||
|
*
|
||||||
|
* Users can reduce their pipe buffers with F_SETPIPE_SZ below this at their
|
||||||
|
* own risk, namely: pipe writes to non-full pipes may block until the pipe is
|
||||||
|
* emptied.
|
||||||
|
*/
|
||||||
|
#define PIPE_MIN_DEF_BUFFERS 2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The max size that a non-root user is allowed to grow the pipe. Can
|
* The max size that a non-root user is allowed to grow the pipe. Can
|
||||||
* be set by root in /proc/sys/fs/pipe-max-size
|
* be set by root in /proc/sys/fs/pipe-max-size
|
||||||
@@ -654,8 +669,8 @@ struct pipe_inode_info *alloc_pipe_info(void)
|
|||||||
user_bufs = account_pipe_buffers(user, 0, pipe_bufs);
|
user_bufs = account_pipe_buffers(user, 0, pipe_bufs);
|
||||||
|
|
||||||
if (too_many_pipe_buffers_soft(user_bufs) && is_unprivileged_user()) {
|
if (too_many_pipe_buffers_soft(user_bufs) && is_unprivileged_user()) {
|
||||||
user_bufs = account_pipe_buffers(user, pipe_bufs, 1);
|
user_bufs = account_pipe_buffers(user, pipe_bufs, PIPE_MIN_DEF_BUFFERS);
|
||||||
pipe_bufs = 1;
|
pipe_bufs = PIPE_MIN_DEF_BUFFERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (too_many_pipe_buffers_hard(user_bufs) && is_unprivileged_user())
|
if (too_many_pipe_buffers_hard(user_bufs) && is_unprivileged_user())
|
||||||
|
|||||||
@@ -387,6 +387,24 @@ void pathrelse(struct treepath *search_path)
|
|||||||
search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET;
|
search_path->path_length = ILLEGAL_PATH_ELEMENT_OFFSET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int has_valid_deh_location(struct buffer_head *bh, struct item_head *ih)
|
||||||
|
{
|
||||||
|
struct reiserfs_de_head *deh;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
deh = B_I_DEH(bh, ih);
|
||||||
|
for (i = 0; i < ih_entry_count(ih); i++) {
|
||||||
|
if (deh_location(&deh[i]) > ih_item_len(ih)) {
|
||||||
|
reiserfs_warning(NULL, "reiserfs-5094",
|
||||||
|
"directory entry location seems wrong %h",
|
||||||
|
&deh[i]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int is_leaf(char *buf, int blocksize, struct buffer_head *bh)
|
static int is_leaf(char *buf, int blocksize, struct buffer_head *bh)
|
||||||
{
|
{
|
||||||
struct block_head *blkh;
|
struct block_head *blkh;
|
||||||
@@ -454,11 +472,14 @@ static int is_leaf(char *buf, int blocksize, struct buffer_head *bh)
|
|||||||
"(second one): %h", ih);
|
"(second one): %h", ih);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (is_direntry_le_ih(ih) && (ih_item_len(ih) < (ih_entry_count(ih) * IH_SIZE))) {
|
if (is_direntry_le_ih(ih)) {
|
||||||
reiserfs_warning(NULL, "reiserfs-5093",
|
if (ih_item_len(ih) < (ih_entry_count(ih) * IH_SIZE)) {
|
||||||
"item entry count seems wrong %h",
|
reiserfs_warning(NULL, "reiserfs-5093",
|
||||||
ih);
|
"item entry count seems wrong %h",
|
||||||
return 0;
|
ih);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return has_valid_deh_location(bh, ih);
|
||||||
}
|
}
|
||||||
prev_location = ih_location(ih);
|
prev_location = ih_location(ih);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2085,6 +2085,14 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
|
|||||||
unlock_new_inode(root_inode);
|
unlock_new_inode(root_inode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!S_ISDIR(root_inode->i_mode) || !inode_get_bytes(root_inode) ||
|
||||||
|
!root_inode->i_size) {
|
||||||
|
SWARN(silent, s, "", "corrupt root inode, run fsck");
|
||||||
|
iput(root_inode);
|
||||||
|
errval = -EUCLEAN;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
s->s_root = d_make_root(root_inode);
|
s->s_root = d_make_root(root_inode);
|
||||||
if (!s->s_root)
|
if (!s->s_root)
|
||||||
goto error;
|
goto error;
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ struct otg_fsm {
|
|||||||
struct mutex lock;
|
struct mutex lock;
|
||||||
u8 *host_req_flag;
|
u8 *host_req_flag;
|
||||||
struct delayed_work hnp_polling_work;
|
struct delayed_work hnp_polling_work;
|
||||||
|
bool hnp_work_inited;
|
||||||
bool state_changed;
|
bool state_changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1042,6 +1042,7 @@ struct hci_dev *hci_alloc_dev(void);
|
|||||||
void hci_free_dev(struct hci_dev *hdev);
|
void hci_free_dev(struct hci_dev *hdev);
|
||||||
int hci_register_dev(struct hci_dev *hdev);
|
int hci_register_dev(struct hci_dev *hdev);
|
||||||
void hci_unregister_dev(struct hci_dev *hdev);
|
void hci_unregister_dev(struct hci_dev *hdev);
|
||||||
|
void hci_cleanup_dev(struct hci_dev *hdev);
|
||||||
int hci_suspend_dev(struct hci_dev *hdev);
|
int hci_suspend_dev(struct hci_dev *hdev);
|
||||||
int hci_resume_dev(struct hci_dev *hdev);
|
int hci_resume_dev(struct hci_dev *hdev);
|
||||||
int hci_reset_dev(struct hci_dev *hdev);
|
int hci_reset_dev(struct hci_dev *hdev);
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
|
|||||||
|
|
||||||
static inline unsigned int ip6_skb_dst_mtu(struct sk_buff *skb)
|
static inline unsigned int ip6_skb_dst_mtu(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
int mtu;
|
unsigned int mtu;
|
||||||
|
|
||||||
struct ipv6_pinfo *np = skb->sk && !dev_recursion_level() ?
|
struct ipv6_pinfo *np = skb->sk && !dev_recursion_level() ?
|
||||||
inet6_sk(skb->sk) : NULL;
|
inet6_sk(skb->sk) : NULL;
|
||||||
|
|||||||
@@ -4727,6 +4727,10 @@ static const char readme_msg[] =
|
|||||||
"\t [:pause][:continue][:clear]\n"
|
"\t [:pause][:continue][:clear]\n"
|
||||||
"\t [:name=histname1]\n"
|
"\t [:name=histname1]\n"
|
||||||
"\t [if <filter>]\n\n"
|
"\t [if <filter>]\n\n"
|
||||||
|
"\t Note, special fields can be used as well:\n"
|
||||||
|
"\t common_timestamp - to record current timestamp\n"
|
||||||
|
"\t common_cpu - to record the CPU the event happened on\n"
|
||||||
|
"\n"
|
||||||
"\t When a matching event is hit, an entry is added to a hash\n"
|
"\t When a matching event is hit, an entry is added to a hash\n"
|
||||||
"\t table using the key(s) and value(s) named, and the value of a\n"
|
"\t table using the key(s) and value(s) named, and the value of a\n"
|
||||||
"\t sum called 'hitcount' is incremented. Keys and values\n"
|
"\t sum called 'hitcount' is incremented. Keys and values\n"
|
||||||
|
|||||||
@@ -1773,7 +1773,7 @@ static const char *hist_field_name(struct hist_field *field,
|
|||||||
field->flags & HIST_FIELD_FL_ALIAS)
|
field->flags & HIST_FIELD_FL_ALIAS)
|
||||||
field_name = hist_field_name(field->operands[0], ++level);
|
field_name = hist_field_name(field->operands[0], ++level);
|
||||||
else if (field->flags & HIST_FIELD_FL_CPU)
|
else if (field->flags & HIST_FIELD_FL_CPU)
|
||||||
field_name = "cpu";
|
field_name = "common_cpu";
|
||||||
else if (field->flags & HIST_FIELD_FL_EXPR ||
|
else if (field->flags & HIST_FIELD_FL_EXPR ||
|
||||||
field->flags & HIST_FIELD_FL_VAR_REF) {
|
field->flags & HIST_FIELD_FL_VAR_REF) {
|
||||||
if (field->system) {
|
if (field->system) {
|
||||||
@@ -2627,14 +2627,23 @@ parse_field(struct hist_trigger_data *hist_data, struct trace_event_file *file,
|
|||||||
hist_data->enable_timestamps = true;
|
hist_data->enable_timestamps = true;
|
||||||
if (*flags & HIST_FIELD_FL_TIMESTAMP_USECS)
|
if (*flags & HIST_FIELD_FL_TIMESTAMP_USECS)
|
||||||
hist_data->attrs->ts_in_usecs = true;
|
hist_data->attrs->ts_in_usecs = true;
|
||||||
} else if (strcmp(field_name, "cpu") == 0)
|
} else if (strcmp(field_name, "common_cpu") == 0)
|
||||||
*flags |= HIST_FIELD_FL_CPU;
|
*flags |= HIST_FIELD_FL_CPU;
|
||||||
else {
|
else {
|
||||||
field = trace_find_event_field(file->event_call, field_name);
|
field = trace_find_event_field(file->event_call, field_name);
|
||||||
if (!field || !field->size) {
|
if (!field || !field->size) {
|
||||||
hist_err("Couldn't find field: ", field_name);
|
/*
|
||||||
field = ERR_PTR(-EINVAL);
|
* For backward compatibility, if field_name
|
||||||
goto out;
|
* was "cpu", then we treat this the same as
|
||||||
|
* common_cpu.
|
||||||
|
*/
|
||||||
|
if (strcmp(field_name, "cpu") == 0) {
|
||||||
|
*flags |= HIST_FIELD_FL_CPU;
|
||||||
|
} else {
|
||||||
|
hist_err("Couldn't find field: ", field_name);
|
||||||
|
field = ERR_PTR(-EINVAL);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
@@ -2911,6 +2920,10 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
|
|||||||
|
|
||||||
expr->operands[0] = operand1;
|
expr->operands[0] = operand1;
|
||||||
expr->operands[1] = operand2;
|
expr->operands[1] = operand2;
|
||||||
|
|
||||||
|
/* The operand sizes should be the same, so just pick one */
|
||||||
|
expr->size = operand1->size;
|
||||||
|
|
||||||
expr->operator = field_op;
|
expr->operator = field_op;
|
||||||
expr->name = expr_str(expr, 0);
|
expr->name = expr_str(expr, 0);
|
||||||
expr->type = kstrdup(operand1->type, GFP_KERNEL);
|
expr->type = kstrdup(operand1->type, GFP_KERNEL);
|
||||||
@@ -5048,7 +5061,7 @@ static void hist_field_print(struct seq_file *m, struct hist_field *hist_field)
|
|||||||
seq_printf(m, "%s=", hist_field->var.name);
|
seq_printf(m, "%s=", hist_field->var.name);
|
||||||
|
|
||||||
if (hist_field->flags & HIST_FIELD_FL_CPU)
|
if (hist_field->flags & HIST_FIELD_FL_CPU)
|
||||||
seq_puts(m, "cpu");
|
seq_puts(m, "common_cpu");
|
||||||
else if (field_name) {
|
else if (field_name) {
|
||||||
if (hist_field->flags & HIST_FIELD_FL_VAR_REF ||
|
if (hist_field->flags & HIST_FIELD_FL_VAR_REF ||
|
||||||
hist_field->flags & HIST_FIELD_FL_ALIAS)
|
hist_field->flags & HIST_FIELD_FL_ALIAS)
|
||||||
|
|||||||
@@ -3261,14 +3261,10 @@ EXPORT_SYMBOL(hci_register_dev);
|
|||||||
/* Unregister HCI device */
|
/* Unregister HCI device */
|
||||||
void hci_unregister_dev(struct hci_dev *hdev)
|
void hci_unregister_dev(struct hci_dev *hdev)
|
||||||
{
|
{
|
||||||
int id;
|
|
||||||
|
|
||||||
BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
|
BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
|
||||||
|
|
||||||
hci_dev_set_flag(hdev, HCI_UNREGISTER);
|
hci_dev_set_flag(hdev, HCI_UNREGISTER);
|
||||||
|
|
||||||
id = hdev->id;
|
|
||||||
|
|
||||||
write_lock(&hci_dev_list_lock);
|
write_lock(&hci_dev_list_lock);
|
||||||
list_del(&hdev->list);
|
list_del(&hdev->list);
|
||||||
write_unlock(&hci_dev_list_lock);
|
write_unlock(&hci_dev_list_lock);
|
||||||
@@ -3297,7 +3293,14 @@ void hci_unregister_dev(struct hci_dev *hdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
device_del(&hdev->dev);
|
device_del(&hdev->dev);
|
||||||
|
/* Actual cleanup is deferred until hci_cleanup_dev(). */
|
||||||
|
hci_dev_put(hdev);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(hci_unregister_dev);
|
||||||
|
|
||||||
|
/* Cleanup HCI device */
|
||||||
|
void hci_cleanup_dev(struct hci_dev *hdev)
|
||||||
|
{
|
||||||
debugfs_remove_recursive(hdev->debugfs);
|
debugfs_remove_recursive(hdev->debugfs);
|
||||||
kfree_const(hdev->hw_info);
|
kfree_const(hdev->hw_info);
|
||||||
kfree_const(hdev->fw_info);
|
kfree_const(hdev->fw_info);
|
||||||
@@ -3320,11 +3323,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
|
|||||||
hci_discovery_filter_clear(hdev);
|
hci_discovery_filter_clear(hdev);
|
||||||
hci_dev_unlock(hdev);
|
hci_dev_unlock(hdev);
|
||||||
|
|
||||||
hci_dev_put(hdev);
|
ida_simple_remove(&hci_index_ida, hdev->id);
|
||||||
|
|
||||||
ida_simple_remove(&hci_index_ida, id);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(hci_unregister_dev);
|
|
||||||
|
|
||||||
/* Suspend HCI device */
|
/* Suspend HCI device */
|
||||||
int hci_suspend_dev(struct hci_dev *hdev)
|
int hci_suspend_dev(struct hci_dev *hdev)
|
||||||
|
|||||||
@@ -59,6 +59,17 @@ struct hci_pinfo {
|
|||||||
char comm[TASK_COMM_LEN];
|
char comm[TASK_COMM_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct hci_dev *hci_hdev_from_sock(struct sock *sk)
|
||||||
|
{
|
||||||
|
struct hci_dev *hdev = hci_pi(sk)->hdev;
|
||||||
|
|
||||||
|
if (!hdev)
|
||||||
|
return ERR_PTR(-EBADFD);
|
||||||
|
if (hci_dev_test_flag(hdev, HCI_UNREGISTER))
|
||||||
|
return ERR_PTR(-EPIPE);
|
||||||
|
return hdev;
|
||||||
|
}
|
||||||
|
|
||||||
void hci_sock_set_flag(struct sock *sk, int nr)
|
void hci_sock_set_flag(struct sock *sk, int nr)
|
||||||
{
|
{
|
||||||
set_bit(nr, &hci_pi(sk)->flags);
|
set_bit(nr, &hci_pi(sk)->flags);
|
||||||
@@ -752,19 +763,13 @@ void hci_sock_dev_event(struct hci_dev *hdev, int event)
|
|||||||
if (event == HCI_DEV_UNREG) {
|
if (event == HCI_DEV_UNREG) {
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
/* Detach sockets from device */
|
/* Wake up sockets using this dead device */
|
||||||
read_lock(&hci_sk_list.lock);
|
read_lock(&hci_sk_list.lock);
|
||||||
sk_for_each(sk, &hci_sk_list.head) {
|
sk_for_each(sk, &hci_sk_list.head) {
|
||||||
lock_sock(sk);
|
|
||||||
if (hci_pi(sk)->hdev == hdev) {
|
if (hci_pi(sk)->hdev == hdev) {
|
||||||
hci_pi(sk)->hdev = NULL;
|
|
||||||
sk->sk_err = EPIPE;
|
sk->sk_err = EPIPE;
|
||||||
sk->sk_state = BT_OPEN;
|
|
||||||
sk->sk_state_change(sk);
|
sk->sk_state_change(sk);
|
||||||
|
|
||||||
hci_dev_put(hdev);
|
|
||||||
}
|
}
|
||||||
release_sock(sk);
|
|
||||||
}
|
}
|
||||||
read_unlock(&hci_sk_list.lock);
|
read_unlock(&hci_sk_list.lock);
|
||||||
}
|
}
|
||||||
@@ -923,10 +928,10 @@ static int hci_sock_blacklist_del(struct hci_dev *hdev, void __user *arg)
|
|||||||
static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd,
|
static int hci_sock_bound_ioctl(struct sock *sk, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
struct hci_dev *hdev = hci_pi(sk)->hdev;
|
struct hci_dev *hdev = hci_hdev_from_sock(sk);
|
||||||
|
|
||||||
if (!hdev)
|
if (IS_ERR(hdev))
|
||||||
return -EBADFD;
|
return PTR_ERR(hdev);
|
||||||
|
|
||||||
if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL))
|
if (hci_dev_test_flag(hdev, HCI_USER_CHANNEL))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
@@ -1080,6 +1085,18 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr,
|
|||||||
|
|
||||||
lock_sock(sk);
|
lock_sock(sk);
|
||||||
|
|
||||||
|
/* Allow detaching from dead device and attaching to alive device, if
|
||||||
|
* the caller wants to re-bind (instead of close) this socket in
|
||||||
|
* response to hci_sock_dev_event(HCI_DEV_UNREG) notification.
|
||||||
|
*/
|
||||||
|
hdev = hci_pi(sk)->hdev;
|
||||||
|
if (hdev && hci_dev_test_flag(hdev, HCI_UNREGISTER)) {
|
||||||
|
hci_pi(sk)->hdev = NULL;
|
||||||
|
sk->sk_state = BT_OPEN;
|
||||||
|
hci_dev_put(hdev);
|
||||||
|
}
|
||||||
|
hdev = NULL;
|
||||||
|
|
||||||
if (sk->sk_state == BT_BOUND) {
|
if (sk->sk_state == BT_BOUND) {
|
||||||
err = -EALREADY;
|
err = -EALREADY;
|
||||||
goto done;
|
goto done;
|
||||||
@@ -1356,9 +1373,9 @@ static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
|
|||||||
|
|
||||||
lock_sock(sk);
|
lock_sock(sk);
|
||||||
|
|
||||||
hdev = hci_pi(sk)->hdev;
|
hdev = hci_hdev_from_sock(sk);
|
||||||
if (!hdev) {
|
if (IS_ERR(hdev)) {
|
||||||
err = -EBADFD;
|
err = PTR_ERR(hdev);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1718,9 +1735,9 @@ static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdev = hci_pi(sk)->hdev;
|
hdev = hci_hdev_from_sock(sk);
|
||||||
if (!hdev) {
|
if (IS_ERR(hdev)) {
|
||||||
err = -EBADFD;
|
err = PTR_ERR(hdev);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
|
|||||||
static void bt_host_release(struct device *dev)
|
static void bt_host_release(struct device *dev)
|
||||||
{
|
{
|
||||||
struct hci_dev *hdev = to_hci_dev(dev);
|
struct hci_dev *hdev = to_hci_dev(dev);
|
||||||
|
|
||||||
|
if (hci_dev_test_flag(hdev, HCI_UNREGISTER))
|
||||||
|
hci_cleanup_dev(hdev);
|
||||||
kfree(hdev);
|
kfree(hdev);
|
||||||
module_put(THIS_MODULE);
|
module_put(THIS_MODULE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -880,14 +880,18 @@ int sctp_auth_set_key(struct sctp_endpoint *ep,
|
|||||||
memcpy(key->data, &auth_key->sca_key[0], auth_key->sca_keylength);
|
memcpy(key->data, &auth_key->sca_key[0], auth_key->sca_keylength);
|
||||||
cur_key->key = key;
|
cur_key->key = key;
|
||||||
|
|
||||||
if (replace) {
|
if (!replace) {
|
||||||
list_del_init(&shkey->key_list);
|
list_add(&cur_key->key_list, sh_keys);
|
||||||
sctp_auth_shkey_release(shkey);
|
return 0;
|
||||||
if (asoc && asoc->active_key_id == auth_key->sca_keynumber)
|
|
||||||
sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list_del_init(&shkey->key_list);
|
||||||
|
sctp_auth_shkey_release(shkey);
|
||||||
list_add(&cur_key->key_list, sh_keys);
|
list_add(&cur_key->key_list, sh_keys);
|
||||||
|
|
||||||
|
if (asoc && asoc->active_key_id == auth_key->sca_keynumber)
|
||||||
|
sctp_auth_asoc_init_active_key(asoc, GFP_KERNEL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Usage:
|
|||||||
$ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func
|
$ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func
|
||||||
Wait some times but not too much, the script is a bit slow.
|
Wait some times but not too much, the script is a bit slow.
|
||||||
Break the pipe (Ctrl + Z)
|
Break the pipe (Ctrl + Z)
|
||||||
$ scripts/draw_functrace.py < raw_trace_func > draw_functrace
|
$ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace
|
||||||
Then you have your drawn trace in draw_functrace
|
Then you have your drawn trace in draw_functrace
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -103,10 +103,10 @@ def parseLine(line):
|
|||||||
line = line.strip()
|
line = line.strip()
|
||||||
if line.startswith("#"):
|
if line.startswith("#"):
|
||||||
raise CommentLineException
|
raise CommentLineException
|
||||||
m = re.match("[^]]+?\\] +([0-9.]+): (\\w+) <-(\\w+)", line)
|
m = re.match("[^]]+?\\] +([a-z.]+) +([0-9.]+): (\\w+) <-(\\w+)", line)
|
||||||
if m is None:
|
if m is None:
|
||||||
raise BrokenLineException
|
raise BrokenLineException
|
||||||
return (m.group(1), m.group(2), m.group(3))
|
return (m.group(2), m.group(3), m.group(4))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -532,10 +532,11 @@ static int check_and_subscribe_port(struct snd_seq_client *client,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void delete_and_unsubscribe_port(struct snd_seq_client *client,
|
/* called with grp->list_mutex held */
|
||||||
struct snd_seq_client_port *port,
|
static void __delete_and_unsubscribe_port(struct snd_seq_client *client,
|
||||||
struct snd_seq_subscribers *subs,
|
struct snd_seq_client_port *port,
|
||||||
bool is_src, bool ack)
|
struct snd_seq_subscribers *subs,
|
||||||
|
bool is_src, bool ack)
|
||||||
{
|
{
|
||||||
struct snd_seq_port_subs_info *grp;
|
struct snd_seq_port_subs_info *grp;
|
||||||
struct list_head *list;
|
struct list_head *list;
|
||||||
@@ -543,7 +544,6 @@ static void delete_and_unsubscribe_port(struct snd_seq_client *client,
|
|||||||
|
|
||||||
grp = is_src ? &port->c_src : &port->c_dest;
|
grp = is_src ? &port->c_src : &port->c_dest;
|
||||||
list = is_src ? &subs->src_list : &subs->dest_list;
|
list = is_src ? &subs->src_list : &subs->dest_list;
|
||||||
down_write(&grp->list_mutex);
|
|
||||||
write_lock_irq(&grp->list_lock);
|
write_lock_irq(&grp->list_lock);
|
||||||
empty = list_empty(list);
|
empty = list_empty(list);
|
||||||
if (!empty)
|
if (!empty)
|
||||||
@@ -553,6 +553,18 @@ static void delete_and_unsubscribe_port(struct snd_seq_client *client,
|
|||||||
|
|
||||||
if (!empty)
|
if (!empty)
|
||||||
unsubscribe_port(client, port, grp, &subs->info, ack);
|
unsubscribe_port(client, port, grp, &subs->info, ack);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void delete_and_unsubscribe_port(struct snd_seq_client *client,
|
||||||
|
struct snd_seq_client_port *port,
|
||||||
|
struct snd_seq_subscribers *subs,
|
||||||
|
bool is_src, bool ack)
|
||||||
|
{
|
||||||
|
struct snd_seq_port_subs_info *grp;
|
||||||
|
|
||||||
|
grp = is_src ? &port->c_src : &port->c_dest;
|
||||||
|
down_write(&grp->list_mutex);
|
||||||
|
__delete_and_unsubscribe_port(client, port, subs, is_src, ack);
|
||||||
up_write(&grp->list_mutex);
|
up_write(&grp->list_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,27 +620,30 @@ int snd_seq_port_disconnect(struct snd_seq_client *connector,
|
|||||||
struct snd_seq_client_port *dest_port,
|
struct snd_seq_client_port *dest_port,
|
||||||
struct snd_seq_port_subscribe *info)
|
struct snd_seq_port_subscribe *info)
|
||||||
{
|
{
|
||||||
struct snd_seq_port_subs_info *src = &src_port->c_src;
|
struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
|
||||||
struct snd_seq_subscribers *subs;
|
struct snd_seq_subscribers *subs;
|
||||||
int err = -ENOENT;
|
int err = -ENOENT;
|
||||||
|
|
||||||
down_write(&src->list_mutex);
|
/* always start from deleting the dest port for avoiding concurrent
|
||||||
|
* deletions
|
||||||
|
*/
|
||||||
|
down_write(&dest->list_mutex);
|
||||||
/* look for the connection */
|
/* look for the connection */
|
||||||
list_for_each_entry(subs, &src->list_head, src_list) {
|
list_for_each_entry(subs, &dest->list_head, dest_list) {
|
||||||
if (match_subs_info(info, &subs->info)) {
|
if (match_subs_info(info, &subs->info)) {
|
||||||
atomic_dec(&subs->ref_count); /* mark as not ready */
|
__delete_and_unsubscribe_port(dest_client, dest_port,
|
||||||
|
subs, false,
|
||||||
|
connector->number != dest_client->number);
|
||||||
err = 0;
|
err = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
up_write(&src->list_mutex);
|
up_write(&dest->list_mutex);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
delete_and_unsubscribe_port(src_client, src_port, subs, true,
|
delete_and_unsubscribe_port(src_client, src_port, subs, true,
|
||||||
connector->number != src_client->number);
|
connector->number != src_client->number);
|
||||||
delete_and_unsubscribe_port(dest_client, dest_port, subs, false,
|
|
||||||
connector->number != dest_client->number);
|
|
||||||
kfree(subs);
|
kfree(subs);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,6 +296,12 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip,
|
|||||||
selector->baCSourceID[ret - 1],
|
selector->baCSourceID[ret - 1],
|
||||||
visited, validate);
|
visited, validate);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
|
/*
|
||||||
|
* For Samsung USBC Headset (AKG), setting clock selector again
|
||||||
|
* will result in incorrect default clock setting problems
|
||||||
|
*/
|
||||||
|
if (chip->usb_id == USB_ID(0x04e8, 0xa051))
|
||||||
|
return ret;
|
||||||
err = uac_clock_selector_set_val(chip, entity_id, cur);
|
err = uac_clock_selector_set_val(chip, entity_id, cur);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -1552,6 +1552,7 @@ static const struct registration_quirk registration_quirks[] = {
|
|||||||
REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
|
REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */
|
||||||
|
REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2), /* JBL Quantum 600 */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */
|
||||||
{ 0 } /* terminator */
|
{ 0 } /* terminator */
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user