mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
Compare commits
33 Commits
c8ebd43345
...
b69053dd3f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b69053dd3f | ||
|
|
af7809f037 | ||
|
|
9528d5c091 | ||
|
|
349bd28a86 | ||
|
|
c6703f10c8 | ||
|
|
6a02651c4c | ||
|
|
66e245db16 | ||
|
|
e44c42c830 | ||
|
|
499d987b65 | ||
|
|
a22d893f49 | ||
|
|
a051171502 | ||
|
|
063185ba32 | ||
|
|
cbf3dc3260 | ||
|
|
d37cd54ebe | ||
|
|
acf44a2361 | ||
|
|
665077d78d | ||
|
|
193120dddd | ||
|
|
30fb98ec34 | ||
|
|
1e91505038 | ||
|
|
8bb808cea3 | ||
|
|
dc85a46928 | ||
|
|
00c22b1e84 | ||
|
|
20e20b147c | ||
|
|
15dd100349 | ||
|
|
1461209cf8 | ||
|
|
0512606360 | ||
|
|
a5b9fdd33c | ||
|
|
f13bce715d | ||
|
|
e521dc1687 | ||
|
|
4dcb6e4af1 | ||
|
|
7f3c2499da | ||
|
|
a584644a49 | ||
|
|
433f7744cb |
@ -3019,7 +3019,7 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
|
||||
}
|
||||
|
||||
hdr = (const void *)(fw->data + fw->size - sizeof(*hdr));
|
||||
dev_info(dev->dev, "WM Firmware Version: %.10s, Build Time: %.15s\n",
|
||||
dev_info(dev->dev, "WM Firmware Version: %.10s, Build Time: %.15s",
|
||||
hdr->fw_ver, hdr->build_date);
|
||||
|
||||
ret = mt76_connac_mcu_send_ram_firmware(dev, hdr, fw->data, false);
|
||||
@ -3048,7 +3048,7 @@ int mt76_connac2_load_ram(struct mt76_dev *dev, const char *fw_wm,
|
||||
}
|
||||
|
||||
hdr = (const void *)(fw->data + fw->size - sizeof(*hdr));
|
||||
dev_info(dev->dev, "WA Firmware Version: %.10s, Build Time: %.15s\n",
|
||||
dev_info(dev->dev, "WA Firmware Version: %.10s, Build Time: %.15s",
|
||||
hdr->fw_ver, hdr->build_date);
|
||||
|
||||
ret = mt76_connac_mcu_send_ram_firmware(dev, hdr, fw->data, true);
|
||||
@ -3101,7 +3101,6 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
|
||||
int i, ret, sem, max_len = mt76_is_sdio(dev) ? 2048 : 4096;
|
||||
const struct mt76_connac2_patch_hdr *hdr;
|
||||
const struct firmware *fw = NULL;
|
||||
char build_date[17];
|
||||
|
||||
sem = mt76_connac_mcu_patch_sem_ctrl(dev, true);
|
||||
switch (sem) {
|
||||
@ -3125,11 +3124,8 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
|
||||
}
|
||||
|
||||
hdr = (const void *)fw->data;
|
||||
strscpy(build_date, hdr->build_date, sizeof(build_date));
|
||||
build_date[16] = '\0';
|
||||
strim(build_date);
|
||||
dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
|
||||
be32_to_cpu(hdr->hw_sw_ver), build_date);
|
||||
dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s",
|
||||
be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
|
||||
|
||||
for (i = 0; i < be32_to_cpu(hdr->desc.n_region); i++) {
|
||||
struct mt76_connac2_patch_sec *sec;
|
||||
|
||||
@ -801,18 +801,18 @@ static const struct mlxbf_pmc_events mlxbf_pmc_llt_miss_events[] = {
|
||||
{11, "GDC_MISS_MACHINE_CHI_TXDAT"},
|
||||
{12, "GDC_MISS_MACHINE_CHI_RXDAT"},
|
||||
{13, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_0"},
|
||||
{14, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_1 "},
|
||||
{14, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_1"},
|
||||
{15, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_2"},
|
||||
{16, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_3 "},
|
||||
{17, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_0 "},
|
||||
{18, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_1 "},
|
||||
{19, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_2 "},
|
||||
{20, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_3 "},
|
||||
{16, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC0_3"},
|
||||
{17, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_0"},
|
||||
{18, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_1"},
|
||||
{19, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_2"},
|
||||
{20, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC1_3"},
|
||||
{21, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE0_0"},
|
||||
{22, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE0_1"},
|
||||
{23, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE0_2"},
|
||||
{24, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE0_3"},
|
||||
{25, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE1_0 "},
|
||||
{25, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE1_0"},
|
||||
{26, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE1_1"},
|
||||
{27, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE1_2"},
|
||||
{28, "GDC_MISS_MACHINE_G_FIFO_FF_EXEC_DONE1_3"},
|
||||
|
||||
@ -449,12 +449,27 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_max = 80,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_max = 80,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 80
|
||||
.ppt_pl3_fppt_max = 80,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_def = 45,
|
||||
.ppt_pl1_spl_max = 65,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_def = 54,
|
||||
.ppt_pl2_sppt_max = 65,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 65,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.dc_data = NULL,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -552,6 +567,42 @@ static const struct dmi_system_id power_limits[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "FA608UM"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_def = 45,
|
||||
.ppt_pl1_spl_max = 90,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_def = 54,
|
||||
.ppt_pl2_sppt_max = 90,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_def = 90,
|
||||
.ppt_pl3_fppt_max = 65,
|
||||
.nv_dynamic_boost_min = 10,
|
||||
.nv_dynamic_boost_max = 15,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_tgp_min = 55,
|
||||
.nv_tgp_max = 100,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_def = 45,
|
||||
.ppt_pl1_spl_max = 65,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_def = 54,
|
||||
.ppt_pl2_sppt_max = 65,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 65,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "FA608WI"),
|
||||
@ -822,6 +873,38 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GA403WR"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_max = 80,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_max = 80,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 80,
|
||||
.nv_dynamic_boost_min = 0,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_tgp_min = 80,
|
||||
.nv_tgp_max = 95,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_max = 35,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_max = 35,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 65,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GA503QR"),
|
||||
@ -950,6 +1033,35 @@ static const struct dmi_system_id power_limits[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GU605CR"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 30,
|
||||
.ppt_pl1_spl_max = 85,
|
||||
.ppt_pl2_sppt_min = 38,
|
||||
.ppt_pl2_sppt_max = 110,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 20,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_tgp_min = 80,
|
||||
.nv_tgp_def = 90,
|
||||
.nv_tgp_max = 105,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 30,
|
||||
.ppt_pl1_spl_max = 85,
|
||||
.ppt_pl2_sppt_min = 38,
|
||||
.ppt_pl2_sppt_max = 110,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GU605CW"),
|
||||
@ -1260,6 +1372,35 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "G615LR"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 28,
|
||||
.ppt_pl1_spl_def = 140,
|
||||
.ppt_pl1_spl_max = 175,
|
||||
.ppt_pl2_sppt_min = 28,
|
||||
.ppt_pl2_sppt_max = 175,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_tgp_min = 65,
|
||||
.nv_tgp_max = 115,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 25,
|
||||
.ppt_pl1_spl_max = 55,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_max = 70,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "G634J"),
|
||||
@ -1426,6 +1567,35 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "G835LW"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 28,
|
||||
.ppt_pl1_spl_def = 140,
|
||||
.ppt_pl1_spl_max = 175,
|
||||
.ppt_pl2_sppt_min = 28,
|
||||
.ppt_pl2_sppt_max = 175,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_tgp_min = 80,
|
||||
.nv_tgp_max = 150,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 25,
|
||||
.ppt_pl1_spl_max = 55,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_max = 70,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "H7606W"),
|
||||
|
||||
@ -580,6 +580,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = {
|
||||
{ KE_KEY, 0x2a, { KEY_SELECTIVE_SCREENSHOT } },
|
||||
{ KE_IGNORE, 0x2b, }, /* PrintScreen (also send via PS/2) on newer models */
|
||||
{ KE_IGNORE, 0x2c, }, /* CapsLock (also send via PS/2) on newer models */
|
||||
{ KE_KEY, 0x2d, { KEY_DISPLAYTOGGLE } },
|
||||
{ KE_KEY, 0x30, { KEY_VOLUMEUP } },
|
||||
{ KE_KEY, 0x31, { KEY_VOLUMEDOWN } },
|
||||
{ KE_KEY, 0x32, { KEY_MUTE } },
|
||||
|
||||
@ -89,6 +89,30 @@ static struct awcc_quirks generic_quirks = {
|
||||
static struct awcc_quirks empty_quirks;
|
||||
|
||||
static const struct dmi_system_id awcc_dmi_table[] __initconst = {
|
||||
{
|
||||
.ident = "Alienware 16 Area-51",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware 16 Area-51"),
|
||||
},
|
||||
.driver_data = &g_series_quirks,
|
||||
},
|
||||
{
|
||||
.ident = "Alienware 16X Aurora",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware 16X Aurora"),
|
||||
},
|
||||
.driver_data = &g_series_quirks,
|
||||
},
|
||||
{
|
||||
.ident = "Alienware 18 Area-51",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware 18 Area-51"),
|
||||
},
|
||||
.driver_data = &g_series_quirks,
|
||||
},
|
||||
{
|
||||
.ident = "Alienware 16 Aurora",
|
||||
.matches = {
|
||||
@ -161,6 +185,14 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = {
|
||||
},
|
||||
.driver_data = &generic_quirks,
|
||||
},
|
||||
{
|
||||
.ident = "Alienware x16",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x16"),
|
||||
},
|
||||
.driver_data = &g_series_quirks,
|
||||
},
|
||||
{
|
||||
.ident = "Alienware x17",
|
||||
.matches = {
|
||||
|
||||
@ -44,6 +44,7 @@ static const struct dmi_system_id lis3lv02d_devices[] __initconst = {
|
||||
/*
|
||||
* Additional individual entries were added after verification.
|
||||
*/
|
||||
DELL_LIS3LV02D_DMI_ENTRY("Latitude 5400", 0x29),
|
||||
DELL_LIS3LV02D_DMI_ENTRY("Latitude 5480", 0x29),
|
||||
DELL_LIS3LV02D_DMI_ENTRY("Latitude 5500", 0x29),
|
||||
DELL_LIS3LV02D_DMI_ENTRY("Latitude E6330", 0x29),
|
||||
|
||||
@ -207,7 +207,7 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum
|
||||
case PREREQUISITES:
|
||||
size = min_t(u32, enum_data->common.prerequisites_size, MAX_PREREQUISITES_SIZE);
|
||||
for (reqs = 0; reqs < size; reqs++) {
|
||||
if (elem >= enum_obj_count) {
|
||||
if (elem + reqs >= enum_obj_count) {
|
||||
pr_err("Error enum-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -255,7 +255,7 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum
|
||||
|
||||
for (pos_values = 0; pos_values < size && pos_values < MAX_VALUES_SIZE;
|
||||
pos_values++) {
|
||||
if (elem >= enum_obj_count) {
|
||||
if (elem + pos_values >= enum_obj_count) {
|
||||
pr_err("Error enum-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ static int hp_populate_integer_elements_from_package(union acpi_object *integer_
|
||||
size = min_t(u32, integer_data->common.prerequisites_size, MAX_PREREQUISITES_SIZE);
|
||||
|
||||
for (reqs = 0; reqs < size; reqs++) {
|
||||
if (elem >= integer_obj_count) {
|
||||
if (elem + reqs >= integer_obj_count) {
|
||||
pr_err("Error elem-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -216,6 +216,11 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
|
||||
size = min_t(u32, ordered_list_data->common.prerequisites_size,
|
||||
MAX_PREREQUISITES_SIZE);
|
||||
for (reqs = 0; reqs < size; reqs++) {
|
||||
if (elem + reqs >= order_obj_count) {
|
||||
pr_err("Error elem-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = hp_convert_hexstr_to_str(order_obj[elem + reqs].string.pointer,
|
||||
order_obj[elem + reqs].string.length,
|
||||
&str_value, &value_len);
|
||||
|
||||
@ -303,6 +303,11 @@ static int hp_populate_password_elements_from_package(union acpi_object *passwor
|
||||
MAX_PREREQUISITES_SIZE);
|
||||
|
||||
for (reqs = 0; reqs < size; reqs++) {
|
||||
if (elem + reqs >= password_obj_count) {
|
||||
pr_err("Error elem-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = hp_convert_hexstr_to_str(password_obj[elem + reqs].string.pointer,
|
||||
password_obj[elem + reqs].string.length,
|
||||
&str_value, &value_len);
|
||||
|
||||
@ -217,7 +217,7 @@ static int hp_populate_string_elements_from_package(union acpi_object *string_ob
|
||||
MAX_PREREQUISITES_SIZE);
|
||||
|
||||
for (reqs = 0; reqs < size; reqs++) {
|
||||
if (elem >= string_obj_count) {
|
||||
if (elem + reqs >= string_obj_count) {
|
||||
pr_err("Error elem-objects package is too small\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ static int __init ibm_rtl_init(void) {
|
||||
/* search for the _RTL_ signature at the start of the table */
|
||||
for (i = 0 ; i < ebda_size/sizeof(unsigned int); i++) {
|
||||
struct ibm_rtl_table __iomem * tmp;
|
||||
tmp = (struct ibm_rtl_table __iomem *) (ebda_map+i);
|
||||
tmp = (struct ibm_rtl_table __iomem *) (ebda_map + i*sizeof(unsigned int));
|
||||
if ((readq(&tmp->signature) & RTL_MASK) == RTL_SIGNATURE) {
|
||||
phys_addr_t addr;
|
||||
unsigned int plen;
|
||||
|
||||
@ -503,8 +503,10 @@ static int pmt_features_discovery(struct pmt_features_priv *priv,
|
||||
|
||||
ret = kobject_init_and_add(&feature->kobj, ktype, &priv->dev->kobj,
|
||||
"%s", pmt_feature_names[feature->id]);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
kobject_put(&feature->kobj);
|
||||
return ret;
|
||||
}
|
||||
|
||||
kobject_uevent(&feature->kobj, KOBJ_ADD);
|
||||
pmt_features_add_feat(feature);
|
||||
@ -546,9 +548,9 @@ static int pmt_features_probe(struct auxiliary_device *auxdev, const struct auxi
|
||||
priv->dev = device_create(&intel_pmt_class, &auxdev->dev, MKDEV(0, 0), priv,
|
||||
"%s-%s", "features", dev_name(priv->parent));
|
||||
if (IS_ERR(priv->dev))
|
||||
return dev_err_probe(priv->dev, PTR_ERR(priv->dev),
|
||||
return dev_err_probe(&auxdev->dev, PTR_ERR(priv->dev),
|
||||
"Could not create %s-%s device node\n",
|
||||
"features", dev_name(priv->dev));
|
||||
"features", dev_name(priv->parent));
|
||||
|
||||
/* Initialize each feature */
|
||||
for (i = 0; i < ivdev->num_resources; i++) {
|
||||
|
||||
@ -1367,7 +1367,7 @@ static const struct key_entry ideapad_keymap[] = {
|
||||
/* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
|
||||
{ KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
|
||||
/* shift + prtsc */
|
||||
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
|
||||
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
|
||||
{ KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
|
||||
{ KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
|
||||
|
||||
|
||||
@ -195,7 +195,7 @@ static const struct tlmi_cert_guids thinkpad_cert_guid = {
|
||||
};
|
||||
|
||||
static const struct tlmi_cert_guids thinkcenter_cert_guid = {
|
||||
.thumbprint = NULL,
|
||||
.thumbprint = LENOVO_CERT_THUMBPRINT_GUID, /* Same GUID as TP */
|
||||
.set_bios_setting = LENOVO_TC_SET_BIOS_SETTING_CERT_GUID,
|
||||
.save_bios_setting = LENOVO_TC_SAVE_BIOS_SETTING_CERT_GUID,
|
||||
.cert_to_password = LENOVO_TC_CERT_TO_PASSWORD_GUID,
|
||||
@ -709,6 +709,10 @@ static ssize_t cert_thumbprint(char *buf, const char *arg, int count)
|
||||
if (!tlmi_priv.cert_guid->thumbprint)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/* Older ThinkCenter BIOS may not have support */
|
||||
if (!wmi_has_guid(tlmi_priv.cert_guid->thumbprint))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
status = wmi_evaluate_method(tlmi_priv.cert_guid->thumbprint, 0, 0, &input, &output);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
kfree(output.pointer);
|
||||
|
||||
@ -1130,6 +1130,9 @@ static void __exit msi_cleanup(void)
|
||||
sysfs_remove_group(&msipf_device->dev.kobj, &msipf_attribute_group);
|
||||
if (!quirks->old_ec_model && threeg_exists)
|
||||
device_remove_file(&msipf_device->dev, &dev_attr_threeg);
|
||||
if (quirks->old_ec_model)
|
||||
sysfs_remove_group(&msipf_device->dev.kobj,
|
||||
&msipf_old_attribute_group);
|
||||
platform_device_unregister(msipf_device);
|
||||
platform_driver_unregister(&msipf_driver);
|
||||
backlight_device_unregister(msibl_device);
|
||||
|
||||
@ -442,12 +442,13 @@ static int galaxybook_battery_ext_property_get(struct power_supply *psy,
|
||||
union power_supply_propval *val)
|
||||
{
|
||||
struct samsung_galaxybook *galaxybook = ext_data;
|
||||
u8 value;
|
||||
int err;
|
||||
|
||||
if (psp != POWER_SUPPLY_PROP_CHARGE_CONTROL_END_THRESHOLD)
|
||||
return -EINVAL;
|
||||
|
||||
err = charge_control_end_threshold_acpi_get(galaxybook, (u8 *)&val->intval);
|
||||
err = charge_control_end_threshold_acpi_get(galaxybook, &value);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@ -455,8 +456,10 @@ static int galaxybook_battery_ext_property_get(struct power_supply *psy,
|
||||
* device stores "no end threshold" as 0 instead of 100;
|
||||
* if device has 0, report 100
|
||||
*/
|
||||
if (val->intval == 0)
|
||||
val->intval = 100;
|
||||
if (value == 0)
|
||||
value = 100;
|
||||
|
||||
val->intval = value;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1844,6 +1844,13 @@ static const struct dmi_system_id uniwill_dmi_table[] __initconst = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "X6AR5xxY_mLED"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "TUXEDO Book BA15 Gen10 AMD",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "PF5PU1G"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "TUXEDO Pulse 14 Gen1 AMD",
|
||||
.matches = {
|
||||
|
||||
@ -561,7 +561,7 @@ nvgrace_gpu_map_and_read(struct nvgrace_gpu_pci_core_device *nvdev,
|
||||
ret = vfio_pci_core_do_io_rw(&nvdev->core_device, false,
|
||||
nvdev->resmem.ioaddr,
|
||||
buf, offset, mem_count,
|
||||
0, 0, false);
|
||||
0, 0, false, VFIO_PCI_IO_WIDTH_8);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -693,7 +693,7 @@ nvgrace_gpu_map_and_write(struct nvgrace_gpu_pci_core_device *nvdev,
|
||||
ret = vfio_pci_core_do_io_rw(&nvdev->core_device, false,
|
||||
nvdev->resmem.ioaddr,
|
||||
(char __user *)buf, pos, mem_count,
|
||||
0, 0, true);
|
||||
0, 0, true, VFIO_PCI_IO_WIDTH_8);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@ -292,8 +292,11 @@ static int pds_vfio_dirty_enable(struct pds_vfio_pci_device *pds_vfio,
|
||||
len = num_ranges * sizeof(*region_info);
|
||||
|
||||
node = interval_tree_iter_first(ranges, 0, ULONG_MAX);
|
||||
if (!node)
|
||||
return -EINVAL;
|
||||
if (!node) {
|
||||
err = -EINVAL;
|
||||
goto out_free_region_info;
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_ranges; i++) {
|
||||
struct pds_lm_dirty_region_info *ri = ®ion_info[i];
|
||||
u64 region_size = node->last - node->start + 1;
|
||||
|
||||
@ -135,7 +135,8 @@ VFIO_IORDWR(64)
|
||||
ssize_t vfio_pci_core_do_io_rw(struct vfio_pci_core_device *vdev, bool test_mem,
|
||||
void __iomem *io, char __user *buf,
|
||||
loff_t off, size_t count, size_t x_start,
|
||||
size_t x_end, bool iswrite)
|
||||
size_t x_end, bool iswrite,
|
||||
enum vfio_pci_io_width max_width)
|
||||
{
|
||||
ssize_t done = 0;
|
||||
int ret;
|
||||
@ -150,20 +151,19 @@ ssize_t vfio_pci_core_do_io_rw(struct vfio_pci_core_device *vdev, bool test_mem,
|
||||
else
|
||||
fillable = 0;
|
||||
|
||||
if (fillable >= 8 && !(off % 8)) {
|
||||
if (fillable >= 8 && !(off % 8) && max_width >= 8) {
|
||||
ret = vfio_pci_iordwr64(vdev, iswrite, test_mem,
|
||||
io, buf, off, &filled);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
} else
|
||||
if (fillable >= 4 && !(off % 4)) {
|
||||
} else if (fillable >= 4 && !(off % 4) && max_width >= 4) {
|
||||
ret = vfio_pci_iordwr32(vdev, iswrite, test_mem,
|
||||
io, buf, off, &filled);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
} else if (fillable >= 2 && !(off % 2)) {
|
||||
} else if (fillable >= 2 && !(off % 2) && max_width >= 2) {
|
||||
ret = vfio_pci_iordwr16(vdev, iswrite, test_mem,
|
||||
io, buf, off, &filled);
|
||||
if (ret)
|
||||
@ -234,6 +234,7 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_core_device *vdev, char __user *buf,
|
||||
void __iomem *io;
|
||||
struct resource *res = &vdev->pdev->resource[bar];
|
||||
ssize_t done;
|
||||
enum vfio_pci_io_width max_width = VFIO_PCI_IO_WIDTH_8;
|
||||
|
||||
if (pci_resource_start(pdev, bar))
|
||||
end = pci_resource_len(pdev, bar);
|
||||
@ -262,6 +263,16 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_core_device *vdev, char __user *buf,
|
||||
if (!io)
|
||||
return -ENOMEM;
|
||||
x_end = end;
|
||||
|
||||
/*
|
||||
* Certain devices (e.g. Intel X710) don't support qword
|
||||
* access to the ROM bar. Otherwise PCI AER errors might be
|
||||
* triggered.
|
||||
*
|
||||
* Disable qword access to the ROM bar universally, which
|
||||
* worked reliably for years before qword access is enabled.
|
||||
*/
|
||||
max_width = VFIO_PCI_IO_WIDTH_4;
|
||||
} else {
|
||||
int ret = vfio_pci_core_setup_barmap(vdev, bar);
|
||||
if (ret) {
|
||||
@ -278,7 +289,7 @@ ssize_t vfio_pci_bar_rw(struct vfio_pci_core_device *vdev, char __user *buf,
|
||||
}
|
||||
|
||||
done = vfio_pci_core_do_io_rw(vdev, res->flags & IORESOURCE_MEM, io, buf, pos,
|
||||
count, x_start, x_end, iswrite);
|
||||
count, x_start, x_end, iswrite, max_width);
|
||||
|
||||
if (done >= 0)
|
||||
*ppos += done;
|
||||
@ -352,7 +363,7 @@ ssize_t vfio_pci_vga_rw(struct vfio_pci_core_device *vdev, char __user *buf,
|
||||
* to the memory enable bit in the command register.
|
||||
*/
|
||||
done = vfio_pci_core_do_io_rw(vdev, false, iomem, buf, off, count,
|
||||
0, 0, iswrite);
|
||||
0, 0, iswrite, VFIO_PCI_IO_WIDTH_4);
|
||||
|
||||
vga_put(vdev->pdev, rsrc);
|
||||
|
||||
|
||||
@ -250,6 +250,7 @@ xe_vfio_pci_alloc_file(struct xe_vfio_pci_core_device *xe_vdev,
|
||||
struct xe_vfio_pci_migration_file *migf;
|
||||
const struct file_operations *fops;
|
||||
int flags;
|
||||
int ret;
|
||||
|
||||
migf = kzalloc(sizeof(*migf), GFP_KERNEL_ACCOUNT);
|
||||
if (!migf)
|
||||
@ -259,8 +260,9 @@ xe_vfio_pci_alloc_file(struct xe_vfio_pci_core_device *xe_vdev,
|
||||
flags = type == XE_VFIO_FILE_SAVE ? O_RDONLY : O_WRONLY;
|
||||
migf->filp = anon_inode_getfile("xe_vfio_mig", fops, migf, flags);
|
||||
if (IS_ERR(migf->filp)) {
|
||||
ret = PTR_ERR(migf->filp);
|
||||
kfree(migf);
|
||||
return ERR_CAST(migf->filp);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
mutex_init(&migf->lock);
|
||||
@ -504,6 +506,7 @@ static const struct vfio_device_ops xe_vfio_pci_ops = {
|
||||
.open_device = xe_vfio_pci_open_device,
|
||||
.close_device = xe_vfio_pci_close_device,
|
||||
.ioctl = vfio_pci_core_ioctl,
|
||||
.get_region_info_caps = vfio_pci_ioctl_get_region_info,
|
||||
.device_feature = vfio_pci_core_ioctl_feature,
|
||||
.read = vfio_pci_core_read,
|
||||
.write = vfio_pci_core_write,
|
||||
|
||||
@ -80,13 +80,13 @@ enum intel_vsec_quirks {
|
||||
|
||||
/**
|
||||
* struct pmt_callbacks - Callback infrastructure for PMT devices
|
||||
* ->read_telem() when specified, called by client driver to access PMT data (instead
|
||||
* of direct copy).
|
||||
* @pdev: PCI device reference for the callback's use
|
||||
* @guid: ID of data to acccss
|
||||
* @data: buffer for the data to be copied
|
||||
* @off: offset into the requested buffer
|
||||
* @count: size of buffer
|
||||
* @read_telem: when specified, called by client driver to access PMT
|
||||
* data (instead of direct copy).
|
||||
* * pdev: PCI device reference for the callback's use
|
||||
* * guid: ID of data to acccss
|
||||
* * data: buffer for the data to be copied
|
||||
* * off: offset into the requested buffer
|
||||
* * count: size of buffer
|
||||
*/
|
||||
struct pmt_callbacks {
|
||||
int (*read_telem)(struct pci_dev *pdev, u32 guid, u64 *data, loff_t off, u32 count);
|
||||
@ -120,7 +120,7 @@ struct intel_vsec_platform_info {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct intel_sec_device - Auxbus specific device information
|
||||
* struct intel_vsec_device - Auxbus specific device information
|
||||
* @auxdev: auxbus device struct for auxbus access
|
||||
* @pcidev: pci device associated with the device
|
||||
* @resource: any resources shared by the parent
|
||||
@ -128,6 +128,7 @@ struct intel_vsec_platform_info {
|
||||
* @num_resources: number of resources
|
||||
* @id: xarray id
|
||||
* @priv_data: any private data needed
|
||||
* @priv_data_size: size of private data area
|
||||
* @quirks: specified quirks
|
||||
* @base_addr: base address of entries (if specified)
|
||||
* @cap_id: the enumerated id of the vsec feature
|
||||
|
||||
@ -145,6 +145,13 @@ struct vfio_pci_core_device {
|
||||
struct list_head dmabufs;
|
||||
};
|
||||
|
||||
enum vfio_pci_io_width {
|
||||
VFIO_PCI_IO_WIDTH_1 = 1,
|
||||
VFIO_PCI_IO_WIDTH_2 = 2,
|
||||
VFIO_PCI_IO_WIDTH_4 = 4,
|
||||
VFIO_PCI_IO_WIDTH_8 = 8,
|
||||
};
|
||||
|
||||
/* Will be exported for vfio pci drivers usage */
|
||||
int vfio_pci_core_register_dev_region(struct vfio_pci_core_device *vdev,
|
||||
unsigned int type, unsigned int subtype,
|
||||
@ -188,7 +195,8 @@ pci_ers_result_t vfio_pci_core_aer_err_detected(struct pci_dev *pdev,
|
||||
ssize_t vfio_pci_core_do_io_rw(struct vfio_pci_core_device *vdev, bool test_mem,
|
||||
void __iomem *io, char __user *buf,
|
||||
loff_t off, size_t count, size_t x_start,
|
||||
size_t x_end, bool iswrite);
|
||||
size_t x_end, bool iswrite,
|
||||
enum vfio_pci_io_width max_width);
|
||||
bool __vfio_pci_memory_enabled(struct vfio_pci_core_device *vdev);
|
||||
bool vfio_pci_core_range_intersect_range(loff_t buf_start, size_t buf_cnt,
|
||||
loff_t reg_start, size_t reg_cnt,
|
||||
|
||||
@ -88,6 +88,14 @@ typedef struct {
|
||||
# define __aligned_u64 __u64 __attribute__((aligned(8)))
|
||||
#endif
|
||||
|
||||
#ifndef __aligned_be64
|
||||
# define __aligned_be64 __be64 __attribute__((aligned(8)))
|
||||
#endif
|
||||
|
||||
#ifndef __aligned_le64
|
||||
# define __aligned_le64 __le64 __attribute__((aligned(8)))
|
||||
#endif
|
||||
|
||||
struct list_head {
|
||||
struct list_head *next, *prev;
|
||||
};
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#ifndef SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_IOVA_ALLOCATOR_H
|
||||
#define SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_IOVA_ALLOCATOR_H
|
||||
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/iommufd.h>
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/mman.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/iommufd.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/mman.h>
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/iommufd.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/mman.h>
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/iommufd.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/mman.h>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <uapi/linux/types.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/vfio.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user