Linux v5.2-rc5

This commit is contained in:
Justin M. Forbes 2019-06-17 09:02:12 -05:00
parent f29ebb198c
commit 899f9fafd5
5 changed files with 7 additions and 224 deletions

View File

@ -1,106 +0,0 @@
From d004ab4e282082ddb645ff48d3f62a28fc5d69ef Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 15 May 2019 12:27:23 +0200
Subject: [PATCH] platform/x86: asus-wmi: Only Tell EC the OS will handle
display hotkeys from asus_nb_wmi
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will
handle the display off hotkey") causes the backlight to be permanently off
on various EeePC laptop models using the eeepc-wmi driver (Asus EeePC
1015BX, Asus EeePC 1025C).
The asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL) call added
by that commit is made conditional in this commit and only enabled in
the quirk_entry structs in the asus-nb-wmi driver fixing the broken
display / backlight on various EeePC laptop models.
Cc: João Paulo Rechi Vita <jprvita@endlessm.com>
Fixes: 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/asus-nb-wmi.c | 8 ++++++++
drivers/platform/x86/asus-wmi.c | 2 +-
drivers/platform/x86/asus-wmi.h | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 81642102bf65..8d9e30dbb5af 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -65,10 +65,12 @@ static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str,
static struct quirk_entry quirk_asus_unknown = {
.wapf = 0,
+ .wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_q500a = {
.i8042_filter = asus_q500a_i8042_filter,
+ .wmi_backlight_set_devstate = true,
};
/*
@@ -79,26 +81,32 @@ static struct quirk_entry quirk_asus_q500a = {
static struct quirk_entry quirk_asus_x55u = {
.wapf = 4,
.wmi_backlight_power = true,
+ .wmi_backlight_set_devstate = true,
.no_display_toggle = true,
};
static struct quirk_entry quirk_asus_wapf4 = {
.wapf = 4,
+ .wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_x200ca = {
.wapf = 2,
+ .wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_ux303ub = {
.wmi_backlight_native = true,
+ .wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_x550lb = {
+ .wmi_backlight_set_devstate = true,
.xusb2pr = 0x01D9,
};
static struct quirk_entry quirk_asus_forceals = {
+ .wmi_backlight_set_devstate = true,
.wmi_force_als_set = true,
};
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 3e4336025e8f..9b18a184e0aa 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2146,7 +2146,7 @@ static int asus_wmi_add(struct platform_device *pdev)
err = asus_wmi_backlight_init(asus);
if (err && err != -ENODEV)
goto fail_backlight;
- } else
+ } else if (asus->driver->quirks->wmi_backlight_set_devstate)
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL);
if (asus_wmi_has_fnlock_key(asus)) {
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index 0930be770688..4f31b68642a0 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -31,6 +31,7 @@ struct quirk_entry {
bool store_backlight_power;
bool wmi_backlight_power;
bool wmi_backlight_native;
+ bool wmi_backlight_set_devstate;
bool wmi_force_als_set;
int wapf;
/*
--
2.21.0

2
gitrev
View File

@ -1 +1 @@
72a20cee5d99d231809ee4d3d2c09a96a25451e2
9e0babf2c06c73cda2c0cd37a1653d823adb40ec

View File

@ -67,9 +67,9 @@ Summary: The Linux kernel
# The next upstream release sublevel (base_sublevel+1)
%define upstream_sublevel %(echo $((%{base_sublevel} + 1)))
# The rc snapshot level
%global rcrev 4
%global rcrev 5
# The git snapshot level
%define gitrev 3
%define gitrev 0
# Set rpm version accordingly
%define rpmversion 5.%{upstream_sublevel}.0
%endif
@ -580,12 +580,6 @@ Patch527: v2-powerpc-mm-mark-more-tlb-functions-as-__always_inline.patch
Patch530: crypto-ghash-fix-unaligned-memory-access-in-ghash_setkey.patch
# https://patchwork.kernel.org/patch/10817377/
Patch532: usb-dwc2-Fix-DMA-cache-alignment-issues.patch
# 1697069 LCD panel an Asus EeePC 1025C not lighting up, submitted upstream
Patch533: 0001-platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch
# Fix for new Logitech wireless keyboard support in 5.2, submitted upstream
Patch534: 0001-HID-logitech-dj-Fix-forwarding-of-very-long-HID-repo.patch
@ -1830,6 +1824,9 @@ fi
#
#
%changelog
* Mon Jun 17 2019 Justin M. Forbes <jforbes@fedoraproject.org> - 5.2.0-0.rc5.git0.1
- Linux v5.2-rc5
* Mon Jun 17 2019 Justin M. Forbes <jforbes@fedoraproject.org>
- Disable debugging options.

View File

@ -1,3 +1,2 @@
SHA512 (linux-5.1.tar.xz) = ae96f347badc95f1f3acf506c52b6cc23c0bd09ce8f4ce6705d4b4058b62593059bba1bc603c8d8b00a2f19131e7e56c31ac62b45883a346fa61d655e178f236
SHA512 (patch-5.2-rc4.xz) = 75051f22668bcbfdafdf31c65e25d3b5647450c5b8a7bc64f2f081cb400728b0328df4dbb83f3c7de9cbabedf8064d9474643f1d703cdc1166b184611fdbd28c
SHA512 (patch-5.2-rc4-git3.xz) = 83ab7aabb425358558b354057444335e5896fb291d98351e6de04a0ec06647aee94d50a9c4c1952f77a0071b59aded2dc6e4ec48ad5a37a7a36a27d56de050c4
SHA512 (patch-5.2-rc5.xz) = ee7caea50dccd299182da1453ca2a6f3f4947d544da81703e00b7f63e7c99d19975d4a34261282bbce36a8cf08060a60e51c095189a3aa43fdc34b67b05004c7

View File

@ -1,107 +0,0 @@
From patchwork Mon Feb 18 06:37:30 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Martin Schiller <ms@dev.tdt.de>
X-Patchwork-Id: 10817377
Return-Path: <linux-usb-owner@kernel.org>
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A292C1399
for <patchwork-linux-usb@patchwork.kernel.org>;
Mon, 18 Feb 2019 06:47:00 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F0912A092
for <patchwork-linux-usb@patchwork.kernel.org>;
Mon, 18 Feb 2019 06:47:00 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 82B232A0EF; Mon, 18 Feb 2019 06:47:00 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD7AC2A092
for <patchwork-linux-usb@patchwork.kernel.org>;
Mon, 18 Feb 2019 06:46:59 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1728527AbfBRGqy (ORCPT
<rfc822;patchwork-linux-usb@patchwork.kernel.org>);
Mon, 18 Feb 2019 01:46:54 -0500
Received: from host-88-217-225-28.customer.m-online.net ([88.217.225.28]:29120
"EHLO mail.dev.tdt.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org
with ESMTP id S1725836AbfBRGqx (ORCPT
<rfc822;linux-usb@vger.kernel.org>); Mon, 18 Feb 2019 01:46:53 -0500
X-Greylist: delayed 552 seconds by postgrey-1.27 at vger.kernel.org;
Mon, 18 Feb 2019 01:46:53 EST
Received: from localhost.localdomain (unknown [10.2.3.20])
by mail.dev.tdt.de (Postfix) with ESMTPSA id 69723204C2;
Mon, 18 Feb 2019 06:37:39 +0000 (UTC)
From: Martin Schiller <ms@dev.tdt.de>
To: hminas@synopsys.com, gregkh@linuxfoundation.org,
felipe.balbi@linux.intel.com, a.seppala@gmail.com,
dianders@chromium.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Martin Schiller <ms@dev.tdt.de>
Subject: [PATCH] usb: dwc2: Fix DMA cache alignment issues
Date: Mon, 18 Feb 2019 07:37:30 +0100
Message-Id: <20190218063730.26870-1-ms@dev.tdt.de>
X-Mailer: git-send-email 2.11.0
Sender: linux-usb-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-usb.vger.kernel.org>
X-Mailing-List: linux-usb@vger.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
Insert a padding between data and the stored_xfer_buffer pointer to
ensure they are not on the same cache line.
Otherwise, the stored_xfer_buffer gets corrupted for IN URBs on
non-cache-coherent systems. (In my case: Lantiq xRX200 MIPS)
Fixes: 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more supported way")
Fixes: 56406e017a88 ("usb: dwc2: Fix DMA alignment to start at allocated boundary")
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
---
drivers/usb/dwc2/hcd.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index dd82fa516f3f..f3035dd4db25 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -2664,8 +2664,10 @@ static void dwc2_free_dma_aligned_buffer(struct urb *urb)
return;
/* Restore urb->transfer_buffer from the end of the allocated area */
- memcpy(&stored_xfer_buffer, urb->transfer_buffer +
- urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
+ memcpy(&stored_xfer_buffer,
+ PTR_ALIGN(urb->transfer_buffer + urb->transfer_buffer_length,
+ dma_get_cache_alignment()),
+ sizeof(urb->transfer_buffer));
if (usb_urb_dir_in(urb)) {
if (usb_pipeisoc(urb->pipe))
@@ -2697,6 +2699,7 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
* DMA
*/
kmalloc_size = urb->transfer_buffer_length +
+ (dma_get_cache_alignment() - 1) +
sizeof(urb->transfer_buffer);
kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
@@ -2707,7 +2710,8 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
* Position value of original urb->transfer_buffer pointer to the end
* of allocation for later referencing
*/
- memcpy(kmalloc_ptr + urb->transfer_buffer_length,
+ memcpy(PTR_ALIGN(kmalloc_ptr + urb->transfer_buffer_length,
+ dma_get_cache_alignment()),
&urb->transfer_buffer, sizeof(urb->transfer_buffer));
if (usb_urb_dir_out(urb))