Compare commits
170 Commits
Author | SHA1 | Date |
---|---|---|
Peter Jones | 5804b72d81 | |
Peter Jones | ef89896add | |
Laura Abbott | 2c4dd31721 | |
Laura Abbott | 27985889f4 | |
Justin M. Forbes | d99469ccaf | |
Justin M. Forbes | 87e3972ebc | |
Justin M. Forbes | e4f9feb252 | |
Laura Abbott | 1d54a7154e | |
Justin M. Forbes | bf69959d65 | |
Justin M. Forbes | 1034158e62 | |
Jeremy Cline | 9f4545c739 | |
Justin M. Forbes | b29ed2a214 | |
Justin M. Forbes | 36391cd9f7 | |
Justin M. Forbes | 140ae2611b | |
Jeremy Cline | 12b5c8b2dd | |
Jeremy Cline | cf4237c095 | |
Jeremy Cline | 9036f48254 | |
Jeremy Cline | 87c50127e5 | |
Jeremy Cline | 037a83ae59 | |
Jeremy Cline | 4b3da64509 | |
Jeremy Cline | ec92e419c1 | |
Jeremy Cline | 9457eae4a0 | |
Jeremy Cline | c75cb4d7fb | |
Jeremy Cline | 9edb1b5f46 | |
Jeremy Cline | 9d76398e4c | |
Jeremy Cline | c3d299955c | |
Jeremy Cline | b79b0786b5 | |
Justin M. Forbes | 1cf74e2eb3 | |
Jeremy Cline | 86e75d4e1d | |
Laura Abbott | b529933894 | |
Jeremy Cline | bc798b5499 | |
Jeremy Cline | 5bd783b4f1 | |
Peter Robinson | fe6b94d468 | |
Jeremy Cline | 8a38849fd5 | |
Justin M. Forbes | 23f3bf12e4 | |
Laura Abbott | 2db7ed1700 | |
Laura Abbott | aebca61f61 | |
Peter Robinson | 2608bff05a | |
Jeremy Cline | 2874a5a7c6 | |
Laura Abbott | 2dc72b4c2b | |
Jeremy Cline | 0b2f464984 | |
Laura Abbott | d1f0bd4027 | |
Justin M. Forbes | 801d19161f | |
Justin M. Forbes | ec3df71072 | |
Laura Abbott | 8a85282a3e | |
Laura Abbott | ab11b77a1c | |
Justin M. Forbes | 3118e0a1c8 | |
Justin M. Forbes | a8b36f84c0 | |
Justin M. Forbes | a555e19e17 | |
Justin M. Forbes | 0f7dd25184 | |
Peter Robinson | 4dcf8ed48b | |
Peter Robinson | a89c694dae | |
Peter Robinson | 76c2ad6c53 | |
Peter Robinson | bfb8931567 | |
Jeremy Cline | 559e9d75b4 | |
Jeremy Cline | 2e4987d5de | |
Justin M. Forbes | 5103366c43 | |
Peter Robinson | 8d3daaedfb | |
Justin M. Forbes | cbcfcbeb75 | |
Laura Abbott | 05aec14be1 | |
Laura Abbott | 93c78cc6c3 | |
Laura Abbott | d1e360d978 | |
Laura Abbott | 7f47d72242 | |
Peter Robinson | 89fc77b9f1 | |
Laura Abbott | 41248f94be | |
Laura Abbott | f5dae5ae2c | |
Justin M. Forbes | 83203f5209 | |
Justin M. Forbes | c820b80a60 | |
Justin M. Forbes | 0ea486fcad | |
Justin M. Forbes | 1aa23033fb | |
Justin M. Forbes | 0cb1905143 | |
Justin M. Forbes | a900c89274 | |
Justin M. Forbes | dc02f0a06e | |
Justin M. Forbes | 5457b85556 | |
Justin M. Forbes | 2ef60f262b | |
Justin M. Forbes | b842984e58 | |
Justin M. Forbes | 9ee85faed7 | |
Laura Abbott | 8072782f6b | |
Justin M. Forbes | 6824746386 | |
Laura Abbott | b814ce76f1 | |
Justin M. Forbes | b5bd296f44 | |
Justin M. Forbes | 01bdf6af77 | |
Justin M. Forbes | 4ad810e16c | |
Justin M. Forbes | a17cbdc004 | |
Dan Horák | 2511dad196 | |
Josh Boyer | 62b80a4038 | |
Justin M. Forbes | fe7dbebdc9 | |
Justin M. Forbes | 8d07ed2f94 | |
Laura Abbott | 13226bf184 | |
Justin M. Forbes | c0af8b92a4 | |
Justin M. Forbes | 9219d489ea | |
Justin M. Forbes | 91612fa839 | |
Justin M. Forbes | 3731d1998b | |
Peter Robinson | 359584d0b2 | |
Justin M. Forbes | 3ff7c261fb | |
Laura Abbott | 884e6796eb | |
Peter Robinson | 48844fd6b6 | |
Laura Abbott | 98256c97e2 | |
Peter Robinson | 8170661ca5 | |
Laura Abbott | 138d22d1eb | |
Justin M. Forbes | d04a86fb89 | |
Laura Abbott | 64f33c4317 | |
Laura Abbott | 0e0274ef2a | |
Laura Abbott | dafc5e7283 | |
Laura Abbott | d882602b3c | |
Peter Robinson | 8eec00e5b0 | |
Peter Robinson | 95b2186ebe | |
Peter Robinson | a68ff15c18 | |
Peter Robinson | 18dd17cef8 | |
Peter Robinson | 7b272f5f61 | |
Laura Abbott | ad8ff58ce8 | |
Peter Robinson | bb6904669c | |
Laura Abbott | f812443471 | |
Laura Abbott | ba3922d446 | |
Laura Abbott | 96cfd83feb | |
Laura Abbott | a745d26757 | |
Laura Abbott | b1d734dbb2 | |
Peter Robinson | eba478c4ed | |
Laura Abbott | 11323bafe4 | |
Laura Abbott | 327bbdd586 | |
Peter Robinson | 56b3075dd5 | |
Peter Robinson | 61735b7e1f | |
Laura Abbott | 1d0a43b42a | |
Peter Robinson | 1813594755 | |
Peter Robinson | ab0ecf4db3 | |
Laura Abbott | 9fda242458 | |
Laura Abbott | 2c8a78f6f7 | |
Peter Robinson | 6e4187d96a | |
Laura Abbott | 7e2bb11900 | |
Peter Robinson | 52e0b88057 | |
Peter Robinson | 52bf9a1496 | |
Laura Abbott | d324f86298 | |
Laura Abbott | 57409267f0 | |
Laura Abbott | 2424e41c20 | |
Laura Abbott | 2a29cf3d8e | |
Laura Abbott | 75d7722833 | |
Laura Abbott | dd5571e274 | |
Laura Abbott | 8b912ff0a2 | |
Justin M. Forbes | f26079d12a | |
Peter Robinson | 2d87208294 | |
Laura Abbott | 21ab0c2a00 | |
Peter Robinson | 51402ab09f | |
Laura Abbott | 6cfc6d7a4f | |
Peter Robinson | 60af1429f5 | |
Justin M. Forbes | b6f36d8a11 | |
Justin M. Forbes | 54ab91b6a4 | |
Peter Robinson | 08948206d4 | |
Laura Abbott | 08c2a9e70f | |
Laura Abbott | c7cad27274 | |
Laura Abbott | f2ae1bd31e | |
Justin M. Forbes | 96d0ae1b8b | |
Laura Abbott | 1277b8fb18 | |
Laura Abbott | 45b26b00cf | |
Laura Abbott | ef764ba61d | |
Laura Abbott | 0a68615771 | |
Laura Abbott | 68ec0e27db | |
Laura Abbott | bd7a89ecd2 | |
Justin M. Forbes | a4dbe86b01 | |
Laura Abbott | d99a489b14 | |
Laura Abbott | fcf9426e02 | |
Peter Robinson | e4d5f75352 | |
Laura Abbott | 404faa836a | |
Laura Abbott | eb9960f1b9 | |
Laura Abbott | 8add29085b | |
Laura Abbott | d18ad13791 | |
Laura Abbott | 21edfc4e20 | |
Laura Abbott | 23315538c3 | |
Peter Robinson | 29de5f9ac5 | |
Peter Robinson | 0c188d6dbc | |
Laura Abbott | c6ffc2cb48 |
|
@ -1,2 +1,7 @@
|
|||
clog
|
||||
*.xz
|
||||
*.bz2
|
||||
*.rpm
|
||||
*.orig
|
||||
kernel-[234].*/
|
||||
perf-man-*.tar.gz
|
||||
|
|
|
@ -0,0 +1,163 @@
|
|||
From 25bb14c1e78e641049fd1ee0c404a9ccd2755e44 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sat, 22 Jul 2017 13:00:05 +0200
|
||||
Subject: [PATCH 1/2] Input: gpio_keys - Allow suppression of input events for
|
||||
wakeup button presses
|
||||
|
||||
In some cases it is undesirable for a wakeup button to send input events
|
||||
to userspace if pressed to wakeup the system (if pressed during suspend).
|
||||
|
||||
A typical example of this is the power-button on laptops / tablets,
|
||||
sending a KEY_POWER event to userspace when woken up with the power-button
|
||||
will cause userspace to immediately suspend the system again which is
|
||||
undesirable.
|
||||
|
||||
For power-buttons attached to a PMIC, or handled by e.g. ACPI, not sending
|
||||
an input event in this case is take care of by the PMIC / ACPI hardware /
|
||||
code. But in the case of a GPIO button we need to explicitly suppress the
|
||||
sending of the input event.
|
||||
|
||||
This commit adds support for this by adding a no_wakeup_events bool to
|
||||
struct gpio_keys_button, which platform code can set to suppress the
|
||||
input events for presses of wakeup keys during suspend.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
Changes in v2:
|
||||
-This is a rewrite if my "Input: gpio_keys - Do not report wake button
|
||||
presses as evdev events" patch.
|
||||
-Instead of unconditionally ignoring presses of all wake-up buttons during
|
||||
suspend, this rewrite makes this configurable per button
|
||||
-This version uses a timer to delay clearing the suspended flag for software
|
||||
debouncing, rather then jiffy compare magic
|
||||
---
|
||||
drivers/input/keyboard/gpio_keys.c | 33 +++++++++++++++++++++++++++++++--
|
||||
include/linux/gpio_keys.h | 3 +++
|
||||
2 files changed, 34 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
|
||||
index a047b9af8369..fa3a58620407 100644
|
||||
--- a/drivers/input/keyboard/gpio_keys.c
|
||||
+++ b/drivers/input/keyboard/gpio_keys.c
|
||||
@@ -38,6 +38,7 @@ struct gpio_button_data {
|
||||
|
||||
unsigned short *code;
|
||||
|
||||
+ struct timer_list unsuspend_timer;
|
||||
struct timer_list release_timer;
|
||||
unsigned int release_delay; /* in msecs, for IRQ-only buttons */
|
||||
|
||||
@@ -371,6 +372,9 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (state && bdata->button->no_wakeup_events && bdata->suspended)
|
||||
+ return;
|
||||
+
|
||||
if (type == EV_ABS) {
|
||||
if (state)
|
||||
input_event(input, type, button->code, button->value);
|
||||
@@ -400,6 +404,9 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
|
||||
if (bdata->button->wakeup) {
|
||||
const struct gpio_keys_button *button = bdata->button;
|
||||
|
||||
+ if (bdata->button->no_wakeup_events && bdata->suspended)
|
||||
+ return IRQ_HANDLED;
|
||||
+
|
||||
pm_stay_awake(bdata->input->dev.parent);
|
||||
if (bdata->suspended &&
|
||||
(button->type == 0 || button->type == EV_KEY)) {
|
||||
@@ -445,9 +452,13 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
|
||||
spin_lock_irqsave(&bdata->lock, flags);
|
||||
|
||||
if (!bdata->key_pressed) {
|
||||
- if (bdata->button->wakeup)
|
||||
+ if (bdata->button->wakeup) {
|
||||
pm_wakeup_event(bdata->input->dev.parent, 0);
|
||||
|
||||
+ if (bdata->button->no_wakeup_events && bdata->suspended)
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
input_event(input, EV_KEY, *bdata->code, 1);
|
||||
input_sync(input);
|
||||
|
||||
@@ -468,6 +479,13 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
+static void gpio_keys_unsuspend_timer(unsigned long _data)
|
||||
+{
|
||||
+ struct gpio_button_data *bdata = (struct gpio_button_data *)_data;
|
||||
+
|
||||
+ bdata->suspended = false;
|
||||
+}
|
||||
+
|
||||
static void gpio_keys_quiesce_key(void *data)
|
||||
{
|
||||
struct gpio_button_data *bdata = data;
|
||||
@@ -476,6 +494,8 @@ static void gpio_keys_quiesce_key(void *data)
|
||||
cancel_delayed_work_sync(&bdata->work);
|
||||
else
|
||||
del_timer_sync(&bdata->release_timer);
|
||||
+
|
||||
+ del_timer_sync(&bdata->unsuspend_timer);
|
||||
}
|
||||
|
||||
static int gpio_keys_setup_key(struct platform_device *pdev,
|
||||
@@ -496,6 +516,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
|
||||
bdata->input = input;
|
||||
bdata->button = button;
|
||||
spin_lock_init(&bdata->lock);
|
||||
+ setup_timer(&bdata->unsuspend_timer, gpio_keys_unsuspend_timer,
|
||||
+ (unsigned long)bdata);
|
||||
|
||||
if (child) {
|
||||
bdata->gpiod = devm_fwnode_get_gpiod_from_child(dev, NULL,
|
||||
@@ -868,6 +890,7 @@ static int __maybe_unused gpio_keys_suspend(struct device *dev)
|
||||
struct gpio_button_data *bdata = &ddata->data[i];
|
||||
if (bdata->button->wakeup)
|
||||
enable_irq_wake(bdata->irq);
|
||||
+ del_timer_sync(&bdata->unsuspend_timer);
|
||||
bdata->suspended = true;
|
||||
}
|
||||
} else {
|
||||
@@ -892,7 +915,13 @@ static int __maybe_unused gpio_keys_resume(struct device *dev)
|
||||
struct gpio_button_data *bdata = &ddata->data[i];
|
||||
if (bdata->button->wakeup)
|
||||
disable_irq_wake(bdata->irq);
|
||||
- bdata->suspended = false;
|
||||
+ if (bdata->button->no_wakeup_events) {
|
||||
+ mod_timer(&bdata->unsuspend_timer, jiffies +
|
||||
+ msecs_to_jiffies(
|
||||
+ bdata->software_debounce));
|
||||
+ } else {
|
||||
+ bdata->suspended = false;
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
mutex_lock(&input->mutex);
|
||||
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h
|
||||
index 0b71024c082c..d8a85e52b6bb 100644
|
||||
--- a/include/linux/gpio_keys.h
|
||||
+++ b/include/linux/gpio_keys.h
|
||||
@@ -15,6 +15,8 @@ struct device;
|
||||
* @debounce_interval: debounce ticks interval in msecs
|
||||
* @can_disable: %true indicates that userspace is allowed to
|
||||
* disable button via sysfs
|
||||
+ * @no_wakeup_events: For wake-up source buttons only, if %true then no input
|
||||
+ * events will be generated if pressed while suspended
|
||||
* @value: axis value for %EV_ABS
|
||||
* @irq: Irq number in case of interrupt keys
|
||||
*/
|
||||
@@ -27,6 +29,7 @@ struct gpio_keys_button {
|
||||
int wakeup;
|
||||
int debounce_interval;
|
||||
bool can_disable;
|
||||
+ bool no_wakeup_events;
|
||||
int value;
|
||||
unsigned int irq;
|
||||
};
|
||||
--
|
||||
2.13.4
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
From 3ce5852ec6add45a28fe1706e9163351940e905c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 2 Oct 2017 18:25:29 -0400
|
||||
Subject: [PATCH 1/3] Make get_cert_list() not complain about cert lists that
|
||||
aren't present.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
certs/load_uefi.c | 37 ++++++++++++++++++++++---------------
|
||||
1 file changed, 22 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
index 3d884598601..9ef34c44fd1 100644
|
||||
--- a/certs/load_uefi.c
|
||||
+++ b/certs/load_uefi.c
|
||||
@@ -35,8 +35,8 @@ static __init bool uefi_check_ignore_db(void)
|
||||
/*
|
||||
* Get a certificate list blob from the named EFI variable.
|
||||
*/
|
||||
-static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
- unsigned long *size)
|
||||
+static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
+ unsigned long *size, void **cert_list)
|
||||
{
|
||||
efi_status_t status;
|
||||
unsigned long lsize = 4;
|
||||
@@ -44,26 +44,33 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
void *db;
|
||||
|
||||
status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
|
||||
+ if (status == EFI_NOT_FOUND) {
|
||||
+ *size = 0;
|
||||
+ *cert_list = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
if (status != EFI_BUFFER_TOO_SMALL) {
|
||||
pr_err("Couldn't get size: 0x%lx\n", status);
|
||||
- return NULL;
|
||||
+ return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
db = kmalloc(lsize, GFP_KERNEL);
|
||||
if (!db) {
|
||||
pr_err("Couldn't allocate memory for uefi cert list\n");
|
||||
- return NULL;
|
||||
+ return -ENOMEM;
|
||||
}
|
||||
|
||||
status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
if (status != EFI_SUCCESS) {
|
||||
kfree(db);
|
||||
pr_err("Error reading db var: 0x%lx\n", status);
|
||||
- return NULL;
|
||||
+ return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
*size = lsize;
|
||||
- return db;
|
||||
+ *cert_list = db;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -152,10 +159,10 @@ static int __init load_uefi_certs(void)
|
||||
* an error if we can't get them.
|
||||
*/
|
||||
if (!uefi_check_ignore_db()) {
|
||||
- db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
- if (!db) {
|
||||
+ rc = get_cert_list(L"db", &secure_var, &dbsize, &db);
|
||||
+ if (rc < 0) {
|
||||
pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
- } else {
|
||||
+ } else if (dbsize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:db",
|
||||
db, dbsize, get_handler_for_db);
|
||||
if (rc)
|
||||
@@ -164,10 +171,10 @@ static int __init load_uefi_certs(void)
|
||||
}
|
||||
}
|
||||
|
||||
- mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
- if (!mok) {
|
||||
+ rc = get_cert_list(L"MokListRT", &mok_var, &moksize, &mok);
|
||||
+ if (rc < 0) {
|
||||
pr_info("MODSIGN: Couldn't get UEFI MokListRT\n");
|
||||
- } else {
|
||||
+ } else if (moksize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:MokListRT",
|
||||
mok, moksize, get_handler_for_db);
|
||||
if (rc)
|
||||
@@ -175,10 +182,10 @@ static int __init load_uefi_certs(void)
|
||||
kfree(mok);
|
||||
}
|
||||
|
||||
- dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
|
||||
- if (!dbx) {
|
||||
+ rc = get_cert_list(L"dbx", &secure_var, &dbxsize, &dbx);
|
||||
+ if (rc < 0) {
|
||||
pr_info("MODSIGN: Couldn't get UEFI dbx list\n");
|
||||
- } else {
|
||||
+ } else if (dbxsize != 0) {
|
||||
rc = parse_efi_signature_list("UEFI:dbx",
|
||||
dbx, dbxsize,
|
||||
get_handler_for_dbx);
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Fri, 9 Sep 2016 08:19:17 -0700
|
||||
Subject: [PATCH] iio: Use type header from kernel tree
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
To: Jonathan Cameron <jic23@kernel.org>
|
||||
To: Hartmut Knaack <knaack.h@gmx.de>
|
||||
To: Lars-Peter Clausen <lars@metafoo.de>
|
||||
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
|
||||
Cc: linux-iio@vger.kernel.org
|
||||
Cc: linux-kernel@vger.kernel.org
|
||||
|
||||
|
||||
The iio tools have been updated as new event types have been added to
|
||||
the kernel. The tools currently use the standard system headers which
|
||||
means that the system may not have the newest defintitions. This leads
|
||||
to build failures when building newer tools on older hosts:
|
||||
|
||||
gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o
|
||||
iio_event_monitor.c
|
||||
iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a
|
||||
function)
|
||||
[IIO_UVINDEX] = "uvindex",
|
||||
^~~~~~~~~~~
|
||||
iio_event_monitor.c:59:3: error: array index in initializer not of
|
||||
integer type
|
||||
iio_event_monitor.c:59:3: note: (near initialization for
|
||||
‘iio_chan_type_name_spec’)
|
||||
iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not
|
||||
in a function)
|
||||
[IIO_MOD_LIGHT_UV] = "uv",
|
||||
^~~~~~~~~~~~~~~~
|
||||
iio_event_monitor.c:97:3: error: array index in initializer not of
|
||||
integer type
|
||||
iio_event_monitor.c:97:3: note: (near initialization for
|
||||
‘iio_modifier_names’)
|
||||
<builtin>: recipe for target 'iio_event_monitor.o' failed
|
||||
|
||||
Switch to using the header from the kernel tree to ensure the newest
|
||||
defintions are always picked up.
|
||||
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
tools/iio/iio_event_monitor.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
|
||||
index d9b7e0f..f02523d 100644
|
||||
--- a/tools/iio/iio_event_monitor.c
|
||||
+++ b/tools/iio/iio_event_monitor.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include "iio_utils.h"
|
||||
#include <linux/iio/events.h>
|
||||
-#include <linux/iio/types.h>
|
||||
+#include "../../include/uapi/linux/iio/types.h"
|
||||
|
||||
static const char * const iio_chan_type_name_spec[] = {
|
||||
[IIO_VOLTAGE] = "voltage",
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
From 714fe15daa07e7691c9731c88de71aa57f84b6c2 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Wed, 3 Jan 2018 11:13:54 +0100
|
||||
Subject: [PATCH] platform/x86: dell-laptop: Filter out spurious keyboard
|
||||
backlight change events
|
||||
|
||||
On some Dell XPS models WMI events of type 0x0000 reporting a keycode of
|
||||
0xe00c get reported when the brightness of the LCD panel changes.
|
||||
|
||||
This leads to us reporting false-positive kbd_led change events to
|
||||
userspace which in turn leads to the kbd backlight OSD showing when it
|
||||
should not.
|
||||
|
||||
We already read the current keyboard backlight brightness value when
|
||||
reporting events because the led_classdev_notify_brightness_hw_changed
|
||||
API requires this. Compare this value to the last known value and filter
|
||||
out duplicate events, fixing this.
|
||||
|
||||
Note the fixed issue is esp. a problem on XPS models with an ambient light
|
||||
sensor and automatic brightness adjustments turned on, this causes the kbd
|
||||
backlight OSD to show all the time there.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514969
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/platform/x86/dell-laptop.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
|
||||
index cd4725e7e0b5..2ef3297a9efc 100644
|
||||
--- a/drivers/platform/x86/dell-laptop.c
|
||||
+++ b/drivers/platform/x86/dell-laptop.c
|
||||
@@ -1133,6 +1133,7 @@ static u8 kbd_previous_mode_bit;
|
||||
|
||||
static bool kbd_led_present;
|
||||
static DEFINE_MUTEX(kbd_led_mutex);
|
||||
+static enum led_brightness kbd_led_level;
|
||||
|
||||
/*
|
||||
* NOTE: there are three ways to set the keyboard backlight level.
|
||||
@@ -1947,6 +1948,7 @@ static enum led_brightness kbd_led_level_get(struct led_classdev *led_cdev)
|
||||
static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
enum led_brightness value)
|
||||
{
|
||||
+ enum led_brightness new_value = value;
|
||||
struct kbd_state state;
|
||||
struct kbd_state new_state;
|
||||
u16 num;
|
||||
@@ -1976,6 +1978,9 @@ static int kbd_led_level_set(struct led_classdev *led_cdev,
|
||||
}
|
||||
|
||||
out:
|
||||
+ if (ret == 0)
|
||||
+ kbd_led_level = new_value;
|
||||
+
|
||||
mutex_unlock(&kbd_led_mutex);
|
||||
return ret;
|
||||
}
|
||||
@@ -2003,6 +2008,9 @@ static int __init kbd_led_init(struct device *dev)
|
||||
if (kbd_led.max_brightness)
|
||||
kbd_led.max_brightness--;
|
||||
}
|
||||
+
|
||||
+ kbd_led_level = kbd_led_level_get(NULL);
|
||||
+
|
||||
ret = led_classdev_register(dev, &kbd_led);
|
||||
if (ret)
|
||||
kbd_led_present = false;
|
||||
@@ -2027,13 +2035,25 @@ static void kbd_led_exit(void)
|
||||
static int dell_laptop_notifier_call(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
+ bool changed = false;
|
||||
+ enum led_brightness new_kbd_led_level;
|
||||
+
|
||||
switch (action) {
|
||||
case DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED:
|
||||
if (!kbd_led_present)
|
||||
break;
|
||||
|
||||
- led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
- kbd_led_level_get(&kbd_led));
|
||||
+ mutex_lock(&kbd_led_mutex);
|
||||
+ new_kbd_led_level = kbd_led_level_get(&kbd_led);
|
||||
+ if (kbd_led_level != new_kbd_led_level) {
|
||||
+ kbd_led_level = new_kbd_led_level;
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ mutex_unlock(&kbd_led_mutex);
|
||||
+
|
||||
+ if (changed)
|
||||
+ led_classdev_notify_brightness_hw_changed(&kbd_led,
|
||||
+ kbd_led_level);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 7c80f9e4a588f1925b07134bb2e3689335f6c6d8 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Stern <stern@rowland.harvard.edu>
|
||||
Date: Fri, 29 Sep 2017 10:54:24 -0400
|
||||
Subject: [PATCH] usb: usbtest: fix NULL pointer dereference
|
||||
|
||||
If the usbtest driver encounters a device with an IN bulk endpoint but
|
||||
no OUT bulk endpoint, it will try to dereference a NULL pointer
|
||||
(out->desc.bEndpointAddress). The problem can be solved by adding a
|
||||
missing test.
|
||||
|
||||
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
|
||||
Reported-by: Andrey Konovalov <andreyknvl@google.com>
|
||||
Tested-by: Andrey Konovalov <andreyknvl@google.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/misc/usbtest.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
|
||||
index 113e38bfe0ef..b3fc602b2e24 100644
|
||||
--- a/drivers/usb/misc/usbtest.c
|
||||
+++ b/drivers/usb/misc/usbtest.c
|
||||
@@ -202,12 +202,13 @@ get_endpoints(struct usbtest_dev *dev, struct usb_interface *intf)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
- if (in) {
|
||||
+ if (in)
|
||||
dev->in_pipe = usb_rcvbulkpipe(udev,
|
||||
in->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
|
||||
+ if (out)
|
||||
dev->out_pipe = usb_sndbulkpipe(udev,
|
||||
out->desc.bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
|
||||
- }
|
||||
+
|
||||
if (iso_in) {
|
||||
dev->iso_in = &iso_in->desc;
|
||||
dev->in_iso_pipe = usb_rcvisocpipe(udev,
|
||||
--
|
||||
2.13.6
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
From c8218e9b3c38fcd36a2d06eec09952a0c6cee9e0 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 2 Oct 2017 18:22:13 -0400
|
||||
Subject: [PATCH 2/3] Add efi_status_to_str() and rework efi_status_to_err().
|
||||
|
||||
This adds efi_status_to_str() for use when printing efi_status_t
|
||||
messages, and reworks efi_status_to_err() so that the two use a common
|
||||
list of errors.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
include/linux/efi.h | 3 ++
|
||||
drivers/firmware/efi/efi.c | 122 ++++++++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 95 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 18b16bf5ce1..436b3c93c3d 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -42,6 +42,8 @@
|
||||
#define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1)))
|
||||
#define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1)))
|
||||
|
||||
+#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1)))
|
||||
+
|
||||
typedef unsigned long efi_status_t;
|
||||
typedef u8 efi_bool_t;
|
||||
typedef u16 efi_char16_t; /* UNICODE character */
|
||||
@@ -1183,6 +1185,7 @@ static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {}
|
||||
#endif
|
||||
|
||||
extern int efi_status_to_err(efi_status_t status);
|
||||
+extern const char *efi_status_to_str(efi_status_t status);
|
||||
|
||||
/*
|
||||
* Variable Attributes
|
||||
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
|
||||
index 557a47829d0..e8f9c7d84e9 100644
|
||||
--- a/drivers/firmware/efi/efi.c
|
||||
+++ b/drivers/firmware/efi/efi.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/ucs2_string.h>
|
||||
#include <linux/memblock.h>
|
||||
+#include <linux/bsearch.h>
|
||||
|
||||
#include <asm/early_ioremap.h>
|
||||
|
||||
@@ -865,40 +866,101 @@ int efi_mem_type(unsigned long phys_addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
+struct efi_error_code {
|
||||
+ efi_status_t status;
|
||||
+ int errno;
|
||||
+ const char *description;
|
||||
+};
|
||||
+
|
||||
+static const struct efi_error_code efi_error_codes[] = {
|
||||
+ { EFI_SUCCESS, 0, "Success"},
|
||||
+#if 0
|
||||
+ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"},
|
||||
+#endif
|
||||
+ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"},
|
||||
+ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"},
|
||||
+ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"},
|
||||
+ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"},
|
||||
+ { EFI_NOT_READY, -EAGAIN, "Not Ready"},
|
||||
+ { EFI_DEVICE_ERROR, -EIO, "Device Error"},
|
||||
+ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"},
|
||||
+ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"},
|
||||
+#if 0
|
||||
+ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"},
|
||||
+ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"},
|
||||
+ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"},
|
||||
+ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"},
|
||||
+#endif
|
||||
+ { EFI_NOT_FOUND, -ENOENT, "Not Found"},
|
||||
+#if 0
|
||||
+ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"},
|
||||
+ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"},
|
||||
+ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"},
|
||||
+ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"},
|
||||
+ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"},
|
||||
+ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"},
|
||||
+#endif
|
||||
+ { EFI_ABORTED, -EINTR, "Aborted"},
|
||||
+#if 0
|
||||
+ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"},
|
||||
+ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"},
|
||||
+ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"},
|
||||
+ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"},
|
||||
+#endif
|
||||
+ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"},
|
||||
+#if 0
|
||||
+ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"},
|
||||
+ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"},
|
||||
+ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"},
|
||||
+ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"},
|
||||
+ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"},
|
||||
+
|
||||
+ // warnings
|
||||
+ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"},
|
||||
+ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"},
|
||||
+ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"},
|
||||
+ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"},
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+efi_status_cmp_bsearch(const void *key, const void *item)
|
||||
+{
|
||||
+ u64 status = (u64)(uintptr_t)key;
|
||||
+ struct efi_error_code *code = (struct efi_error_code *)item;
|
||||
+
|
||||
+ if (status < code->status)
|
||||
+ return -1;
|
||||
+ if (status > code->status)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int efi_status_to_err(efi_status_t status)
|
||||
{
|
||||
- int err;
|
||||
+ struct efi_error_code *found;
|
||||
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
|
||||
|
||||
- switch (status) {
|
||||
- case EFI_SUCCESS:
|
||||
- err = 0;
|
||||
- break;
|
||||
- case EFI_INVALID_PARAMETER:
|
||||
- err = -EINVAL;
|
||||
- break;
|
||||
- case EFI_OUT_OF_RESOURCES:
|
||||
- err = -ENOSPC;
|
||||
- break;
|
||||
- case EFI_DEVICE_ERROR:
|
||||
- err = -EIO;
|
||||
- break;
|
||||
- case EFI_WRITE_PROTECTED:
|
||||
- err = -EROFS;
|
||||
- break;
|
||||
- case EFI_SECURITY_VIOLATION:
|
||||
- err = -EACCES;
|
||||
- break;
|
||||
- case EFI_NOT_FOUND:
|
||||
- err = -ENOENT;
|
||||
- break;
|
||||
- case EFI_ABORTED:
|
||||
- err = -EINTR;
|
||||
- break;
|
||||
- default:
|
||||
- err = -EINVAL;
|
||||
- }
|
||||
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
|
||||
+ sizeof(struct efi_error_code), num,
|
||||
+ efi_status_cmp_bsearch);
|
||||
+ if (!found)
|
||||
+ return -EINVAL;
|
||||
+ return found->errno;
|
||||
+}
|
||||
|
||||
- return err;
|
||||
+const char *
|
||||
+efi_status_to_str(efi_status_t status)
|
||||
+{
|
||||
+ struct efi_error_code *found;
|
||||
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
|
||||
+
|
||||
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
|
||||
+ sizeof(struct efi_error_code), num,
|
||||
+ efi_status_cmp_bsearch);
|
||||
+ if (!found)
|
||||
+ return "Unknown error code";
|
||||
+ return found->description;
|
||||
}
|
||||
|
||||
bool efi_is_table_address(unsigned long phys_addr)
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
From d561f0543506bc12e7b3355efddb0bfd7ca83c74 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sat, 22 Jul 2017 13:17:36 +0200
|
||||
Subject: [PATCH 2/2] Input: soc_button_array - Suppress power button presses
|
||||
during suspend
|
||||
|
||||
If the power-button is pressed to wakeup the laptop/tablet from suspend
|
||||
and we report a KEY_POWER event to userspace when woken up this will cause
|
||||
userspace to immediately suspend the system again which is undesirable.
|
||||
|
||||
This commit sets the new no_wakeup_events flag in the gpio_keys_button
|
||||
struct for the power-button suppressing the undesirable KEY_POWER input
|
||||
events on wake-up.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
Changes in v2:
|
||||
-New patch in v2 of this patch-set
|
||||
---
|
||||
drivers/input/misc/soc_button_array.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
|
||||
index f600f3a7a3c6..27b99831cb97 100644
|
||||
--- a/drivers/input/misc/soc_button_array.c
|
||||
+++ b/drivers/input/misc/soc_button_array.c
|
||||
@@ -27,6 +27,7 @@ struct soc_button_info {
|
||||
unsigned int event_code;
|
||||
bool autorepeat;
|
||||
bool wakeup;
|
||||
+ bool no_wakeup_events;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -100,6 +101,7 @@ soc_button_device_create(struct platform_device *pdev,
|
||||
gpio_keys[n_buttons].active_low = 1;
|
||||
gpio_keys[n_buttons].desc = info->name;
|
||||
gpio_keys[n_buttons].wakeup = info->wakeup;
|
||||
+ gpio_keys[n_buttons].no_wakeup_events = info->no_wakeup_events;
|
||||
/* These devices often use cheap buttons, use 50 ms debounce */
|
||||
gpio_keys[n_buttons].debounce_interval = 50;
|
||||
n_buttons++;
|
||||
@@ -185,6 +187,7 @@ static int soc_button_parse_btn_desc(struct device *dev,
|
||||
info->name = "power";
|
||||
info->event_code = KEY_POWER;
|
||||
info->wakeup = true;
|
||||
+ info->no_wakeup_events = true;
|
||||
} else if (upage == 0x07 && usage == 0xe3) {
|
||||
info->name = "home";
|
||||
info->event_code = KEY_LEFTMETA;
|
||||
@@ -369,7 +372,7 @@ static int soc_button_probe(struct platform_device *pdev)
|
||||
* Platforms"
|
||||
*/
|
||||
static struct soc_button_info soc_button_PNP0C40[] = {
|
||||
- { "power", 0, EV_KEY, KEY_POWER, false, true },
|
||||
+ { "power", 0, EV_KEY, KEY_POWER, false, true, true },
|
||||
{ "home", 1, EV_KEY, KEY_LEFTMETA, false, true },
|
||||
{ "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false },
|
||||
{ "volume_down", 3, EV_KEY, KEY_VOLUMEDOWN, true, false },
|
||||
--
|
||||
2.13.4
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 520e902d864930e2d4f329983d9ae9781a24231f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 2 Oct 2017 18:18:30 -0400
|
||||
Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print
|
||||
error messages.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
certs/load_uefi.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
index 9ef34c44fd1..13a2826715d 100644
|
||||
--- a/certs/load_uefi.c
|
||||
+++ b/certs/load_uefi.c
|
||||
@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
}
|
||||
|
||||
if (status != EFI_BUFFER_TOO_SMALL) {
|
||||
- pr_err("Couldn't get size: 0x%lx\n", status);
|
||||
+ pr_err("Couldn't get size: %s (0x%lx)\n",
|
||||
+ efi_status_to_str(status), status);
|
||||
return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
@@ -64,7 +65,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
if (status != EFI_SUCCESS) {
|
||||
kfree(db);
|
||||
- pr_err("Error reading db var: 0x%lx\n", status);
|
||||
+ pr_err("Error reading db var: %s (0x%lx)\n",
|
||||
+ efi_status_to_str(status), status);
|
||||
return efi_status_to_err(status);
|
||||
}
|
||||
|
||||
--
|
||||
2.15.0
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
From 33fc16fd8aa3684e19b1d1f0a712593e2e570ab1 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Sun, 11 Jun 2017 21:24:50 +0200
|
||||
Subject: [PATCH 10/16] Input: silead: Add support for capactive home button
|
||||
found on some x86 tablets
|
||||
|
||||
On some x86 tablets with a silead touchscreen the windows logo on the
|
||||
front is a capacitive home button. Touching this button results in a touch
|
||||
with bits 12-15 of the Y coordinates set, while normally only the lower 12
|
||||
are used.
|
||||
|
||||
Detect this and report a KEY_LEFTMETA press when this happens. Note for
|
||||
now we only respond to the Y coordinate bits 12-15 containing 0x01, on some
|
||||
tablets *without* a capacative button I've noticed these bits containing
|
||||
0x04 when crossing the edges of the screen.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
---
|
||||
drivers/input/touchscreen/silead.c | 45 ++++++++++++++++++++++++++++----------
|
||||
1 file changed, 34 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c
|
||||
index 0dbcf105f7db..c0ba40c09699 100644
|
||||
--- a/drivers/input/touchscreen/silead.c
|
||||
+++ b/drivers/input/touchscreen/silead.c
|
||||
@@ -56,7 +56,7 @@
|
||||
#define SILEAD_POINT_Y_MSB_OFF 0x01
|
||||
#define SILEAD_POINT_X_OFF 0x02
|
||||
#define SILEAD_POINT_X_MSB_OFF 0x03
|
||||
-#define SILEAD_TOUCH_ID_MASK 0xF0
|
||||
+#define SILEAD_EXTRA_DATA_MASK 0xF0
|
||||
|
||||
#define SILEAD_CMD_SLEEP_MIN 10000
|
||||
#define SILEAD_CMD_SLEEP_MAX 20000
|
||||
@@ -109,6 +109,8 @@ static int silead_ts_request_input_dev(struct silead_ts_data *data)
|
||||
INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED |
|
||||
INPUT_MT_TRACK);
|
||||
|
||||
+ input_set_capability(data->input, EV_KEY, KEY_LEFTMETA);
|
||||
+
|
||||
data->input->name = SILEAD_TS_NAME;
|
||||
data->input->phys = "input/ts";
|
||||
data->input->id.bustype = BUS_I2C;
|
||||
@@ -139,7 +141,8 @@ static void silead_ts_read_data(struct i2c_client *client)
|
||||
struct input_dev *input = data->input;
|
||||
struct device *dev = &client->dev;
|
||||
u8 *bufp, buf[SILEAD_TS_DATA_LEN];
|
||||
- int touch_nr, error, i;
|
||||
+ int touch_nr, softbutton, error, i;
|
||||
+ bool softbutton_pressed = false;
|
||||
|
||||
error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_DATA,
|
||||
SILEAD_TS_DATA_LEN, buf);
|
||||
@@ -148,21 +151,40 @@ static void silead_ts_read_data(struct i2c_client *client)
|
||||
return;
|
||||
}
|
||||
|
||||
- touch_nr = buf[0];
|
||||
- if (touch_nr > data->max_fingers) {
|
||||
+ if (buf[0] > data->max_fingers) {
|
||||
dev_warn(dev, "More touches reported then supported %d > %d\n",
|
||||
- touch_nr, data->max_fingers);
|
||||
- touch_nr = data->max_fingers;
|
||||
+ buf[0], data->max_fingers);
|
||||
+ buf[0] = data->max_fingers;
|
||||
}
|
||||
|
||||
+ touch_nr = 0;
|
||||
bufp = buf + SILEAD_POINT_DATA_LEN;
|
||||
- for (i = 0; i < touch_nr; i++, bufp += SILEAD_POINT_DATA_LEN) {
|
||||
- /* Bits 4-7 are the touch id */
|
||||
- data->id[i] = (bufp[SILEAD_POINT_X_MSB_OFF] &
|
||||
- SILEAD_TOUCH_ID_MASK) >> 4;
|
||||
- touchscreen_set_mt_pos(&data->pos[i], &data->prop,
|
||||
+ for (i = 0; i < buf[0]; i++, bufp += SILEAD_POINT_DATA_LEN) {
|
||||
+ softbutton = (bufp[SILEAD_POINT_Y_MSB_OFF] &
|
||||
+ SILEAD_EXTRA_DATA_MASK) >> 4;
|
||||
+
|
||||
+ if (softbutton) {
|
||||
+ /*
|
||||
+ * For now only respond to softbutton == 0x01, some
|
||||
+ * tablets *without* a capacative button send 0x04
|
||||
+ * when crossing the edges of the screen.
|
||||
+ */
|
||||
+ if (softbutton == 0x01)
|
||||
+ softbutton_pressed = true;
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Bits 4-7 are the touch id, note not all models have
|
||||
+ * hardware touch ids so atm we don't use these.
|
||||
+ */
|
||||
+ data->id[touch_nr] = (bufp[SILEAD_POINT_X_MSB_OFF] &
|
||||
+ SILEAD_EXTRA_DATA_MASK) >> 4;
|
||||
+ touchscreen_set_mt_pos(&data->pos[touch_nr], &data->prop,
|
||||
get_unaligned_le16(&bufp[SILEAD_POINT_X_OFF]) & 0xfff,
|
||||
get_unaligned_le16(&bufp[SILEAD_POINT_Y_OFF]) & 0xfff);
|
||||
+ touch_nr++;
|
||||
}
|
||||
|
||||
input_mt_assign_slots(input, data->slots, data->pos, touch_nr, 0);
|
||||
@@ -178,6 +200,7 @@ static void silead_ts_read_data(struct i2c_client *client)
|
||||
}
|
||||
|
||||
input_mt_sync_frame(input);
|
||||
+ input_report_key(input, KEY_LEFTMETA, softbutton_pressed);
|
||||
input_sync(input);
|
||||
}
|
||||
|
||||
--
|
||||
2.13.0
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 3 May 2012 20:27:11 +0100
|
||||
Subject: [PATCH] ARM: tegra: usb no reset
|
||||
|
||||
Patch for disconnect issues with storage attached to a
|
||||
tegra-ehci controller
|
||||
---
|
||||
drivers/usb/core/hub.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index 43cb2f2e3b43..7f838ec11c81 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -4996,6 +4996,13 @@ static void hub_event(struct work_struct *work)
|
||||
(u16) hub->change_bits[0],
|
||||
(u16) hub->event_bits[0]);
|
||||
|
||||
+ /* Don't disconnect USB-SATA on TrimSlice */
|
||||
+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) {
|
||||
+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) &&
|
||||
+ (hub->event_bits[0] == 0x2))
|
||||
+ hub->event_bits[0] = 0;
|
||||
+ }
|
||||
+
|
||||
/* Lock the device, then check to see if we were
|
||||
* disconnected while waiting for the lock to succeed. */
|
||||
usb_lock_device(hdev);
|
|
@ -0,0 +1,60 @@
|
|||
From 0451d4e795929a69a0fda6d960aa4b077c5bd179 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Howells <dhowells@redhat.com>
|
||||
Date: Fri, 5 May 2017 08:21:58 +0100
|
||||
Subject: [PATCH 1/4] efi: Add EFI signature data types
|
||||
|
||||
Add the data types that are used for containing hashes, keys and
|
||||
certificates for cryptographic verification along with their corresponding
|
||||
type GUIDs.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
include/linux/efi.h | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index ec36f42..3259ad6 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -614,6 +614,10 @@ void efi_native_runtime_setup(void);
|
||||
#define EFI_IMAGE_SECURITY_DATABASE_GUID EFI_GUID(0xd719b2cb, 0x3d3a, 0x4596, 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f)
|
||||
#define EFI_SHIM_LOCK_GUID EFI_GUID(0x605dab50, 0xe046, 0x4300, 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23)
|
||||
|
||||
+#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
|
||||
+#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
|
||||
+#define EFI_CERT_X509_SHA256_GUID EFI_GUID(0x3bd2a492, 0x96c0, 0x4079, 0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed)
|
||||
+
|
||||
/*
|
||||
* This GUID is used to pass to the kernel proper the struct screen_info
|
||||
* structure that was populated by the stub based on the GOP protocol instance
|
||||
@@ -873,6 +877,27 @@ typedef struct {
|
||||
efi_memory_desc_t entry[0];
|
||||
} efi_memory_attributes_table_t;
|
||||
|
||||
+typedef struct {
|
||||
+ efi_guid_t signature_owner;
|
||||
+ u8 signature_data[];
|
||||
+} efi_signature_data_t;
|
||||
+
|
||||
+typedef struct {
|
||||
+ efi_guid_t signature_type;
|
||||
+ u32 signature_list_size;
|
||||
+ u32 signature_header_size;
|
||||
+ u32 signature_size;
|
||||
+ u8 signature_header[];
|
||||
+ /* efi_signature_data_t signatures[][] */
|
||||
+} efi_signature_list_t;
|
||||
+
|
||||
+typedef u8 efi_sha256_hash_t[32];
|
||||
+
|
||||
+typedef struct {
|
||||
+ efi_sha256_hash_t to_be_signed_hash;
|
||||
+ efi_time_t time_of_revocation;
|
||||
+} efi_cert_x509_sha256_t;
|
||||
+
|
||||
/*
|
||||
* All runtime access to EFI goes through this structure:
|
||||
*/
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
From e4c62c12635a371e43bd17e8d33a936668264491 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Howells <dhowells@redhat.com>
|
||||
Date: Fri, 5 May 2017 08:21:58 +0100
|
||||
Subject: [PATCH 2/4] efi: Add an EFI signature blob parser
|
||||
|
||||
Add a function to parse an EFI signature blob looking for elements of
|
||||
interest. A list is made up of a series of sublists, where all the
|
||||
elements in a sublist are of the same type, but sublists can be of
|
||||
different types.
|
||||
|
||||
For each sublist encountered, the function pointed to by the
|
||||
get_handler_for_guid argument is called with the type specifier GUID and
|
||||
returns either a pointer to a function to handle elements of that type or
|
||||
NULL if the type is not of interest.
|
||||
|
||||
If the sublist is of interest, each element is passed to the handler
|
||||
function in turn.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
certs/Kconfig | 8 ++++
|
||||
certs/Makefile | 1 +
|
||||
certs/efi_parser.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/efi.h | 9 +++++
|
||||
4 files changed, 130 insertions(+)
|
||||
create mode 100644 certs/efi_parser.c
|
||||
|
||||
diff --git a/certs/Kconfig b/certs/Kconfig
|
||||
index 6ce51ed..630ae09 100644
|
||||
--- a/certs/Kconfig
|
||||
+++ b/certs/Kconfig
|
||||
@@ -82,4 +82,12 @@ config SYSTEM_BLACKLIST_HASH_LIST
|
||||
wrapper to incorporate the list into the kernel. Each <hash> should
|
||||
be a string of hex digits.
|
||||
|
||||
+config EFI_SIGNATURE_LIST_PARSER
|
||||
+ bool "EFI signature list parser"
|
||||
+ depends on EFI
|
||||
+ select X509_CERTIFICATE_PARSER
|
||||
+ help
|
||||
+ This option provides support for parsing EFI signature lists for
|
||||
+ X.509 certificates and turning them into keys.
|
||||
+
|
||||
endmenu
|
||||
diff --git a/certs/Makefile b/certs/Makefile
|
||||
index 4119bb3..738151a 100644
|
||||
--- a/certs/Makefile
|
||||
+++ b/certs/Makefile
|
||||
@@ -9,6 +9,7 @@ obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o
|
||||
else
|
||||
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
|
||||
endif
|
||||
+obj-$(CONFIG_EFI_SIGNATURE_LIST_PARSER) += efi_parser.o
|
||||
|
||||
ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
|
||||
|
||||
diff --git a/certs/efi_parser.c b/certs/efi_parser.c
|
||||
new file mode 100644
|
||||
index 0000000..4e396f9
|
||||
--- /dev/null
|
||||
+++ b/certs/efi_parser.c
|
||||
@@ -0,0 +1,112 @@
|
||||
+/* EFI signature/key/certificate list parser
|
||||
+ *
|
||||
+ * Copyright (C) 2012, 2016 Red Hat, Inc. All Rights Reserved.
|
||||
+ * Written by David Howells (dhowells@redhat.com)
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public Licence
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the Licence, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#define pr_fmt(fmt) "EFI: "fmt
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/printk.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/efi.h>
|
||||
+
|
||||
+/**
|
||||
+ * parse_efi_signature_list - Parse an EFI signature list for certificates
|
||||
+ * @source: The source of the key
|
||||
+ * @data: The data blob to parse
|
||||
+ * @size: The size of the data blob
|
||||
+ * @get_handler_for_guid: Get the handler func for the sig type (or NULL)
|
||||
+ *
|
||||
+ * Parse an EFI signature list looking for elements of interest. A list is
|
||||
+ * made up of a series of sublists, where all the elements in a sublist are of
|
||||
+ * the same type, but sublists can be of different types.
|
||||
+ *
|
||||
+ * For each sublist encountered, the @get_handler_for_guid function is called
|
||||
+ * with the type specifier GUID and returns either a pointer to a function to
|
||||
+ * handle elements of that type or NULL if the type is not of interest.
|
||||
+ *
|
||||
+ * If the sublist is of interest, each element is passed to the handler
|
||||
+ * function in turn.
|
||||
+ *
|
||||
+ * Error EBADMSG is returned if the list doesn't parse correctly and 0 is
|
||||
+ * returned if the list was parsed correctly. No error can be returned from
|
||||
+ * the @get_handler_for_guid function or the element handler function it
|
||||
+ * returns.
|
||||
+ */
|
||||
+int __init parse_efi_signature_list(
|
||||
+ const char *source,
|
||||
+ const void *data, size_t size,
|
||||
+ efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *))
|
||||
+{
|
||||
+ efi_element_handler_t handler;
|
||||
+ unsigned offs = 0;
|
||||
+
|
||||
+ pr_devel("-->%s(,%zu)\n", __func__, size);
|
||||
+
|
||||
+ while (size > 0) {
|
||||
+ const efi_signature_data_t *elem;
|
||||
+ efi_signature_list_t list;
|
||||
+ size_t lsize, esize, hsize, elsize;
|
||||
+
|
||||
+ if (size < sizeof(list))
|
||||
+ return -EBADMSG;
|
||||
+
|
||||
+ memcpy(&list, data, sizeof(list));
|
||||
+ pr_devel("LIST[%04x] guid=%pUl ls=%x hs=%x ss=%x\n",
|
||||
+ offs,
|
||||
+ list.signature_type.b, list.signature_list_size,
|
||||
+ list.signature_header_size, list.signature_size);
|
||||
+
|
||||
+ lsize = list.signature_list_size;
|
||||
+ hsize = list.signature_header_size;
|
||||
+ esize = list.signature_size;
|
||||
+ elsize = lsize - sizeof(list) - hsize;
|
||||
+
|
||||
+ if (lsize > size) {
|
||||
+ pr_devel("<--%s() = -EBADMSG [overrun @%x]\n",
|
||||
+ __func__, offs);
|
||||
+ return -EBADMSG;
|
||||
+ }
|
||||
+
|
||||
+ if (lsize < sizeof(list) ||
|
||||
+ lsize - sizeof(list) < hsize ||
|
||||
+ esize < sizeof(*elem) ||
|
||||
+ elsize < esize ||
|
||||
+ elsize % esize != 0) {
|
||||
+ pr_devel("- bad size combo @%x\n", offs);
|
||||
+ return -EBADMSG;
|
||||
+ }
|
||||
+
|
||||
+ handler = get_handler_for_guid(&list.signature_type);
|
||||
+ if (!handler) {
|
||||
+ data += lsize;
|
||||
+ size -= lsize;
|
||||
+ offs += lsize;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ data += sizeof(list) + hsize;
|
||||
+ size -= sizeof(list) + hsize;
|
||||
+ offs += sizeof(list) + hsize;
|
||||
+
|
||||
+ for (; elsize > 0; elsize -= esize) {
|
||||
+ elem = data;
|
||||
+
|
||||
+ pr_devel("ELEM[%04x]\n", offs);
|
||||
+ handler(source,
|
||||
+ &elem->signature_data,
|
||||
+ esize - sizeof(*elem));
|
||||
+
|
||||
+ data += esize;
|
||||
+ size -= esize;
|
||||
+ offs += esize;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 3259ad6..08024c6 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -1055,6 +1055,15 @@ extern int efi_memattr_apply_permissions(struct mm_struct *mm,
|
||||
char * __init efi_md_typeattr_format(char *buf, size_t size,
|
||||
const efi_memory_desc_t *md);
|
||||
|
||||
+
|
||||
+typedef void (*efi_element_handler_t)(const char *source,
|
||||
+ const void *element_data,
|
||||
+ size_t element_size);
|
||||
+extern int __init parse_efi_signature_list(
|
||||
+ const char *source,
|
||||
+ const void *data, size_t size,
|
||||
+ efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *));
|
||||
+
|
||||
/**
|
||||
* efi_range_is_wc - check the WC bit on an address range
|
||||
* @start: starting kvirt address
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,217 @@
|
|||
From 6b6203b92cfb457a0669a9c87a29b360405bffc6 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 18:36:30 -0400
|
||||
Subject: [PATCH 10/20] Add option to automatically enforce module signatures
|
||||
when in Secure Boot mode
|
||||
|
||||
UEFI Secure Boot provides a mechanism for ensuring that the firmware will
|
||||
only load signed bootloaders and kernels. Certain use cases may also
|
||||
require that all kernel modules also be signed. Add a configuration option
|
||||
that enforces this automatically when enabled.
|
||||
|
||||
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
---
|
||||
Documentation/x86/zero-page.txt | 2 ++
|
||||
arch/x86/Kconfig | 11 ++++++
|
||||
arch/x86/boot/compressed/eboot.c | 66 +++++++++++++++++++++++++++++++++++
|
||||
arch/x86/include/uapi/asm/bootparam.h | 3 +-
|
||||
arch/x86/kernel/setup.c | 6 ++++
|
||||
include/linux/module.h | 6 ++++
|
||||
kernel/module.c | 7 ++++
|
||||
7 files changed, 100 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/x86/zero-page.txt b/Documentation/x86/zero-page.txt
|
||||
index 95a4d34af3fd..b8527c6b7646 100644
|
||||
--- a/Documentation/x86/zero-page.txt
|
||||
+++ b/Documentation/x86/zero-page.txt
|
||||
@@ -31,6 +31,8 @@ Offset Proto Name Meaning
|
||||
1E9/001 ALL eddbuf_entries Number of entries in eddbuf (below)
|
||||
1EA/001 ALL edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer
|
||||
(below)
|
||||
+1EB/001 ALL kbd_status Numlock is enabled
|
||||
+1EC/001 ALL secure_boot Secure boot is enabled in the firmware
|
||||
1EF/001 ALL sentinel Used to detect broken bootloaders
|
||||
290/040 ALL edd_mbr_sig_buffer EDD MBR signatures
|
||||
2D0/A00 ALL e820_map E820 memory map table
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index bada636d1065..d666ef8b616c 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -1786,6 +1786,17 @@ config EFI_MIXED
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
+config EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
+ def_bool n
|
||||
+ depends on EFI
|
||||
+ prompt "Force module signing when UEFI Secure Boot is enabled"
|
||||
+ ---help---
|
||||
+ UEFI Secure Boot provides a mechanism for ensuring that the
|
||||
+ firmware will only load signed bootloaders and kernels. Certain
|
||||
+ use cases may also require that all kernel modules also be signed.
|
||||
+ Say Y here to automatically enable module signature enforcement
|
||||
+ when a system boots with UEFI Secure Boot enabled.
|
||||
+
|
||||
config SECCOMP
|
||||
def_bool y
|
||||
prompt "Enable seccomp to safely compute untrusted bytecode"
|
||||
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
|
||||
index cc69e37548db..ebc85c1eefd6 100644
|
||||
--- a/arch/x86/boot/compressed/eboot.c
|
||||
+++ b/arch/x86/boot/compressed/eboot.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <asm/efi.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/desc.h>
|
||||
+#include <asm/bootparam_utils.h>
|
||||
|
||||
#include "../string.h"
|
||||
#include "eboot.h"
|
||||
@@ -537,6 +538,67 @@ static void setup_efi_pci(struct boot_params *params)
|
||||
efi_call_early(free_pool, pci_handle);
|
||||
}
|
||||
|
||||
+static int get_secure_boot(void)
|
||||
+{
|
||||
+ u8 sb, setup;
|
||||
+ unsigned long datasize = sizeof(sb);
|
||||
+ efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID;
|
||||
+ efi_status_t status;
|
||||
+
|
||||
+ status = efi_early->call((unsigned long)sys_table->runtime->get_variable,
|
||||
+ L"SecureBoot", &var_guid, NULL, &datasize, &sb);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (sb == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+
|
||||
+ status = efi_early->call((unsigned long)sys_table->runtime->get_variable,
|
||||
+ L"SetupMode", &var_guid, NULL, &datasize,
|
||||
+ &setup);
|
||||
+
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (setup == 1)
|
||||
+ return 0;
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * See if we have Graphics Output Protocol
|
||||
+ */
|
||||
+static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
|
||||
+ unsigned long size)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ void **gop_handle = NULL;
|
||||
+
|
||||
+ status = efi_call_early(allocate_pool, EFI_LOADER_DATA,
|
||||
+ size, (void **)&gop_handle);
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ return status;
|
||||
+
|
||||
+ status = efi_call_early(locate_handle,
|
||||
+ EFI_LOCATE_BY_PROTOCOL,
|
||||
+ proto, NULL, &size, gop_handle);
|
||||
+ if (status != EFI_SUCCESS)
|
||||
+ goto free_handle;
|
||||
+
|
||||
+ if (efi_early->is64)
|
||||
+ status = setup_gop64(si, proto, size, gop_handle);
|
||||
+ else
|
||||
+ status = setup_gop32(si, proto, size, gop_handle);
|
||||
+
|
||||
+free_handle:
|
||||
+ efi_call_early(free_pool, gop_handle);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
static efi_status_t
|
||||
setup_uga32(void **uga_handle, unsigned long size, u32 *width, u32 *height)
|
||||
{
|
||||
@@ -1094,6 +1156,10 @@ struct boot_params *efi_main(struct efi_config *c,
|
||||
else
|
||||
setup_boot_services32(efi_early);
|
||||
|
||||
+ sanitize_boot_params(boot_params);
|
||||
+
|
||||
+ boot_params->secure_boot = get_secure_boot();
|
||||
+
|
||||
setup_graphics(boot_params);
|
||||
|
||||
setup_efi_pci(boot_params);
|
||||
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
|
||||
index c18ce67495fa..2b3e5427097b 100644
|
||||
--- a/arch/x86/include/uapi/asm/bootparam.h
|
||||
+++ b/arch/x86/include/uapi/asm/bootparam.h
|
||||
@@ -134,7 +134,8 @@ struct boot_params {
|
||||
__u8 eddbuf_entries; /* 0x1e9 */
|
||||
__u8 edd_mbr_sig_buf_entries; /* 0x1ea */
|
||||
__u8 kbd_status; /* 0x1eb */
|
||||
- __u8 _pad5[3]; /* 0x1ec */
|
||||
+ __u8 secure_boot; /* 0x1ec */
|
||||
+ __u8 _pad5[2]; /* 0x1ed */
|
||||
/*
|
||||
* The sentinel is set to a nonzero value (0xff) in header.S.
|
||||
*
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index bbfbca5fea0c..d40e961753c9 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1160,6 +1160,12 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
io_delay_init();
|
||||
|
||||
+#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
+ if (boot_params.secure_boot) {
|
||||
+ enforce_signed_modules();
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Parse the ACPI tables for possible boot-time SMP configuration.
|
||||
*/
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index 05bd6c989a0c..32327704e18d 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -260,6 +260,12 @@ extern const typeof(name) __mod_##type##__##name##_device_table \
|
||||
|
||||
struct notifier_block;
|
||||
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+extern void enforce_signed_modules(void);
|
||||
+#else
|
||||
+static inline void enforce_signed_modules(void) {};
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_MODULES
|
||||
|
||||
extern int modules_disabled; /* for sysctl */
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index cb864505d020..cb1f1da69bf4 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -4285,6 +4285,13 @@ void module_layout(struct module *mod,
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_MODULE_SIG
|
||||
+void enforce_signed_modules(void)
|
||||
+{
|
||||
+ sig_enforce = true;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
bool secure_modules(void)
|
||||
{
|
||||
#ifdef CONFIG_MODULE_SIG
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
From: "J. Bruce Fields" <bfields@redhat.com>
|
||||
Date: 2017-04-14 15:04:40
|
||||
Subject: [PATCH] nfsd: check for oversized NFSv2/v3 arguments
|
||||
|
||||
A client can append random data to the end of an NFSv2 or NFSv3 RPC call
|
||||
without our complaining; we'll just stop parsing at the end of the
|
||||
expected data and ignore the rest.
|
||||
|
||||
Encoded arguments and replies are stored together in an array of pages,
|
||||
and if a call is too large it could leave inadequate space for the
|
||||
reply. This is normally OK because NFS RPC's typically have either
|
||||
short arguments and long replies (like READ) or long arguments and short
|
||||
replies (like WRITE). But a client that sends an incorrectly long reply
|
||||
can violate those assumptions. This was observed to cause crashes.
|
||||
|
||||
So, insist that the argument not be any longer than we expect.
|
||||
|
||||
Also, several operations increment rq_next_page in the decode routine
|
||||
before checking the argument size, which can leave rq_next_page pointing
|
||||
well past the end of the page array, causing trouble later in
|
||||
svc_free_pages.
|
||||
|
||||
As followup we may also want to rewrite the encoding routines to check
|
||||
more carefully that they aren't running off the end of the page array.
|
||||
|
||||
Reported-by: Tuomas Haanpää <thaan@synopsys.com>
|
||||
Reported-by: Ari Kauppi <ari@synopsys.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
||||
---
|
||||
fs/nfsd/nfs3xdr.c | 23 +++++++++++++++++------
|
||||
fs/nfsd/nfsxdr.c | 13 ++++++++++---
|
||||
include/linux/sunrpc/svc.h | 3 +--
|
||||
3 files changed, 28 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
|
||||
index dba2ff8eaa68..be66bcadfaea 100644
|
||||
--- a/fs/nfsd/nfs3xdr.c
|
||||
+++ b/fs/nfsd/nfs3xdr.c
|
||||
@@ -334,8 +334,11 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
if (!p)
|
||||
return 0;
|
||||
p = xdr_decode_hyper(p, &args->offset);
|
||||
-
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min(args->count, max_blocksize);
|
||||
|
||||
/* set up the kvec */
|
||||
@@ -349,7 +352,7 @@ nfs3svc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -536,9 +539,11 @@ nfs3svc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -564,10 +569,14 @@ nfs3svc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->verf = p; p += 2;
|
||||
args->dircount = ~0;
|
||||
args->count = ntohl(*p++);
|
||||
+
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -585,6 +594,9 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->dircount = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = args->count = min(args->count, max_blocksize);
|
||||
while (len > 0) {
|
||||
struct page *p = *(rqstp->rq_next_page++);
|
||||
@@ -592,8 +604,7 @@ nfs3svc_decode_readdirplusargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->buffer = page_address(p);
|
||||
len -= PAGE_SIZE;
|
||||
}
|
||||
-
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
|
||||
index 41b468a6a90f..79268369f7b3 100644
|
||||
--- a/fs/nfsd/nfsxdr.c
|
||||
+++ b/fs/nfsd/nfsxdr.c
|
||||
@@ -257,6 +257,9 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
len = args->count = ntohl(*p++);
|
||||
p++; /* totalcount - unused */
|
||||
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
+
|
||||
len = min_t(unsigned int, len, NFSSVC_MAXBLKSIZE_V2);
|
||||
|
||||
/* set up somewhere to store response.
|
||||
@@ -272,7 +275,7 @@ nfssvc_decode_readargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
v++;
|
||||
}
|
||||
args->vlen = v;
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -360,9 +363,11 @@ nfssvc_decode_readlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd_readli
|
||||
p = decode_fh(p, &args->fh);
|
||||
if (!p)
|
||||
return 0;
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -400,9 +405,11 @@ nfssvc_decode_readdirargs(struct svc_rqst *rqstp, __be32 *p,
|
||||
args->cookie = ntohl(*p++);
|
||||
args->count = ntohl(*p++);
|
||||
args->count = min_t(u32, args->count, PAGE_SIZE);
|
||||
+ if (!xdr_argsize_check(rqstp, p))
|
||||
+ return 0;
|
||||
args->buffer = page_address(*(rqstp->rq_next_page++));
|
||||
|
||||
- return xdr_argsize_check(rqstp, p);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
|
||||
index e770abeed32d..6ef19cf658b4 100644
|
||||
--- a/include/linux/sunrpc/svc.h
|
||||
+++ b/include/linux/sunrpc/svc.h
|
||||
@@ -336,8 +336,7 @@ xdr_argsize_check(struct svc_rqst *rqstp, __be32 *p)
|
||||
{
|
||||
char *cp = (char *)p;
|
||||
struct kvec *vec = &rqstp->rq_arg.head[0];
|
||||
- return cp >= (char*)vec->iov_base
|
||||
- && cp <= (char*)vec->iov_base + vec->iov_len;
|
||||
+ return cp == (char *)vec->iov_base + vec->iov_len;
|
||||
}
|
||||
|
||||
static inline int
|
||||
--
|
||||
2.9.3
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -0,0 +1,24 @@
|
|||
From ea6e7d9d0fe3e448aef19b3943d4897ae0bef128 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Thu, 3 Aug 2017 13:46:51 -0500
|
||||
Subject: [PATCH] Fix for module sig verification
|
||||
|
||||
---
|
||||
kernel/module_signing.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
|
||||
index 937c844..d3d6f95 100644
|
||||
--- a/kernel/module_signing.c
|
||||
+++ b/kernel/module_signing.c
|
||||
@@ -81,6 +81,6 @@ int mod_verify_sig(const void *mod, unsigned long *_modlen)
|
||||
}
|
||||
|
||||
return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
- NULL, VERIFYING_MODULE_SIGNATURE,
|
||||
+ (void *)1UL, VERIFYING_MODULE_SIGNATURE,
|
||||
NULL, NULL);
|
||||
}
|
||||
--
|
||||
2.13.3
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
From ef14a4bf0910d06c7e202552914028d4956809cb Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Duggan <aduggan@synaptics.com>
|
||||
Date: Tue, 17 Oct 2017 18:37:36 -0700
|
||||
Subject: [PATCH] HID: rmi: Check that a device is a RMI device before calling
|
||||
RMI functions
|
||||
|
||||
The hid-rmi driver may handle non rmi devices on composite USB devices.
|
||||
Callbacks need to make sure that the current device is a RMI device before
|
||||
calling RMI specific functions. Most callbacks already have this check, but
|
||||
this patch adds checks to the remaining callbacks.
|
||||
|
||||
Reported-by: Hendrik Langer <hendrik.langer@gmx.de>
|
||||
Tested-by: Hendrik Langer <hendrik.langer@gmx.de>
|
||||
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-rmi.c | 13 ++++++++++---
|
||||
1 file changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
|
||||
index ef241d66562e..0f43c4292685 100644
|
||||
--- a/drivers/hid/hid-rmi.c
|
||||
+++ b/drivers/hid/hid-rmi.c
|
||||
@@ -368,6 +368,11 @@ static int rmi_check_sanity(struct hid_device *hdev, u8 *data, int size)
|
||||
static int rmi_raw_event(struct hid_device *hdev,
|
||||
struct hid_report *report, u8 *data, int size)
|
||||
{
|
||||
+ struct rmi_data *hdata = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (!(hdata->device_flags & RMI_DEVICE))
|
||||
+ return 0;
|
||||
+
|
||||
size = rmi_check_sanity(hdev, data, size);
|
||||
if (size < 2)
|
||||
return 0;
|
||||
@@ -713,9 +718,11 @@ static void rmi_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct rmi_data *hdata = hid_get_drvdata(hdev);
|
||||
|
||||
- clear_bit(RMI_STARTED, &hdata->flags);
|
||||
- cancel_work_sync(&hdata->reset_work);
|
||||
- rmi_unregister_transport_device(&hdata->xport);
|
||||
+ if (hdata->device_flags & RMI_DEVICE) {
|
||||
+ clear_bit(RMI_STARTED, &hdata->flags);
|
||||
+ cancel_work_sync(&hdata->reset_work);
|
||||
+ rmi_unregister_transport_device(&hdata->xport);
|
||||
+ }
|
||||
|
||||
hid_hw_stop(hdev);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Thu, 16 Apr 2015 13:01:46 -0400
|
||||
Subject: [PATCH] Input - synaptics: pin 3 touches when the firmware reports 3
|
||||
fingers
|
||||
|
||||
Synaptics PS/2 touchpad can send only 2 touches in a report. They can
|
||||
detect 4 or 5 and this information is valuable.
|
||||
|
||||
In commit 63c4fda (Input: synaptics - allocate 3 slots to keep stability
|
||||
in image sensors), we allocate 3 slots, but we still continue to report
|
||||
the 2 available fingers. That means that the client sees 2 used slots while
|
||||
there is a total of 3 fingers advertised by BTN_TOOL_TRIPLETAP.
|
||||
|
||||
For old kernels this is not a problem because max_slots was 2 and libinput/
|
||||
xorg-synaptics knew how to deal with that. Now that max_slot is 3, the
|
||||
clients ignore BTN_TOOL_TRIPLETAP and count the actual used slots (so 2).
|
||||
It then gets confused when receiving the BTN_TOOL_TRIPLETAP and DOUBLETAP
|
||||
information, and goes wild.
|
||||
|
||||
We can pin the 3 slots until we get a total number of fingers below 2.
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1212230
|
||||
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
---
|
||||
drivers/input/mouse/synaptics.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
|
||||
index 3a32caf06bf1..58102970f94f 100644
|
||||
--- a/drivers/input/mouse/synaptics.c
|
||||
+++ b/drivers/input/mouse/synaptics.c
|
||||
@@ -940,6 +940,14 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
|
||||
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
|
||||
}
|
||||
|
||||
+ /* keep (slot count <= num_fingers) by pinning all slots */
|
||||
+ if (num_fingers >= 3) {
|
||||
+ for (i = 0; i < 3; i++) {
|
||||
+ input_mt_slot(dev, i);
|
||||
+ input_mt_report_slot_state(dev, MT_TOOL_FINGER, true);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
input_mt_drop_unused(dev);
|
||||
|
||||
/* Don't use active slot count to generate BTN_TOOL events. */
|
|
@ -0,0 +1,95 @@
|
|||
From fb2ac204a70da565de9ef9a9d6d69a40c2d59727 Mon Sep 17 00:00:00 2001
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Fri, 5 May 2017 08:21:56 +0100
|
||||
Subject: [PATCH] KEYS: Allow unrestricted boot-time addition of keys to
|
||||
secondary keyring
|
||||
|
||||
Allow keys to be added to the system secondary certificates keyring during
|
||||
kernel initialisation in an unrestricted fashion. Such keys are implicitly
|
||||
trusted and don't have their trust chains checked on link.
|
||||
|
||||
This allows keys in the UEFI database to be added in secure boot mode for
|
||||
the purposes of module signing.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
certs/internal.h | 18 ++++++++++++++++++
|
||||
certs/system_keyring.c | 33 +++++++++++++++++++++++++++++++++
|
||||
2 files changed, 51 insertions(+)
|
||||
create mode 100644 certs/internal.h
|
||||
|
||||
diff --git a/certs/internal.h b/certs/internal.h
|
||||
new file mode 100644
|
||||
index 0000000..5dcbefb
|
||||
--- /dev/null
|
||||
+++ b/certs/internal.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+/* Internal definitions
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
|
||||
+ * Written by David Howells (dhowells@redhat.com)
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public Licence
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the Licence, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * system_keyring.c
|
||||
+ */
|
||||
+#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
+extern void __init add_trusted_secondary_key(const char *source,
|
||||
+ const void *data, size_t len);
|
||||
+#endif
|
||||
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
|
||||
index 6251d1b..5ac8ba6 100644
|
||||
--- a/certs/system_keyring.c
|
||||
+++ b/certs/system_keyring.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <keys/asymmetric-type.h>
|
||||
#include <keys/system_keyring.h>
|
||||
#include <crypto/pkcs7.h>
|
||||
+#include "internal.h"
|
||||
|
||||
static struct key *builtin_trusted_keys;
|
||||
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
@@ -265,3 +266,35 @@ int verify_pkcs7_signature(const void *data, size_t len,
|
||||
EXPORT_SYMBOL_GPL(verify_pkcs7_signature);
|
||||
|
||||
#endif /* CONFIG_SYSTEM_DATA_VERIFICATION */
|
||||
+
|
||||
+#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
|
||||
+/**
|
||||
+ * add_trusted_secondary_key - Add to secondary keyring with no validation
|
||||
+ * @source: Source of key
|
||||
+ * @data: The blob holding the key
|
||||
+ * @len: The length of the data blob
|
||||
+ *
|
||||
+ * Add a key to the secondary keyring without checking its trust chain. This
|
||||
+ * is available only during kernel initialisation.
|
||||
+ */
|
||||
+void __init add_trusted_secondary_key(const char *source,
|
||||
+ const void *data, size_t len)
|
||||
+{
|
||||
+ key_ref_t key;
|
||||
+
|
||||
+ key = key_create_or_update(make_key_ref(secondary_trusted_keys, 1),
|
||||
+ "asymmetric",
|
||||
+ NULL, data, len,
|
||||
+ (KEY_POS_ALL & ~KEY_POS_SETATTR) |
|
||||
+ KEY_USR_VIEW,
|
||||
+ KEY_ALLOC_NOT_IN_QUOTA |
|
||||
+ KEY_ALLOC_BYPASS_RESTRICTION);
|
||||
+
|
||||
+ if (IS_ERR(key))
|
||||
+ pr_err("Problem loading %s X.509 certificate (%ld)\n",
|
||||
+ source, PTR_ERR(key));
|
||||
+ else
|
||||
+ pr_notice("Loaded %s cert '%s' linked to secondary sys keyring\n",
|
||||
+ source, key_ref_to_ptr(key)->description);
|
||||
+}
|
||||
+#endif /* CONFIG_SECONDARY_TRUSTED_KEYRING */
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 21 Nov 2014 10:40:00 -0800
|
||||
Subject: [PATCH] Kbuild: Add an option to enable GCC VTA
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Due to recent codegen issues, gcc -fvar-tracking-assignments was
|
||||
unconditionally disabled in commit 2062afb4f804a ("Fix gcc-4.9.0
|
||||
miscompilation of load_balance() in scheduler"). However, this reduces
|
||||
the debuginfo coverage for variable locations, especially in inline
|
||||
functions. VTA is certainly not perfect either in those cases, but it
|
||||
is much better than without. With compiler versions that have fixed the
|
||||
codegen bugs, we would prefer to have the better details for SystemTap,
|
||||
and surely other debuginfo consumers like perf will benefit as well.
|
||||
|
||||
This patch simply makes CONFIG_DEBUG_INFO_VTA an option. I considered
|
||||
Frank and Linus's discussion of a cc-option-like -fcompare-debug test,
|
||||
but I'm convinced that a narrow test of an arch-specific codegen issue
|
||||
is not really useful. GCC has their own regression tests for this, so
|
||||
I'd suggest GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle is more
|
||||
useful for kernel developers to test confidence.
|
||||
|
||||
In fact, I ran into a couple more issues when testing for this patch[1],
|
||||
although neither of those had any codegen impact.
|
||||
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1140872
|
||||
|
||||
With gcc-4.9.2-1.fc22, I can now build v3.18-rc5 with Fedora's i686 and
|
||||
x86_64 configs, and this is completely clean with GCC_COMPARE_DEBUG.
|
||||
|
||||
Cc: Frank Ch. Eigler <fche@redhat.com>
|
||||
Cc: Jakub Jelinek <jakub@redhat.com>
|
||||
Cc: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Cc: Andrew Morton <akpm@linux-foundation.org>
|
||||
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||
Cc: Michel Dänzer <michel@daenzer.net>
|
||||
Signed-off-by: Josh Stone <jistone@redhat.com>
|
||||
---
|
||||
Makefile | 4 ++++
|
||||
lib/Kconfig.debug | 18 +++++++++++++++++-
|
||||
2 files changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 257ef5892ab7..3cc6f4477e78 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -701,7 +701,11 @@ KBUILD_CFLAGS += -fomit-frame-pointer
|
||||
endif
|
||||
endif
|
||||
|
||||
+ifdef CONFIG_DEBUG_INFO_VTA
|
||||
+KBUILD_CFLAGS += $(call cc-option, -fvar-tracking-assignments)
|
||||
+else
|
||||
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
|
||||
+endif
|
||||
|
||||
ifdef CONFIG_DEBUG_INFO
|
||||
ifdef CONFIG_DEBUG_INFO_SPLIT
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
index e2894b23efb6..d98afe18f704 100644
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -165,7 +165,23 @@ config DEBUG_INFO_DWARF4
|
||||
Generate dwarf4 debug info. This requires recent versions
|
||||
of gcc and gdb. It makes the debug information larger.
|
||||
But it significantly improves the success of resolving
|
||||
- variables in gdb on optimized code.
|
||||
+ variables in gdb on optimized code. The gcc docs also
|
||||
+ recommend enabling -fvar-tracking-assignments for maximum
|
||||
+ benefit. (see DEBUG_INFO_VTA)
|
||||
+
|
||||
+config DEBUG_INFO_VTA
|
||||
+ bool "Enable var-tracking-assignments for debuginfo"
|
||||
+ depends on DEBUG_INFO
|
||||
+ help
|
||||
+ Enable gcc -fvar-tracking-assignments for improved debug
|
||||
+ information on variable locations in optimized code. Per
|
||||
+ gcc, DEBUG_INFO_DWARF4 is recommended for best use of VTA.
|
||||
+
|
||||
+ VTA has been implicated in codegen bugs (gcc PR61801,
|
||||
+ PR61904), so this may deserve some caution. One can set
|
||||
+ GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle in the
|
||||
+ environment to automatically compile everything both ways,
|
||||
+ generating an error if anything differs.
|
||||
|
||||
config GDB_SCRIPTS
|
||||
bool "Provide GDB scripts for kernel debugging"
|
|
@ -0,0 +1,246 @@
|
|||
From 90dc66270b02981b19a085c6a9184e3452b7b3e8 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Fri, 5 May 2017 08:21:59 +0100
|
||||
Subject: [PATCH 3/4] MODSIGN: Import certificates from UEFI Secure Boot
|
||||
|
||||
Secure Boot stores a list of allowed certificates in the 'db' variable.
|
||||
This imports those certificates into the system trusted keyring. This
|
||||
allows for a third party signing certificate to be used in conjunction
|
||||
with signed modules. By importing the public certificate into the 'db'
|
||||
variable, a user can allow a module signed with that certificate to
|
||||
load. The shim UEFI bootloader has a similar certificate list stored
|
||||
in the 'MokListRT' variable. We import those as well.
|
||||
|
||||
Secure Boot also maintains a list of disallowed certificates in the 'dbx'
|
||||
variable. We load those certificates into the newly introduced system
|
||||
blacklist keyring and forbid any module signed with those from loading and
|
||||
forbid the use within the kernel of any key with a matching hash.
|
||||
|
||||
This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
certs/Kconfig | 16 ++++++
|
||||
certs/Makefile | 4 ++
|
||||
certs/load_uefi.c | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 188 insertions(+)
|
||||
create mode 100644 certs/load_uefi.c
|
||||
|
||||
diff --git a/certs/Kconfig b/certs/Kconfig
|
||||
index 630ae09..edf9f75 100644
|
||||
--- a/certs/Kconfig
|
||||
+++ b/certs/Kconfig
|
||||
@@ -90,4 +90,20 @@ config EFI_SIGNATURE_LIST_PARSER
|
||||
This option provides support for parsing EFI signature lists for
|
||||
X.509 certificates and turning them into keys.
|
||||
|
||||
+config LOAD_UEFI_KEYS
|
||||
+ bool "Load certs and blacklist from UEFI db for module checking"
|
||||
+ depends on SYSTEM_BLACKLIST_KEYRING
|
||||
+ depends on SECONDARY_TRUSTED_KEYRING
|
||||
+ depends on EFI
|
||||
+ depends on EFI_SIGNATURE_LIST_PARSER
|
||||
+ help
|
||||
+ If the kernel is booted in secure boot mode, this option will cause
|
||||
+ the kernel to load the certificates from the UEFI db and MokListRT
|
||||
+ into the secondary trusted keyring. It will also load any X.509
|
||||
+ SHA256 hashes in the dbx list into the blacklist.
|
||||
+
|
||||
+ The effect of this is that, if the kernel is booted in secure boot
|
||||
+ mode, modules signed with UEFI-stored keys will be permitted to be
|
||||
+ loaded and keys that match the blacklist will be rejected.
|
||||
+
|
||||
endmenu
|
||||
diff --git a/certs/Makefile b/certs/Makefile
|
||||
index 738151a..a5e057a 100644
|
||||
--- a/certs/Makefile
|
||||
+++ b/certs/Makefile
|
||||
@@ -11,6 +11,10 @@ obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
|
||||
endif
|
||||
obj-$(CONFIG_EFI_SIGNATURE_LIST_PARSER) += efi_parser.o
|
||||
|
||||
+obj-$(CONFIG_LOAD_UEFI_KEYS) += load_uefi.o
|
||||
+$(obj)/load_uefi.o: KBUILD_CFLAGS += -fshort-wchar
|
||||
+
|
||||
+
|
||||
ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
|
||||
|
||||
$(eval $(call config_filename,SYSTEM_TRUSTED_KEYS))
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
new file mode 100644
|
||||
index 0000000..b44e464
|
||||
--- /dev/null
|
||||
+++ b/certs/load_uefi.c
|
||||
@@ -0,0 +1,168 @@
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/cred.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/efi.h>
|
||||
+#include <linux/slab.h>
|
||||
+#include <keys/asymmetric-type.h>
|
||||
+#include <keys/system_keyring.h>
|
||||
+#include "internal.h"
|
||||
+
|
||||
+static __initdata efi_guid_t efi_cert_x509_guid = EFI_CERT_X509_GUID;
|
||||
+static __initdata efi_guid_t efi_cert_x509_sha256_guid = EFI_CERT_X509_SHA256_GUID;
|
||||
+static __initdata efi_guid_t efi_cert_sha256_guid = EFI_CERT_SHA256_GUID;
|
||||
+
|
||||
+/*
|
||||
+ * Get a certificate list blob from the named EFI variable.
|
||||
+ */
|
||||
+static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
+ unsigned long *size)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ unsigned long lsize = 4;
|
||||
+ unsigned long tmpdb[4];
|
||||
+ void *db;
|
||||
+
|
||||
+ status = efi.get_variable(name, guid, NULL, &lsize, &tmpdb);
|
||||
+ if (status != EFI_BUFFER_TOO_SMALL) {
|
||||
+ pr_err("Couldn't get size: 0x%lx\n", status);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ db = kmalloc(lsize, GFP_KERNEL);
|
||||
+ if (!db) {
|
||||
+ pr_err("Couldn't allocate memory for uefi cert list\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
+ if (status != EFI_SUCCESS) {
|
||||
+ kfree(db);
|
||||
+ pr_err("Error reading db var: 0x%lx\n", status);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ *size = lsize;
|
||||
+ return db;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Blacklist an X509 TBS hash.
|
||||
+ */
|
||||
+static __init void uefi_blacklist_x509_tbs(const char *source,
|
||||
+ const void *data, size_t len)
|
||||
+{
|
||||
+ char *hash, *p;
|
||||
+
|
||||
+ hash = kmalloc(4 + len * 2 + 1, GFP_KERNEL);
|
||||
+ if (!hash)
|
||||
+ return;
|
||||
+ p = memcpy(hash, "tbs:", 4);
|
||||
+ p += 4;
|
||||
+ bin2hex(p, data, len);
|
||||
+ p += len * 2;
|
||||
+ *p = 0;
|
||||
+
|
||||
+ mark_hash_blacklisted(hash);
|
||||
+ kfree(hash);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Blacklist the hash of an executable.
|
||||
+ */
|
||||
+static __init void uefi_blacklist_binary(const char *source,
|
||||
+ const void *data, size_t len)
|
||||
+{
|
||||
+ char *hash, *p;
|
||||
+
|
||||
+ hash = kmalloc(4 + len * 2 + 1, GFP_KERNEL);
|
||||
+ if (!hash)
|
||||
+ return;
|
||||
+ p = memcpy(hash, "bin:", 4);
|
||||
+ p += 4;
|
||||
+ bin2hex(p, data, len);
|
||||
+ p += len * 2;
|
||||
+ *p = 0;
|
||||
+
|
||||
+ mark_hash_blacklisted(hash);
|
||||
+ kfree(hash);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Return the appropriate handler for particular signature list types found in
|
||||
+ * the UEFI db and MokListRT tables.
|
||||
+ */
|
||||
+static __init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type)
|
||||
+{
|
||||
+ if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0)
|
||||
+ return add_trusted_secondary_key;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Return the appropriate handler for particular signature list types found in
|
||||
+ * the UEFI dbx and MokListXRT tables.
|
||||
+ */
|
||||
+static __init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_type)
|
||||
+{
|
||||
+ if (efi_guidcmp(*sig_type, efi_cert_x509_sha256_guid) == 0)
|
||||
+ return uefi_blacklist_x509_tbs;
|
||||
+ if (efi_guidcmp(*sig_type, efi_cert_sha256_guid) == 0)
|
||||
+ return uefi_blacklist_binary;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Load the certs contained in the UEFI databases
|
||||
+ */
|
||||
+static int __init load_uefi_certs(void)
|
||||
+{
|
||||
+ efi_guid_t secure_var = EFI_IMAGE_SECURITY_DATABASE_GUID;
|
||||
+ efi_guid_t mok_var = EFI_SHIM_LOCK_GUID;
|
||||
+ void *db = NULL, *dbx = NULL, *mok = NULL;
|
||||
+ unsigned long dbsize = 0, dbxsize = 0, moksize = 0;
|
||||
+ int rc = 0;
|
||||
+
|
||||
+ if (!efi.get_variable)
|
||||
+ return false;
|
||||
+
|
||||
+ /* Get db, MokListRT, and dbx. They might not exist, so it isn't
|
||||
+ * an error if we can't get them.
|
||||
+ */
|
||||
+ db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
+ if (!db) {
|
||||
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list("UEFI:db",
|
||||
+ db, dbsize, get_handler_for_db);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
+ kfree(db);
|
||||
+ }
|
||||
+
|
||||
+ mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
+ if (!mok) {
|
||||
+ pr_info("MODSIGN: Couldn't get UEFI MokListRT\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list("UEFI:MokListRT",
|
||||
+ mok, moksize, get_handler_for_db);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse MokListRT signatures: %d\n", rc);
|
||||
+ kfree(mok);
|
||||
+ }
|
||||
+
|
||||
+ dbx = get_cert_list(L"dbx", &secure_var, &dbxsize);
|
||||
+ if (!dbx) {
|
||||
+ pr_info("MODSIGN: Couldn't get UEFI dbx list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list("UEFI:dbx",
|
||||
+ dbx, dbxsize,
|
||||
+ get_handler_for_dbx);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse dbx signatures: %d\n", rc);
|
||||
+ kfree(dbx);
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+late_initcall(load_uefi_certs);
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
From 9f1958a0cc911e1f79b2733ee5029dbd819ff328 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Fri, 5 May 2017 08:21:59 +0100
|
||||
Subject: [PATCH 4/4] MODSIGN: Allow the "db" UEFI variable to be suppressed
|
||||
|
||||
If a user tells shim to not use the certs/hashes in the UEFI db variable
|
||||
for verification purposes, shim will set a UEFI variable called
|
||||
MokIgnoreDB. Have the uefi import code look for this and ignore the db
|
||||
variable if it is found.
|
||||
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
---
|
||||
certs/load_uefi.c | 44 ++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 34 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
|
||||
index b44e464..3d88459 100644
|
||||
--- a/certs/load_uefi.c
|
||||
+++ b/certs/load_uefi.c
|
||||
@@ -13,6 +13,26 @@ static __initdata efi_guid_t efi_cert_x509_sha256_guid = EFI_CERT_X509_SHA256_GU
|
||||
static __initdata efi_guid_t efi_cert_sha256_guid = EFI_CERT_SHA256_GUID;
|
||||
|
||||
/*
|
||||
+ * Look to see if a UEFI variable called MokIgnoreDB exists and return true if
|
||||
+ * it does.
|
||||
+ *
|
||||
+ * This UEFI variable is set by the shim if a user tells the shim to not use
|
||||
+ * the certs/hashes in the UEFI db variable for verification purposes. If it
|
||||
+ * is set, we should ignore the db variable also and the true return indicates
|
||||
+ * this.
|
||||
+ */
|
||||
+static __init bool uefi_check_ignore_db(void)
|
||||
+{
|
||||
+ efi_status_t status;
|
||||
+ unsigned int db = 0;
|
||||
+ unsigned long size = sizeof(db);
|
||||
+ efi_guid_t guid = EFI_SHIM_LOCK_GUID;
|
||||
+
|
||||
+ status = efi.get_variable(L"MokIgnoreDB", &guid, NULL, &size, &db);
|
||||
+ return status == EFI_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Get a certificate list blob from the named EFI variable.
|
||||
*/
|
||||
static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
@@ -113,7 +133,9 @@ static __init efi_element_handler_t get_handler_for_dbx(const efi_guid_t *sig_ty
|
||||
}
|
||||
|
||||
/*
|
||||
- * Load the certs contained in the UEFI databases
|
||||
+ * Load the certs contained in the UEFI databases into the secondary trusted
|
||||
+ * keyring and the UEFI blacklisted X.509 cert SHA256 hashes into the blacklist
|
||||
+ * keyring.
|
||||
*/
|
||||
static int __init load_uefi_certs(void)
|
||||
{
|
||||
@@ -129,15 +151,17 @@ static int __init load_uefi_certs(void)
|
||||
/* Get db, MokListRT, and dbx. They might not exist, so it isn't
|
||||
* an error if we can't get them.
|
||||
*/
|
||||
- db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
- if (!db) {
|
||||
- pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
- } else {
|
||||
- rc = parse_efi_signature_list("UEFI:db",
|
||||
- db, dbsize, get_handler_for_db);
|
||||
- if (rc)
|
||||
- pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
- kfree(db);
|
||||
+ if (!uefi_check_ignore_db()) {
|
||||
+ db = get_cert_list(L"db", &secure_var, &dbsize);
|
||||
+ if (!db) {
|
||||
+ pr_err("MODSIGN: Couldn't get UEFI db list\n");
|
||||
+ } else {
|
||||
+ rc = parse_efi_signature_list("UEFI:db",
|
||||
+ db, dbsize, get_handler_for_db);
|
||||
+ if (rc)
|
||||
+ pr_err("Couldn't parse db signatures: %d\n", rc);
|
||||
+ kfree(db);
|
||||
+ }
|
||||
}
|
||||
|
||||
mok = get_cert_list(L"MokListRT", &mok_var, &moksize);
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
# Makefile for source rpm: kernel
|
||||
SPECFILE := kernel.spec
|
||||
|
||||
# we only check the .sign signatures
|
||||
UPSTREAM_CHECKS = sign
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
%:
|
||||
@echo "Try fedpkg $@ or something like that"
|
||||
@exit 1
|
||||
|
||||
prep: config-files
|
||||
fedpkg -v prep
|
||||
|
||||
noarch:
|
||||
fedpkg -v local --arch=noarch
|
||||
|
||||
# 'make local' also needs to build the noarch firmware package
|
||||
local:
|
||||
fedpkg -v local
|
||||
|
||||
extremedebug:
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
|
||||
|
||||
config-files:
|
||||
@./build_configs.sh
|
||||
|
||||
debug:
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
|
||||
|
||||
release:
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Disable debugging options." kernel.spec
|
||||
|
||||
nodebuginfo:
|
||||
@perl -pi -e 's/^%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 1\}/%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 0\}/' kernel.spec
|
||||
|
||||
nodebug: release
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
|
||||
ifeq ($(MAKECMDGOALS),me a sandwich)
|
||||
.PHONY: me a sandwich
|
||||
me a:
|
||||
@:
|
||||
|
||||
sandwich:
|
||||
@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
|
||||
endif
|
|
@ -1,45 +0,0 @@
|
|||
RHEL_MAJOR = 8
|
||||
RHEL_MINOR = 99
|
||||
|
||||
#
|
||||
# RHEL_RELEASE
|
||||
# -------------
|
||||
#
|
||||
# Represents build number in 'release' part of RPM's name-version-release.
|
||||
# name is <package_name>, e.g. kernel
|
||||
# version is upstream kernel version this kernel is based on, e.g. 4.18.0
|
||||
# release is <RHEL_RELEASE>.<dist_tag>[<buildid>], e.g. 100.el8
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_RELEASE = 122
|
||||
|
||||
#
|
||||
# Early y+1 numbering
|
||||
# --------------------
|
||||
#
|
||||
# In early y+1 process, RHEL_RELEASE consists of 2 numbers: x.y
|
||||
# First is RHEL_RELEASE inherited/merged from y as-is, second number
|
||||
# is incremented with each build starting from 1. After merge from y,
|
||||
# it resets back to 1. This way y+1 nvr reflects status of last merge.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# rhel8.0 rhel-8.1
|
||||
# kernel-4.18.0-58.el8 --> kernel-4.18.0-58.1.el8
|
||||
# kernel-4.18.0-58.2.el8
|
||||
# kernel-4.18.0-59.el8 kernel-4.18.0-59.1.el8
|
||||
# kernel-4.18.0-60.el8
|
||||
# kernel-4.18.0-61.el8 --> kernel-4.18.0-61.1.el8
|
||||
#
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
EARLY_YSTREAM ?= no
|
||||
EARLY_YBUILD:=
|
||||
EARLY_YRELEASE:=
|
||||
ifneq ("$(ZSTREAM)", "yes")
|
||||
ifeq ("$(EARLY_YSTREAM)","yes")
|
||||
RHEL_RELEASE:=$(RHEL_RELEASE).$(EARLY_YRELEASE)
|
||||
endif
|
||||
endif
|
|
@ -0,0 +1,55 @@
|
|||
From patchwork Mon Oct 2 14:08:40 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: PCI: aspm: deal with missing root ports in link state handling
|
||||
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
X-Patchwork-Id: 9980861
|
||||
Message-Id: <20171002140840.7767-1-ard.biesheuvel@linaro.org>
|
||||
To: linux-pci@vger.kernel.org, bhelgaas@google.com
|
||||
Cc: graeme.gregory@linaro.org, leif.lindholm@linaro.org,
|
||||
daniel.thompson@Linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Date: Mon, 2 Oct 2017 15:08:40 +0100
|
||||
|
||||
Even though it is unconventional, some PCIe host implementations omit
|
||||
the root ports entirely, and simply consist of a host bridge (which
|
||||
is not modeled as a device in the PCI hierarchy) and a link.
|
||||
|
||||
When the downstream device is an endpoint, our current code does not
|
||||
seem to mind this unusual configuration. However, when PCIe switches
|
||||
are involved, the ASPM code assumes that any downstream switch port
|
||||
has a parent, and blindly derefences the bus->parent->self field of
|
||||
the pci_dev struct to chain the downstream link state to the link
|
||||
state of the root port. Given that the root port is missing, the link
|
||||
is not modeled at all, and nor is the link state, and attempting to
|
||||
access it results in a NULL pointer dereference and a crash.
|
||||
|
||||
So let's avoid this by allowing the link state chain to terminate at
|
||||
the downstream port if no root port exists.
|
||||
|
||||
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
---
|
||||
drivers/pci/pcie/aspm.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c
|
||||
index 1dfa10cc566b..0bea8498b5a5 100644
|
||||
--- a/drivers/pci/pcie/aspm.c
|
||||
+++ b/drivers/pci/pcie/aspm.c
|
||||
@@ -802,10 +802,14 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
|
||||
|
||||
/*
|
||||
* Root Ports and PCI/PCI-X to PCIe Bridges are roots of PCIe
|
||||
- * hierarchies.
|
||||
+ * hierarchies. Note that some PCIe host implementations omit
|
||||
+ * the root ports entirely, in which case a downstream port on
|
||||
+ * a switch may become the root of the link state chain for all
|
||||
+ * its subordinate endpoints.
|
||||
*/
|
||||
if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT ||
|
||||
- pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE) {
|
||||
+ pci_pcie_type(pdev) == PCI_EXP_TYPE_PCIE_BRIDGE ||
|
||||
+ !pdev->bus->parent->self) {
|
||||
link->root = link;
|
||||
} else {
|
||||
struct pcie_link_state *parent;
|
|
@ -0,0 +1,76 @@
|
|||
# This file contains patches that we intend to carry for longer than
|
||||
# "Should show up in a stable release soonish"
|
||||
# Some of these may eventually drop out
|
||||
|
||||
kbuild-AFTER_LINK.patch
|
||||
|
||||
arm64-avoid-needing-console-to-enable-serial-console.patch
|
||||
|
||||
geekbox-v4-device-tree-support.patch
|
||||
|
||||
Initial-AllWinner-A64-and-PINE64-support.patch
|
||||
|
||||
arm64-pcie-quirks-xgene.patch
|
||||
|
||||
usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch
|
||||
|
||||
ARM-tegra-usb-no-reset.patch
|
||||
|
||||
bcm283x-upstream-fixes.patch
|
||||
|
||||
lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
|
||||
|
||||
input-kill-stupid-messages.patch
|
||||
|
||||
die-floppy-die.patch
|
||||
|
||||
no-pcspkr-modalias.patch
|
||||
|
||||
silence-fbcon-logo.patch
|
||||
|
||||
Kbuild-Add-an-option-to-enable-GCC-VTA.patch
|
||||
|
||||
crash-driver.patch
|
||||
|
||||
#Secure boot patches
|
||||
Add-secure_modules-call.patch
|
||||
PCI-Lock-down-BAR-access-when-module-security-is-ena.patch
|
||||
x86-Lock-down-IO-port-access-when-module-security-is.patch
|
||||
ACPI-Limit-access-to-custom_method.patch
|
||||
asus-wmi-Restrict-debugfs-interface-when-module-load.patch
|
||||
Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch
|
||||
acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch
|
||||
kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch
|
||||
x86-Restrict-MSR-access-when-module-loading-is-restr.patch
|
||||
Add-option-to-automatically-enforce-module-signature.patch
|
||||
efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch
|
||||
efi-Add-EFI_SECURE_BOOT-bit.patch
|
||||
hibernate-Disable-in-a-signed-modules-environment.patch
|
||||
Add-EFI-signature-data-types.patch
|
||||
Add-an-EFI-signature-blob-parser-and-key-loader.patch
|
||||
KEYS-Add-a-system-blacklist-keyring.patch
|
||||
MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
|
||||
MODSIGN-Support-not-importing-certs-from-db.patch
|
||||
Add-sysrq-option-to-disable-secure-boot-mode.patch
|
||||
kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
|
||||
|
||||
drm-i915-hush-check-crtc-state.patch
|
||||
|
||||
disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
lis3-improve-handling-of-null-rate.patch
|
||||
|
||||
scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
|
||||
|
||||
criu-no-expert.patch
|
||||
|
||||
ath9k-rx-dma-stop-check.patch
|
||||
|
||||
xen-pciback-Don-t-disable-PCI_COMMAND-on-PCI-device-.patch
|
||||
|
||||
Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch
|
||||
|
||||
drm-i915-turn-off-wc-mmaps.patch
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
https://gitlab.com/cki-project/kernel-ark/-/commit/8773e8c6039ff74d1426cc80de30de759cd0c2a2
|
||||
8773e8c6039ff74d1426cc80de30de759cd0c2a2 irq: export irq_check_status_bit
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e187313e5f0086538fefe0925ef84480f99616d8
|
||||
e187313e5f0086538fefe0925ef84480f99616d8 gcc-plugins: fix gcc 11 indigestion with plugins...
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0c84b348e33ab9d7df5c3c5acc7fbc07fd96fafc
|
||||
0c84b348e33ab9d7df5c3c5acc7fbc07fd96fafc Fix up bad merge with efi: generalize efi_get_secureboot
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/364788093bdf437c33753d327136c363be8f756c
|
||||
364788093bdf437c33753d327136c363be8f756c Fix up a merge issue with rxe.c
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a4d554ce883e24df77cce42bc2deec527028c213
|
||||
a4d554ce883e24df77cce42bc2deec527028c213 Filter out LTO build options from the perl ccopts
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/17b0f7f1d49df30661b517d668715ff5ee1bab09
|
||||
17b0f7f1d49df30661b517d668715ff5ee1bab09 Fixes "acpi: prefer booting with ACPI over DTS" to be RHEL only
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e7c009cd91ababdbb5f726ef592c7800f0682d3a
|
||||
e7c009cd91ababdbb5f726ef592c7800f0682d3a arch/x86: Remove vendor specific CPU ID checks
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7120b2a26fc4c7954fd0395973dc6739c110e091
|
||||
7120b2a26fc4c7954fd0395973dc6739c110e091 redhat: Replace hardware.redhat.com link in Unsupported message
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7a28e2fde653a161913abb8eee943cdacb5ff2ae
|
||||
7a28e2fde653a161913abb8eee943cdacb5ff2ae x86: Fix compile issues with rh_check_supported()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/45f64c1a24e73af7987cffec3ea941e29364f87f
|
||||
45f64c1a24e73af7987cffec3ea941e29364f87f e1000e: bump up timeout to wait when ME un-configure ULP mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6c14763b1ce98698949ff45135c15e333aa6416d
|
||||
6c14763b1ce98698949ff45135c15e333aa6416d drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/67a19b16012b12cffba0b515c6503e5f8cdbb798
|
||||
67a19b16012b12cffba0b515c6503e5f8cdbb798 drm: panel: add Xingbangda XBD599 panel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d220dbf98cef820367b5a2a2eeaacebee958bdd4
|
||||
d220dbf98cef820367b5a2a2eeaacebee958bdd4 dt-bindings: panel: add binding for Xingbangda XBD599 panel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/80660062260dec4bdca9540922577542c16145e8
|
||||
80660062260dec4bdca9540922577542c16145e8 ARM: fix __get_user_check() in case uaccess_* calls are not inlined
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/24d8743613b2a6a585fc68cfe95078d9a3d5b389
|
||||
24d8743613b2a6a585fc68cfe95078d9a3d5b389 mm/kmemleak: skip late_init if not skip disable
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b697ff5e26974fee8fcd31a1e221e9dd41515efc
|
||||
b697ff5e26974fee8fcd31a1e221e9dd41515efc KEYS: Make use of platform keyring for module signature verify
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/081d2185e22479b449586c4e9843602ca0d49806
|
||||
081d2185e22479b449586c4e9843602ca0d49806 Drop that for now
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5ef51389cf6673a0e9e004909c7be1dc785050b2
|
||||
5ef51389cf6673a0e9e004909c7be1dc785050b2 Input: rmi4 - remove the need for artificial IRQ in case of HID
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c1788012ebf8de46e9dc80d18051ed0c77c811b6
|
||||
c1788012ebf8de46e9dc80d18051ed0c77c811b6 ARM: tegra: usb no reset
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/577365feaa909db4c0949eabfcda7e4a972b8e54
|
||||
577365feaa909db4c0949eabfcda7e4a972b8e54 arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/331be9c5a436057ee852075c102d9d90a9046a30
|
||||
331be9c5a436057ee852075c102d9d90a9046a30 redhat: rh_kabi: deduplication friendly structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/34d79fbfb327f732ebf3ece4db21a14f81fedf03
|
||||
34d79fbfb327f732ebf3ece4db21a14f81fedf03 redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/93a4b5f12d5a1c2d62cf1d7c440b31d9847eab07
|
||||
93a4b5f12d5a1c2d62cf1d7c440b31d9847eab07 redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8e5c06356457f5351289e9f687b991189d163dae
|
||||
8e5c06356457f5351289e9f687b991189d163dae redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/212cbccda77cc81fcb60123907eabdac8ad5adb7
|
||||
212cbccda77cc81fcb60123907eabdac8ad5adb7 redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6f7744b412e1fb86a67d8761e64df69cf891b4ad
|
||||
6f7744b412e1fb86a67d8761e64df69cf891b4ad redhat: rh_kabi: Add macros to size and extend structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/049623d33998be30d79692c69b34acb502c496e3
|
||||
049623d33998be30d79692c69b34acb502c496e3 Removing Obsolete hba pci-ids from rhel8
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/43ef1d631ecfe84084db3572c9ed1bedbdceb0f8
|
||||
43ef1d631ecfe84084db3572c9ed1bedbdceb0f8 mptsas: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e5726695109dd1a73da92487b75de6a51d54c015
|
||||
e5726695109dd1a73da92487b75de6a51d54c015 mptsas: Taint kernel if mptsas is loaded
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ee4dcd6f04ca76ad35ab0f38c436ab2f7de53f16
|
||||
ee4dcd6f04ca76ad35ab0f38c436ab2f7de53f16 mptspi: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/bd305f716d8b64be1926bc7aebe02468ac6bf599
|
||||
bd305f716d8b64be1926bc7aebe02468ac6bf599 qla2xxx: Remove PCI IDs of deprecated adapter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/803ff9a2c660c094e14d246ef05019bf6008d503
|
||||
803ff9a2c660c094e14d246ef05019bf6008d503 be2iscsi: remove unsupported device IDs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2cb24399321f555f18b0804d3fe02cf53949fba1
|
||||
2cb24399321f555f18b0804d3fe02cf53949fba1 mptspi: Taint kernel if mptspi is loaded
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ad1740551ff4af49f1ef10a130783d9369e955a0
|
||||
ad1740551ff4af49f1ef10a130783d9369e955a0 hpsa: remove old cciss-based smartarray pci ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4197ba3e766656eea9175c11ed05903620d98a28
|
||||
4197ba3e766656eea9175c11ed05903620d98a28 qla4xxx: Remove deprecated PCI IDs from RHEL 8
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7e285aec22ab1213639afda877902db363473cb0
|
||||
7e285aec22ab1213639afda877902db363473cb0 aacraid: Remove depreciated device and vendor PCI id's
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/846109a16be92155e69731c36dde48761d375153
|
||||
846109a16be92155e69731c36dde48761d375153 megaraid_sas: remove deprecated pci-ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6fd2019d01cee7ff36dc047d3ecdb504b968f222
|
||||
6fd2019d01cee7ff36dc047d3ecdb504b968f222 mpt*: remove certain deprecated pci-ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/dddcd5c1129b275ff160324036a662739db51fc3
|
||||
dddcd5c1129b275ff160324036a662739db51fc3 kernel: add SUPPORT_REMOVED kernel taint
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/08d77161dba915d1ed0d9fede658085440ab4474
|
||||
08d77161dba915d1ed0d9fede658085440ab4474 Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e2dc2ca6a25a445bf22ceb6a8e38e02706605341
|
||||
e2dc2ca6a25a445bf22ceb6a8e38e02706605341 Add option of 13 for FORCE_MAX_ZONEORDER
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2384646bf71d8c282cf49bb20321fdf802c61cce
|
||||
2384646bf71d8c282cf49bb20321fdf802c61cce s390: Lock down the kernel when the IPL secure flag is set
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5850c93175b9d2e1081873f4bbe08dead202cb08
|
||||
5850c93175b9d2e1081873f4bbe08dead202cb08 efi: Lock down the kernel if booted in secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/53250b991f841be025fa4d264850dadc0fae2861
|
||||
53250b991f841be025fa4d264850dadc0fae2861 efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/72223fd1241cc5c70b96a491db14d54c83beadd8
|
||||
72223fd1241cc5c70b96a491db14d54c83beadd8 security: lockdown: expose a hook to lock the kernel down
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7ba28f03674fa9346610c3fea7fc93bc58f06d2a
|
||||
7ba28f03674fa9346610c3fea7fc93bc58f06d2a Make get_cert_list() use efi_status_to_str() to print error messages.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2ae9082db0b54d831a9b3782c049d9917e37d89f
|
||||
2ae9082db0b54d831a9b3782c049d9917e37d89f Add efi_status_to_str() and rework efi_status_to_err().
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cee1461ada1b7e4b92cd154e7ec241119afcd644
|
||||
cee1461ada1b7e4b92cd154e7ec241119afcd644 Add support for deprecating processors
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2420149f8f5fa9dd1e2dc793765b498022922a81
|
||||
2420149f8f5fa9dd1e2dc793765b498022922a81 arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/1d69b30b98b60aff639351f5788d20a3b17f6e27
|
||||
1d69b30b98b60aff639351f5788d20a3b17f6e27 iommu/arm-smmu: workaround DMA mode issues
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6b2e73e508e7a117b1db91596097c00e5570f64a
|
||||
6b2e73e508e7a117b1db91596097c00e5570f64a rh_kabi: introduce RH_KABI_EXCLUDE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ecb9206bce179eb600c52642a6753012a69ce4a2
|
||||
ecb9206bce179eb600c52642a6753012a69ce4a2 ipmi: do not configure ipmi for HPE m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/473be59fe72afa9969cf8d10609ef3f14f594631
|
||||
473be59fe72afa9969cf8d10609ef3f14f594631 IB/rxe: Mark Soft-RoCE Transport driver as tech-preview
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b94117795261f9c074a7addca2252238871b5081
|
||||
b94117795261f9c074a7addca2252238871b5081 scsi: smartpqi: add inspur advantech ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cae871558c333880c1687cab6f2a71accf40d105
|
||||
cae871558c333880c1687cab6f2a71accf40d105 ice: mark driver as tech-preview
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7d9cb007404211ea6638bde4a28dd0fbe8d95de0
|
||||
7d9cb007404211ea6638bde4a28dd0fbe8d95de0 kABI: Add generic kABI macros to use for kABI workarounds
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/bd353e9aae8877dd490e6c92b67849e0dcfbab25
|
||||
bd353e9aae8877dd490e6c92b67849e0dcfbab25 add pci_hw_vendor_status()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/41a259999969bbdfe9f556ce71f2c3c07d7454f4
|
||||
41a259999969bbdfe9f556ce71f2c3c07d7454f4 ahci: thunderx2: Fix for errata that affects stop engine
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2a107343529ce648c11bff62e9f72bbeec738f3f
|
||||
2a107343529ce648c11bff62e9f72bbeec738f3f Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/03e48a48f400a51a182a1254cf22ff0c08706d76
|
||||
03e48a48f400a51a182a1254cf22ff0c08706d76 bpf: Add tech preview taint for syscall
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/607f0e89af7ef5682f79f2eea0a99638a1bc0c4f
|
||||
607f0e89af7ef5682f79f2eea0a99638a1bc0c4f bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/31da227877eb734ddb484bc519aae85ce200802e
|
||||
31da227877eb734ddb484bc519aae85ce200802e add Red Hat-specific taint flags
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7a2e2c83be0230667756cccb5bc3687419dfbb8b
|
||||
7a2e2c83be0230667756cccb5bc3687419dfbb8b kdump: fix a grammar issue in a kernel message
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d345d54d33e7d496c9d845e4723550dd37cb3f88
|
||||
d345d54d33e7d496c9d845e4723550dd37cb3f88 tags.sh: Ignore redhat/rpm
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5c67dc1eb0783a5c4ca4eb5c545ff6fe05facff0
|
||||
5c67dc1eb0783a5c4ca4eb5c545ff6fe05facff0 put RHEL info into generated headers
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ce12884c009ec3bed11100c9d19f6d97628cf8ae
|
||||
ce12884c009ec3bed11100c9d19f6d97628cf8ae kdump: add support for crashkernel=auto
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/18fb1389afccdc5535977a10669b49a37829b55a
|
||||
18fb1389afccdc5535977a10669b49a37829b55a kdump: round up the total memory size to 128M for crashkernel reservation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5fb9821441cc0b77101ad9c0dfaa747957a4cce4
|
||||
5fb9821441cc0b77101ad9c0dfaa747957a4cce4 acpi: prefer booting with ACPI over DTS
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0cf21a40db6fca5d89cf3d65808117c8c14e524e
|
||||
0cf21a40db6fca5d89cf3d65808117c8c14e524e aarch64: acpi scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/de13e14cc2388478d9a2c68c5d90affd92098f11
|
||||
de13e14cc2388478d9a2c68c5d90affd92098f11 ACPI / irq: Workaround firmware issue on X-Gene based m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/71c098f4afa38a15a95495c14f71fb087ab27308
|
||||
71c098f4afa38a15a95495c14f71fb087ab27308 modules: add rhelversion MODULE_INFO tag
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/3247f9c838f4aa91aa5d08c152b385d61554d4b5
|
||||
3247f9c838f4aa91aa5d08c152b385d61554d4b5 ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e80982feaa68226ff60d2f83dace2016c35270d3
|
||||
e80982feaa68226ff60d2f83dace2016c35270d3 Add Red Hat tainting
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2987f9a606df106f5bdfa4113eb55356a21085a6
|
||||
2987f9a606df106f5bdfa4113eb55356a21085a6 Introduce CONFIG_RH_DISABLE_DEPRECATED
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a99885a5e77af594dfdce586cc83e5911d8401ce
|
||||
a99885a5e77af594dfdce586cc83e5911d8401ce Pull the RHEL version defines out of the Makefile
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cd3a5d30570279538623ea8a1255db0ee4b728f7
|
||||
cd3a5d30570279538623ea8a1255db0ee4b728f7 [initial commit] Add Red Hat variables in the top level makefile
|
||||
|
25
README.rst
25
README.rst
|
@ -1,25 +0,0 @@
|
|||
===================
|
||||
The Kernel dist-git
|
||||
===================
|
||||
|
||||
The kernel is maintained in a `source tree`_ rather than directly in dist-git.
|
||||
The specfile is maintained as a `template`_ in the source tree along with a set
|
||||
of build scripts to generate configurations, (S)RPMs, and to populate the
|
||||
dist-git repository.
|
||||
|
||||
The `documentation`_ for the source tree covers how to contribute and maintain
|
||||
the tree.
|
||||
|
||||
If you're looking for the downstream patch set it's available in the source
|
||||
tree with "git log master..ark-patches" or
|
||||
`online`_.
|
||||
|
||||
Each release in dist-git is tagged in the source repository so you can easily
|
||||
check out the source tree for a build. The tags are in the format
|
||||
name-version-release, but note release doesn't contain the dist tag since the
|
||||
source can be built in different build roots (Fedora, CentOS, etc.)
|
||||
|
||||
.. _source tree: https://gitlab.com/cki-project/kernel-ark.git
|
||||
.. _template: https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template
|
||||
.. _documentation: https://gitlab.com/cki-project/kernel-ark/-/wikis/home
|
||||
.. _online: https://gitlab.com/cki-project/kernel-ark/-/commits/ark-patches
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
Kernel package tips & tricks.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The kernel is one of the more complicated packages in the distro, and
|
||||
for the newcomer, some of the voodoo in the spec file can be somewhat scary.
|
||||
This file attempts to document some of the magic.
|
||||
|
||||
|
||||
Speeding up make prep
|
||||
---------------------
|
||||
The kernel is nearly 500MB of source code, and as such, 'make prep'
|
||||
takes a while. The spec file employs some trickery so that repeated
|
||||
invocations of make prep don't take as long. Ordinarily the %prep
|
||||
phase of a package will delete the tree it is about to untar/patch.
|
||||
The kernel %prep keeps around an unpatched version of the tree,
|
||||
and makes a symlink tree clone of that clean tree and than applies
|
||||
the patches listed in the spec to the symlink tree.
|
||||
This makes a huge difference if you're doing multiple make preps a day.
|
||||
As an added bonus, doing a diff between the clean tree and the symlink
|
||||
tree is slightly faster than it would be doing two proper copies of the tree.
|
||||
|
||||
|
||||
build logs.
|
||||
-----------
|
||||
There's a convenience helper script in scripts/grab-logs.sh
|
||||
that will grab the build logs from koji for the kernel version reported
|
||||
by make verrel
|
||||
|
||||
|
||||
config heirarchy.
|
||||
-----------------
|
||||
Instead of having to maintain a config file for every arch variant we build on,
|
||||
the kernel spec uses a nested system of configs. At the top level, is
|
||||
config-generic. Add options here that should be present in every possible
|
||||
config on all architectures.
|
||||
|
||||
Beneath this are per-arch overrides. For example config-x86-generic add
|
||||
additional x86 specific options, and also _override_ any options that were
|
||||
set in config-generic.
|
||||
|
||||
The heirarchy looks like this..
|
||||
|
||||
config-generic
|
||||
|
|
||||
config-x86-generic
|
||||
| |
|
||||
config-x86-32-generic config-x86-64-generic
|
||||
|
||||
An option set in a lower level will override the same option set in one
|
||||
of the higher levels.
|
||||
|
||||
|
||||
There exist two additional overrides, config-debug, and config-nodebug,
|
||||
which override -generic, and the per-arch overrides. It is documented
|
||||
further below.
|
||||
|
||||
|
||||
debug options.
|
||||
--------------
|
||||
This is a little complicated, as the purpose & meaning of this changes
|
||||
depending on where we are in the release cycle.
|
||||
If we are building for a current stable release, 'make release' has
|
||||
typically been run already, which sets up the following..
|
||||
- Two builds occur, a 'kernel' and a 'kernel-debug' flavor.
|
||||
- kernel-debug will get various heavyweight debugging options like
|
||||
lockdep etc turned on.
|
||||
|
||||
If we are building for rawhide, 'make debug' has been run, which changes
|
||||
the status quo to:
|
||||
- We only build one kernel 'kernel'
|
||||
- The debug options from 'config-debug' are always turned on.
|
||||
This is done to increase coverage testing, as not many people actually
|
||||
run kernel-debug.
|
||||
|
||||
To add new debug options, add an option to _both_ config-debug and config-nodebug,
|
||||
and also new stanzas to the Makefile 'debug' and 'release' targets.
|
||||
|
||||
Sometimes debug options get added to config-generic, or per-arch overrides
|
||||
instead of config-[no]debug. In this instance, the options should have no
|
||||
discernable performance impact, otherwise they belong in the debug files.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Config TODOs:
|
||||
* review & disable a bunch of the I2C, RTC, DVB, SOUND options.
|
||||
|
||||
Spec file TODOs:
|
||||
|
||||
* modules-extra: Do a few more things to make it a bit more robust.
|
||||
- Allow for comments in the mod-extra.list file.
|
||||
- Don't fail the build if a module is listed but not built (maybe).
|
||||
- See if it can be tied into Kconfig instead of module names.
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,411 @@
|
|||
From patchwork Mon Oct 9 12:00:50 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [PATCHv4,1/2] drivers: phy: add calibrate method
|
||||
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
||||
X-Patchwork-Id: 9992829
|
||||
Message-Id: <1507550451-21324-2-git-send-email-andrzej.p@samsung.com>
|
||||
To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
|
||||
Cc: Mark Rutland <mark.rutland@arm.com>, Felipe Balbi <balbi@kernel.org>,
|
||||
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
Krzysztof Kozlowski <krzk@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@ti.com>,
|
||||
Rob Herring <robh+dt@kernel.org>, Kukjin Kim <kgene@kernel.org>,
|
||||
Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
|
||||
Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Mon, 09 Oct 2017 14:00:50 +0200
|
||||
|
||||
Some quirky UDCs (like dwc3 on Exynos) need to have their phys calibrated e.g.
|
||||
for using super speed. This patch adds a new phy_calibrate() method.
|
||||
When the calibration should be used is dependent on actual chip.
|
||||
|
||||
In case of dwc3 on Exynos the calibration must happen after usb_add_hcd()
|
||||
(while in host mode), because certain phy parameters like Tx LOS levels
|
||||
and boost levels need to be calibrated further post initialization of xHCI
|
||||
controller, to get SuperSpeed operations working. But an hcd must be
|
||||
prepared first in order to pass it to usb_add_hcd(), so, in particular, dwc3
|
||||
registers must be available first, and in order for the latter to happen
|
||||
the phys must be initialized. This poses a chicken and egg problem if
|
||||
the calibration were to be performed in phy_init(). To break the circular
|
||||
dependency a separate method is added which can be called at a desired
|
||||
moment after phy intialization.
|
||||
|
||||
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
||||
---
|
||||
drivers/phy/phy-core.c | 15 +++++++++++++++
|
||||
include/linux/phy/phy.h | 10 ++++++++++
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
|
||||
index a268f4d..b4964b0 100644
|
||||
--- a/drivers/phy/phy-core.c
|
||||
+++ b/drivers/phy/phy-core.c
|
||||
@@ -372,6 +372,21 @@ int phy_reset(struct phy *phy)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(phy_reset);
|
||||
|
||||
+int phy_calibrate(struct phy *phy)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!phy || !phy->ops->calibrate)
|
||||
+ return 0;
|
||||
+
|
||||
+ mutex_lock(&phy->mutex);
|
||||
+ ret = phy->ops->calibrate(phy);
|
||||
+ mutex_unlock(&phy->mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(phy_calibrate);
|
||||
+
|
||||
/**
|
||||
* _of_phy_get() - lookup and obtain a reference to a phy by phandle
|
||||
* @np: device_node for which to get the phy
|
||||
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
|
||||
index e694d40..87580c8 100644
|
||||
--- a/include/linux/phy/phy.h
|
||||
+++ b/include/linux/phy/phy.h
|
||||
@@ -39,6 +39,7 @@ enum phy_mode {
|
||||
* @power_off: powering off the phy
|
||||
* @set_mode: set the mode of the phy
|
||||
* @reset: resetting the phy
|
||||
+ * @calibrate: calibrate the phy
|
||||
* @owner: the module owner containing the ops
|
||||
*/
|
||||
struct phy_ops {
|
||||
@@ -48,6 +49,7 @@ struct phy_ops {
|
||||
int (*power_off)(struct phy *phy);
|
||||
int (*set_mode)(struct phy *phy, enum phy_mode mode);
|
||||
int (*reset)(struct phy *phy);
|
||||
+ int (*calibrate)(struct phy *phy);
|
||||
struct module *owner;
|
||||
};
|
||||
|
||||
@@ -141,6 +143,7 @@ static inline void *phy_get_drvdata(struct phy *phy)
|
||||
int phy_power_off(struct phy *phy);
|
||||
int phy_set_mode(struct phy *phy, enum phy_mode mode);
|
||||
int phy_reset(struct phy *phy);
|
||||
+int phy_calibrate(struct phy *phy);
|
||||
static inline int phy_get_bus_width(struct phy *phy)
|
||||
{
|
||||
return phy->attrs.bus_width;
|
||||
@@ -262,6 +265,13 @@ static inline int phy_reset(struct phy *phy)
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
+static inline int phy_calibrate(struct phy *phy)
|
||||
+{
|
||||
+ if (!phy)
|
||||
+ return 0;
|
||||
+ return -ENOSYS;
|
||||
+}
|
||||
+
|
||||
static inline int phy_get_bus_width(struct phy *phy)
|
||||
{
|
||||
return -ENOSYS;
|
||||
From patchwork Mon Oct 9 12:00:51 2017
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [PATCHv4,
|
||||
2/2] phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800
|
||||
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
||||
X-Patchwork-Id: 9992809
|
||||
Message-Id: <1507550451-21324-3-git-send-email-andrzej.p@samsung.com>
|
||||
To: linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
|
||||
Cc: Mark Rutland <mark.rutland@arm.com>, Felipe Balbi <balbi@kernel.org>,
|
||||
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
||||
Russell King <linux@armlinux.org.uk>,
|
||||
Krzysztof Kozlowski <krzk@kernel.org>,
|
||||
Kishon Vijay Abraham I <kishon@ti.com>,
|
||||
Rob Herring <robh+dt@kernel.org>, Kukjin Kim <kgene@kernel.org>,
|
||||
Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
|
||||
Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
Date: Mon, 09 Oct 2017 14:00:51 +0200
|
||||
|
||||
From: Vivek Gautam <gautam.vivek@samsung.com>
|
||||
|
||||
Adding phy calibration sequence for USB 3.0 DRD PHY present on
|
||||
Exynos5420/5800 systems.
|
||||
This calibration facilitates setting certain PHY parameters viz.
|
||||
the Loss-of-Signal (LOS) Detector Threshold Level, as well as
|
||||
Tx-Vboost-Level for Super-Speed operations.
|
||||
Additionally we also set proper time to wait for RxDetect measurement,
|
||||
for desired PHY reference clock, so as to solve issue with enumeration
|
||||
of few USB 3.0 devices, like Samsung SUM-TSB16S 3.0 USB drive
|
||||
on the controller.
|
||||
|
||||
We are using CR_port for this purpose to send required data
|
||||
to override the LOS values.
|
||||
|
||||
On testing with USB 3.0 devices on USB 3.0 port present on
|
||||
SMDK5420, and peach-pit boards should see following message:
|
||||
usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
|
||||
|
||||
and without this patch, should see below shown message:
|
||||
usb 1-1: new high-speed USB device number 2 using xhci-hcd
|
||||
|
||||
[Also removed unnecessary extra lines in the register macro definitions]
|
||||
|
||||
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
|
||||
[adapted to use phy_calibrate as entry point]
|
||||
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
|
||||
---
|
||||
drivers/phy/samsung/phy-exynos5-usbdrd.c | 183 +++++++++++++++++++++++++++++++
|
||||
drivers/usb/dwc3/core.c | 7 +-
|
||||
2 files changed, 188 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
index 22c68f5..9e83c15 100644
|
||||
--- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
+++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
|
||||
@@ -90,7 +90,17 @@
|
||||
#define PHYCLKRST_COMMONONN BIT(0)
|
||||
|
||||
#define EXYNOS5_DRD_PHYREG0 0x14
|
||||
+#define PHYREG0_SSC_REF_CLK_SEL BIT(21)
|
||||
+#define PHYREG0_SSC_RANGE BIT(20)
|
||||
+#define PHYREG0_CR_WRITE BIT(19)
|
||||
+#define PHYREG0_CR_READ BIT(18)
|
||||
+#define PHYREG0_CR_DATA_IN(_x) ((_x) << 2)
|
||||
+#define PHYREG0_CR_CAP_DATA BIT(1)
|
||||
+#define PHYREG0_CR_CAP_ADDR BIT(0)
|
||||
+
|
||||
#define EXYNOS5_DRD_PHYREG1 0x18
|
||||
+#define PHYREG1_CR_DATA_OUT(_x) ((_x) << 1)
|
||||
+#define PHYREG1_CR_ACK BIT(0)
|
||||
|
||||
#define EXYNOS5_DRD_PHYPARAM0 0x1c
|
||||
|
||||
@@ -119,6 +129,25 @@
|
||||
#define EXYNOS5_DRD_PHYRESUME 0x34
|
||||
#define EXYNOS5_DRD_LINKPORT 0x44
|
||||
|
||||
+/* USB 3.0 DRD PHY SS Function Control Reg; accessed by CR_PORT */
|
||||
+#define EXYNOS5_DRD_PHYSS_LOSLEVEL_OVRD_IN (0x15)
|
||||
+#define LOSLEVEL_OVRD_IN_LOS_BIAS_5420 (0x5 << 13)
|
||||
+#define LOSLEVEL_OVRD_IN_LOS_BIAS_DEFAULT (0x0 << 13)
|
||||
+#define LOSLEVEL_OVRD_IN_EN (0x1 << 10)
|
||||
+#define LOSLEVEL_OVRD_IN_LOS_LEVEL_DEFAULT (0x9 << 0)
|
||||
+
|
||||
+#define EXYNOS5_DRD_PHYSS_TX_VBOOSTLEVEL_OVRD_IN (0x12)
|
||||
+#define TX_VBOOSTLEVEL_OVRD_IN_VBOOST_5420 (0x5 << 13)
|
||||
+#define TX_VBOOSTLEVEL_OVRD_IN_VBOOST_DEFAULT (0x4 << 13)
|
||||
+
|
||||
+#define EXYNOS5_DRD_PHYSS_LANE0_TX_DEBUG (0x1010)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_19M2_20M (0x4 << 4)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_24M (0x8 << 4)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_25M_26M (0x8 << 4)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_48M_50M_52M (0x20 << 4)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_62M5 (0x20 << 4)
|
||||
+#define LANE0_TX_DEBUG_RXDET_MEAS_TIME_96M_100M (0x40 << 4)
|
||||
+
|
||||
#define KHZ 1000
|
||||
#define MHZ (KHZ * KHZ)
|
||||
|
||||
@@ -527,6 +556,151 @@ static int exynos5_usbdrd_phy_power_off(struct phy *phy)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int crport_handshake(struct exynos5_usbdrd_phy *phy_drd,
|
||||
+ u32 val, u32 cmd)
|
||||
+{
|
||||
+ u32 usec = 100;
|
||||
+ unsigned int result;
|
||||
+
|
||||
+ writel(val | cmd, phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0);
|
||||
+
|
||||
+ do {
|
||||
+ result = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYREG1);
|
||||
+ if (result & PHYREG1_CR_ACK)
|
||||
+ break;
|
||||
+
|
||||
+ udelay(1);
|
||||
+ } while (usec-- > 0);
|
||||
+
|
||||
+ if (!usec) {
|
||||
+ dev_err(phy_drd->dev,
|
||||
+ "CRPORT handshake timeout1 (0x%08x)\n", val);
|
||||
+ return -ETIME;
|
||||
+ }
|
||||
+
|
||||
+ usec = 100;
|
||||
+
|
||||
+ writel(val, phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0);
|
||||
+
|
||||
+ do {
|
||||
+ result = readl(phy_drd->reg_phy + EXYNOS5_DRD_PHYREG1);
|
||||
+ if (!(result & PHYREG1_CR_ACK))
|
||||
+ break;
|
||||
+
|
||||
+ udelay(1);
|
||||
+ } while (usec-- > 0);
|
||||
+
|
||||
+ if (!usec) {
|
||||
+ dev_err(phy_drd->dev,
|
||||
+ "CRPORT handshake timeout2 (0x%08x)\n", val);
|
||||
+ return -ETIME;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int crport_ctrl_write(struct exynos5_usbdrd_phy *phy_drd,
|
||||
+ u32 addr, u32 data)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Write Address */
|
||||
+ writel(PHYREG0_CR_DATA_IN(addr),
|
||||
+ phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0);
|
||||
+ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(addr),
|
||||
+ PHYREG0_CR_CAP_ADDR);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ /* Write Data */
|
||||
+ writel(PHYREG0_CR_DATA_IN(data),
|
||||
+ phy_drd->reg_phy + EXYNOS5_DRD_PHYREG0);
|
||||
+ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(data),
|
||||
+ PHYREG0_CR_CAP_DATA);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = crport_handshake(phy_drd, PHYREG0_CR_DATA_IN(data),
|
||||
+ PHYREG0_CR_WRITE);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Calibrate few PHY parameters using CR_PORT register to meet
|
||||
+ * SuperSpeed requirements on Exynos5420 and Exynos5800 systems,
|
||||
+ * which have 28nm USB 3.0 DRD PHY.
|
||||
+ */
|
||||
+static int exynos5420_usbdrd_phy_calibrate(struct exynos5_usbdrd_phy *phy_drd)
|
||||
+{
|
||||
+ unsigned int temp;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ /*
|
||||
+ * Change los_bias to (0x5) for 28nm PHY from a
|
||||
+ * default value (0x0); los_level is set as default
|
||||
+ * (0x9) as also reflected in los_level[30:26] bits
|
||||
+ * of PHYPARAM0 register.
|
||||
+ */
|
||||
+ temp = LOSLEVEL_OVRD_IN_LOS_BIAS_5420 |
|
||||
+ LOSLEVEL_OVRD_IN_EN |
|
||||
+ LOSLEVEL_OVRD_IN_LOS_LEVEL_DEFAULT;
|
||||
+ ret = crport_ctrl_write(phy_drd,
|
||||
+ EXYNOS5_DRD_PHYSS_LOSLEVEL_OVRD_IN,
|
||||
+ temp);
|
||||
+ if (ret) {
|
||||
+ dev_err(phy_drd->dev,
|
||||
+ "Failed setting Loss-of-Signal level for SuperSpeed\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Set tx_vboost_lvl to (0x5) for 28nm PHY Tuning,
|
||||
+ * to raise Tx signal level from its default value of (0x4)
|
||||
+ */
|
||||
+ temp = TX_VBOOSTLEVEL_OVRD_IN_VBOOST_5420;
|
||||
+ ret = crport_ctrl_write(phy_drd,
|
||||
+ EXYNOS5_DRD_PHYSS_TX_VBOOSTLEVEL_OVRD_IN,
|
||||
+ temp);
|
||||
+ if (ret) {
|
||||
+ dev_err(phy_drd->dev,
|
||||
+ "Failed setting Tx-Vboost-Level for SuperSpeed\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Set proper time to wait for RxDetect measurement, for
|
||||
+ * desired reference clock of PHY, by tuning the CR_PORT
|
||||
+ * register LANE0.TX_DEBUG which is internal to PHY.
|
||||
+ * This fixes issue with few USB 3.0 devices, which are
|
||||
+ * not detected (not even generate interrupts on the bus
|
||||
+ * on insertion) without this change.
|
||||
+ * e.g. Samsung SUM-TSB16S 3.0 USB drive.
|
||||
+ */
|
||||
+ switch (phy_drd->extrefclk) {
|
||||
+ case EXYNOS5_FSEL_50MHZ:
|
||||
+ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_48M_50M_52M;
|
||||
+ break;
|
||||
+ case EXYNOS5_FSEL_20MHZ:
|
||||
+ case EXYNOS5_FSEL_19MHZ2:
|
||||
+ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_19M2_20M;
|
||||
+ break;
|
||||
+ case EXYNOS5_FSEL_24MHZ:
|
||||
+ default:
|
||||
+ temp = LANE0_TX_DEBUG_RXDET_MEAS_TIME_24M;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ ret = crport_ctrl_write(phy_drd,
|
||||
+ EXYNOS5_DRD_PHYSS_LANE0_TX_DEBUG,
|
||||
+ temp);
|
||||
+ if (ret)
|
||||
+ dev_err(phy_drd->dev,
|
||||
+ "Failed setting RxDetect measurement time for SuperSpeed\n");
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static struct phy *exynos5_usbdrd_phy_xlate(struct device *dev,
|
||||
struct of_phandle_args *args)
|
||||
{
|
||||
@@ -538,11 +712,20 @@ static struct phy *exynos5_usbdrd_phy_xlate(struct device *dev,
|
||||
return phy_drd->phys[args->args[0]].phy;
|
||||
}
|
||||
|
||||
+static int exynos5_usbdrd_phy_calibrate(struct phy *phy)
|
||||
+{
|
||||
+ struct phy_usb_instance *inst = phy_get_drvdata(phy);
|
||||
+ struct exynos5_usbdrd_phy *phy_drd = to_usbdrd_phy(inst);
|
||||
+
|
||||
+ return exynos5420_usbdrd_phy_calibrate(phy_drd);
|
||||
+}
|
||||
+
|
||||
static const struct phy_ops exynos5_usbdrd_phy_ops = {
|
||||
.init = exynos5_usbdrd_phy_init,
|
||||
.exit = exynos5_usbdrd_phy_exit,
|
||||
.power_on = exynos5_usbdrd_phy_power_on,
|
||||
.power_off = exynos5_usbdrd_phy_power_off,
|
||||
+ .calibrate = exynos5_usbdrd_phy_calibrate,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
|
||||
index 03474d3..224e0dd 100644
|
||||
--- a/drivers/usb/dwc3/core.c
|
||||
+++ b/drivers/usb/dwc3/core.c
|
||||
@@ -156,9 +156,10 @@ static void __dwc3_set_mode(struct work_struct *work)
|
||||
} else {
|
||||
if (dwc->usb2_phy)
|
||||
otg_set_vbus(dwc->usb2_phy->otg, true);
|
||||
- if (dwc->usb2_generic_phy)
|
||||
+ if (dwc->usb2_generic_phy) {
|
||||
phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
|
||||
-
|
||||
+ phy_calibrate(dwc->usb2_generic_phy);
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
case DWC3_GCTL_PRTCAP_DEVICE:
|
||||
@@ -955,6 +956,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)
|
||||
dev_err(dev, "failed to initialize host\n");
|
||||
return ret;
|
||||
}
|
||||
+ if (dwc->usb2_generic_phy)
|
||||
+ phy_calibrate(dwc->usb2_generic_phy);
|
||||
break;
|
||||
case USB_DR_MODE_OTG:
|
||||
INIT_WORK(&dwc->drd_work, __dwc3_set_mode);
|
|
@ -0,0 +1,902 @@
|
|||
From e9e601215d294d473a593641b1ecfd1fa4586a90 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 6 Apr 2017 13:52:54 +0100
|
||||
Subject: [PATCH 1/4] [RFC,v2,1/4] ARM: dts: imx6qdl: add HummingBoard2 boards
|
||||
|
||||
From: Jon Nettleton <jon@solid-run.com>
|
||||
|
||||
This adds support for the Hummingboard Gate and Edge devices from
|
||||
SolidRun.
|
||||
|
||||
Signed-off-by: Jon Nettleton <jon@solid-run.com>
|
||||
Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 2 +
|
||||
arch/arm/boot/dts/imx6dl-hummingboard2.dts | 52 +++
|
||||
arch/arm/boot/dts/imx6q-hummingboard2.dts | 60 +++
|
||||
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 543 +++++++++++++++++++++++++++
|
||||
4 files changed, 657 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
create mode 100644 arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
create mode 100644 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 011808490fed..ccdff6650541 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -353,6 +353,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6dl-gw5903.dtb \
|
||||
imx6dl-gw5904.dtb \
|
||||
imx6dl-hummingboard.dtb \
|
||||
+ imx6dl-hummingboard2.dtb \
|
||||
imx6dl-icore.dtb \
|
||||
imx6dl-icore-rqs.dtb \
|
||||
imx6dl-nit6xlite.dtb \
|
||||
@@ -397,6 +398,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-gw5904.dtb \
|
||||
imx6q-h100.dtb \
|
||||
imx6q-hummingboard.dtb \
|
||||
+ imx6q-hummingboard2.dtb \
|
||||
imx6q-icore.dtb \
|
||||
imx6q-icore-ofcap10.dtb \
|
||||
imx6q-icore-ofcap12.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard2.dts b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
new file mode 100644
|
||||
index 000000000000..990b5050de5b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6dl-hummingboard2.dts
|
||||
@@ -0,0 +1,52 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6dl.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Solo/DualLite";
|
||||
+ compatible = "solidrun,hummingboard2/dl", "fsl,imx6dl";
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6q-hummingboard2.dts b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
new file mode 100644
|
||||
index 000000000000..f5eec9163bb8
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-hummingboard2.dts
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ * Based on work by Russell King
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "imx6q.dtsi"
|
||||
+#include "imx6qdl-hummingboard2.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "SolidRun HummingBoard2 Dual/Quad";
|
||||
+ compatible = "solidrun,hummingboard2/q", "fsl,imx6q";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+ fsl,transmit-level-mV = <1104>;
|
||||
+ fsl,transmit-boost-mdB = <0>;
|
||||
+ fsl,transmit-atten-16ths = <9>;
|
||||
+ fsl,no-spread-spectrum;
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
new file mode 100644
|
||||
index 000000000000..11b63f6f2b89
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -0,0 +1,543 @@
|
||||
+/*
|
||||
+ * Device Tree file for SolidRun HummingBoard2
|
||||
+ * Copyright (C) 2015 Rabeeh Khoury <rabeeh@solid-run.com>
|
||||
+ *
|
||||
+ * This file is dual-licensed: you can use it either under the terms
|
||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
||||
+ * licensing only applies to this file, and not this project as a
|
||||
+ * whole.
|
||||
+ *
|
||||
+ * a) This file is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License.
|
||||
+ *
|
||||
+ * This file is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * Or, alternatively,
|
||||
+ *
|
||||
+ * b) Permission is hereby granted, free of charge, to any person
|
||||
+ * obtaining a copy of this software and associated documentation
|
||||
+ * files (the "Software"), to deal in the Software without
|
||||
+ * restriction, including without limitation the rights to use
|
||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
+ * sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following
|
||||
+ * conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be
|
||||
+ * included in all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#include "imx6qdl-microsom.dtsi"
|
||||
+#include "imx6qdl-microsom-ar8035.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ chosen {
|
||||
+ stdout-path = &uart1;
|
||||
+ };
|
||||
+
|
||||
+ ir_recv: ir-receiver {
|
||||
+ compatible = "gpio-ir-receiver";
|
||||
+ gpios = <&gpio7 9 1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_gpio7_9>;
|
||||
+ linux,rc-map-name = "rc-rc6-mce";
|
||||
+ };
|
||||
+
|
||||
+ usdhc2_pwrseq: usdhc2-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ reg_3p3v: regulator-3p3v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "3P3V";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_1p8v: regulator-1p8v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "1P8V";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio1 0 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
+ regulator-name = "usb_h1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio3 22 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
+ regulator-name = "usb_otg_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh2_vbus: regulator-usb-h2-vbus {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ enable-gpio = <&gpio2 13 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
+ regulator-name = "usb_h2_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ reg_usbh3_vbus: regulator-usb-h3-vbus {
|
||||
+ compatible = "regulator-gpio";
|
||||
+ enable-active-high;
|
||||
+ enable-gpio = <&gpio7 10 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
+ regulator-name = "usb_h3_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-boot-on;
|
||||
+ };
|
||||
+
|
||||
+ sound-sgtl5000 {
|
||||
+ audio-codec = <&sgtl5000>;
|
||||
+ audio-routing =
|
||||
+ "MIC_IN", "Mic Jack",
|
||||
+ "Mic Jack", "Mic Bias",
|
||||
+ "Headphone Jack", "HP_OUT";
|
||||
+ compatible = "fsl,imx-audio-sgtl5000";
|
||||
+ model = "On-board Codec";
|
||||
+ mux-ext-port = <5>;
|
||||
+ mux-int-port = <1>;
|
||||
+ ssi-controller = <&ssi1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&audmux {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ecspi2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_ecspi2>;
|
||||
+ cs-gpios = <&gpio2 26 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_hdmi>;
|
||||
+ ddc-i2c-bus = <&i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pcf8523: rtc@68 {
|
||||
+ compatible = "nxp,pcf8523";
|
||||
+ reg = <0x68>;
|
||||
+ nxp,12p5_pf;
|
||||
+ };
|
||||
+
|
||||
+ sgtl5000: codec@0a {
|
||||
+ clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
+ compatible = "fsl,sgtl5000";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_sgtl5000>;
|
||||
+ reg = <0x0a>;
|
||||
+ VDDA-supply = <®_3p3v>;
|
||||
+ VDDIO-supply = <®_3p3v>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_i2c3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hog>;
|
||||
+
|
||||
+ hummingboard2 {
|
||||
+ pinctrl_hog: hoggrp {
|
||||
+ fsl,pins = <
|
||||
+ /*
|
||||
+ * 36 pin headers GPIO description. The pins
|
||||
+ * numbering as following -
|
||||
+ *
|
||||
+ * 3.2v 5v 74 75
|
||||
+ * 73 72 71 70
|
||||
+ * 69 68 67 66
|
||||
+ *
|
||||
+ * 77 78 79 76
|
||||
+ * 65 64 61 60
|
||||
+ * 53 52 51 50
|
||||
+ * 49 48 166 132
|
||||
+ * 95 94 90 91
|
||||
+ * GND 54 24 204
|
||||
+ *
|
||||
+ * The GPIO numbers can be extracted using
|
||||
+ * signal name from below.
|
||||
+ * Example -
|
||||
+ * MX6QDL_PAD_EIM_DA10__GPIO3_IO10 is
|
||||
+ * GPIO(3,10) which is (3-1)*32+10 = gpio 74
|
||||
+ *
|
||||
+ * i.e. The mapping of GPIO(X,Y) to Linux gpio
|
||||
+ * number is : gpio number = (X-1) * 32 + Y
|
||||
+ */
|
||||
+ /* DI1_PIN15 */
|
||||
+ MX6QDL_PAD_EIM_DA10__GPIO3_IO10 0x400130b1
|
||||
+ /* DI1_PIN02 */
|
||||
+ MX6QDL_PAD_EIM_DA11__GPIO3_IO11 0x400130b1
|
||||
+ /* DISP1_DATA00 */
|
||||
+ MX6QDL_PAD_EIM_DA9__GPIO3_IO09 0x400130b1
|
||||
+ /* DISP1_DATA01 */
|
||||
+ MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x400130b1
|
||||
+ /* DISP1_DATA02 */
|
||||
+ MX6QDL_PAD_EIM_DA7__GPIO3_IO07 0x400130b1
|
||||
+ /* DISP1_DATA03 */
|
||||
+ MX6QDL_PAD_EIM_DA6__GPIO3_IO06 0x400130b1
|
||||
+ /* DISP1_DATA04 */
|
||||
+ MX6QDL_PAD_EIM_DA5__GPIO3_IO05 0x400130b1
|
||||
+ /* DISP1_DATA05 */
|
||||
+ MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x400130b1
|
||||
+ /* DISP1_DATA06 */
|
||||
+ MX6QDL_PAD_EIM_DA3__GPIO3_IO03 0x400130b1
|
||||
+ /* DISP1_DATA07 */
|
||||
+ MX6QDL_PAD_EIM_DA2__GPIO3_IO02 0x400130b1
|
||||
+ /* DI1_D0_CS */
|
||||
+ MX6QDL_PAD_EIM_DA13__GPIO3_IO13 0x400130b1
|
||||
+ /* DI1_D1_CS */
|
||||
+ MX6QDL_PAD_EIM_DA14__GPIO3_IO14 0x400130b1
|
||||
+ /* DI1_PIN01 */
|
||||
+ MX6QDL_PAD_EIM_DA15__GPIO3_IO15 0x400130b1
|
||||
+ /* DI1_PIN03 */
|
||||
+ MX6QDL_PAD_EIM_DA12__GPIO3_IO12 0x400130b1
|
||||
+ /* DISP1_DATA08 */
|
||||
+ MX6QDL_PAD_EIM_DA1__GPIO3_IO01 0x400130b1
|
||||
+ /* DISP1_DATA09 */
|
||||
+ MX6QDL_PAD_EIM_DA0__GPIO3_IO00 0x400130b1
|
||||
+ /* DISP1_DATA10 */
|
||||
+ MX6QDL_PAD_EIM_EB1__GPIO2_IO29 0x400130b1
|
||||
+ /* DISP1_DATA11 */
|
||||
+ MX6QDL_PAD_EIM_EB0__GPIO2_IO28 0x400130b1
|
||||
+ /* DISP1_DATA12 */
|
||||
+ MX6QDL_PAD_EIM_A17__GPIO2_IO21 0x400130b1
|
||||
+ /* DISP1_DATA13 */
|
||||
+ MX6QDL_PAD_EIM_A18__GPIO2_IO20 0x400130b1
|
||||
+ /* DISP1_DATA14 */
|
||||
+ MX6QDL_PAD_EIM_A19__GPIO2_IO19 0x400130b1
|
||||
+ /* DISP1_DATA15 */
|
||||
+ MX6QDL_PAD_EIM_A20__GPIO2_IO18 0x400130b1
|
||||
+ /* DISP1_DATA16 */
|
||||
+ MX6QDL_PAD_EIM_A21__GPIO2_IO17 0x400130b1
|
||||
+ /* DISP1_DATA17 */
|
||||
+ MX6QDL_PAD_EIM_A22__GPIO2_IO16 0x400130b1
|
||||
+ /* DISP1_DATA18 */
|
||||
+ MX6QDL_PAD_EIM_A23__GPIO6_IO06 0x400130b1
|
||||
+ /* DISP1_DATA19 */
|
||||
+ MX6QDL_PAD_EIM_A24__GPIO5_IO04 0x400130b1
|
||||
+ /* DISP1_DATA20 */
|
||||
+ MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x400130b1
|
||||
+ /* DISP1_DATA21 */
|
||||
+ MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x400130b1
|
||||
+ /* DISP1_DATA22 */
|
||||
+ MX6QDL_PAD_EIM_D26__GPIO3_IO26 0x400130b1
|
||||
+ /* DISP1_DATA23 */
|
||||
+ MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x400130b1
|
||||
+ /* DI1_DISP_CLK */
|
||||
+ MX6QDL_PAD_EIM_A16__GPIO2_IO22 0x400130b1
|
||||
+ /* SPDIF_IN */
|
||||
+ MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24 0x400130b1
|
||||
+ /* SPDIF_OUT */
|
||||
+ MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x400130b1
|
||||
+
|
||||
+ /* MikroBUS GPIO pin number 10 */
|
||||
+ MX6QDL_PAD_EIM_LBA__GPIO2_IO27 0x400130b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_ecspi2: hummingboard2-ecspi2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1
|
||||
+ MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1
|
||||
+ MX6QDL_PAD_EIM_RW__GPIO2_IO26 0x000b1 /* CS */
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_gpio7_9: hummingboard2-gpio7_9 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_CMD__GPIO7_IO09 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_hdmi: hummingboard2-hdmi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE 0x1f8b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c1: hummingboard2-i2c1 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c2: hummingboard2-i2c2 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_i2c3: hummingboard2-i2c3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_mipi: hummingboard2_mipi {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0x4001b8b1
|
||||
+ MX6QDL_PAD_KEY_COL4__GPIO4_IO14 0x4001b8b1
|
||||
+ MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_pcie_reset: hummingboard2-pcie-reset {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_pwm1: pwm1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_sgtl5000: hummingboard2-sgtl5000 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0
|
||||
+ MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0
|
||||
+ MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x110b0
|
||||
+ MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
|
||||
+ MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh1_vbus: hummingboard2-usbh1-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh2_vbus: hummingboard2-usbh2-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_SD4_DAT5__GPIO2_IO13 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbh3_vbus: hummingboard2-usbh3-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_SD4_CLK__GPIO7_IO10 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbotg_id: hummingboard2-usbotg-id {
|
||||
+ /*
|
||||
+ * Similar to pinctrl_usbotg_2, but we want it
|
||||
+ * pulled down for a fixed host connection.
|
||||
+ */
|
||||
+ fsl,pins = <MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x13059>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usbotg_vbus: hummingboard2-usbotg-vbus {
|
||||
+ fsl,pins = <MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b0>;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071
|
||||
+ MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
+ MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2: hummingboard2-usdhc2 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_100mhz: hummingboard2-usdhc2-100mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170b9
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100b9
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170b9
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130b9
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc2_200mhz: hummingboard2-usdhc2-200mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD2_CMD__SD2_CMD 0x170f9
|
||||
+ MX6QDL_PAD_SD2_CLK__SD2_CLK 0x100f9
|
||||
+ MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x170f9
|
||||
+ MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x130f9
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
+ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059
|
||||
+ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059
|
||||
+ MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059
|
||||
+ MX6QDL_PAD_SD3_RST__SD3_RESET 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_hummingboard2_uart3: hummingboard2-uart3 {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D25__UART3_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_EIM_D24__UART3_RX_DATA 0x40013000
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ldb {
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ lvds-channel@0 {
|
||||
+ fsl,data-mapping = "spwg";
|
||||
+ fsl,data-width = <18>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pcie_reset>;
|
||||
+ reset-gpio = <&gpio2 11 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_pwm1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pwm3 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pwm4 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&ssi1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbh1 {
|
||||
+ disable-over-current;
|
||||
+ vbus-supply = <®_usbh1_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbotg {
|
||||
+ disable-over-current;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_usbotg_id>;
|
||||
+ vbus-supply = <®_usbotg_vbus>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc2 {
|
||||
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||
+ pinctrl-0 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2
|
||||
+ >;
|
||||
+ pinctrl-1 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2_100mhz
|
||||
+ >;
|
||||
+ pinctrl-2 = <
|
||||
+ &pinctrl_hummingboard2_usdhc2_aux
|
||||
+ &pinctrl_hummingboard2_usdhc2_200mhz
|
||||
+ >;
|
||||
+ mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
+ cd-gpios = <&gpio1 4 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <
|
||||
+ &pinctrl_hummingboard2_usdhc3
|
||||
+ >;
|
||||
+ vmmc-supply = <®_3p3v>;
|
||||
+ vqmmc-supply = <®_3p3v>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_uart3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.12.2
|
||||
|
||||
From 3da2a99c4a8f19e846b19071441d2c6b88e00c06 Mon Sep 17 00:00:00 2001
|
||||
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Date: Fri, 13 Jan 2017 14:45:30 +0000
|
||||
Subject: [PATCH 2/4] ARM: dts: imx6*-hummingboard2: fix SD card detect
|
||||
|
||||
Fix the SD card detect signal, which was missing the polarity
|
||||
specification, and the pull-up necessary for proper signalling.
|
||||
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 11b63f6f2b89..734487edf200 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux {
|
||||
fsl,pins = <
|
||||
- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x13071
|
||||
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
|
||||
MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
>;
|
||||
@@ -520,7 +520,7 @@
|
||||
&pinctrl_hummingboard2_usdhc2_200mhz
|
||||
>;
|
||||
mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
- cd-gpios = <&gpio1 4 0>;
|
||||
+ cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.12.2
|
||||
|
||||
From 57b0103b600a535a35e5ff9714649519a0b3a77a Mon Sep 17 00:00:00 2001
|
||||
From: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
Date: Fri, 13 Jan 2017 14:45:35 +0000
|
||||
Subject: [PATCH 3/4] ARM: dts: imx6*-hummingboard2: use proper gpio flags
|
||||
definitions
|
||||
|
||||
Use proper gpio flag definitions for GPIOs rather than using opaque
|
||||
uninformative numbers.
|
||||
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 734487edf200..88aaed26dd77 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
ir_recv: ir-receiver {
|
||||
compatible = "gpio-ir-receiver";
|
||||
- gpios = <&gpio7 9 1>;
|
||||
+ gpios = <&gpio7 9 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_gpio7_9>;
|
||||
linux,rc-map-name = "rc-rc6-mce";
|
||||
@@ -80,7 +80,7 @@
|
||||
reg_usbh1_vbus: regulator-usb-h1-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio1 0 0>;
|
||||
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh1_vbus>;
|
||||
regulator-name = "usb_h1_vbus";
|
||||
@@ -91,7 +91,7 @@
|
||||
reg_usbotg_vbus: regulator-usb-otg-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
- gpio = <&gpio3 22 0>;
|
||||
+ gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbotg_vbus>;
|
||||
regulator-name = "usb_otg_vbus";
|
||||
@@ -102,7 +102,7 @@
|
||||
reg_usbh2_vbus: regulator-usb-h2-vbus {
|
||||
compatible = "regulator-gpio";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio2 13 0>;
|
||||
+ enable-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh2_vbus>;
|
||||
regulator-name = "usb_h2_vbus";
|
||||
@@ -114,7 +114,7 @@
|
||||
reg_usbh3_vbus: regulator-usb-h3-vbus {
|
||||
compatible = "regulator-gpio";
|
||||
enable-active-high;
|
||||
- enable-gpio = <&gpio7 10 0>;
|
||||
+ enable-gpio = <&gpio7 10 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_hummingboard2_usbh3_vbus>;
|
||||
regulator-name = "usb_h3_vbus";
|
||||
--
|
||||
2.12.2
|
||||
|
||||
From f931de70370ff576f381cb9745bc54225a1a8056 Mon Sep 17 00:00:00 2001
|
||||
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Date: Fri, 13 Jan 2017 14:45:40 +0000
|
||||
Subject: [PATCH 4/4] ARM: dts: imx6*-hummingboard2: convert to more
|
||||
conventional vmmc-supply
|
||||
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
---
|
||||
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 26 +++++++++++++++++++-------
|
||||
1 file changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
index 88aaed26dd77..f19d30b34ac4 100644
|
||||
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
|
||||
@@ -56,11 +56,6 @@
|
||||
linux,rc-map-name = "rc-rc6-mce";
|
||||
};
|
||||
|
||||
- usdhc2_pwrseq: usdhc2-pwrseq {
|
||||
- compatible = "mmc-pwrseq-simple";
|
||||
- reset-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
- };
|
||||
-
|
||||
reg_3p3v: regulator-3p3v {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "3P3V";
|
||||
@@ -123,6 +118,18 @@
|
||||
regulator-boot-on;
|
||||
};
|
||||
|
||||
+ reg_usdhc2_vmmc: reg-usdhc2-vmmc {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ gpio = <&gpio4 30 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hummingboard2_vmmc>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-name = "usdhc2_vmmc";
|
||||
+ startup-delay-us = <1000>;
|
||||
+ };
|
||||
+
|
||||
sound-sgtl5000 {
|
||||
audio-codec = <&sgtl5000>;
|
||||
audio-routing =
|
||||
@@ -393,7 +400,6 @@
|
||||
|
||||
pinctrl_hummingboard2_usdhc2_aux: hummingboard2-usdhc2-aux {
|
||||
fsl,pins = <
|
||||
- MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
|
||||
MX6QDL_PAD_KEY_ROW1__SD2_VSELECT 0x1b071
|
||||
MX6QDL_PAD_DISP0_DAT9__GPIO4_IO30 0x1b0b0
|
||||
>;
|
||||
@@ -432,6 +438,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_hummingboard2_vmmc: hummingboard2-vmmc {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_4__GPIO1_IO04 0x1f071
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_hummingboard2_usdhc3: hummingboard2-usdhc3 {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059
|
||||
@@ -519,7 +531,7 @@
|
||||
&pinctrl_hummingboard2_usdhc2_aux
|
||||
&pinctrl_hummingboard2_usdhc2_200mhz
|
||||
>;
|
||||
- mmc-pwrseq = <&usdhc2_pwrseq>;
|
||||
+ vmmc-supply = <®_usdhc2_vmmc>;
|
||||
cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.12.2
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
From bb3e08008c0e48fd4f51a0f0957eecae61a24d69 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Tue, 1 Nov 2016 09:35:30 +0000
|
||||
Subject: [PATCH] Revert "mmc: omap_hsmmc: Use dma_request_chan() for
|
||||
requesting DMA channel"
|
||||
|
||||
This reverts commit 81eef6ca92014845d40e3f1310e42b7010303acc.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 50 ++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 40 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index 24ebc9a..3563321 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_device.h>
|
||||
+#include <linux/omap-dmaengine.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/core.h>
|
||||
#include <linux/mmc/mmc.h>
|
||||
@@ -1992,6 +1993,8 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
struct resource *res;
|
||||
int ret, irq;
|
||||
const struct of_device_id *match;
|
||||
+ dma_cap_mask_t mask;
|
||||
+ unsigned tx_req, rx_req;
|
||||
const struct omap_mmc_of_data *data;
|
||||
void __iomem *base;
|
||||
|
||||
@@ -2121,17 +2124,44 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
|
||||
|
||||
omap_hsmmc_conf_bus_power(host);
|
||||
|
||||
- host->rx_chan = dma_request_chan(&pdev->dev, "rx");
|
||||
- if (IS_ERR(host->rx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "RX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->rx_chan);
|
||||
+ if (!pdev->dev.of_node) {
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ tx_req = res->start;
|
||||
+
|
||||
+ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
|
||||
+ if (!res) {
|
||||
+ dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n");
|
||||
+ ret = -ENXIO;
|
||||
+ goto err_irq;
|
||||
+ }
|
||||
+ rx_req = res->start;
|
||||
+ }
|
||||
+
|
||||
+ dma_cap_zero(mask);
|
||||
+ dma_cap_set(DMA_SLAVE, mask);
|
||||
+
|
||||
+ host->rx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &rx_req, &pdev->dev, "rx");
|
||||
+
|
||||
+ if (!host->rx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
- host->tx_chan = dma_request_chan(&pdev->dev, "tx");
|
||||
- if (IS_ERR(host->tx_chan)) {
|
||||
- dev_err(mmc_dev(host->mmc), "TX DMA channel request failed\n");
|
||||
- ret = PTR_ERR(host->tx_chan);
|
||||
+ host->tx_chan =
|
||||
+ dma_request_slave_channel_compat(mask, omap_dma_filter_fn,
|
||||
+ &tx_req, &pdev->dev, "tx");
|
||||
+
|
||||
+ if (!host->tx_chan) {
|
||||
+ dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
|
||||
+ ret = -ENXIO;
|
||||
goto err_irq;
|
||||
}
|
||||
|
||||
@@ -2189,9 +2219,9 @@ err_slot_name:
|
||||
mmc_remove_host(mmc);
|
||||
err_irq:
|
||||
device_init_wakeup(&pdev->dev, false);
|
||||
- if (!IS_ERR_OR_NULL(host->tx_chan))
|
||||
+ if (host->tx_chan)
|
||||
dma_release_channel(host->tx_chan);
|
||||
- if (!IS_ERR_OR_NULL(host->rx_chan))
|
||||
+ if (host->rx_chan)
|
||||
dma_release_channel(host->rx_chan);
|
||||
pm_runtime_dont_use_autosuspend(host->dev);
|
||||
pm_runtime_put_sync(host->dev);
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 487ff7b0e537506057960a0c2d9482d19f2acf4a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 26 Apr 2017 11:12:54 +0100
|
||||
Subject: [PATCH] Add option of 13 for FORCE_MAX_ZONEORDER
|
||||
|
||||
This is a hack, but it's what the other distros currently use
|
||||
for aarch64 with 4K pages so we'll do the same while upstream
|
||||
decides what the best outcome is (which isn't this).
|
||||
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm64/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 3741859765cf..deec9511f1d3 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -751,6 +751,7 @@ config XEN
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int
|
||||
default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
|
||||
+ default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES)
|
||||
default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
|
||||
default "11"
|
||||
help
|
||||
--
|
||||
2.12.2
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 90e388ca5d8bbee022f9ed5fc24137b31579fa6e Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 22 Nov 2017 15:52:36 +0000
|
||||
Subject: [PATCH] Revert "arm64: allwinner: a64: pine64: Use dcdc1 regulator
|
||||
for mmc0"
|
||||
|
||||
This reverts commit 3f241bfa60bdc9c4fde63fa6664a8ce00fd668c6.
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
index d06e34b5d192..caf8b6fbe5e3 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
@@ -61,6 +61,13 @@
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
+
|
||||
+ reg_vcc3v3: vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
@@ -84,7 +91,7 @@
|
||||
&mmc0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc0_pins>;
|
||||
- vmmc-supply = <®_dcdc1>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||
cd-inverted;
|
||||
disable-wp;
|
||||
--
|
||||
2.14.3
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org>
|
||||
Date: Wed, 6 Feb 2013 09:57:47 -0500
|
||||
Subject: [PATCH] ath9k: rx dma stop check
|
||||
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/mac.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
index bba85d1a6cd1..ebbee8f17130 100644
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
|
||||
{
|
||||
#define AH_RX_STOP_DMA_TIMEOUT 10000 /* usec */
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
- u32 mac_status, last_mac_status = 0;
|
||||
+ u32 mac_status = 0, last_mac_status = 0;
|
||||
int i;
|
||||
|
||||
/* Enable access to the DMA observation bus */
|
||||
@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw *ah, bool *reset)
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
+ if (!AR_SREV_9300_20_OR_LATER(ah) &&
|
||||
+ (mac_status & 0x700) == 0) {
|
||||
+ /*
|
||||
+ * DMA is idle but the MAC is still stuck
|
||||
+ * processing events
|
||||
+ */
|
||||
+ *reset = true;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
ath_err(common,
|
||||
"DMA failed to stop in %d ms AR_CR=0x%08x AR_DIAG_SW=0x%08x DMADBG_7=0x%08x\n",
|
||||
AH_RX_STOP_DMA_TIMEOUT / 1000,
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_60XX_WDT is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_DEBUGFS=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_EXT_HDR_DEST=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_EXT_HDR_HOP=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_ICMPV6=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_GHC_UDP=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_DEST=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_FRAGMENT=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_HOP=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_IPV6=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_MOBILITY=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_ROUTING=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6LOWPAN_NHC_UDP=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_6PACK=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_8139CP=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_8139TOO=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_8139TOO_8129=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_8139TOO_PIO is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_8139TOO_TUNE_TWISTER is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_8139_OLD_RX_RESET is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_8723AU_AP_MODE is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_8723AU_BT_COEXIST is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_9P_FS=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_9P_FSCACHE=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_9P_FS_POSIX_ACL=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_9P_FS_SECURITY=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_A11Y_BRAILLE_CONSOLE=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AB3100_CORE is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AB3100_OTP is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ABP060MG=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ABX500_CORE is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACCESSIBILITY=y
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACENIC=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACENIC_OMIT_TIGON_I is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACORN_PARTITION is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACPI_ALS=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACPI_DEBUG is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACPI_DEBUGGER is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACPI_NFIT is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACPI_PCI_SLOT=y
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ACQUIRE_WDT is not set
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACT200L_DONGLE=m
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACTISYS_DONGLE=m
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD2S1200 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD2S1210 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD2S90 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5064 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD525X_DPOT is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5360 is not set
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AD5380 is not set
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue