mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
Merge tag 'android11-5.4.296_r00' into android11-5.4
This merges the android11-5.4.296_r00 tag into the android11-5.4 branch, catching it up with the latest LTS releases. It contains the following commits: *4b4c88cf07Merge android11-5.4 into android11-5.4-lts *76f454157dRevert "drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling" *02f0aeffc1Merge 5.4.296 into android11-5.4-lts *04b7726c3cLinux 5.4.296 *ecdb232730net: ipv6: Discard next-hop MTU less than minimum link MTU *b2fdd7f1b6x86/mm: Disable hugetlb page table sharing on 32-bit *e690296886Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID *35f1a5360aHID: quirks: Add quirk for 2 Chicony Electronics HP 5MP Cameras *99599f9989HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY *7549410b27vt: add missing notification when switching back to text mode *1987e681eanet: usb: qmi_wwan: add SIMCom 8230C composition *553017c66eatm: idt77252: Add missing `dma_map_error()` *e260f4d493bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT *2da77aa6a5bnxt_en: Fix DCB ETS validation *6807ef101bcan: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level *7c0beeab3anet: phy: microchip: limit 100M workaround to link-down events on LAN88xx *b92bedf71fnet: appletalk: Fix device refcount leak in atrtr_create() *d8a6853d00md/raid1: Fix stack memory use after return in raid1_reshape *c1958270dewifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev() *b96d700a2adma-buf: fix timeout handling in dma_resv_wait_timeout v2 *221244b0bdInput: xpad - support Acer NGR 200 Controller *6edf13f159Input: xpad - add VID for Turtle Beach controllers *f01afc1e46Input: xpad - add support for Amazon Game Controller *5f5239363cNFSv4/flexfiles: Fix handling of NFS level errors in I/O *9b6f73ae10flexfiles/pNFS: update stats on NFS4ERR_DELAY for v4.1 DSes *c60a54b3b4RDMA/mlx5: Fix vport loopback for MPV device *07100f3ba5netlink: Fix rmem check in netlink_broadcast_deliver(). *23791e9242netlink: make sure we allow at least one dump skb *2a668b1707pwm: mediatek: Ensure to disable clocks in error path *e0098a1193Revert "ACPI: battery: negate current when discharging" *18d58a467cusb: gadget: u_serial: Fix race condition in TTY wakeup *549a9c78c3drm/sched: Increment job count before swapping tail spsc queue *6a89563ccfpinctrl: qcom: msm: mark certain pins as invalid for interrupts *7c2bc303a0x86/mce: Make sure CMCI banks are cleared during shutdown on Intel *d6720de3bdx86/mce: Don't remove sysfs if thresholding sysfs init fails *a3e80b2fccx86/mce/amd: Fix threshold limit reset *bf0ca6a1bcrxrpc: Fix oops due to non-existence of prealloc backlog struct *923a276c74net/sched: Abort __tc_modify_qdisc if parent class does not exist *9ec7e943aeatm: clip: Fix NULL pointer dereference in vcc_sendmsg() *f493f31a63atm: clip: Fix infinite recursive call of clip_push(). *2fb37ab322atm: clip: Fix memory leak of struct clip_vcc. *a4c5785febatm: clip: Fix potential null-ptr-deref in to_atmarpd(). *03dcdd2558tipc: Fix use-after-free in tipc_conn_close(). *9da025150bnetlink: Fix wraparounds of sk->sk_rmem_alloc. *16a58e9a17fix proc_sys_compare() handling of in-lookup dentries *42e9cf27c0proc: Clear the pieces of proc_inode that proc_evict_inode cares about *b4e72c0bf8drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling *a801f7b08bstaging: rtl8723bs: Avoid memset() in aes_cipher() and aes_decipher() *e9bd89e6e7media: uvcvideo: Rollback non processed entities on error *daf9c48d79media: uvcvideo: Send control events for partial succeeds *a99f3157a7media: uvcvideo: Return the number of processed controls *82191a21a0ACPI: PAD: fix crash in exit_round_robin() *749d907673usb: typec: displayport: Fix potential deadlock *0722035aefLogitech C-270 even more broken *94e0918e39rose: fix dangling neighbour pointers in rose_rt_device_down() *9de013fa77net: rose: Fix fall-through warnings for Clang *60b7577308drm/i915/gt: Fix timeline left held on VMA alloc error *6d2d741052drm/i915/selftests: Change mock_request() to return error pointers *fb6c27aaf3spi: spi-fsl-dspi: Clear completion counter before initiating transfer *50a387e1f7spi: spi-fsl-dspi: Fix interrupt-less DMA mode taking an XSPI code path *3f6491c3bcspi: spi-fsl-dspi: Rename fifo_{read,write} and {tx,cmd}_fifo_write *3cef0d2afbdpaa2-eth: fix xdp_rxq_info leak *568a6afd1dethernet: atl1: Add missing DMA mapping error checks and count errors *e2dec6cdb6btrfs: use btrfs_record_snapshot_destroy() during rmdir *ef761ccefcbtrfs: propagate last_unlink_trans earlier when doing a rmdir *c6f8ded6a6RDMA/mlx5: Fix CC counters query for MPV *40af2a153dRDMA/core: Create and destroy counters in the ib_core *eaf0a33edfscsi: ufs: core: Fix spelling of a sysfs attribute name *b9c403d123drm/v3d: Disable interrupts before resetting the GPU *ea4664dff8mtk-sd: reset host->mrq on prepare_data() error *5ac9e9e2e9mtk-sd: Prevent memory corruption from DMA map failure *0f495797f5mmc: mediatek: use data instead of mrq parameter from msdc_{un}prepare_data() *a3cd5ae7beregulator: gpio: Fix the out-of-bounds access to drvdata::gpiods *285e4fb525regulator: gpio: Add input_supply support in gpio_regulator_config *b49d224d18ACPICA: Refuse to evaluate a method if arguments are missing *7a2afdc5afwifi: ath6kl: remove WARN on bad firmware input *48293b9cdewifi: mac80211: drop invalid source address OCB frames *f2aec1069fpowerpc: Fix struct termio related ioctl macros *2b61eebbd0ata: pata_cs5536: fix build on 32-bit UML *78c0ba1d1cALSA: sb: Force to disable DMAs once when DMA mode is changed *3b290923adnet/sched: Always pass notifications when child class becomes empty *73c38e679anui: Fix dma_mapping_error() check *32bc854b8fenic: fix incorrect MTU comparison in enic_change_mtu() *0247896973amd-xgbe: align CL37 AN sequence as per databook *80e9028f5clib: test_objagg: Set error message in check_expect_hints_stats() *71ac65ebd9drm/exynos: fimd: Guard display clock control with runtime PM calls *9b506d95bbbtrfs: fix missing error handling when searching for inode refs during log replay *5e6d24e635scsi: qla4xxx: Fix missing DMA mapping error in qla4xxx_alloc_pdu() *8785701fd7nfs: Clean up /proc/net/rpc/nfs when nfs_fs_proc_net_init() fails. *716b555fc0RDMA/mlx5: Initialize obj_event->obj_sub_list before xa_insert *7121f483bdplatform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment *35fcc9ea84mtk-sd: Fix a pagefault in dma_unmap_sg() for not prepared data *c93bc95978usb: typec: altmodes/displayport: do not index invalid pin_assignments *e7e914942bRevert "mmc: sdhci: Disable SD card clock before changing parameters" *8e56691a97mmc: sdhci: Add a helper function for dump register in dynamic debug mode *19c2cc01ffvsock/vmci: Clear the vmci transport packet properly when initializing it *c069415640btrfs: don't abort filesystem when attempting to snapshot deleted subvolume *a7ae98c219arm64: Restrict pagetable teardown to avoid false warning *88e47ded17s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS *c1a4677f7cdrm/bridge: cdns-dsi: Check return value when getting default PHY config *7aa42abc8ddrm/bridge: cdns-dsi: Fix connecting to next bridge *0ad3721400drm/bridge: cdns-dsi: Fix the clock variable for mode_valid() *e52589c016drm/tegra: Assign plane type before registration *57b0ad4f5cHID: wacom: fix kobject reference count leak *ee49c0e99aHID: wacom: fix memory leak on sysfs attribute creation failure *e0d646954bHID: wacom: fix memory leak on kobject creation failure *a30260dcf2dm-raid: fix variable in journal device check *397df6d957Bluetooth: L2CAP: Fix L2CAP MTU negotiation *2a8dcee649atm: Release atm_dev_mutex after removing procfs in atm_dev_deregister(). *a434395b00net: enetc: Correct endianness handling in _enetc_rd_reg64 *a304adc2c7um: ubd: Add missing error check in start_io_thread() *04ec06adf8vsock/uapi: fix linux/vm_sockets.h userspace compilation errors *14f42b7be2wifi: mac80211: fix beacon interval calculation overflow *5925f9f229attach_recursive_mnt(): do not lock the covering tree when sliding something under it *24ff7d465cALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() *585be561e5i2c: robotfuzz-osif: disable zero-length read messages *e34167aee4i2c: tiny-usb: disable zero-length read messages *013dcdf6f0RDMA/iwcm: Fix use-after-free of work objects after cm_id destruction *33e120ff07RDMA/core: Use refcount_t instead of atomic_t on refcount of iwcm_id_private *57597d8db5media: vivid: Change the siize of the composing *725a7c2a73media: omap3isp: use sgtable-based scatterlist wrappers *77829a5f5amedia: cxusb: no longer judge rbuf when the write fails *1301d405cdmedia: cxusb: use dev_dbg() rather than hand-rolled debug *95ae5ee606jfs: validate AG parameters in dbMount() to prevent crashes *7d17153a85fs/jfs: consolidate sanity checking in dbMount *80efe2d9ceASoC: meson: meson-card-utils: use of_property_present() for DT parsing *f1195eb224of: Add of_property_present() helper *9c4736267cof: property: define of_property_read_u{8,16,32,64}_array() unconditionally *20fa617fe4kbuild: hdrcheck: fix cross build with clang *25661f954bkbuild: add --target to correctly cross-compile UAPI headers with Clang *223f497f05bpfilter: match bit size of bpfilter_umh to that of the kernel *4451642747kbuild: use -MMD instead of -MD to exclude system headers from dependency *74095bbbb1VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notify *b4239bfb26VMCI: check context->notify_page after call to get_user_pages_fast() to avoid GPF *094353c10fovl: Check for NULL d_inode() in ovl_dentry_upper() *6fd52bfecdceph: fix possible integer overflow in ceph_zero_objects() *471722bb5bALSA: hda: Ignore unsol events for cards being shut down *e0359c66c1usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode *df6701168ausb: cdc-wdm: avoid setting WDM_READ for ZLP-s *13d8f52c88usb: Add checks for snprintf() calls in usb_alloc_dev() *5015eed450tty: serial: uartlite: register uart driver in init *0861b9cb2fusb: potential integer overflow in usbg_make_tpg() *70ee697bf1iio: pressure: zpa2326: Use aligned_s64 for the timestamp *6b23e4e713md/md-bitmap: fix dm-raid max_write_behind setting *fce4e6a548dmaengine: xilinx_dma: Set dma_device directions *2ad0c96d44mfd: max14577: Fix wakeup source leaks on device unbind *48f8227a65mailbox: Not protect module_put with spin_lock_irqsave *8161046920cifs: Fix cifs_query_path_info() for Windows NT servers Change-Id: I846696f18af0af53cdc74e698d6a529ad06d7c12 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
4d9a721965
131 changed files with 1169 additions and 666 deletions
|
|
@ -589,7 +589,7 @@ Description: This file shows the thin provisioning type. This is one of
|
|||
about the descriptor could be found at UFS specifications 2.1.
|
||||
The file is read only.
|
||||
|
||||
What: /sys/class/scsi_device/*/device/unit_descriptor/physical_memory_resourse_count
|
||||
What: /sys/class/scsi_device/*/device/unit_descriptor/physical_memory_resource_count
|
||||
Date: February 2018
|
||||
Contact: Stanislav Nijnikov <stanislav.nijnikov@wdc.com>
|
||||
Description: This file shows the total physical memory resources. This is
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 295
|
||||
SUBLEVEL = 296
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
|
|
|||
|
|
@ -1041,7 +1041,8 @@ int pud_free_pmd_page(pud_t *pudp, unsigned long addr)
|
|||
next = addr;
|
||||
end = addr + PUD_SIZE;
|
||||
do {
|
||||
pmd_free_pte_page(pmdp, next);
|
||||
if (pmd_present(READ_ONCE(*pmdp)))
|
||||
pmd_free_pte_page(pmdp, next);
|
||||
} while (pmdp++, next += PMD_SIZE, next != end);
|
||||
|
||||
pud_clear(pudp);
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
#define TCSETSW _IOW('t', 21, struct termios)
|
||||
#define TCSETSF _IOW('t', 22, struct termios)
|
||||
|
||||
#define TCGETA _IOR('t', 23, struct termio)
|
||||
#define TCSETA _IOW('t', 24, struct termio)
|
||||
#define TCSETAW _IOW('t', 25, struct termio)
|
||||
#define TCSETAF _IOW('t', 28, struct termio)
|
||||
#define TCGETA 0x40147417 /* _IOR('t', 23, struct termio) */
|
||||
#define TCSETA 0x80147418 /* _IOW('t', 24, struct termio) */
|
||||
#define TCSETAW 0x80147419 /* _IOW('t', 25, struct termio) */
|
||||
#define TCSETAF 0x8014741c /* _IOW('t', 28, struct termio) */
|
||||
|
||||
#define TCSBRK _IO('t', 29)
|
||||
#define TCXONC _IO('t', 30)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ endif
|
|||
aflags_dwarf := -Wa,-gdwarf-2
|
||||
KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__
|
||||
KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf))
|
||||
KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2
|
||||
KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -std=gnu11
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ GCOV_PROFILE := n
|
|||
UBSAN_SANITIZE := n
|
||||
KASAN_SANITIZE := n
|
||||
|
||||
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
|
||||
KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes
|
||||
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
|
||||
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
|
||||
KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ int start_io_thread(unsigned long sp, int *fd_out)
|
|||
*fd_out = fds[1];
|
||||
|
||||
err = os_set_fd_block(*fd_out, 0);
|
||||
err = os_set_fd_block(kernel_fd, 0);
|
||||
err |= os_set_fd_block(kernel_fd, 0);
|
||||
if (err) {
|
||||
printk("start_io_thread - failed to set nonblocking I/O.\n");
|
||||
goto out_close;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ config X86
|
|||
select ARCH_USE_QUEUED_SPINLOCKS
|
||||
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
|
||||
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
|
||||
select ARCH_WANT_HUGE_PMD_SHARE
|
||||
select ARCH_WANT_HUGE_PMD_SHARE if X86_64
|
||||
select ARCH_WANTS_THP_SWAP if X86_64
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
select CLKEVT_I8253
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ static void smca_configure(unsigned int bank, unsigned int cpu)
|
|||
|
||||
struct thresh_restart {
|
||||
struct threshold_block *b;
|
||||
int reset;
|
||||
int set_lvt_off;
|
||||
int lvt_off;
|
||||
u16 old_limit;
|
||||
|
|
@ -381,13 +380,13 @@ static void threshold_restart_bank(void *_tr)
|
|||
|
||||
rdmsr(tr->b->address, lo, hi);
|
||||
|
||||
if (tr->b->threshold_limit < (hi & THRESHOLD_MAX))
|
||||
tr->reset = 1; /* limit cannot be lower than err count */
|
||||
|
||||
if (tr->reset) { /* reset err count and overflow bit */
|
||||
hi =
|
||||
(hi & ~(MASK_ERR_COUNT_HI | MASK_OVERFLOW_HI)) |
|
||||
(THRESHOLD_MAX - tr->b->threshold_limit);
|
||||
/*
|
||||
* Reset error count and overflow bit.
|
||||
* This is done during init or after handling an interrupt.
|
||||
*/
|
||||
if (hi & MASK_OVERFLOW_HI || tr->set_lvt_off) {
|
||||
hi &= ~(MASK_ERR_COUNT_HI | MASK_OVERFLOW_HI);
|
||||
hi |= THRESHOLD_MAX - tr->b->threshold_limit;
|
||||
} else if (tr->old_limit) { /* change limit w/o reset */
|
||||
int new_count = (hi & THRESHOLD_MAX) +
|
||||
(tr->old_limit - tr->b->threshold_limit);
|
||||
|
|
|
|||
|
|
@ -2464,15 +2464,9 @@ static int mce_cpu_dead(unsigned int cpu)
|
|||
static int mce_cpu_online(unsigned int cpu)
|
||||
{
|
||||
struct timer_list *t = this_cpu_ptr(&mce_timer);
|
||||
int ret;
|
||||
|
||||
mce_device_create(cpu);
|
||||
|
||||
ret = mce_threshold_create_device(cpu);
|
||||
if (ret) {
|
||||
mce_device_remove(cpu);
|
||||
return ret;
|
||||
}
|
||||
mce_threshold_create_device(cpu);
|
||||
mce_reenable_cpu();
|
||||
mce_start_timer(t);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -516,4 +516,5 @@ void mce_intel_feature_init(struct cpuinfo_x86 *c)
|
|||
void mce_intel_feature_clear(struct cpuinfo_x86 *c)
|
||||
{
|
||||
intel_clear_lmce();
|
||||
cmci_clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,8 +128,11 @@ static void round_robin_cpu(unsigned int tsk_index)
|
|||
static void exit_round_robin(unsigned int tsk_index)
|
||||
{
|
||||
struct cpumask *pad_busy_cpus = to_cpumask(pad_busy_cpus_bits);
|
||||
cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);
|
||||
tsk_in_cpu[tsk_index] = -1;
|
||||
|
||||
if (tsk_in_cpu[tsk_index] != -1) {
|
||||
cpumask_clear_cpu(tsk_in_cpu[tsk_index], pad_busy_cpus);
|
||||
tsk_in_cpu[tsk_index] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int idle_pct = 5; /* percentage */
|
||||
|
|
|
|||
|
|
@ -483,6 +483,13 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
|
|||
return_ACPI_STATUS(AE_NULL_OBJECT);
|
||||
}
|
||||
|
||||
if (this_walk_state->num_operands < obj_desc->method.param_count) {
|
||||
ACPI_ERROR((AE_INFO, "Missing argument for method [%4.4s]",
|
||||
acpi_ut_get_node_name(method_node)));
|
||||
|
||||
return_ACPI_STATUS(AE_AML_UNINITIALIZED_ARG);
|
||||
}
|
||||
|
||||
/* Init for new method, possibly wait on method mutex */
|
||||
|
||||
status =
|
||||
|
|
|
|||
|
|
@ -266,23 +266,10 @@ static int acpi_battery_get_property(struct power_supply *psy,
|
|||
break;
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
case POWER_SUPPLY_PROP_POWER_NOW:
|
||||
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN) {
|
||||
if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
|
||||
ret = -ENODEV;
|
||||
break;
|
||||
}
|
||||
|
||||
val->intval = battery->rate_now * 1000;
|
||||
/*
|
||||
* When discharging, the current should be reported as a
|
||||
* negative number as per the power supply class interface
|
||||
* definition.
|
||||
*/
|
||||
if (psp == POWER_SUPPLY_PROP_CURRENT_NOW &&
|
||||
(battery->state & ACPI_BATTERY_STATE_DISCHARGING) &&
|
||||
acpi_battery_handle_discharging(battery)
|
||||
== POWER_SUPPLY_STATUS_DISCHARGING)
|
||||
val->intval = -val->intval;
|
||||
|
||||
else
|
||||
val->intval = battery->rate_now * 1000;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
|
||||
case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <scsi/scsi_host.h>
|
||||
#include <linux/dmi.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
#if defined(CONFIG_X86) && defined(CONFIG_X86_32)
|
||||
#include <asm/msr.h>
|
||||
static int use_msr;
|
||||
module_param_named(msr, use_msr, int, 0644);
|
||||
|
|
|
|||
|
|
@ -849,6 +849,8 @@ queue_skb(struct idt77252_dev *card, struct vc_map *vc,
|
|||
|
||||
IDT77252_PRV_PADDR(skb) = dma_map_single(&card->pcidev->dev, skb->data,
|
||||
skb->len, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&card->pcidev->dev, IDT77252_PRV_PADDR(skb)))
|
||||
return -ENOMEM;
|
||||
|
||||
error = -EINVAL;
|
||||
|
||||
|
|
@ -1862,6 +1864,8 @@ add_rx_skb(struct idt77252_dev *card, int queue,
|
|||
paddr = dma_map_single(&card->pcidev->dev, skb->data,
|
||||
skb_end_pointer(skb) - skb->data,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&card->pcidev->dev, paddr))
|
||||
goto outpoolrm;
|
||||
IDT77252_PRV_PADDR(skb) = paddr;
|
||||
|
||||
if (push_rx_skb(card, skb, queue)) {
|
||||
|
|
@ -1876,6 +1880,7 @@ outunmap:
|
|||
dma_unmap_single(&card->pcidev->dev, IDT77252_PRV_PADDR(skb),
|
||||
skb_end_pointer(skb) - skb->data, DMA_FROM_DEVICE);
|
||||
|
||||
outpoolrm:
|
||||
handle = IDT77252_PRV_POOL(skb);
|
||||
card->sbpool[POOL_QUEUE(handle)].skb[POOL_INDEX(handle)] = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -558,10 +558,13 @@ retry:
|
|||
goto retry;
|
||||
}
|
||||
|
||||
ret = dma_fence_wait_timeout(fence, intr, ret);
|
||||
ret = dma_fence_wait_timeout(fence, intr, timeout);
|
||||
dma_fence_put(fence);
|
||||
if (ret > 0 && wait_all && (i + 1 < shared_count))
|
||||
goto retry;
|
||||
/* Even for zero timeout the return value is 1 */
|
||||
if (ret > 0 && timeout == 0)
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -2490,6 +2490,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
xdev->common.directions |= chan->direction;
|
||||
|
||||
/* Request the interrupt */
|
||||
chan->irq = irq_of_parse_and_map(node, 0);
|
||||
err = request_irq(chan->irq, xilinx_dma_irq_handler, IRQF_SHARED,
|
||||
|
|
|
|||
|
|
@ -609,15 +609,18 @@ static int cdns_dsi_check_conf(struct cdns_dsi *dsi,
|
|||
struct phy_configure_opts_mipi_dphy *phy_cfg = &output->phy_opts.mipi_dphy;
|
||||
unsigned long dsi_hss_hsa_hse_hbp;
|
||||
unsigned int nlanes = output->dev->lanes;
|
||||
int mode_clock = (mode_valid_check ? mode->clock : mode->crtc_clock);
|
||||
int ret;
|
||||
|
||||
ret = cdns_dsi_mode2cfg(dsi, mode, dsi_cfg, mode_valid_check);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
phy_mipi_dphy_get_default_config(mode->crtc_clock * 1000,
|
||||
mipi_dsi_pixel_format_to_bpp(output->dev->format),
|
||||
nlanes, phy_cfg);
|
||||
ret = phy_mipi_dphy_get_default_config(mode_clock * 1000,
|
||||
mipi_dsi_pixel_format_to_bpp(output->dev->format),
|
||||
nlanes, phy_cfg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = cdns_dsi_adjust_phy_config(dsi, dsi_cfg, phy_cfg, mode, mode_valid_check);
|
||||
if (ret)
|
||||
|
|
@ -958,7 +961,7 @@ static int cdns_dsi_attach(struct mipi_dsi_host *host,
|
|||
if (!IS_ERR(panel)) {
|
||||
bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DSI);
|
||||
} else {
|
||||
bridge = of_drm_find_bridge(dev->dev.of_node);
|
||||
bridge = of_drm_find_bridge(np);
|
||||
if (!bridge)
|
||||
bridge = ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ struct fimd_context {
|
|||
u32 i80ifcon;
|
||||
bool i80_if;
|
||||
bool suspended;
|
||||
bool dp_clk_enabled;
|
||||
wait_queue_head_t wait_vsync_queue;
|
||||
atomic_t wait_vsync_event;
|
||||
atomic_t win_updated;
|
||||
|
|
@ -1003,7 +1004,18 @@ static void fimd_dp_clock_enable(struct exynos_drm_clk *clk, bool enable)
|
|||
struct fimd_context *ctx = container_of(clk, struct fimd_context,
|
||||
dp_clk);
|
||||
u32 val = enable ? DP_MIE_CLK_DP_ENABLE : DP_MIE_CLK_DISABLE;
|
||||
|
||||
if (enable == ctx->dp_clk_enabled)
|
||||
return;
|
||||
|
||||
if (enable)
|
||||
pm_runtime_resume_and_get(ctx->dev);
|
||||
|
||||
ctx->dp_clk_enabled = enable;
|
||||
writel(val, ctx->regs + DP_MIE_CLKCON);
|
||||
|
||||
if (!enable)
|
||||
pm_runtime_put(ctx->dev);
|
||||
}
|
||||
|
||||
static const struct exynos_drm_crtc_ops fimd_crtc_ops = {
|
||||
|
|
|
|||
|
|
@ -1475,7 +1475,6 @@ static int ring_context_alloc(struct intel_context *ce)
|
|||
/* One ringbuffer to rule them all */
|
||||
GEM_BUG_ON(!engine->legacy.ring);
|
||||
ce->ring = engine->legacy.ring;
|
||||
ce->timeline = intel_timeline_get(engine->legacy.timeline);
|
||||
|
||||
GEM_BUG_ON(ce->state);
|
||||
if (engine->context_size) {
|
||||
|
|
@ -1488,6 +1487,8 @@ static int ring_context_alloc(struct intel_context *ce)
|
|||
ce->state = vma;
|
||||
}
|
||||
|
||||
ce->timeline = intel_timeline_get(engine->legacy.timeline);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,10 @@ static int igt_add_request(void *arg)
|
|||
|
||||
mutex_lock(&i915->drm.struct_mutex);
|
||||
request = mock_request(i915->engine[RCS0]->kernel_context, HZ / 10);
|
||||
if (!request)
|
||||
if (IS_ERR(request)) {
|
||||
err = PTR_ERR(request);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
i915_request_add(request);
|
||||
|
||||
|
|
@ -69,8 +71,8 @@ static int igt_wait_request(void *arg)
|
|||
|
||||
mutex_lock(&i915->drm.struct_mutex);
|
||||
request = mock_request(i915->engine[RCS0]->kernel_context, T);
|
||||
if (!request) {
|
||||
err = -ENOMEM;
|
||||
if (IS_ERR(request)) {
|
||||
err = PTR_ERR(request);
|
||||
goto out_unlock;
|
||||
}
|
||||
i915_request_get(request);
|
||||
|
|
@ -142,8 +144,8 @@ static int igt_fence_wait(void *arg)
|
|||
|
||||
mutex_lock(&i915->drm.struct_mutex);
|
||||
request = mock_request(i915->engine[RCS0]->kernel_context, T);
|
||||
if (!request) {
|
||||
err = -ENOMEM;
|
||||
if (IS_ERR(request)) {
|
||||
err = PTR_ERR(request);
|
||||
goto out_locked;
|
||||
}
|
||||
|
||||
|
|
@ -203,8 +205,8 @@ static int igt_request_rewind(void *arg)
|
|||
GEM_BUG_ON(IS_ERR(ce));
|
||||
request = mock_request(ce, 2 * HZ);
|
||||
intel_context_put(ce);
|
||||
if (!request) {
|
||||
err = -ENOMEM;
|
||||
if (IS_ERR(request)) {
|
||||
err = PTR_ERR(request);
|
||||
goto err_context_0;
|
||||
}
|
||||
|
||||
|
|
@ -216,8 +218,8 @@ static int igt_request_rewind(void *arg)
|
|||
GEM_BUG_ON(IS_ERR(ce));
|
||||
vip = mock_request(ce, 0);
|
||||
intel_context_put(ce);
|
||||
if (!vip) {
|
||||
err = -ENOMEM;
|
||||
if (IS_ERR(vip)) {
|
||||
err = PTR_ERR(vip);
|
||||
goto err_context_1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ mock_request(struct intel_context *ce, unsigned long delay)
|
|||
/* NB the i915->requests slab cache is enlarged to fit mock_request */
|
||||
request = intel_context_create_request(ce);
|
||||
if (IS_ERR(request))
|
||||
return NULL;
|
||||
return request;
|
||||
|
||||
request->mock.delay = delay;
|
||||
return request;
|
||||
|
|
|
|||
|
|
@ -1103,10 +1103,16 @@ static struct drm_plane *tegra_dc_add_shared_planes(struct drm_device *drm,
|
|||
if (wgrp->dc == dc->pipe) {
|
||||
for (j = 0; j < wgrp->num_windows; j++) {
|
||||
unsigned int index = wgrp->windows[j];
|
||||
enum drm_plane_type type;
|
||||
|
||||
if (primary)
|
||||
type = DRM_PLANE_TYPE_OVERLAY;
|
||||
else
|
||||
type = DRM_PLANE_TYPE_PRIMARY;
|
||||
|
||||
plane = tegra_shared_plane_create(drm, dc,
|
||||
wgrp->index,
|
||||
index);
|
||||
index, type);
|
||||
if (IS_ERR(plane))
|
||||
return plane;
|
||||
|
||||
|
|
@ -1114,10 +1120,8 @@ static struct drm_plane *tegra_dc_add_shared_planes(struct drm_device *drm,
|
|||
* Choose the first shared plane owned by this
|
||||
* head as the primary plane.
|
||||
*/
|
||||
if (!primary) {
|
||||
plane->type = DRM_PLANE_TYPE_PRIMARY;
|
||||
if (!primary)
|
||||
primary = plane;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -533,9 +533,9 @@ static const struct drm_plane_helper_funcs tegra_shared_plane_helper_funcs = {
|
|||
struct drm_plane *tegra_shared_plane_create(struct drm_device *drm,
|
||||
struct tegra_dc *dc,
|
||||
unsigned int wgrp,
|
||||
unsigned int index)
|
||||
unsigned int index,
|
||||
enum drm_plane_type type)
|
||||
{
|
||||
enum drm_plane_type type = DRM_PLANE_TYPE_OVERLAY;
|
||||
struct tegra_drm *tegra = drm->dev_private;
|
||||
struct tegra_display_hub *hub = tegra->hub;
|
||||
/* planes can be assigned to arbitrary CRTCs */
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ void tegra_display_hub_cleanup(struct tegra_display_hub *hub);
|
|||
struct drm_plane *tegra_shared_plane_create(struct drm_device *drm,
|
||||
struct tegra_dc *dc,
|
||||
unsigned int wgrp,
|
||||
unsigned int index);
|
||||
unsigned int index,
|
||||
enum drm_plane_type type);
|
||||
|
||||
int tegra_display_hub_atomic_check(struct drm_device *drm,
|
||||
struct drm_atomic_state *state);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ struct v3d_queue_state {
|
|||
u64 emit_seqno;
|
||||
};
|
||||
|
||||
enum v3d_irq {
|
||||
V3D_CORE_IRQ,
|
||||
V3D_HUB_IRQ,
|
||||
V3D_MAX_IRQS,
|
||||
};
|
||||
|
||||
struct v3d_dev {
|
||||
struct drm_device drm;
|
||||
|
||||
|
|
@ -49,6 +55,9 @@ struct v3d_dev {
|
|||
|
||||
struct device *dev;
|
||||
struct platform_device *pdev;
|
||||
|
||||
int irq[V3D_MAX_IRQS];
|
||||
|
||||
void __iomem *hub_regs;
|
||||
void __iomem *core_regs[3];
|
||||
void __iomem *bridge_regs;
|
||||
|
|
|
|||
|
|
@ -120,6 +120,8 @@ v3d_reset(struct v3d_dev *v3d)
|
|||
if (false)
|
||||
v3d_idle_axi(v3d, 0);
|
||||
|
||||
v3d_irq_disable(v3d);
|
||||
|
||||
v3d_idle_gca(v3d);
|
||||
v3d_reset_v3d(v3d);
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ v3d_hub_irq(int irq, void *arg)
|
|||
int
|
||||
v3d_irq_init(struct v3d_dev *v3d)
|
||||
{
|
||||
int irq1, ret, core;
|
||||
int irq, ret, core;
|
||||
|
||||
INIT_WORK(&v3d->overflow_mem_work, v3d_overflow_mem_work);
|
||||
|
||||
|
|
@ -229,16 +229,24 @@ v3d_irq_init(struct v3d_dev *v3d)
|
|||
V3D_CORE_WRITE(core, V3D_CTL_INT_CLR, V3D_CORE_IRQS);
|
||||
V3D_WRITE(V3D_HUB_INT_CLR, V3D_HUB_IRQS);
|
||||
|
||||
irq1 = platform_get_irq(v3d->pdev, 1);
|
||||
if (irq1 == -EPROBE_DEFER)
|
||||
return irq1;
|
||||
if (irq1 > 0) {
|
||||
ret = devm_request_irq(v3d->dev, irq1,
|
||||
irq = platform_get_irq(v3d->pdev, 1);
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return irq;
|
||||
if (irq > 0) {
|
||||
v3d->irq[V3D_CORE_IRQ] = irq;
|
||||
|
||||
ret = devm_request_irq(v3d->dev, v3d->irq[V3D_CORE_IRQ],
|
||||
v3d_irq, IRQF_SHARED,
|
||||
"v3d_core0", v3d);
|
||||
if (ret)
|
||||
goto fail;
|
||||
ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 0),
|
||||
|
||||
irq = platform_get_irq(v3d->pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
v3d->irq[V3D_HUB_IRQ] = irq;
|
||||
|
||||
ret = devm_request_irq(v3d->dev, v3d->irq[V3D_HUB_IRQ],
|
||||
v3d_hub_irq, IRQF_SHARED,
|
||||
"v3d_hub", v3d);
|
||||
if (ret)
|
||||
|
|
@ -246,7 +254,12 @@ v3d_irq_init(struct v3d_dev *v3d)
|
|||
} else {
|
||||
v3d->single_irq_line = true;
|
||||
|
||||
ret = devm_request_irq(v3d->dev, platform_get_irq(v3d->pdev, 0),
|
||||
irq = platform_get_irq(v3d->pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
v3d->irq[V3D_CORE_IRQ] = irq;
|
||||
|
||||
ret = devm_request_irq(v3d->dev, v3d->irq[V3D_CORE_IRQ],
|
||||
v3d_irq, IRQF_SHARED,
|
||||
"v3d", v3d);
|
||||
if (ret)
|
||||
|
|
@ -281,12 +294,19 @@ void
|
|||
v3d_irq_disable(struct v3d_dev *v3d)
|
||||
{
|
||||
int core;
|
||||
int i;
|
||||
|
||||
/* Disable all interrupts. */
|
||||
for (core = 0; core < v3d->cores; core++)
|
||||
V3D_CORE_WRITE(core, V3D_CTL_INT_MSK_SET, ~0);
|
||||
V3D_WRITE(V3D_HUB_INT_MSK_SET, ~0);
|
||||
|
||||
/* Finish any interrupt handler still in flight. */
|
||||
for (i = 0; i < V3D_MAX_IRQS; i++) {
|
||||
if (v3d->irq[i])
|
||||
synchronize_irq(v3d->irq[i]);
|
||||
}
|
||||
|
||||
/* Clear any pending interrupts we might have left. */
|
||||
for (core = 0; core < v3d->cores; core++)
|
||||
V3D_CORE_WRITE(core, V3D_CTL_INT_CLR, V3D_CORE_IRQS);
|
||||
|
|
|
|||
|
|
@ -280,6 +280,8 @@
|
|||
#define USB_DEVICE_ID_ASUS_AK1D 0x1125
|
||||
#define USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A 0x1408
|
||||
#define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421
|
||||
#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA 0xb824
|
||||
#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2 0xb82c
|
||||
|
||||
#define USB_VENDOR_ID_CHUNGHWAT 0x2247
|
||||
#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001
|
||||
|
|
@ -1354,4 +1356,7 @@
|
|||
#define USB_VENDOR_ID_SIGNOTEC 0x2133
|
||||
#define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018
|
||||
|
||||
#define USB_VENDOR_ID_SMARTLINKTECHNOLOGY 0x4c4a
|
||||
#define USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 0x4155
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -734,6 +734,8 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) },
|
||||
|
|
@ -881,6 +883,7 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||
#endif
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2020,14 +2020,18 @@ static int wacom_initialize_remotes(struct wacom *wacom)
|
|||
|
||||
remote->remote_dir = kobject_create_and_add("wacom_remote",
|
||||
&wacom->hdev->dev.kobj);
|
||||
if (!remote->remote_dir)
|
||||
if (!remote->remote_dir) {
|
||||
kfifo_free(&remote->remote_fifo);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
error = sysfs_create_files(remote->remote_dir, remote_unpair_attrs);
|
||||
|
||||
if (error) {
|
||||
hid_err(wacom->hdev,
|
||||
"cannot create sysfs group err: %d\n", error);
|
||||
kfifo_free(&remote->remote_fifo);
|
||||
kobject_put(remote->remote_dir);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,6 +111,11 @@ static u32 osif_func(struct i2c_adapter *adapter)
|
|||
return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
|
||||
}
|
||||
|
||||
/* prevent invalid 0-length usb_control_msg */
|
||||
static const struct i2c_adapter_quirks osif_quirks = {
|
||||
.flags = I2C_AQ_NO_ZERO_LEN_READ,
|
||||
};
|
||||
|
||||
static const struct i2c_algorithm osif_algorithm = {
|
||||
.master_xfer = osif_xfer,
|
||||
.functionality = osif_func,
|
||||
|
|
@ -143,6 +148,7 @@ static int osif_probe(struct usb_interface *interface,
|
|||
|
||||
priv->adapter.owner = THIS_MODULE;
|
||||
priv->adapter.class = I2C_CLASS_HWMON;
|
||||
priv->adapter.quirks = &osif_quirks;
|
||||
priv->adapter.algo = &osif_algorithm;
|
||||
priv->adapter.algo_data = priv;
|
||||
snprintf(priv->adapter.name, sizeof(priv->adapter.name),
|
||||
|
|
|
|||
|
|
@ -140,6 +140,11 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* prevent invalid 0-length usb_control_msg */
|
||||
static const struct i2c_adapter_quirks usb_quirks = {
|
||||
.flags = I2C_AQ_NO_ZERO_LEN_READ,
|
||||
};
|
||||
|
||||
/* This is the actual algorithm we define */
|
||||
static const struct i2c_algorithm usb_algorithm = {
|
||||
.master_xfer = usb_xfer,
|
||||
|
|
@ -246,6 +251,7 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface,
|
|||
/* setup i2c adapter description */
|
||||
dev->adapter.owner = THIS_MODULE;
|
||||
dev->adapter.class = I2C_CLASS_HWMON;
|
||||
dev->adapter.quirks = &usb_quirks;
|
||||
dev->adapter.algo = &usb_algorithm;
|
||||
dev->adapter.algo_data = dev;
|
||||
snprintf(dev->adapter.name, sizeof(dev->adapter.name),
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ static int zpa2326_fill_sample_buffer(struct iio_dev *indio_dev,
|
|||
struct {
|
||||
u32 pressure;
|
||||
u16 temperature;
|
||||
u64 timestamp;
|
||||
aligned_s64 timestamp;
|
||||
} sample;
|
||||
int err;
|
||||
|
||||
|
|
|
|||
|
|
@ -2683,6 +2683,7 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
|
|||
SET_DEVICE_OP(dev_ops, unmap_fmr);
|
||||
|
||||
SET_OBJ_SIZE(dev_ops, ib_ah);
|
||||
SET_OBJ_SIZE(dev_ops, ib_counters);
|
||||
SET_OBJ_SIZE(dev_ops, ib_cq);
|
||||
SET_OBJ_SIZE(dev_ops, ib_pd);
|
||||
SET_OBJ_SIZE(dev_ops, ib_srq);
|
||||
|
|
|
|||
|
|
@ -211,8 +211,7 @@ static void free_cm_id(struct iwcm_id_private *cm_id_priv)
|
|||
*/
|
||||
static int iwcm_deref_id(struct iwcm_id_private *cm_id_priv)
|
||||
{
|
||||
BUG_ON(atomic_read(&cm_id_priv->refcount)==0);
|
||||
if (atomic_dec_and_test(&cm_id_priv->refcount)) {
|
||||
if (refcount_dec_and_test(&cm_id_priv->refcount)) {
|
||||
BUG_ON(!list_empty(&cm_id_priv->work_list));
|
||||
free_cm_id(cm_id_priv);
|
||||
return 1;
|
||||
|
|
@ -225,7 +224,7 @@ static void add_ref(struct iw_cm_id *cm_id)
|
|||
{
|
||||
struct iwcm_id_private *cm_id_priv;
|
||||
cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
|
||||
atomic_inc(&cm_id_priv->refcount);
|
||||
refcount_inc(&cm_id_priv->refcount);
|
||||
}
|
||||
|
||||
static void rem_ref(struct iw_cm_id *cm_id)
|
||||
|
|
@ -257,7 +256,7 @@ struct iw_cm_id *iw_create_cm_id(struct ib_device *device,
|
|||
cm_id_priv->id.add_ref = add_ref;
|
||||
cm_id_priv->id.rem_ref = rem_ref;
|
||||
spin_lock_init(&cm_id_priv->lock);
|
||||
atomic_set(&cm_id_priv->refcount, 1);
|
||||
refcount_set(&cm_id_priv->refcount, 1);
|
||||
init_waitqueue_head(&cm_id_priv->connect_wait);
|
||||
init_completion(&cm_id_priv->destroy_comp);
|
||||
INIT_LIST_HEAD(&cm_id_priv->work_list);
|
||||
|
|
@ -368,12 +367,9 @@ EXPORT_SYMBOL(iw_cm_disconnect);
|
|||
/*
|
||||
* CM_ID <-- DESTROYING
|
||||
*
|
||||
* Clean up all resources associated with the connection and release
|
||||
* the initial reference taken by iw_create_cm_id.
|
||||
*
|
||||
* Returns true if and only if the last cm_id_priv reference has been dropped.
|
||||
* Clean up all resources associated with the connection.
|
||||
*/
|
||||
static bool destroy_cm_id(struct iw_cm_id *cm_id)
|
||||
static void destroy_cm_id(struct iw_cm_id *cm_id)
|
||||
{
|
||||
struct iwcm_id_private *cm_id_priv;
|
||||
struct ib_qp *qp;
|
||||
|
|
@ -442,20 +438,22 @@ static bool destroy_cm_id(struct iw_cm_id *cm_id)
|
|||
iwpm_remove_mapinfo(&cm_id->local_addr, &cm_id->m_local_addr);
|
||||
iwpm_remove_mapping(&cm_id->local_addr, RDMA_NL_IWCM);
|
||||
}
|
||||
|
||||
return iwcm_deref_id(cm_id_priv);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is only called by the application thread and cannot
|
||||
* be called by the event thread. The function will wait for all
|
||||
* references to be released on the cm_id and then kfree the cm_id
|
||||
* object.
|
||||
* Destroy cm_id. If the cm_id still has other references, wait for all
|
||||
* references to be released on the cm_id and then release the initial
|
||||
* reference taken by iw_create_cm_id.
|
||||
*/
|
||||
void iw_destroy_cm_id(struct iw_cm_id *cm_id)
|
||||
{
|
||||
if (!destroy_cm_id(cm_id))
|
||||
struct iwcm_id_private *cm_id_priv;
|
||||
|
||||
cm_id_priv = container_of(cm_id, struct iwcm_id_private, id);
|
||||
destroy_cm_id(cm_id);
|
||||
if (refcount_read(&cm_id_priv->refcount) > 1)
|
||||
flush_workqueue(iwcm_wq);
|
||||
iwcm_deref_id(cm_id_priv);
|
||||
}
|
||||
EXPORT_SYMBOL(iw_destroy_cm_id);
|
||||
|
||||
|
|
@ -1038,8 +1036,10 @@ static void cm_work_handler(struct work_struct *_work)
|
|||
|
||||
if (!test_bit(IWCM_F_DROP_EVENTS, &cm_id_priv->flags)) {
|
||||
ret = process_event(cm_id_priv, &levent);
|
||||
if (ret)
|
||||
WARN_ON_ONCE(destroy_cm_id(&cm_id_priv->id));
|
||||
if (ret) {
|
||||
destroy_cm_id(&cm_id_priv->id);
|
||||
WARN_ON_ONCE(iwcm_deref_id(cm_id_priv));
|
||||
}
|
||||
} else
|
||||
pr_debug("dropping event %d\n", levent.event);
|
||||
if (iwcm_deref_id(cm_id_priv))
|
||||
|
|
@ -1097,7 +1097,7 @@ static int cm_event_handler(struct iw_cm_id *cm_id,
|
|||
}
|
||||
}
|
||||
|
||||
atomic_inc(&cm_id_priv->refcount);
|
||||
refcount_inc(&cm_id_priv->refcount);
|
||||
if (list_empty(&cm_id_priv->work_list)) {
|
||||
list_add_tail(&work->list, &cm_id_priv->work_list);
|
||||
queue_work(iwcm_wq, &work->work);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct iwcm_id_private {
|
|||
wait_queue_head_t connect_wait;
|
||||
struct list_head work_list;
|
||||
spinlock_t lock;
|
||||
atomic_t refcount;
|
||||
refcount_t refcount;
|
||||
struct list_head work_free_list;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ static int uverbs_free_counters(struct ib_uobject *uobject,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
return counters->device->ops.destroy_counters(counters);
|
||||
counters->device->ops.destroy_counters(counters);
|
||||
kfree(counters);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)(
|
||||
|
|
@ -66,20 +68,19 @@ static int UVERBS_HANDLER(UVERBS_METHOD_COUNTERS_CREATE)(
|
|||
if (!ib_dev->ops.create_counters)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
counters = ib_dev->ops.create_counters(ib_dev, attrs);
|
||||
if (IS_ERR(counters)) {
|
||||
ret = PTR_ERR(counters);
|
||||
goto err_create_counters;
|
||||
}
|
||||
counters = rdma_zalloc_drv_obj(ib_dev, ib_counters);
|
||||
if (!counters)
|
||||
return -ENOMEM;
|
||||
|
||||
counters->device = ib_dev;
|
||||
counters->uobject = uobj;
|
||||
uobj->object = counters;
|
||||
atomic_set(&counters->usecnt, 0);
|
||||
|
||||
return 0;
|
||||
ret = ib_dev->ops.create_counters(counters, attrs);
|
||||
if (ret)
|
||||
kfree(counters);
|
||||
|
||||
err_create_counters:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1840,6 +1840,7 @@ subscribe_event_xa_alloc(struct mlx5_devx_event_table *devx_event_table,
|
|||
/* Level1 is valid for future use, no need to free */
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_LIST_HEAD(&obj_event->obj_sub_list);
|
||||
err = xa_insert(&event->object_ids,
|
||||
key_level2,
|
||||
obj_event,
|
||||
|
|
@ -1848,7 +1849,6 @@ subscribe_event_xa_alloc(struct mlx5_devx_event_table *devx_event_table,
|
|||
kfree(obj_event);
|
||||
return err;
|
||||
}
|
||||
INIT_LIST_HEAD(&obj_event->obj_sub_list);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1686,6 +1686,33 @@ static void deallocate_uars(struct mlx5_ib_dev *dev,
|
|||
mlx5_cmd_free_uar(dev->mdev, bfregi->sys_pages[i]);
|
||||
}
|
||||
|
||||
static int mlx5_ib_enable_lb_mp(struct mlx5_core_dev *master,
|
||||
struct mlx5_core_dev *slave)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = mlx5_nic_vport_update_local_lb(master, true);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mlx5_nic_vport_update_local_lb(slave, true);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
mlx5_nic_vport_update_local_lb(master, false);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void mlx5_ib_disable_lb_mp(struct mlx5_core_dev *master,
|
||||
struct mlx5_core_dev *slave)
|
||||
{
|
||||
mlx5_nic_vport_update_local_lb(slave, false);
|
||||
mlx5_nic_vport_update_local_lb(master, false);
|
||||
}
|
||||
|
||||
int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp)
|
||||
{
|
||||
int err = 0;
|
||||
|
|
@ -5615,7 +5642,7 @@ static int mlx5_ib_get_hw_stats(struct ib_device *ibdev,
|
|||
*/
|
||||
goto done;
|
||||
}
|
||||
ret = mlx5_lag_query_cong_counters(dev->mdev,
|
||||
ret = mlx5_lag_query_cong_counters(mdev,
|
||||
stats->value +
|
||||
cnts->num_q_counters,
|
||||
cnts->num_cong_counters,
|
||||
|
|
@ -5839,6 +5866,8 @@ static void mlx5_ib_unbind_slave_port(struct mlx5_ib_dev *ibdev,
|
|||
|
||||
lockdep_assert_held(&mlx5_ib_multiport_mutex);
|
||||
|
||||
mlx5_ib_disable_lb_mp(ibdev->mdev, mpi->mdev);
|
||||
|
||||
mlx5_ib_cleanup_cong_debugfs(ibdev, port_num);
|
||||
|
||||
spin_lock(&port->mp.mpi_lock);
|
||||
|
|
@ -5927,6 +5956,10 @@ static bool mlx5_ib_bind_slave_port(struct mlx5_ib_dev *ibdev,
|
|||
|
||||
mlx5_ib_init_cong_debugfs(ibdev, port_num);
|
||||
|
||||
err = mlx5_ib_enable_lb_mp(ibdev->mdev, mpi->mdev);
|
||||
if (err)
|
||||
goto unbind;
|
||||
|
||||
return true;
|
||||
|
||||
unbind:
|
||||
|
|
@ -6113,7 +6146,7 @@ err_bound:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int mlx5_ib_destroy_counters(struct ib_counters *counters)
|
||||
static void mlx5_ib_destroy_counters(struct ib_counters *counters)
|
||||
{
|
||||
struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
|
||||
|
||||
|
|
@ -6121,24 +6154,15 @@ static int mlx5_ib_destroy_counters(struct ib_counters *counters)
|
|||
if (mcounters->hw_cntrs_hndl)
|
||||
mlx5_fc_destroy(to_mdev(counters->device)->mdev,
|
||||
mcounters->hw_cntrs_hndl);
|
||||
|
||||
kfree(mcounters);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ib_counters *mlx5_ib_create_counters(struct ib_device *device,
|
||||
struct uverbs_attr_bundle *attrs)
|
||||
static int mlx5_ib_create_counters(struct ib_counters *counters,
|
||||
struct uverbs_attr_bundle *attrs)
|
||||
{
|
||||
struct mlx5_ib_mcounters *mcounters;
|
||||
|
||||
mcounters = kzalloc(sizeof(*mcounters), GFP_KERNEL);
|
||||
if (!mcounters)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
|
||||
|
||||
mutex_init(&mcounters->mcntrs_mutex);
|
||||
|
||||
return &mcounters->ibcntrs;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mlx5_ib_stage_init_cleanup(struct mlx5_ib_dev *dev)
|
||||
|
|
@ -6296,6 +6320,7 @@ static const struct ib_device_ops mlx5_ib_dev_ops = {
|
|||
.resize_cq = mlx5_ib_resize_cq,
|
||||
|
||||
INIT_RDMA_OBJ_SIZE(ib_ah, mlx5_ib_ah, ibah),
|
||||
INIT_RDMA_OBJ_SIZE(ib_counters, mlx5_ib_mcounters, ibcntrs),
|
||||
INIT_RDMA_OBJ_SIZE(ib_cq, mlx5_ib_cq, ibcq),
|
||||
INIT_RDMA_OBJ_SIZE(ib_pd, mlx5_ib_pd, ibpd),
|
||||
INIT_RDMA_OBJ_SIZE(ib_srq, mlx5_ib_srq, ibsrq),
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ static const struct xpad_device {
|
|||
{ 0x05fd, 0x107a, "InterAct 'PowerPad Pro' X-Box pad (Germany)", 0, XTYPE_XBOX },
|
||||
{ 0x05fe, 0x3030, "Chic Controller", 0, XTYPE_XBOX },
|
||||
{ 0x05fe, 0x3031, "Chic Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0502, 0x1305, "Acer NGR200", 0, XTYPE_XBOX },
|
||||
{ 0x062a, 0x0020, "Logic3 Xbox GamePad", 0, XTYPE_XBOX },
|
||||
{ 0x062a, 0x0033, "Competition Pro Steering Wheel", 0, XTYPE_XBOX },
|
||||
{ 0x06a3, 0x0200, "Saitek Racing Wheel", 0, XTYPE_XBOX },
|
||||
|
|
@ -275,6 +276,7 @@ static const struct xpad_device {
|
|||
{ 0x1689, 0xfd00, "Razer Onza Tournament Edition", 0, XTYPE_XBOX360 },
|
||||
{ 0x1689, 0xfd01, "Razer Onza Classic Edition", 0, XTYPE_XBOX360 },
|
||||
{ 0x1689, 0xfe00, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||
{ 0x1949, 0x041a, "Amazon Game Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0x0002, "Harmonix Rock Band Guitar", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0x0003, "Harmonix Rock Band Drumkit", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0x0130, "Ion Drum Rocker", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
|
|
@ -439,6 +441,7 @@ static const struct usb_device_id xpad_table[] = {
|
|||
XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x045e), /* Microsoft X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x046d), /* Logitech X-Box 360 style controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0502), /* Acer Inc. Xbox 360 style controllers */
|
||||
XPAD_XBOX360_VENDOR(0x056e), /* Elecom JC-U3613M */
|
||||
XPAD_XBOX360_VENDOR(0x06a3), /* Saitek P3600 */
|
||||
XPAD_XBOX360_VENDOR(0x0738), /* Mad Catz X-Box 360 controllers */
|
||||
|
|
@ -451,6 +454,7 @@ static const struct usb_device_id xpad_table[] = {
|
|||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x10f5), /* Turtle Beach Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x11c9), /* Nacon GC100XF */
|
||||
XPAD_XBOX360_VENDOR(0x11ff), /* PXN V900 */
|
||||
XPAD_XBOX360_VENDOR(0x1209), /* Ardwiino Controllers */
|
||||
|
|
@ -462,6 +466,7 @@ static const struct usb_device_id xpad_table[] = {
|
|||
XPAD_XBOX360_VENDOR(0x15e4), /* Numark X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x162e), /* Joytech X-Box 360 controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1689), /* Razer Onza */
|
||||
XPAD_XBOX360_VENDOR(0x1949), /* Amazon controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1bad), /* Harminix Rock Band Guitar and Drums */
|
||||
XPAD_XBOX360_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x20d6), /* PowerA Controllers */
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ static int atkbd_probe(struct atkbd *atkbd)
|
|||
|
||||
if (atkbd_skip_getid(atkbd)) {
|
||||
atkbd->id = 0xab83;
|
||||
return 0;
|
||||
goto deactivate_kbd;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -813,6 +813,7 @@ static int atkbd_probe(struct atkbd *atkbd)
|
|||
return -1;
|
||||
}
|
||||
|
||||
deactivate_kbd:
|
||||
/*
|
||||
* Make sure nothing is coming from the keyboard and disturbs our
|
||||
* internal state.
|
||||
|
|
|
|||
|
|
@ -453,8 +453,8 @@ void mbox_free_channel(struct mbox_chan *chan)
|
|||
if (chan->txdone_method == TXDONE_BY_ACK)
|
||||
chan->txdone_method = TXDONE_BY_POLL;
|
||||
|
||||
module_put(chan->mbox->dev->driver->owner);
|
||||
spin_unlock_irqrestore(&chan->lock, flags);
|
||||
module_put(chan->mbox->dev->driver->owner);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mbox_free_channel);
|
||||
|
||||
|
|
|
|||
|
|
@ -2406,7 +2406,7 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev)
|
|||
*/
|
||||
sb_retrieve_failed_devices(sb, failed_devices);
|
||||
rdev_for_each(r, mddev) {
|
||||
if (test_bit(Journal, &rdev->flags) ||
|
||||
if (test_bit(Journal, &r->flags) ||
|
||||
!r->sb_page)
|
||||
continue;
|
||||
sb2 = page_address(r->sb_page);
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ static int md_bitmap_new_disk_sb(struct bitmap *bitmap)
|
|||
* is a good choice? We choose COUNTER_MAX / 2 arbitrarily.
|
||||
*/
|
||||
write_behind = bitmap->mddev->bitmap_info.max_write_behind;
|
||||
if (write_behind > COUNTER_MAX)
|
||||
if (write_behind > COUNTER_MAX / 2)
|
||||
write_behind = COUNTER_MAX / 2;
|
||||
sb->write_behind = cpu_to_le32(write_behind);
|
||||
bitmap->mddev->bitmap_info.max_write_behind = write_behind;
|
||||
|
|
|
|||
|
|
@ -3307,6 +3307,7 @@ static int raid1_reshape(struct mddev *mddev)
|
|||
/* ok, everything is stopped */
|
||||
oldpool = conf->r1bio_pool;
|
||||
conf->r1bio_pool = newpool;
|
||||
init_waitqueue_head(&conf->r1bio_pool.wait);
|
||||
|
||||
for (d = d2 = 0; d < conf->raid_disks; d++) {
|
||||
struct md_rdev *rdev = conf->mirrors[d].rdev;
|
||||
|
|
|
|||
|
|
@ -446,8 +446,8 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
|
|||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
dma_sync_sg_for_cpu(isp->dev, req->table.sgt.sgl,
|
||||
req->table.sgt.nents, DMA_TO_DEVICE);
|
||||
dma_sync_sgtable_for_cpu(isp->dev, &req->table.sgt,
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
if (copy_from_user(req->table.addr, config->lsc,
|
||||
req->config.size)) {
|
||||
|
|
@ -455,8 +455,8 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
|
|||
goto done;
|
||||
}
|
||||
|
||||
dma_sync_sg_for_device(isp->dev, req->table.sgt.sgl,
|
||||
req->table.sgt.nents, DMA_TO_DEVICE);
|
||||
dma_sync_sgtable_for_device(isp->dev, &req->table.sgt,
|
||||
DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&ccdc->lsc.req_lock, flags);
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@ static void isp_stat_buf_sync_for_device(struct ispstat *stat,
|
|||
if (ISP_STAT_USES_DMAENGINE(stat))
|
||||
return;
|
||||
|
||||
dma_sync_sg_for_device(stat->isp->dev, buf->sgt.sgl,
|
||||
buf->sgt.nents, DMA_FROM_DEVICE);
|
||||
dma_sync_sgtable_for_device(stat->isp->dev, &buf->sgt, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,
|
||||
|
|
@ -171,8 +170,7 @@ static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,
|
|||
if (ISP_STAT_USES_DMAENGINE(stat))
|
||||
return;
|
||||
|
||||
dma_sync_sg_for_cpu(stat->isp->dev, buf->sgt.sgl,
|
||||
buf->sgt.nents, DMA_FROM_DEVICE);
|
||||
dma_sync_sgtable_for_cpu(stat->isp->dev, &buf->sgt, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
static void isp_stat_buf_clear(struct ispstat *stat)
|
||||
|
|
|
|||
|
|
@ -935,8 +935,8 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
|||
if (dev->has_compose_cap) {
|
||||
v4l2_rect_set_min_size(compose, &min_rect);
|
||||
v4l2_rect_set_max_size(compose, &max_rect);
|
||||
v4l2_rect_map_inside(compose, &fmt);
|
||||
}
|
||||
v4l2_rect_map_inside(compose, &fmt);
|
||||
dev->fmt_cap_rect = fmt;
|
||||
tpg_s_buf_height(&dev->tpg, fmt.height);
|
||||
} else if (dev->has_compose_cap) {
|
||||
|
|
|
|||
|
|
@ -54,9 +54,6 @@ MODULE_PARM_DESC(debug, "set debugging level (see cxusb.h)."
|
|||
|
||||
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
||||
|
||||
#define deb_info(args...) dprintk(dvb_usb_cxusb_debug, CXUSB_DBG_MISC, args)
|
||||
#define deb_i2c(args...) dprintk(dvb_usb_cxusb_debug, CXUSB_DBG_I2C, args)
|
||||
|
||||
enum cxusb_table_index {
|
||||
MEDION_MD95700,
|
||||
DVICO_BLUEBIRD_LG064F_COLD,
|
||||
|
|
@ -122,10 +119,9 @@ static void cxusb_gpio_tuner(struct dvb_usb_device *d, int onoff)
|
|||
|
||||
o[0] = GPIO_TUNER;
|
||||
o[1] = onoff;
|
||||
cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1);
|
||||
|
||||
if (i != 0x01)
|
||||
deb_info("gpio_write failed.\n");
|
||||
if (!cxusb_ctrl_msg(d, CMD_GPIO_WRITE, o, 2, &i, 1) && i != 0x01)
|
||||
dev_info(&d->udev->dev, "gpio_write failed.\n");
|
||||
|
||||
st->gpio_write_state[GPIO_TUNER] = onoff;
|
||||
st->gpio_write_refresh[GPIO_TUNER] = false;
|
||||
|
|
@ -142,7 +138,7 @@ static int cxusb_bluebird_gpio_rw(struct dvb_usb_device *d, u8 changemask,
|
|||
|
||||
rc = cxusb_ctrl_msg(d, CMD_BLUEBIRD_GPIO_RW, o, 2, &gpio_state, 1);
|
||||
if (rc < 0 || (gpio_state & changemask) != (newval & changemask))
|
||||
deb_info("bluebird_gpio_write failed.\n");
|
||||
dev_info(&d->udev->dev, "bluebird_gpio_write failed.\n");
|
||||
|
||||
return rc < 0 ? rc : gpio_state;
|
||||
}
|
||||
|
|
@ -174,7 +170,7 @@ static int cxusb_d680_dmb_gpio_tuner(struct dvb_usb_device *d,
|
|||
if (i == 0x01)
|
||||
return 0;
|
||||
|
||||
deb_info("gpio_write failed.\n");
|
||||
dev_info(&d->udev->dev, "gpio_write failed.\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
|
@ -248,7 +244,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
|||
break;
|
||||
|
||||
if (ibuf[0] != 0x08)
|
||||
deb_i2c("i2c read may have failed\n");
|
||||
dev_info(&d->udev->dev, "i2c read may have failed\n");
|
||||
|
||||
memcpy(msg[i + 1].buf, &ibuf[1], msg[i + 1].len);
|
||||
|
||||
|
|
@ -271,7 +267,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
|||
2 + msg[i].len, &ibuf, 1) < 0)
|
||||
break;
|
||||
if (ibuf != 0x08)
|
||||
deb_i2c("i2c write may have failed\n");
|
||||
dev_info(&d->udev->dev, "i2c write may have failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -299,7 +295,7 @@ static int _cxusb_power_ctrl(struct dvb_usb_device *d, int onoff)
|
|||
{
|
||||
u8 b = 0;
|
||||
|
||||
deb_info("setting power %s\n", onoff ? "ON" : "OFF");
|
||||
dev_info(&d->udev->dev, "setting power %s\n", onoff ? "ON" : "OFF");
|
||||
|
||||
if (onoff)
|
||||
return cxusb_ctrl_msg(d, CMD_POWER_ON, &b, 1, NULL, 0);
|
||||
|
|
@ -318,7 +314,7 @@ static int cxusb_power_ctrl(struct dvb_usb_device *d, int onoff)
|
|||
mutex_lock(&cxdev->open_lock);
|
||||
|
||||
if (cxdev->open_type == CXUSB_OPEN_ANALOG) {
|
||||
deb_info("preventing DVB core from setting power OFF while we are in analog mode\n");
|
||||
dev_info(&d->udev->dev, "preventing DVB core from setting power OFF while we are in analog mode\n");
|
||||
ret = -EBUSY;
|
||||
goto ret_unlock;
|
||||
}
|
||||
|
|
@ -754,16 +750,16 @@ static int dvico_bluebird_xc2028_callback(void *ptr, int component,
|
|||
|
||||
switch (command) {
|
||||
case XC2028_TUNER_RESET:
|
||||
deb_info("%s: XC2028_TUNER_RESET %d\n", __func__, arg);
|
||||
dev_info(&d->udev->dev, "XC2028_TUNER_RESET %d\n", arg);
|
||||
cxusb_bluebird_gpio_pulse(d, 0x01, 1);
|
||||
break;
|
||||
case XC2028_RESET_CLK:
|
||||
deb_info("%s: XC2028_RESET_CLK %d\n", __func__, arg);
|
||||
dev_info(&d->udev->dev, "XC2028_RESET_CLK %d\n", arg);
|
||||
break;
|
||||
case XC2028_I2C_FLUSH:
|
||||
break;
|
||||
default:
|
||||
deb_info("%s: unknown command %d, arg %d\n", __func__,
|
||||
dev_info(&d->udev->dev, "unknown command %d, arg %d\n",
|
||||
command, arg);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -1444,7 +1440,7 @@ int cxusb_medion_get(struct dvb_usb_device *dvbdev,
|
|||
|
||||
if (cxdev->open_ctr == 0) {
|
||||
if (cxdev->open_type != open_type) {
|
||||
deb_info("will acquire and switch to %s\n",
|
||||
dev_info(&dvbdev->udev->dev, "will acquire and switch to %s\n",
|
||||
open_type == CXUSB_OPEN_ANALOG ?
|
||||
"analog" : "digital");
|
||||
|
||||
|
|
@ -1476,7 +1472,7 @@ int cxusb_medion_get(struct dvb_usb_device *dvbdev,
|
|||
|
||||
cxdev->open_type = open_type;
|
||||
} else {
|
||||
deb_info("reacquired idle %s\n",
|
||||
dev_info(&dvbdev->udev->dev, "reacquired idle %s\n",
|
||||
open_type == CXUSB_OPEN_ANALOG ?
|
||||
"analog" : "digital");
|
||||
}
|
||||
|
|
@ -1484,8 +1480,8 @@ int cxusb_medion_get(struct dvb_usb_device *dvbdev,
|
|||
cxdev->open_ctr = 1;
|
||||
} else if (cxdev->open_type == open_type) {
|
||||
cxdev->open_ctr++;
|
||||
deb_info("acquired %s\n", open_type == CXUSB_OPEN_ANALOG ?
|
||||
"analog" : "digital");
|
||||
dev_info(&dvbdev->udev->dev, "acquired %s\n",
|
||||
open_type == CXUSB_OPEN_ANALOG ? "analog" : "digital");
|
||||
} else {
|
||||
ret = -EBUSY;
|
||||
}
|
||||
|
|
@ -1511,7 +1507,7 @@ void cxusb_medion_put(struct dvb_usb_device *dvbdev)
|
|||
if (!WARN_ON(cxdev->open_ctr < 1)) {
|
||||
cxdev->open_ctr--;
|
||||
|
||||
deb_info("release %s\n",
|
||||
dev_info(&dvbdev->udev->dev, "release %s\n",
|
||||
cxdev->open_type == CXUSB_OPEN_ANALOG ?
|
||||
"analog" : "digital");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1429,7 +1429,9 @@ static bool uvc_ctrl_xctrls_has_control(const struct v4l2_ext_control *xctrls,
|
|||
}
|
||||
|
||||
static void uvc_ctrl_send_events(struct uvc_fh *handle,
|
||||
const struct v4l2_ext_control *xctrls, unsigned int xctrls_count)
|
||||
struct uvc_entity *entity,
|
||||
const struct v4l2_ext_control *xctrls,
|
||||
unsigned int xctrls_count)
|
||||
{
|
||||
struct uvc_control_mapping *mapping;
|
||||
struct uvc_control *ctrl;
|
||||
|
|
@ -1440,6 +1442,9 @@ static void uvc_ctrl_send_events(struct uvc_fh *handle,
|
|||
u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
|
||||
|
||||
ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
|
||||
if (ctrl->entity != entity)
|
||||
continue;
|
||||
|
||||
if (ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
|
||||
/* Notification will be sent from an Interrupt event. */
|
||||
continue;
|
||||
|
|
@ -1560,14 +1565,19 @@ int uvc_ctrl_begin(struct uvc_video_chain *chain)
|
|||
return mutex_lock_interruptible(&chain->ctrl_mutex) ? -ERESTARTSYS : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the number of uvc controls that have been correctly set, or a
|
||||
* negative number if there has been an error.
|
||||
*/
|
||||
static int uvc_ctrl_commit_entity(struct uvc_device *dev,
|
||||
struct uvc_fh *handle,
|
||||
struct uvc_entity *entity,
|
||||
int rollback)
|
||||
{
|
||||
unsigned int processed_ctrls = 0;
|
||||
struct uvc_control *ctrl;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (entity == NULL)
|
||||
return 0;
|
||||
|
|
@ -1595,8 +1605,9 @@ static int uvc_ctrl_commit_entity(struct uvc_device *dev,
|
|||
dev->intfnum, ctrl->info.selector,
|
||||
uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
|
||||
ctrl->info.size);
|
||||
else
|
||||
ret = 0;
|
||||
|
||||
if (!ret)
|
||||
processed_ctrls++;
|
||||
|
||||
if (rollback || ret < 0)
|
||||
memcpy(uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
|
||||
|
|
@ -1605,15 +1616,23 @@ static int uvc_ctrl_commit_entity(struct uvc_device *dev,
|
|||
|
||||
ctrl->dirty = 0;
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (!rollback && handle &&
|
||||
if (!rollback && handle && !ret &&
|
||||
ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
|
||||
uvc_ctrl_set_handle(handle, ctrl, handle);
|
||||
|
||||
if (ret < 0 && !rollback) {
|
||||
/*
|
||||
* If we fail to set a control, we need to rollback
|
||||
* the next ones.
|
||||
*/
|
||||
rollback = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return processed_ctrls;
|
||||
}
|
||||
|
||||
int __uvc_ctrl_commit(struct uvc_fh *handle, int rollback,
|
||||
|
|
@ -1622,21 +1641,31 @@ int __uvc_ctrl_commit(struct uvc_fh *handle, int rollback,
|
|||
{
|
||||
struct uvc_video_chain *chain = handle->chain;
|
||||
struct uvc_entity *entity;
|
||||
int ret = 0;
|
||||
int ret_out = 0;
|
||||
int ret;
|
||||
|
||||
/* Find the control. */
|
||||
list_for_each_entry(entity, &chain->entities, chain) {
|
||||
ret = uvc_ctrl_commit_entity(chain->dev, handle, entity,
|
||||
rollback);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
if (ret < 0) {
|
||||
/*
|
||||
* When we fail to commit an entity, we need to
|
||||
* restore the UVC_CTRL_DATA_BACKUP for all the
|
||||
* controls in the other entities, otherwise our cache
|
||||
* and the hardware will be out of sync.
|
||||
*/
|
||||
rollback = 1;
|
||||
|
||||
ret_out = ret;
|
||||
} else if (ret > 0 && !rollback) {
|
||||
uvc_ctrl_send_events(handle, entity, xctrls,
|
||||
xctrls_count);
|
||||
}
|
||||
}
|
||||
|
||||
if (!rollback)
|
||||
uvc_ctrl_send_events(handle, xctrls, xctrls_count);
|
||||
done:
|
||||
mutex_unlock(&chain->ctrl_mutex);
|
||||
return ret;
|
||||
return ret_out;
|
||||
}
|
||||
|
||||
int uvc_ctrl_get(struct uvc_video_chain *chain,
|
||||
|
|
|
|||
|
|
@ -467,6 +467,7 @@ static int max14577_i2c_remove(struct i2c_client *i2c)
|
|||
{
|
||||
struct max14577 *max14577 = i2c_get_clientdata(i2c);
|
||||
|
||||
device_init_wakeup(max14577->dev, false);
|
||||
mfd_remove_devices(max14577->dev);
|
||||
regmap_del_irq_chip(max14577->irq, max14577->irq_data);
|
||||
if (max14577->dev_type == MAXIM_DEVICE_TYPE_MAX77836)
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ static int drv_cp_harray_to_user(void __user *user_buf_uva,
|
|||
static int vmci_host_setup_notify(struct vmci_ctx *context,
|
||||
unsigned long uva)
|
||||
{
|
||||
struct page *page;
|
||||
int retval;
|
||||
|
||||
if (context->notify_page) {
|
||||
|
|
@ -240,11 +241,11 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
|
|||
/*
|
||||
* Lock physical page backing a given user VA.
|
||||
*/
|
||||
retval = get_user_pages_fast(uva, 1, FOLL_WRITE, &context->notify_page);
|
||||
if (retval != 1) {
|
||||
context->notify_page = NULL;
|
||||
retval = get_user_pages_fast(uva, 1, FOLL_WRITE, &page);
|
||||
if (retval != 1)
|
||||
return VMCI_ERROR_GENERIC;
|
||||
}
|
||||
|
||||
context->notify_page = page;
|
||||
|
||||
/*
|
||||
* Map the locked page and set up notify pointer.
|
||||
|
|
|
|||
|
|
@ -676,21 +676,23 @@ static inline void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma,
|
|||
writel(lower_32_bits(dma->gpd_addr), host->base + MSDC_DMA_SA);
|
||||
}
|
||||
|
||||
static void msdc_prepare_data(struct msdc_host *host, struct mmc_request *mrq)
|
||||
static void msdc_prepare_data(struct msdc_host *host, struct mmc_data *data)
|
||||
{
|
||||
struct mmc_data *data = mrq->data;
|
||||
|
||||
if (!(data->host_cookie & MSDC_PREPARE_FLAG)) {
|
||||
data->host_cookie |= MSDC_PREPARE_FLAG;
|
||||
data->sg_count = dma_map_sg(host->dev, data->sg, data->sg_len,
|
||||
mmc_get_dma_dir(data));
|
||||
if (data->sg_count)
|
||||
data->host_cookie |= MSDC_PREPARE_FLAG;
|
||||
}
|
||||
}
|
||||
|
||||
static void msdc_unprepare_data(struct msdc_host *host, struct mmc_request *mrq)
|
||||
static bool msdc_data_prepared(struct mmc_data *data)
|
||||
{
|
||||
struct mmc_data *data = mrq->data;
|
||||
return data->host_cookie & MSDC_PREPARE_FLAG;
|
||||
}
|
||||
|
||||
static void msdc_unprepare_data(struct msdc_host *host, struct mmc_data *data)
|
||||
{
|
||||
if (data->host_cookie & MSDC_ASYNC_FLAG)
|
||||
return;
|
||||
|
||||
|
|
@ -1033,7 +1035,7 @@ static void msdc_request_done(struct msdc_host *host, struct mmc_request *mrq)
|
|||
|
||||
msdc_track_cmd_data(host, mrq->cmd, mrq->data);
|
||||
if (mrq->data)
|
||||
msdc_unprepare_data(host, mrq);
|
||||
msdc_unprepare_data(host, mrq->data);
|
||||
if (host->error)
|
||||
msdc_reset_hw(host);
|
||||
mmc_request_done(host->mmc, mrq);
|
||||
|
|
@ -1201,8 +1203,19 @@ static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq)
|
|||
WARN_ON(host->mrq);
|
||||
host->mrq = mrq;
|
||||
|
||||
if (mrq->data)
|
||||
msdc_prepare_data(host, mrq);
|
||||
if (mrq->data) {
|
||||
msdc_prepare_data(host, mrq->data);
|
||||
if (!msdc_data_prepared(mrq->data)) {
|
||||
host->mrq = NULL;
|
||||
/*
|
||||
* Failed to prepare DMA area, fail fast before
|
||||
* starting any commands.
|
||||
*/
|
||||
mrq->cmd->error = -ENOSPC;
|
||||
mmc_request_done(mmc_from_priv(host), mrq);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* if SBC is required, we have HW option and SW option.
|
||||
* if HW option is enabled, and SBC does not have "special" flags,
|
||||
|
|
@ -1223,7 +1236,7 @@ static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
|
|||
if (!data)
|
||||
return;
|
||||
|
||||
msdc_prepare_data(host, mrq);
|
||||
msdc_prepare_data(host, data);
|
||||
data->host_cookie |= MSDC_ASYNC_FLAG;
|
||||
}
|
||||
|
||||
|
|
@ -1231,14 +1244,14 @@ static void msdc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
|
|||
int err)
|
||||
{
|
||||
struct msdc_host *host = mmc_priv(mmc);
|
||||
struct mmc_data *data;
|
||||
struct mmc_data *data = mrq->data;
|
||||
|
||||
data = mrq->data;
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
if (data->host_cookie) {
|
||||
data->host_cookie &= ~MSDC_ASYNC_FLAG;
|
||||
msdc_unprepare_data(host, mrq);
|
||||
msdc_unprepare_data(host, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1772,15 +1772,10 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
|
|||
|
||||
host->mmc->actual_clock = 0;
|
||||
|
||||
clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
|
||||
if (clk & SDHCI_CLOCK_CARD_EN)
|
||||
sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
|
||||
SDHCI_CLOCK_CONTROL);
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
|
||||
if (clock == 0) {
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
if (clock == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
|
||||
sdhci_enable_clk(host, clk);
|
||||
|
|
|
|||
|
|
@ -801,4 +801,20 @@ void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode);
|
|||
void sdhci_set_data_timeout_irq(struct sdhci_host *host, bool enable);
|
||||
void __sdhci_set_timeout(struct sdhci_host *host, struct mmc_command *cmd);
|
||||
|
||||
#if defined(CONFIG_DYNAMIC_DEBUG) || \
|
||||
(defined(CONFIG_DYNAMIC_DEBUG_CORE) && defined(DYNAMIC_DEBUG_MODULE))
|
||||
#define SDHCI_DBG_ANYWAY 0
|
||||
#elif defined(DEBUG)
|
||||
#define SDHCI_DBG_ANYWAY 1
|
||||
#else
|
||||
#define SDHCI_DBG_ANYWAY 0
|
||||
#endif
|
||||
|
||||
#define sdhci_dbg_dumpregs(host, fmt) \
|
||||
do { \
|
||||
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
|
||||
if (DYNAMIC_DEBUG_BRANCH(descriptor) || SDHCI_DBG_ANYWAY) \
|
||||
sdhci_dumpregs(host); \
|
||||
} while (0)
|
||||
|
||||
#endif /* __SDHCI_HW_H */
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ static int m_can_handle_lost_msg(struct net_device *dev)
|
|||
struct sk_buff *skb;
|
||||
struct can_frame *frame;
|
||||
|
||||
netdev_err(dev, "msg lost in rxf0\n");
|
||||
netdev_dbg(dev, "msg lost in rxf0\n");
|
||||
|
||||
stats->rx_errors++;
|
||||
stats->rx_over_errors++;
|
||||
|
|
|
|||
|
|
@ -1355,6 +1355,8 @@
|
|||
#define MDIO_VEND2_CTRL1_SS13 BIT(13)
|
||||
#endif
|
||||
|
||||
#define XGBE_VEND2_MAC_AUTO_SW BIT(9)
|
||||
|
||||
/* MDIO mask values */
|
||||
#define XGBE_AN_CL73_INT_CMPLT BIT(0)
|
||||
#define XGBE_AN_CL73_INC_LINK BIT(1)
|
||||
|
|
|
|||
|
|
@ -363,6 +363,10 @@ static void xgbe_an37_set(struct xgbe_prv_data *pdata, bool enable,
|
|||
reg |= MDIO_VEND2_CTRL1_AN_RESTART;
|
||||
|
||||
XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_CTRL1, reg);
|
||||
|
||||
reg = XMDIO_READ(pdata, MDIO_MMD_VEND2, MDIO_PCS_DIG_CTRL);
|
||||
reg |= XGBE_VEND2_MAC_AUTO_SW;
|
||||
XMDIO_WRITE(pdata, MDIO_MMD_VEND2, MDIO_PCS_DIG_CTRL, reg);
|
||||
}
|
||||
|
||||
static void xgbe_an37_restart(struct xgbe_prv_data *pdata)
|
||||
|
|
@ -991,6 +995,11 @@ static void xgbe_an37_init(struct xgbe_prv_data *pdata)
|
|||
|
||||
netif_dbg(pdata, link, pdata->netdev, "CL37 AN (%s) initialized\n",
|
||||
(pdata->an_mode == XGBE_AN_MODE_CL37) ? "BaseX" : "SGMII");
|
||||
|
||||
reg = XMDIO_READ(pdata, MDIO_MMD_AN, MDIO_CTRL1);
|
||||
reg &= ~MDIO_AN_CTRL1_ENABLE;
|
||||
XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_CTRL1, reg);
|
||||
|
||||
}
|
||||
|
||||
static void xgbe_an73_init(struct xgbe_prv_data *pdata)
|
||||
|
|
|
|||
|
|
@ -292,11 +292,11 @@
|
|||
#define XGBE_LINK_TIMEOUT 5
|
||||
#define XGBE_KR_TRAINING_WAIT_ITER 50
|
||||
|
||||
#define XGBE_SGMII_AN_LINK_STATUS BIT(1)
|
||||
#define XGBE_SGMII_AN_LINK_DUPLEX BIT(1)
|
||||
#define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))
|
||||
#define XGBE_SGMII_AN_LINK_SPEED_100 0x04
|
||||
#define XGBE_SGMII_AN_LINK_SPEED_1000 0x08
|
||||
#define XGBE_SGMII_AN_LINK_DUPLEX BIT(4)
|
||||
#define XGBE_SGMII_AN_LINK_STATUS BIT(4)
|
||||
|
||||
/* ECC correctable error notification window (seconds) */
|
||||
#define XGBE_ECC_LIMIT 60
|
||||
|
|
|
|||
|
|
@ -1863,14 +1863,21 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
|
|||
break;
|
||||
}
|
||||
|
||||
buffer_info->alloced = 1;
|
||||
buffer_info->skb = skb;
|
||||
buffer_info->length = (u16) adapter->rx_buffer_len;
|
||||
page = virt_to_page(skb->data);
|
||||
offset = offset_in_page(skb->data);
|
||||
buffer_info->dma = pci_map_page(pdev, page, offset,
|
||||
adapter->rx_buffer_len,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
if (pci_dma_mapping_error(pdev, buffer_info->dma)) {
|
||||
kfree_skb(skb);
|
||||
adapter->soft_stats.rx_dropped++;
|
||||
break;
|
||||
}
|
||||
|
||||
buffer_info->alloced = 1;
|
||||
buffer_info->skb = skb;
|
||||
buffer_info->length = (u16)adapter->rx_buffer_len;
|
||||
|
||||
rfd_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
|
||||
rfd_desc->buf_len = cpu_to_le16(adapter->rx_buffer_len);
|
||||
rfd_desc->coalese = 0;
|
||||
|
|
@ -2182,8 +2189,8 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
||||
struct tx_packet_desc *ptpd)
|
||||
static bool atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
||||
struct tx_packet_desc *ptpd)
|
||||
{
|
||||
struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
|
||||
struct atl1_buffer *buffer_info;
|
||||
|
|
@ -2193,6 +2200,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
unsigned int nr_frags;
|
||||
unsigned int f;
|
||||
int retval;
|
||||
u16 first_mapped;
|
||||
u16 next_to_use;
|
||||
u16 data_len;
|
||||
u8 hdr_len;
|
||||
|
|
@ -2200,6 +2208,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
buf_len -= skb->data_len;
|
||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
next_to_use = atomic_read(&tpd_ring->next_to_use);
|
||||
first_mapped = next_to_use;
|
||||
buffer_info = &tpd_ring->buffer_info[next_to_use];
|
||||
BUG_ON(buffer_info->skb);
|
||||
/* put skb in last TPD */
|
||||
|
|
@ -2215,6 +2224,8 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
buffer_info->dma = pci_map_page(adapter->pdev, page,
|
||||
offset, hdr_len,
|
||||
PCI_DMA_TODEVICE);
|
||||
if (pci_dma_mapping_error(adapter->pdev, buffer_info->dma))
|
||||
goto dma_err;
|
||||
|
||||
if (++next_to_use == tpd_ring->count)
|
||||
next_to_use = 0;
|
||||
|
|
@ -2240,6 +2251,9 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
buffer_info->dma = pci_map_page(adapter->pdev,
|
||||
page, offset, buffer_info->length,
|
||||
PCI_DMA_TODEVICE);
|
||||
if (pci_dma_mapping_error(adapter->pdev,
|
||||
buffer_info->dma))
|
||||
goto dma_err;
|
||||
if (++next_to_use == tpd_ring->count)
|
||||
next_to_use = 0;
|
||||
}
|
||||
|
|
@ -2251,6 +2265,8 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
offset = offset_in_page(skb->data);
|
||||
buffer_info->dma = pci_map_page(adapter->pdev, page,
|
||||
offset, buf_len, PCI_DMA_TODEVICE);
|
||||
if (pci_dma_mapping_error(adapter->pdev, buffer_info->dma))
|
||||
goto dma_err;
|
||||
if (++next_to_use == tpd_ring->count)
|
||||
next_to_use = 0;
|
||||
}
|
||||
|
|
@ -2274,6 +2290,9 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev,
|
||||
frag, i * ATL1_MAX_TX_BUF_LEN,
|
||||
buffer_info->length, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&adapter->pdev->dev,
|
||||
buffer_info->dma))
|
||||
goto dma_err;
|
||||
|
||||
if (++next_to_use == tpd_ring->count)
|
||||
next_to_use = 0;
|
||||
|
|
@ -2282,6 +2301,22 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb,
|
|||
|
||||
/* last tpd's buffer-info */
|
||||
buffer_info->skb = skb;
|
||||
|
||||
return true;
|
||||
|
||||
dma_err:
|
||||
while (first_mapped != next_to_use) {
|
||||
buffer_info = &tpd_ring->buffer_info[first_mapped];
|
||||
pci_unmap_page(adapter->pdev,
|
||||
buffer_info->dma,
|
||||
buffer_info->length,
|
||||
PCI_DMA_TODEVICE);
|
||||
buffer_info->dma = 0;
|
||||
|
||||
if (++first_mapped == tpd_ring->count)
|
||||
first_mapped = 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
|
||||
|
|
@ -2352,10 +2387,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
|
|||
|
||||
len = skb_headlen(skb);
|
||||
|
||||
if (unlikely(skb->len <= 0)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (unlikely(skb->len <= 0))
|
||||
goto drop_packet;
|
||||
|
||||
nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
for (f = 0; f < nr_frags; f++) {
|
||||
|
|
@ -2369,10 +2402,8 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
|
|||
if (skb->protocol == htons(ETH_P_IP)) {
|
||||
proto_hdr_len = (skb_transport_offset(skb) +
|
||||
tcp_hdrlen(skb));
|
||||
if (unlikely(proto_hdr_len > len)) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (unlikely(proto_hdr_len > len))
|
||||
goto drop_packet;
|
||||
/* need additional TPD ? */
|
||||
if (proto_hdr_len != len)
|
||||
count += (len - proto_hdr_len +
|
||||
|
|
@ -2404,23 +2435,26 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
|
|||
}
|
||||
|
||||
tso = atl1_tso(adapter, skb, ptpd);
|
||||
if (tso < 0) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (tso < 0)
|
||||
goto drop_packet;
|
||||
|
||||
if (!tso) {
|
||||
ret_val = atl1_tx_csum(adapter, skb, ptpd);
|
||||
if (ret_val < 0) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
if (ret_val < 0)
|
||||
goto drop_packet;
|
||||
}
|
||||
|
||||
atl1_tx_map(adapter, skb, ptpd);
|
||||
if (!atl1_tx_map(adapter, skb, ptpd))
|
||||
goto drop_packet;
|
||||
|
||||
atl1_tx_queue(adapter, count, ptpd);
|
||||
atl1_update_mailbox(adapter);
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
drop_packet:
|
||||
adapter->soft_stats.tx_errors++;
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static int atl1_rings_clean(struct napi_struct *napi, int budget)
|
||||
|
|
|
|||
|
|
@ -454,7 +454,9 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)
|
|||
|
||||
if ((ets->tc_tx_bw[i] || ets->tc_tsa[i]) && i > bp->max_tc)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < max_tc; i++) {
|
||||
switch (ets->tc_tsa[i]) {
|
||||
case IEEE_8021QAZ_TSA_STRICT:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static void __bnxt_xmit_xdp_redirect(struct bnxt *bp,
|
|||
tx_buf->action = XDP_REDIRECT;
|
||||
tx_buf->xdpf = xdpf;
|
||||
dma_unmap_addr_set(tx_buf, mapping, mapping);
|
||||
dma_unmap_len_set(tx_buf, len, 0);
|
||||
dma_unmap_len_set(tx_buf, len, len);
|
||||
}
|
||||
|
||||
void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts)
|
||||
|
|
|
|||
|
|
@ -2093,10 +2093,10 @@ static int enic_change_mtu(struct net_device *netdev, int new_mtu)
|
|||
if (enic_is_dynamic(enic) || enic_is_sriov_vf(enic))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (netdev->mtu > enic->port_mtu)
|
||||
if (new_mtu > enic->port_mtu)
|
||||
netdev_warn(netdev,
|
||||
"interface MTU (%d) set higher than port MTU (%d)\n",
|
||||
netdev->mtu, enic->port_mtu);
|
||||
new_mtu, enic->port_mtu);
|
||||
|
||||
return _enic_change_mtu(netdev, new_mtu);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2725,6 +2725,7 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv,
|
|||
MEM_TYPE_PAGE_ORDER0, NULL);
|
||||
if (err) {
|
||||
dev_err(dev, "xdp_rxq_info_reg_mem_model failed\n");
|
||||
xdp_rxq_info_unreg(&fq->channel->xdp_rxq);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -3153,17 +3154,25 @@ static int bind_dpni(struct dpaa2_eth_priv *priv)
|
|||
return -EINVAL;
|
||||
}
|
||||
if (err)
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = dpni_get_qdid(priv->mc_io, 0, priv->mc_token,
|
||||
DPNI_QUEUE_TX, &priv->tx_qdid);
|
||||
if (err) {
|
||||
dev_err(dev, "dpni_get_qdid() failed\n");
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
while (i--) {
|
||||
if (priv->fq[i].type == DPAA2_RX_FQ &&
|
||||
xdp_rxq_info_is_reg(&priv->fq[i].channel->xdp_rxq))
|
||||
xdp_rxq_info_unreg(&priv->fq[i].channel->xdp_rxq);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Allocate rings for storing incoming frame descriptors */
|
||||
|
|
@ -3445,6 +3454,17 @@ static void del_ch_napi(struct dpaa2_eth_priv *priv)
|
|||
}
|
||||
}
|
||||
|
||||
static void dpaa2_eth_free_rx_xdp_rxq(struct dpaa2_eth_priv *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < priv->num_fqs; i++) {
|
||||
if (priv->fq[i].type == DPAA2_RX_FQ &&
|
||||
xdp_rxq_info_is_reg(&priv->fq[i].channel->xdp_rxq))
|
||||
xdp_rxq_info_unreg(&priv->fq[i].channel->xdp_rxq);
|
||||
}
|
||||
}
|
||||
|
||||
static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev)
|
||||
{
|
||||
struct device *dev;
|
||||
|
|
@ -3574,6 +3594,7 @@ err_alloc_percpu_extras:
|
|||
free_percpu(priv->percpu_stats);
|
||||
err_alloc_percpu_stats:
|
||||
del_ch_napi(priv);
|
||||
dpaa2_eth_free_rx_xdp_rxq(priv);
|
||||
err_bind:
|
||||
free_dpbp(priv);
|
||||
err_dpbp_setup:
|
||||
|
|
@ -3614,6 +3635,7 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
|
|||
free_percpu(priv->percpu_extras);
|
||||
|
||||
del_ch_napi(priv);
|
||||
dpaa2_eth_free_rx_xdp_rxq(priv);
|
||||
free_dpbp(priv);
|
||||
free_dpio(priv);
|
||||
free_dpni(priv);
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ static inline u64 enetc_rd_reg64(void __iomem *reg)
|
|||
tmp = ioread32(reg + 4);
|
||||
} while (high != tmp);
|
||||
|
||||
return le64_to_cpu((__le64)high << 32 | low);
|
||||
return (u64)high << 32 | low;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -3317,7 +3317,7 @@ static int niu_rbr_add_page(struct niu *np, struct rx_ring_info *rp,
|
|||
|
||||
addr = np->ops->map_page(np->device, page, 0,
|
||||
PAGE_SIZE, DMA_FROM_DEVICE);
|
||||
if (!addr) {
|
||||
if (np->ops->mapping_error(np->device, addr)) {
|
||||
__free_page(page);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
@ -6654,6 +6654,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
|
|||
len = skb_headlen(skb);
|
||||
mapping = np->ops->map_single(np->device, skb->data,
|
||||
len, DMA_TO_DEVICE);
|
||||
if (np->ops->mapping_error(np->device, mapping))
|
||||
goto out_drop;
|
||||
|
||||
prod = rp->prod;
|
||||
|
||||
|
|
@ -6695,6 +6697,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
|
|||
mapping = np->ops->map_page(np->device, skb_frag_page(frag),
|
||||
skb_frag_off(frag), len,
|
||||
DMA_TO_DEVICE);
|
||||
if (np->ops->mapping_error(np->device, mapping))
|
||||
goto out_unmap;
|
||||
|
||||
rp->tx_buffs[prod].skb = NULL;
|
||||
rp->tx_buffs[prod].mapping = mapping;
|
||||
|
|
@ -6719,6 +6723,19 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
|
|||
out:
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
out_unmap:
|
||||
while (i--) {
|
||||
const skb_frag_t *frag;
|
||||
|
||||
prod = PREVIOUS_TX(rp, prod);
|
||||
frag = &skb_shinfo(skb)->frags[i];
|
||||
np->ops->unmap_page(np->device, rp->tx_buffs[prod].mapping,
|
||||
skb_frag_size(frag), DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
np->ops->unmap_single(np->device, rp->tx_buffs[rp->prod].mapping,
|
||||
skb_headlen(skb), DMA_TO_DEVICE);
|
||||
|
||||
out_drop:
|
||||
rp->tx_errors++;
|
||||
kfree_skb(skb);
|
||||
|
|
@ -9612,6 +9629,11 @@ static void niu_pci_unmap_single(struct device *dev, u64 dma_address,
|
|||
dma_unmap_single(dev, dma_address, size, direction);
|
||||
}
|
||||
|
||||
static int niu_pci_mapping_error(struct device *dev, u64 addr)
|
||||
{
|
||||
return dma_mapping_error(dev, addr);
|
||||
}
|
||||
|
||||
static const struct niu_ops niu_pci_ops = {
|
||||
.alloc_coherent = niu_pci_alloc_coherent,
|
||||
.free_coherent = niu_pci_free_coherent,
|
||||
|
|
@ -9619,6 +9641,7 @@ static const struct niu_ops niu_pci_ops = {
|
|||
.unmap_page = niu_pci_unmap_page,
|
||||
.map_single = niu_pci_map_single,
|
||||
.unmap_single = niu_pci_unmap_single,
|
||||
.mapping_error = niu_pci_mapping_error,
|
||||
};
|
||||
|
||||
static void niu_driver_version(void)
|
||||
|
|
@ -9996,6 +10019,11 @@ static void niu_phys_unmap_single(struct device *dev, u64 dma_address,
|
|||
/* Nothing to do. */
|
||||
}
|
||||
|
||||
static int niu_phys_mapping_error(struct device *dev, u64 dma_address)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static const struct niu_ops niu_phys_ops = {
|
||||
.alloc_coherent = niu_phys_alloc_coherent,
|
||||
.free_coherent = niu_phys_free_coherent,
|
||||
|
|
@ -10003,6 +10031,7 @@ static const struct niu_ops niu_phys_ops = {
|
|||
.unmap_page = niu_phys_unmap_page,
|
||||
.map_single = niu_phys_map_single,
|
||||
.unmap_single = niu_phys_unmap_single,
|
||||
.mapping_error = niu_phys_mapping_error,
|
||||
};
|
||||
|
||||
static int niu_of_probe(struct platform_device *op)
|
||||
|
|
|
|||
|
|
@ -2879,6 +2879,9 @@ struct tx_ring_info {
|
|||
#define NEXT_TX(tp, index) \
|
||||
(((index) + 1) < (tp)->pending ? ((index) + 1) : 0)
|
||||
|
||||
#define PREVIOUS_TX(tp, index) \
|
||||
(((index) - 1) >= 0 ? ((index) - 1) : (((tp)->pending) - 1))
|
||||
|
||||
static inline u32 niu_tx_avail(struct tx_ring_info *tp)
|
||||
{
|
||||
return (tp->pending -
|
||||
|
|
@ -3140,6 +3143,7 @@ struct niu_ops {
|
|||
enum dma_data_direction direction);
|
||||
void (*unmap_single)(struct device *dev, u64 dma_address,
|
||||
size_t size, enum dma_data_direction direction);
|
||||
int (*mapping_error)(struct device *dev, u64 dma_address);
|
||||
};
|
||||
|
||||
struct niu_link_config {
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ static void lan88xx_link_change_notify(struct phy_device *phydev)
|
|||
* As workaround, set to 10 before setting to 100
|
||||
* at forced 100 F/H mode.
|
||||
*/
|
||||
if (!phydev->autoneg && phydev->speed == 100) {
|
||||
if (phydev->state == PHY_NOLINK && !phydev->autoneg && phydev->speed == 100) {
|
||||
/* disable phy interrupt */
|
||||
temp = phy_read(phydev, LAN88XX_INT_MASK);
|
||||
temp &= ~LAN88XX_INT_MASK_MDINTPIN_EN_;
|
||||
|
|
|
|||
|
|
@ -1382,6 +1382,7 @@ static const struct usb_device_id products[] = {
|
|||
{QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */
|
||||
{QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
|
||||
{QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */
|
||||
{QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */
|
||||
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */
|
||||
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */
|
||||
{QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
|
||||
|
|
|
|||
|
|
@ -87,7 +87,9 @@ int ath6kl_bmi_get_target_info(struct ath6kl *ar,
|
|||
* We need to do some backwards compatibility to make this work.
|
||||
*/
|
||||
if (le32_to_cpu(targ_info->byte_count) != sizeof(*targ_info)) {
|
||||
WARN_ON(1);
|
||||
ath6kl_err("mismatched byte count %d vs. expected %zd\n",
|
||||
le32_to_cpu(targ_info->byte_count),
|
||||
sizeof(*targ_info));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -584,7 +584,11 @@ void zd_mac_tx_to_dev(struct sk_buff *skb, int error)
|
|||
|
||||
skb_queue_tail(q, skb);
|
||||
while (skb_queue_len(q) > ZD_MAC_MAX_ACK_WAITERS) {
|
||||
zd_mac_tx_status(hw, skb_dequeue(q),
|
||||
skb = skb_dequeue(q);
|
||||
if (!skb)
|
||||
break;
|
||||
|
||||
zd_mac_tx_status(hw, skb,
|
||||
mac->ack_pending ? mac->ack_signal : 0,
|
||||
NULL);
|
||||
mac->ack_pending = 0;
|
||||
|
|
|
|||
|
|
@ -858,6 +858,25 @@ static void msm_gpio_irq_ack(struct irq_data *d)
|
|||
raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
}
|
||||
|
||||
static void msm_gpio_irq_init_valid_mask(struct gpio_chip *gc,
|
||||
unsigned long *valid_mask,
|
||||
unsigned int ngpios)
|
||||
{
|
||||
struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
|
||||
const struct msm_pingroup *g;
|
||||
int i;
|
||||
|
||||
bitmap_fill(valid_mask, ngpios);
|
||||
|
||||
for (i = 0; i < ngpios; i++) {
|
||||
g = &pctrl->soc->groups[i];
|
||||
|
||||
if (g->intr_detection_width != 1 &&
|
||||
g->intr_detection_width != 2)
|
||||
clear_bit(i, valid_mask);
|
||||
}
|
||||
}
|
||||
|
||||
static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
{
|
||||
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
|
||||
|
|
@ -1148,6 +1167,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
|
|||
girq->default_type = IRQ_TYPE_NONE;
|
||||
girq->handler = handle_bad_irq;
|
||||
girq->parents[0] = pctrl->irq;
|
||||
girq->init_valid_mask = msm_gpio_irq_init_valid_mask;
|
||||
|
||||
ret = gpiochip_add_data(&pctrl->chip, pctrl);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -253,7 +253,8 @@ static int mlxbf_tmfifo_alloc_vrings(struct mlxbf_tmfifo *fifo,
|
|||
vring->align = SMP_CACHE_BYTES;
|
||||
vring->index = i;
|
||||
vring->vdev_id = tm_vdev->vdev.id.device;
|
||||
vring->drop_desc.len = VRING_DROP_DESC_MAX_LEN;
|
||||
vring->drop_desc.len = cpu_to_virtio32(&tm_vdev->vdev,
|
||||
VRING_DROP_DESC_MAX_LEN);
|
||||
dev = &tm_vdev->vdev.dev;
|
||||
|
||||
size = vring_size(vring->num, vring->align);
|
||||
|
|
|
|||
|
|
@ -134,8 +134,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
return ret;
|
||||
|
||||
clk_rate = clk_get_rate(pc->clk_pwms[pwm->hwpwm]);
|
||||
if (!clk_rate)
|
||||
return -EINVAL;
|
||||
if (!clk_rate) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Make sure we use the bus clock and not the 26MHz clock */
|
||||
if (pc->soc->has_ck_26m_sel)
|
||||
|
|
@ -154,9 +156,9 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
}
|
||||
|
||||
if (clkdiv > PWM_CLK_DIV_MAX) {
|
||||
pwm_mediatek_clk_disable(chip, pwm);
|
||||
dev_err(chip->dev, "period %d not supported\n", period_ns);
|
||||
return -EINVAL;
|
||||
dev_err(chip->dev, "period of %d ns not supported\n", period_ns);
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (pc->soc->pwm45_fixup && pwm->hwpwm > 2) {
|
||||
|
|
@ -173,9 +175,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||
pwm_mediatek_writel(pc, pwm->hwpwm, reg_width, cnt_period);
|
||||
pwm_mediatek_writel(pc, pwm->hwpwm, reg_thres, cnt_duty);
|
||||
|
||||
out:
|
||||
pwm_mediatek_clk_disable(chip, pwm);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pwm_mediatek_enable(struct pwm_chip *chip, struct pwm_device *pwm)
|
||||
|
|
|
|||
|
|
@ -213,6 +213,9 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,
|
|||
regtype);
|
||||
}
|
||||
|
||||
if (of_find_property(np, "vin-supply", NULL))
|
||||
config->input_supply = "vin";
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
@ -250,10 +253,22 @@ static int gpio_regulator_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
drvdata->gpiods = devm_kzalloc(dev, sizeof(struct gpio_desc *),
|
||||
GFP_KERNEL);
|
||||
drvdata->gpiods = devm_kcalloc(dev, config->ngpios,
|
||||
sizeof(struct gpio_desc *), GFP_KERNEL);
|
||||
if (!drvdata->gpiods)
|
||||
return -ENOMEM;
|
||||
|
||||
if (config->input_supply) {
|
||||
drvdata->desc.supply_name = devm_kstrdup(&pdev->dev,
|
||||
config->input_supply,
|
||||
GFP_KERNEL);
|
||||
if (!drvdata->desc.supply_name) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to allocate input supply\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < config->ngpios; i++) {
|
||||
drvdata->gpiods[i] = devm_gpiod_get_index(dev,
|
||||
NULL,
|
||||
|
|
|
|||
|
|
@ -3394,6 +3394,8 @@ static int qla4xxx_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
|
|||
task_data->data_dma = dma_map_single(&ha->pdev->dev, task->data,
|
||||
task->data_count,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&ha->pdev->dev, task_data->data_dma))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n",
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ UFS_UNIT_DESC_PARAM(logical_block_size, _LOGICAL_BLK_SIZE, 1);
|
|||
UFS_UNIT_DESC_PARAM(logical_block_count, _LOGICAL_BLK_COUNT, 8);
|
||||
UFS_UNIT_DESC_PARAM(erase_block_size, _ERASE_BLK_SIZE, 4);
|
||||
UFS_UNIT_DESC_PARAM(provisioning_type, _PROVISIONING_TYPE, 1);
|
||||
UFS_UNIT_DESC_PARAM(physical_memory_resourse_count, _PHY_MEM_RSRC_CNT, 8);
|
||||
UFS_UNIT_DESC_PARAM(physical_memory_resource_count, _PHY_MEM_RSRC_CNT, 8);
|
||||
UFS_UNIT_DESC_PARAM(context_capabilities, _CTX_CAPABILITIES, 2);
|
||||
UFS_UNIT_DESC_PARAM(large_unit_granularity, _LARGE_UNIT_SIZE_M1, 1);
|
||||
UFS_UNIT_DESC_PARAM(wb_buf_alloc_units, _WB_BUF_ALLOC_UNITS, 4);
|
||||
|
|
@ -816,7 +816,7 @@ static struct attribute *ufs_sysfs_unit_descriptor[] = {
|
|||
&dev_attr_logical_block_count.attr,
|
||||
&dev_attr_erase_block_size.attr,
|
||||
&dev_attr_provisioning_type.attr,
|
||||
&dev_attr_physical_memory_resourse_count.attr,
|
||||
&dev_attr_physical_memory_resource_count.attr,
|
||||
&dev_attr_context_capabilities.attr,
|
||||
&dev_attr_large_unit_granularity.attr,
|
||||
&dev_attr_wb_buf_alloc_units.attr,
|
||||
|
|
|
|||
|
|
@ -560,12 +560,12 @@ static void ns_delay_scale(char *psc, char *sc, int delay_ns,
|
|||
}
|
||||
}
|
||||
|
||||
static void fifo_write(struct fsl_dspi *dspi)
|
||||
static void dspi_pushr_write(struct fsl_dspi *dspi)
|
||||
{
|
||||
regmap_write(dspi->regmap, SPI_PUSHR, dspi_pop_tx_pushr(dspi));
|
||||
}
|
||||
|
||||
static void cmd_fifo_write(struct fsl_dspi *dspi)
|
||||
static void dspi_pushr_cmd_write(struct fsl_dspi *dspi)
|
||||
{
|
||||
u16 cmd = dspi->tx_cmd;
|
||||
|
||||
|
|
@ -574,7 +574,7 @@ static void cmd_fifo_write(struct fsl_dspi *dspi)
|
|||
regmap_write(dspi->regmap_pushr, PUSHR_CMD, cmd);
|
||||
}
|
||||
|
||||
static void tx_fifo_write(struct fsl_dspi *dspi, u16 txdata)
|
||||
static void dspi_pushr_txdata_write(struct fsl_dspi *dspi, u16 txdata)
|
||||
{
|
||||
regmap_write(dspi->regmap_pushr, PUSHR_TX, txdata);
|
||||
}
|
||||
|
|
@ -590,18 +590,18 @@ static void dspi_tcfq_write(struct fsl_dspi *dspi)
|
|||
*/
|
||||
u32 data = dspi_pop_tx(dspi);
|
||||
|
||||
cmd_fifo_write(dspi);
|
||||
tx_fifo_write(dspi, data & 0xFFFF);
|
||||
tx_fifo_write(dspi, data >> 16);
|
||||
dspi_pushr_cmd_write(dspi);
|
||||
dspi_pushr_txdata_write(dspi, data & 0xFFFF);
|
||||
dspi_pushr_txdata_write(dspi, data >> 16);
|
||||
} else {
|
||||
/* Write one entry to both TX FIFO and CMD FIFO
|
||||
* simultaneously.
|
||||
*/
|
||||
fifo_write(dspi);
|
||||
dspi_pushr_write(dspi);
|
||||
}
|
||||
}
|
||||
|
||||
static u32 fifo_read(struct fsl_dspi *dspi)
|
||||
static u32 dspi_popr_read(struct fsl_dspi *dspi)
|
||||
{
|
||||
u32 rxdata = 0;
|
||||
|
||||
|
|
@ -611,7 +611,7 @@ static u32 fifo_read(struct fsl_dspi *dspi)
|
|||
|
||||
static void dspi_tcfq_read(struct fsl_dspi *dspi)
|
||||
{
|
||||
dspi_push_rx(dspi, fifo_read(dspi));
|
||||
dspi_push_rx(dspi, dspi_popr_read(dspi));
|
||||
}
|
||||
|
||||
static void dspi_eoq_write(struct fsl_dspi *dspi)
|
||||
|
|
@ -629,7 +629,7 @@ static void dspi_eoq_write(struct fsl_dspi *dspi)
|
|||
if (fifo_size == (DSPI_FIFO_SIZE - 1))
|
||||
dspi->tx_cmd |= SPI_PUSHR_CMD_CTCNT;
|
||||
/* Write combined TX FIFO and CMD FIFO entry */
|
||||
fifo_write(dspi);
|
||||
dspi_pushr_write(dspi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -639,7 +639,7 @@ static void dspi_eoq_read(struct fsl_dspi *dspi)
|
|||
|
||||
/* Read one FIFO entry and push to rx buffer */
|
||||
while ((dspi->rx < dspi->rx_end) && fifo_size--)
|
||||
dspi_push_rx(dspi, fifo_read(dspi));
|
||||
dspi_push_rx(dspi, dspi_popr_read(dspi));
|
||||
}
|
||||
|
||||
static int dspi_rxtx(struct fsl_dspi *dspi)
|
||||
|
|
@ -773,10 +773,28 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
|
|||
trans_mode = dspi->devtype_data->trans_mode;
|
||||
switch (trans_mode) {
|
||||
case DSPI_EOQ_MODE:
|
||||
/*
|
||||
* Reinitialize the completion before transferring data
|
||||
* to avoid the case where it might remain in the done
|
||||
* state due to a spurious interrupt from a previous
|
||||
* transfer. This could falsely signal that the current
|
||||
* transfer has completed.
|
||||
*/
|
||||
if (dspi->irq)
|
||||
reinit_completion(&dspi->xfer_done);
|
||||
regmap_write(dspi->regmap, SPI_RSER, SPI_RSER_EOQFE);
|
||||
dspi_eoq_write(dspi);
|
||||
break;
|
||||
case DSPI_TCFQ_MODE:
|
||||
/*
|
||||
* Reinitialize the completion before transferring data
|
||||
* to avoid the case where it might remain in the done
|
||||
* state due to a spurious interrupt from a previous
|
||||
* transfer. This could falsely signal that the current
|
||||
* transfer has completed.
|
||||
*/
|
||||
if (dspi->irq)
|
||||
reinit_completion(&dspi->xfer_done);
|
||||
regmap_write(dspi->regmap, SPI_RSER, SPI_RSER_TCFQE);
|
||||
dspi_tcfq_write(dspi);
|
||||
break;
|
||||
|
|
@ -793,13 +811,14 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (!dspi->irq) {
|
||||
do {
|
||||
status = dspi_poll(dspi);
|
||||
} while (status == -EINPROGRESS);
|
||||
} else if (trans_mode != DSPI_DMA_MODE) {
|
||||
wait_for_completion(&dspi->xfer_done);
|
||||
reinit_completion(&dspi->xfer_done);
|
||||
if (trans_mode != DSPI_DMA_MODE) {
|
||||
if (dspi->irq) {
|
||||
wait_for_completion(&dspi->xfer_done);
|
||||
} else {
|
||||
do {
|
||||
status = dspi_poll(dspi);
|
||||
} while (status == -EINPROGRESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (transfer->delay_usecs)
|
||||
|
|
|
|||
|
|
@ -1333,30 +1333,21 @@ static sint aes_cipher(u8 *key, uint hdrlen,
|
|||
num_blocks, payload_index;
|
||||
|
||||
u8 pn_vector[6];
|
||||
u8 mic_iv[16];
|
||||
u8 mic_header1[16];
|
||||
u8 mic_header2[16];
|
||||
u8 ctr_preload[16];
|
||||
u8 mic_iv[16] = {};
|
||||
u8 mic_header1[16] = {};
|
||||
u8 mic_header2[16] = {};
|
||||
u8 ctr_preload[16] = {};
|
||||
|
||||
/* Intermediate Buffers */
|
||||
u8 chain_buffer[16];
|
||||
u8 aes_out[16];
|
||||
u8 padded_buffer[16];
|
||||
u8 chain_buffer[16] = {};
|
||||
u8 aes_out[16] = {};
|
||||
u8 padded_buffer[16] = {};
|
||||
u8 mic[8];
|
||||
uint frtype = GetFrameType(pframe);
|
||||
uint frsubtype = GetFrameSubType(pframe);
|
||||
|
||||
frsubtype = frsubtype>>4;
|
||||
|
||||
|
||||
memset((void *)mic_iv, 0, 16);
|
||||
memset((void *)mic_header1, 0, 16);
|
||||
memset((void *)mic_header2, 0, 16);
|
||||
memset((void *)ctr_preload, 0, 16);
|
||||
memset((void *)chain_buffer, 0, 16);
|
||||
memset((void *)aes_out, 0, 16);
|
||||
memset((void *)padded_buffer, 0, 16);
|
||||
|
||||
if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen == WLAN_HDR_A3_QOS_LEN))
|
||||
a4_exists = 0;
|
||||
else
|
||||
|
|
@ -1581,15 +1572,15 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
num_blocks, payload_index;
|
||||
sint res = _SUCCESS;
|
||||
u8 pn_vector[6];
|
||||
u8 mic_iv[16];
|
||||
u8 mic_header1[16];
|
||||
u8 mic_header2[16];
|
||||
u8 ctr_preload[16];
|
||||
u8 mic_iv[16] = {};
|
||||
u8 mic_header1[16] = {};
|
||||
u8 mic_header2[16] = {};
|
||||
u8 ctr_preload[16] = {};
|
||||
|
||||
/* Intermediate Buffers */
|
||||
u8 chain_buffer[16];
|
||||
u8 aes_out[16];
|
||||
u8 padded_buffer[16];
|
||||
u8 chain_buffer[16] = {};
|
||||
u8 aes_out[16] = {};
|
||||
u8 padded_buffer[16] = {};
|
||||
u8 mic[8];
|
||||
|
||||
|
||||
|
|
@ -1599,15 +1590,6 @@ static sint aes_decipher(u8 *key, uint hdrlen,
|
|||
|
||||
frsubtype = frsubtype>>4;
|
||||
|
||||
|
||||
memset((void *)mic_iv, 0, 16);
|
||||
memset((void *)mic_header1, 0, 16);
|
||||
memset((void *)mic_header2, 0, 16);
|
||||
memset((void *)ctr_preload, 0, 16);
|
||||
memset((void *)chain_buffer, 0, 16);
|
||||
memset((void *)aes_out, 0, 16);
|
||||
memset((void *)padded_buffer, 0, 16);
|
||||
|
||||
/* start to decrypt the payload */
|
||||
|
||||
num_blocks = (plen-8) / 16; /* plen including LLC, payload_length and mic) */
|
||||
|
|
|
|||
|
|
@ -874,16 +874,25 @@ static struct platform_driver ulite_platform_driver = {
|
|||
|
||||
static int __init ulite_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
pr_debug("uartlite: calling uart_register_driver()\n");
|
||||
ret = uart_register_driver(&ulite_uart_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
pr_debug("uartlite: calling platform_driver_register()\n");
|
||||
return platform_driver_register(&ulite_platform_driver);
|
||||
ret = platform_driver_register(&ulite_platform_driver);
|
||||
if (ret)
|
||||
uart_unregister_driver(&ulite_uart_driver);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit ulite_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&ulite_platform_driver);
|
||||
if (ulite_uart_driver.state)
|
||||
uart_unregister_driver(&ulite_uart_driver);
|
||||
uart_unregister_driver(&ulite_uart_driver);
|
||||
}
|
||||
|
||||
module_init(ulite_init);
|
||||
|
|
|
|||
|
|
@ -4368,6 +4368,7 @@ void do_unblank_screen(int leaving_gfx)
|
|||
set_palette(vc);
|
||||
set_cursor(vc);
|
||||
vt_event_post(VT_EVENT_UNBLANK, vc->vc_num, vc->vc_num);
|
||||
notify_update(vc);
|
||||
}
|
||||
EXPORT_SYMBOL(do_unblank_screen);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ struct wdm_device {
|
|||
u16 wMaxCommand;
|
||||
u16 wMaxPacketSize;
|
||||
__le16 inum;
|
||||
int reslength;
|
||||
int length;
|
||||
int read;
|
||||
int count;
|
||||
|
|
@ -201,6 +200,11 @@ static void wdm_in_callback(struct urb *urb)
|
|||
if (desc->rerr == 0 && status != -EPIPE)
|
||||
desc->rerr = status;
|
||||
|
||||
if (length == 0) {
|
||||
dev_dbg(&desc->intf->dev, "received ZLP\n");
|
||||
goto skip_zlp;
|
||||
}
|
||||
|
||||
if (length + desc->length > desc->wMaxCommand) {
|
||||
/* The buffer would overflow */
|
||||
set_bit(WDM_OVERFLOW, &desc->flags);
|
||||
|
|
@ -209,18 +213,18 @@ static void wdm_in_callback(struct urb *urb)
|
|||
if (!test_bit(WDM_OVERFLOW, &desc->flags)) {
|
||||
memmove(desc->ubuf + desc->length, desc->inbuf, length);
|
||||
desc->length += length;
|
||||
desc->reslength = length;
|
||||
}
|
||||
}
|
||||
skip_error:
|
||||
|
||||
if (desc->rerr) {
|
||||
/*
|
||||
* Since there was an error, userspace may decide to not read
|
||||
* any data after poll'ing.
|
||||
* If there was a ZLP or an error, userspace may decide to not
|
||||
* read any data after poll'ing.
|
||||
* We should respond to further attempts from the device to send
|
||||
* data, so that we can get unstuck.
|
||||
*/
|
||||
skip_zlp:
|
||||
schedule_work(&desc->service_outs_intr);
|
||||
} else {
|
||||
set_bit(WDM_READ, &desc->flags);
|
||||
|
|
@ -571,15 +575,6 @@ retry:
|
|||
goto retry;
|
||||
}
|
||||
|
||||
if (!desc->reslength) { /* zero length read */
|
||||
dev_dbg(&desc->intf->dev, "zero length - clearing WDM_READ\n");
|
||||
clear_bit(WDM_READ, &desc->flags);
|
||||
rv = service_outstanding_interrupt(desc);
|
||||
spin_unlock_irq(&desc->iuspin);
|
||||
if (rv < 0)
|
||||
goto err;
|
||||
goto retry;
|
||||
}
|
||||
cntr = desc->length;
|
||||
spin_unlock_irq(&desc->iuspin);
|
||||
}
|
||||
|
|
@ -839,7 +834,7 @@ static void service_interrupt_work(struct work_struct *work)
|
|||
|
||||
spin_lock_irq(&desc->iuspin);
|
||||
service_outstanding_interrupt(desc);
|
||||
if (!desc->resp_count) {
|
||||
if (!desc->resp_count && (desc->length || desc->rerr)) {
|
||||
set_bit(WDM_READ, &desc->flags);
|
||||
wake_up(&desc->wait);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,7 +224,8 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x046a, 0x0023), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Logitech HD Webcam C270 */
|
||||
{ USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x046d, 0x0825), .driver_info = USB_QUIRK_RESET_RESUME |
|
||||
USB_QUIRK_NO_LPM},
|
||||
|
||||
/* Logitech HD Pro Webcams C920, C920-C, C922, C925e and C930e */
|
||||
{ USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
|
|
|||
|
|
@ -717,15 +717,16 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
|
|||
dev_set_name(&dev->dev, "usb%d", bus->busnum);
|
||||
root_hub = 1;
|
||||
} else {
|
||||
int n;
|
||||
|
||||
/* match any labeling on the hubs; it's one-based */
|
||||
if (parent->devpath[0] == '0') {
|
||||
snprintf(dev->devpath, sizeof dev->devpath,
|
||||
"%d", port1);
|
||||
n = snprintf(dev->devpath, sizeof(dev->devpath), "%d", port1);
|
||||
/* Root ports are not counted in route string */
|
||||
dev->route = 0;
|
||||
} else {
|
||||
snprintf(dev->devpath, sizeof dev->devpath,
|
||||
"%s.%d", parent->devpath, port1);
|
||||
n = snprintf(dev->devpath, sizeof(dev->devpath), "%s.%d",
|
||||
parent->devpath, port1);
|
||||
/* Route string assumes hubs have less than 16 ports */
|
||||
if (port1 < 15)
|
||||
dev->route = parent->route +
|
||||
|
|
@ -734,6 +735,11 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
|
|||
dev->route = parent->route +
|
||||
(15 << ((parent->level - 1)*4));
|
||||
}
|
||||
if (n >= sizeof(dev->devpath)) {
|
||||
usb_put_hcd(bus_to_hcd(bus));
|
||||
usb_put_dev(dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dev->dev.parent = &parent->dev;
|
||||
dev_set_name(&dev->dev, "%d-%s", bus->busnum, dev->devpath);
|
||||
|
|
|
|||
|
|
@ -1320,14 +1320,14 @@ static struct se_portal_group *usbg_make_tpg(struct se_wwn *wwn,
|
|||
struct usbg_tport *tport = container_of(wwn, struct usbg_tport,
|
||||
tport_wwn);
|
||||
struct usbg_tpg *tpg;
|
||||
unsigned long tpgt;
|
||||
u16 tpgt;
|
||||
int ret;
|
||||
struct f_tcm_opts *opts;
|
||||
unsigned i;
|
||||
|
||||
if (strstr(name, "tpgt_") != name)
|
||||
return ERR_PTR(-EINVAL);
|
||||
if (kstrtoul(name + 5, 0, &tpgt) || tpgt > UINT_MAX)
|
||||
if (kstrtou16(name + 5, 0, &tpgt))
|
||||
return ERR_PTR(-EINVAL);
|
||||
ret = -ENODEV;
|
||||
mutex_lock(&tpg_instances_lock);
|
||||
|
|
|
|||
|
|
@ -286,8 +286,8 @@ __acquires(&port->port_lock)
|
|||
break;
|
||||
}
|
||||
|
||||
if (do_tty_wake && port->port.tty)
|
||||
tty_wakeup(port->port.tty);
|
||||
if (do_tty_wake)
|
||||
tty_port_tty_wakeup(&port->port);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
@ -564,7 +564,7 @@ static int gs_start_io(struct gs_port *port)
|
|||
gs_start_tx(port);
|
||||
/* Unblock any pending writes into our circular buffer, in case
|
||||
* we didn't in gs_start_tx() */
|
||||
tty_wakeup(port->port.tty);
|
||||
tty_port_tty_wakeup(&port->port);
|
||||
} else {
|
||||
/* Free reqs only if we are still connected */
|
||||
if (port->port_usb) {
|
||||
|
|
|
|||
|
|
@ -288,6 +288,9 @@ static int dp_altmode_vdm(struct typec_altmode *alt,
|
|||
break;
|
||||
case CMDT_RSP_NAK:
|
||||
switch (cmd) {
|
||||
case DP_CMD_STATUS_UPDATE:
|
||||
dp->state = DP_STATE_EXIT;
|
||||
break;
|
||||
case DP_CMD_CONFIGURE:
|
||||
dp->data.conf = 0;
|
||||
ret = dp_altmode_configured(dp);
|
||||
|
|
@ -488,7 +491,7 @@ static ssize_t pin_assignment_show(struct device *dev,
|
|||
|
||||
assignments = get_current_pin_assignments(dp);
|
||||
|
||||
for (i = 0; assignments; assignments >>= 1, i++) {
|
||||
for (i = 0; assignments && i < DP_PIN_ASSIGN_MAX; assignments >>= 1, i++) {
|
||||
if (assignments & 1) {
|
||||
if (i == cur)
|
||||
len += sprintf(buf + len, "[%s] ",
|
||||
|
|
|
|||
|
|
@ -4747,7 +4747,6 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
|
|||
int err = 0;
|
||||
struct btrfs_root *root = BTRFS_I(dir)->root;
|
||||
struct btrfs_trans_handle *trans;
|
||||
u64 last_unlink_trans;
|
||||
|
||||
if (inode->i_size > BTRFS_EMPTY_DIR_SIZE)
|
||||
return -ENOTEMPTY;
|
||||
|
|
@ -4758,6 +4757,23 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
|
|||
if (IS_ERR(trans))
|
||||
return PTR_ERR(trans);
|
||||
|
||||
/*
|
||||
* Propagate the last_unlink_trans value of the deleted dir to its
|
||||
* parent directory. This is to prevent an unrecoverable log tree in the
|
||||
* case we do something like this:
|
||||
* 1) create dir foo
|
||||
* 2) create snapshot under dir foo
|
||||
* 3) delete the snapshot
|
||||
* 4) rmdir foo
|
||||
* 5) mkdir foo
|
||||
* 6) fsync foo or some file inside foo
|
||||
*
|
||||
* This is because we can't unlink other roots when replaying the dir
|
||||
* deletes for directory foo.
|
||||
*/
|
||||
if (BTRFS_I(inode)->last_unlink_trans >= trans->transid)
|
||||
btrfs_record_snapshot_destroy(trans, BTRFS_I(dir));
|
||||
|
||||
if (unlikely(btrfs_ino(BTRFS_I(inode)) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
|
||||
err = btrfs_unlink_subvol(trans, dir, dentry);
|
||||
goto out;
|
||||
|
|
@ -4767,28 +4783,12 @@ static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
|
|||
if (err)
|
||||
goto out;
|
||||
|
||||
last_unlink_trans = BTRFS_I(inode)->last_unlink_trans;
|
||||
|
||||
/* now the directory is empty */
|
||||
err = btrfs_unlink_inode(trans, root, BTRFS_I(dir),
|
||||
BTRFS_I(d_inode(dentry)), dentry->d_name.name,
|
||||
dentry->d_name.len);
|
||||
if (!err) {
|
||||
if (!err)
|
||||
btrfs_i_size_write(BTRFS_I(inode), 0);
|
||||
/*
|
||||
* Propagate the last_unlink_trans value of the deleted dir to
|
||||
* its parent directory. This is to prevent an unrecoverable
|
||||
* log tree in the case we do something like this:
|
||||
* 1) create dir foo
|
||||
* 2) create snapshot under dir foo
|
||||
* 3) delete the snapshot
|
||||
* 4) rmdir foo
|
||||
* 5) mkdir foo
|
||||
* 6) fsync foo or some file inside foo
|
||||
*/
|
||||
if (last_unlink_trans >= trans->transid)
|
||||
BTRFS_I(dir)->last_unlink_trans = last_unlink_trans;
|
||||
}
|
||||
out:
|
||||
btrfs_end_transaction(trans);
|
||||
btrfs_btree_balance_dirty(root->fs_info);
|
||||
|
|
|
|||
|
|
@ -793,6 +793,9 @@ static int create_snapshot(struct btrfs_root *root, struct inode *dir,
|
|||
if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state))
|
||||
return -EINVAL;
|
||||
|
||||
if (btrfs_root_refs(&root->root_item) == 0)
|
||||
return -ENOENT;
|
||||
|
||||
if (atomic_read(&root->nr_swapfiles)) {
|
||||
btrfs_warn(fs_info,
|
||||
"cannot snapshot subvolume with active swapfile");
|
||||
|
|
|
|||
|
|
@ -1033,7 +1033,9 @@ again:
|
|||
search_key.type = BTRFS_INODE_REF_KEY;
|
||||
search_key.offset = parent_objectid;
|
||||
ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
|
||||
if (ret == 0) {
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
} else if (ret == 0) {
|
||||
struct btrfs_inode_ref *victim_ref;
|
||||
unsigned long ptr;
|
||||
unsigned long ptr_end;
|
||||
|
|
|
|||
|
|
@ -1749,7 +1749,7 @@ static int ceph_zero_objects(struct inode *inode, loff_t offset, loff_t length)
|
|||
s32 stripe_unit = ci->i_layout.stripe_unit;
|
||||
s32 stripe_count = ci->i_layout.stripe_count;
|
||||
s32 object_size = ci->i_layout.object_size;
|
||||
u64 object_set_size = object_size * stripe_count;
|
||||
u64 object_set_size = (u64) object_size * stripe_count;
|
||||
u64 nearly, t;
|
||||
|
||||
/* round offset up to next period boundary */
|
||||
|
|
|
|||
|
|
@ -306,6 +306,14 @@ check_smb_hdr(struct smb_hdr *smb)
|
|||
if (smb->Command == SMB_COM_LOCKING_ANDX)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Windows NT server returns error resposne (e.g. STATUS_DELETE_PENDING
|
||||
* or STATUS_OBJECT_NAME_NOT_FOUND or ERRDOS/ERRbadfile or any other)
|
||||
* for some TRANS2 requests without the RESPONSE flag set in header.
|
||||
*/
|
||||
if (smb->Command == SMB_COM_TRANSACTION2 && smb->Status.CifsError != 0)
|
||||
return 0;
|
||||
|
||||
cifs_dbg(VFS, "Server sent request, not response. mid=%u\n",
|
||||
get_mid(smb));
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -178,45 +178,30 @@ int dbMount(struct inode *ipbmap)
|
|||
dbmp_le = (struct dbmap_disk *) mp->data;
|
||||
bmp->db_mapsize = le64_to_cpu(dbmp_le->dn_mapsize);
|
||||
bmp->db_nfree = le64_to_cpu(dbmp_le->dn_nfree);
|
||||
|
||||
bmp->db_l2nbperpage = le32_to_cpu(dbmp_le->dn_l2nbperpage);
|
||||
if (bmp->db_l2nbperpage > L2PSIZE - L2MINBLOCKSIZE ||
|
||||
bmp->db_l2nbperpage < 0) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
|
||||
bmp->db_numag = le32_to_cpu(dbmp_le->dn_numag);
|
||||
if (!bmp->db_numag || bmp->db_numag > MAXAG) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
|
||||
bmp->db_maxlevel = le32_to_cpu(dbmp_le->dn_maxlevel);
|
||||
bmp->db_maxag = le32_to_cpu(dbmp_le->dn_maxag);
|
||||
bmp->db_agpref = le32_to_cpu(dbmp_le->dn_agpref);
|
||||
if (bmp->db_maxag >= MAXAG || bmp->db_maxag < 0 ||
|
||||
bmp->db_agpref >= MAXAG || bmp->db_agpref < 0) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
|
||||
bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel);
|
||||
bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight);
|
||||
bmp->db_agwidth = le32_to_cpu(dbmp_le->dn_agwidth);
|
||||
if (!bmp->db_agwidth) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
bmp->db_agstart = le32_to_cpu(dbmp_le->dn_agstart);
|
||||
bmp->db_agl2size = le32_to_cpu(dbmp_le->dn_agl2size);
|
||||
if (bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG ||
|
||||
bmp->db_agl2size < 0) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
|
||||
if (((bmp->db_mapsize - 1) >> bmp->db_agl2size) > MAXAG) {
|
||||
if ((bmp->db_l2nbperpage > L2PSIZE - L2MINBLOCKSIZE) ||
|
||||
(bmp->db_l2nbperpage < 0) ||
|
||||
!bmp->db_numag || (bmp->db_numag > MAXAG) ||
|
||||
(bmp->db_maxag >= MAXAG) || (bmp->db_maxag < 0) ||
|
||||
(bmp->db_agpref >= MAXAG) || (bmp->db_agpref < 0) ||
|
||||
(bmp->db_agheight < 0) || (bmp->db_agheight > (L2LPERCTL >> 1)) ||
|
||||
(bmp->db_agwidth < 1) || (bmp->db_agwidth > (LPERCTL / MAXAG)) ||
|
||||
(bmp->db_agwidth > (1 << (L2LPERCTL - (bmp->db_agheight << 1)))) ||
|
||||
(bmp->db_agstart < 0) ||
|
||||
(bmp->db_agstart > (CTLTREESIZE - 1 - bmp->db_agwidth * (MAXAG - 1))) ||
|
||||
(bmp->db_agl2size > L2MAXL2SIZE - L2MAXAG) ||
|
||||
(bmp->db_agl2size < 0) ||
|
||||
((bmp->db_mapsize - 1) >> bmp->db_agl2size) > MAXAG) {
|
||||
err = -EINVAL;
|
||||
goto err_release_metapage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2146,14 +2146,14 @@ static int attach_recursive_mnt(struct mount *source_mnt,
|
|||
hlist_for_each_entry_safe(child, n, &tree_list, mnt_hash) {
|
||||
struct mount *q;
|
||||
hlist_del_init(&child->mnt_hash);
|
||||
q = __lookup_mnt(&child->mnt_parent->mnt,
|
||||
child->mnt_mountpoint);
|
||||
if (q)
|
||||
mnt_change_mountpoint(child, smp, q);
|
||||
/* Notice when we are propagating across user namespaces */
|
||||
if (child->mnt_parent->mnt_ns->user_ns != user_ns)
|
||||
lock_mnt_tree(child);
|
||||
child->mnt.mnt_flags &= ~MNT_LOCKED;
|
||||
q = __lookup_mnt(&child->mnt_parent->mnt,
|
||||
child->mnt_mountpoint);
|
||||
if (q)
|
||||
mnt_change_mountpoint(child, smp, q);
|
||||
commit_tree(child);
|
||||
}
|
||||
put_mountpoint(smp);
|
||||
|
|
|
|||
|
|
@ -1129,6 +1129,7 @@ static void ff_layout_reset_read(struct nfs_pgio_header *hdr)
|
|||
}
|
||||
|
||||
static int ff_layout_async_handle_error_v4(struct rpc_task *task,
|
||||
u32 op_status,
|
||||
struct nfs4_state *state,
|
||||
struct nfs_client *clp,
|
||||
struct pnfs_layout_segment *lseg,
|
||||
|
|
@ -1139,32 +1140,42 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task,
|
|||
struct nfs4_deviceid_node *devid = FF_LAYOUT_DEVID_NODE(lseg, idx);
|
||||
struct nfs4_slot_table *tbl = &clp->cl_session->fc_slot_table;
|
||||
|
||||
switch (task->tk_status) {
|
||||
case -NFS4ERR_BADSESSION:
|
||||
case -NFS4ERR_BADSLOT:
|
||||
case -NFS4ERR_BAD_HIGH_SLOT:
|
||||
case -NFS4ERR_DEADSESSION:
|
||||
case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION:
|
||||
case -NFS4ERR_SEQ_FALSE_RETRY:
|
||||
case -NFS4ERR_SEQ_MISORDERED:
|
||||
switch (op_status) {
|
||||
case NFS4_OK:
|
||||
case NFS4ERR_NXIO:
|
||||
break;
|
||||
case NFSERR_PERM:
|
||||
if (!task->tk_xprt)
|
||||
break;
|
||||
xprt_force_disconnect(task->tk_xprt);
|
||||
goto out_retry;
|
||||
case NFS4ERR_BADSESSION:
|
||||
case NFS4ERR_BADSLOT:
|
||||
case NFS4ERR_BAD_HIGH_SLOT:
|
||||
case NFS4ERR_DEADSESSION:
|
||||
case NFS4ERR_CONN_NOT_BOUND_TO_SESSION:
|
||||
case NFS4ERR_SEQ_FALSE_RETRY:
|
||||
case NFS4ERR_SEQ_MISORDERED:
|
||||
dprintk("%s ERROR %d, Reset session. Exchangeid "
|
||||
"flags 0x%x\n", __func__, task->tk_status,
|
||||
clp->cl_exchange_flags);
|
||||
nfs4_schedule_session_recovery(clp->cl_session, task->tk_status);
|
||||
break;
|
||||
case -NFS4ERR_DELAY:
|
||||
case -NFS4ERR_GRACE:
|
||||
goto out_retry;
|
||||
case NFS4ERR_DELAY:
|
||||
nfs_inc_stats(lseg->pls_layout->plh_inode, NFSIOS_DELAY);
|
||||
fallthrough;
|
||||
case NFS4ERR_GRACE:
|
||||
rpc_delay(task, FF_LAYOUT_POLL_RETRY_MAX);
|
||||
break;
|
||||
case -NFS4ERR_RETRY_UNCACHED_REP:
|
||||
break;
|
||||
goto out_retry;
|
||||
case NFS4ERR_RETRY_UNCACHED_REP:
|
||||
goto out_retry;
|
||||
/* Invalidate Layout errors */
|
||||
case -NFS4ERR_PNFS_NO_LAYOUT:
|
||||
case -ESTALE: /* mapped NFS4ERR_STALE */
|
||||
case -EBADHANDLE: /* mapped NFS4ERR_BADHANDLE */
|
||||
case -EISDIR: /* mapped NFS4ERR_ISDIR */
|
||||
case -NFS4ERR_FHEXPIRED:
|
||||
case -NFS4ERR_WRONG_TYPE:
|
||||
case NFS4ERR_PNFS_NO_LAYOUT:
|
||||
case NFS4ERR_STALE:
|
||||
case NFS4ERR_BADHANDLE:
|
||||
case NFS4ERR_ISDIR:
|
||||
case NFS4ERR_FHEXPIRED:
|
||||
case NFS4ERR_WRONG_TYPE:
|
||||
dprintk("%s Invalid layout error %d\n", __func__,
|
||||
task->tk_status);
|
||||
/*
|
||||
|
|
@ -1177,6 +1188,11 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task,
|
|||
pnfs_destroy_layout(NFS_I(inode));
|
||||
rpc_wake_up(&tbl->slot_tbl_waitq);
|
||||
goto reset;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (task->tk_status) {
|
||||
/* RPC connection errors */
|
||||
case -ECONNREFUSED:
|
||||
case -EHOSTDOWN:
|
||||
|
|
@ -1190,26 +1206,56 @@ static int ff_layout_async_handle_error_v4(struct rpc_task *task,
|
|||
nfs4_delete_deviceid(devid->ld, devid->nfs_client,
|
||||
&devid->deviceid);
|
||||
rpc_wake_up(&tbl->slot_tbl_waitq);
|
||||
/* fall through */
|
||||
break;
|
||||
default:
|
||||
if (ff_layout_avoid_mds_available_ds(lseg))
|
||||
return -NFS4ERR_RESET_TO_PNFS;
|
||||
reset:
|
||||
dprintk("%s Retry through MDS. Error %d\n", __func__,
|
||||
task->tk_status);
|
||||
return -NFS4ERR_RESET_TO_MDS;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ff_layout_avoid_mds_available_ds(lseg))
|
||||
return -NFS4ERR_RESET_TO_PNFS;
|
||||
reset:
|
||||
dprintk("%s Retry through MDS. Error %d\n", __func__,
|
||||
task->tk_status);
|
||||
return -NFS4ERR_RESET_TO_MDS;
|
||||
|
||||
out_retry:
|
||||
task->tk_status = 0;
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* Retry all errors through either pNFS or MDS except for -EJUKEBOX */
|
||||
static int ff_layout_async_handle_error_v3(struct rpc_task *task,
|
||||
u32 op_status,
|
||||
struct nfs_client *clp,
|
||||
struct pnfs_layout_segment *lseg,
|
||||
int idx)
|
||||
{
|
||||
struct nfs4_deviceid_node *devid = FF_LAYOUT_DEVID_NODE(lseg, idx);
|
||||
|
||||
switch (op_status) {
|
||||
case NFS_OK:
|
||||
case NFSERR_NXIO:
|
||||
break;
|
||||
case NFSERR_PERM:
|
||||
if (!task->tk_xprt)
|
||||
break;
|
||||
xprt_force_disconnect(task->tk_xprt);
|
||||
goto out_retry;
|
||||
case NFSERR_ACCES:
|
||||
case NFSERR_BADHANDLE:
|
||||
case NFSERR_FBIG:
|
||||
case NFSERR_IO:
|
||||
case NFSERR_NOSPC:
|
||||
case NFSERR_ROFS:
|
||||
case NFSERR_STALE:
|
||||
goto out_reset_to_pnfs;
|
||||
case NFSERR_JUKEBOX:
|
||||
nfs_inc_stats(lseg->pls_layout->plh_inode, NFSIOS_DELAY);
|
||||
goto out_retry;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (task->tk_status) {
|
||||
/* File access problems. Don't mark the device as unavailable */
|
||||
case -EACCES:
|
||||
|
|
@ -1228,6 +1274,7 @@ static int ff_layout_async_handle_error_v3(struct rpc_task *task,
|
|||
nfs4_delete_deviceid(devid->ld, devid->nfs_client,
|
||||
&devid->deviceid);
|
||||
}
|
||||
out_reset_to_pnfs:
|
||||
/* FIXME: Need to prevent infinite looping here. */
|
||||
return -NFS4ERR_RESET_TO_PNFS;
|
||||
out_retry:
|
||||
|
|
@ -1238,6 +1285,7 @@ out_retry:
|
|||
}
|
||||
|
||||
static int ff_layout_async_handle_error(struct rpc_task *task,
|
||||
u32 op_status,
|
||||
struct nfs4_state *state,
|
||||
struct nfs_client *clp,
|
||||
struct pnfs_layout_segment *lseg,
|
||||
|
|
@ -1256,10 +1304,11 @@ static int ff_layout_async_handle_error(struct rpc_task *task,
|
|||
|
||||
switch (vers) {
|
||||
case 3:
|
||||
return ff_layout_async_handle_error_v3(task, lseg, idx);
|
||||
case 4:
|
||||
return ff_layout_async_handle_error_v4(task, state, clp,
|
||||
return ff_layout_async_handle_error_v3(task, op_status, clp,
|
||||
lseg, idx);
|
||||
case 4:
|
||||
return ff_layout_async_handle_error_v4(task, op_status, state,
|
||||
clp, lseg, idx);
|
||||
default:
|
||||
/* should never happen */
|
||||
WARN_ON_ONCE(1);
|
||||
|
|
@ -1304,7 +1353,17 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
|
|||
switch (status) {
|
||||
case NFS4ERR_DELAY:
|
||||
case NFS4ERR_GRACE:
|
||||
return;
|
||||
case NFS4ERR_PERM:
|
||||
break;
|
||||
case NFS4ERR_NXIO:
|
||||
ff_layout_mark_ds_unreachable(lseg, idx);
|
||||
/*
|
||||
* Don't return the layout if this is a read and we still
|
||||
* have layouts to try
|
||||
*/
|
||||
if (opnum == OP_READ)
|
||||
break;
|
||||
fallthrough;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -1327,12 +1386,15 @@ static int ff_layout_read_done_cb(struct rpc_task *task,
|
|||
int err;
|
||||
|
||||
trace_nfs4_pnfs_read(hdr, task->tk_status);
|
||||
if (task->tk_status < 0)
|
||||
if (task->tk_status < 0) {
|
||||
ff_layout_io_track_ds_error(hdr->lseg, hdr->pgio_mirror_idx,
|
||||
hdr->args.offset, hdr->args.count,
|
||||
hdr->res.op_status, OP_READ,
|
||||
task->tk_status);
|
||||
err = ff_layout_async_handle_error(task, hdr->args.context->state,
|
||||
}
|
||||
|
||||
err = ff_layout_async_handle_error(task, hdr->res.op_status,
|
||||
hdr->args.context->state,
|
||||
hdr->ds_clp, hdr->lseg,
|
||||
hdr->pgio_mirror_idx);
|
||||
|
||||
|
|
@ -1500,12 +1562,15 @@ static int ff_layout_write_done_cb(struct rpc_task *task,
|
|||
int err;
|
||||
|
||||
trace_nfs4_pnfs_write(hdr, task->tk_status);
|
||||
if (task->tk_status < 0)
|
||||
if (task->tk_status < 0) {
|
||||
ff_layout_io_track_ds_error(hdr->lseg, hdr->pgio_mirror_idx,
|
||||
hdr->args.offset, hdr->args.count,
|
||||
hdr->res.op_status, OP_WRITE,
|
||||
task->tk_status);
|
||||
err = ff_layout_async_handle_error(task, hdr->args.context->state,
|
||||
}
|
||||
|
||||
err = ff_layout_async_handle_error(task, hdr->res.op_status,
|
||||
hdr->args.context->state,
|
||||
hdr->ds_clp, hdr->lseg,
|
||||
hdr->pgio_mirror_idx);
|
||||
|
||||
|
|
@ -1543,13 +1608,16 @@ static int ff_layout_commit_done_cb(struct rpc_task *task,
|
|||
int err;
|
||||
|
||||
trace_nfs4_pnfs_commit_ds(data, task->tk_status);
|
||||
if (task->tk_status < 0)
|
||||
if (task->tk_status < 0) {
|
||||
ff_layout_io_track_ds_error(data->lseg, data->ds_commit_index,
|
||||
data->args.offset, data->args.count,
|
||||
data->res.op_status, OP_COMMIT,
|
||||
task->tk_status);
|
||||
err = ff_layout_async_handle_error(task, NULL, data->ds_clp,
|
||||
data->lseg, data->ds_commit_index);
|
||||
}
|
||||
|
||||
err = ff_layout_async_handle_error(task, data->res.op_status,
|
||||
NULL, data->ds_clp, data->lseg,
|
||||
data->ds_commit_index);
|
||||
|
||||
switch (err) {
|
||||
case -NFS4ERR_RESET_TO_PNFS:
|
||||
|
|
|
|||
|
|
@ -2180,15 +2180,26 @@ EXPORT_SYMBOL_GPL(nfs_net_id);
|
|||
static int nfs_net_init(struct net *net)
|
||||
{
|
||||
struct nfs_net *nn = net_generic(net, nfs_net_id);
|
||||
int err;
|
||||
|
||||
nfs_clients_init(net);
|
||||
|
||||
if (!rpc_proc_register(net, &nn->rpcstats)) {
|
||||
nfs_clients_exit(net);
|
||||
return -ENOMEM;
|
||||
err = -ENOMEM;
|
||||
goto err_proc_rpc;
|
||||
}
|
||||
|
||||
return nfs_fs_proc_net_init(net);
|
||||
err = nfs_fs_proc_net_init(net);
|
||||
if (err)
|
||||
goto err_proc_nfs;
|
||||
|
||||
return 0;
|
||||
|
||||
err_proc_nfs:
|
||||
rpc_proc_unregister(net, "nfs");
|
||||
err_proc_rpc:
|
||||
nfs_clients_exit(net);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void nfs_net_exit(struct net *net)
|
||||
|
|
|
|||
|
|
@ -199,7 +199,9 @@ enum ovl_path_type ovl_path_real(struct dentry *dentry, struct path *path)
|
|||
|
||||
struct dentry *ovl_dentry_upper(struct dentry *dentry)
|
||||
{
|
||||
return ovl_upperdentry_dereference(OVL_I(d_inode(dentry)));
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
return inode ? ovl_upperdentry_dereference(OVL_I(inode)) : NULL;
|
||||
}
|
||||
|
||||
struct dentry *ovl_dentry_lower(struct dentry *dentry)
|
||||
|
|
|
|||
|
|
@ -33,21 +33,27 @@ static void proc_evict_inode(struct inode *inode)
|
|||
{
|
||||
struct proc_dir_entry *de;
|
||||
struct ctl_table_header *head;
|
||||
struct proc_inode *ei = PROC_I(inode);
|
||||
|
||||
truncate_inode_pages_final(&inode->i_data);
|
||||
clear_inode(inode);
|
||||
|
||||
/* Stop tracking associated processes */
|
||||
put_pid(PROC_I(inode)->pid);
|
||||
if (ei->pid) {
|
||||
put_pid(ei->pid);
|
||||
ei->pid = NULL;
|
||||
}
|
||||
|
||||
/* Let go of any associated proc directory entry */
|
||||
de = PDE(inode);
|
||||
if (de)
|
||||
de = ei->pde;
|
||||
if (de) {
|
||||
pde_put(de);
|
||||
ei->pde = NULL;
|
||||
}
|
||||
|
||||
head = PROC_I(inode)->sysctl;
|
||||
head = ei->sysctl;
|
||||
if (head) {
|
||||
RCU_INIT_POINTER(PROC_I(inode)->sysctl, NULL);
|
||||
WRITE_ONCE(ei->sysctl, NULL);
|
||||
proc_sys_evict_inode(inode, head);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue