Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 0174308

Browse files
committed
Merge tag 'v5.4.2' into 5.4
This is the 5.4.2 stable release
2 parents ca38fe2 + 5f8bc2b commit 0174308

File tree

52 files changed

+504
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+504
-206
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 1
4+
SUBLEVEL = 2
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/x86/include/asm/fpu/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static inline void __fpu_invalidate_fpregs_state(struct fpu *fpu)
509509

510510
static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu)
511511
{
512-
return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
512+
return fpu == this_cpu_read(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
513513
}
514514

515515
/*

drivers/base/platform.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,11 @@ struct bus_type platform_bus_type = {
12781278
};
12791279
EXPORT_SYMBOL_GPL(platform_bus_type);
12801280

1281+
static inline int __platform_match(struct device *dev, const void *drv)
1282+
{
1283+
return platform_match(dev, (struct device_driver *)drv);
1284+
}
1285+
12811286
/**
12821287
* platform_find_device_by_driver - Find a platform device with a given
12831288
* driver.
@@ -1288,7 +1293,7 @@ struct device *platform_find_device_by_driver(struct device *start,
12881293
const struct device_driver *drv)
12891294
{
12901295
return bus_find_device(&platform_bus_type, start, drv,
1291-
(void *)platform_match);
1296+
__platform_match);
12921297
}
12931298
EXPORT_SYMBOL_GPL(platform_find_device_by_driver);
12941299

drivers/crypto/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ config CRYPTO_DEV_TALITOS
287287
select CRYPTO_AUTHENC
288288
select CRYPTO_BLKCIPHER
289289
select CRYPTO_HASH
290+
select CRYPTO_LIB_DES
290291
select HW_RANDOM
291292
depends on FSL_SOC
292293
help

drivers/crypto/inside-secure/safexcel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ static void eip197_trc_cache_init(struct safexcel_crypto_priv *priv)
221221
/* Step #3: Determine log2 of hash table size */
222222
cs_ht_sz = __fls(asize - cs_rc_max) - 2;
223223
/* Step #4: determine current size of hash table in dwords */
224-
cs_ht_wc = 16<<cs_ht_sz; /* dwords, not admin words */
224+
cs_ht_wc = 16 << cs_ht_sz; /* dwords, not admin words */
225225
/* Step #5: add back excess words and see if we can fit more records */
226-
cs_rc_max = min_t(uint, cs_rc_abs_max, asize - (cs_ht_wc >> 4));
226+
cs_rc_max = min_t(uint, cs_rc_abs_max, asize - (cs_ht_wc >> 2));
227227

228228
/* Clear the cache RAMs */
229229
eip197_trc_cache_clear(priv, cs_rc_max, cs_ht_wc);

drivers/hid/hid-core.c

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type)
211211
return 0; /* we know nothing about this usage type */
212212
}
213213

214+
/*
215+
* Concatenate usage which defines 16 bits or less with the
216+
* currently defined usage page to form a 32 bit usage
217+
*/
218+
219+
static void complete_usage(struct hid_parser *parser, unsigned int index)
220+
{
221+
parser->local.usage[index] &= 0xFFFF;
222+
parser->local.usage[index] |=
223+
(parser->global.usage_page & 0xFFFF) << 16;
224+
}
225+
214226
/*
215227
* Add a usage to the temporary parser table.
216228
*/
@@ -222,6 +234,14 @@ static int hid_add_usage(struct hid_parser *parser, unsigned usage, u8 size)
222234
return -1;
223235
}
224236
parser->local.usage[parser->local.usage_index] = usage;
237+
238+
/*
239+
* If Usage item only includes usage id, concatenate it with
240+
* currently defined usage page
241+
*/
242+
if (size <= 2)
243+
complete_usage(parser, parser->local.usage_index);
244+
225245
parser->local.usage_size[parser->local.usage_index] = size;
226246
parser->local.collection_index[parser->local.usage_index] =
227247
parser->collection_stack_ptr ?
@@ -543,13 +563,32 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
543563
* usage value."
544564
*/
545565

546-
static void hid_concatenate_usage_page(struct hid_parser *parser)
566+
static void hid_concatenate_last_usage_page(struct hid_parser *parser)
547567
{
548568
int i;
569+
unsigned int usage_page;
570+
unsigned int current_page;
549571

550-
for (i = 0; i < parser->local.usage_index; i++)
551-
if (parser->local.usage_size[i] <= 2)
552-
parser->local.usage[i] += parser->global.usage_page << 16;
572+
if (!parser->local.usage_index)
573+
return;
574+
575+
usage_page = parser->global.usage_page;
576+
577+
/*
578+
* Concatenate usage page again only if last declared Usage Page
579+
* has not been already used in previous usages concatenation
580+
*/
581+
for (i = parser->local.usage_index - 1; i >= 0; i--) {
582+
if (parser->local.usage_size[i] > 2)
583+
/* Ignore extended usages */
584+
continue;
585+
586+
current_page = parser->local.usage[i] >> 16;
587+
if (current_page == usage_page)
588+
break;
589+
590+
complete_usage(parser, i);
591+
}
553592
}
554593

