Skip to content

Commit 9fdcb0a

Browse files
committed
Merge tag 'v5.10.109' into linux-5.10-mchp
This is the 5.10.109 stable release Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
2 parents fae0977 + d9c5818 commit 9fdcb0a

File tree

37 files changed

+421
-148
lines changed

37 files changed

+421
-148
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 = 10
4-
SUBLEVEL = 108
4+
SUBLEVEL = 109
55
EXTRAVERSION = -linux4microchip-2021.10
66
NAME = Dare mighty things
77

arch/nds32/include/asm/uaccess.h

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ static inline void set_fs(mm_segment_t fs)
7070
* versions are void (ie, don't return a value as such).
7171
*/
7272

73-
#define get_user __get_user \
74-
75-
#define __get_user(x, ptr) \
73+
#define get_user(x, ptr) \
7674
({ \
7775
long __gu_err = 0; \
7876
__get_user_check((x), (ptr), __gu_err); \
@@ -85,6 +83,14 @@ static inline void set_fs(mm_segment_t fs)
8583
(void)0; \
8684
})
8785

86+
#define __get_user(x, ptr) \
87+
({ \
88+
long __gu_err = 0; \
89+
const __typeof__(*(ptr)) __user *__p = (ptr); \
90+
__get_user_err((x), __p, (__gu_err)); \
91+
__gu_err; \
92+
})
93+
8894
#define __get_user_check(x, ptr, err) \
8995
({ \
9096
const __typeof__(*(ptr)) __user *__p = (ptr); \
@@ -165,12 +171,18 @@ do { \
165171
: "r"(addr), "i"(-EFAULT) \
166172
: "cc")
167173

168-
#define put_user __put_user \
174+
#define put_user(x, ptr) \
175+
({ \
176+
long __pu_err = 0; \
177+
__put_user_check((x), (ptr), __pu_err); \
178+
__pu_err; \
179+
})
169180

170181
#define __put_user(x, ptr) \
171182
({ \
172183
long __pu_err = 0; \
173-
__put_user_err((x), (ptr), __pu_err); \
184+
__typeof__(*(ptr)) __user *__p = (ptr); \
185+
__put_user_err((x), __p, __pu_err); \
174186
__pu_err; \
175187
})
176188

arch/x86/kernel/acpi/boot.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,17 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d)
13401340
return 0;
13411341
}
13421342

1343+
static int __init disable_acpi_xsdt(const struct dmi_system_id *d)
1344+
{
1345+
if (!acpi_force) {
1346+
pr_notice("%s detected: force use of acpi=rsdt\n", d->ident);
1347+
acpi_gbl_do_not_use_xsdt = TRUE;
1348+
} else {
1349+
pr_notice("Warning: DMI blacklist says broken, but acpi XSDT forced\n");
1350+
}
1351+
return 0;
1352+
}
1353+
13431354
static int __init dmi_disable_acpi(const struct dmi_system_id *d)
13441355
{
13451356
if (!acpi_force) {
@@ -1464,6 +1475,19 @@ static const struct dmi_system_id acpi_dmi_table[] __initconst = {
14641475
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
14651476
},
14661477
},
1478+
/*
1479+
* Boxes that need ACPI XSDT use disabled due to corrupted tables
1480+
*/
1481+
{
1482+
.callback = disable_acpi_xsdt,
1483+
.ident = "Advantech DAC-BJ01",
1484+
.matches = {
1485+
DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
1486+
DMI_MATCH(DMI_PRODUCT_NAME, "Bearlake CRB Board"),
1487+
DMI_MATCH(DMI_BIOS_VERSION, "V1.12"),
1488+
DMI_MATCH(DMI_BIOS_DATE, "02/01/2011"),
1489+
},
1490+
},
14671491
{}
14681492
};
14691493

drivers/acpi/battery.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
6666

6767
static const struct acpi_device_id battery_device_ids[] = {
6868
{"PNP0C0A", 0},
69+
70+
/* Microsoft Surface Go 3 */
71+
{"MSHW0146", 0},
72+
6973
{"", 0},
7074
};
7175

@@ -1171,6 +1175,14 @@ static const struct dmi_system_id bat_dmi_table[] __initconst = {
11711175
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad"),
11721176
},
11731177
},
1178+
{
1179+
/* Microsoft Surface Go 3 */
1180+
.callback = battery_notification_delay_quirk,
1181+
.matches = {
1182+
DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
1183+
DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go 3"),
1184+
},
1185+
},
11741186
{},
11751187
};
11761188

