5.9.11-rc1 review
Greg Kroah-Hartman
maintainerPATCH 179/252 efi/x86: Free efi_pgd with free_pages()
In reply to Greg Kroah-HartmanFrom: Arvind Sankar <[email protected]>
[ Upstream commit c2fe61d8be491ff8188edaf22e838f819999146b ]
Commit
d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD")
changed the PGD allocation to allocate PGD_ALLOCATION_ORDER pages, so in the error path it should be freed using free_pages() rather than free_page().
Commit
06ace26f4e6f ("x86/efi: Free efi_pgd with free_pages()")fixed one instance of this, but missed another.
Move the freeing out-of-line to avoid code duplication and fix this bug.
--- arch/x86/platform/efi/efi_64.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
arch/x86/platform/efi/efi_64.c +13 -11
@@ -77,28 +77,30 @@ int __init efi_alloc_page_tables(void) gfp_mask =GFP_KERNEL | __GFP_ZERO; efi_pgd = (pgd_t *)__get_free_pages (gfp_mask,PGD_ALLOCATION_ORDER );if (!efi_pgd) -return -ENOMEM ; + goto fail; pgd = efi_pgd +pgd_index (EFI_VA_END ); p4d =p4d_alloc (&init_mm, pgd,EFI_VA_END ); -if (!p4d) { -free_page ((unsigned long )efi_pgd); -return -ENOMEM ; - } +if (!p4d) + goto free_pgd; pud =pud_alloc (&init_mm, p4d,EFI_VA_END ); -if (!pud) { -if (pgtable_l5_enabled ()) -free_page ((unsigned long )pgd_page_vaddr (*pgd)); -free_pages ((unsigned long )efi_pgd,PGD_ALLOCATION_ORDER ); -return -ENOMEM ; - } +if (!pud) + goto free_p4d; efi_mm.pgd = efi_pgd;mm_init_cpumask (&efi_mm);init_new_context (NULL , &efi_mm);return 0 ; + +free_p4d: +if (pgtable_l5_enabled ()) +free_page ((unsigned long )pgd_page_vaddr (*pgd)); +free_pgd: +free_pages ((unsigned long )efi_pgd,PGD_ALLOCATION_ORDER ); +fail: +return -ENOMEM ; }/*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 181/252 sched: Fix data-race in wakeup
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit f97bb5272d9e95d400d6c8643ebb146b3e3e7842 ]
Mel reported that on some ARM64 platforms loadavg goes bananas and Will tracked it down to the following race:
CPU0 CPU1
schedule()
prev->sched_contributes_to_load = X;
deactivate_task(prev); try_to_wake_up()
if (p->on_rq &&) // false
if (smp_load_acquire(&p->on_cpu) && // true
ttwu_queue_wakelist())
p->sched_remote_wakeup = Y;
smp_store_release(prev->on_cpu, 0);where both p->sched_contributes_to_load and p->sched_remote_wakeup are in the same word, and thus the stores X and Y race (and can clobber one another's data).
Whereas prior to commit c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") the p->on_cpu handoff serialized access to p->sched_remote_wakeup (just as it still does with p->sched_contributes_to_load) that commit broke that by calling ttwu_queue_wakelist() with p->on_cpu != 0.
However, due to
p->XXX = X ttwu()
schedule() if (p->on_rq && ...) // false
smp_mb__after_spinlock() if (smp_load_acquire(&p->on_cpu) &&
deactivate_task() ttwu_queue_wakelist())
p->on_rq = 0; p->sched_remote_wakeup = Y;We can be sure any 'current' store is complete and 'current' is guaranteed asleep. Therefore we can move p->sched_remote_wakeup into the current flags word.
Note: while the observed failure was loadavg accounting gone wrong due to ttwu() cobbering p->sched_contributes_to_load, the reverse problem is also possible where schedule() clobbers p->sched_remote_wakeup, this could result in enqueue_entity() wrecking ->vruntime and causing scheduling artifacts.
--- include/linux/sched.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
include/linux/sched.h +15 -1
@@ -770,7 +770,6 @@ struct task_struct { unsigned sched_reset_on_fork:1; unsigned sched_contributes_to_load:1; unsigned sched_migrated:1; - unsigned sched_remote_wakeup:1;#ifdef CONFIG_PSI unsigned sched_psi_wake_requeue:1;#endif
@@ -780,6 +779,21 @@ struct task_struct {/* Unserialized, strictly 'current' */ +/* +* This field must not be in the scheduler word above due to wakelist +* queueing no longer being serialized by p->on_cpu. However: +* +* p->XXX = X; ttwu() +* schedule() if (p->on_rq && ..) // false +* smp_mb__after_spinlock(); if (smp_load_acquire(&p->on_cpu) && //true +* deactivate_task() ttwu_queue_wakelist()) +* p->on_rq = 0; p->sched_remote_wakeup = Y; +* +* guarantees all stores of 'current' are visible before +* ->sched_remote_wakeup gets used, so it can be in this word. +*/ + unsigned sched_remote_wakeup:1; +/* Bit to tell LSMs we're in execve(): */ unsigned in_execve:1; unsigned in_iowait:1;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 205/252 ext4: fix bogus warning in ext4_update_dx_flag()
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit f902b216501094495ff75834035656e8119c537f upstream.
The idea of the warning in ext4_update_dx_flag() is that we should warn when we are clearing EXT4_INODE_INDEX on a filesystem with metadata checksums enabled since after clearing the flag, checksums for internal htree nodes will become invalid. So there's no need to warn (or actually do anything) when EXT4_INODE_INDEX is not set.
--- fs/ext4/ext4.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ext4/ext4.h +2 -1
@@ -2622,7 +2622,8 @@ void ext4_insert_dentry(struct inode *in struct ext4_filename *fname);static inline void ext4_update_dx_flag (struct inode *inode) { -if (!ext4_has_feature_dir_index (inode->i_sb)) { +if (!ext4_has_feature_dir_index (inode->i_sb) && +ext4_test_inode_flag (inode,EXT4_INODE_INDEX )) {/* ext4_iget() should have caught this... */ WARN_ON_ONCE (ext4_has_feature_metadata_csum (inode->i_sb));ext4_clear_inode_flag (inode,EXT4_INODE_INDEX );
Greg Kroah-Hartman
maintainerPATCH 180/252 sched/fair: Fix overutilized update in enqueue_task_fair()
In reply to Greg Kroah-HartmanFrom: Quentin Perret <[email protected]>
[ Upstream commit 8e1ac4299a6e8726de42310d9c1379f188140c71 ]
enqueue_task_fair() attempts to skip the overutilized update for new tasks as their util_avg is not accurate yet. However, the flag we check to do so is overwritten earlier on in the function, which makes the condition pretty much a nop.
Fix this by saving the flag early on.
--- kernel/sched/fair.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/fair.c +2 -1
@@ -5473,6 +5473,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)struct cfs_rq *cfs_rq;struct sched_entity *se = &p->se;int idle_h_nr_running =task_has_idle_policy (p); +int task_new = !(flags &ENQUEUE_WAKEUP );/* * The code below (indirectly) updates schedutil which looks at
@@ -5545,7 +5546,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)* into account, but that is not straightforward to implement, * and the following generally works well enough in practice. */ -if (flags &ENQUEUE_WAKEUP ) +if (!task_new)update_overutilized_status (rq); enqueue_throttle:
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 206/252 xfs: fix forkoff miscalculation related to XFS_LITINO(mp)
In reply to Greg Kroah-HartmanFrom: Gao Xiang <[email protected]>
commit ada49d64fb3538144192181db05de17e2ffc3551 upstream.
Currently, commit e9e2eae89ddb dropped a (int) decoration from XFS_LITINO(mp), and since sizeof() expression is also involved, the result of XFS_LITINO(mp) is simply as the size_t type (commonly unsigned long).
Considering the expression in xfs_attr_shortform_bytesfit():
offset = (XFS_LITINO(mp) - bytes) >> 3;
let "bytes" be (int)340, and
"XFS_LITINO(mp)" be (unsigned long)336.
on 64-bit platform, the expression is
offset = ((unsigned long)336 - (int)340) >> 3 =
(int)(0xfffffffffffffffcUL >> 3) = -1
but on 32-bit platform, the expression is
offset = ((unsigned long)336 - (int)340) >> 3 =
(int)(0xfffffffcUL >> 3) = 0x1fffffff
instead.
so offset becomes a large positive number on 32-bit platform, and cause xfs_attr_shortform_bytesfit() returns maxforkoff rather than 0.
Therefore, one result is
"ASSERT(new_size <= XFS_IFORK_SIZE(ip, whichfork));"
assertion failure in xfs_idata_realloc(), which was also the root cause of the original bugreport from Dennis, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1894177
And it can also be manually triggered with the following commands:
$ touch a; $ setfattr -n user.0 -v "`seq 0 80`" a; $ setfattr -n user.1 -v "`seq 0 80`" a
on 32-bit platform.
Fix the case in xfs_attr_shortform_bytesfit() by bailing out "XFS_LITINO(mp) < bytes" in advance suggested by Eric and a misleading comment together with this bugfix suggested by Darrick. It seems the other users of XFS_LITINO(mp) are not impacted.
--- fs/xfs/libxfs/xfs_attr_leaf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/xfs/libxfs/xfs_attr_leaf.c +7 -1
@@ -515,7 +515,7 @@ xfs_attr_copy_value(*========================================================================*/ /* -* Query whether the requested number of additional bytes of extended +* Query whether the total requested number of attr fork bytes of extended * attribute space will be able to fit inline. * * Returns zero if not, else the di_forkoff fork offset to be used in the
@@ -535,6 +535,12 @@ xfs_attr_shortform_bytesfit(int maxforkoff;int offset; +/* +* Check if the new size could fit at all first: +*/ +if (bytes >XFS_LITINO (mp)) +return 0 ; +/* rounded down */ offset = (XFS_LITINO (mp) - bytes) >>3 ;
Greg Kroah-Hartman
maintainerPATCH 199/252 tty: serial: imx: keep console clocks always on
In reply to Greg Kroah-HartmanFrom: Fugang Duan <[email protected]>
commit e67c139c488e84e7eae6c333231e791f0e89b3fb upstream.
For below code, there has chance to cause deadlock in SMP system:
Thread 1:clk_enable_lock();pr_info("debug message");clk_enable_unlock();
Thread 2:imx_uart_console_write()
clk_enable() clk_enable_lock();
Thread 1:
Acuired clk enable_lock -> printk -> console_trylock_spinning
Thread 2:console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock
So the patch is to keep console port clocks always on like other console drivers.
--- drivers/tty/serial/imx.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
drivers/tty/serial/imx.c +3 -17
@@ -2007,16 +2007,6 @@ imx_uart_console_write(struct console *cunsigned int ucr1;unsigned long flags =0 ;int locked =1 ; -int retval; - - retval =clk_enable (sport->clk_per); -if (retval) -return ; - retval =clk_enable (sport->clk_ipg); -if (retval) { -clk_disable (sport->clk_per); -return ; - }if (sport->port.sysrq) locked =0 ;
@@ -2052,9 +2042,6 @@ imx_uart_console_write(struct console *cif (locked)spin_unlock_irqrestore (&sport->port.lock, flags); - -clk_disable (sport->clk_ipg); -clk_disable (sport->clk_per); }/*
@@ -2155,15 +2142,14 @@ imx_uart_console_setup(struct console *c retval =uart_set_options (&sport->port, co, baud, parity, bits, flow); -clk_disable (sport->clk_ipg);if (retval) { -clk_unprepare (sport->clk_ipg); +clk_disable_unprepare (sport->clk_ipg); goto error_console; } - retval =clk_prepare (sport->clk_per); + retval =clk_prepare_enable (sport->clk_per);if (retval) -clk_unprepare (sport->clk_ipg); +clk_disable_unprepare (sport->clk_ipg); error_console:return retval;
Greg Kroah-Hartman
maintainerPATCH 203/252 staging: mt7621-pci: avoid to request pci bus resources
In reply to Greg Kroah-HartmanFrom: Sergio Paracuellos <[email protected]>
commit e2b2e4386cb7a5e935dff388cf8961317daf39ce upstream.
After upgrading kernel to version 5.9.x the driver was not working anymore showing the following kernel trace:
...
mt7621-pci 1e140000.pcie: resource collision:
[mem 0x60000000-0x6fffffff] conflicts with pcie@1e140000 [mem 0x60000000-0x6fffffff]
------------[ cut here ]------------
WARNING: CPU: 2 PID: 73 at kernel/resource.c:1400
devm_request_resource+0xfc/0x10c
Modules linked in:
CPU: 2 PID: 73 Comm: kworker/2:1 Not tainted 5.9.2 #0
Workqueue: events deferred_probe_work_func
Stack : 00000000 81590000 807d0a1c 808a0000 8fd49080
807d0000 00000009 808ac820
00000001 808338d0 7fff0001 800839dc 00000049
00000001 8fe51b00 367204ab
00000000 00000000 807d0a1c 807c0000 00000001
80082358 8fe50000 00559000
00000000 8fe519f1 ffffffff 00000005 00000000
00000001 00000000 807d0000
00000009 808ac820 00000001 808338d0 00000001
803bf1b0 00000008 81390008Call Trace: [<8000d018>] show_stack+0x30/0x100 [<8032e66c>] dump_stack+0xa4/0xd4 [<8002db1c>] __warn+0xc0/0x134 [<8002dbec>] warn_slowpath_fmt+0x5c/0xac [<80033b34>] devm_request_resource+0xfc/0x10c [<80365ff8>] devm_request_pci_bus_resources+0x58/0xdc [<8048e13c>] mt7621_pci_probe+0x8dc/0xe48 [<803d2140>] platform_drv_probe+0x40/0x94 [<803cfd94>] really_probe+0x108/0x4ec [<803cd958>] bus_for_each_drv+0x70/0xb0 [<803d0388>] __device_attach+0xec/0x164 [<803cec8c>] bus_probe_device+0xa4/0xc0 [<803cf1c4>] deferred_probe_work_func+0x80/0xc4 [<80048444>] process_one_work+0x260/0x510 [<80048a4c>] worker_thread+0x358/0x5cc [<8004f7d0>] kthread+0x134/0x13c [<80007478>] ret_from_kernel_thread+0x14/0x1c ---[ end trace a9dd2e37537510d3 ]---
mt7621-pci 1e140000.pcie: Error requesting resources
mt7621-pci: probe of 1e140000.pcie failed with error -16
...
With commit 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated into resources when the host bridge is allocated. The resources are requested as well, but that happens a 2nd time for this driver in mt7621_pcie_request_resources(). Hence we should avoid this second request.
Also, the bus ranges was also populated by default, so we can remove it from mt7621_pcie_request_resources() to avoid the following trace if we don't avoid it:
pci_bus 0000:00: busn_res: can not insert [bus 00-ff] under domain [bus 00-ff] (conflicts with (null) [bus 00-ff])
Function 'mt7621_pcie_request_resources' has been renamed into 'mt7621_pcie_add_resources' which now is a more accurate name for this function.
--- drivers/staging/mt7621-pci/pci-mt7621.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/staging/mt7621-pci/pci-mt7621.c +3 -12
@@ -653,16 +653,11 @@ static int mt7621_pcie_init_virtual_bridreturn 0 ; } -static int mt7621_pcie_request_resources (struct mt7621_pcie *pcie, -struct list_head *res) +static void mt7621_pcie_add_resources (struct mt7621_pcie *pcie, +struct list_head *res) { -struct device *dev = pcie->dev; -pci_add_resource_offset (res, &pcie->io, pcie->offset.io);pci_add_resource_offset (res, &pcie->mem, pcie->offset.mem); -pci_add_resource (res, &pcie->busn); - -return devm_request_pci_bus_resources (dev, res); } static int mt7621_pcie_register_host(struct pci_host_bridge *host,
@@ -738,11 +733,7 @@ static int mt7621_pci_probe(struct platfsetup_cm_memory_region (pcie); - err =mt7621_pcie_request_resources (pcie, &res); -if (err) { -dev_err (dev,"Error requesting resources\n" ); -return err; - } +mt7621_pcie_add_resources (pcie, &res); err =mt7621_pcie_register_host (bridge, &res);if (err) {
Greg Kroah-Hartman
maintainerPATCH 195/252 ALSA: hda/realtek - Add supported mute Led for HP
In reply to Greg Kroah-HartmanFrom: Kailang Yang <[email protected]>
commit a0ccbc5319d57b9efdc55c943a3fde30a0776502 upstream.
HP Pavilion x360 Convertible machine, it supported mute led. GPIO4 high will turn on led.
The patch will enable control led via GPIO4 pin.
--- sound/pci/hda/patch_realtek.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
sound/pci/hda/patch_realtek.c +13 -0
@@ -4216,6 +4216,12 @@ static void alc286_fixup_hp_gpio_led(stralc_fixup_hp_gpio_led (codec, action,0x02 ,0x20 ); } +static void alc287_fixup_hp_gpio_led (struct hda_codec *codec, +const struct hda_fixup *fix,int action) +{ +alc_fixup_hp_gpio_led (codec, action,0x10 ,0 ); +} +/* turn on/off mic-mute LED per capture hook via VREF change */ static int vref_micmute_led_set (struct led_classdev *led_cdev,enum led_brightness brightness)
@@ -6302,6 +6308,7 @@ enum {ALC274_FIXUP_HP_HEADSET_MIC ,ALC256_FIXUP_ASUS_HPE ,ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK , + ALC287_FIXUP_HP_GPIO_LED, }; static const struct hda_fixup alc269_fixups[] = {
@@ -7712,6 +7719,10 @@ static const struct hda_fixup alc269_fix .chained = true, .chain_id =ALC269_FIXUP_THINKPAD_ACPI }, + [ALC287_FIXUP_HP_GPIO_LED] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_hp_gpio_led, + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7866,6 +7877,8 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x103c ,0x8760 ,"HP" ,ALC285_FIXUP_HP_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x877a ,"HP" ,ALC285_FIXUP_HP_MUTE_LED ),SND_PCI_QUIRK (0x103c ,0x877d ,"HP" ,ALC236_FIXUP_HP_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x87f4 ,"HP" ,ALC287_FIXUP_HP_GPIO_LED ), +SND_PCI_QUIRK (0x103c ,0x87f5 ,"HP" ,ALC287_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x1043 ,0x103e ,"ASUS X540SA" ,ALC256_FIXUP_ASUS_MIC ),SND_PCI_QUIRK (0x1043 ,0x103f ,"ASUS TX300" ,ALC282_FIXUP_ASUS_TX300 ), SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
Greg Kroah-Hartman
maintainerPATCH 196/252 ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)
In reply to Greg Kroah-HartmanFrom: PeiSen Hou <[email protected]>
commit b5acfe152abaa2721c9ca8aa67f941d7de55d24e upstream.
Fix "use as headset mic, without its own jack detect" problem.
[ Minor coding style fixes by tiwai ]
--- sound/pci/hda/patch_realtek.c | 50 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +49 -1
@@ -2522,13 +2522,23 @@ static const struct snd_pci_quirk alc882SND_PCI_QUIRK_VENDOR (0x1462 ,"MSI" ,ALC882_FIXUP_GPIO3 ),SND_PCI_QUIRK (0x147b ,0x107a ,"Abit AW9D-MAX" ,ALC882_FIXUP_ABIT_AW9D_MAX ),SND_PCI_QUIRK (0x1558 ,0x9501 ,"Clevo P950HR" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x9506 ,"Clevo P955HQ" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x950A ,"Clevo P955H[PR]" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x95e1 ,"Clevo P95xER" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x95e2 ,"Clevo P950ER" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x95e3 ,"Clevo P955[ER]T" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x95e4 ,"Clevo P955ER" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x95e5 ,"Clevo P955EE6" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x95e6 ,"Clevo P950R[CDF]" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x96e1 ,"Clevo P960[ER][CDFN]-K" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1558 ,0x97e1 ,"Clevo P970[ER][CDFN]" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x97e2 ,"Clevo P970RC-M" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1558 ,0x50d3 ,"Clevo PC50[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x65d1 ,"Clevo PB51[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65d2 ,"Clevo PB51R[CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x65e1 ,"Clevo PB51[ED][DF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x67d1 ,"Clevo PB71[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), -SND_PCI_QUIRK (0x1558 ,0x50d3 ,"Clevo PC50[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), +SND_PCI_QUIRK (0x1558 ,0x67e1 ,"Clevo PB71[DE][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x70d1 ,"Clevo PC70[ER][CDF]" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ),SND_PCI_QUIRK (0x1558 ,0x7714 ,"Clevo X170" ,ALC1220_FIXUP_CLEVO_PB51ED_PINS ), SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
@@ -7944,11 +7954,49 @@ static const struct snd_pci_quirk alc269SND_PCI_QUIRK (0x1458 ,0xfa53 ,"Gigabyte BXBT-2807" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x1462 ,0xb120 ,"MSI Cubi MS-B120" ,ALC283_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x1462 ,0xb171 ,"Cubi N 8GL (MS-B171)" ,ALC283_FIXUP_HEADSET_MIC ), +SND_PCI_QUIRK (0x1558 ,0x1323 ,"Clevo N130ZU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x1325 ,"System76 Darter Pro (darp5)" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x1401 ,"Clevo L140[CZ]U" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x1403 ,"Clevo N140CU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x1404 ,"Clevo N150CU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x14a1 ,"Clevo L141MU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x4018 ,"Clevo NV40M[BE]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x4019 ,"Clevo NV40MZ" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x4020 ,"Clevo NV40MB" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x40a1 ,"Clevo NL40GU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x40c1 ,"Clevo NL40[CZ]U" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x40d1 ,"Clevo NL41DU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50a3 ,"Clevo NJ51GU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50b3 ,"Clevo NK50S[BEZ]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50b6 ,"Clevo NK50S5" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50b8 ,"Clevo NK50SZ" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50d5 ,"Clevo NP50D5" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50f0 ,"Clevo NH50A[CDF]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x50f3 ,"Clevo NH58DPQ" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x5101 ,"Clevo S510WU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x5157 ,"Clevo W517GU1" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x51a1 ,"Clevo NS50MU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x70a1 ,"Clevo NB70T[HJK]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x70b3 ,"Clevo NK70SB" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8228 ,"Clevo NR40BU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8520 ,"Clevo NH50D[CD]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8521 ,"Clevo NH77D[CD]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8535 ,"Clevo NH50D[BE]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8536 ,"Clevo NH79D[BE]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x8550 ,"System76 Gazelle (gaze14)" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x8551 ,"System76 Gazelle (gaze14)" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1558 ,0x8560 ,"System76 Gazelle (gaze14)" ,ALC269_FIXUP_HEADSET_MIC ),SND_PCI_QUIRK (0x1558 ,0x8561 ,"System76 Gazelle (gaze14)" ,ALC269_FIXUP_HEADSET_MIC ), +SND_PCI_QUIRK (0x1558 ,0x8668 ,"Clevo NP50B[BE]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8680 ,"Clevo NJ50LU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8686 ,"Clevo NH50[CZ]U" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8a20 ,"Clevo NH55DCQ-Y" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8a51 ,"Clevo NH70RCQ-Y" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x8d50 ,"Clevo NH55RCQ-M" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x951d ,"Clevo N950T[CDF]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x961d ,"Clevo N960S[CDF]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0x971d ,"Clevo N970T[CDF]" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x1558 ,0xa500 ,"Clevo NL53RU" ,ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x17aa ,0x1036 ,"Lenovo P520" ,ALC233_FIXUP_LENOVO_MULTI_CODECS ),SND_PCI_QUIRK (0x17aa ,0x1048 ,"ThinkCentre Station" ,ALC283_FIXUP_HEADSET_MIC ), SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
Greg Kroah-Hartman
maintainerPATCH 198/252 tty: serial: imx: fix potential deadlock
In reply to Greg Kroah-HartmanFrom: Sam Nobs <[email protected]>
commit 33f16855dcb973f745c51882d0e286601ff3be2b upstream.
Enabling the lock dependency validator has revealed that the way spinlocks are used in the IMX serial port could result in a deadlock.
Specifically, imx_uart_int() acquires a spinlock without disabling the interrupts, meaning that another interrupt could come along and try to acquire the same spinlock, potentially causing the two to wait for each other indefinitely.
Use spin_lock_irqsave() instead to disable interrupts upon acquisition of the spinlock.
--- drivers/tty/serial/imx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/tty/serial/imx.c +8 -2
@@ -942,8 +942,14 @@ static irqreturn_t imx_uart_int(int irq,struct imx_port *sport = dev_id;unsigned int usr1, usr2, ucr1, ucr2, ucr3, ucr4;irqreturn_t ret =IRQ_NONE ; +unsigned long flags =0 ; -spin_lock (&sport->port.lock); +/* +* IRQs might not be disabled upon entering this interrupt handler, +* e.g. when interrupt handlers are forced to be threaded. To support +* this scenario as well, disable IRQs when acquiring the spinlock. +*/ +spin_lock_irqsave (&sport->port.lock, flags); usr1 =imx_uart_readl (sport,USR1 ); usr2 =imx_uart_readl (sport,USR2 );
@@ -1013,7 +1019,7 @@ static irqreturn_t imx_uart_int(int irq, ret =IRQ_HANDLED ; } -spin_unlock (&sport->port.lock); +spin_unlock_irqrestore (&sport->port.lock, flags);return ret; }
Greg Kroah-Hartman
maintainerPATCH 178/252 counter/ti-eqep: Fix regmap max_register
In reply to Greg Kroah-HartmanFrom: David Lechner <[email protected]>
[ Upstream commit 271b339236e1c0e6448bc1cafeaedcb529324bf0 ]
The values given were the offset of the register after the last register instead of the actual last register in each range. Fix by using the correct last register of each range.
--- drivers/counter/ti-eqep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/counter/ti-eqep.c +2 -2
@@ -368,7 +368,7 @@ static const struct regmap_config ti_eqep_regmap32_config = { .reg_bits = 32, .val_bits = 32, .reg_stride = 4, - .max_register = 0x24, + .max_register = QUPRD, };static const struct regmap_config ti_eqep_regmap16_config = {
@@ -376,7 +376,7 @@ static const struct regmap_config ti_eqep_regmap16_config = { .reg_bits = 16, .val_bits = 16, .reg_stride = 2, - .max_register = 0x1e, + .max_register = QCPRDLAT, };static int ti_eqep_probe (struct platform_device *pdev)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 190/252 ALSA: firewire: Clean up a locking issue in copy_resp_to_buf()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 02a9c6ee4183af2e438454c55098b828a96085fb upstream.
The spin_lock/unlock_irq() functions cannot be nested. The problem is that presumably we would want the IRQs to be re-enabled on the second call the spin_unlock_irq() but instead it will be enabled at the first call so IRQs will be enabled earlier than expected.
In this situation the copy_resp_to_buf() function is only called from one function and it is called with IRQs disabled. We can just use the regular spin_lock/unlock() functions.
--- sound/firewire/fireworks/fireworks_transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/firewire/fireworks/fireworks_transaction.c +2 -2
@@ -123,7 +123,7 @@ copy_resp_to_buf(struct snd_efw *efw, vo t = (struct snd_efw_transaction *)data; length =min_t (size_t,be32_to_cpu (t->length) *sizeof (u32), length); -spin_lock_irq (&efw->lock); +spin_lock (&efw->lock);if (efw->push_ptr < efw->pull_ptr) capacity = (unsigned int )(efw->pull_ptr - efw->push_ptr);
@@ -190,7 +190,7 @@ handle_resp_for_user(struct fw_card *carcopy_resp_to_buf (efw, data, length, rcode); end: -spin_unlock_irq (&instances_lock); +spin_unlock (&instances_lock); } static void
Greg Kroah-Hartman
maintainerPATCH 191/252 ALSA: usb-audio: Add delay quirk for all Logitech USB devices
In reply to Greg Kroah-HartmanFrom: Joakim Tjernlund <[email protected]>
commit 54a2a3898f469a915510038fe84ef4f083131d3e upstream.
Found one more Logitech device, BCC950 ConferenceCam, which needs the same delay here. This makes 3 out of 3 devices I have tried.
Therefore, add a delay for all Logitech devices as it does not hurt.
--- sound/usb/quirks.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
sound/usb/quirks.c +5 -5
@@ -1678,13 +1678,13 @@ void snd_usb_ctl_msg_quirk(struct usb_de && (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)msleep (20 ); -/* Zoom R16/24, Logitech H650e/H570e, Jabra 550a, Kingston HyperX -* needs a tiny delay here, otherwise requests like get/set -* frequency return as failed despite actually succeeding. +/* Zoom R16/24, many Logitech(at least H650e/H570e/BCC950), +* Jabra 550a, Kingston HyperX needs a tiny delay here, +* otherwise requests like get/set frequency return +* as failed despite actually succeeding. */ if ((chip->usb_id ==USB_ID (0x1686 ,0x00dd ) || - chip->usb_id ==USB_ID (0x046d ,0x0a46 ) || - chip->usb_id ==USB_ID (0x046d ,0x0a56 ) || +USB_ID_VENDOR (chip->usb_id) ==0x046d ||/* Logitech */ chip->usb_id ==USB_ID (0x0b0e ,0x0349 ) || chip->usb_id ==USB_ID (0x0951 ,0x16ad )) && (requesttype &USB_TYPE_MASK ) ==USB_TYPE_CLASS )
Greg Kroah-Hartman
maintainerPATCH 193/252 ALSA: mixart: Fix mutex deadlock
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
commit d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 upstream.
The code change for switching to non-atomic mode brought the unexpected mutex deadlock in get_msg(). It converted the spinlock with the existing mutex, but there were calls with the already holding the mutex. Since the only place that needs the extra lock is the code path from snd_mixart_send_msg(), remove the mutex lock in get_msg() and apply in the caller side for fixing the mutex deadlock.
--- sound/pci/mixart/mixart_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
sound/pci/mixart/mixart_core.c +2 -3
@@ -70,7 +70,6 @@ static int get_msg(struct mixart_mgr *mgunsigned int i;#endif -mutex_lock (&mgr->msg_lock); err =0 ;/* copy message descriptor from miXart to driver */
@@ -119,8 +118,6 @@ static int get_msg(struct mixart_mgr *mgwritel_be (headptr,MIXART_MEM (mgr,MSG_OUTBOUND_FREE_HEAD )); _clean_exit: -mutex_unlock (&mgr->msg_lock); -return err; }
@@ -258,7 +255,9 @@ int snd_mixart_send_msg(struct mixart_mg resp.data = resp_data; resp.size = max_resp_size; +mutex_lock (&mgr->msg_lock); err =get_msg (mgr, &resp, msg_frame); +mutex_unlock (&mgr->msg_lock);if ( request->message_id != resp.message_id )dev_err (&mgr->pci->dev,"RESPONSE ERROR!\n" );
Greg Kroah-Hartman
maintainerPATCH 148/252 MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit ac3b57adf87ad9bac7e33ca26bbbb13fae1ed62b ]
If the clk_register fails, we should free h before function returns to prevent memleak.
--- arch/mips/alchemy/common/clock.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/mips/alchemy/common/clock.c +8 -1
@@ -152,6 +152,7 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name, {struct clk_init_data id;struct clk_hw *h; +struct clk *clk; h =kzalloc (sizeof (*h),GFP_KERNEL );if (!h)
@@ -164,7 +165,13 @@ static struct clk __init *alchemy_clk_setup_cpu(const char *parent_name, id.ops = &alchemy_clkops_cpu; h->init = &id; -return clk_register (NULL , h); + clk =clk_register (NULL , h); +if (IS_ERR (clk)) { +pr_err ("failed to register clock\n" ); +kfree (h); + } + +return clk; }/* AUXPLLs ************************************************************/
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 149/252 drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
In reply to Greg Kroah-HartmanFrom: Xiongfeng Wang <[email protected]>
[ Upstream commit 6654b57866b98230a270953dd34f67de17ab1708 ]
Fix to return a negative error code from the error handling case instead of 0 in function sun8i_dw_hdmi_bind().
--- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +1 -0
@@ -208,6 +208,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, phy_node =of_parse_phandle (dev->of_node,"phys" ,0 );if (!phy_node) {dev_err (dev,"Can't found PHY phandle\n" ); + ret = -EINVAL ; goto err_disable_clk_tmds; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 175/252 bpf, sockmap: Use truesize with sk_rmem_schedule()
In reply to Greg Kroah-HartmanFrom: John Fastabend <[email protected]>
[ Upstream commit 70796fb751f1d34cc650e640572a174faf009cd4 ]
We use skb->size with sk_rmem_scheduled() which is not correct. Instead use truesize to align with socket and tcp stack usage of sk_rmem_schedule.
--- net/core/skmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/skmsg.c +1 -1
@@ -411,7 +411,7 @@ static int sk_psock_skb_ingress(struct sk_psock *psock, struct sk_buff *skb) msg =kzalloc (sizeof (*msg), __GFP_NOWARN |GFP_ATOMIC );if (unlikely (!msg))return -EAGAIN ; -if (!sk_rmem_schedule (sk, skb, skb->len)) { +if (!sk_rmem_schedule (sk, skb, skb->truesize)) {kfree (msg);return -EAGAIN ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 187/252 HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit ee5e58418a854755201eb4952b1230d873a457d5 ]
Some quad/bluetooth keyboards, such as the Dinovo Edge (Y-RAY81) have a builtin touchpad. In this case when asking the receiver for paired devices, we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD.
This means that we do not instantiate a second dj_hiddev for the mouse (as we normally would) and thus there is no place for us to forward the mouse input reports to, causing the touchpad part of the keyboard to not work.
There is no way for us to detect these keyboards, so this commit adds an array with device-ids for such keyboards and when a keyboard is on this list it adds STD_MOUSE to the reports_supported bitmap for the dj_hiddev created for the keyboard fixing the touchpad not working.
Using a list of device-ids for this is not ideal, but there are only very few such keyboards so this should be fine. Besides the Dinovo Edge, other known wireless Logitech keyboards with a builtin touchpad are:
* Dinovo Mini (TODO add its device-id to the list)
* K400 (uses a unifying receiver so is not affected)
* K600 (uses a unifying receiver so is not affected)
--- drivers/hid/hid-logitech-dj.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/hid/hid-logitech-dj.c +19 -0
@@ -866,11 +866,23 @@ static void logi_dj_recv_queue_notification(struct dj_receiver_dev *djrcv_dev,schedule_work (&djrcv_dev->work); } +/* +* Some quad/bluetooth keyboards have a builtin touchpad in this case we see +* only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD. For the +* touchpad to work we must also forward mouse input reports to the dj_hiddev +* created for the keyboard (instead of forwarding them to a second paired +* device with a device_type of REPORT_TYPE_MOUSE as we normally would). +*/ +static const u16 kbd_builtin_touchpad_ids[] = { +0xb309 ,/* Dinovo Edge */ +}; +static void logi_hidpp_dev_conn_notif_equad (struct hid_device *hdev,struct hidpp_event *hidpp_report,struct dj_workitem *workitem) {struct dj_receiver_dev *djrcv_dev =hid_get_drvdata (hdev); +int i, id; workitem->type =WORKITEM_TYPE_PAIRED ; workitem->device_type = hidpp_report->params[HIDPP_PARAM_DEVICE_INFO] &
@@ -882,6 +894,13 @@ static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev, workitem->reports_supported |=STD_KEYBOARD |MULTIMEDIA |POWER_KEYS |MEDIA_CENTER |HIDPP ; + id = (workitem->quad_id_msb <<8 ) | workitem->quad_id_lsb; +for (i =0 ; i <ARRAY_SIZE (kbd_builtin_touchpad_ids); i++) { +if (id == kbd_builtin_touchpad_ids[i]) { + workitem->reports_supported |=STD_MOUSE ; +break ; + } + }break ;case REPORT_TYPE_MOUSE : workitem->reports_supported |=STD_MOUSE |HIDPP ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 188/252 HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit b4c00e7976636f33a4f67eab436a11666c8afd60 ]
Some users are pairing the Dinovo keyboards with the MX5000 or MX5500 receivers, instead of with the Dinovo receivers. The receivers are mostly the same (and the air protocol obviously is compatible) but currently the Dinovo receivers are handled by hid-lg.c while the MX5x00 receivers are handled by logitech-dj.c.
When using a Dinovo keyboard, with its builtin touchpad, through logitech-dj.c then the touchpad stops working because when asking the receiver for paired devices, we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD. And since we don't see a paired mouse, we have nowhere to send mouse-events to, so we drop them.
Extend the existing fix for the Dinovo Edge for this to also cover the Dinovo Mini keyboard and also add a mapping to logitech-hidpp for the Media key on the Dinovo Mini, so that that keeps working too.
--- drivers/hid/hid-logitech-dj.c | 1 + drivers/hid/hid-logitech-hidpp.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+)
drivers/hid/hid-logitech-dj.c +1 -0
@@ -875,6 +875,7 @@ static void logi_dj_recv_queue_notification(struct dj_receiver_dev *djrcv_dev,*/ static const u16 kbd_builtin_touchpad_ids[] = {0xb309 ,/* Dinovo Edge */ +0xb30c ,/* Dinovo Mini */ }; static void logi_hidpp_dev_conn_notif_equad(struct hid_device *hdev,
drivers/hid/hid-logitech-hidpp.c +25 -0
@@ -93,6 +93,8 @@ MODULE_PARM_DESC(disable_tap_to_click,#define HIDPP_CAPABILITY_BATTERY_LEVEL_STATUS BIT(3)#define HIDPP_CAPABILITY_BATTERY_VOLTAGE BIT(4) +#define lg_map_key_clear (c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) +/* * There are two hidpp protocols in use, the first version hidpp10 is known * as register access protocol or RAP, the second version hidpp20 is known as
@@ -2950,6 +2952,26 @@ static int g920_get_config(struct hidpp_device *hidpp,return g920_ff_set_autocenter (hidpp, data); } +/* -------------------------------------------------------------------------- */ +/* Logitech Dinovo Mini keyboard with builtin touchpad */ +/* -------------------------------------------------------------------------- */ +#define DINOVO_MINI_PRODUCT_ID 0xb30c + +static int lg_dinovo_input_mapping (struct hid_device *hdev,struct hid_input *hi, +struct hid_field *field,struct hid_usage *usage, +unsigned long **bit,int *max) +{ +if ((usage->hid &HID_USAGE_PAGE ) !=HID_UP_LOGIVENDOR ) +return 0 ; + +switch (usage->hid &HID_USAGE ) { +case 0x00d :lg_map_key_clear (KEY_MEDIA );break ; +default : +return 0 ; + } +return 1 ; +} +/* -------------------------------------------------------------------------- */ /* HID++1.0 devices which use HID++ reports for their wheels */ /* -------------------------------------------------------------------------- */
@@ -3185,6 +3207,9 @@ static int hidpp_input_mapping(struct hid_device *hdev, struct hid_input *hi, field->application != HID_GD_MOUSE)return m560_input_mapping (hdev, hi, field, usage, bit, max); +if (hdev->product ==DINOVO_MINI_PRODUCT_ID ) +return lg_dinovo_input_mapping (hdev, hi, field, usage, bit, max); +return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 189/252 speakup: Do not let the line discipline be used several times
In reply to Greg Kroah-HartmanFrom: Samuel Thibault <[email protected]>
commit d4122754442799187d5d537a9c039a49a67e57f1 upstream.
Speakup has only one speakup_tty variable to store the tty it is managing. This makes sense since its codebase currently assumes that there is only one user who controls the screen reading.
That however means that we have to forbid using the line discipline several times, otherwise the second closure would try to free a NULL ldisc_data, leading to
general protection fault: 0000 [#1] SMP KASAN PTI RIP: 0010:spk_ttyio_ldisc_close+0x2c/0x60 Call Trace: tty_ldisc_release+0xa2/0x340 tty_release_struct+0x17/0xd0 tty_release+0x9d9/0xcc0 __fput+0x231/0x740 task_work_run+0x12c/0x1a0 do_exit+0x9b5/0x2230 ? release_task+0x1240/0x1240 ? __do_page_fault+0x562/0xa30 do_group_exit+0xd5/0x2a0 __x64_sys_exit_group+0x35/0x40 do_syscall_64+0x89/0x2b0 ? page_fault+0x8/0x30 entry_SYSCALL_64_after_hwframe+0x44/0xa9
--- drivers/accessibility/speakup/spk_ttyio.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/accessibility/speakup/spk_ttyio.c +11 -1
@@ -49,15 +49,25 @@ static int spk_ttyio_ldisc_open(struct tif (!tty->ops->write)return -EOPNOTSUPP ; + +mutex_lock (&speakup_tty_mutex); +if (speakup_tty) { +mutex_unlock (&speakup_tty_mutex); +return -EBUSY ; + } speakup_tty = tty; ldisc_data =kmalloc (sizeof (*ldisc_data),GFP_KERNEL ); -if (!ldisc_data) +if (!ldisc_data) { + speakup_tty =NULL ; +mutex_unlock (&speakup_tty_mutex);return -ENOMEM ; + }init_completion (&ldisc_data->completion); ldisc_data->buf_free = true; speakup_tty->disc_data = ldisc_data; +mutex_unlock (&speakup_tty_mutex);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 147/252 selftests/bpf: Fix error return code in run_getsockopt_test()
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 2acc3c1bc8e98bc66b1badec42e9ea205b4fcdaa ]
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- tools/testing/selftests/bpf/prog_tests/sockopt_multi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/sockopt_multi.c +2 -1
@@ -138,7 +138,8 @@ static int run_getsockopt_test(struct bpf_object *obj, int cg_parent,*/ buf =0x40 ; -if (setsockopt (sock_fd,SOL_IP ,IP_TOS , &buf,1 ) <0 ) { + err =setsockopt (sock_fd,SOL_IP ,IP_TOS , &buf,1 ); +if (err <0 ) {log_err ("Failed to call setsockopt(IP_TOS)" ); goto detach; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 174/252 bpf, sockmap: On receive programs try to fast track SK_PASS ingress
In reply to Greg Kroah-HartmanFrom: John Fastabend <[email protected]>
[ Upstream commit 9ecbfb06a078c4911fb444203e8e41d93d22f886 ]
When we receive an skb and the ingress skb verdict program returns SK_PASS we currently set the ingress flag and put it on the workqueue so it can be turned into a sk_msg and put on the sk_msg ingress queue. Then finally telling userspace with data_ready hook.
Here we observe that if the workqueue is empty then we can try to convert into a sk_msg type and call data_ready directly without bouncing through a workqueue. Its a common pattern to have a recv verdict program for visibility that always returns SK_PASS. In this case unless there is an ENOMEM error or we overrun the socket we can avoid the workqueue completely only using it when we fall back to error cases caused by memory pressure.
By doing this we eliminate another case where data may be dropped if errors occur on memory limits in workqueue.
--- net/core/skmsg.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
net/core/skmsg.c +15 -2
@@ -764,6 +764,7 @@ static void sk_psock_verdict_apply(struct sk_psock *psock, {struct tcp_skb_cb *tcp;struct sock *sk_other; +int err = -EIO ;switch (verdict) {case __SK_PASS:
@@ -775,8 +776,20 @@ static void sk_psock_verdict_apply(struct sk_psock *psock, tcp =TCP_SKB_CB (skb); tcp->bpf.flags |=BPF_F_INGRESS ; -skb_queue_tail (&psock->ingress_skb, skb); -schedule_work (&psock->work); + +/* If the queue is empty then we can submit directly +* into the msg queue. If its not empty we have to +* queue work otherwise we may get OOO data. Otherwise, +* if sk_psock_skb_ingress errors will be handled by +* retrying later from workqueue. +*/ +if (skb_queue_empty (&psock->ingress_skb)) { + err =sk_psock_skb_ingress (psock, skb); + } +if (err <0 ) { +skb_queue_tail (&psock->ingress_skb, skb); +schedule_work (&psock->work); + }break ;case __SK_REDIRECT:sk_psock_skb_redirect (skb);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 150/252 net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled
In reply to Greg Kroah-HartmanFrom: Eli Cohen <[email protected]>
[ Upstream commit 5b8631c7b21ca8bc039f0bc030048973b039e0d2 ]
Avoid calling mlx5_esw_modify_vport_rate() if qos is not enabled and avoid unnecessary syndrome messages from firmware.
--- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +4 -0
@@ -1142,6 +1142,10 @@ int mlx5_esw_modify_vport_rate(struct mlx5_eswitch *esw, u16 vport_num,struct mlx5_vport *vport; vport =mlx5_eswitch_get_vport (esw, vport_num); + +if (!vport->qos.enabled) +return -EOPNOTSUPP ; +MLX5_SET (scheduling_context, ctx, max_average_bw, rate_mbps); return mlx5_modify_scheduling_element_cmd(esw->dev,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 146/252 spi: cadence-quadspi: Fix error return code in cqspi_probe
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
[ Upstream commit ac9978fcad3c5abc43cdd225441ce9459c36e16b ]
Fix to return the error code from devm_reset_control_get_optional_exclusive() instaed of 0 in cqspi_probe().
--- drivers/spi/spi-cadence-quadspi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi-cadence-quadspi.c +2 -0
@@ -1263,12 +1263,14 @@ static int cqspi_probe(struct platform_device *pdev)/* Obtain QSPI reset control */ rstc =devm_reset_control_get_optional_exclusive (dev,"qspi" );if (IS_ERR (rstc)) { + ret =PTR_ERR (rstc);dev_err (dev,"Cannot get QSPI reset.\n" ); goto probe_reset_failed; } rstc_ocp =devm_reset_control_get_optional_exclusive (dev,"qspi-ocp" );if (IS_ERR (rstc_ocp)) { + ret =PTR_ERR (rstc_ocp);dev_err (dev,"Cannot get QSPI OCP reset.\n" ); goto probe_reset_failed; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 168/252 lib/strncpy_from_user.c: Mask out bytes after NUL terminator.
In reply to Greg Kroah-HartmanFrom: Daniel Xu <[email protected]>
[ Upstream commit 6fa6d28051e9fcaa1570e69648ea13a353a5d218 ]
do_strncpy_from_user() may copy some extra bytes after the NUL terminator into the destination buffer. This usually does not matter for normal string operations. However, when BPF programs key BPF maps with strings, this matters a lot.
A BPF program may read strings from user memory by calling the bpf_probe_read_user_str() helper which eventually calls do_strncpy_from_user(). The program can then key a map with the destination buffer. BPF map keys are fixed-width and string-agnostic, meaning that map keys are treated as a set of bytes.
The issue is when do_strncpy_from_user() overcopies bytes after the NUL terminator, it can result in seemingly identical strings occupying multiple slots in a BPF map. This behavior is subtle and totally unexpected by the user.
This commit masks out the bytes following the NUL while preserving long-sized stride in the fast path.
--- kernel/trace/bpf_trace.c | 10 ++++++++++ lib/strncpy_from_user.c | 19 +++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-)
kernel/trace/bpf_trace.c +10 -0
@@ -173,6 +173,16 @@ bpf_probe_read_user_str_common(void *dst, u32 size, {int ret; +/* +* NB: We rely on strncpy_from_user() not copying junk past the NUL +* terminator into `dst`. +* +* strncpy_from_user() does long-sized strides in the fast path. If the +* strncpy does not mask out the bytes after the NUL in `unsafe_ptr`, +* then there could be junk after the NUL in `dst`. If user takes `dst` +* and keys a hash map with it, then semantically identical strings can +* occupy multiple entries in the map. +*/ ret =strncpy_from_user_nofault (dst, unsafe_ptr, size);if (unlikely (ret <0 ))memset (dst,0 , size);
lib/strncpy_from_user.c +17 -2
@@ -34,17 +34,32 @@ static inline long do_strncpy_from_user(char *dst, const char __user *src, goto byte_at_a_time;while (max >=sizeof (unsigned long )) { -unsigned long c, data; +unsigned long c, data, mask;/* Fall back to byte-at-a-time if we get a page fault */ unsafe_get_user (c, (unsigned long __user *)(src+res), byte_at_a_time); - *(unsigned long *)(dst+res) = c; +/* +* Note that we mask out the bytes following the NUL. This is +* important to do because string oblivious code may read past +* the NUL. For those routines, we don't want to give them +* potentially random bytes after the NUL in `src`. +* +* One example of such code is BPF map keys. BPF treats map keys +* as an opaque set of bytes. Without the post-NUL mask, any BPF +* maps keyed by strings returned from strncpy_from_user() may +* have multiple entries for semantically identical strings. +*/ if (has_zero (c, &data, &constants)) { data =prep_zero_mask (c, data, &constants); data =create_zero_mask (data); + mask =zero_bytemask (data); + *(unsigned long *)(dst+res) = c & mask;return res +find_zero (data); } + + *(unsigned long *)(dst+res) = c; + res +=sizeof (unsigned long ); max -=sizeof (unsigned long ); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 170/252 xfs: revert "xfs: fix rmap key and record comparison functions"
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit eb8409071a1d47e3593cfe077107ac46853182ab ]
This reverts commit 6ff646b2ceb0eec916101877f38da0b73e3a5b7f.
Your maintainer committed a major braino in the rmap code by adding the attr fork, bmbt, and unwritten extent usage bits into rmap record key comparisons. While XFS uses the usage bits *in the rmap records* for cross-referencing metadata in xfs_scrub and xfs_repair, it only needs the owner and offset information to distinguish between reverse mappings of the same physical extent into the data fork of a file at multiple offsets. The other bits are not important for key comparisons for index lookups, and never have been.
Eric Sandeen reports that this causes regressions in generic/299, so undo this patch before it does more damage.
--- fs/xfs/libxfs/xfs_rmap_btree.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
fs/xfs/libxfs/xfs_rmap_btree.c +8 -8
@@ -243,8 +243,8 @@ xfs_rmapbt_key_diff(else if (y > x)return -1 ; - x =be64_to_cpu (kp->rm_offset); - y =xfs_rmap_irec_offset_pack (rec); + x =XFS_RMAP_OFF (be64_to_cpu (kp->rm_offset)); + y = rec->rm_offset;if (x > y)return 1 ;else if (y > x)
@@ -275,8 +275,8 @@ xfs_rmapbt_diff_two_keys(else if (y > x)return -1 ; - x =be64_to_cpu (kp1->rm_offset); - y =be64_to_cpu (kp2->rm_offset); + x =XFS_RMAP_OFF (be64_to_cpu (kp1->rm_offset)); + y =XFS_RMAP_OFF (be64_to_cpu (kp2->rm_offset));if (x > y)return 1 ;else if (y > x)
@@ -390,8 +390,8 @@ xfs_rmapbt_keys_inorder(return 1 ; else if (a > b) return 0; - a =be64_to_cpu (k1->rmap.rm_offset); - b =be64_to_cpu (k2->rmap.rm_offset); + a =XFS_RMAP_OFF (be64_to_cpu (k1->rmap.rm_offset)); + b =XFS_RMAP_OFF (be64_to_cpu (k2->rmap.rm_offset));if (a <= b)return 1 ;return 0 ;
@@ -420,8 +420,8 @@ xfs_rmapbt_recs_inorder(return 1 ; else if (a > b) return 0; - a =be64_to_cpu (r1->rmap.rm_offset); - b =be64_to_cpu (r2->rmap.rm_offset); + a =XFS_RMAP_OFF (be64_to_cpu (r1->rmap.rm_offset)); + b =XFS_RMAP_OFF (be64_to_cpu (r2->rmap.rm_offset));if (a <= b)return 1 ;return 0 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 166/252 regulator: ti-abb: Fix array out of bound read access on the first transition
In reply to Greg Kroah-HartmanFrom: Nishanth Menon <[email protected]>
[ Upstream commit 2ba546ebe0ce2af47833d8912ced9b4a579f13cb ]
At the start of driver initialization, we do not know what bias setting the bootloader has configured the system for and we only know for certain the very first time we do a transition.
However, since the initial value of the comparison index is -EINVAL, this negative value results in an array out of bound access on the very first transition.
Since we don't know what the setting is, we just set the bias configuration as there is nothing to compare against. This prevents the array out of bound access.
NOTE: Even though we could use a more relaxed check of "< 0" the only valid values(ignoring cosmic ray induced bitflips) are -EINVAL, 0+.
--- drivers/regulator/ti-abb-regulator.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/regulator/ti-abb-regulator.c +11 -1
@@ -342,8 +342,17 @@ static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel)return ret; } -/* If data is exactly the same, then just update index, no change */ info = &abb->info[sel]; +/* +* When Linux kernel is starting up, we are'nt sure of the +* Bias configuration that bootloader has configured. +* So, we get to know the actual setting the first time +* we are asked to transition. +*/ +if (abb->current_info_idx == -EINVAL ) + goto just_set_abb; + +/* If data is exactly the same, then just update index, no change */ oinfo = &abb->info[abb->current_info_idx];if (!memcmp (info, oinfo,sizeof (*info))) { dev_dbg(dev, "%s: Same data new idx=%d, old idx=%d\n", __func__,
@@ -351,6 +360,7 @@ static int ti_abb_set_voltage_sel(struct regulator_dev *rdev, unsigned sel) goto out; } +just_set_abb: ret =ti_abb_set_opp (rdev, abb, info); out:
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 158/252 can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit cd9f13c59461351d7a5fd07924264fb49b287359 ]
If the CAN controller goes into bus off, the do_set_mode() callback with CAN_MODE_START can be used to recover the controller, which then calls flexcan_chip_start(). If configured, this is done automatically by the framework or manually by the user.
In flexcan_chip_start() there is an explicit call to flexcan_transceiver_enable(), which does a regulator_enable() on the transceiver regulator. This results in a net usage counter increase, as there is no corresponding flexcan_transceiver_disable() in the bus off code path. This further leads to the transceiver stuck enabled, even if the CAN interface is shut down.
To fix this problem the flexcan_transceiver_enable()/flexcan_transceiver_disable() are moved out of flexcan_chip_start()/flexcan_chip_stop() into flexcan_open()/flexcan_close().
--- drivers/net/can/flexcan.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/net/can/flexcan.c +9 -9
@@ -1229,14 +1229,10 @@ static int flexcan_chip_start(struct net_device *dev) priv->write (reg_mecr, ®s->mecr); } - err =flexcan_transceiver_enable (priv); -if (err) - goto out_chip_disable; -/* synchronize with the can bus */ err =flexcan_chip_unfreeze (priv);if (err) - goto out_transceiver_disable; + goto out_chip_disable; priv->can.state =CAN_STATE_ERROR_ACTIVE ;
@@ -1254,8 +1250,6 @@ static int flexcan_chip_start(struct net_device *dev)return 0 ; - out_transceiver_disable: -flexcan_transceiver_disable (priv); out_chip_disable:flexcan_chip_disable (priv);return err;
@@ -1285,7 +1279,6 @@ static int __flexcan_chip_stop(struct net_device *dev, bool disable_on_error) priv->write (priv->reg_ctrl_default & ~FLEXCAN_CTRL_ERR_ALL , ®s->ctrl); -flexcan_transceiver_disable (priv); priv->can.state =CAN_STATE_STOPPED ;return 0 ;
@@ -1321,10 +1314,14 @@ static int flexcan_open(struct net_device *dev)if (err) goto out_runtime_put; - err =request_irq (dev->irq, flexcan_irq,IRQF_SHARED , dev->name, dev); + err =flexcan_transceiver_enable (priv);if (err) goto out_close; + err =request_irq (dev->irq, flexcan_irq,IRQF_SHARED , dev->name, dev); +if (err) + goto out_transceiver_disable; + priv->mb_size =sizeof (struct flexcan_mb ) +CAN_MAX_DLEN ; priv->mb_count = (sizeof (priv->regs->mb[0 ]) / priv->mb_size) + (sizeof (priv->regs->mb[1 ]) / priv->mb_size);
@@ -1373,6 +1370,8 @@ static int flexcan_open(struct net_device *dev)can_rx_offload_del (&priv->offload); out_free_irq:free_irq (dev->irq, dev); + out_transceiver_disable: +flexcan_transceiver_disable (priv); out_close:close_candev (dev); out_runtime_put:
@@ -1391,6 +1390,7 @@ static int flexcan_close(struct net_device *dev)can_rx_offload_del (&priv->offload);free_irq (dev->irq, dev); +flexcan_transceiver_disable (priv);close_candev (dev);pm_runtime_put (priv->dev);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 167/252 libbpf: Fix VERSIONED_SYM_COUNT number parsing
In reply to Greg Kroah-HartmanFrom: Jiri Olsa <[email protected]>
[ Upstream commit 1fd6cee127e2ddff36d648573d7566aafb0d0b77 ]
We remove "other info" from "readelf -s --wide" output when parsing GLOBAL_SYM_COUNT variable, which was added in [1]. But we don't do that for VERSIONED_SYM_COUNT and it's failing the check_abi target on powerpc Fedora 33.
The extra "other info" wasn't problem for VERSIONED_SYM_COUNT parsing until commit [2] added awk in the pipe, which assumes that the last column is symbol, but it can be "other info".
Adding "other info" removal for VERSIONED_SYM_COUNT the same way as we did for GLOBAL_SYM_COUNT parsing.
[1] aa915931ac3e ("libbpf: Fix readelf output parsing for Fedora")
[2] 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check")
--- tools/lib/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+)
tools/lib/bpf/Makefile +2 -0
@@ -152,6 +152,7 @@ GLOBAL_SYM_COUNT = $(shell readelf -s --wide $(BPF_IN_SHARED) | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \ sort -u | wc -l) VERSIONED_SYM_COUNT = $(shell readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \ + sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}' | \ grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | sort -u | wc -l)
@@ -220,6 +221,7 @@ check_abi: $(OUTPUT)libbpf.so awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \ sort -u > $(OUTPUT)libbpf_global_syms.tmp; \ readelf --dyn-syms --wide $(OUTPUT)libbpf.so | \ + sed 's/\[.*\]//' | \ awk '/GLOBAL/ && /DEFAULT/ && !/UND/ {print $$NF}'| \ grep -Eo '[^ ]+@LIBBPF_' | cut -d@ -f1 | \ sort -u > $(OUTPUT)libbpf_versioned_syms.tmp; \
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 169/252 fail_function: Remove a redundant mutex unlock
In reply to Greg Kroah-HartmanFrom: Luo Meng <[email protected]>
[ Upstream commit 2801a5da5b25b7af9dd2addd19b2315c02d17b64 ]
Fix a mutex_unlock() issue where before copy_from_user() is not called mutex_locked.
--- kernel/fail_function.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
kernel/fail_function.c +3 -2
@@ -253,7 +253,7 @@ static ssize_t fei_write(struct file *file, const char __user *buffer,if (copy_from_user (buf, buffer, count)) { ret = -EFAULT ; - goto out; + goto out_free; } buf[count] ='\0' ; sym =strstrip (buf);
@@ -307,8 +307,9 @@ static ssize_t fei_write(struct file *file, const char __user *buffer, ret = count; } out: -kfree (buf);mutex_unlock (&fei_lock); +out_free: +kfree (buf);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 163/252 xfs: ensure inobt record walks always make forward progress
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit 27c14b5daa82861220d6fa6e27b51f05f21ffaa7 ]
The aim of the inode btree record iterator function is to call a callback on every record in the btree. To avoid having to tear down and recreate the inode btree cursor around every callback, it caches a certain number of records in a memory buffer. After each batch of callback invocations, we have to perform a btree lookup to find the next record after where we left off.
However, if the keys of the inode btree are corrupt, the lookup might put us in the wrong part of the inode btree, causing the walk function to loop forever. Therefore, we add extra cursor tracking to make sure that we never go backwards neither when performing the lookup nor when jumping to the next inobt record. This also fixes an off by one error where upon resume the lookup should have been for the inode /after/ the point at which we stopped.
Found by fuzzing xfs/460 with keys[2].startino = ones causing bulkstat and quotacheck to hang.
--- fs/xfs/xfs_iwalk.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
fs/xfs/xfs_iwalk.c +24 -3
@@ -55,6 +55,9 @@ struct xfs_iwalk_ag {/* Where do we start the traversal? */ xfs_ino_t startino; +/* What was the last inode number we saw when iterating the inobt? */ +xfs_ino_t lastino; +/* Array of inobt records we cache. */ struct xfs_inobt_rec_incore *recs;
@@ -301,6 +304,9 @@ xfs_iwalk_ag_start(if (XFS_IS_CORRUPT (mp, *has_more !=1 ))return -EFSCORRUPTED ; + iwag->lastino =XFS_AGINO_TO_INO (mp, agno, + irec->ir_startino +XFS_INODES_PER_CHUNK -1 ); +/* * If the LE lookup yielded an inobt record before the cursor position, * skip it and see if there's another one after it.
@@ -347,15 +353,17 @@ xfs_iwalk_run_callbacks(struct xfs_mount *mp = iwag->mp;struct xfs_trans *tp = iwag->tp;struct xfs_inobt_rec_incore *irec; -xfs_agino_t restart; +xfs_agino_t next_agino;int error; + next_agino =XFS_INO_TO_AGINO (mp, iwag->lastino) +1 ; +ASSERT (iwag->nr_recs >0 );/* Delete cursor but remember the last record we cached... */ xfs_iwalk_del_inobt (tp, curpp, agi_bpp,0 ); irec = &iwag->recs[iwag->nr_recs -1 ]; - restart = irec->ir_startino +XFS_INODES_PER_CHUNK -1 ; +ASSERT (next_agino == irec->ir_startino +XFS_INODES_PER_CHUNK ); error =xfs_iwalk_ag_recs (iwag);if (error)
@@ -372,7 +380,7 @@ xfs_iwalk_run_callbacks(if (error)return error; -return xfs_inobt_lookup (*curpp, restart,XFS_LOOKUP_GE , has_more); +return xfs_inobt_lookup (*curpp, next_agino,XFS_LOOKUP_GE , has_more); }/* Walk all inodes in a single AG, from @iwag->startino to the end of the AG. */
@@ -396,6 +404,7 @@ xfs_iwalk_ag(while (!error && has_more) {struct xfs_inobt_rec_incore *irec; +xfs_ino_t rec_fsino;cond_resched ();if (xfs_pwork_want_abort (&iwag->pwork))
@@ -407,6 +416,15 @@ xfs_iwalk_ag(if (error || !has_more)break ; +/* Make sure that we always move forward. */ + rec_fsino =XFS_AGINO_TO_INO (mp, agno, irec->ir_startino); +if (iwag->lastino !=NULLFSINO && +XFS_IS_CORRUPT (mp, iwag->lastino >= rec_fsino)) { + error = -EFSCORRUPTED ; + goto out; + } + iwag->lastino = rec_fsino +XFS_INODES_PER_CHUNK -1 ; +/* No allocated inodes in this chunk; skip it. */ if (iwag->skip_empty && irec->ir_freecount == irec->ir_count) { error =xfs_btree_increment (cur,0 , &has_more);
@@ -535,6 +553,7 @@ xfs_iwalk( .trim_start = 1, .skip_empty = 1, .pwork = XFS_PWORK_SINGLE_THREADED, + .lastino = NULLFSINO, };xfs_agnumber_t agno =XFS_INO_TO_AGNO (mp, startino);int error;
@@ -623,6 +642,7 @@ xfs_iwalk_threaded( iwag->data = data; iwag->startino = startino; iwag->sz_recs =xfs_iwalk_prefetch (inode_records); + iwag->lastino =NULLFSINO ;xfs_pwork_queue (&pctl, &iwag->pwork); startino =XFS_AGINO_TO_INO (mp, agno +1 ,0 );if (flags &XFS_INOBT_WALK_SAME_AG )
@@ -696,6 +716,7 @@ xfs_inobt_walk( .startino = startino, .sz_recs = xfs_inobt_walk_prefetch(inobt_records), .pwork = XFS_PWORK_SINGLE_THREADED, + .lastino = NULLFSINO, };xfs_agnumber_t agno =XFS_INO_TO_AGNO (mp, startino);int error;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 161/252 xfs: strengthen rmap record flags checking
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit 498fe261f0d6d5189f8e11d283705dd97b474b54 ]
We always know the correct state of the rmap record flags (attr, bmbt, unwritten) so check them by direct comparison.
--- fs/xfs/scrub/bmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/xfs/scrub/bmap.c +4 -4
@@ -218,13 +218,13 @@ xchk_bmap_xref_rmap(* which doesn't track unwritten state. */ if (owner !=XFS_RMAP_OWN_COW && - irec->br_state ==XFS_EXT_UNWRITTEN && - !(rmap.rm_flags &XFS_RMAP_UNWRITTEN )) + !!(irec->br_state ==XFS_EXT_UNWRITTEN ) != + !!(rmap.rm_flags &XFS_RMAP_UNWRITTEN ))xchk_fblock_xref_set_corrupt (info->sc, info->whichfork, irec->br_startoff); -if (info->whichfork ==XFS_ATTR_FORK && - !(rmap.rm_flags &XFS_RMAP_ATTR_FORK )) +if (!!(info->whichfork ==XFS_ATTR_FORK ) != + !!(rmap.rm_flags &XFS_RMAP_ATTR_FORK ))xchk_fblock_xref_set_corrupt (info->sc, info->whichfork, irec->br_startoff);if (rmap.rm_flags &XFS_RMAP_BMBT_BLOCK )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 145/252 ASoC: qcom: lpass-platform: Fix memory leak
In reply to Greg Kroah-HartmanFrom: Srinivasa Rao Mandadapu <[email protected]>
[ Upstream commit bd6327fda2f3ded85b69b3c3125c99aaa51c7881 ]
lpass_pcm_data is not freed in error paths. Free it in error paths to avoid memory leak.
--- sound/soc/qcom/lpass-platform.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/qcom/lpass-platform.c +4 -1
@@ -73,8 +73,10 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component,else dma_ch =0 ; -if (dma_ch <0 ) +if (dma_ch <0 ) { +kfree (data);return dma_ch; + } drvdata->substream[dma_ch] = substream;
@@ -95,6 +97,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component, ret =snd_pcm_hw_constraint_integer (runtime,SNDRV_PCM_HW_PARAM_PERIODS );if (ret <0 ) { +kfree (data);dev_err (soc_runtime->dev,"setting constraints failed: %d\n" , ret);return -EINVAL ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 157/252 iommu/vt-d: Avoid panic if iommu init fails in tboot system
In reply to Greg Kroah-HartmanFrom: Zhenzhong Duan <[email protected]>
[ Upstream commit 4d213e76a359e540ca786ee937da7f35faa8e5f8 ]
"intel_iommu=off" command line is used to disable iommu but iommu is force enabled in a tboot system for security reason.
However for better performance on high speed network device, a new option "intel_iommu=tboot_noforce" is introduced to disable the force on.
By default kernel should panic if iommu init fail in tboot for security reason, but it's unnecessory if we use "intel_iommu=tboot_noforce,off".
Fix the code setting force_on and move intel_iommu_tboot_noforce from tboot code to intel iommu code.
--- arch/x86/kernel/tboot.c | 3 --- drivers/iommu/intel/iommu.c | 5 +++-- include/linux/intel-iommu.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-)
arch/x86/kernel/tboot.c +0 -3
@@ -514,9 +514,6 @@ int tboot_force_iommu(void)if (!tboot_enabled ())return 0 ; -if (intel_iommu_tboot_noforce) -return 1 ; -if (no_iommu || swiotlb || dmar_disabled)pr_warn ("Forcing Intel-IOMMU to enabled\n" );
drivers/iommu/intel/iommu.c +3 -2
@@ -179,7 +179,7 @@ static int rwbf_quirk;* (used when kernel is launched w/ TXT) */ static int force_on =0 ; -int intel_iommu_tboot_noforce; +static int intel_iommu_tboot_noforce;static int no_platform_optin;#define ROOT_ENTRY_NR (VTD_PAGE_SIZE/sizeof(struct root_entry))
@@ -4846,7 +4846,8 @@ int __init intel_iommu_init(void)* Intel IOMMU is required for a TXT/tboot launch or platform * opt in, so enforce that. */ - force_on =tboot_force_iommu () ||platform_optin_force_iommu (); + force_on = (!intel_iommu_tboot_noforce &&tboot_force_iommu ()) || +platform_optin_force_iommu ();if (iommu_init_mempool ()) {if (force_on)
include/linux/intel-iommu.h +0 -1
@@ -791,7 +791,6 @@ extern int iommu_calculate_agaw(struct intel_iommu *iommu);extern int iommu_calculate_max_sagaw (struct intel_iommu *iommu);extern int dmar_disabled;extern int intel_iommu_enabled; -extern int intel_iommu_tboot_noforce;extern int intel_iommu_gfx_mapped;#else static inline int iommu_calculate_agaw (struct intel_iommu *iommu)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 156/252 iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit c7eb900f5f45eeab1ea1bed997a2a12d8b5907bc ]
Static analyzer is not happy about intel_iommu_gfx_mapped declaration:
.../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
Move its declaration to Intel IOMMU header file.
--- include/drm/intel-gtt.h | 5 +---- include/linux/intel-iommu.h | 1 + 2 files changed, 2 insertions(+), 4 deletions(-)
include/drm/intel-gtt.h +1 -4
@@ -5,6 +5,7 @@#define _DRM_INTEL_GTT_H#include <linux/agp_backend.h> +#include <linux/intel-iommu.h> #include <linux/kernel.h> void intel_gtt_get(u64 *gtt_total,
@@ -33,8 +34,4 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);/* flag for GFDT type */ #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) -#ifdef CONFIG_INTEL_IOMMU -extern int intel_iommu_gfx_mapped; -#endif -#endif
include/linux/intel-iommu.h +1 -0
@@ -792,6 +792,7 @@ extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);extern int dmar_disabled;extern int intel_iommu_enabled;extern int intel_iommu_tboot_noforce; +extern int intel_iommu_gfx_mapped;#else static inline int iommu_calculate_agaw (struct intel_iommu *iommu) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 162/252 xfs: directory scrub should check the null bestfree entries too
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit 6b48e5b8a20f653b7d64ccf99a498f2523bff752 ]
Teach the directory scrubber to check all the bestfree entries, including the null ones. We want to be able to detect the case where the entry is null but there actually /is/ a directory data block.
Found by fuzzing lbests[0] = ones in xfs/391.
--- fs/xfs/scrub/dir.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-)
fs/xfs/scrub/dir.c +17 -4
@@ -558,14 +558,27 @@ xchk_directory_leaf1_bestfree(/* Check all the bestfree entries. */ for (i =0 ; i < bestcount; i++, bestp++) { best =be16_to_cpu (*bestp); -if (best ==NULLDATAOFF ) -continue ; error =xfs_dir3_data_read (sc->tp, sc->ip, - i * args->geo->fsbcount,0 , &dbp); +xfs_dir2_db_to_da (args->geo, i), +XFS_DABUF_MAP_HOLE_OK , + &dbp);if (!xchk_fblock_process_error (sc,XFS_DATA_FORK , lblk, &error))break ; -xchk_directory_check_freesp (sc, lblk, dbp, best); + +if (!dbp) { +if (best !=NULLDATAOFF ) { +xchk_fblock_set_corrupt (sc,XFS_DATA_FORK , + lblk); +break ; + } +continue ; + } + +if (best ==NULLDATAOFF ) +xchk_fblock_set_corrupt (sc,XFS_DATA_FORK , lblk); +else +xchk_directory_check_freesp (sc, lblk, dbp, best);xfs_trans_brelse (sc->tp, dbp);if (sc->sm->sm_flags &XFS_SCRUB_OFLAG_CORRUPT )break ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 160/252 xfs: fix the minrecs logic when dealing with inode root child blocks
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit e95b6c3ef1311dd7b20467d932a24b6d0fd88395 ]
The comment and logic in xchk_btree_check_minrecs for dealing with inode-rooted btrees isn't quite correct. While the direct children of the inode root are allowed to have fewer records than what would normally be allowed for a regular ondisk btree block, this is only true if there is only one child block and the number of records don't fit in the inode root.
--- fs/xfs/scrub/btree.c | 45 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-)
fs/xfs/scrub/btree.c +27 -18
@@ -452,32 +452,41 @@ xchk_btree_check_minrecs(int level, struct xfs_btree_block *block) { - unsigned int numrecs; -int ok_level; - - numrecs =be16_to_cpu (block->bb_numrecs); + struct xfs_btree_cur *cur = bs->cur; +unsigned int root_level = cur->bc_nlevels -1 ; +unsigned int numrecs =be16_to_cpu (block->bb_numrecs);/* More records than minrecs means the block is ok. */ -if (numrecs >= bs->cur->bc_ops->get_minrecs (bs->cur, level)) +if (numrecs >= cur->bc_ops->get_minrecs (cur, level))return ;/* -* Certain btree blocks /can/ have fewer than minrecs records. Any -* level greater than or equal to the level of the highest dedicated -* btree block are allowed to violate this constraint. -* -* For a btree rooted in a block, the btree root can have fewer than -* minrecs records. If the btree is rooted in an inode and does not -* store records in the root, the direct children of the root and the -* root itself can have fewer than minrecs records. +* For btrees rooted in the inode, it's possible that the root block +* contents spilled into a regular ondisk block because there wasn't +* enough space in the inode root. The number of records in that +* child block might be less than the standard minrecs, but that's ok +* provided that there's only one direct child of the root. */ - ok_level = bs->cur->bc_nlevels -1 ; -if (bs->cur->bc_flags &XFS_BTREE_ROOT_IN_INODE ) - ok_level--; -if (level >= ok_level) +if ((cur->bc_flags &XFS_BTREE_ROOT_IN_INODE ) && + level == cur->bc_nlevels -2 ) { +struct xfs_btree_block *root_block; +struct xfs_buf *root_bp; +int root_maxrecs; + + root_block =xfs_btree_get_block (cur, root_level, &root_bp); + root_maxrecs = cur->bc_ops->get_dmaxrecs (cur, root_level); +if (be16_to_cpu (root_block->bb_numrecs) !=1 || + numrecs <= root_maxrecs) +xchk_btree_set_corrupt (bs->sc, cur, level);return ; + } -xchk_btree_set_corrupt (bs->sc, bs->cur, level); +/* +* Otherwise, only the root level is allowed to have fewer than minrecs +* records or keyptrs. +*/ +if (level < root_level) +xchk_btree_set_corrupt (bs->sc, cur, level); }/*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 119/252 rfkill: Fix use-after-free in rfkill_resume()
In reply to Greg Kroah-HartmanFrom: Claire Chang <[email protected]>
[ Upstream commit 94e2bd0b259ed39a755fdded47e6734acf1ce464 ]
If a device is getting removed or reprobed during resume, use-after-free might happen. For example, h5_btrtl_resume() schedules a work queue for device reprobing, which of course requires removal first.
If the removal happens in parallel with the device_resume() and wins the race to acquire device_lock(), removal may remove the device from the PM lists and all, but device_resume() is already running and will continue when the lock can be acquired, thus calling rfkill_resume().
During this, if rfkill_set_block() is then called after the corresponding *_unregister() and kfree() are called, there will be an use-after-free in hci_rfkill_set_block():
BUG: KASAN: use-after-free in hci_rfkill_set_block+0x58/0xc0 [bluetooth] ... Call trace: dump_backtrace+0x0/0x154 show_stack+0x20/0x2c dump_stack+0xbc/0x12c print_address_description+0x88/0x4b0 __kasan_report+0x144/0x168 kasan_report+0x10/0x18 check_memory_region+0x19c/0x1ac __kasan_check_write+0x18/0x24 hci_rfkill_set_block+0x58/0xc0 [bluetooth] rfkill_set_block+0x9c/0x120 rfkill_resume+0x34/0x70 dpm_run_callback+0xf0/0x1f4 device_resume+0x210/0x22c
Fix this by checking rfkill->registered in rfkill_resume(). device_del() in rfkill_unregister() requires device_lock() and the whole rfkill_resume() is also protected by the same lock via device_resume(), we can make sure either the rfkill->registered is false before rfkill_resume() starts or the rfkill device won't be unregistered before rfkill_resume() returns.
As async_resume() holds a reference to the device, at this level there can be no use-after-free; only in the user that doesn't expect this scenario.
--- net/rfkill/core.c | 3 +++ 1 file changed, 3 insertions(+)
net/rfkill/core.c +3 -0
@@ -876,6 +876,9 @@ static int rfkill_resume(struct device *dev) rfkill->suspended = false; +if (!rfkill->registered) +return 0 ; +if (!rfkill->persistent) { cur = !!(rfkill->state &RFKILL_BLOCK_SW );rfkill_set_block (rfkill, cur);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 144/252 ASoC: Intel: KMB: Fix S24_LE configuration
In reply to Greg Kroah-HartmanFrom: Michael Sit Wei Hong <[email protected]>
[ Upstream commit 1bd7b0fc0165694897b7d2fb39751a07b98f6bf1 ]
S24_LE is 24 bit audio in 32 bit container configuration Fixing the configuration to match the data arrangement of this audio format.
--- sound/soc/intel/keembay/kmb_platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/keembay/kmb_platform.c +3 -3
@@ -455,9 +455,9 @@ static int kmb_dai_hw_params(struct snd_pcm_substream *substream, kmb_i2s->xfer_resolution =0x02 ;break ;case SNDRV_PCM_FORMAT_S24_LE : - config->data_width =24 ; - kmb_i2s->ccr =0x08 ; - kmb_i2s->xfer_resolution =0x04 ; + config->data_width =32 ; + kmb_i2s->ccr =0x14 ; + kmb_i2s->xfer_resolution =0x05 ;break ;case SNDRV_PCM_FORMAT_S32_LE : config->data_width =32 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 153/252 can: kvaser_pciefd: Fix KCAN bittiming limits
In reply to Greg Kroah-HartmanFrom: Jimmy Assarsson <[email protected]>
[ Upstream commit 470e14c00c63752466ac44de392f584dfdddd82e ]
Use correct bittiming limits for the KCAN CAN controller.
--- drivers/net/can/kvaser_pciefd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/kvaser_pciefd.c +2 -2
@@ -287,12 +287,12 @@ struct kvaser_pciefd_tx_packet {static const struct can_bittiming_const kvaser_pciefd_bittiming_const = { .name =KVASER_PCIEFD_DRV_NAME , .tseg1_min =1 , - .tseg1_max =255 , + .tseg1_max =512 , .tseg2_min =1 , .tseg2_max =32 , .sjw_max =16 , .brp_min =1 , - .brp_max =4096 , + .brp_max =8192 , .brp_inc =1 , };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 118/252 Input: elan_i2c - fix firmware update on newer ICs
In reply to Greg Kroah-HartmanFrom: jingle.wu <[email protected]>
[ Upstream commit ae3d6083acf60116d4f409677452399547ed2009 ]
The argument to iap page type command depends on the firmware page size.
--- drivers/input/mouse/elan_i2c.h | 2 +- drivers/input/mouse/elan_i2c_core.c | 3 ++- drivers/input/mouse/elan_i2c_i2c.c | 10 +++++----- drivers/input/mouse/elan_i2c_smbus.c | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-)
drivers/input/mouse/elan_i2c.h +1 -1
@@ -78,7 +78,7 @@ struct elan_transport_ops {int (*iap_reset)(struct i2c_client *client);int (*prepare_fw_update)(struct i2c_client *client,u16 ic_type, -u8 iap_version); +u8 iap_version,u16 fw_page_size);int (*write_fw_block)(struct i2c_client *client,u16 fw_page_size,const u8 *page,u16 checksum,int idx); int (*finish_fw_update)(struct i2c_client *client,
drivers/input/mouse/elan_i2c_core.c +2 -1
@@ -497,7 +497,8 @@ static int __elan_update_firmware(struct elan_tp_data *data,u16 sw_checksum =0 , fw_checksum =0 ; error = data->ops->prepare_fw_update (client, data->ic_type, - data->iap_version); + data->iap_version, + data->fw_page_size);if (error)return error;
drivers/input/mouse/elan_i2c_i2c.c +5 -5
@@ -517,7 +517,7 @@ static int elan_i2c_set_flash_key(struct i2c_client *client)return 0 ; } -static int elan_read_write_iap_type (struct i2c_client *client) +static int elan_read_write_iap_type (struct i2c_client *client,u16 fw_page_size) {int error;u16 constant;
@@ -526,7 +526,7 @@ static int elan_read_write_iap_type(struct i2c_client *client) do { error = elan_i2c_write_cmd(client, ETP_I2C_IAP_TYPE_CMD, - ETP_I2C_IAP_TYPE_REG); + fw_page_size / 2); if (error) { dev_err(&client->dev, "cannot write iap type: %d\n", error);
@@ -543,7 +543,7 @@ static int elan_read_write_iap_type(struct i2c_client *client) constant =le16_to_cpup ((__le16 *)val);dev_dbg (&client->dev,"iap type reg: 0x%04x\n" , constant); -if (constant ==ETP_I2C_IAP_TYPE_REG ) +if (constant == fw_page_size /2 )return 0 ; }while (--retry >0 );
@@ -553,7 +553,7 @@ static int elan_read_write_iap_type(struct i2c_client *client) }static int elan_i2c_prepare_fw_update (struct i2c_client *client,u16 ic_type, -u8 iap_version) +u8 iap_version,u16 fw_page_size) {struct device *dev = &client->dev;int error;
@@ -594,7 +594,7 @@ static int elan_i2c_prepare_fw_update(struct i2c_client *client, u16 ic_type, }if (ic_type >=0x0D && iap_version >=1 ) { - error =elan_read_write_iap_type (client); + error =elan_read_write_iap_type (client, fw_page_size);if (error)return error; }
drivers/input/mouse/elan_i2c_smbus.c +1 -1
@@ -340,7 +340,7 @@ static int elan_smbus_set_flash_key(struct i2c_client *client) }static int elan_smbus_prepare_fw_update (struct i2c_client *client,u16 ic_type, -u8 iap_version) +u8 iap_version,u16 fw_page_size) {struct device *dev = &client->dev;int len;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 138/252 can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit c81d0b6ca665477c761f227807010762630b089f ]
Change the order in tcan4x5x_can_remove() to be the exact inverse of tcan4x5x_can_probe(). First m_can_class_unregister(), then power down the device.
--- drivers/net/can/m_can/tcan4x5x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/m_can/tcan4x5x.c +2 -2
@@ -527,10 +527,10 @@ static int tcan4x5x_can_remove(struct spi_device *spi) {struct tcan4x5x_priv *priv =spi_get_drvdata (spi); -tcan4x5x_power_enable (priv->power,0 ); -m_can_class_unregister (priv->mcan_dev); +tcan4x5x_power_enable (priv->power,0 ); +return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 136/252 can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI
In reply to Greg Kroah-HartmanFrom: Enric Balletbo i Serra <[email protected]>
[ Upstream commit 3fcce133f0d9a50d3a23f8e2bc950197b4e03900 ]
regmap is a library function that gets selected by drivers that need it. No driver modules should depend on it. Instead depends on SPI and select REGMAP_SPI. Depending on REGMAP_SPI makes this driver only build if another driver already selected REGMAP_SPI, as the symbol can't be selected through the menu kernel configuration.
--- drivers/net/can/m_can/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/can/m_can/Kconfig +2 -1
@@ -16,7 +16,8 @@ config CAN_M_CAN_PLATFORM config CAN_M_CAN_TCAN4X5X depends on CAN_M_CAN - depends on REGMAP_SPI + depends on SPI + select REGMAP_SPI tristate "TCAN4X5X M_CAN device" help Say Y here if you want support for Texas Instruments TCAN4x5x
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 137/252 can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init()
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit 1ff203badbbf1738027c8395d5b40b0d462b6e4d ]
This patch adds the missing error checking when initializing the regmap interface fails.
--- drivers/net/can/m_can/tcan4x5x.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/can/m_can/tcan4x5x.c +4 -0
@@ -487,6 +487,10 @@ static int tcan4x5x_can_probe(struct spi_device *spi) priv->regmap =devm_regmap_init (&spi->dev, &tcan4x5x_bus, &spi->dev, &tcan4x5x_regmap); +if (IS_ERR (priv->regmap)) { + ret =PTR_ERR (priv->regmap); + goto out_clk; + } ret =tcan4x5x_power_enable (priv->power,1 );if (ret)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 133/252 can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit 81c9c8e0adef3285336b942f93287c554c89e6c6 ]
The driver has to first fill the skb with data and then handle it to can_put_echo_skb(). This patch moves the can_put_echo_skb() down, right before sending the skb out via USB.
--- drivers/net/can/usb/mcba_usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/can/usb/mcba_usb.c +2 -2
@@ -326,8 +326,6 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,if (!ctx)return NETDEV_TX_BUSY ; -can_put_echo_skb (skb, priv->netdev, ctx->ndx); -if (cf->can_id &CAN_EFF_FLAG ) {/* SIDH | SIDL | EIDH | EIDL * 28 - 21 | 20 19 18 x x x 17 16 | 15 - 8 | 7 - 0
@@ -357,6 +355,8 @@ static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,if (cf->can_id &CAN_RTR_FLAG ) usb_msg.dlc |=MCBA_DLC_RTR_MASK ; +can_put_echo_skb (skb, priv->netdev, ctx->ndx); + err =mcba_usb_xmit (priv, (struct mcba_usb_msg *)&usb_msg, ctx);if (err) goto xmit_failed;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 135/252 can: flexcan: fix failure handling of pm_runtime_get_sync()
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit b7ee5bc3e1006433601a058a6a7c24c5272635f4 ]
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference leak in the two functions flexcan_get_berr_counter() and flexcan_open().
Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we should fix it through adding pm_runtime_put_noidle().
--- drivers/net/can/flexcan.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/can/flexcan.c +6 -2
@@ -614,8 +614,10 @@ static int flexcan_get_berr_counter(const struct net_device *dev,int err; err =pm_runtime_get_sync (priv->dev); -if (err <0 ) +if (err <0 ) { +pm_runtime_put_noidle (priv->dev);return err; + } err =__flexcan_get_berr_counter (dev, bec);
@@ -1310,8 +1312,10 @@ static int flexcan_open(struct net_device *dev)int err; err =pm_runtime_get_sync (priv->dev); -if (err <0 ) +if (err <0 ) { +pm_runtime_put_noidle (priv->dev);return err; + } err =open_candev (dev);if (err)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 130/252 can: af_can: prevent potential access of uninitialized member in canfd_rcv()
In reply to Greg Kroah-HartmanFrom: Anant Thazhemadam <[email protected]>
[ Upstream commit 9aa9379d8f868e91719333a7f063ccccc0579acc ]
In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once().
Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's condition is checked, and appropriately modify the log messages that are generated as well.
In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before.
--- net/can/af_can.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
net/can/af_can.c +14 -5
@@ -703,16 +703,25 @@ static int canfd_rcv(struct sk_buff *skb, struct net_device *dev, {struct canfd_frame *cfd = (struct canfd_frame *)skb->data; -if (unlikely (dev->type !=ARPHRD_CAN || skb->len !=CANFD_MTU || - cfd->len >CANFD_MAX_DLEN )) { -pr_warn_once ("PF_CAN: dropped non conform CAN FD skbuf: dev type %d, len %d, datalen %d\n" , +if (unlikely (dev->type !=ARPHRD_CAN || skb->len !=CANFD_MTU )) { +pr_warn_once ("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d\n" , + dev->type, skb->len); + goto free_skb; + } + +/* This check is made separately since cfd->len would be uninitialized if skb->len = 0. */ +if (unlikely (cfd->len >CANFD_MAX_DLEN )) { +pr_warn_once ("PF_CAN: dropped non conform CAN FD skbuff: dev type %d, len %d, datalen %d\n" , dev->type, skb->len, cfd->len); -kfree_skb (skb); -return NET_RX_DROP ; + goto free_skb; }can_receive (skb, dev);return NET_RX_SUCCESS ; + +free_skb: +kfree_skb (skb); +return NET_RX_DROP ; }/* af_can protocol functions */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 85/252 ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit e080ab31a0aa126b0a7e4f67f2b01b371b852c88 ]
The Ethernet PHY on the Orange Pi Plus 2E has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config").
--- arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts +1 -1
@@ -67,7 +67,7 @@ pinctrl-0 = <&emac_rgmii_pins>; phy-supply = <®_gmac_3v3>; phy-handle = <&ext_rgmii_phy>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 82/252 ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit e76724153f5b4539802cc21b2c6131058668a1c6 ]
The Ethernet PHY on the A31 Hummingbird has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config").
--- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun6i-a31-hummingbird.dts +1 -1
@@ -154,7 +154,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 83/252 ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit 353c3de1303fc93032164402c0eb8550ecd6f154 ]
The Ethernet PHY on the Cubietruck has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config").
--- arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun7i-a20-cubietruck.dts +1 -1
@@ -151,7 +151,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 129/252 can: af_can: prevent potential access of uninitialized member in can_rcv()
In reply to Greg Kroah-HartmanFrom: Anant Thazhemadam <[email protected]>
[ Upstream commit c8c958a58fc67f353289986850a0edf553435702 ]
In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once().
Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's condition is checked, and appropriately modify the log messages that are generated as well.
In case either of the required conditions fail, the skb is freed and NET_RX_DROP is returned, same as before.
--- net/can/af_can.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
net/can/af_can.c +14 -5
@@ -677,16 +677,25 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev, {struct canfd_frame *cfd = (struct canfd_frame *)skb->data; -if (unlikely (dev->type !=ARPHRD_CAN || skb->len !=CAN_MTU || - cfd->len >CAN_MAX_DLEN )) { -pr_warn_once ("PF_CAN: dropped non conform CAN skbuf: dev type %d, len %d, datalen %d\n" , +if (unlikely (dev->type !=ARPHRD_CAN || skb->len !=CAN_MTU )) { +pr_warn_once ("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d\n" , + dev->type, skb->len); + goto free_skb; + } + +/* This check is made separately since cfd->len would be uninitialized if skb->len = 0. */ +if (unlikely (cfd->len >CAN_MAX_DLEN )) { +pr_warn_once ("PF_CAN: dropped non conform CAN skbuff: dev type %d, len %d, datalen %d\n" , dev->type, skb->len, cfd->len); -kfree_skb (skb); -return NET_RX_DROP ; + goto free_skb; }can_receive (skb, dev);return NET_RX_SUCCESS ; + +free_skb: +kfree_skb (skb); +return NET_RX_DROP ; } static int canfd_rcv(struct sk_buff *skb, struct net_device *dev,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 112/252 ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit 33d0d843872c5ddbe28457a92fc6f2487315fb9f ]
The SPI chip selects are represented as:
cs-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>, <&gpio4 13 GPIO_ACTIVE_LOW>;
, which means that they are used in GPIO function instead of native SPI mode.
Fix the IOMUX for the chip select 1 to use GPIO4_13 instead of the native CSPI_SSI function.
--- arch/arm/boot/dts/imx50-evk.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx50-evk.dts +1 -1
@@ -59,7 +59,7 @@ MX50_PAD_CSPI_MISO__CSPI_MISO 0x00 MX50_PAD_CSPI_MOSI__CSPI_MOSI 0x00 MX50_PAD_CSPI_SS0__GPIO4_11 0xc4 - MX50_PAD_ECSPI1_MOSI__CSPI_SS1 0xf4 + MX50_PAD_ECSPI1_MOSI__GPIO4_13 0x84 >; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 80/252 ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node
In reply to Greg Kroah-HartmanFrom: Jernej Skrabec <[email protected]>
[ Upstream commit b3eec3212e66ece33f69be0de98d54e67834e798 ]
Ethernet PHY on BananaPi M2 Ultra provides RX and TX delays. Fix ethernet node to reflect that fact.
--- arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts +1 -1
@@ -129,7 +129,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-supply = <®_dc1sw>; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 102/252 tee: amdtee: fix memory leak due to reset of global shm list
In reply to Greg Kroah-HartmanFrom: Rijo Thomas <[email protected]>
[ Upstream commit ff1f855804cdbbb6db7b9b6df6cab783d1a40d66 ]
The driver maintains a list of shared memory buffers along with their mapped buffer id's in a global linked list. These buffers need to be unmapped after use by the user-space client.
The global shared memory list is initialized to zero entries in the function amdtee_open(). This clearing of list entries can be a source for memory leak on secure side if the global linked list previously held some mapped buffer entries allocated from another TEE context.
Fix potential memory leak issue by moving global shared memory list to AMD-TEE driver context data structure.
--- drivers/tee/amdtee/amdtee_private.h | 7 +++---- drivers/tee/amdtee/core.c | 18 +++++++++++------- 2 files changed, 14 insertions(+), 11 deletions(-)
drivers/tee/amdtee/amdtee_private.h +3 -4
@@ -64,9 +64,12 @@ struct amdtee_session {/** * struct amdtee_context_data - AMD-TEE driver context data * @sess_list: Keeps track of sessions opened in current TEE context +* @shm_list: Keeps track of buffers allocated and mapped in current TEE +* context */ struct amdtee_context_data {struct list_head sess_list; +struct list_head shm_list; };struct amdtee_driver_data {
@@ -89,10 +92,6 @@ struct amdtee_shm_data {u32 buf_id; }; -struct amdtee_shm_context { -struct list_head shmdata_list; -}; -#define LOWER_TWO_BYTE_MASK 0x0000FFFF/**
drivers/tee/amdtee/core.c +11 -7
@@ -20,7 +20,6 @@static struct amdtee_driver_data *drv_data;static DEFINE_MUTEX (session_list_mutex); -static struct amdtee_shm_context shmctx;static void amdtee_get_version (struct tee_device *teedev,struct tee_ioctl_version_data *vers)
@@ -42,7 +41,7 @@ static int amdtee_open(struct tee_context *ctx)return -ENOMEM ;INIT_LIST_HEAD (&ctxdata->sess_list); -INIT_LIST_HEAD (&shmctx.shmdata_list); +INIT_LIST_HEAD (&ctxdata->shm_list); ctx->data = ctxdata;return 0 ;
@@ -152,10 +151,11 @@ static struct amdtee_session *find_session(struct amdtee_context_data *ctxdata,u32 get_buffer_id (struct tee_shm *shm) { -u32 buf_id =0 ; +struct amdtee_context_data *ctxdata = shm->ctx->data;struct amdtee_shm_data *shmdata; +u32 buf_id =0 ; -list_for_each_entry (shmdata, &shmctx.shmdata_list, shm_node) +list_for_each_entry (shmdata, &ctxdata->shm_list, shm_node)if (shmdata->kaddr == shm->kaddr) { buf_id = shmdata->buf_id;break ;
@@ -333,8 +333,9 @@ int amdtee_close_session(struct tee_context *ctx, u32 session)int amdtee_map_shmem (struct tee_shm *shm) { -struct shmem_desc shmem; +struct amdtee_context_data *ctxdata;struct amdtee_shm_data *shmnode; +struct shmem_desc shmem;int rc, count;u32 buf_id;
@@ -362,7 +363,8 @@ int amdtee_map_shmem(struct tee_shm *shm) shmnode->kaddr = shm->kaddr; shmnode->buf_id = buf_id; -list_add (&shmnode->shm_node, &shmctx.shmdata_list); + ctxdata = shm->ctx->data; +list_add (&shmnode->shm_node, &ctxdata->shm_list);pr_debug ("buf_id :[%x] kaddr[%p]\n" , shmnode->buf_id, shmnode->kaddr);
@@ -371,6 +373,7 @@ int amdtee_map_shmem(struct tee_shm *shm)void amdtee_unmap_shmem (struct tee_shm *shm) { +struct amdtee_context_data *ctxdata;struct amdtee_shm_data *shmnode;u32 buf_id;
@@ -381,7 +384,8 @@ void amdtee_unmap_shmem(struct tee_shm *shm)/* Unmap the shared memory from TEE */ handle_unmap_shmem (buf_id); -list_for_each_entry (shmnode, &shmctx.shmdata_list, shm_node) + ctxdata = shm->ctx->data; +list_for_each_entry (shmnode, &ctxdata->shm_list, shm_node)if (buf_id == shmnode->buf_id) {list_del (&shmnode->shm_node);kfree (shmnode);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 124/252 SUNRPC: Fix oops in the rpc_xdr_buf event class
In reply to Greg Kroah-HartmanFrom: Scott Mayhew <[email protected]>
[ Upstream commit c3213d260a23e263ef85ba21ac68c9e7578020b5 ]
Backchannel rpc tasks don't have task->tk_client set, so it's necessary to check it for NULL before dereferencing.
--- include/trace/events/sunrpc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/trace/events/sunrpc.h +2 -1
@@ -68,7 +68,8 @@ DECLARE_EVENT_CLASS(rpc_xdr_buf_class,TP_fast_assign ( __entry->task_id = task->tk_pid; - __entry->client_id = task->tk_client->cl_clid; + __entry->client_id = task->tk_client ? + task->tk_client->cl_clid :-1 ; __entry->head_base = xdr->head[0 ].iov_base; __entry->head_len = xdr->head[0 ].iov_len; __entry->tail_base = xdr->tail[0 ].iov_base;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 128/252 ip_tunnels: Set tunnel option flag when tunnel metadata is present
In reply to Greg Kroah-HartmanFrom: Yi-Hung Wei <[email protected]>
[ Upstream commit 9c2e14b48119b39446031d29d994044ae958d8fc ]
Currently, we may set the tunnel option flag when the size of metadata is zero. For example, we set TUNNEL_GENEVE_OPT in the receive function no matter the geneve option is present or not. As this may result in issues on the tunnel flags consumers, this patch fixes the issue.
Related discussion:
* https://lore.kernel.org/netdev/[email protected]/T/#u
--- drivers/net/geneve.c | 3 +-- include/net/ip_tunnels.h | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/net/geneve.c +1 -2
@@ -225,8 +225,7 @@ static void geneve_rx(struct geneve_dev *geneve, struct geneve_sock *gs,if (ip_tunnel_collect_metadata () || gs->collect_md) {__be16 flags; - flags =TUNNEL_KEY |TUNNEL_GENEVE_OPT | - (gnvh->oam ?TUNNEL_OAM :0 ) | + flags =TUNNEL_KEY | (gnvh->oam ?TUNNEL_OAM :0 ) | (gnvh->critical ?TUNNEL_CRIT_OPT :0 ); tun_dst = udp_tun_rx_dst(skb, geneve_get_sk_family(gs), flags,
include/net/ip_tunnels.h +4 -3
@@ -478,9 +478,11 @@ static inline void ip_tunnel_info_opts_set(struct ip_tunnel_info *info, const void *from, int len, __be16 flags) { -memcpy (ip_tunnel_info_opts (info ),from ,len ); info->options_len = len; - info->key.tun_flags |= flags; +if (len >0 ) { +memcpy (ip_tunnel_info_opts (info), from, len); + info->key.tun_flags |= flags; + } }static inline struct ip_tunnel_info *lwt_tun_info (struct lwtunnel_state *lwtstate)
@@ -526,7 +528,6 @@ static inline void ip_tunnel_info_opts_set(struct ip_tunnel_info *info, __be16 flags) { info->options_len =0 ; - info->key.tun_flags |= flags; }#endif /* CONFIG_INET */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 90/252 arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit 1a9a8910b2153cd3c4f3f2f8defcb853ead3b1fd ]
The Ethernet PHY on the Bananapi M64 has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config").
--- arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts +1 -1
@@ -105,7 +105,7 @@ &emac { pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&ext_rgmii_phy>; phy-supply = <®_dc1sw>; status = "okay";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 111/252 arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point
In reply to Greg Kroah-HartmanFrom: Lucas Stach <[email protected]>
[ Upstream commit d19d2152ca055baf20339cfacbf039c2cfb8d936 ]
The datasheet for both the industrial and consumer variant of the SoC lists a typical voltage of 0.95V for the 1.6GHz CPU operating point.
--- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +1 -1
@@ -129,7 +129,7 @@ opp-1600000000 { opp-hz = /bits/ 64 <1600000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; opp-supported-hw = <0xc>, <0x7>; clock-latency-ns = <150000>; opp-suspend;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 84/252 ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit f94f78bd93f567c022f594589dbeecdf59931365 ]
The Ethernet PHY on the Bananapi M1+ has the RX and TX delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
Fix the phy-mode description to correct reflect this so that the implementation doesn't reconfigure the delays incorrectly. This happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config").
--- arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +1 -1
@@ -130,7 +130,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-supply = <®_gmac_3v3>; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 105/252 dmaengine: xilinx_dma: Fix SG capability check for MCDMA
In reply to Greg Kroah-HartmanFrom: Matthew Murrian <[email protected]>
[ Upstream commit 96d5d884f78306206d745d856aad322becd100c3 ]
The SG capability is inherently present with Multichannel DMA operation. The register used to check for this capability with other DMA driver types is not defined for MCDMA.
--- drivers/dma/xilinx/xilinx_dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/dma/xilinx/xilinx_dma.c +4 -3
@@ -2875,10 +2875,11 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev, chan->stop_transfer = xilinx_dma_stop_transfer; } -/* check if SG is enabled (only for AXIDMA and CDMA) */ +/* check if SG is enabled (only for AXIDMA, AXIMCDMA, and CDMA) */ if (xdev->dma_config->dmatype !=XDMA_TYPE_VDMA ) { -if (dma_ctrl_read (chan,XILINX_DMA_REG_DMASR ) & -XILINX_DMA_DMASR_SG_MASK ) +if (xdev->dma_config->dmatype ==XDMA_TYPE_AXIMCDMA || +dma_ctrl_read (chan,XILINX_DMA_REG_DMASR ) & +XILINX_DMA_DMASR_SG_MASK ) chan->has_sg = true;dev_dbg (chan->dev,"ch %d: SG %s\n" , chan->id, chan->has_sg ?"enabled" :"disabled" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 48/252 net: fec: Fix reference count leak in fec series ops
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit da875fa5040b0f951cb4bf7efbf59f6dcff44d3c ]
pm_runtime_get_sync() will increment pm usage at first and it will resume the device later. If runtime of the device has error or device is in inaccessible state(or other error state), resume operation will fail. If we do not call put operation to decrease the reference, it will result in reference count leak. Moreover, this device cannot enter the idle state and always stay busy or other non-idle state later. So we fixed it by replacing it with pm_runtime_resume_and_get.
--- drivers/net/ethernet/freescale/fec_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +5 -7
@@ -1808,7 +1808,7 @@ static int fec_enet_mdio_read(struct miiint ret =0 , frame_start, frame_addr, frame_op;bool is_c45 = !!(regnum &MII_ADDR_C45 ); - ret =pm_runtime_get_sync (dev); + ret =pm_runtime_resume_and_get (dev);if (ret <0 )return ret;
@@ -1867,11 +1867,9 @@ static int fec_enet_mdio_write(struct miint ret, frame_start, frame_addr;bool is_c45 = !!(regnum &MII_ADDR_C45 ); - ret =pm_runtime_get_sync (dev); + ret =pm_runtime_resume_and_get (dev);if (ret <0 )return ret; -else - ret =0 ;if (is_c45) { frame_start =FEC_MMFR_ST_C45 ;
@@ -2276,7 +2274,7 @@ static void fec_enet_get_regs(struct netu32 i, off;int ret; - ret =pm_runtime_get_sync (dev); + ret =pm_runtime_resume_and_get (dev);if (ret <0 )return ;
@@ -2977,7 +2975,7 @@ fec_enet_open(struct net_device *ndev)int ret;bool reset_again; - ret =pm_runtime_get_sync (&fep->pdev->dev); + ret =pm_runtime_resume_and_get (&fep->pdev->dev);if (ret <0 )return ret;
@@ -3771,7 +3769,7 @@ fec_drv_remove(struct platform_device *pstruct device_node *np = pdev->dev.of_node;int ret; - ret =pm_runtime_get_sync (&pdev->dev); + ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 104/252 dmaengine: xilinx_dma: Fix usage of xilinx_aximcdma_tx_segment
In reply to Greg Kroah-HartmanFrom: Matthew Murrian <[email protected]>
[ Upstream commit c8ae7932997d0cc92d016829138074c7520248e5 ]
Several code sections incorrectly use struct xilinx_axidma_tx_segment instead of struct xilinx_aximcdma_tx_segment when operating as Multichannel DMA. As their structures are similar, this just works.
--- drivers/dma/xilinx/xilinx_dma.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-)
drivers/dma/xilinx/xilinx_dma.c +24 -5
@@ -948,8 +948,10 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan, {struct xilinx_cdma_tx_segment *cdma_seg;struct xilinx_axidma_tx_segment *axidma_seg; +struct xilinx_aximcdma_tx_segment *aximcdma_seg;struct xilinx_cdma_desc_hw *cdma_hw;struct xilinx_axidma_desc_hw *axidma_hw; +struct xilinx_aximcdma_desc_hw *aximcdma_hw;struct list_head *entry;u32 residue =0 ;
@@ -961,13 +963,23 @@ static u32 xilinx_dma_get_residue(struct xilinx_dma_chan *chan, cdma_hw = &cdma_seg->hw; residue += (cdma_hw->control - cdma_hw->status) & chan->xdev->max_buffer_len; - }else { + }else if (chan->xdev->dma_config->dmatype == +XDMA_TYPE_AXIDMA ) { axidma_seg =list_entry (entry, struct xilinx_axidma_tx_segment, node); axidma_hw = &axidma_seg->hw; residue += (axidma_hw->control - axidma_hw->status) & chan->xdev->max_buffer_len; + }else { + aximcdma_seg = +list_entry (entry, + struct xilinx_aximcdma_tx_segment, + node); + aximcdma_hw = &aximcdma_seg->hw; + residue += + (aximcdma_hw->control - aximcdma_hw->status) & + chan->xdev->max_buffer_len; } }
@@ -1135,7 +1147,7 @@ static int xilinx_dma_alloc_chan_resources(struct dma_chan *dchan)upper_32_bits (chan->seg_p +sizeof (*chan->seg_mv) * ((i +1 ) %XILINX_DMA_NUM_DESCS )); chan->seg_mv[i].phys = chan->seg_p + -sizeof (*chan->seg_v) * i; +sizeof (*chan->seg_mv) * i;list_add_tail (&chan->seg_mv[i].node, &chan->free_seg_list); }
@@ -1560,7 +1572,7 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)static void xilinx_mcdma_start_transfer (struct xilinx_dma_chan *chan) {struct xilinx_dma_tx_descriptor *head_desc, *tail_desc; -struct xilinx_axidma_tx_segment *tail_segment; +struct xilinx_aximcdma_tx_segment *tail_segment;u32 reg;/*
@@ -1582,7 +1594,7 @@ static void xilinx_mcdma_start_transfer(struct xilinx_dma_chan *chan) tail_desc =list_last_entry (&chan->pending_list, struct xilinx_dma_tx_descriptor, node); tail_segment =list_last_entry (&tail_desc->segments, - struct xilinx_axidma_tx_segment, node); + struct xilinx_aximcdma_tx_segment, node); reg =dma_ctrl_read (chan,XILINX_MCDMA_CHAN_CR_OFFSET (chan->tdest));
@@ -1864,6 +1876,7 @@ static void append_desc_queue(struct xilinx_dma_chan *chan,struct xilinx_vdma_tx_segment *tail_segment;struct xilinx_dma_tx_descriptor *tail_desc;struct xilinx_axidma_tx_segment *axidma_tail_segment; +struct xilinx_aximcdma_tx_segment *aximcdma_tail_segment;struct xilinx_cdma_tx_segment *cdma_tail_segment;if (list_empty (&chan->pending_list))
@@ -1885,11 +1898,17 @@ static void append_desc_queue(struct xilinx_dma_chan *chan, struct xilinx_cdma_tx_segment, node); cdma_tail_segment->hw.next_desc = (u32 )desc->async_tx.phys; - }else { + }else if (chan->xdev->dma_config->dmatype ==XDMA_TYPE_AXIDMA ) { axidma_tail_segment =list_last_entry (&tail_desc->segments, struct xilinx_axidma_tx_segment, node); axidma_tail_segment->hw.next_desc = (u32 )desc->async_tx.phys; + }else { + aximcdma_tail_segment = +list_last_entry (&tail_desc->segments, + struct xilinx_aximcdma_tx_segment, + node); + aximcdma_tail_segment->hw.next_desc = (u32 )desc->async_tx.phys; }/*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 103/252 tee: amdtee: synchronize access to shm list
In reply to Greg Kroah-HartmanFrom: Rijo Thomas <[email protected]>
[ Upstream commit be353be27874f40837327d9a39e3ad2149ab66d3 ]
Synchronize access to shm or shared memory buffer list to prevent race conditions due to concurrent updates to shared shm list by multiple threads.
--- drivers/tee/amdtee/amdtee_private.h | 1 + drivers/tee/amdtee/core.c | 8 ++++++++ 2 files changed, 9 insertions(+)
drivers/tee/amdtee/amdtee_private.h +1 -0
@@ -70,6 +70,7 @@ struct amdtee_session {struct amdtee_context_data {struct list_head sess_list;struct list_head shm_list; +struct mutex shm_mutex;/* synchronizes access to @shm_list */ };struct amdtee_driver_data {
drivers/tee/amdtee/core.c +8 -0
@@ -42,6 +42,7 @@ static int amdtee_open(struct tee_context *ctx)INIT_LIST_HEAD (&ctxdata->sess_list);INIT_LIST_HEAD (&ctxdata->shm_list); +mutex_init (&ctxdata->shm_mutex); ctx->data = ctxdata;return 0 ;
@@ -85,6 +86,7 @@ static void amdtee_release(struct tee_context *ctx)list_del (&sess->list_node);release_session (sess); } +mutex_destroy (&ctxdata->shm_mutex);kfree (ctxdata); ctx->data =NULL ;
@@ -155,11 +157,13 @@ u32 get_buffer_id(struct tee_shm *shm)struct amdtee_shm_data *shmdata;u32 buf_id =0 ; +mutex_lock (&ctxdata->shm_mutex);list_for_each_entry (shmdata, &ctxdata->shm_list, shm_node)if (shmdata->kaddr == shm->kaddr) { buf_id = shmdata->buf_id;break ; } +mutex_unlock (&ctxdata->shm_mutex);return buf_id; }
@@ -364,7 +368,9 @@ int amdtee_map_shmem(struct tee_shm *shm) shmnode->kaddr = shm->kaddr; shmnode->buf_id = buf_id; ctxdata = shm->ctx->data; +mutex_lock (&ctxdata->shm_mutex);list_add (&shmnode->shm_node, &ctxdata->shm_list); +mutex_unlock (&ctxdata->shm_mutex);pr_debug ("buf_id :[%x] kaddr[%p]\n" , shmnode->buf_id, shmnode->kaddr);
@@ -385,12 +391,14 @@ void amdtee_unmap_shmem(struct tee_shm *shm)handle_unmap_shmem (buf_id); ctxdata = shm->ctx->data; +mutex_lock (&ctxdata->shm_mutex);list_for_each_entry (shmnode, &ctxdata->shm_list, shm_node)if (buf_id == shmnode->buf_id) {list_del (&shmnode->shm_node);kfree (shmnode);break ; } +mutex_unlock (&ctxdata->shm_mutex); } int amdtee_invoke_func(struct tee_context *ctx,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 101/252 swiotlb: using SIZE_MAX needs limits.h included
In reply to Greg Kroah-HartmanFrom: Stephen Rothwell <[email protected]>
[ Upstream commit f51778db088b2407ec177f2f4da0f6290602aa3f ]
After merging the drm-misc tree, linux-next build (arm multi_v7_defconfig) failed like this:
In file included from drivers/gpu/drm/nouveau/nouveau_ttm.c:26:include/linux/swiotlb.h: In function 'swiotlb_max_mapping_size':include/linux/swiotlb.h:99:9: error: 'SIZE_MAX' undeclared (first use in this function)
99 | return SIZE_MAX;
| ^~~~~~~~
include/linux/swiotlb.h:7:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
6 | #include <linux/init.h>
+++ |+#include <stdint.h>
7 | #include <linux/types.h>
include/linux/swiotlb.h:99:9: note: each undeclared identifier is reported only once for each function it appears in
99 | return SIZE_MAX;
| ^~~~~~~~Caused by commit
abe420bfae52 ("swiotlb: Introduce swiotlb_max_mapping_size()")
but only exposed by commit "drm/nouveu: fix swiotlb include"
Fix it by including linux/limits.h as appropriate.
--- include/linux/swiotlb.h | 1 + 1 file changed, 1 insertion(+)
include/linux/swiotlb.h +1 -0
@@ -5,6 +5,7 @@#include <linux/dma-direction.h> #include <linux/init.h> #include <linux/types.h> +#include <linux/limits.h> struct device ;struct page ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 66/252 um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb()
In reply to Greg Kroah-HartmanFrom: Richard Weinberger <[email protected]>
[ Upstream commit 9a5085b3fad5d5d6019a3d160cdd70357d35c8b1 ]
Commit b2b29d6d0119 ("mm: account PMD tables like PTE tables") uncovered a bug in uml, we forgot to call the destructor.
While we are here, give x a sane name.
--- arch/um/include/asm/pgalloc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/um/include/asm/pgalloc.h +7 -1
@@ -33,7 +33,13 @@ do { \ } while (0)#ifdef CONFIG_3_LEVEL_PGTABLES -#define __pmd_free_tlb (tlb,x, address) tlb_remove_page((tlb),virt_to_page(x)) + +#define __pmd_free_tlb (tlb, pmd, address) \ +do { \ + pgtable_pmd_page_dtor(virt_to_page(pmd)); \ + tlb_remove_page((tlb),virt_to_page(pmd)); \ +} while (0) \ +#endif #endif
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 99/252 ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking
In reply to Greg Kroah-HartmanFrom: Andrew Lunn <[email protected]>
[ Upstream commit f8b5a33707c9a19ec905d2826be0acd151997a09 ]
The ZII devel B board has two generations of Marvell Switches. The mv88e6352 supports an MDIO clock of 12MHz. However the older 88e6185 does not like 12MHz, and often fails to probe.
Reduce the clock speed to 5MHz, which seems to work reliably.
--- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/vf610-zii-dev-rev-b.dts +3 -0
@@ -406,6 +406,9 @@ }; }; +&mdio1 { + clock-frequency = <5000000>; +}; &iomuxc { pinctrl_gpio_e6185_eeprom_sel: pinctrl-gpio-e6185-eeprom-spi0 {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 100/252 ARM: dts: imx6q-prti6q: fix PHY address
In reply to Greg Kroah-HartmanFrom: Oleksij Rempel <[email protected]>
[ Upstream commit e402599e5e5e0b2758d7766fd9f6d7953d4ccd85 ]
Due to bug in the bootloader, the PHY has floating address and may randomly change on each PHY reset. To avoid it, the updated bootloader with the following patch[0] should be used:
| ARM: protonic: disable on-die termination to fix PHY bootstrapping | | If on-die termination is enabled, the RXC pin of iMX6 will be pulled | high. Since we already have an 10K pull-down on board, the RXC level on | PHY reset will be ~800mV, which is mostly interpreted as 1. On some | reboots we get 0 instead and kernel can't detect the PHY properly. | | Since the default 0x020e07ac value is 0, it is sufficient to remove this | entry from the affected imxcfg files. | | Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from | 4 to 0.
With latest bootloader update, the PHY address will be fixed to "0".
[0] https://git.pengutronix.de/cgit/barebox/commit/?id=93f7dcf631edfcda19e7757b28d66017ea274b81
--- arch/arm/boot/dts/imx6q-prti6q.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6q-prti6q.dts +2 -2
@@ -213,8 +213,8 @@ #size-cells = <0>; /* Microchip KSZ9031RNX PHY */ - rgmii_phy: ethernet-phy@4 { - reg = <4>; + rgmii_phy: ethernet-phy@0 { + reg = <0>; interrupts-extended = <&gpio1 28 IRQ_TYPE_LEVEL_LOW>; reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; reset-assert-us = <10000>;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 93/252 dmaengine: idxd: fix wq config registers offset programming
In reply to Greg Kroah-HartmanFrom: Dave Jiang <[email protected]>
[ Upstream commit 484f910e93b48c1d8890d8330a87e34ae61f4782 ]
DSA spec v1.1 [1] updated to include a stride size register for WQ configuration that will specify how much space is reserved for the WQ configuration register set. This change is expected to be in the final gen1 DSA hardware. Fix the driver to use WQCFG_OFFSET() for all WQ offset calculation and fixup WQCFG_OFFSET() to use the new calculated wq size.
--- drivers/dma/idxd/device.c | 29 ++++++++++++++--------------- drivers/dma/idxd/idxd.h | 3 ++- drivers/dma/idxd/init.c | 5 +++++ drivers/dma/idxd/registers.h | 23 ++++++++++++++++++++++- 4 files changed, 43 insertions(+), 17 deletions(-)
drivers/dma/idxd/device.c +14 -15
@@ -295,7 +295,7 @@ void idxd_wq_disable_cleanup(struct idxd_wq *wq)int i, wq_offset;lockdep_assert_held (&idxd->dev_lock); -memset (&wq->wqcfg,0 ,sizeof (wq->wqcfg)); +memset (wq->wqcfg,0 , idxd->wqcfg_size); wq->type =IDXD_WQT_NONE ; wq->size =0 ; wq->group =NULL ;
@@ -304,8 +304,8 @@ void idxd_wq_disable_cleanup(struct idxd_wq *wq)clear_bit (WQ_FLAG_DEDICATED , &wq->flags);memset (wq->name,0 ,WQ_NAME_SIZE ); -for (i =0 ; i <8 ; i++) { - wq_offset = idxd->wqcfg_offset + wq->id *32 + i *sizeof (u32); +for (i =0 ; i <WQCFG_STRIDES (idxd); i++) { + wq_offset =WQCFG_OFFSET (idxd, wq->id, i);iowrite32 (0 , idxd->reg_base + wq_offset); dev_dbg(dev, "WQ[%d][%d][%#x]: %#x\n", wq->id, i, wq_offset,
@@ -535,10 +535,10 @@ static int idxd_wq_config_write(struct idxd_wq *wq)if (!wq->group)return 0 ; -memset (&wq->wqcfg,0 ,sizeof (union wqcfg )); +memset (wq->wqcfg,0 , idxd->wqcfg_size);/* byte 0-3 */ - wq->wqcfg.wq_size = wq->size; + wq->wqcfg->wq_size = wq->size;if (wq->size ==0 ) {dev_warn (dev,"Incorrect work queue size: 0\n" );
@@ -546,22 +546,21 @@ static int idxd_wq_config_write(struct idxd_wq *wq) }/* bytes 4-7 */ - wq->wqcfg.wq_thresh = wq->threshold; + wq->wqcfg->wq_thresh = wq->threshold;/* byte 8-11 */ - wq->wqcfg.priv = !!(wq->type ==IDXD_WQT_KERNEL ); - wq->wqcfg.mode =1 ; - - wq->wqcfg.priority = wq->priority; + wq->wqcfg->priv = !!(wq->type ==IDXD_WQT_KERNEL ); + wq->wqcfg->mode =1 ; + wq->wqcfg->priority = wq->priority;/* bytes 12-15 */ - wq->wqcfg.max_xfer_shift = idxd->hw.gen_cap.max_xfer_shift; - wq->wqcfg.max_batch_shift = idxd->hw.gen_cap.max_batch_shift; + wq->wqcfg->max_xfer_shift = idxd->hw.gen_cap.max_xfer_shift; + wq->wqcfg->max_batch_shift = idxd->hw.gen_cap.max_batch_shift;dev_dbg (dev,"WQ %d CFGs\n" , wq->id); -for (i =0 ; i <8 ; i++) { - wq_offset = idxd->wqcfg_offset + wq->id *32 + i *sizeof (u32); -iowrite32 (wq->wqcfg.bits[i], idxd->reg_base + wq_offset); +for (i =0 ; i <WQCFG_STRIDES (idxd); i++) { + wq_offset =WQCFG_OFFSET (idxd, wq->id, i); +iowrite32 (wq->wqcfg->bits[i], idxd->reg_base + wq_offset);dev_dbg (dev,"WQ[%d][%d][%#x]: %#x\n" , wq->id, i, wq_offset,ioread32 (idxd->reg_base + wq_offset));
drivers/dma/idxd/idxd.h +2 -1
@@ -103,7 +103,7 @@ struct idxd_wq {u32 priority;enum idxd_wq_state state;unsigned long flags; -union wqcfg wqcfg; +union wqcfg *wqcfg;u32 vec_ptr;/* interrupt steering */ struct dsa_hw_desc **hw_descs;int num_descs;
@@ -180,6 +180,7 @@ struct idxd_device {int max_wq_size;int token_limit;int nr_tokens;/* non-reserved tokens */ +unsigned int wqcfg_size;union sw_err_reg sw_err;wait_queue_head_t cmd_waitq;
drivers/dma/idxd/init.c +5 -0
@@ -176,6 +176,9 @@ static int idxd_setup_internals(struct idxd_device *idxd) wq->idxd = idxd;mutex_init (&wq->wq_lock); wq->idxd_cdev.minor =-1 ; + wq->wqcfg =devm_kzalloc (dev, idxd->wqcfg_size,GFP_KERNEL ); +if (!wq->wqcfg) +return -ENOMEM ; }for (i =0 ; i < idxd->max_engines; i++) {
@@ -249,6 +252,8 @@ static void idxd_read_caps(struct idxd_device *idxd)dev_dbg (dev,"total workqueue size: %u\n" , idxd->max_wq_size); idxd->max_wqs = idxd->hw.wq_cap.num_wqs;dev_dbg (dev,"max workqueues: %u\n" , idxd->max_wqs); + idxd->wqcfg_size =1 << (idxd->hw.wq_cap.wqcfg_size +IDXD_WQCFG_MIN ); +dev_dbg (dev,"wqcfg size: %u\n" , idxd->wqcfg_size);/* reading operation capabilities */ for (i =0 ; i <4 ; i++) {
drivers/dma/idxd/registers.h +22 -1
@@ -43,7 +43,8 @@ union wq_cap_reg {struct {u64 total_wq_size:16 ;u64 num_wqs:8 ; -u64 rsvd:24 ; +u64 wqcfg_size:4 ; +u64 rsvd:20 ;u64 shared_mode:1 ;u64 dedicated_mode:1 ;u64 rsvd2:1 ;
@@ -55,6 +56,7 @@ union wq_cap_reg {u64 bits; } __packed;#define IDXD_WQCAP_OFFSET 0x20 +#define IDXD_WQCFG_MIN 5 union group_cap_reg { struct {
@@ -333,4 +335,23 @@ union wqcfg { };u32 bits[8 ]; } __packed; + +/* +* This macro calculates the offset into the WQCFG register +* idxd - struct idxd * +* n - wq id +* ofs - the index of the 32b dword for the config register +* +* The WQCFG register block is divided into groups per each wq. The n index +* allows us to move to the register group that's for that particular wq. +* Each register is 32bits. The ofs gives us the number of register to access. +*/ +#define WQCFG_OFFSET (_idxd_dev, n, ofs) \ +({\ + typeof(_idxd_dev) __idxd_dev = (_idxd_dev); \ + (__idxd_dev)->wqcfg_offset + (n) * (__idxd_dev)->wqcfg_size + sizeof(u32) * (ofs); \ +}) + +#define WQCFG_STRIDES (_idxd_dev) ((_idxd_dev)->wqcfg_size / sizeof(u32)) +#endif
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 95/252 arm64: dts: fsl: fix endianness issue of rcpm
In reply to Greg Kroah-HartmanFrom: Biwen Li <[email protected]>
[ Upstream commit d92454287ee25d78f1caac3734a1864f8a5a5275 ]
Add little-endian property to RCPM node (for ls1028a,ls1088a,ls208xa), otherwise RCPM driver will program hardware with incorrect setting, causing system (such as LS1028ARDB) failed to be waked by wakeup source.
--- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 1 + arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 1 + 3 files changed, 3 insertions(+)
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1 -0
@@ -1012,6 +1012,7 @@ compatible = "fsl,ls1028a-rcpm", "fsl,qoriq-rcpm-2.1+"; reg = <0x0 0x1e34040 0x0 0x1c>; #fsl,rcpm-wakeup-cells = <7>; + little-endian; }; ftm_alarm0: timer@2800000 {
arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi +1 -0
@@ -787,6 +787,7 @@ compatible = "fsl,ls1088a-rcpm", "fsl,qoriq-rcpm-2.1+"; reg = <0x0 0x1e34040 0x0 0x18>; #fsl,rcpm-wakeup-cells = <6>; + little-endian; }; ftm_alarm0: timer@2800000 {
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi +1 -0
@@ -769,6 +769,7 @@ compatible = "fsl,ls208xa-rcpm", "fsl,qoriq-rcpm-2.1+"; reg = <0x0 0x1e34040 0x0 0x18>; #fsl,rcpm-wakeup-cells = <6>; + little-endian; }; ftm_alarm0: timer@2800000 {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 91/252 Input: adxl34x - clean up a data type in adxl34x_probe()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 33b6c39e747c552fa770eecebd1776f1f4a222b1 ]
The "revid" is used to store negative error codes so it should be an int type.
--- drivers/input/misc/adxl34x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/adxl34x.c +1 -1
@@ -696,7 +696,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,struct input_dev *input_dev;const struct adxl34x_platform_data *pdata;int err, range, i; -unsigned char revid; +int revid;if (!irq) {dev_err (dev,"no IRQ?\n" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 75/252 arm64: dts: allwinner: beelink-gs1: Enable both RGMII RX/TX delay
In reply to Greg Kroah-HartmanFrom: Clément Péron <[email protected]>
[ Upstream commit 97a38c1c213b162aa577299de698f39c18ba696b ]
Before the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the software overwrite for RX/TX delays of the RTL8211e were not working properly and the Beelink GS1 had both RX/TX delay of RGMII interface set using pull-up on the TXDLY and RXDLY pins.
Now that these delays are working properly they overwrite the HW config and set this to 'rgmii' meaning no delay on both RX/TX. This makes the ethernet of this board not working anymore.
Set the phy-mode to 'rgmii-id' meaning RGMII with RX/TX delays in the device-tree to keep the correct configuration.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +1 -1
@@ -97,7 +97,7 @@ &emac { pinctrl-names = "default"; pinctrl-0 = <&ext_rgmii_pins>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&ext_rgmii_phy>; phy-supply = <®_aldo2>; status = "okay";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 67/252 vfs: remove lockdep bogosity in __sb_start_write
In reply to Greg Kroah-HartmanFrom: Darrick J. Wong <[email protected]>
[ Upstream commit 22843291efc986ce7722610073fcf85a39b4cb13 ]
__sb_start_write has some weird looking lockdep code that claims to exist to handle nested freeze locking requests from xfs. The code as written seems broken -- if we think we hold a read lock on any of the higher freeze levels (e.g. we hold SB_FREEZE_WRITE and are trying to lock SB_FREEZE_PAGEFAULT), it converts a blocking lock attempt into a trylock.
However, it's not correct to downgrade a blocking lock attempt to a trylock unless the downgrading code or the callers are prepared to deal with that situation. Neither __sb_start_write nor its callers handle this at all. For example:
sb_start_pagefault ignores the return value completely, with the result that if xfs_filemap_fault loses a race with a different thread trying to fsfreeze, it will proceed without pagefault freeze protection (thereby breaking locking rules) and then unlocks the pagefault freeze lock that it doesn't own on its way out (thereby corrupting the lock state), which leads to a system hang shortly afterwards.
Normally, this won't happen because our ownership of a read lock on a higher freeze protection level blocks fsfreeze from grabbing a write lock on that higher level. *However*, if lockdep is offline, lock_is_held_type unconditionally returns 1, which means that percpu_rwsem_is_held returns 1, which means that __sb_start_write unconditionally converts blocking freeze lock attempts into trylocks, even when we *don't* hold anything that would block a fsfreeze.
Apparently this all held together until 5.10-rc1, when bugs in lockdep caused lockdep to shut itself off early in an fstests run, and once fstests gets to the "race writes with freezer" tests, kaboom. This might explain the long trail of vanishingly infrequent livelocks in fstests after lockdep goes offline that I've never been able to diagnose.
We could fix it by spinning on the trylock if wait==true, but AFAICT the locking works fine if lockdep is not built at all (and I didn't see any complaints running fstests overnight), so remove this snippet entirely.
NOTE: Commit f4b554af9931 in 2015 created the current weird logic (which used to exist in a different form in commit 5accdf82ba25c from 2012) in __sb_start_write. XFS solved this whole problem in the late 2.6 era by creating a variant of transactions (XFS_TRANS_NO_WRITECOUNT) that don't grab intwrite freeze protection, thus making lockdep's solution unnecessary. The commit claims that Dave Chinner explained that the trylock hack + comment could be removed, but nobody ever did.
--- fs/super.c | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-)
fs/super.c +4 -29
@@ -1645,36 +1645,11 @@ EXPORT_SYMBOL(__sb_end_write);*/ int __sb_start_write (struct super_block *sb,int level,bool wait) { -bool force_trylock = false; -int ret =1 ; +if (!wait) +return percpu_down_read_trylock (sb->s_writers.rw_sem + level-1 ); -#ifdef CONFIG_LOCKDEP -/* -* We want lockdep to tell us about possible deadlocks with freezing -* but it's it bit tricky to properly instrument it. Getting a freeze -* protection works as getting a read lock but there are subtle -* problems. XFS for example gets freeze protection on internal level -* twice in some cases, which is OK only because we already hold a -* freeze protection also on higher level. Due to these cases we have -* to use wait == F (trylock mode) which must not fail. -*/ -if (wait) { -int i; - -for (i =0 ; i < level -1 ; i++) -if (percpu_rwsem_is_held (sb->s_writers.rw_sem + i)) { - force_trylock = true; -break ; - } - } -#endif -if (wait && !force_trylock) -percpu_down_read (sb->s_writers.rw_sem + level-1 ); -else - ret =percpu_down_read_trylock (sb->s_writers.rw_sem + level-1 ); - -WARN_ON (force_trylock && !ret); -return ret; +percpu_down_read (sb->s_writers.rw_sem + level-1 ); +return 1 ; }EXPORT_SYMBOL (__sb_start_write);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 60/252 pinctrl: mcp23s08: Print error message when regmap init fails
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit a835d3a114ab0dc2f0d8c6963c3f53734b1c5965 ]
It is useful for debugging to have the error message printed when regmap initialisation fails. Add it to the driver.
--- drivers/pinctrl/pinctrl-mcp23s08_spi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pinctrl/pinctrl-mcp23s08_spi.c +2 -0
@@ -126,6 +126,8 @@ static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev, copy->name = name; mcp->regmap =devm_regmap_init (dev, &mcp23sxx_spi_regmap, mcp, copy); +if (IS_ERR (mcp->regmap)) +dev_err (dev,"regmap init failed for %s\n" , mcp->chip.label);return PTR_ERR_OR_ZERO (mcp->regmap); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 59/252 scsi: ufs: Try to save power mode change and UIC cmd completion timeout
In reply to Greg Kroah-HartmanFrom: Can Guo <[email protected]>
[ Upstream commit 0f52fcb99ea2738a0a0f28e12cf4dd427069dd2a ]
Use the uic_cmd->cmd_active as a flag to track the lifecycle of an UIC cmd. The flag is set before sending the UIC cmd and cleared in IRQ handler. When a PMC or UIC cmd completion timeout happens, if the flag is not set, instead of returning timeout error, we still treat it as a successful operation. This is to deal with the scenario in which completion has been raised but the one waiting for the completion cannot be awaken in time due to kernel scheduling problem.
--- drivers/scsi/ufs/ufshcd.c | 26 ++++++++++++++++++++++++-- drivers/scsi/ufs/ufshcd.h | 2 ++ 2 files changed, 26 insertions(+), 2 deletions(-)
drivers/scsi/ufs/ufshcd.c +24 -2
@@ -2100,10 +2100,20 @@ ufshcd_wait_for_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd)unsigned long flags;if (wait_for_completion_timeout (&uic_cmd->done, -msecs_to_jiffies (UIC_CMD_TIMEOUT ))) +msecs_to_jiffies (UIC_CMD_TIMEOUT ))) { ret = uic_cmd->argument2 &MASK_UIC_COMMAND_RESULT ; -else + }else { ret = -ETIMEDOUT ; +dev_err (hba->dev, +"uic cmd 0x%x with arg3 0x%x completion timeout\n" , + uic_cmd->command, uic_cmd->argument3); + +if (!uic_cmd->cmd_active) { +dev_err (hba->dev,"%s: UIC cmd has been completed, return the result\n" , + __func__); + ret = uic_cmd->argument2 &MASK_UIC_COMMAND_RESULT ; + } + }spin_lock_irqsave (hba->host->host_lock, flags); hba->active_uic_cmd =NULL ;
@@ -2135,6 +2145,7 @@ __ufshcd_send_uic_cmd(struct ufs_hba *hba, struct uic_command *uic_cmd,if (completion)init_completion (&uic_cmd->done); + uic_cmd->cmd_active =1 ;ufshcd_dispatch_uic_cmd (hba, uic_cmd);return 0 ;
@@ -3774,10 +3785,18 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)dev_err (hba->dev,"pwr ctrl cmd 0x%x with mode 0x%x completion timeout\n" , cmd->command, cmd->argument3); + +if (!cmd->cmd_active) { +dev_err (hba->dev,"%s: Power Mode Change operation has been completed, go check UPMCRS\n" , + __func__); + goto check_upmcrs; + } + ret = -ETIMEDOUT ; goto out; } +check_upmcrs: status =ufshcd_get_upmcrs (hba);if (status !=PWR_LOCAL ) { dev_err(hba->dev,
@@ -4887,11 +4906,14 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)ufshcd_get_uic_cmd_result (hba); hba->active_uic_cmd->argument3 =ufshcd_get_dme_attr_val (hba); +if (!hba->uic_async_done) + hba->active_uic_cmd->cmd_active =0 ;complete (&hba->active_uic_cmd->done); retval =IRQ_HANDLED ; }if ((intr_status &UFSHCD_UIC_PWR_MASK ) && hba->uic_async_done) { + hba->active_uic_cmd->cmd_active =0 ;complete (hba->uic_async_done); retval =IRQ_HANDLED ; }
drivers/scsi/ufs/ufshcd.h +2 -0
@@ -64,6 +64,7 @@ enum dev_cmd_type {* @argument1: UIC command argument 1 * @argument2: UIC command argument 2 * @argument3: UIC command argument 3 +* @cmd_active: Indicate if UIC command is outstanding * @done: UIC command completion */ struct uic_command {
@@ -71,6 +72,7 @@ struct uic_command {u32 argument1;u32 argument2;u32 argument3; +int cmd_active;struct completion done; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 21/252 net: ftgmac100: Fix crash when removing driver
In reply to Greg Kroah-HartmanFrom: Joel Stanley <[email protected]>
[ Upstream commit 3d5179458d22dc0b4fdc724e4bed4231a655112a ]
When removing the driver we would hit BUG_ON(!list_empty(&dev->ptype_specific)) in net/core/dev.c due to still having the NC-SI packet handler registered.
# echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind ------------[ cut here ]------------ kernel BUG at net/core/dev.c:10254! Internal error: Oops - BUG: 0 [#1] SMP ARM CPU: 0 PID: 115 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00007-g02e0365710c4 #46 Hardware name: Generic DT based system PC is at netdev_run_todo+0x314/0x394 LR is at cpumask_next+0x20/0x24 pc : [<806f5830>] lr : [<80863cb0>] psr: 80000153 sp : 855bbd58 ip : 00000001 fp : 855bbdac r10: 80c03d00 r9 : 80c06228 r8 : 81158c54 r7 : 00000000 r6 : 80c05dec r5 : 80c05d18 r4 : 813b9280 r3 : 813b9054 r2 : 8122c470 r1 : 00000002 r0 : 00000002 Flags: Nzcv IRQs on FIQs off Mode SVC_32 ISA ARM Segment none Control: 00c5387d Table: 85514008 DAC: 00000051 Process sh (pid: 115, stack limit = 0x7cb5703d) ... Backtrace: [<806f551c>] (netdev_run_todo) from [<80707eec>] (rtnl_unlock+0x18/0x1c) r10:00000051 r9:854ed710 r8:81158c54 r7:80c76bb0 r6:81158c10 r5:8115b410 r4:813b9000 [<80707ed4>] (rtnl_unlock) from [<806f5db8>] (unregister_netdev+0x2c/0x30) [<806f5d8c>] (unregister_netdev) from [<805a8180>] (ftgmac100_remove+0x20/0xa8) r5:8115b410 r4:813b9000 [<805a8160>] (ftgmac100_remove) from [<805355e4>] (platform_drv_remove+0x34/0x4c)
--- drivers/net/ethernet/faraday/ftgmac100.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/faraday/ftgmac100.c +4 -0
@@ -1907,6 +1907,8 @@ err_register_netdev:clk_disable_unprepare (priv->rclk);clk_disable_unprepare (priv->clk); err_ncsi_dev: +if (priv->ndev) +ncsi_unregister_dev (priv->ndev);ftgmac100_destroy_mdio (netdev); err_setup_mdio:iounmap (priv->base);
@@ -1926,6 +1928,8 @@ static int ftgmac100_remove(struct platf netdev =platform_get_drvdata (pdev); priv =netdev_priv (netdev); +if (priv->ndev) +ncsi_unregister_dev (priv->ndev);unregister_netdev (netdev);clk_disable_unprepare (priv->rclk);
Greg Kroah-Hartman
maintainerPATCH 26/252 net: lantiq: Wait for the GPHY firmware to be ready
In reply to Greg Kroah-HartmanFrom: Martin Blumenstingl <[email protected]>
[ Upstream commit 2a1828e378c1b5ba1ff283ed8f8c5cc37bb391dc ]
A user reports (slightly shortened from the original message):
libphy: lantiq,xrx200-mdio: probed
mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing. gswip 1e108000.switch lan: no phy at 2
gswip 1e108000.switch lan: failed to connect to port 2: -19 lantiq,xrx200-net 1e10b308.eth eth0: error -19 setting up slave phy
This is a single-port board using the internal Fast Ethernet PHY. The user reports that switching to PHY scanning instead of configuring the PHY within device-tree works around this issue.
The documentation for the standalone variant of the PHY11G (which is probably very similar to what is used inside the xRX200 SoCs but having the firmware burnt onto that standalone chip in the factory) states that the PHY needs 300ms to be ready for MDIO communication after releasing the reset.
Add a 300ms delay after initializing all GPHYs to ensure that the GPHY firmware had enough time to initialize and to appear on the MDIO bus. Unfortunately there is no (known) documentation on what the minimum time to wait after releasing the reset on an internal PHY so play safe and take the one for the external variant. Only wait after the last GPHY firmware is loaded to not slow down the initialization too much ( xRX200 has two GPHYs but newer SoCs have at least three GPHYs).
--- drivers/net/dsa/lantiq_gswip.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/dsa/lantiq_gswip.c +11 -0
@@ -26,6 +26,7 @@*/ #include <linux/clk.h> +#include <linux/delay.h> #include <linux/etherdevice.h> #include <linux/firmware.h> #include <linux/if_bridge.h>
@@ -1821,6 +1822,16 @@ static int gswip_gphy_fw_list(struct gsw i++; } +/* The standalone PHY11G requires 300ms to be fully +* initialized and ready for any MDIO communication after being +* taken out of reset. For the SoC-internal GPHY variant there +* is no (known) documentation for the minimum time after a +* reset. Use the same value as for the standalone variant as +* some users have reported internal PHYs not being detected +* without any delay. +*/ +msleep (300 ); +return 0 ; remove_gphy:
Greg Kroah-Hartman
maintainerPATCH 17/252 net: ethernet: mtk-star-emac: return ok when xmit drops
In reply to Greg Kroah-HartmanFrom: "Vincent Stehl�" <[email protected]>
[ Upstream commit e8aa6d520b448efc88670a98eccd196713639f2f ]
The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping fails, after freeing the socket buffer.
Fix the mtk_star_netdev_start_xmit() function accordingly.
--- drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mediatek/mtk_star_emac.c +1 -1
@@ -1054,7 +1054,7 @@ static int mtk_star_netdev_start_xmit(st err_drop_packet:dev_kfree_skb (skb); ndev->stats.tx_dropped++; -return NETDEV_TX_BUSY ; +return NETDEV_TX_OK ; }/* Returns the number of bytes sent or a negative number on the first
Greg Kroah-Hartman
maintainerPATCH 18/252 net: ethernet: ti: am65-cpts: update ret when ptp_clock is ERROR
In reply to Greg Kroah-HartmanFrom: Wang Qing <[email protected]>
[ Upstream commit 81e329e93b860b31c216b40eb5e1373db0ffe0ba ]
We always have to update the value of ret, otherwise the
error value may be the previous one.
--- drivers/net/ethernet/ti/am65-cpts.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/ti/am65-cpts.c +1 -2
@@ -1016,8 +1016,7 @@ struct am65_cpts *am65_cpts_create(strucif (IS_ERR_OR_NULL (cpts->ptp_clock)) {dev_err (dev,"Failed to register ptp clk %ld\n" ,PTR_ERR (cpts->ptp_clock)); -if (!cpts->ptp_clock) - ret = -ENODEV ; + ret = cpts->ptp_clock ?PTR_ERR (cpts->ptp_clock) : -ENODEV ; goto refclk_disable; } cpts->phc_index =ptp_clock_index (cpts->ptp_clock);
Greg Kroah-Hartman
maintainerPATCH 20/252 net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
In reply to Greg Kroah-HartmanFrom: Zhang Changzhong <[email protected]>
[ Upstream commit 35f735c665114840dcd3142f41148d07870f51f7 ]
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/net/ethernet/ti/cpsw.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/ti/cpsw.c +1 -0
@@ -1640,6 +1640,7 @@ static int cpsw_probe(struct platform_de CPSW_MAX_QUEUES, CPSW_MAX_QUEUES);if (!ndev) {dev_err (dev,"error allocating net_device\n" ); + ret = -ENOMEM ; goto clean_cpts; }
Greg Kroah-Hartman
maintainerPATCH 39/252 qlcnic: fix error return code in qlcnic_83xx_restart_hw()
In reply to Greg Kroah-HartmanFrom: Zhang Changzhong <[email protected]>
[ Upstream commit 3beb9be165083c2964eba1923601c3bfac0b02d4 ]
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +2 -1
@@ -2232,7 +2232,8 @@ static int qlcnic_83xx_restart_hw(struct/* Boot either flash image or firmware image from host file system */ if (qlcnic_load_fw_file ==1 ) { -if (qlcnic_83xx_load_fw_image_from_host (adapter)) + err =qlcnic_83xx_load_fw_image_from_host (adapter); +if (err)return err; }else { QLC_SHARED_REG_WR32(adapter, QLCNIC_FW_IMG_VALID,
Greg Kroah-Hartman
maintainerPATCH 38/252 qed: fix ILT configuration of SRC block
In reply to Greg Kroah-HartmanFrom: Dmitry Bogdanov <[email protected]>
[ Upstream commit 93be52612431e71ee8cb980ef11468997857e4c4 ]
The code refactoring of ILT configuration was not complete, the old unused variables were used for the SRC block. That could lead to the memory corruption by HW when rx filters are configured.
This patch completes that refactoring.
--- drivers/net/ethernet/qlogic/qed/qed_cxt.c | 4 ++-- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)
drivers/net/ethernet/qlogic/qed/qed_cxt.c +2 -2
@@ -1647,9 +1647,9 @@ static void qed_src_init_pf(struct qed_h ilog2(rounded_conn_num));STORE_RT_REG_AGG (p_hwfn,SRC_REG_FIRSTFREE_RT_OFFSET , - p_hwfn->p_cxt_mngr->first_free); + p_hwfn->p_cxt_mngr->src_t2.first_free);STORE_RT_REG_AGG (p_hwfn,SRC_REG_LASTFREE_RT_OFFSET , - p_hwfn->p_cxt_mngr->last_free); + p_hwfn->p_cxt_mngr->src_t2.last_free); }/* Timers PF */
drivers/net/ethernet/qlogic/qed/qed_cxt.h +0 -3
@@ -326,9 +326,6 @@ struct qed_cxt_mngr {/* SRC T2 */ struct qed_src_t2 src_t2; -u32 t2_num_pages; -u64 first_free; -u64 last_free;/* total number of SRQ's for this hwfn */ u32 srq_count;
Greg Kroah-Hartman
maintainerPATCH 32/252 net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()
In reply to Greg Kroah-HartmanFrom: Karsten Graul <[email protected]>
[ Upstream commit 41a0be3f8f6be893860b991eb10c47fc3ee09d7f ]
Sparse complaints 3 times about:net/smc/smc_ib.c:203:52: warning: incorrect type in argument 1 (different address spaces)net/smc/smc_ib.c:203:52: expected struct net_device const *devnet/smc/smc_ib.c:203:52: got struct net_device [noderef] __rcu *const ndev
Fix that by using the existing and validated ndev variable instead of accessing attr->ndev directly.
--- net/smc/smc_ib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/smc/smc_ib.c +3 -3
@@ -198,9 +198,9 @@ int smc_ib_determine_gid(struct smc_ib_drcu_read_lock (); ndev =rdma_read_gid_attr_ndev_rcu (attr);if (!IS_ERR (ndev) && - ((!vlan_id && !is_vlan_dev (attr->ndev)) || - (vlan_id &&is_vlan_dev (attr->ndev) && -vlan_dev_vlan_id (attr->ndev) == vlan_id)) && + ((!vlan_id && !is_vlan_dev (ndev)) || + (vlan_id &&is_vlan_dev (ndev) && +vlan_dev_vlan_id (ndev) == vlan_id)) && attr->gid_type ==IB_GID_TYPE_ROCE ) {rcu_read_unlock ();if (gid)
Greg Kroah-Hartman
maintainerPATCH 34/252 net/tls: fix corrupted data in recvmsg
In reply to Greg Kroah-HartmanFrom: Vadim Fedorenko <[email protected]>
[ Upstream commit 3fe16edf6767decd640fa2654308bc64f8d656dc ]
If tcp socket has more data than Encrypted Handshake Message then tls_sw_recvmsg will try to decrypt next record instead of returning full control message to userspace as mentioned in comment. The next message - usually Application Data - gets corrupted because it uses zero copy for decryption that's why the data is not stored in skb for next iteration. Revert check to not decrypt next record if current is not Application Data.
--- net/tls/tls_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tls/tls_sw.c +1 -1
@@ -1913,7 +1913,7 @@ pick_next_record:* another message type */ msg->msg_flags |=MSG_EOR ; -if (ctx->control !=TLS_RECORD_TYPE_DATA ) +if (control !=TLS_RECORD_TYPE_DATA ) goto recv_end; }else {break ;
Greg Kroah-Hartman
maintainerPATCH 14/252 netdevsim: set .owner to THIS_MODULE
In reply to Greg Kroah-HartmanFrom: Taehee Yoo <[email protected]>
[ Upstream commit a5bbcbf29089a1252c201b1a7fd38151de355db9 ]
If THIS_MODULE is not set, the module would be removed while debugfs is being used.
It eventually makes kernel panic.
--- drivers/net/netdevsim/dev.c | 2 ++ drivers/net/netdevsim/health.c | 1 + drivers/net/netdevsim/udp_tunnels.c | 1 + 3 files changed, 4 insertions(+)
drivers/net/netdevsim/dev.c +2 -0
@@ -94,6 +94,7 @@ static const struct file_operations nsim .open = simple_open, .write = nsim_dev_take_snapshot_write, .llseek = generic_file_llseek, + .owner = THIS_MODULE, }; static ssize_t nsim_dev_trap_fa_cookie_read(struct file *file,
@@ -186,6 +187,7 @@ static const struct file_operations nsim .read = nsim_dev_trap_fa_cookie_read, .write = nsim_dev_trap_fa_cookie_write, .llseek = generic_file_llseek, + .owner = THIS_MODULE, };static int nsim_dev_debugfs_init (struct nsim_dev *nsim_dev)
drivers/net/netdevsim/health.c +1 -0
@@ -261,6 +261,7 @@ static const struct file_operations nsim .open = simple_open, .write = nsim_dev_health_break_write, .llseek = generic_file_llseek, + .owner = THIS_MODULE, };int nsim_dev_health_init (struct nsim_dev *nsim_dev,struct devlink *devlink)
drivers/net/netdevsim/udp_tunnels.c +1 -0
@@ -119,6 +119,7 @@ static const struct file_operations nsim .open = simple_open, .write = nsim_udp_tunnels_info_reset_write, .llseek = generic_file_llseek, + .owner = THIS_MODULE, }; int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev,
Greg Kroah-Hartman
maintainerPATCH 30/252 net: phy: mscc: remove non-MACSec compatible phy
In reply to Greg Kroah-HartmanFrom: Steen Hegelund <[email protected]>
[ Upstream commit aa6306a8481e0223f3783d24045daea80897238e ]
Selecting VSC8575 as a MACSec PHY was not correct
The relevant datasheet can be found here:
- VSC8575: https://www.microchip.com/wwwproducts/en/VSC8575
History:
v1 -> v2:
- Corrected the sha in the "Fixes:" tag
--- drivers/net/phy/mscc/mscc_macsec.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/phy/mscc/mscc_macsec.c +0 -1
@@ -981,7 +981,6 @@ int vsc8584_macsec_init(struct phy_devicswitch (phydev->phy_id & phydev->drv->phy_id_mask) {case PHY_ID_VSC856X : -case PHY_ID_VSC8575 :case PHY_ID_VSC8582 :case PHY_ID_VSC8584 :INIT_LIST_HEAD (&vsc8531->macsec_flows);
Greg Kroah-Hartman
maintainerPATCH 238/252 drm/i915/tgl: Fix Media power gate sequence.
In reply to Greg Kroah-HartmanFrom: Rodrigo Vivi <[email protected]>
commit 85a12d7eb8fe449cf38f1aa9ead5ca744729a98f upstream.
Some media power gates are disabled by default. commit 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating") tried to enable it, but it duplicated an existent register. So, the main PG setup sequences ended up overwriting it.
So, let's now merge this to the main PG setup sequence.
v2: (Chris): s/BIT/REG_BIT, remove useless comment,
remove useless =0, use the right gt, remove rc6 sequence doubt from commit message.
--- drivers/gpu/drm/i915/gt/intel_rc6.c | 22 +++++++++++++++++----- drivers/gpu/drm/i915/i915_reg.h | 12 +++++------- drivers/gpu/drm/i915/intel_pm.c | 13 ------------- 3 files changed, 22 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/gt/intel_rc6.c +17 -5
@@ -56,9 +56,12 @@ static inline void set(struct intel_uncostatic void gen11_rc6_enable (struct intel_rc6 *rc6) { -struct intel_uncore *uncore =rc6_to_uncore (rc6); +struct intel_gt *gt =rc6_to_gt (rc6); +struct intel_uncore *uncore = gt->uncore;struct intel_engine_cs *engine;enum intel_engine_id id; +u32 pg_enable; +int i;/* 2b: Program RC6 thresholds.*/ set (uncore,GEN6_RC6_WAKE_RATE_LIMIT ,54 <<16 |85 );
@@ -102,10 +105,19 @@ static void gen11_rc6_enable(struct inteGEN6_RC_CTL_RC6_ENABLE |GEN6_RC_CTL_EI_MODE (1 ); -set (uncore,GEN9_PG_ENABLE , -GEN9_RENDER_PG_ENABLE | -GEN9_MEDIA_PG_ENABLE | -GEN11_MEDIA_SAMPLER_PG_ENABLE ); + pg_enable = +GEN9_RENDER_PG_ENABLE | +GEN9_MEDIA_PG_ENABLE | +GEN11_MEDIA_SAMPLER_PG_ENABLE ; + +if (INTEL_GEN (gt->i915) >=12 ) { +for (i =0 ; i <I915_MAX_VCS ; i++) +if (HAS_ENGINE (gt,_VCS (i))) + pg_enable |= (VDN_HCP_POWERGATE_ENABLE (i) | +VDN_MFX_POWERGATE_ENABLE (i)); + } + +set (uncore,GEN9_PG_ENABLE , pg_enable); }static void gen9_rc6_enable (struct intel_rc6 *rc6)
drivers/gpu/drm/i915/i915_reg.h +5 -7
@@ -8974,10 +8974,6 @@ enum {#define GEN9_PWRGT_MEDIA_STATUS_MASK (1 << 0)#define GEN9_PWRGT_RENDER_STATUS_MASK (1 << 1) -#define POWERGATE_ENABLE _MMIO(0xa210) -#define VDN_HCP_POWERGATE_ENABLE (n) BIT(((n) * 2) + 3) -#define VDN_MFX_POWERGATE_ENABLE (n) BIT(((n) * 2) + 4) -#define GTFIFODBG _MMIO(0x120000)#define GT_FIFO_SBDEDICATE_FREE_ENTRY_CHV (0x1f << 20)#define GT_FIFO_FREE_ENTRIES_CHV (0x7f << 13)
@@ -9117,9 +9113,11 @@ enum {#define GEN9_MEDIA_PG_IDLE_HYSTERESIS _MMIO(0xA0C4)#define GEN9_RENDER_PG_IDLE_HYSTERESIS _MMIO(0xA0C8)#define GEN9_PG_ENABLE _MMIO(0xA210) -#define GEN9_RENDER_PG_ENABLE REG_BIT(0) -#define GEN9_MEDIA_PG_ENABLE REG_BIT(1) -#define GEN11_MEDIA_SAMPLER_PG_ENABLE REG_BIT(2) +#define GEN9_RENDER_PG_ENABLE REG_BIT(0) +#define GEN9_MEDIA_PG_ENABLE REG_BIT(1) +#define GEN11_MEDIA_SAMPLER_PG_ENABLE REG_BIT(2) +#define VDN_HCP_POWERGATE_ENABLE (n) REG_BIT(3 + 2 * (n)) +#define VDN_MFX_POWERGATE_ENABLE (n) REG_BIT(4 + 2 * (n))#define GEN8_PUSHBUS_CONTROL _MMIO(0xA248)#define GEN8_PUSHBUS_ENABLE _MMIO(0xA250)#define GEN8_PUSHBUS_SHIFT _MMIO(0xA25C)
drivers/gpu/drm/i915/intel_pm.c +0 -13
@@ -7124,23 +7124,10 @@ static void icl_init_clock_gating(structstatic void tgl_init_clock_gating (struct drm_i915_private *dev_priv) { -u32 vd_pg_enable =0 ; -unsigned int i; -/* Wa_1409120013:tgl */ I915_WRITE (ILK_DPFC_CHICKEN ,ILK_DPFC_CHICKEN_COMP_DUMMY_PIXEL ); -/* This is not a WA. Enable VD HCP & MFX_ENC powergate */ -for (i =0 ; i <I915_MAX_VCS ; i++) { -if (HAS_ENGINE (&dev_priv->gt,_VCS (i))) - vd_pg_enable |=VDN_HCP_POWERGATE_ENABLE (i) | -VDN_MFX_POWERGATE_ENABLE (i); - } - -I915_WRITE (POWERGATE_ENABLE , -I915_READ (POWERGATE_ENABLE ) | vd_pg_enable); -/* Wa_1409825376:tgl (pre-prod)*/ if (IS_TGL_REVID (dev_priv,TGL_REVID_A0 ,TGL_REVID_A0 )) I915_WRITE(GEN9_CLKGATE_DIS_3, I915_READ(GEN9_CLKGATE_DIS_3) |
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.9:
15 builds: 15 pass, 0 fail
26 boots: 26 pass, 0 fail
64 tests: 64 pass, 0 failLinux version: 5.9.11-rc1-g7939279fca79
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 426 pass: 426 fail: 0
Guenter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Summary
------------------------------------------------------------------------
kernel: 5.9.11-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.9.y
git commit: 7939279fca79f52c48861829cef3fe5d15529c42
git describe: v5.9.10-253-g7939279fca79
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.9.y/build/v5.9.10-253-g7939279fca79
No regressions (compared to build v5.9.10)
No fixes (compared to build v5.9.10)
Ran 47415 total tests in the following environments and test suites.
Environments
--------------
- arc
- arm
- arm64
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- juno-r2-compat
- juno-r2-kasan
- mips
- nxp-ls2088
- powerpc
- qemu-arm-clang
- qemu-arm64-clang
- qemu-arm64-kasan
- qemu-i386-clang
- qemu-x86_64-clang
- qemu-x86_64-kasan
- qemu_arm
- qemu_arm64
- qemu_arm64-compat
- qemu_i386
- qemu_x86_64
- qemu_x86_64-compat
- riscv
- s390
- sh
- sparc
- x15
- x86
- x86-kasan
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-tracing-tests
* perf
* v4l2-compliance
* ltp-controllers-tests
* ltp-syscalls-tests
* network-basic-tests
* ltp-cve-tests
* ltp-fs-tests
* ltp-hugetlb-tests
* ltp-mm-tests
* ltp-open-posix-tests
* kvm-unit-tests
* kunit
* kselftest
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 26 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.9:
15 builds: 15 pass, 0 fail 26 boots: 26 pass, 0 fail 64 tests: 64 pass, 0 fail
Quoted 7 lines
Linux version: 5.9.11-rc1-g7939279fca79
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04Tested-by Jon Hunter <[email protected]>
Thanks for testing these and letting me know.
gre gk-h
Greg Kroah-Hartman
maintainerQuoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
Quoted 6 lines
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 426 pass: 426 fail: 0Tested-by Guenter Roeck <[email protected]>
Thanks for testing them all and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 15 lines · Shuah Khan
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.
Quoted 8 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Tested-by Shuah Khan <[email protected]>
Thanks for testing them all and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 17 lines · Naresh Kamboju
Quoted 15 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.11 release. There are 252 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 25 Nov 2020 12:17:50 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.11-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.
Quoted 8 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Thanks for testing and letting me know.
greg k-h