555594
/*
@@ -561,7 +600,7 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
561600
__u32 data;
562601
int ret;
563602

564-
hid_concatenate_usage_page(parser);
603+
hid_concatenate_last_usage_page(parser);
565604

566605
data = item_udata(item);
567606

@@ -772,7 +811,7 @@ static int hid_scan_main(struct hid_parser *parser, struct hid_item *item)
772811
__u32 data;
773812
int i;
774813

775-
hid_concatenate_usage_page(parser);
814+
hid_concatenate_last_usage_page(parser);
776815

777816
data = item_udata(item);
778817

drivers/misc/mei/bus.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,15 +873,16 @@ static const struct device_type mei_cl_device_type = {
873873

874874
/**
875875
* mei_cl_bus_set_name - set device name for me client device
876+
* <controller>-<client device>
877+
* Example: 0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb
876878
*
877879
* @cldev: me client device
878880
*/
879881
static inline void mei_cl_bus_set_name(struct mei_cl_device *cldev)
880882
{
881-
dev_set_name(&cldev->dev, "mei:%s:%pUl:%02X",
882-
cldev->name,
883-
mei_me_cl_uuid(cldev->me_cl),
884-
mei_me_cl_ver(cldev->me_cl));
883+
dev_set_name(&cldev->dev, "%s-%pUl",
884+
dev_name(cldev->bus->dev),
885+
mei_me_cl_uuid(cldev->me_cl));
885886
}
886887

887888
/**

drivers/misc/mei/hw-me-regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181

8282
#define MEI_DEV_ID_CMP_LP 0x02e0 /* Comet Point LP */
8383
#define MEI_DEV_ID_CMP_LP_3 0x02e4 /* Comet Point LP 3 (iTouch) */
84+
#define MEI_DEV_ID_CMP_V 0xA3BA /* Comet Point Lake V */
8485

8586
#define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */
8687

drivers/misc/mei/pci-me.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
9898

9999
{MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)},
100100
{MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)},
101+
{MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)},
101102