drivers/acpi/video_detect.c

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,81 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
409409
DMI_MATCH(DMI_PRODUCT_NAME, "GA503"),
410410
},
411411
},
412+
/*
413+
* Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a
414+
* working native and video interface. However the default detection
415+
* mechanism first registers the video interface before unregistering
416+
* it again and switching to the native interface during boot. This
417+
* results in a dangling SBIOS request for backlight change for some
418+
* reason, causing the backlight to switch to ~2% once per boot on the
419+
* first power cord connect or disconnect event. Setting the native
420+
* interface explicitly circumvents this buggy behaviour, by avoiding
421+
* the unregistering process.
422+
*/
423+
{
424+
.callback = video_detect_force_native,
425+
.ident = "Clevo NL5xRU",
426+
.matches = {
427+
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
428+
DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
429+
},
430+
},
431+
{
432+
.callback = video_detect_force_native,
433+
.ident = "Clevo NL5xRU",
434+
.matches = {
435+
DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"),
436+
DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
437+
},
438+
},
439+
{
440+
.callback = video_detect_force_native,
441+
.ident = "Clevo NL5xRU",
442+
.matches = {
443+
DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
444+
DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
445+
},
446+
},
447+
{
448+
.callback = video_detect_force_native,
449+
.ident = "Clevo NL5xRU",
450+
.matches = {
451+
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
452+
DMI_MATCH(DMI_BOARD_NAME, "AURA1501"),
453+
},
454+
},
455+
{
456+
.callback = video_detect_force_native,
457+
.ident = "Clevo NL5xRU",
458+
.matches = {
459+
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
460+
DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"),
461+
},
462+
},
463+
{
464+
.callback = video_detect_force_native,
465+
.ident = "Clevo NL5xNU",
466+
.matches = {
467+
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
468+
DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
469+
},
470+
},
471+
{
472+
.callback = video_detect_force_native,
473+
.ident = "Clevo NL5xNU",
474+
.matches = {
475+
DMI_MATCH(DMI_SYS_VENDOR, "SchenkerTechnologiesGmbH"),
476+
DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
477+
},
478+
},
479+
{
480+
.callback = video_detect_force_native,
481+
.ident = "Clevo NL5xNU",
482+
.matches = {
483+
DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
484+
DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"),
485+
},
486+
},
412487

413488
/*
414489
* Desktops which falsely report a backlight and which our heuristics

drivers/char/tpm/tpm-dev-common.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ static void tpm_dev_async_work(struct work_struct *work)
7070
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
7171
sizeof(priv->data_buffer));
7272
tpm_put_ops(priv->chip);
73-
if (ret > 0) {
73+
74+
/*
75+
* If ret is > 0 then tpm_dev_transmit returned the size of the
76+
* response. If ret is < 0 then tpm_dev_transmit failed and
77+
* returned an error code.
78+
*/
79+
if (ret != 0) {
7480
priv->response_length = ret;
7581
mod_timer(&priv->user_read_timer, jiffies + (120 * HZ));
7682
}

drivers/char/tpm/tpm2-space.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ int tpm2_init_space(struct tpm_space *space, unsigned int buf_size)
5858

5959
void tpm2_del_space(struct tpm_chip *chip, struct tpm_space *space)
6060
{
61-
mutex_lock(&chip->tpm_mutex);
62-
if (!tpm_chip_start(chip)) {
61+
62+
if (tpm_try_get_ops(chip) == 0) {
6363
tpm2_flush_sessions(chip, space);
64-
tpm_chip_stop(chip);
64+
tpm_put_ops(chip);
6565
}
66-
mutex_unlock(&chip->tpm_mutex);
66+
6767
kfree(space->context_buf);
6868
kfree(space->session_buf);
6969
}

drivers/crypto/qat/qat_common/qat_crypto.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ int qat_crypto_dev_config(struct adf_accel_dev *accel_dev)
126126
goto err;
127127
if (adf_cfg_section_add(accel_dev, "Accelerator0"))
128128
goto err;
129+
130+
/* Temporarily set the number of crypto instances to zero to avoid
131+
* registering the crypto algorithms.
132+
* This will be removed when the algorithms will support the
133+
* CRYPTO_TFM_REQ_MAY_BACKLOG flag
134+
*/
135+
instances = 0;
136+
129137
for (i = 0; i < instances; i++) {
130138
val = i;
131139
snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_BANK_NUM, i);

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,12 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
696696
buf_pool->rx_skb[skb_index] = NULL;
697697

698698
datalen = xgene_enet_get_data_len(le64_to_cpu(raw_desc->m1));
699+
700+
/* strip off CRC as HW isn't doing this */
701+
nv = GET_VAL(NV, le64_to_cpu(raw_desc->m0));
702+
if (!nv)
703+
datalen -= 4;
704+
699705
skb_put(skb, datalen);
700706
prefetch(skb->data - NET_IP_ALIGN);
701707
skb->protocol = eth_type_trans(skb, ndev);
@@ -717,12 +723,8 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
717723
}
718724
}
719725

720-
nv = GET_VAL(NV, le64_to_cpu(raw_desc->m0));
721-
if (!nv) {
722-
/* strip off CRC as HW isn't doing this */
723-
datalen -= 4;
726+
if (!nv)
724727
goto skip_jumbo;
725-
}
726728

727729
slots = page_pool->slots - 1;
728730
head = page_pool->head;

drivers/net/wireless/ath/regd.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,14 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
666666

667667
/*
668668
* Some users have reported their EEPROM programmed with
669-
* 0x8000 or 0x0 set, this is not a supported regulatory
670-
* domain but since we have more than one user with it we
671-
* need a solution for them. We default to 0x64, which is
672-
* the default Atheros world regulatory domain.
669+
* 0x8000 set, this is not a supported regulatory domain
670+
* but since we have more than one user with it we need
671+
* a solution for them. We default to 0x64, which is the
672+
* default Atheros world regulatory domain.
673673
*/
674674
static void ath_regd_sanitize(struct ath_regulatory *reg)
675675
{
676-
if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
676+
if (reg->current_rd != COUNTRY_ERD_FLAG)
677677
return;
678678
printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
679679
reg->current_rd = 0x64;

0 commit comments

Comments
 (0)