From 618d5f540f5dc8c702c4bdd6f65fa2455f7fb13e Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Wed, 17 Jun 2020 10:40:18 -0500 Subject: Linux v5.6.19 Signed-off-by: Justin M. Forbes --- ...6-sony-laptop-SNC-calls-should-handle-BUF.patch | 114 --------------------- kernel.spec | 8 +- sources | 2 +- 3 files changed, 5 insertions(+), 119 deletions(-) delete mode 100644 0001-platform-x86-sony-laptop-SNC-calls-should-handle-BUF.patch diff --git a/0001-platform-x86-sony-laptop-SNC-calls-should-handle-BUF.patch b/0001-platform-x86-sony-laptop-SNC-calls-should-handle-BUF.patch deleted file mode 100644 index dcae360a7..000000000 --- a/0001-platform-x86-sony-laptop-SNC-calls-should-handle-BUF.patch +++ /dev/null @@ -1,114 +0,0 @@ -From 47828d22539f76c8c9dcf2a55f18ea3a8039d8ef Mon Sep 17 00:00:00 2001 -From: Mattia Dongili -Date: Fri, 8 May 2020 09:14:04 +0900 -Subject: [PATCH] platform/x86: sony-laptop: SNC calls should handle BUFFER - types - -After commit 6d232b29cfce ("ACPICA: Dispatcher: always generate buffer -objects for ASL create_field() operator") ACPICA creates buffers even -when new fields are small enough to fit into an integer. -Many SNC calls counted on the old behaviour. -Since sony-laptop already handles the INTEGER/BUFFER case in -sony_nc_buffer_call, switch sony_nc_int_call to use its more generic -function instead. - -Fixes: 6d232b29cfce ("ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator") -Reported-by: Dominik Mierzejewski -Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207491 -Reported-by: William Bader -Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1830150 -Signed-off-by: Mattia Dongili -Signed-off-by: Andy Shevchenko ---- - drivers/platform/x86/sony-laptop.c | 53 +++++++++++++----------------- - 1 file changed, 23 insertions(+), 30 deletions(-) - -diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c -index 51309f7ceede..6932cd11e660 100644 ---- a/drivers/platform/x86/sony-laptop.c -+++ b/drivers/platform/x86/sony-laptop.c -@@ -757,33 +757,6 @@ static union acpi_object *__call_snc_method(acpi_handle handle, char *method, - return result; - } - --static int sony_nc_int_call(acpi_handle handle, char *name, int *value, -- int *result) --{ -- union acpi_object *object = NULL; -- if (value) { -- u64 v = *value; -- object = __call_snc_method(handle, name, &v); -- } else -- object = __call_snc_method(handle, name, NULL); -- -- if (!object) -- return -EINVAL; -- -- if (object->type != ACPI_TYPE_INTEGER) { -- pr_warn("Invalid acpi_object: expected 0x%x got 0x%x\n", -- ACPI_TYPE_INTEGER, object->type); -- kfree(object); -- return -EINVAL; -- } -- -- if (result) -- *result = object->integer.value; -- -- kfree(object); -- return 0; --} -- - #define MIN(a, b) (a > b ? b : a) - static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value, - void *buffer, size_t buflen) -@@ -795,17 +768,20 @@ static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value, - if (!object) - return -EINVAL; - -- if (object->type == ACPI_TYPE_BUFFER) { -+ if (!buffer) { -+ /* do nothing */ -+ } else if (object->type == ACPI_TYPE_BUFFER) { - len = MIN(buflen, object->buffer.length); -+ memset(buffer, 0, buflen); - memcpy(buffer, object->buffer.pointer, len); - - } else if (object->type == ACPI_TYPE_INTEGER) { - len = MIN(buflen, sizeof(object->integer.value)); -+ memset(buffer, 0, buflen); - memcpy(buffer, &object->integer.value, len); - - } else { -- pr_warn("Invalid acpi_object: expected 0x%x got 0x%x\n", -- ACPI_TYPE_BUFFER, object->type); -+ pr_warn("Unexpected acpi_object: 0x%x\n", object->type); - ret = -EINVAL; - } - -@@ -813,6 +789,23 @@ static int sony_nc_buffer_call(acpi_handle handle, char *name, u64 *value, - return ret; - } - -+static int sony_nc_int_call(acpi_handle handle, char *name, int *value, int -+ *result) -+{ -+ int ret; -+ -+ if (value) { -+ u64 v = *value; -+ -+ ret = sony_nc_buffer_call(handle, name, &v, result, -+ sizeof(*result)); -+ } else { -+ ret = sony_nc_buffer_call(handle, name, NULL, result, -+ sizeof(*result)); -+ } -+ return ret; -+} -+ - struct sony_nc_handles { - u16 cap[0x10]; - struct device_attribute devattr; --- -2.26.2 - diff --git a/kernel.spec b/kernel.spec index 3aedb338b..677d01402 100644 --- a/kernel.spec +++ b/kernel.spec @@ -92,7 +92,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 18 +%define stable_update 19 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -918,9 +918,6 @@ Patch518: vfio-pci-block-user-access-to-disabled-device-MMIO.patch # rhbz 1789545 Patch519: vboxguest-fixes.patch -# rhbz 1830150 -Patch520: 0001-platform-x86-sony-laptop-SNC-calls-should-handle-BUF.patch - # Thinkpad dual fan control Patch521: 0001-platform-x86-thinkpad_acpi-Add-support-for-dual-fan-.patch @@ -3020,6 +3017,9 @@ fi # # %changelog +* Wed Jun 17 2020 Justin M. Forbes - 5.6.19-300 +- Linux v5.6.19 + * Mon Jun 15 2020 Stefan Assmann - Add dual fan control for P50, P51, P52, P70, P71, P72, P1 gen1, P2 gen2, X1E gen1 and X1E gen2. diff --git a/sources b/sources index 06183057e..067ac998e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (linux-5.6.tar.xz) = 80846fe2b4e4a7ff471d2dde28a8216ae807a3209f959e93d39ea4fc9a189ea28ec3db9d303b3fe15a28c2cb90e7446876678e93e23353c2d6f262e364a06bc9 -SHA512 (patch-5.6.18.xz) = c7191fdaf6bd231a38a41b4a876f7855b1038a8b2be52882aba8ac42704b5e4101ff151b29991233a7db6c8d191e2a547a78a00c027d79f63d4e99054aefb9ba +SHA512 (patch-5.6.19.xz) = f967f9ffc12249db757bd38fd890ac69d327f23bcb767ffa0c178aa7e541bb4a10715664d703315ac3b96ed35909046350f97752c2a4691526ad55a9f03f2c24 -- cgit