mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Merge tag 'android14-6.1.128_r00' into android14-6.1
This merges the android14-6.1.128_r00 tag into the android14-6.1 branch, catching it up with the latest LTS releases. It contains the following commits: *8ae119f6f2ANDROID: hrtimers: revert mismerged commit in 6.1.127 LTS merge *e6d1ba5430Merge 6.1.128 into android14-6.1-lts |\ | *0cbb5f65e5Linux 6.1.128 | *a9401cd5d1drm/v3d: Assign job pointer to NULL before signaling the fence | *7d06d97e23ASoC: samsung: midas_wm1811: Fix 'Headphone Switch' control creation | *44c495818dsmb: client: fix NULL ptr deref in crypto_aead_setkey() | *4982cc83daInput: xpad - add support for wooting two he (arm) | *b336f58326Input: xpad - add unofficial Xbox 360 wireless receiver clone | *dd00051871Input: atkbd - map F23 key to support default copilot shortcut | *4631653d8dALSA: usb-audio: Add delay quirk for USB Audio Device | *33233b06adRevert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" | *4b9b41fabcUSB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() | *bce966530fsmb: client: fix UAF in async decryption | *49a27ee475wifi: iwlwifi: add a few rate index validity checks | *182a4b7c73scsi: storvsc: Ratelimit warning logs to prevent VM denial of service | *ce11424026ipv4: ip_tunnel: Fix suspicious RCU usage warning in ip_tunnel_find() | *13ea954776ext4: fix access to uninitialised lock in fc replay path | *6bcb8a5b70vfio/platform: check the bounds of read/write syscalls | *1a1b2b8c28Revert "HID: multitouch: Add support for lenovo Y9000P Touchpad" | *8476f8428eblock: fix integer overflow in BLKSECDISCARD | *1332c6ed44net: sched: fix ets qdisc OOB Indexing | *74a37ce697io_uring: fix waiters missing wake ups | *2a40a140e1gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag | *754df8c9b7xfs: respect the stable writes flag on the RT device | *bc4ad69947xfs: clean up FS_XFLAG_REALTIME handling in xfs_ioctl_setattr_xflags | *7880b1f0adxfs: dquot recovery does not validate the recovered dquot | *df716416dbxfs: clean up dqblk extraction | *318cac2b98xfs: inode recovery does not validate the recovered inode | *6e7826272exfs: fix internal error from AGFL exhaustion | *323a707978xfs: up(ic_sema) if flushing data device fails | *67c362b810xfs: only remap the written blocks in xfs_reflink_end_cow_extent | *b655ee7d1axfs: abort intent items when recovery intents fail | *16cf312bf0xfs: factor out xfs_defer_pending_abort | *6685b88514xfs: allow read IO and FICLONE to run concurrently | *4eb3b579b4xfs: handle nimaps=0 from xfs_bmapi_write in xfs_alloc_file_space | *feb30fe495xfs: introduce protection for drop nlink | *4d607041cfxfs: make sure maxlen is still congruent with prod when rounding down | *34167d0216xfs: fix units conversion error in xfs_bmap_del_extent_delay | *9153644934xfs: rt stubs should return negative errnos when rt disabled | *9670abd18cxfs: prevent rt growfs when quota is enabled | *8ee604ac13xfs: hoist freeing of rt data fork extent mappings | *79bdab54b6xfs: bump max fsgeom struct version | *f1bc570611softirq: Allow raising SCHED_SOFTIRQ from SMP-call-function on RT kernel | *d0ec61c9f3ipv6: Fix soft lockups in fib6_select_path under high next hop churn | *9fdec47866regmap: detach regmap from dev on regmap_exit | *87d6969081ASoC: samsung: Add missing depends on I2C | *656100f656ASoC: samsung: midas_wm1811: Map missing jack kcontrols | *d2b4b39b75irqchip/sunxi-nmi: Add missing SKIP_WAKE flag | *b7d2461858drm/amd/display: Use HW lock mgr for PSR1 | *2104ad7193scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request | *18cb5798dfseccomp: Stub for !CONFIG_SECCOMP | *b873c88bfcASoC: samsung: Add missing selects for MFD_WM8994 | *8cf587aab9ASoC: wm8994: Add depends on MFD core * |979fb1d6ecRevert "fs: fix missing declaration of init_files" * |42cbb80279Revert "net: add exit_batch_rtnl() method" * |5b18fc7e2eRevert "gtp: use exit_batch_rtnl() method" * |da69d6681fRevert "gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp()." * |f3dfa82675Revert "gtp: Destroy device along with udp socket's netns dismantle." * |79f1b689daMerge 6.1.127 into android14-6.1-lts |\| | *75cefdf153Linux 6.1.127 | *be7c61ea5fnet: fix data-races around sk->sk_forward_alloc | *060de3717cx86/xen: fix SLS mitigation in xen_hypercall_iret() | *400fb0e9c2nfsd: add list_head nf_gc to struct nfsd_file | *75a0a6dde8erofs: handle NONHEAD !delta[1] lclusters gracefully | *6326a3dc14erofs: tidy up EROFS on-disk naming | *6e5dbd1c04wifi: ath10k: avoid NULL pointer error during sdio remove | *cd862903faRevert "regmap: detach regmap from dev on regmap_exit" | *275b8347e2scsi: sg: Fix slab-use-after-free read in sg_release() | *9e95518ecaRDMA/rxe: Fix the qp flush warnings in req | *e77360374fRevert "drm/amdgpu: rework resume handling for display (v2)" | *1921fe7d28block: fix uaf for flush rq while iterating tags | *05b1b33936drm/amdgpu: fix usage slab after free | *5bd410c210drm/amd/display: Fix out-of-bounds access in 'dcn21_link_encoder_create' | *64b79afdcaiio: adc: rockchip_saradc: fix information leak in triggered buffer | *d3e25180baiio: imu: inv_icm42600: fix timestamps after suspend if sensor is on | *f2e4823baaiio: imu: inv_icm42600: fix spi burst write not supported | *479a42eedbRevert "PCI: Use preserve_config in place of pci_flags" | *6603aca936drm/i915/fb: Relax clear color alignment to 64 bytes | *3d41dbf82ehrtimers: Handle CPU state correctly on hotplug | *d7b0e89610irqchip/gic-v3-its: Don't enable interrupts in its_irq_set_vcpu_affinity() | *e64612f8e8irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly | *e1994d0f50irqchip: Plug a OF node reference leak in platform_irqchip_probe() | *699cc10cc3pmdomain: imx8mp-blk-ctrl: add missing loop break condition | *d38c49f7bdgpiolib: cdev: Fix use after free in lineinfo_changed_notify | *65c367bd9dfs/proc: fix softlockup in __read_vmcore (part 2) | *80fc836f3efilemap: avoid truncating 64-bit offset to 32 bits | *b52e50dd4fvsock: prevent null-ptr-deref in vsock_*[has_data|has_space] | *cc586af35bvsock: reset socket state when de-assigning the transport | *a3c9390f14vsock/virtio: cancel close work in the destructor | *88244163bcvsock/virtio: discard packets if the transport changes | *435349d49fnet: ethernet: xgbe: re-add aneg to supported features in PHY quirks | *9e1f509476selftests: mptcp: avoid spurious errors on disconnect | *73411e09d0mptcp: be sure to send ack when mptcp-level window re-opens | *fe3de867f9zram: fix potential UAF of zram table | *f983099430ALSA: hda/realtek: Add support for Ayaneo System using CS35L41 HDA | *0b30238c5cx86/asm: Make serialize() always_inline | *3375bdf84cpoll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll() | *7ca4bd6b75iomap: avoid avoid truncating 64-bit offset to 32 bits | *a5045ca6ebACPI: resource: acpi_dev_irq_override(): Check DMI match last | *bea2a4cf27selftests: tc-testing: reduce rshift value | *435df80d46scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers | *f937130b8dcachefiles: Parse the "secctx" immediately | *d8680dad14kheaders: Ignore silly-rename files | *bb00b1190bfs: fix missing declaration of init_files | *190218579chfs: Sanity check the root record | *41e4ca8acbmac802154: check local interfaces before deleting sdata list | *cce9254a04nvmet: propagate npwg topology | *75505de002i2c: rcar: fix NACK handling when being a target | *53336f3367i2c: mux: demux-pinctrl: check initial mux selection, too | *4c833c3652Revert "mtd: spi-nor: core: replace dummy buswidth from addr to data" | *79fe53ed76hwmon: (tmp513) Fix division of negative numbers | *2a1c88f7cadrm/v3d: Ensure job pointer is set to NULL after job completion | *efc92a260enet/mlx5: Clear port select structure when fail to create | *edb43b46a2net/mlx5: Fix RDMA TX steering prio | *207c81e2ecnet: xilinx: axienet: Fix IRQ coalescing packet count overflow | *c385389ab0nfp: bpf: prevent integer overflow in nfp_bpf_event_output() | *efec287cbagtp: Destroy device along with udp socket's netns dismantle. | *c91e694619gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp(). | *a3fdd5f3d6gtp: use exit_batch_rtnl() method | *760f415e08net: add exit_batch_rtnl() method | *e5d24a7074pktgen: Avoid out-of-bounds access in get_imix_entries | *ea9e990356openvswitch: fix lockup on tx to unregistering netdev with carrier | *d0a3b3d117bpf: Fix bpf_sk_select_reuseport() memory leak | *075248178cnet: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field() * |766d61c1b6Merge branch 'android14-6.1' into android14-6.1-lts * |12fe448232Merge 6.1.126 into android14-6.1-lts |\| | *f4f677285bLinux 6.1.126 | *f6247d3e3fPartial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals * |3ad3cca387Merge 6.1.125 into android14-6.1-lts |\| | *60ceadf924Linux 6.1.125 | *9734fd7a27xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals | *d208571943drm: adv7511: Fix use-after-free in adv7533_attach_dsi() | *90d4d2718edrm: bridge: adv7511: use dev_err_probe in probe function | *2d43119248ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv | *18a1cd923bocfs2: correct return value of ocfs2_local_free_info() | *ad9ec26abaof: address: Preserve the flags portion on 1:1 dma-ranges mapping | *007662f785of: address: Store number of bus flag cells rather than bool | *7eb954ec96of: address: Remove duplicated functions | *30eb1123b2of: address: Fix address translation when address-size is greater than 2 | *46dfdb0f93of/address: Add support for 3 address cell bus | *57e3220c28of: unittest: Add bus address range parsing tests | *40153aae1carm64: dts: rockchip: add hevc power domain clock to rk3328 | *2550149fcdblock, bfq: fix waker_bfqq UAF after bfq_split_bfqq() | *64b0aebed9ARM: dts: imxrt1050: Fix clocks for mmc | *6b63308c28io_uring/eventfd: ensure io_eventfd_signal() defers another RCU period | *3e871c1d51iio: adc: ad7124: Disable all channels at probe time | *6c92d6f2c7iio: inkern: call iio_device_put() only on mapped devices | *25ef52f1c1iio: adc: at91: call input_free_device() on allocated iio_dev | *26016d08c4iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep() | *7bc7e9d6bdiio: gyro: fxas21002c: Fix missing data update in trigger handler | *ebe2672bc4iio: adc: ti-ads8688: fix information leak in triggered buffer | *6985ba4467iio: imu: kmx61: fix information leak in triggered buffer | *47d245be86iio: light: vcnl4035: fix information leak in triggered buffer | *b0642d9c87iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer | *b7849f62e6iio: pressure: zpa2326: fix information leak in triggered buffer | *82f60f3600usb: gadget: f_fs: Remove WARN_ON in functionfs_bind | *9981c33aaeusb: gadget: f_uac2: Fix incorrect setting of bNumEndpoints | *dc51b66ec2usb: fix reference leak in usb_new_device() | *c6f763b54cUSB: core: Disable LPM only for non-suspended ports | *39219c2611USB: usblp: return error when setting unsupported protocol | *92a185bf7eusb: dwc3-am62: Disable autosuspend during remove | *3d730e8758usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null | *d26b9f0b99misc: microchip: pci1xxxx: Resolve return code mismatch during GPIO set config | *79aef6187emisc: microchip: pci1xxxx: Resolve kernel panic during GPIO IRQ handling | *ca47e933a9topology: Keep the cpumask unchanged when printing cpumap | *20a5725627usb: dwc3: gadget: fix writing NYET threshold | *32af3bcca3USB: serial: cp210x: add Phoenix Contact UPS Device | *65cb57b9f1usb-storage: Add max sectors quirk for Nokia 208 | *78e8abbdf7staging: iio: ad9832: Correct phase range check | *331e6e9fb0staging: iio: ad9834: Correct phase range check | *c712fa6158USB: serial: option: add Neoway N723-EA support | *fb94621286USB: serial: option: add MeiG Smart SRM815 * |afc952d5b1Merge43f4df339a("bpf: Fix overloading of MEM_UNINIT's meaning") into android14-6.1-lts |\| | *43f4df339abpf: Fix overloading of MEM_UNINIT's meaning * |22d4625eb5Merge2a72b2ce9e("bpf: Add MEM_WRITE attribute") into android14-6.1-lts |\| | *2a72b2ce9ebpf: Add MEM_WRITE attribute * |b3b3e04dadMerge6bc6ee3111("dm-verity FEC: Fix RS FEC repair for roots unaligned to block size (take 2)") into android14-6.1-lts |\| | *6bc6ee3111dm-verity FEC: Fix RS FEC repair for roots unaligned to block size (take 2) | *e3ce913a32drm/amd/display: increase MAX_SURFACES to the value supported by hw | *abe587a4ebACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[] | *88b9cf8f11ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[] | *c21df31fc2riscv: Fix sleeping in invalid context in die() | *d0645e1114thermal: of: fix OF node leak in of_thermal_zone_find() | *f3d1e4062edrm/amd/display: Add check for granularity in dml ceil/floor helpers | *44ee863592sctp: sysctl: plpmtud_probe_interval: avoid using current->nsproxy | *e919197fb8sctp: sysctl: udp_port: avoid using current->nsproxy | *1b67030d39sctp: sysctl: auth_enable: avoid using current->nsproxy | *4059507e34sctp: sysctl: rto_min/max: avoid using current->nsproxy | *3cd0659debsctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy * |c0e2451628Mergec0dde4a52b("dm-ebs: don't set the flag DM_TARGET_PASSES_INTEGRITY") into android14-6.1-lts |/ *c0dde4a52bdm-ebs: don't set the flag DM_TARGET_PASSES_INTEGRITY *12771050b6dm thin: make get_first_thin use rcu-safe list first function *bb87b494aecpuidle: riscv-sbi: fix device node release in early exit of for_each_possible_cpu *13e41c58c7ksmbd: fix unexpectedly changed path in ksmbd_vfs_kern_path_locked *aabe47cf5aafs: Fix the maximum cell name length *ee7e40f7fbksmbd: fix a missing return value check bug *f05f5ab5e7drm/mediatek: Add return value check when reading DPCD *4e6749237ddrm/mediatek: Fix mode valid issue for dp *e0ad4b014cdrm/mediatek: Fix YCbCr422 color format issue for DP *21c501e66adrm/mediatek: stop selecting foreign drivers *f0a2808767net/mlx5: Fix variable not being completed when function returns *a777e06dfcsched: sch_cake: add bounds checks to host bulk flow fairness counts *5552b4fd44netfilter: conntrack: clamp maximum hashtable size to INT_MAX *d470b92593netfilter: nf_tables: imbalance in flowtable binding *636d7b95c2tcp: Annotate data-race around sk->sk_mark in tcp_v4_send_reset *faa8a33e86Bluetooth: hci_sync: Fix not setting Random Address when required *ecb1356a97tls: Fix tls_sw_sendmsg error handling *657a87c2a0ice: fix incorrect PHY settings for 100 GB/s *8a7b73f19fcxgb4: Avoid removal of uninserted tid *b958283830bnxt_en: Fix possible memory leak when hwrm_req_replace fails *2011749ca9net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute *2d230410a9tcp/dccp: allow a connection when sk_max_ack_backlog is zero *c0b0d9ae36tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog *0a5026be1anet: 802: LLC+SNAP OID:PID lookup on start of skb data *4589abf8c4ieee802154: ca8210: Add missing check for kfifo_alloc() in ca8210_probe() *f6dce4dc12ASoC: mediatek: disable buffer pre-allocation *939d239fe8scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity *d23f2621fcexfat: fix the infinite loop in __exfat_free_cluster() *31beabd0f4exfat: fix the infinite loop in exfat_readdir() *43c38c3b73dm array: fix cursor index when skipping across block boundaries *956a74b22ddm array: fix unreleased btree blocks on closing a faulty array cursor *e477021d25dm array: fix releasing a faulty array block twice in dm_array_cursor_end *5af095cb86jbd2: flush filesystem device before updating tail sequence *62834f5bf5jbd2: increase IO priority for writing revoke records *397383db9csched/task_stack: fix object_is_on_stack() for KASAN tagged pointers *b79a0d1e9abpf, sockmap: Fix race between element replace and close() *e4b168c64dceph: give up on paths longer than PATH_MAX Change-Id: Ia18514bdd4d67e9850b55a4637d0fbe4a138658f Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 124
|
||||
SUBLEVEL = 128
|
||||
EXTRAVERSION =
|
||||
NAME = Curry Ramen
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
reg = <0x402c0000 0x4000>;
|
||||
interrupts = <110>;
|
||||
clocks = <&clks IMXRT1050_CLK_IPG_PDOF>,
|
||||
<&clks IMXRT1050_CLK_OSC>,
|
||||
<&clks IMXRT1050_CLK_AHB_PODF>,
|
||||
<&clks IMXRT1050_CLK_USDHC1>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
|
||||
@@ -302,6 +302,7 @@
|
||||
|
||||
power-domain@RK3328_PD_HEVC {
|
||||
reg = <RK3328_PD_HEVC>;
|
||||
clocks = <&cru SCLK_VENC_CORE>;
|
||||
#power-domain-cells = <0>;
|
||||
};
|
||||
power-domain@RK3328_PD_VIDEO {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
int show_unhandled_signals = 1;
|
||||
|
||||
static DEFINE_SPINLOCK(die_lock);
|
||||
static DEFINE_RAW_SPINLOCK(die_lock);
|
||||
|
||||
void die(struct pt_regs *regs, const char *str)
|
||||
{
|
||||
@@ -38,7 +38,7 @@ void die(struct pt_regs *regs, const char *str)
|
||||
|
||||
oops_enter();
|
||||
|
||||
spin_lock_irqsave(&die_lock, flags);
|
||||
raw_spin_lock_irqsave(&die_lock, flags);
|
||||
console_verbose();
|
||||
bust_spinlocks(1);
|
||||
|
||||
@@ -55,7 +55,7 @@ void die(struct pt_regs *regs, const char *str)
|
||||
|
||||
bust_spinlocks(0);
|
||||
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
|
||||
spin_unlock_irqrestore(&die_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&die_lock, flags);
|
||||
oops_exit();
|
||||
|
||||
if (in_interrupt())
|
||||
|
||||
@@ -225,7 +225,7 @@ static inline void clwb(volatile void *__p)
|
||||
|
||||
#define nop() asm volatile ("nop")
|
||||
|
||||
static inline void serialize(void)
|
||||
static __always_inline void serialize(void)
|
||||
{
|
||||
/* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */
|
||||
asm volatile(".byte 0xf, 0x1, 0xe8" ::: "memory");
|
||||
|
||||
@@ -221,7 +221,7 @@ SYM_CODE_END(xen_early_idt_handler_array)
|
||||
push %rax
|
||||
mov $__HYPERVISOR_iret, %eax
|
||||
syscall /* Do the IRET. */
|
||||
#ifdef CONFIG_MITIGATION_SLS
|
||||
#ifdef CONFIG_SLS
|
||||
int3
|
||||
#endif
|
||||
.endm
|
||||
|
||||
@@ -6733,16 +6733,24 @@ static struct bfq_queue *bfq_waker_bfqq(struct bfq_queue *bfqq)
|
||||
if (new_bfqq == waker_bfqq) {
|
||||
/*
|
||||
* If waker_bfqq is in the merge chain, and current
|
||||
* is the only procress.
|
||||
* is the only process, waker_bfqq can be freed.
|
||||
*/
|
||||
if (bfqq_process_refs(waker_bfqq) == 1)
|
||||
return NULL;
|
||||
break;
|
||||
|
||||
return waker_bfqq;
|
||||
}
|
||||
|
||||
new_bfqq = new_bfqq->new_bfqq;
|
||||
}
|
||||
|
||||
/*
|
||||
* If waker_bfqq is not in the merge chain, and it's procress reference
|
||||
* is 0, waker_bfqq can be freed.
|
||||
*/
|
||||
if (bfqq_process_refs(waker_bfqq) == 0)
|
||||
return NULL;
|
||||
|
||||
return waker_bfqq;
|
||||
}
|
||||
|
||||
|
||||
@@ -860,10 +860,8 @@ unlock:
|
||||
* faster to shut down and is made fully functional here as
|
||||
* request_queues for non-existent devices never get registered.
|
||||
*/
|
||||
if (!blk_queue_init_done(q)) {
|
||||
blk_queue_flag_set(QUEUE_FLAG_INIT_DONE, q);
|
||||
percpu_ref_switch_to_percpu(&q->q_usage_counter);
|
||||
}
|
||||
blk_queue_flag_set(QUEUE_FLAG_INIT_DONE, q);
|
||||
percpu_ref_switch_to_percpu(&q->q_usage_counter);
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -687,13 +687,10 @@ void del_gendisk(struct gendisk *disk)
|
||||
* If the disk does not own the queue, allow using passthrough requests
|
||||
* again. Else leave the queue frozen to fail all I/O.
|
||||
*/
|
||||
if (!test_bit(GD_OWNS_QUEUE, &disk->state)) {
|
||||
blk_queue_flag_clear(QUEUE_FLAG_INIT_DONE, q);
|
||||
if (!test_bit(GD_OWNS_QUEUE, &disk->state))
|
||||
__blk_mq_unfreeze_queue(q, true);
|
||||
} else {
|
||||
if (queue_is_mq(q))
|
||||
blk_mq_exit_queue(q);
|
||||
}
|
||||
else if (queue_is_mq(q))
|
||||
blk_mq_exit_queue(q);
|
||||
}
|
||||
EXPORT_SYMBOL(del_gendisk);
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ static int blk_ioctl_discard(struct block_device *bdev, fmode_t mode,
|
||||
return -EINVAL;
|
||||
|
||||
filemap_invalidate_lock(inode->i_mapping);
|
||||
err = truncate_bdev_range(bdev, mode, start, start + len - 1);
|
||||
err = truncate_bdev_range(bdev, mode, start, end - 1);
|
||||
if (err)
|
||||
goto fail;
|
||||
err = blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL);
|
||||
@@ -127,7 +127,7 @@ fail:
|
||||
static int blk_ioctl_secure_erase(struct block_device *bdev, fmode_t mode,
|
||||
void __user *argp)
|
||||
{
|
||||
uint64_t start, len;
|
||||
uint64_t start, len, end;
|
||||
uint64_t range[2];
|
||||
int err;
|
||||
|
||||
@@ -142,11 +142,12 @@ static int blk_ioctl_secure_erase(struct block_device *bdev, fmode_t mode,
|
||||
len = range[1];
|
||||
if ((start & 511) || (len & 511))
|
||||
return -EINVAL;
|
||||
if (start + len > bdev_nr_bytes(bdev))
|
||||
if (check_add_overflow(start, len, &end) ||
|
||||
end > bdev_nr_bytes(bdev))
|
||||
return -EINVAL;
|
||||
|
||||
filemap_invalidate_lock(bdev->bd_inode->i_mapping);
|
||||
err = truncate_bdev_range(bdev, mode, start, start + len - 1);
|
||||
err = truncate_bdev_range(bdev, mode, start, end - 1);
|
||||
if (!err)
|
||||
err = blkdev_issue_secure_erase(bdev, start >> 9, len >> 9,
|
||||
GFP_KERNEL);
|
||||
|
||||
@@ -439,6 +439,13 @@ static const struct dmi_system_id asus_laptop[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1504VAP */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "X1504VAP"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook X1704VAP */
|
||||
.matches = {
|
||||
@@ -615,6 +622,17 @@ static const struct dmi_system_id lg_laptop[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the
|
||||
* board-name is changed, so check OEM strings instead. Note
|
||||
* OEM string matches are always exact matches.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=219614
|
||||
*/
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_OEM_STRING, "GM5HG0A"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -645,11 +663,11 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
|
||||
for (i = 0; i < ARRAY_SIZE(override_table); i++) {
|
||||
const struct irq_override_cmp *entry = &override_table[i];
|
||||
|
||||
if (dmi_check_system(entry->system) &&
|
||||
entry->irq == gsi &&
|
||||
if (entry->irq == gsi &&
|
||||
entry->triggering == triggering &&
|
||||
entry->polarity == polarity &&
|
||||
entry->shareable == shareable)
|
||||
entry->shareable == shareable &&
|
||||
dmi_check_system(entry->system))
|
||||
return entry->override;
|
||||
}
|
||||
|
||||
|
||||
@@ -1513,7 +1513,6 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
|
||||
{
|
||||
int ret;
|
||||
|
||||
regmap_detach_dev(map->dev, map);
|
||||
regcache_exit(map);
|
||||
regmap_debugfs_exit(map);
|
||||
|
||||
@@ -1548,6 +1547,7 @@ void regmap_exit(struct regmap *map)
|
||||
{
|
||||
struct regmap_async *async;
|
||||
|
||||
regmap_detach_dev(map->dev, map);
|
||||
regcache_exit(map);
|
||||
regmap_debugfs_exit(map);
|
||||
regmap_range_exit(map);
|
||||
|
||||
@@ -27,9 +27,17 @@ static ssize_t name##_read(struct file *file, struct kobject *kobj, \
|
||||
loff_t off, size_t count) \
|
||||
{ \
|
||||
struct device *dev = kobj_to_dev(kobj); \
|
||||
cpumask_var_t mask; \
|
||||
ssize_t n; \
|
||||
\
|
||||
return cpumap_print_bitmask_to_buf(buf, topology_##mask(dev->id), \
|
||||
off, count); \
|
||||
if (!alloc_cpumask_var(&mask, GFP_KERNEL)) \
|
||||
return -ENOMEM; \
|
||||
\
|
||||
cpumask_copy(mask, topology_##mask(dev->id)); \
|
||||
n = cpumap_print_bitmask_to_buf(buf, mask, off, count); \
|
||||
free_cpumask_var(mask); \
|
||||
\
|
||||
return n; \
|
||||
} \
|
||||
\
|
||||
static ssize_t name##_list_read(struct file *file, struct kobject *kobj, \
|
||||
@@ -37,9 +45,17 @@ static ssize_t name##_list_read(struct file *file, struct kobject *kobj, \
|
||||
loff_t off, size_t count) \
|
||||
{ \
|
||||
struct device *dev = kobj_to_dev(kobj); \
|
||||
cpumask_var_t mask; \
|
||||
ssize_t n; \
|
||||
\
|
||||
return cpumap_print_list_to_buf(buf, topology_##mask(dev->id), \
|
||||
off, count); \
|
||||
if (!alloc_cpumask_var(&mask, GFP_KERNEL)) \
|
||||
return -ENOMEM; \
|
||||
\
|
||||
cpumask_copy(mask, topology_##mask(dev->id)); \
|
||||
n = cpumap_print_list_to_buf(buf, mask, off, count); \
|
||||
free_cpumask_var(mask); \
|
||||
\
|
||||
return n; \
|
||||
}
|
||||
|
||||
define_id_show_func(physical_package_id, "%d");
|
||||
|
||||
@@ -1192,6 +1192,7 @@ static bool zram_meta_alloc(struct zram *zram, u64 disksize)
|
||||
zram->mem_pool = zs_create_pool(zram->disk->disk_name);
|
||||
if (!zram->mem_pool) {
|
||||
vfree(zram->table);
|
||||
zram->table = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -540,12 +540,12 @@ static int sbi_cpuidle_probe(struct platform_device *pdev)
|
||||
int cpu, ret;
|
||||
struct cpuidle_driver *drv;
|
||||
struct cpuidle_device *dev;
|
||||
struct device_node *np, *pds_node;
|
||||
struct device_node *pds_node;
|
||||
|
||||
/* Detect OSI support based on CPU DT nodes */
|
||||
sbi_cpuidle_use_osi = true;
|
||||
for_each_possible_cpu(cpu) {
|
||||
np = of_cpu_device_node_get(cpu);
|
||||
struct device_node *np __free(device_node) = of_cpu_device_node_get(cpu);
|
||||
if (np &&
|
||||
of_find_property(np, "power-domains", NULL) &&
|
||||
of_find_property(np, "power-domain-names", NULL)) {
|
||||
|
||||
@@ -2860,9 +2860,9 @@ static int gpio_chrdev_release(struct inode *inode, struct file *file)
|
||||
struct gpio_chardev_data *cdev = file->private_data;
|
||||
struct gpio_device *gdev = cdev->gdev;
|
||||
|
||||
bitmap_free(cdev->watched_lines);
|
||||
blocking_notifier_chain_unregister(&gdev->notifier,
|
||||
&cdev->lineinfo_changed_nb);
|
||||
bitmap_free(cdev->watched_lines);
|
||||
put_device(&gdev->dev);
|
||||
kfree(cdev);
|
||||
|
||||
|
||||
@@ -3242,7 +3242,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
|
||||
*
|
||||
* @adev: amdgpu_device pointer
|
||||
*
|
||||
* Second resume function for hardware IPs. The list of all the hardware
|
||||
* First resume function for hardware IPs. The list of all the hardware
|
||||
* IPs that make up the asic is walked and the resume callbacks are run for
|
||||
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
|
||||
* functional state after a suspend and updates the software state as
|
||||
@@ -3260,7 +3260,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
|
||||
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE ||
|
||||
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
|
||||
continue;
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
@@ -3284,36 +3283,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
|
||||
*
|
||||
* @adev: amdgpu_device pointer
|
||||
*
|
||||
* Third resume function for hardware IPs. The list of all the hardware
|
||||
* IPs that make up the asic is walked and the resume callbacks are run for
|
||||
* all DCE. resume puts the hardware into a functional state after a suspend
|
||||
* and updates the software state as necessary. This function is also used
|
||||
* for restoring the GPU after a GPU reset.
|
||||
*
|
||||
* Returns 0 on success, negative error code on failure.
|
||||
*/
|
||||
static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev)
|
||||
{
|
||||
int i, r;
|
||||
|
||||
for (i = 0; i < adev->num_ip_blocks; i++) {
|
||||
if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw)
|
||||
continue;
|
||||
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) {
|
||||
r = adev->ip_blocks[i].version->funcs->resume(adev);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_device_ip_resume - run resume for hardware IPs
|
||||
*
|
||||
@@ -3344,13 +3313,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
|
||||
|
||||
r = amdgpu_device_ip_resume_phase2(adev);
|
||||
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
amdgpu_fence_driver_hw_init(adev);
|
||||
|
||||
r = amdgpu_device_ip_resume_phase3(adev);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -4131,8 +4093,8 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)
|
||||
int idx;
|
||||
bool px;
|
||||
|
||||
amdgpu_fence_driver_sw_fini(adev);
|
||||
amdgpu_device_ip_fini(adev);
|
||||
amdgpu_fence_driver_sw_fini(adev);
|
||||
release_firmware(adev->firmware.gpu_info_fw);
|
||||
adev->firmware.gpu_info_fw = NULL;
|
||||
adev->accel_working = false;
|
||||
@@ -4349,6 +4311,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
|
||||
dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
|
||||
return r;
|
||||
}
|
||||
amdgpu_fence_driver_hw_init(adev);
|
||||
|
||||
r = amdgpu_device_ip_late_init(adev);
|
||||
if (r)
|
||||
@@ -5102,10 +5065,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
|
||||
if (r)
|
||||
goto out;
|
||||
|
||||
r = amdgpu_device_ip_resume_phase3(tmp_adev);
|
||||
if (r)
|
||||
goto out;
|
||||
|
||||
if (vram_lost)
|
||||
amdgpu_device_fill_reset_magic(tmp_adev);
|
||||
|
||||
|
||||
@@ -220,15 +220,15 @@ int amdgpu_vce_sw_fini(struct amdgpu_device *adev)
|
||||
|
||||
drm_sched_entity_destroy(&adev->vce.entity);
|
||||
|
||||
amdgpu_bo_free_kernel(&adev->vce.vcpu_bo, &adev->vce.gpu_addr,
|
||||
(void **)&adev->vce.cpu_addr);
|
||||
|
||||
for (i = 0; i < adev->vce.num_rings; i++)
|
||||
amdgpu_ring_fini(&adev->vce.ring[i]);
|
||||
|
||||
release_firmware(adev->vce.fw);
|
||||
mutex_destroy(&adev->vce.idle_mutex);
|
||||
|
||||
amdgpu_bo_free_kernel(&adev->vce.vcpu_bo, &adev->vce.gpu_addr,
|
||||
(void **)&adev->vce.cpu_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ struct dmub_notification;
|
||||
|
||||
#define DC_VER "3.2.207"
|
||||
|
||||
#define MAX_SURFACES 3
|
||||
#define MAX_SURFACES 4
|
||||
#define MAX_PLANES 6
|
||||
#define MAX_STREAMS 6
|
||||
#define MAX_SINKS_PER_LINK 4
|
||||
|
||||
@@ -65,7 +65,8 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,
|
||||
|
||||
bool should_use_dmub_lock(struct dc_link *link)
|
||||
{
|
||||
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1)
|
||||
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1 ||
|
||||
link->psr_settings.psr_version == DC_PSR_VERSION_1)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1340,7 +1340,7 @@ static struct link_encoder *dcn21_link_encoder_create(
|
||||
kzalloc(sizeof(struct dcn21_link_encoder), GFP_KERNEL);
|
||||
int link_regs_id;
|
||||
|
||||
if (!enc21)
|
||||
if (!enc21 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
|
||||
return NULL;
|
||||
|
||||
link_regs_id =
|
||||
|
||||
@@ -66,11 +66,15 @@ static inline double dml_max5(double a, double b, double c, double d, double e)
|
||||
|
||||
static inline double dml_ceil(double a, double granularity)
|
||||
{
|
||||
if (granularity == 0)
|
||||
return 0;
|
||||
return (double) dcn_bw_ceil2(a, granularity);
|
||||
}
|
||||
|
||||
static inline double dml_floor(double a, double granularity)
|
||||
{
|
||||
if (granularity == 0)
|
||||
return 0;
|
||||
return (double) dcn_bw_floor2(a, granularity);
|
||||
}
|
||||
|
||||
@@ -114,11 +118,15 @@ static inline double dml_ceil_2(double f)
|
||||
|
||||
static inline double dml_ceil_ex(double x, double granularity)
|
||||
{
|
||||
if (granularity == 0)
|
||||
return 0;
|
||||
return (double) dcn_bw_ceil2(x, granularity);
|
||||
}
|
||||
|
||||
static inline double dml_floor_ex(double x, double granularity)
|
||||
{
|
||||
if (granularity == 0)
|
||||
return 0;
|
||||
return (double) dcn_bw_floor2(x, granularity);
|
||||
}
|
||||
|
||||
|
||||
@@ -1225,8 +1225,8 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
|
||||
|
||||
ret = adv7511_init_regulators(adv7511);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to init regulators\n");
|
||||
return ret;
|
||||
dev_err_probe(dev, ret, "failed to init regulators\n");
|
||||
goto err_of_node_put;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1347,6 +1347,8 @@ err_i2c_unregister_edid:
|
||||
i2c_unregister_device(adv7511->i2c_edid);
|
||||
uninit_regulators:
|
||||
adv7511_uninit_regulators(adv7511);
|
||||
err_of_node_put:
|
||||
of_node_put(adv7511->host_node);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1355,6 +1357,8 @@ static void adv7511_remove(struct i2c_client *i2c)
|
||||
{
|
||||
struct adv7511 *adv7511 = i2c_get_clientdata(i2c);
|
||||
|
||||
of_node_put(adv7511->host_node);
|
||||
|
||||
adv7511_uninit_regulators(adv7511);
|
||||
|
||||
drm_bridge_remove(&adv7511->bridge);
|
||||
|
||||
@@ -146,16 +146,14 @@ int adv7533_attach_dsi(struct adv7511 *adv)
|
||||
};
|
||||
|
||||
host = of_find_mipi_dsi_host_by_node(adv->host_node);
|
||||
if (!host) {
|
||||
dev_err(dev, "failed to find dsi host\n");
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
if (!host)
|
||||
return dev_err_probe(dev, -EPROBE_DEFER,
|
||||
"failed to find dsi host\n");
|
||||
|
||||
dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
|
||||
if (IS_ERR(dsi)) {
|
||||
dev_err(dev, "failed to create dsi device\n");
|
||||
return PTR_ERR(dsi);
|
||||
}
|
||||
if (IS_ERR(dsi))
|
||||
return dev_err_probe(dev, PTR_ERR(dsi),
|
||||
"failed to create dsi device\n");
|
||||
|
||||
adv->dsi = dsi;
|
||||
|
||||
@@ -165,10 +163,8 @@ int adv7533_attach_dsi(struct adv7511 *adv)
|
||||
MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_VIDEO_HSE;
|
||||
|
||||
ret = devm_mipi_dsi_attach(dev, dsi);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to attach dsi to host\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret < 0)
|
||||
return dev_err_probe(dev, ret, "failed to attach dsi to host\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -188,8 +184,6 @@ int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv)
|
||||
if (!adv->host_node)
|
||||
return -ENODEV;
|
||||
|
||||
of_node_put(adv->host_node);
|
||||
|
||||
adv->use_timing_gen = !of_property_read_bool(np,
|
||||
"adi,disable-timing-generator");
|
||||
|
||||
|
||||
@@ -1571,7 +1571,7 @@ int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *
|
||||
* arithmetic related to alignment and offset calculation.
|
||||
*/
|
||||
if (is_gen12_ccs_cc_plane(&fb->base, i)) {
|
||||
if (IS_ALIGNED(fb->base.offsets[i], PAGE_SIZE))
|
||||
if (IS_ALIGNED(fb->base.offsets[i], 64))
|
||||
continue;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
@@ -11,9 +11,6 @@ config DRM_MEDIATEK
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL
|
||||
select MEMORY
|
||||
select MTK_SMI
|
||||
select PHY_MTK_MIPI_DSI
|
||||
select VIDEOMODE_HELPERS
|
||||
help
|
||||
Choose this option if you have a Mediatek SoCs.
|
||||
@@ -24,7 +21,6 @@ config DRM_MEDIATEK
|
||||
config DRM_MEDIATEK_DP
|
||||
tristate "DRM DPTX Support for MediaTek SoCs"
|
||||
depends on DRM_MEDIATEK
|
||||
select PHY_MTK_DP
|
||||
select DRM_DISPLAY_HELPER
|
||||
select DRM_DISPLAY_DP_HELPER
|
||||
select DRM_DP_AUX_BUS
|
||||
@@ -35,6 +31,5 @@ config DRM_MEDIATEK_HDMI
|
||||
tristate "DRM HDMI Support for Mediatek SoCs"
|
||||
depends on DRM_MEDIATEK
|
||||
select SND_SOC_HDMI_CODEC if SND_SOC
|
||||
select PHY_MTK_HDMI
|
||||
help
|
||||
DRM/KMS HDMI driver for Mediatek SoCs
|
||||
|
||||
@@ -457,18 +457,16 @@ static int mtk_dp_set_color_format(struct mtk_dp *mtk_dp,
|
||||
enum dp_pixelformat color_format)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
/* update MISC0 */
|
||||
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3034,
|
||||
color_format << DP_TEST_COLOR_FORMAT_SHIFT,
|
||||
DP_TEST_COLOR_FORMAT_MASK);
|
||||
u32 misc0_color;
|
||||
|
||||
switch (color_format) {
|
||||
case DP_PIXELFORMAT_YUV422:
|
||||
val = PIXEL_ENCODE_FORMAT_DP_ENC0_P0_YCBCR422;
|
||||
misc0_color = DP_COLOR_FORMAT_YCbCr422;
|
||||
break;
|
||||
case DP_PIXELFORMAT_RGB:
|
||||
val = PIXEL_ENCODE_FORMAT_DP_ENC0_P0_RGB;
|
||||
misc0_color = DP_COLOR_FORMAT_RGB;
|
||||
break;
|
||||
default:
|
||||
drm_warn(mtk_dp->drm_dev, "Unsupported color format: %d\n",
|
||||
@@ -476,6 +474,11 @@ static int mtk_dp_set_color_format(struct mtk_dp *mtk_dp,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* update MISC0 */
|
||||
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_3034,
|
||||
misc0_color,
|
||||
DP_TEST_COLOR_FORMAT_MASK);
|
||||
|
||||
mtk_dp_update_bits(mtk_dp, MTK_DP_ENC0_P0_303C,
|
||||
val, PIXEL_ENCODE_FORMAT_DP_ENC0_P0_MASK);
|
||||
return 0;
|
||||
@@ -1949,7 +1952,6 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
|
||||
struct mtk_dp *mtk_dp = mtk_dp_from_bridge(bridge);
|
||||
enum drm_connector_status ret = connector_status_disconnected;
|
||||
bool enabled = mtk_dp->enabled;
|
||||
u8 sink_count = 0;
|
||||
|
||||
if (!mtk_dp->train_info.cable_plugged_in)
|
||||
return ret;
|
||||
@@ -1971,8 +1973,8 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
|
||||
* function, we just need to check the HPD connection to check
|
||||
* whether we connect to a sink device.
|
||||
*/
|
||||
drm_dp_dpcd_readb(&mtk_dp->aux, DP_SINK_COUNT, &sink_count);
|
||||
if (DP_GET_SINK_COUNT(sink_count))
|
||||
|
||||
if (drm_dp_read_sink_count(&mtk_dp->aux) > 0)
|
||||
ret = connector_status_connected;
|
||||
|
||||
if (!enabled) {
|
||||
@@ -2274,12 +2276,19 @@ mtk_dp_bridge_mode_valid(struct drm_bridge *bridge,
|
||||
{
|
||||
struct mtk_dp *mtk_dp = mtk_dp_from_bridge(bridge);
|
||||
u32 bpp = info->color_formats & DRM_COLOR_FORMAT_YCBCR422 ? 16 : 24;
|
||||
u32 rate = min_t(u32, drm_dp_max_link_rate(mtk_dp->rx_cap) *
|
||||
drm_dp_max_lane_count(mtk_dp->rx_cap),
|
||||
drm_dp_bw_code_to_link_rate(mtk_dp->max_linkrate) *
|
||||
mtk_dp->max_lanes);
|
||||
u32 lane_count_min = mtk_dp->train_info.lane_count;
|
||||
u32 rate = drm_dp_bw_code_to_link_rate(mtk_dp->train_info.link_rate) *
|
||||
lane_count_min;
|
||||
|
||||
if (rate < mode->clock * bpp / 8)
|
||||
/*
|
||||
*FEC overhead is approximately 2.4% from DP 1.4a spec 2.2.1.4.2.
|
||||
*The down-spread amplitude shall either be disabled (0.0%) or up
|
||||
*to 0.5% from 1.4a 3.5.2.6. Add up to approximately 3% total overhead.
|
||||
*
|
||||
*Because rate is already divided by 10,
|
||||
*mode->clock does not need to be multiplied by 10
|
||||
*/
|
||||
if ((rate * 97 / 100) < (mode->clock * bpp / 8))
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
@@ -2320,10 +2329,9 @@ static u32 *mtk_dp_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
|
||||
struct drm_display_mode *mode = &crtc_state->adjusted_mode;
|
||||
struct drm_display_info *display_info =
|
||||
&conn_state->connector->display_info;
|
||||
u32 rate = min_t(u32, drm_dp_max_link_rate(mtk_dp->rx_cap) *
|
||||
drm_dp_max_lane_count(mtk_dp->rx_cap),
|
||||
drm_dp_bw_code_to_link_rate(mtk_dp->max_linkrate) *
|
||||
mtk_dp->max_lanes);
|
||||
u32 lane_count_min = mtk_dp->train_info.lane_count;
|
||||
u32 rate = drm_dp_bw_code_to_link_rate(mtk_dp->train_info.link_rate) *
|
||||
lane_count_min;
|
||||
|
||||
*num_input_fmts = 0;
|
||||
|
||||
@@ -2332,8 +2340,8 @@ static u32 *mtk_dp_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
|
||||
* datarate of YUV422 and sink device supports YUV422, we output YUV422
|
||||
* format. Use this condition, we can support more resolution.
|
||||
*/
|
||||
if ((rate < (mode->clock * 24 / 8)) &&
|
||||
(rate > (mode->clock * 16 / 8)) &&
|
||||
if (((rate * 97 / 100) < (mode->clock * 24 / 8)) &&
|
||||
((rate * 97 / 100) > (mode->clock * 16 / 8)) &&
|
||||
(display_info->color_formats & DRM_COLOR_FORMAT_YCBCR422)) {
|
||||
input_fmts = kcalloc(1, sizeof(*input_fmts), GFP_KERNEL);
|
||||
if (!input_fmts)
|
||||
|
||||
@@ -102,7 +102,10 @@ v3d_irq(int irq, void *arg)
|
||||
to_v3d_fence(v3d->bin_job->base.irq_fence);
|
||||
|
||||
trace_v3d_bcl_irq(&v3d->drm, fence->seqno);
|
||||
|
||||
v3d->bin_job = NULL;
|
||||
dma_fence_signal(&fence->base);
|
||||
|
||||
status = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -111,7 +114,10 @@ v3d_irq(int irq, void *arg)
|
||||
to_v3d_fence(v3d->render_job->base.irq_fence);
|
||||
|
||||
trace_v3d_rcl_irq(&v3d->drm, fence->seqno);
|
||||
|
||||
v3d->render_job = NULL;
|
||||
dma_fence_signal(&fence->base);
|
||||
|
||||
status = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -120,7 +126,10 @@ v3d_irq(int irq, void *arg)
|
||||
to_v3d_fence(v3d->csd_job->base.irq_fence);
|
||||
|
||||
trace_v3d_csd_irq(&v3d->drm, fence->seqno);
|
||||
|
||||
v3d->csd_job = NULL;
|
||||
dma_fence_signal(&fence->base);
|
||||
|
||||
status = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
@@ -156,7 +165,10 @@ v3d_hub_irq(int irq, void *arg)
|
||||
to_v3d_fence(v3d->tfu_job->base.irq_fence);
|
||||
|
||||
trace_v3d_tfu_irq(&v3d->drm, fence->seqno);
|
||||
|
||||
v3d->tfu_job = NULL;
|
||||
dma_fence_signal(&fence->base);
|
||||
|
||||
status = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
@@ -507,7 +507,6 @@
|
||||
#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
|
||||
|
||||
#define I2C_VENDOR_ID_GOODIX 0x27c6
|
||||
#define I2C_DEVICE_ID_GOODIX_01E0 0x01e0
|
||||
#define I2C_DEVICE_ID_GOODIX_01E8 0x01e8
|
||||
#define I2C_DEVICE_ID_GOODIX_01E9 0x01e9
|
||||
#define I2C_DEVICE_ID_GOODIX_01F0 0x01f0
|
||||
|
||||
@@ -1447,8 +1447,7 @@ static __u8 *mt_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
{
|
||||
if (hdev->vendor == I2C_VENDOR_ID_GOODIX &&
|
||||
(hdev->product == I2C_DEVICE_ID_GOODIX_01E8 ||
|
||||
hdev->product == I2C_DEVICE_ID_GOODIX_01E9 ||
|
||||
hdev->product == I2C_DEVICE_ID_GOODIX_01E0)) {
|
||||
hdev->product == I2C_DEVICE_ID_GOODIX_01E9)) {
|
||||
if (rdesc[607] == 0x15) {
|
||||
rdesc[607] = 0x25;
|
||||
dev_info(
|
||||
@@ -2073,10 +2072,7 @@ static const struct hid_device_id mt_devices[] = {
|
||||
I2C_DEVICE_ID_GOODIX_01E8) },
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
|
||||
I2C_DEVICE_ID_GOODIX_01E9) },
|
||||
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT_NSMU,
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
|
||||
I2C_DEVICE_ID_GOODIX_01E0) },
|
||||
I2C_DEVICE_ID_GOODIX_01E8) },
|
||||
|
||||
/* GoodTouch panels */
|
||||
{ .driver_data = MT_CLS_NSMU,
|
||||
|
||||
@@ -203,7 +203,8 @@ static int tmp51x_get_value(struct tmp51x_data *data, u8 reg, u8 pos,
|
||||
*val = sign_extend32(regval,
|
||||
reg == TMP51X_SHUNT_CURRENT_RESULT ?
|
||||
16 - tmp51x_get_pga_shift(data) : 15);
|
||||
*val = DIV_ROUND_CLOSEST(*val * 10 * MILLI, data->shunt_uohms);
|
||||
*val = DIV_ROUND_CLOSEST(*val * 10 * (long)MILLI, (long)data->shunt_uohms);
|
||||
|
||||
break;
|
||||
case TMP51X_BUS_VOLTAGE_RESULT:
|
||||
case TMP51X_BUS_VOLTAGE_H_LIMIT:
|
||||
@@ -219,7 +220,7 @@ static int tmp51x_get_value(struct tmp51x_data *data, u8 reg, u8 pos,
|
||||
case TMP51X_BUS_CURRENT_RESULT:
|
||||
// Current = (ShuntVoltage * CalibrationRegister) / 4096
|
||||
*val = sign_extend32(regval, 15) * (long)data->curr_lsb_ua;
|
||||
*val = DIV_ROUND_CLOSEST(*val, MILLI);
|
||||
*val = DIV_ROUND_CLOSEST(*val, (long)MILLI);
|
||||
break;
|
||||
case TMP51X_LOCAL_TEMP_RESULT:
|
||||
case TMP51X_REMOTE_TEMP_RESULT_1:
|
||||
@@ -259,7 +260,7 @@ static int tmp51x_set_value(struct tmp51x_data *data, u8 reg, long val)
|
||||
* The user enter current value and we convert it to
|
||||
* voltage. 1lsb = 10uV
|
||||
*/
|
||||
val = DIV_ROUND_CLOSEST(val * data->shunt_uohms, 10 * MILLI);
|
||||
val = DIV_ROUND_CLOSEST(val * (long)data->shunt_uohms, 10 * (long)MILLI);
|
||||
max_val = U16_MAX >> tmp51x_get_pga_shift(data);
|
||||
regval = clamp_val(val, -max_val, max_val);
|
||||
break;
|
||||
|
||||
@@ -110,6 +110,8 @@
|
||||
#define ID_P_PM_BLOCKED BIT(31)
|
||||
#define ID_P_MASK GENMASK(31, 28)
|
||||
|
||||
#define ID_SLAVE_NACK BIT(0)
|
||||
|
||||
enum rcar_i2c_type {
|
||||
I2C_RCAR_GEN1,
|
||||
I2C_RCAR_GEN2,
|
||||
@@ -143,6 +145,7 @@ struct rcar_i2c_priv {
|
||||
int irq;
|
||||
|
||||
struct i2c_client *host_notify_client;
|
||||
u8 slave_flags;
|
||||
};
|
||||
|
||||
#define rcar_i2c_priv_to_dev(p) ((p)->adap.dev.parent)
|
||||
@@ -597,6 +600,7 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
u32 ssr_raw, ssr_filtered;
|
||||
u8 value;
|
||||
int ret;
|
||||
|
||||
ssr_raw = rcar_i2c_read(priv, ICSSR) & 0xff;
|
||||
ssr_filtered = ssr_raw & rcar_i2c_read(priv, ICSIER);
|
||||
@@ -612,7 +616,10 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)
|
||||
rcar_i2c_write(priv, ICRXTX, value);
|
||||
rcar_i2c_write(priv, ICSIER, SDE | SSR | SAR);
|
||||
} else {
|
||||
i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
|
||||
ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_REQUESTED, &value);
|
||||
if (ret)
|
||||
priv->slave_flags |= ID_SLAVE_NACK;
|
||||
|
||||
rcar_i2c_read(priv, ICRXTX); /* dummy read */
|
||||
rcar_i2c_write(priv, ICSIER, SDR | SSR | SAR);
|
||||
}
|
||||
@@ -625,18 +632,21 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)
|
||||
if (ssr_filtered & SSR) {
|
||||
i2c_slave_event(priv->slave, I2C_SLAVE_STOP, &value);
|
||||
rcar_i2c_write(priv, ICSCR, SIE | SDBS); /* clear our NACK */
|
||||
priv->slave_flags &= ~ID_SLAVE_NACK;
|
||||
rcar_i2c_write(priv, ICSIER, SAR);
|
||||
rcar_i2c_write(priv, ICSSR, ~SSR & 0xff);
|
||||
}
|
||||
|
||||
/* master wants to write to us */
|
||||
if (ssr_filtered & SDR) {
|
||||
int ret;
|
||||
|
||||
value = rcar_i2c_read(priv, ICRXTX);
|
||||
ret = i2c_slave_event(priv->slave, I2C_SLAVE_WRITE_RECEIVED, &value);
|
||||
/* Send NACK in case of error */
|
||||
rcar_i2c_write(priv, ICSCR, SIE | SDBS | (ret < 0 ? FNA : 0));
|
||||
if (ret)
|
||||
priv->slave_flags |= ID_SLAVE_NACK;
|
||||
|
||||
/* Send NACK in case of error, but it will come 1 byte late :( */
|
||||
rcar_i2c_write(priv, ICSCR, SIE | SDBS |
|
||||
(priv->slave_flags & ID_SLAVE_NACK ? FNA : 0));
|
||||
rcar_i2c_write(priv, ICSSR, ~SDR & 0xff);
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
|
||||
pm_runtime_no_callbacks(&pdev->dev);
|
||||
|
||||
/* switch to first parent as active master */
|
||||
i2c_demux_activate_master(priv, 0);
|
||||
err = i2c_demux_activate_master(priv, 0);
|
||||
if (err)
|
||||
goto err_rollback;
|
||||
|
||||
err = device_create_file(&pdev->dev, &dev_attr_available_masters);
|
||||
if (err)
|
||||
|
||||
@@ -931,6 +931,9 @@ static int ad7124_setup(struct ad7124_state *st)
|
||||
* set all channels to this default value.
|
||||
*/
|
||||
ad7124_set_channel_odr(st, i, 10);
|
||||
|
||||
/* Disable all channels to prevent unintended conversions. */
|
||||
ad_sd_write_reg(&st->sd, AD7124_CHANNEL(i), 2, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -985,7 +985,7 @@ static int at91_ts_register(struct iio_dev *idev,
|
||||
return ret;
|
||||
|
||||
err:
|
||||
input_free_device(st->ts_input);
|
||||
input_free_device(input);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,6 +270,8 @@ static irqreturn_t rockchip_saradc_trigger_handler(int irq, void *p)
|
||||
int ret;
|
||||
int i, j = 0;
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
mutex_lock(&i_dev->mlock);
|
||||
|
||||
for_each_set_bit(i, i_dev->active_scan_mask, i_dev->masklength) {
|
||||
|
||||
@@ -183,9 +183,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)
|
||||
struct ads124s_private *priv = iio_priv(indio_dev);
|
||||
|
||||
if (priv->reset_gpio) {
|
||||
gpiod_set_value(priv->reset_gpio, 0);
|
||||
gpiod_set_value_cansleep(priv->reset_gpio, 0);
|
||||
udelay(200);
|
||||
gpiod_set_value(priv->reset_gpio, 1);
|
||||
gpiod_set_value_cansleep(priv->reset_gpio, 1);
|
||||
} else {
|
||||
return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p)
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
/* Ensure naturally aligned timestamp */
|
||||
u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)] __aligned(8);
|
||||
u16 buffer[ADS8688_MAX_CHANNELS + sizeof(s64)/sizeof(u16)] __aligned(8) = { };
|
||||
int i, j = 0;
|
||||
|
||||
for (i = 0; i < indio_dev->masklength; i++) {
|
||||
|
||||
@@ -48,7 +48,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)
|
||||
int i = 0, j;
|
||||
u16 *data;
|
||||
|
||||
data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
|
||||
data = kzalloc(indio_dev->scan_bytes, GFP_KERNEL);
|
||||
if (!data)
|
||||
goto done;
|
||||
|
||||
|
||||
@@ -730,14 +730,21 @@ static irqreturn_t fxas21002c_trigger_handler(int irq, void *p)
|
||||
int ret;
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
ret = regmap_bulk_read(data->regmap, FXAS21002C_REG_OUT_X_MSB,
|
||||
data->buffer, CHANNEL_SCAN_MAX * sizeof(s16));
|
||||
ret = fxas21002c_pm_get(data);
|
||||
if (ret < 0)
|
||||
goto out_unlock;
|
||||
|
||||
ret = regmap_bulk_read(data->regmap, FXAS21002C_REG_OUT_X_MSB,
|
||||
data->buffer, CHANNEL_SCAN_MAX * sizeof(s16));
|
||||
if (ret < 0)
|
||||
goto out_pm_put;
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
data->timestamp);
|
||||
|
||||
out_pm_put:
|
||||
fxas21002c_pm_put(data);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
|
||||
@@ -360,6 +360,7 @@ struct inv_icm42600_state {
|
||||
typedef int (*inv_icm42600_bus_setup)(struct inv_icm42600_state *);
|
||||
|
||||
extern const struct regmap_config inv_icm42600_regmap_config;
|
||||
extern const struct regmap_config inv_icm42600_spi_regmap_config;
|
||||
extern const struct dev_pm_ops inv_icm42600_pm_ops;
|
||||
|
||||
const struct iio_mount_matrix *
|
||||
|
||||
@@ -43,6 +43,17 @@ const struct regmap_config inv_icm42600_regmap_config = {
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(inv_icm42600_regmap_config);
|
||||
|
||||
/* define specific regmap for SPI not supporting burst write */
|
||||
const struct regmap_config inv_icm42600_spi_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
.max_register = 0x4FFF,
|
||||
.ranges = inv_icm42600_regmap_ranges,
|
||||
.num_ranges = ARRAY_SIZE(inv_icm42600_regmap_ranges),
|
||||
.use_single_write = true,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(inv_icm42600_spi_regmap_config);
|
||||
|
||||
struct inv_icm42600_hw {
|
||||
uint8_t whoami;
|
||||
const char *name;
|
||||
@@ -709,6 +720,8 @@ out_unlock:
|
||||
static int __maybe_unused inv_icm42600_resume(struct device *dev)
|
||||
{
|
||||
struct inv_icm42600_state *st = dev_get_drvdata(dev);
|
||||
struct inv_icm42600_timestamp *gyro_ts = iio_priv(st->indio_gyro);
|
||||
struct inv_icm42600_timestamp *accel_ts = iio_priv(st->indio_accel);
|
||||
int ret;
|
||||
|
||||
mutex_lock(&st->lock);
|
||||
@@ -729,9 +742,12 @@ static int __maybe_unused inv_icm42600_resume(struct device *dev)
|
||||
goto out_unlock;
|
||||
|
||||
/* restore FIFO data streaming */
|
||||
if (st->fifo.on)
|
||||
if (st->fifo.on) {
|
||||
inv_icm42600_timestamp_reset(gyro_ts);
|
||||
inv_icm42600_timestamp_reset(accel_ts);
|
||||
ret = regmap_write(st->map, INV_ICM42600_REG_FIFO_CONFIG,
|
||||
INV_ICM42600_FIFO_CONFIG_STREAM);
|
||||
}
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&st->lock);
|
||||
|
||||
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)
|
||||
return -EINVAL;
|
||||
chip = (uintptr_t)match;
|
||||
|
||||
regmap = devm_regmap_init_spi(spi, &inv_icm42600_regmap_config);
|
||||
/* use SPI specific regmap */
|
||||
regmap = devm_regmap_init_spi(spi, &inv_icm42600_spi_regmap_config);
|
||||
if (IS_ERR(regmap))
|
||||
return PTR_ERR(regmap);
|
||||
|
||||
|
||||
@@ -1192,7 +1192,7 @@ static irqreturn_t kmx61_trigger_handler(int irq, void *p)
|
||||
struct kmx61_data *data = kmx61_get_data(indio_dev);
|
||||
int bit, ret, i = 0;
|
||||
u8 base;
|
||||
s16 buffer[8];
|
||||
s16 buffer[8] = { };
|
||||
|
||||
if (indio_dev == data->acc_indio_dev)
|
||||
base = KMX61_ACC_XOUT_L;
|
||||
|
||||
@@ -513,7 +513,7 @@ struct iio_channel *iio_channel_get_all(struct device *dev)
|
||||
return chans;
|
||||
|
||||
error_free_chans:
|
||||
for (i = 0; i < nummaps; i++)
|
||||
for (i = 0; i < mapind; i++)
|
||||
iio_device_put(chans[i].indio_dev);
|
||||
kfree(chans);
|
||||
error_ret:
|
||||
|
||||
@@ -105,7 +105,7 @@ static irqreturn_t vcnl4035_trigger_consumer_handler(int irq, void *p)
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct vcnl4035_data *data = iio_priv(indio_dev);
|
||||
/* Ensure naturally aligned timestamp */
|
||||
u8 buffer[ALIGN(sizeof(u16), sizeof(s64)) + sizeof(s64)] __aligned(8);
|
||||
u8 buffer[ALIGN(sizeof(u16), sizeof(s64)) + sizeof(s64)] __aligned(8) = { };
|
||||
int ret;
|
||||
|
||||
ret = regmap_read(data->regmap, VCNL4035_ALS_DATA, (int *)buffer);
|
||||
|
||||
@@ -586,6 +586,8 @@ static int zpa2326_fill_sample_buffer(struct iio_dev *indio_dev,
|
||||
} sample;
|
||||
int err;
|
||||
|
||||
memset(&sample, 0, sizeof(sample));
|
||||
|
||||
if (test_bit(0, indio_dev->active_scan_mask)) {
|
||||
/* Get current pressure from hardware FIFO. */
|
||||
err = zpa2326_dequeue_pressure(indio_dev, &sample.pressure);
|
||||
|
||||
@@ -643,13 +643,15 @@ int rxe_requester(void *arg)
|
||||
|
||||
if (unlikely(qp->req.state == QP_STATE_ERROR)) {
|
||||
wqe = req_next_wqe(qp);
|
||||
if (wqe)
|
||||
if (wqe) {
|
||||
/*
|
||||
* Generate an error completion for error qp state
|
||||
*/
|
||||
wqe->status = IB_WC_WR_FLUSH_ERR;
|
||||
goto err;
|
||||
else
|
||||
} else {
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (unlikely(qp->req.state == QP_STATE_RESET)) {
|
||||
|
||||
@@ -145,6 +145,7 @@ static const struct xpad_device {
|
||||
{ 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 },
|
||||
{ 0x045e, 0x028f, "Microsoft X-Box 360 pad v2", 0, XTYPE_XBOX360 },
|
||||
{ 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
|
||||
{ 0x045e, 0x02a9, "Xbox 360 Wireless Receiver (Unofficial)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },
|
||||
{ 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE },
|
||||
{ 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE },
|
||||
{ 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", MAP_PADDLES, XTYPE_XBOXONE },
|
||||
@@ -366,6 +367,7 @@ static const struct xpad_device {
|
||||
{ 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1230, "Wooting Two HE (ARM)", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 },
|
||||
{ 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
|
||||
|
||||
@@ -89,7 +89,7 @@ static const unsigned short atkbd_set2_keycode[ATKBD_KEYMAP_SIZE] = {
|
||||
0, 46, 45, 32, 18, 5, 4, 95, 0, 57, 47, 33, 20, 19, 6,183,
|
||||
0, 49, 48, 35, 34, 21, 7,184, 0, 0, 50, 36, 22, 8, 9,185,
|
||||
0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0,
|
||||
0, 89, 40, 0, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0, 85,
|
||||
0, 89, 40, 0, 26, 13, 0,193, 58, 54, 28, 27, 0, 43, 0, 85,
|
||||
0, 86, 91, 90, 92, 0, 14, 94, 0, 79,124, 75, 71,121, 0, 0,
|
||||
82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
|
||||
|
||||
|
||||
@@ -1967,7 +1967,7 @@ static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
|
||||
if (!is_v4(its_dev->its))
|
||||
return -EINVAL;
|
||||
|
||||
guard(raw_spinlock_irq)(&its_dev->event_map.vlpi_lock);
|
||||
guard(raw_spinlock)(&its_dev->event_map.vlpi_lock);
|
||||
|
||||
/* Unmap request? */
|
||||
if (!info)
|
||||
|
||||
@@ -1428,7 +1428,7 @@ static int gic_retrigger(struct irq_data *data)
|
||||
static int gic_cpu_pm_notifier(struct notifier_block *self,
|
||||
unsigned long cmd, void *v)
|
||||
{
|
||||
if (cmd == CPU_PM_EXIT) {
|
||||
if (cmd == CPU_PM_EXIT || cmd == CPU_PM_ENTER_FAILED) {
|
||||
if (gic_dist_security_disabled())
|
||||
gic_enable_redist(true);
|
||||
gic_cpu_sys_reg_init();
|
||||
|
||||
@@ -187,7 +187,8 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node,
|
||||
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
|
||||
gc->chip_types[0].chip.irq_eoi = irq_gc_ack_set_bit;
|
||||
gc->chip_types[0].chip.irq_set_type = sunxi_sc_nmi_set_type;
|
||||
gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED;
|
||||
gc->chip_types[0].chip.flags = IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED |
|
||||
IRQCHIP_SKIP_SET_WAKE;
|
||||
gc->chip_types[0].regs.ack = reg_offs->pend;
|
||||
gc->chip_types[0].regs.mask = reg_offs->enable;
|
||||
gc->chip_types[0].regs.type = reg_offs->ctrl;
|
||||
|
||||
@@ -35,11 +35,10 @@ void __init irqchip_init(void)
|
||||
int platform_irqchip_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *par_np = of_irq_find_parent(np);
|
||||
struct device_node *par_np __free(device_node) = of_irq_find_parent(np);
|
||||
of_irq_init_cb_t irq_init_cb = of_device_get_match_data(&pdev->dev);
|
||||
|
||||
if (!irq_init_cb) {
|
||||
of_node_put(par_np);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -55,7 +54,6 @@ int platform_irqchip_probe(struct platform_device *pdev)
|
||||
* interrupt controller can check for specific domains as necessary.
|
||||
*/
|
||||
if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) {
|
||||
of_node_put(par_np);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ static int ebs_iterate_devices(struct dm_target *ti,
|
||||
static struct target_type ebs_target = {
|
||||
.name = "ebs",
|
||||
.version = {1, 0, 1},
|
||||
.features = DM_TARGET_PASSES_INTEGRITY,
|
||||
.features = 0,
|
||||
.module = THIS_MODULE,
|
||||
.ctr = ebs_ctr,
|
||||
.dtr = ebs_dtr,
|
||||
|
||||
@@ -2306,10 +2306,9 @@ static struct thin_c *get_first_thin(struct pool *pool)
|
||||
struct thin_c *tc = NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
if (!list_empty(&pool->active_thins)) {
|
||||
tc = list_entry_rcu(pool->active_thins.next, struct thin_c, list);
|
||||
tc = list_first_or_null_rcu(&pool->active_thins, struct thin_c, list);
|
||||
if (tc)
|
||||
thin_get(tc);
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
return tc;
|
||||
|
||||
@@ -60,14 +60,19 @@ static int fec_decode_rs8(struct dm_verity *v, struct dm_verity_fec_io *fio,
|
||||
* to the data block. Caller is responsible for releasing buf.
|
||||
*/
|
||||
static u8 *fec_read_parity(struct dm_verity *v, u64 rsb, int index,
|
||||
unsigned int *offset, struct dm_buffer **buf)
|
||||
unsigned int *offset, unsigned int par_buf_offset,
|
||||
struct dm_buffer **buf)
|
||||
{
|
||||
u64 position, block, rem;
|
||||
u8 *res;
|
||||
|
||||
/* We have already part of parity bytes read, skip to the next block */
|
||||
if (par_buf_offset)
|
||||
index++;
|
||||
|
||||
position = (index + rsb) * v->fec->roots;
|
||||
block = div64_u64_rem(position, v->fec->io_size, &rem);
|
||||
*offset = (unsigned int)rem;
|
||||
*offset = par_buf_offset ? 0 : (unsigned int)rem;
|
||||
|
||||
res = dm_bufio_read(v->fec->bufio, block, buf);
|
||||
if (IS_ERR(res)) {
|
||||
@@ -127,10 +132,11 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,
|
||||
{
|
||||
int r, corrected = 0, res;
|
||||
struct dm_buffer *buf;
|
||||
unsigned int n, i, offset;
|
||||
u8 *par, *block;
|
||||
unsigned int n, i, offset, par_buf_offset = 0;
|
||||
u8 *par, *block, par_buf[DM_VERITY_FEC_RSM - DM_VERITY_FEC_MIN_RSN];
|
||||
|
||||
par = fec_read_parity(v, rsb, block_offset, &offset, &buf);
|
||||
par = fec_read_parity(v, rsb, block_offset, &offset,
|
||||
par_buf_offset, &buf);
|
||||
if (IS_ERR(par))
|
||||
return PTR_ERR(par);
|
||||
|
||||
@@ -140,7 +146,8 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,
|
||||
*/
|
||||
fec_for_each_buffer_rs_block(fio, n, i) {
|
||||
block = fec_buffer_rs_block(v, fio, n, i);
|
||||
res = fec_decode_rs8(v, fio, block, &par[offset], neras);
|
||||
memcpy(&par_buf[par_buf_offset], &par[offset], v->fec->roots - par_buf_offset);
|
||||
res = fec_decode_rs8(v, fio, block, par_buf, neras);
|
||||
if (res < 0) {
|
||||
r = res;
|
||||
goto error;
|
||||
@@ -153,12 +160,21 @@ static int fec_decode_bufs(struct dm_verity *v, struct dm_verity_fec_io *fio,
|
||||
if (block_offset >= 1 << v->data_dev_block_bits)
|
||||
goto done;
|
||||
|
||||
/* read the next block when we run out of parity bytes */
|
||||
offset += v->fec->roots;
|
||||
/* Read the next block when we run out of parity bytes */
|
||||
offset += (v->fec->roots - par_buf_offset);
|
||||
/* Check if parity bytes are split between blocks */
|
||||
if (offset < v->fec->io_size && (offset + v->fec->roots) > v->fec->io_size) {
|
||||
par_buf_offset = v->fec->io_size - offset;
|
||||
memcpy(par_buf, &par[offset], par_buf_offset);
|
||||
offset += par_buf_offset;
|
||||
} else
|
||||
par_buf_offset = 0;
|
||||
|
||||
if (offset >= v->fec->io_size) {
|
||||
dm_bufio_release(buf);
|
||||
|
||||
par = fec_read_parity(v, rsb, block_offset, &offset, &buf);
|
||||
par = fec_read_parity(v, rsb, block_offset, &offset,
|
||||
par_buf_offset, &buf);
|
||||
if (IS_ERR(par))
|
||||
return PTR_ERR(par);
|
||||
}
|
||||
@@ -743,10 +759,7 @@ int verity_fec_ctr(struct dm_verity *v)
|
||||
return -E2BIG;
|
||||
}
|
||||
|
||||
if ((f->roots << SECTOR_SHIFT) & ((1 << v->data_dev_block_bits) - 1))
|
||||
f->io_size = 1 << v->data_dev_block_bits;
|
||||
else
|
||||
f->io_size = v->fec->roots << SECTOR_SHIFT;
|
||||
f->io_size = 1 << v->data_dev_block_bits;
|
||||
|
||||
f->bufio = dm_bufio_client_create(f->dev->bdev,
|
||||
f->io_size,
|
||||
|
||||
@@ -912,23 +912,27 @@ static int load_ablock(struct dm_array_cursor *c)
|
||||
if (c->block)
|
||||
unlock_ablock(c->info, c->block);
|
||||
|
||||
c->block = NULL;
|
||||
c->ab = NULL;
|
||||
c->index = 0;
|
||||
|
||||
r = dm_btree_cursor_get_value(&c->cursor, &key, &value_le);
|
||||
if (r) {
|
||||
DMERR("dm_btree_cursor_get_value failed");
|
||||
dm_btree_cursor_end(&c->cursor);
|
||||
goto out;
|
||||
|
||||
} else {
|
||||
r = get_ablock(c->info, le64_to_cpu(value_le), &c->block, &c->ab);
|
||||
if (r) {
|
||||
DMERR("get_ablock failed");
|
||||
dm_btree_cursor_end(&c->cursor);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
dm_btree_cursor_end(&c->cursor);
|
||||
c->block = NULL;
|
||||
c->ab = NULL;
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -951,10 +955,10 @@ EXPORT_SYMBOL_GPL(dm_array_cursor_begin);
|
||||
|
||||
void dm_array_cursor_end(struct dm_array_cursor *c)
|
||||
{
|
||||
if (c->block) {
|
||||
if (c->block)
|
||||
unlock_ablock(c->info, c->block);
|
||||
dm_btree_cursor_end(&c->cursor);
|
||||
}
|
||||
|
||||
dm_btree_cursor_end(&c->cursor);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dm_array_cursor_end);
|
||||
|
||||
@@ -994,6 +998,7 @@ int dm_array_cursor_skip(struct dm_array_cursor *c, uint32_t count)
|
||||
}
|
||||
|
||||
count -= remaining;
|
||||
c->index += (remaining - 1);
|
||||
r = dm_array_cursor_next(c);
|
||||
|
||||
} while (!r);
|
||||
|
||||
@@ -148,7 +148,7 @@ static int pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset,
|
||||
pci1xxx_assign_bit(priv->reg_base, OPENDRAIN_OFFSET(offset), (offset % 32), true);
|
||||
break;
|
||||
default:
|
||||
ret = -EOPNOTSUPP;
|
||||
ret = -ENOTSUPP;
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
@@ -273,7 +273,7 @@ static irqreturn_t pci1xxxx_gpio_irq_handler(int irq, void *dev_id)
|
||||
writel(BIT(bit), priv->reg_base + INTR_STATUS_OFFSET(gpiobank));
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
irq = irq_find_mapping(gc->irq.domain, (bit + (gpiobank * 32)));
|
||||
generic_handle_irq(irq);
|
||||
handle_nested_irq(irq);
|
||||
}
|
||||
}
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
@@ -90,7 +90,7 @@ void spi_nor_spimem_setup_op(const struct spi_nor *nor,
|
||||
op->addr.buswidth = spi_nor_get_protocol_addr_nbits(proto);
|
||||
|
||||
if (op->dummy.nbytes)
|
||||
op->dummy.buswidth = spi_nor_get_protocol_data_nbits(proto);
|
||||
op->dummy.buswidth = spi_nor_get_protocol_addr_nbits(proto);
|
||||
|
||||
if (op->data.nbytes)
|
||||
op->data.buswidth = spi_nor_get_protocol_data_nbits(proto);
|
||||
|
||||
@@ -856,7 +856,6 @@ static void xgbe_phy_free_phy_device(struct xgbe_prv_data *pdata)
|
||||
|
||||
static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, };
|
||||
struct xgbe_phy_data *phy_data = pdata->phy_data;
|
||||
unsigned int phy_id = phy_data->phydev->phy_id;
|
||||
|
||||
@@ -878,14 +877,7 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)
|
||||
phy_write(phy_data->phydev, 0x04, 0x0d01);
|
||||
phy_write(phy_data->phydev, 0x00, 0x9140);
|
||||
|
||||
linkmode_set_bit_array(phy_10_100_features_array,
|
||||
ARRAY_SIZE(phy_10_100_features_array),
|
||||
supported);
|
||||
linkmode_set_bit_array(phy_gbit_features_array,
|
||||
ARRAY_SIZE(phy_gbit_features_array),
|
||||
supported);
|
||||
|
||||
linkmode_copy(phy_data->phydev->supported, supported);
|
||||
linkmode_copy(phy_data->phydev->supported, PHY_GBIT_FEATURES);
|
||||
|
||||
phy_support_asym_pause(phy_data->phydev);
|
||||
|
||||
@@ -897,7 +889,6 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)
|
||||
|
||||
static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata)
|
||||
{
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, };
|
||||
struct xgbe_phy_data *phy_data = pdata->phy_data;
|
||||
struct xgbe_sfp_eeprom *sfp_eeprom = &phy_data->sfp_eeprom;
|
||||
unsigned int phy_id = phy_data->phydev->phy_id;
|
||||
@@ -961,13 +952,7 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata)
|
||||
reg = phy_read(phy_data->phydev, 0x00);
|
||||
phy_write(phy_data->phydev, 0x00, reg & ~0x00800);
|
||||
|
||||
linkmode_set_bit_array(phy_10_100_features_array,
|
||||
ARRAY_SIZE(phy_10_100_features_array),
|
||||
supported);
|
||||
linkmode_set_bit_array(phy_gbit_features_array,
|
||||
ARRAY_SIZE(phy_gbit_features_array),
|
||||
supported);
|
||||
linkmode_copy(phy_data->phydev->supported, supported);
|
||||
linkmode_copy(phy_data->phydev->supported, PHY_GBIT_FEATURES);
|
||||
phy_support_asym_pause(phy_data->phydev);
|
||||
|
||||
netif_dbg(pdata, drv, pdata->netdev,
|
||||
|
||||
@@ -252,7 +252,7 @@ static int bnxt_send_msg(struct bnxt_en_dev *edev, unsigned int ulp_id,
|
||||
|
||||
rc = hwrm_req_replace(bp, req, fw_msg->msg, fw_msg->msg_len);
|
||||
if (rc)
|
||||
return rc;
|
||||
goto drop_req;
|
||||
|
||||
hwrm_req_timeout(bp, req, fw_msg->timeout);
|
||||
resp = hwrm_req_hold(bp, req);
|
||||
@@ -264,6 +264,7 @@ static int bnxt_send_msg(struct bnxt_en_dev *edev, unsigned int ulp_id,
|
||||
|
||||
memcpy(fw_msg->resp, resp, resp_len);
|
||||
}
|
||||
drop_req:
|
||||
hwrm_req_drop(bp, req);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1800,7 +1800,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid,
|
||||
struct adapter *adap = container_of(t, struct adapter, tids);
|
||||
struct sk_buff *skb;
|
||||
|
||||
WARN_ON(tid_out_of_range(&adap->tids, tid));
|
||||
if (tid_out_of_range(&adap->tids, tid)) {
|
||||
dev_err(adap->pdev_dev, "tid %d out of range\n", tid);
|
||||
return;
|
||||
}
|
||||
|
||||
if (t->tid_tab[tid - adap->tids.tid_base]) {
|
||||
t->tid_tab[tid - adap->tids.tid_base] = NULL;
|
||||
|
||||
@@ -359,9 +359,9 @@ const struct ice_vernier_info_e822 e822_vernier[NUM_ICE_PTP_LNK_SPD] = {
|
||||
/* rx_desk_rsgb_par */
|
||||
644531250, /* 644.53125 MHz Reed Solomon gearbox */
|
||||
/* tx_desk_rsgb_pcs */
|
||||
644531250, /* 644.53125 MHz Reed Solomon gearbox */
|
||||
390625000, /* 390.625 MHz Reed Solomon gearbox */
|
||||
/* rx_desk_rsgb_pcs */
|
||||
644531250, /* 644.53125 MHz Reed Solomon gearbox */
|
||||
390625000, /* 390.625 MHz Reed Solomon gearbox */
|
||||
/* tx_fixed_delay */
|
||||
1620,
|
||||
/* pmd_adj_divisor */
|
||||
|
||||
@@ -1003,6 +1003,7 @@ static void cmd_work_handler(struct work_struct *work)
|
||||
complete(&ent->done);
|
||||
}
|
||||
up(&cmd->vars.sem);
|
||||
complete(&ent->slotted);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -2421,6 +2421,7 @@ struct mlx5_flow_namespace *mlx5_get_flow_namespace(struct mlx5_core_dev *dev,
|
||||
break;
|
||||
case MLX5_FLOW_NAMESPACE_RDMA_TX:
|
||||
root_ns = steering->rdma_tx_root_ns;
|
||||
prio = RDMA_TX_BYPASS_PRIO;
|
||||
break;
|
||||
case MLX5_FLOW_NAMESPACE_RDMA_RX_COUNTERS:
|
||||
root_ns = steering->rdma_rx_root_ns;
|
||||
|
||||
@@ -540,7 +540,7 @@ int mlx5_lag_port_sel_create(struct mlx5_lag *ldev,
|
||||
set_tt_map(port_sel, hash_type);
|
||||
err = mlx5_lag_create_definers(ldev, hash_type, ports);
|
||||
if (err)
|
||||
return err;
|
||||
goto clear_port_sel;
|
||||
|
||||
if (port_sel->tunnel) {
|
||||
err = mlx5_lag_create_inner_ttc_table(ldev);
|
||||
@@ -559,6 +559,8 @@ destroy_inner:
|
||||
mlx5_destroy_ttc_table(port_sel->inner.ttc);
|
||||
destroy_definers:
|
||||
mlx5_lag_destroy_definers(ldev);
|
||||
clear_port_sel:
|
||||
memset(port_sel, 0, sizeof(*port_sel));
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
@@ -458,7 +458,8 @@ int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data,
|
||||
map_id_full = be64_to_cpu(cbe->map_ptr);
|
||||
map_id = map_id_full;
|
||||
|
||||
if (len < sizeof(struct cmsg_bpf_event) + pkt_size + data_size)
|
||||
if (size_add(pkt_size, data_size) > INT_MAX ||
|
||||
len < sizeof(struct cmsg_bpf_event) + pkt_size + data_size)
|
||||
return -EINVAL;
|
||||
if (cbe->hdr.ver != NFP_CCM_ABI_VERSION)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -106,15 +106,15 @@ struct cpsw_ale_dev_id {
|
||||
|
||||
static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits)
|
||||
{
|
||||
int idx, idx2;
|
||||
int idx, idx2, index;
|
||||
u32 hi_val = 0;
|
||||
|
||||
idx = start / 32;
|
||||
idx2 = (start + bits - 1) / 32;
|
||||
/* Check if bits to be fetched exceed a word */
|
||||
if (idx != idx2) {
|
||||
idx2 = 2 - idx2; /* flip */
|
||||
hi_val = ale_entry[idx2] << ((idx2 * 32) - start);
|
||||
index = 2 - idx2; /* flip */
|
||||
hi_val = ale_entry[index] << ((idx2 * 32) - start);
|
||||
}
|
||||
start -= idx * 32;
|
||||
idx = 2 - idx; /* flip */
|
||||
@@ -124,16 +124,16 @@ static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits)
|
||||
static inline void cpsw_ale_set_field(u32 *ale_entry, u32 start, u32 bits,
|
||||
u32 value)
|
||||
{
|
||||
int idx, idx2;
|
||||
int idx, idx2, index;
|
||||
|
||||
value &= BITMASK(bits);
|
||||
idx = start / 32;
|
||||
idx2 = (start + bits - 1) / 32;
|
||||
/* Check if bits to be set exceed a word */
|
||||
if (idx != idx2) {
|
||||
idx2 = 2 - idx2; /* flip */
|
||||
ale_entry[idx2] &= ~(BITMASK(bits + start - (idx2 * 32)));
|
||||
ale_entry[idx2] |= (value >> ((idx2 * 32) - start));
|
||||
index = 2 - idx2; /* flip */
|
||||
ale_entry[index] &= ~(BITMASK(bits + start - (idx2 * 32)));
|
||||
ale_entry[index] |= (value >> ((idx2 * 32) - start));
|
||||
}
|
||||
start -= idx * 32;
|
||||
idx = 2 - idx; /* flip */
|
||||
|
||||
@@ -1570,6 +1570,12 @@ axienet_ethtools_set_coalesce(struct net_device *ndev,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (ecoalesce->rx_max_coalesced_frames > 255 ||
|
||||
ecoalesce->tx_max_coalesced_frames > 255) {
|
||||
NL_SET_ERR_MSG(extack, "frames must be less than 256");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ecoalesce->rx_max_coalesced_frames)
|
||||
lp->coalesce_count_rx = ecoalesce->rx_max_coalesced_frames;
|
||||
if (ecoalesce->rx_coalesce_usecs)
|
||||
|
||||
@@ -3078,7 +3078,11 @@ static int ca8210_probe(struct spi_device *spi_device)
|
||||
spi_set_drvdata(priv->spi, priv);
|
||||
if (IS_ENABLED(CONFIG_IEEE802154_CA8210_DEBUGFS)) {
|
||||
cascoda_api_upstream = ca8210_test_int_driver_write;
|
||||
ca8210_test_interface_init(priv);
|
||||
ret = ca8210_test_interface_init(priv);
|
||||
if (ret) {
|
||||
dev_crit(&spi_device->dev, "ca8210_test_interface_init failed\n");
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
cascoda_api_upstream = NULL;
|
||||
}
|
||||
|
||||
@@ -2647,9 +2647,9 @@ static void ath10k_sdio_remove(struct sdio_func *func)
|
||||
|
||||
netif_napi_del(&ar->napi);
|
||||
|
||||
ath10k_core_destroy(ar);
|
||||
|
||||
destroy_workqueue(ar_sdio->workqueue);
|
||||
|
||||
ath10k_core_destroy(ar);
|
||||
}
|
||||
|
||||
static const struct sdio_device_id ath10k_sdio_devices[] = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright (C) 2019 - 2020, 2022 Intel Corporation
|
||||
* Copyright (C) 2019 - 2020, 2022 - 2023 Intel Corporation
|
||||
*****************************************************************************/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/skbuff.h>
|
||||
@@ -125,7 +125,7 @@ static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
|
||||
return idx;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return IWL_RATE_INVALID;
|
||||
}
|
||||
|
||||
static void rs_rate_scale_perform(struct iwl_priv *priv,
|
||||
@@ -3146,7 +3146,10 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,
|
||||
for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) {
|
||||
index = iwl_hwrate_to_plcp_idx(
|
||||
le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags));
|
||||
if (is_legacy(tbl->lq_type)) {
|
||||
if (index == IWL_RATE_INVALID) {
|
||||
desc += sprintf(buff + desc, " rate[%d] 0x%X invalid rate\n",
|
||||
i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags));
|
||||
} else if (is_legacy(tbl->lq_type)) {
|
||||
desc += sprintf(buff+desc, " rate[%d] 0x%X %smbps\n",
|
||||
i, le32_to_cpu(lq_sta->lq.rs_table[i].rate_n_flags),
|
||||
iwl_rate_mcs[index].mbps);
|
||||
|
||||
@@ -1072,10 +1072,13 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta,
|
||||
|
||||
rate->bw = RATE_MCS_CHAN_WIDTH_20;
|
||||
|
||||
WARN_ON_ONCE(rate->index < IWL_RATE_MCS_0_INDEX ||
|
||||
rate->index > IWL_RATE_MCS_9_INDEX);
|
||||
if (WARN_ON_ONCE(rate->index < IWL_RATE_MCS_0_INDEX))
|
||||
rate->index = rs_ht_to_legacy[IWL_RATE_MCS_0_INDEX];
|
||||
else if (WARN_ON_ONCE(rate->index > IWL_RATE_MCS_9_INDEX))
|
||||
rate->index = rs_ht_to_legacy[IWL_RATE_MCS_9_INDEX];
|
||||
else
|
||||
rate->index = rs_ht_to_legacy[rate->index];
|
||||
|
||||
rate->index = rs_ht_to_legacy[rate->index];
|
||||
rate->ldpc = false;
|
||||
} else {
|
||||
/* Downgrade to SISO with same MCS if in MIMO */
|
||||
|
||||
@@ -36,7 +36,7 @@ void nvmet_bdev_set_limits(struct block_device *bdev, struct nvme_id_ns *id)
|
||||
*/
|
||||
id->nsfeat |= 1 << 4;
|
||||
/* NPWG = Namespace Preferred Write Granularity. 0's based */
|
||||
id->npwg = lpp0b;
|
||||
id->npwg = to0based(bdev_io_min(bdev) / bdev_logical_block_size(bdev));
|
||||
/* NPWA = Namespace Preferred Write Alignment. 0's based */
|
||||
id->npwa = id->npwg;
|
||||
/* NPDG = Namespace Preferred Deallocate Granularity. 0's based */
|
||||
|
||||
@@ -50,7 +50,7 @@ struct of_bus {
|
||||
u64 (*map)(__be32 *addr, const __be32 *range,
|
||||
int na, int ns, int pna);
|
||||
int (*translate)(__be32 *addr, u64 offset, int na);
|
||||
bool has_flags;
|
||||
int flag_cells;
|
||||
unsigned int (*get_flags)(const __be32 *addr);
|
||||
};
|
||||
|
||||
@@ -95,11 +95,43 @@ static int of_bus_default_translate(__be32 *addr, u64 offset, int na)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int of_bus_default_flags_get_flags(const __be32 *addr)
|
||||
{
|
||||
return of_read_number(addr, 1);
|
||||
}
|
||||
|
||||
static unsigned int of_bus_default_get_flags(const __be32 *addr)
|
||||
{
|
||||
return IORESOURCE_MEM;
|
||||
}
|
||||
|
||||
static u64 of_bus_default_flags_map(__be32 *addr, const __be32 *range, int na,
|
||||
int ns, int pna)
|
||||
{
|
||||
u64 cp, s, da;
|
||||
|
||||
/* Check that flags match */
|
||||
if (*addr != *range)
|
||||
return OF_BAD_ADDR;
|
||||
|
||||
/* Read address values, skipping high cell */
|
||||
cp = of_read_number(range + 1, na - 1);
|
||||
s = of_read_number(range + na + pna, ns);
|
||||
da = of_read_number(addr + 1, na - 1);
|
||||
|
||||
pr_debug("default flags map, cp=%llx, s=%llx, da=%llx\n", cp, s, da);
|
||||
|
||||
if (da < cp || da >= (cp + s))
|
||||
return OF_BAD_ADDR;
|
||||
return da - cp;
|
||||
}
|
||||
|
||||
static int of_bus_default_flags_translate(__be32 *addr, u64 offset, int na)
|
||||
{
|
||||
/* Keep "flags" part (high cell) in translated address */
|
||||
return of_bus_default_translate(addr + 1, offset, na - 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static unsigned int of_bus_pci_get_flags(const __be32 *addr)
|
||||
{
|
||||
@@ -189,10 +221,6 @@ static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns,
|
||||
return da - cp;
|
||||
}
|
||||
|
||||
static int of_bus_pci_translate(__be32 *addr, u64 offset, int na)
|
||||
{
|
||||
return of_bus_default_translate(addr + 1, offset, na - 1);
|
||||
}
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
int of_pci_address_to_resource(struct device_node *dev, int bar,
|
||||
@@ -302,11 +330,6 @@ static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns,
|
||||
return da - cp;
|
||||
}
|
||||
|
||||
static int of_bus_isa_translate(__be32 *addr, u64 offset, int na)
|
||||
{
|
||||
return of_bus_default_translate(addr + 1, offset, na - 1);
|
||||
}
|
||||
|
||||
static unsigned int of_bus_isa_get_flags(const __be32 *addr)
|
||||
{
|
||||
unsigned int flags = 0;
|
||||
@@ -319,6 +342,11 @@ static unsigned int of_bus_isa_get_flags(const __be32 *addr)
|
||||
return flags;
|
||||
}
|
||||
|
||||
static int of_bus_default_flags_match(struct device_node *np)
|
||||
{
|
||||
return of_bus_n_addr_cells(np) == 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* Array of bus specific translators
|
||||
*/
|
||||
@@ -332,8 +360,8 @@ static struct of_bus of_busses[] = {
|
||||
.match = of_bus_pci_match,
|
||||
.count_cells = of_bus_pci_count_cells,
|
||||
.map = of_bus_pci_map,
|
||||
.translate = of_bus_pci_translate,
|
||||
.has_flags = true,
|
||||
.translate = of_bus_default_flags_translate,
|
||||
.flag_cells = 1,
|
||||
.get_flags = of_bus_pci_get_flags,
|
||||
},
|
||||
#endif /* CONFIG_PCI */
|
||||
@@ -344,10 +372,21 @@ static struct of_bus of_busses[] = {
|
||||
.match = of_bus_isa_match,
|
||||
.count_cells = of_bus_isa_count_cells,
|
||||
.map = of_bus_isa_map,
|
||||
.translate = of_bus_isa_translate,
|
||||
.has_flags = true,
|
||||
.translate = of_bus_default_flags_translate,
|
||||
.flag_cells = 1,
|
||||
.get_flags = of_bus_isa_get_flags,
|
||||
},
|
||||
/* Default with flags cell */
|
||||
{
|
||||
.name = "default-flags",
|
||||
.addresses = "reg",
|
||||
.match = of_bus_default_flags_match,
|
||||
.count_cells = of_bus_default_count_cells,
|
||||
.map = of_bus_default_flags_map,
|
||||
.translate = of_bus_default_flags_translate,
|
||||
.flag_cells = 1,
|
||||
.get_flags = of_bus_default_flags_get_flags,
|
||||
},
|
||||
/* Default */
|
||||
{
|
||||
.name = "default",
|
||||
@@ -427,7 +466,8 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
|
||||
}
|
||||
if (ranges == NULL || rlen == 0) {
|
||||
offset = of_read_number(addr, na);
|
||||
memset(addr, 0, pna * 4);
|
||||
/* set address to zero, pass flags through */
|
||||
memset(addr + pbus->flag_cells, 0, (pna - pbus->flag_cells) * 4);
|
||||
pr_debug("empty ranges; 1:1 translation\n");
|
||||
goto finish;
|
||||
}
|
||||
@@ -755,7 +795,7 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser,
|
||||
int na = parser->na;
|
||||
int ns = parser->ns;
|
||||
int np = parser->pna + na + ns;
|
||||
int busflag_na = 0;
|
||||
int busflag_na = parser->bus->flag_cells;
|
||||
|
||||
if (!range)
|
||||
return NULL;
|
||||
@@ -765,10 +805,6 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser,
|
||||
|
||||
range->flags = parser->bus->get_flags(parser->range);
|
||||
|
||||
/* A extra cell for resource flags */
|
||||
if (parser->bus->has_flags)
|
||||
busflag_na = 1;
|
||||
|
||||
range->bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na);
|
||||
|
||||
if (parser->dma)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#size-cells = <1>;
|
||||
/* ranges here is to make sure we don't use it for
|
||||
* dma-ranges translation */
|
||||
ranges = <0x70000000 0x70000000 0x40000000>,
|
||||
ranges = <0x70000000 0x70000000 0x50000000>,
|
||||
<0x00000000 0xd0000000 0x20000000>;
|
||||
dma-ranges = <0x0 0x20000000 0x40000000>;
|
||||
|
||||
@@ -43,6 +43,13 @@
|
||||
<0x42000000 0x0 0xc0000000 0x20000000 0x0 0x10000000>;
|
||||
};
|
||||
|
||||
bus@a0000000 {
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0xf00baa 0x0 0x0 0xa0000000 0x0 0x100000>,
|
||||
<0xf00bee 0x1 0x0 0xb0000000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1019,6 +1019,113 @@ static void __init of_unittest_pci_dma_ranges(void)
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void __init of_unittest_bus_ranges(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct of_range range;
|
||||
struct of_range_parser parser;
|
||||
int i = 0;
|
||||
|
||||
np = of_find_node_by_path("/testcase-data/address-tests");
|
||||
if (!np) {
|
||||
pr_err("missing testcase data\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (of_range_parser_init(&parser, np)) {
|
||||
pr_err("missing ranges property\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the "ranges" from the device tree
|
||||
*/
|
||||
for_each_of_range(&parser, &range) {
|
||||
unittest(range.flags == IORESOURCE_MEM,
|
||||
"for_each_of_range wrong flags on node %pOF flags=%x (expected %x)\n",
|
||||
np, range.flags, IORESOURCE_MEM);
|
||||
if (!i) {
|
||||
unittest(range.size == 0x50000000,
|
||||
"for_each_of_range wrong size on node %pOF size=%llx\n",
|
||||
np, range.size);
|
||||
unittest(range.cpu_addr == 0x70000000,
|
||||
"for_each_of_range wrong CPU addr (%llx) on node %pOF",
|
||||
range.cpu_addr, np);
|
||||
unittest(range.bus_addr == 0x70000000,
|
||||
"for_each_of_range wrong bus addr (%llx) on node %pOF",
|
||||
range.pci_addr, np);
|
||||
} else {
|
||||
unittest(range.size == 0x20000000,
|
||||
"for_each_of_range wrong size on node %pOF size=%llx\n",
|
||||
np, range.size);
|
||||
unittest(range.cpu_addr == 0xd0000000,
|
||||
"for_each_of_range wrong CPU addr (%llx) on node %pOF",
|
||||
range.cpu_addr, np);
|
||||
unittest(range.bus_addr == 0x00000000,
|
||||
"for_each_of_range wrong bus addr (%llx) on node %pOF",
|
||||
range.pci_addr, np);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void __init of_unittest_bus_3cell_ranges(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct of_range range;
|
||||
struct of_range_parser parser;
|
||||
int i = 0;
|
||||
|
||||
np = of_find_node_by_path("/testcase-data/address-tests/bus@a0000000");
|
||||
if (!np) {
|
||||
pr_err("missing testcase data\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (of_range_parser_init(&parser, np)) {
|
||||
pr_err("missing ranges property\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the "ranges" from the device tree
|
||||
*/
|
||||
for_each_of_range(&parser, &range) {
|
||||
if (!i) {
|
||||
unittest(range.flags == 0xf00baa,
|
||||
"for_each_of_range wrong flags on node %pOF flags=%x\n",
|
||||
np, range.flags);
|
||||
unittest(range.size == 0x100000,
|
||||
"for_each_of_range wrong size on node %pOF size=%llx\n",
|
||||
np, range.size);
|
||||
unittest(range.cpu_addr == 0xa0000000,
|
||||
"for_each_of_range wrong CPU addr (%llx) on node %pOF",
|
||||
range.cpu_addr, np);
|
||||
unittest(range.bus_addr == 0x0,
|
||||
"for_each_of_range wrong bus addr (%llx) on node %pOF",
|
||||
range.pci_addr, np);
|
||||
} else {
|
||||
unittest(range.flags == 0xf00bee,
|
||||
"for_each_of_range wrong flags on node %pOF flags=%x\n",
|
||||
np, range.flags);
|
||||
unittest(range.size == 0x200000,
|
||||
"for_each_of_range wrong size on node %pOF size=%llx\n",
|
||||
np, range.size);
|
||||
unittest(range.cpu_addr == 0xb0000000,
|
||||
"for_each_of_range wrong CPU addr (%llx) on node %pOF",
|
||||
range.cpu_addr, np);
|
||||
unittest(range.bus_addr == 0x100000000,
|
||||
"for_each_of_range wrong bus addr (%llx) on node %pOF",
|
||||
range.pci_addr, np);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void __init of_unittest_parse_interrupts(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
@@ -3521,6 +3628,8 @@ static int __init of_unittest(void)
|
||||
of_unittest_dma_get_max_cpu_address();
|
||||
of_unittest_parse_dma_ranges();
|
||||
of_unittest_pci_dma_ranges();
|
||||
of_unittest_bus_ranges();
|
||||
of_unittest_bus_3cell_ranges();
|
||||
of_unittest_match_node();
|
||||
of_unittest_platform_populate();
|
||||
of_unittest_overlay();
|
||||
|
||||
@@ -4102,7 +4102,7 @@ iscsi_if_rx(struct sk_buff *skb)
|
||||
}
|
||||
do {
|
||||
/*
|
||||
* special case for GET_STATS:
|
||||
* special case for GET_STATS, GET_CHAP and GET_HOST_STATS:
|
||||
* on success - sending reply and stats from
|
||||
* inside of if_recv_msg(),
|
||||
* on error - fall through.
|
||||
@@ -4111,6 +4111,8 @@ iscsi_if_rx(struct sk_buff *skb)
|
||||
break;
|
||||
if (ev->type == ISCSI_UEVENT_GET_CHAP && !err)
|
||||
break;
|
||||
if (ev->type == ISCSI_UEVENT_GET_HOST_STATS && !err)
|
||||
break;
|
||||
err = iscsi_if_send_reply(portid, nlh->nlmsg_type,
|
||||
ev, sizeof(*ev));
|
||||
if (err == -EAGAIN && --retries < 0) {
|
||||
|
||||
@@ -390,7 +390,6 @@ sg_release(struct inode *inode, struct file *filp)
|
||||
|
||||
mutex_lock(&sdp->open_rel_lock);
|
||||
scsi_autopm_put_device(sdp->device);
|
||||
kref_put(&sfp->f_ref, sg_remove_sfp);
|
||||
sdp->open_cnt--;
|
||||
|
||||
/* possibly many open()s waiting on exlude clearing, start many;
|
||||
@@ -402,6 +401,7 @@ sg_release(struct inode *inode, struct file *filp)
|
||||
wake_up_interruptible(&sdp->open_wait);
|
||||
}
|
||||
mutex_unlock(&sdp->open_rel_lock);
|
||||
kref_put(&sfp->f_ref, sg_remove_sfp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,6 +171,12 @@ do { \
|
||||
dev_warn(&(dev)->device, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define storvsc_log_ratelimited(dev, level, fmt, ...) \
|
||||
do { \
|
||||
if (do_logging(level)) \
|
||||
dev_warn_ratelimited(&(dev)->device, fmt, ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
struct vmscsi_request {
|
||||
u16 length;
|
||||
u8 srb_status;
|
||||
@@ -1168,7 +1174,7 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
|
||||
int loglevel = (stor_pkt->vm_srb.cdb[0] == TEST_UNIT_READY) ?
|
||||
STORVSC_LOGGING_WARN : STORVSC_LOGGING_ERROR;
|
||||
|
||||
storvsc_log(device, loglevel,
|
||||
storvsc_log_ratelimited(device, loglevel,
|
||||
"tag#%d cmd 0x%x status: scsi 0x%x srb 0x%x hv 0x%x\n",
|
||||
scsi_cmd_to_rq(request->cmd)->tag,
|
||||
stor_pkt->vm_srb.cdb[0],
|
||||
|
||||
@@ -659,7 +659,7 @@ static int imx8mp_blk_ctrl_remove(struct platform_device *pdev)
|
||||
|
||||
of_genpd_del_provider(pdev->dev.of_node);
|
||||
|
||||
for (i = 0; bc->onecell_data.num_domains; i++) {
|
||||
for (i = 0; i < bc->onecell_data.num_domains; i++) {
|
||||
struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i];
|
||||
|
||||
pm_genpd_remove(&domain->genpd);
|
||||
|
||||
@@ -158,7 +158,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
|
||||
static int ad9832_write_phase(struct ad9832_state *st,
|
||||
unsigned long addr, unsigned long phase)
|
||||
{
|
||||
if (phase > BIT(AD9832_PHASE_BITS))
|
||||
if (phase >= BIT(AD9832_PHASE_BITS))
|
||||
return -EINVAL;
|
||||
|
||||
st->phase_data[0] = cpu_to_be16((AD9832_CMD_PHA8BITSW << CMD_SHIFT) |
|
||||
|
||||
@@ -131,7 +131,7 @@ static int ad9834_write_frequency(struct ad9834_state *st,
|
||||
static int ad9834_write_phase(struct ad9834_state *st,
|
||||
unsigned long addr, unsigned long phase)
|
||||
{
|
||||
if (phase > BIT(AD9834_PHASE_BITS))
|
||||
if (phase >= BIT(AD9834_PHASE_BITS))
|
||||
return -EINVAL;
|
||||
st->data = cpu_to_be16(addr | phase);
|
||||
|
||||
|
||||
@@ -315,6 +315,7 @@ static struct device_node *of_thermal_zone_find(struct device_node *sensor, int
|
||||
goto out;
|
||||
}
|
||||
|
||||
of_node_put(sensor_specs.np);
|
||||
if ((sensor == sensor_specs.np) && id == (sensor_specs.args_count ?
|
||||
sensor_specs.args[0] : 0)) {
|
||||
pr_debug("sensor %pOFn id=%d belongs to %pOFn\n", sensor, id, child);
|
||||
|
||||
@@ -10547,14 +10547,17 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the default power management level for runtime and system PM.
|
||||
* Set the default power management level for runtime and system PM if
|
||||
* not set by the host controller drivers.
|
||||
* Default power saving mode is to keep UFS link in Hibern8 state
|
||||
* and UFS device in sleep state.
|
||||
*/
|
||||
hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||
if (!hba->rpm_lvl)
|
||||
hba->rpm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||
UFS_SLEEP_PWR_MODE,
|
||||
UIC_LINK_HIBERN8_STATE);
|
||||
hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||
if (!hba->spm_lvl)
|
||||
hba->spm_lvl = ufs_get_desired_pm_lvl_for_dev_link_state(
|
||||
UFS_SLEEP_PWR_MODE,
|
||||
UIC_LINK_HIBERN8_STATE);
|
||||
|
||||
|
||||
@@ -1337,11 +1337,12 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)
|
||||
if (protocol < USBLP_FIRST_PROTOCOL || protocol > USBLP_LAST_PROTOCOL)
|
||||
return -EINVAL;
|
||||
|
||||
alts = usblp->protocol[protocol].alt_setting;
|
||||
if (alts < 0)
|
||||
return -EINVAL;
|
||||
|
||||
/* Don't unnecessarily set the interface if there's a single alt. */
|
||||
if (usblp->intf->num_altsetting > 1) {
|
||||
alts = usblp->protocol[protocol].alt_setting;
|
||||
if (alts < 0)
|
||||
return -EINVAL;
|
||||
r = usb_set_interface(usblp->dev, usblp->ifnum, alts);
|
||||
if (r < 0) {
|
||||
printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
|
||||
|
||||
@@ -2657,13 +2657,13 @@ int usb_new_device(struct usb_device *udev)
|
||||
err = sysfs_create_link(&udev->dev.kobj,
|
||||
&port_dev->dev.kobj, "port");
|
||||
if (err)
|
||||
goto fail;
|
||||
goto out_del_dev;
|
||||
|
||||
err = sysfs_create_link(&port_dev->dev.kobj,
|
||||
&udev->dev.kobj, "device");
|
||||
if (err) {
|
||||
sysfs_remove_link(&udev->dev.kobj, "port");
|
||||
goto fail;
|
||||
goto out_del_dev;
|
||||
}
|
||||
|
||||
if (!test_and_set_bit(port1, hub->child_usage_bits))
|
||||
@@ -2675,6 +2675,8 @@ int usb_new_device(struct usb_device *udev)
|
||||
pm_runtime_put_sync_autosuspend(&udev->dev);
|
||||
return err;
|
||||
|
||||
out_del_dev:
|
||||
device_del(&udev->dev);
|
||||
fail:
|
||||
usb_set_device_state(udev, USB_STATE_NOTATTACHED);
|
||||
pm_runtime_disable(&udev->dev);
|
||||
|
||||
@@ -450,10 +450,11 @@ static int usb_port_runtime_suspend(struct device *dev)
|
||||
static void usb_port_shutdown(struct device *dev)
|
||||
{
|
||||
struct usb_port *port_dev = to_usb_port(dev);
|
||||
struct usb_device *udev = port_dev->child;
|
||||
|
||||
if (port_dev->child) {
|
||||
usb_disable_usb2_hardware_lpm(port_dev->child);
|
||||
usb_unlocked_disable_lpm(port_dev->child);
|
||||
if (udev && !udev->port_is_suspended) {
|
||||
usb_disable_usb2_hardware_lpm(udev);
|
||||
usb_unlocked_disable_lpm(udev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -455,6 +455,7 @@
|
||||
#define DWC3_DCTL_TRGTULST_SS_INACT (DWC3_DCTL_TRGTULST(6))
|
||||
|
||||
/* These apply for core versions 1.94a and later */
|
||||
#define DWC3_DCTL_NYET_THRES_MASK (0xf << 20)
|
||||
#define DWC3_DCTL_NYET_THRES(n) (((n) & 0xf) << 20)
|
||||
|
||||
#define DWC3_DCTL_KEEP_CONNECT BIT(19)
|
||||
|
||||
@@ -263,6 +263,7 @@ static int dwc3_ti_remove(struct platform_device *pdev)
|
||||
|
||||
pm_runtime_put_sync(dev);
|
||||
pm_runtime_disable(dev);
|
||||
pm_runtime_dont_use_autosuspend(dev);
|
||||
pm_runtime_set_suspended(dev);
|
||||
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
||||
@@ -4065,8 +4065,10 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
|
||||
WARN_ONCE(DWC3_VER_IS_PRIOR(DWC3, 240A) && dwc->has_lpm_erratum,
|
||||
"LPM Erratum not available on dwc3 revisions < 2.40a\n");
|
||||
|
||||
if (dwc->has_lpm_erratum && !DWC3_VER_IS_PRIOR(DWC3, 240A))
|
||||
if (dwc->has_lpm_erratum && !DWC3_VER_IS_PRIOR(DWC3, 240A)) {
|
||||
reg &= ~DWC3_DCTL_NYET_THRES_MASK;
|
||||
reg |= DWC3_DCTL_NYET_THRES(dwc->lpm_nyet_threshold);
|
||||
}
|
||||
|
||||
dwc3_gadget_dctl_write_safe(dwc, reg);
|
||||
} else {
|
||||
|
||||
@@ -1868,7 +1868,7 @@ static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)
|
||||
|
||||
ENTER();
|
||||
|
||||
if (WARN_ON(ffs->state != FFS_ACTIVE
|
||||
if ((ffs->state != FFS_ACTIVE
|
||||
|| test_and_set_bit(FFS_FL_BOUND, &ffs->flags)))
|
||||
return -EBADFD;
|
||||
|
||||
|
||||
@@ -1176,6 +1176,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
||||
uac2->as_in_alt = 0;
|
||||
}
|
||||
|
||||
std_ac_if_desc.bNumEndpoints = 0;
|
||||
if (FUOUT_EN(uac2_opts) || FUIN_EN(uac2_opts)) {
|
||||
uac2->int_ep = usb_ep_autoconfig(gadget, &fs_ep_int_desc);
|
||||
if (!uac2->int_ep) {
|
||||
|
||||
@@ -756,11 +756,9 @@ static struct pci_driver xhci_pci_driver = {
|
||||
/* suspend and resume implemented later */
|
||||
|
||||
.shutdown = usb_hcd_pci_shutdown,
|
||||
#ifdef CONFIG_PM
|
||||
.driver = {
|
||||
.pm = &usb_hcd_pci_pm_ops
|
||||
.pm = pm_ptr(&usb_hcd_pci_pm_ops),
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
static int __init xhci_pci_init(void)
|
||||
|
||||
@@ -223,6 +223,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */
|
||||
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
|
||||
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
|
||||
{ USB_DEVICE(0x1B93, 0x1013) }, /* Phoenix Contact UPS Device */
|
||||
{ USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
|
||||
|
||||
@@ -621,7 +621,7 @@ static void option_instat_callback(struct urb *urb);
|
||||
|
||||
/* MeiG Smart Technology products */
|
||||
#define MEIGSMART_VENDOR_ID 0x2dee
|
||||
/* MeiG Smart SRM825L based on Qualcomm 315 */
|
||||
/* MeiG Smart SRM815/SRM825L based on Qualcomm 315 */
|
||||
#define MEIGSMART_PRODUCT_SRM825L 0x4d22
|
||||
/* MeiG Smart SLM320 based on UNISOC UIS8910 */
|
||||
#define MEIGSMART_PRODUCT_SLM320 0x4d41
|
||||
@@ -2405,6 +2405,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM770A, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) },
|
||||
@@ -2412,6 +2413,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
.driver_info = NCTRL(1) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */
|
||||
.driver_info = NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2949, 0x8700, 0xff) }, /* Neoway N723-EA */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
||||
@@ -511,7 +511,7 @@ static void qt2_process_read_urb(struct urb *urb)
|
||||
|
||||
newport = *(ch + 3);
|
||||
|
||||
if (newport > serial->num_ports) {
|
||||
if (newport >= serial->num_ports) {
|
||||
dev_err(&port->dev,
|
||||
"%s - port change to invalid port: %i\n",
|
||||
__func__, newport);
|
||||
|
||||
@@ -255,6 +255,13 @@ UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
/* Added by Lubomir Rintel <lkundrak@v3.sk>, a very fine chap */
|
||||
UNUSUAL_DEV( 0x0421, 0x06c2, 0x0000, 0x0406,
|
||||
"Nokia",
|
||||
"Nokia 208",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
#ifdef NO_SDDR09
|
||||
UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
|
||||
"Microtech",
|
||||
|
||||
@@ -391,6 +391,11 @@ static ssize_t vfio_platform_read_mmio(struct vfio_platform_region *reg,
|
||||
{
|
||||
unsigned int done = 0;
|
||||
|
||||
if (off >= reg->size)
|
||||
return -EINVAL;
|
||||
|
||||
count = min_t(size_t, count, reg->size - off);
|
||||
|
||||
if (!reg->ioaddr) {
|
||||
reg->ioaddr =
|
||||
ioremap(reg->addr, reg->size);
|
||||
@@ -470,6 +475,11 @@ static ssize_t vfio_platform_write_mmio(struct vfio_platform_region *reg,
|
||||
{
|
||||
unsigned int done = 0;
|
||||
|
||||
if (off >= reg->size)
|
||||
return -EINVAL;
|
||||
|
||||
count = min_t(size_t, count, reg->size - off);
|
||||
|
||||
if (!reg->ioaddr) {
|
||||
reg->ioaddr =
|
||||
ioremap(reg->addr, reg->size);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user