102103
{MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
103104

drivers/net/dsa/sja1105/sja1105_main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,15 @@ static int sja1105_parse_rgmii_delays(struct sja1105_private *priv,
594594
int i;
595595

596596
for (i = 0; i < SJA1105_NUM_PORTS; i++) {
597-
if (ports->role == XMII_MAC)
597+
if (ports[i].role == XMII_MAC)
598598
continue;
599599

600-
if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
601-
ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
600+
if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
601+
ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
602602
priv->rgmii_rx_delay[i] = true;
603603

604-
if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
605-
ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
604+
if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
605+
ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
606606
priv->rgmii_tx_delay[i] = true;
607607

608608
if ((priv->rgmii_rx_delay[i] || priv->rgmii_tx_delay[i]) &&

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4392,6 +4392,7 @@ static int macb_remove(struct platform_device *pdev)
43924392
mdiobus_free(bp->mii_bus);
43934393

43944394
unregister_netdev(dev);
4395+
tasklet_kill(&bp->hresp_err_tasklet);
43954396
pm_runtime_disable(&pdev->dev);
43964397
pm_runtime_dont_use_autosuspend(&pdev->dev);
43974398
if (!pm_runtime_suspended(&pdev->dev)) {

drivers/net/ethernet/google/gve/gve_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static int gve_alloc_queue_page_list(struct gve_priv *priv, u32 id,
544544
}
545545

546546
qpl->id = id;
547-
qpl->num_entries = pages;
547+
qpl->num_entries = 0;
548548
qpl->pages = kvzalloc(pages * sizeof(*qpl->pages), GFP_KERNEL);
549549
/* caller handles clean up */
550550
if (!qpl->pages)
@@ -562,6 +562,7 @@ static int gve_alloc_queue_page_list(struct gve_priv *priv, u32 id,
562562
/* caller handles clean up */
563563
if (err)
564564
return -ENOMEM;
565+
qpl->num_entries++;
565566
}
566567
priv->num_registered_pages += pages;
567568

drivers/net/ethernet/realtek/r8169_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,7 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)
15161516
rtl_lock_config_regs(tp);
15171517

15181518
device_set_wakeup_enable(tp_to_dev(tp), wolopts);
1519+
tp->dev->wol_enabled = wolopts ? 1 : 0;
15191520
}
15201521

15211522
static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
@@ -4118,7 +4119,7 @@ static void rtl_hw_jumbo_enable(struct rtl8169_private *tp)
41184119
case RTL_GIGA_MAC_VER_27 ... RTL_GIGA_MAC_VER_28:
41194120
r8168dp_hw_jumbo_enable(tp);
41204121
break;
4121-
case RTL_GIGA_MAC_VER_31 ... RTL_GIGA_MAC_VER_34:
4122+
case RTL_GIGA_MAC_VER_31 ... RTL_GIGA_MAC_VER_33:
41224123
r8168e_hw_jumbo_enable(tp);
41234124
break;
41244125
default:

drivers/net/macvlan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,11 @@ static void macvlan_broadcast_enqueue(struct macvlan_port *port,
359359
}
360360
spin_unlock(&port->bc_queue.lock);
361361

362+
schedule_work(&port->bc_work);
363+
362364
if (err)
363365
goto free_nskb;
364366

365-
schedule_work(&port->bc_work);
366367
return;
367368

368369
free_nskb:

drivers/net/phy/mdio_bus.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
6262
struct reset_control *reset = NULL;
6363

6464
if (mdiodev->dev.of_node)
65-
reset = devm_reset_control_get_exclusive(&mdiodev->dev,
66-
"phy");
65+
reset = of_reset_control_get_exclusive(mdiodev->dev.of_node,
66+
"phy");
6767
if (IS_ERR(reset)) {
6868
if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
6969
reset = NULL;
@@ -107,6 +107,8 @@ int mdiobus_unregister_device(struct mdio_device *mdiodev)
107107
if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev)
108108
return -EINVAL;
109109

110+
reset_control_put(mdiodev->reset_ctrl);
111+
110112
mdiodev->bus->mdio_map[mdiodev->addr] = NULL;
111113

112114
return 0;

drivers/net/slip/slip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,7 @@ static int slip_open(struct tty_struct *tty)
855855
sl->tty = NULL;
856856
tty->disc_data = NULL;
857857
clear_bit(SLF_INUSE, &sl->flags);
858+
sl_free_netdev(sl->dev);
858859
free_netdev(sl->dev);
859860

860861
err_exit:

drivers/platform/x86/hp-wmi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct bios_args {
6565
u32 command;
6666
u32 commandtype;
6767
u32 datasize;
68-
u32 data;
68+
u8 data[128];
6969
};
7070

7171
enum hp_wmi_commandtype {
@@ -216,7 +216,7 @@ static int hp_wmi_perform_query(int query, enum hp_wmi_command command,
216216
.command = command,
217217
.commandtype = query,
218218
.datasize = insize,
219-
.data = 0,
219+
.data = { 0 },
220220
};
221221
struct acpi_buffer input = { sizeof(struct bios_args), &args };
222222
struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -228,7 +228,7 @@ static int hp_wmi_perform_query(int query, enum hp_wmi_command command,
228228

229229
if (WARN_ON(insize > sizeof(args.data)))
230230
return -EINVAL;
231-
memcpy(&args.data, buffer, insize);
231+
memcpy(&args.data[0], buffer, insize);
232232

233233
wmi_evaluate_method(HPWMI_BIOS_GUID, 0, mid, &input, &output);
234234

@@ -380,7 +380,7 @@ static int hp_wmi_rfkill2_refresh(void)
380380
int err, i;
381381

382382
err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state,
383-
0, sizeof(state));
383+
sizeof(state), sizeof(state));
384384
if (err)
385385
return err;
386386

@@ -778,7 +778,7 @@ static int __init hp_wmi_rfkill2_setup(struct platform_device *device)
778778
int err, i;
779779

780780
err = hp_wmi_perform_query(HPWMI_WIRELESS2_QUERY, HPWMI_READ, &state,
781-
0, sizeof(state));
781+
sizeof(state), sizeof(state));
782782
if (err)
783783
return err < 0 ? err : -EINVAL;
784784

drivers/staging/rtl8192e/rtl8192e/rtl_core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,14 +1616,15 @@ static void _rtl92e_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
16161616
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
16171617
skb_push(skb, priv->rtllib->tx_headroom);
16181618
ret = _rtl92e_tx(dev, skb);
1619-
if (ret != 0)
1620-
kfree_skb(skb);
16211619

16221620
if (queue_index != MGNT_QUEUE) {
16231621
priv->rtllib->stats.tx_bytes += (skb->len -
16241622
priv->rtllib->tx_headroom);
16251623
priv->rtllib->stats.tx_packets++;
16261624
}
1625+
1626+
if (ret != 0)
1627+
kfree_skb(skb);
16271628
}
16281629

16291630
static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)

drivers/staging/rtl8723bs/os_dep/sdio_intf.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,13 @@
1818
static const struct sdio_device_id sdio_ids[] =
1919
{
2020
{ SDIO_DEVICE(0x024c, 0x0523), },
21+
{ SDIO_DEVICE(0x024c, 0x0525), },
2122
{ SDIO_DEVICE(0x024c, 0x0623), },
2223
{ SDIO_DEVICE(0x024c, 0x0626), },
2324
{ SDIO_DEVICE(0x024c, 0xb723), },
2425
{ /* end: all zeroes */ },
2526
};
26-
static const struct acpi_device_id acpi_ids[] = {
27-
{"OBDA8723", 0x0000},
28-
{}
29-
};
30-
3127
MODULE_DEVICE_TABLE(sdio, sdio_ids);
32-
MODULE_DEVICE_TABLE(acpi, acpi_ids);
3328

3429
static int rtw_drv_init(struct sdio_func *func, const struct sdio_device_id *id);
3530
static void rtw_dev_remove(struct sdio_func *func);

0 commit comments

Comments
 (0)