kernel-4.7.0 2eme build
This commit is contained in:
+57
@@ -0,0 +1,57 @@
|
||||
From 12d868964f7352e8b18e755488f7265a93431de1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Date: Tue, 12 Jul 2016 01:35:18 +0300
|
||||
Subject: [PATCH] Bluetooth: Add support of 13d3:3490 AR3012 device
|
||||
|
||||
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=05 Dev#= 5 Spd=12 MxCh= 0
|
||||
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
|
||||
P: Vendor=13d3 ProdID=3490 Rev=00.01
|
||||
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
|
||||
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
|
||||
BugLink: https://bugs.launchpad.net/bugs/1600623
|
||||
|
||||
Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/bluetooth/ath3k.c | 2 ++
|
||||
drivers/bluetooth/btusb.c | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
|
||||
index 2589468..fadba88 100644
|
||||
--- a/drivers/bluetooth/ath3k.c
|
||||
+++ b/drivers/bluetooth/ath3k.c
|
||||
@@ -123,6 +123,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472) },
|
||||
{ USB_DEVICE(0x13d3, 0x3474) },
|
||||
{ USB_DEVICE(0x13d3, 0x3487) },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
@@ -190,6 +191,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU22 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index f2e8fd7..811f9b9 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -237,6 +237,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
From 67f8ecc550b5bda03335f845dc869b8501d25fd0 Mon Sep 17 00:00:00 2001
|
||||
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Date: Wed, 18 May 2016 13:11:09 -0700
|
||||
Subject: [PATCH] HID: uhid: fix timeout when probe races with IO
|
||||
|
||||
Many devices use userspace bluetooth stacks like BlueZ or Bluedroid in combination
|
||||
with uhid. If any of these stacks is used with a HID device for which the driver
|
||||
performs a HID request as part .probe (or technically another HID operation),
|
||||
this results in a deadlock situation. The deadlock results in a 5 second timeout
|
||||
for I/O operations in HID drivers, so isn't fatal, but none of the I/O operations
|
||||
have a chance of succeeding.
|
||||
|
||||
The root cause for the problem is that uhid only allows for one request to be
|
||||
processed at a time per uhid instance and locks out other operations. This means
|
||||
that if a user space is creating a new HID device through 'UHID_CREATE', which
|
||||
ultimately triggers '.probe' through the HID layer. Then any HID request e.g. a
|
||||
read for calibration data would trigger a HID operation on uhid again, but it
|
||||
won't go out to userspace, because it is still stuck in UHID_CREATE.
|
||||
In addition bluetooth stacks are typically single threaded, so they wouldn't be
|
||||
able to handle any requests while waiting on uhid.
|
||||
|
||||
Lucikly the UHID spec is somewhat flexible and allows for fixing the issue,
|
||||
without breaking user space. The idea which the patch implements as discussed
|
||||
with David Herrmann is to decouple adding of a hid device (which triggers .probe)
|
||||
from UHID_CREATE. The work will kick off roughly once UHID_CREATE completed (or
|
||||
else will wait a tiny bit of time in .probe for a lock). A HID driver has to call
|
||||
HID to call 'hid_hw_start()' as part of .probe once it is ready for I/O, which
|
||||
triggers UHID_START to user space. Any HID operations should function now within
|
||||
.probe and won't deadlock because userspace is stuck on UHID_CREATE.
|
||||
|
||||
We verified this patch on Bluedroid with Android 6.0 and on desktop Linux with
|
||||
BlueZ stacks. Prior to the patch they had the deadlock issue.
|
||||
|
||||
[jkosina@suse.cz: reword subject]
|
||||
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/uhid.c | 33 ++++++++++++++++++++++++---------
|
||||
1 file changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
|
||||
index 16b6f11..99ec3ff 100644
|
||||
--- a/drivers/hid/uhid.c
|
||||
+++ b/drivers/hid/uhid.c
|
||||
@@ -51,10 +51,26 @@ struct uhid_device {
|
||||
u32 report_id;
|
||||
u32 report_type;
|
||||
struct uhid_event report_buf;
|
||||
+ struct work_struct worker;
|
||||
};
|
||||
|
||||
static struct miscdevice uhid_misc;
|
||||
|
||||
+static void uhid_device_add_worker(struct work_struct *work)
|
||||
+{
|
||||
+ struct uhid_device *uhid = container_of(work, struct uhid_device, worker);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hid_add_device(uhid->hid);
|
||||
+ if (ret) {
|
||||
+ hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret);
|
||||
+
|
||||
+ hid_destroy_device(uhid->hid);
|
||||
+ uhid->hid = NULL;
|
||||
+ uhid->running = false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void uhid_queue(struct uhid_device *uhid, struct uhid_event *ev)
|
||||
{
|
||||
__u8 newhead;
|
||||
@@ -498,18 +514,14 @@ static int uhid_dev_create2(struct uhid_device *uhid,
|
||||
uhid->hid = hid;
|
||||
uhid->running = true;
|
||||
|
||||
- ret = hid_add_device(hid);
|
||||
- if (ret) {
|
||||
- hid_err(hid, "Cannot register HID device\n");
|
||||
- goto err_hid;
|
||||
- }
|
||||
+ /* Adding of a HID device is done through a worker, to allow HID drivers
|
||||
+ * which use feature requests during .probe to work, without they would
|
||||
+ * be blocked on devlock, which is held by uhid_char_write.
|
||||
+ */
|
||||
+ schedule_work(&uhid->worker);
|
||||
|
||||
return 0;
|
||||
|
||||
-err_hid:
|
||||
- hid_destroy_device(hid);
|
||||
- uhid->hid = NULL;
|
||||
- uhid->running = false;
|
||||
err_free:
|
||||
kfree(uhid->rd_data);
|
||||
uhid->rd_data = NULL;
|
||||
@@ -550,6 +562,8 @@ static int uhid_dev_destroy(struct uhid_device *uhid)
|
||||
uhid->running = false;
|
||||
wake_up_interruptible(&uhid->report_wait);
|
||||
|
||||
+ cancel_work_sync(&uhid->worker);
|
||||
+
|
||||
hid_destroy_device(uhid->hid);
|
||||
kfree(uhid->rd_data);
|
||||
|
||||
@@ -612,6 +626,7 @@ static int uhid_char_open(struct inode *inode, struct file *file)
|
||||
init_waitqueue_head(&uhid->waitq);
|
||||
init_waitqueue_head(&uhid->report_wait);
|
||||
uhid->running = false;
|
||||
+ INIT_WORK(&uhid->worker, uhid_device_add_worker);
|
||||
|
||||
file->private_data = uhid;
|
||||
nonseekable_open(inode, file);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
From da7d3abe1c9e5ebac2cf86f97e9e89888a5e2094 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Herrmann <aherrmann@suse.com>
|
||||
Date: Fri, 22 Jul 2016 17:14:11 +0200
|
||||
Subject: [PATCH] Revert "cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency"
|
||||
|
||||
This reverts commit 790d849bf811a8ab5d4cd2cce0f6fda92f6aebf2.
|
||||
|
||||
Using a v4.7-rc7 kernel on a HP ProLiant triggered following messages
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
|
||||
The last line was shown for each CPU in the system.
|
||||
Testing v4.5 (where commit 790d849b was integrated) triggered
|
||||
similar messages. Same behaviour on a 2nd HP Proliant system.
|
||||
|
||||
So commit 790d849bf (cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency) causes the system to use performance
|
||||
governor which, I guess, was not the intention of the patch.
|
||||
|
||||
Enabling debug output in pcc-cpufreq provides following verbose output:
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
pcc_get_offset: for CPU 0: pcc_cpu_data input_offset: 0x44, pcc_cpu_data output_offset: 0x48
|
||||
init: policy->max is 2800000, policy->min is 1200000
|
||||
get: get_freq for CPU 0
|
||||
get: SUCCESS: (virtual) output_offset for cpu 0 is 0xffffc9000d7c0048, contains a value of: 0xff06. Speed is: 168000 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
target: CPU 0 should go to target freq: 2800000 (virtual) input_offset is 0xffffc9000d7c0044
|
||||
target: was SUCCESSFUL for cpu 0
|
||||
|
||||
I am asking to revert 790d849bf to re-enable usage of ondemand
|
||||
governor with pcc-cpufreq.
|
||||
|
||||
Fixes: 790d849bf (cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency)
|
||||
CC: <stable@vger.kernel.org> # 4.5+
|
||||
Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
Documentation/cpu-freq/pcc-cpufreq.txt | 4 ++--
|
||||
drivers/cpufreq/pcc-cpufreq.c | 2 --
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Documentation/cpu-freq/pcc-cpufreq.txt b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
index 0a94224..9e3c3b3 100644
|
||||
--- a/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
+++ b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
@@ -159,8 +159,8 @@ to be strictly associated with a P-state.
|
||||
|
||||
2.2 cpuinfo_transition_latency:
|
||||
-------------------------------
|
||||
-The cpuinfo_transition_latency field is CPUFREQ_ETERNAL. The PCC specification
|
||||
-does not include a field to expose this value currently.
|
||||
+The cpuinfo_transition_latency field is 0. The PCC specification does
|
||||
+not include a field to expose this value currently.
|
||||
|
||||
2.3 cpuinfo_cur_freq:
|
||||
---------------------
|
||||
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
|
||||
index a7ecb9a..3f0ce2a 100644
|
||||
--- a/drivers/cpufreq/pcc-cpufreq.c
|
||||
+++ b/drivers/cpufreq/pcc-cpufreq.c
|
||||
@@ -555,8 +555,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||
policy->min = policy->cpuinfo.min_freq =
|
||||
ioread32(&pcch_hdr->minimum_frequency) * 1000;
|
||||
|
||||
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
||||
-
|
||||
pr_debug("init: policy->max is %d, policy->min is %d\n",
|
||||
policy->max, policy->min);
|
||||
out:
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
From 6a7fd522a7c94cdef0a3b08acf8e6702056e635c Mon Sep 17 00:00:00 2001
|
||||
From: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Date: Mon, 4 Jul 2016 11:03:00 -0400
|
||||
Subject: [PATCH] ext4: don't call ext4_should_journal_data() on the journal
|
||||
inode
|
||||
|
||||
If ext4_fill_super() fails early, it's possible for ext4_evict_inode()
|
||||
to call ext4_should_journal_data() before superblock options and flags
|
||||
are fully set up. In that case, the iput() on the journal inode can
|
||||
end up causing a BUG().
|
||||
|
||||
Work around this problem by reordering the tests so we only call
|
||||
ext4_should_journal_data() after we know it's not the journal inode.
|
||||
|
||||
Fixes: 2d859db3e4 ("ext4: fix data corruption in inodes with journalled data")
|
||||
Fixes: 2b405bfa84 ("ext4: fix data=journal fast mount/umount hang")
|
||||
Cc: Jan Kara <jack@suse.cz>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Reviewed-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 321a31c..ea39d19 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -211,9 +211,9 @@ void ext4_evict_inode(struct inode *inode)
|
||||
* Note that directories do not have this problem because they
|
||||
* don't use page cache.
|
||||
*/
|
||||
- if (ext4_should_journal_data(inode) &&
|
||||
- (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
|
||||
- inode->i_ino != EXT4_JOURNAL_INO) {
|
||||
+ if (inode->i_ino != EXT4_JOURNAL_INO &&
|
||||
+ ext4_should_journal_data(inode) &&
|
||||
+ (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) {
|
||||
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
|
||||
tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
From 646caa9c8e196880b41cd3e3d33a2ebc752bdb85 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 4 Jul 2016 10:14:01 -0400
|
||||
Subject: [PATCH] ext4: fix deadlock during page writeback
|
||||
|
||||
Commit 06bd3c36a733 (ext4: fix data exposure after a crash) uncovered a
|
||||
deadlock in ext4_writepages() which was previously much harder to hit.
|
||||
After this commit xfstest generic/130 reproduces the deadlock on small
|
||||
filesystems.
|
||||
|
||||
The problem happens when ext4_do_update_inode() sets LARGE_FILE feature
|
||||
and marks current inode handle as synchronous. That subsequently results
|
||||
in ext4_journal_stop() called from ext4_writepages() to block waiting for
|
||||
transaction commit while still holding page locks, reference to io_end,
|
||||
and some prepared bio in mpd structure each of which can possibly block
|
||||
transaction commit from completing and thus results in deadlock.
|
||||
|
||||
Fix the problem by releasing page locks, io_end reference, and
|
||||
submitting prepared bio before calling ext4_journal_stop().
|
||||
|
||||
[ Changed to defer the call to ext4_journal_stop() only if the handle
|
||||
is synchronous. --tytso ]
|
||||
|
||||
Reported-and-tested-by: Eryu Guan <eguan@redhat.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
CC: stable@vger.kernel.org
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 29 ++++++++++++++++++++++++++---
|
||||
1 file changed, 26 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 44ee5d9..321a31c 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -2754,13 +2754,36 @@ retry:
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
- ext4_journal_stop(handle);
|
||||
+ /*
|
||||
+ * Caution: If the handle is synchronous,
|
||||
+ * ext4_journal_stop() can wait for transaction commit
|
||||
+ * to finish which may depend on writeback of pages to
|
||||
+ * complete or on page lock to be released. In that
|
||||
+ * case, we have to wait until after after we have
|
||||
+ * submitted all the IO, released page locks we hold,
|
||||
+ * and dropped io_end reference (for extent conversion
|
||||
+ * to be able to complete) before stopping the handle.
|
||||
+ */
|
||||
+ if (!ext4_handle_valid(handle) || handle->h_sync == 0) {
|
||||
+ ext4_journal_stop(handle);
|
||||
+ handle = NULL;
|
||||
+ }
|
||||
/* Submit prepared bio */
|
||||
ext4_io_submit(&mpd.io_submit);
|
||||
/* Unlock pages we didn't use */
|
||||
mpage_release_unused_pages(&mpd, give_up_on_write);
|
||||
- /* Drop our io_end reference we got from init */
|
||||
- ext4_put_io_end(mpd.io_submit.io_end);
|
||||
+ /*
|
||||
+ * Drop our io_end reference we got from init. We have
|
||||
+ * to be careful and use deferred io_end finishing if
|
||||
+ * we are still holding the transaction as we can
|
||||
+ * release the last reference to io_end which may end
|
||||
+ * up doing unwritten extent conversion.
|
||||
+ */
|
||||
+ if (handle) {
|
||||
+ ext4_put_io_end_defer(mpd.io_submit.io_end);
|
||||
+ ext4_journal_stop(handle);
|
||||
+ } else
|
||||
+ ext4_put_io_end(mpd.io_submit.io_end);
|
||||
|
||||
if (ret == -ENOSPC && sbi->s_journal) {
|
||||
/*
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From fc8a601e1175ae351f662506030f9939cb7fdbfe Mon Sep 17 00:00:00 2001
|
||||
From: Alex Hung <alex.hung@canonical.com>
|
||||
Date: Mon, 13 Jun 2016 19:44:00 +0800
|
||||
Subject: [PATCH] hp-wmi: Fix wifi cannot be hard-unblocked
|
||||
|
||||
Several users reported wifi cannot be unblocked as discussed in [1].
|
||||
This patch removes the use of the 2009 flag by BIOS but uses the actual
|
||||
WMI function calls - it will be skipped if WMI reports unsupported.
|
||||
|
||||
[1] https://bugzilla.kernel.org/show_bug.cgi?id=69131
|
||||
|
||||
Signed-off-by: Alex Hung <alex.hung@canonical.com>
|
||||
Tested-by: Evgenii Shatokhin <eugene.shatokhin@yandex.ru>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|
||||
---
|
||||
drivers/platform/x86/hp-wmi.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
|
||||
index 6f145f2..96ffda4 100644
|
||||
--- a/drivers/platform/x86/hp-wmi.c
|
||||
+++ b/drivers/platform/x86/hp-wmi.c
|
||||
@@ -718,6 +718,11 @@ static int __init hp_wmi_rfkill_setup(struct platform_device *device)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
+ err = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, &wireless,
|
||||
+ sizeof(wireless), 0);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
if (wireless & 0x1) {
|
||||
wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
|
||||
RFKILL_TYPE_WLAN,
|
||||
@@ -882,7 +887,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
|
||||
wwan_rfkill = NULL;
|
||||
rfkill2_count = 0;
|
||||
|
||||
- if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
|
||||
+ if (hp_wmi_rfkill_setup(device))
|
||||
hp_wmi_rfkill2_setup(device);
|
||||
|
||||
err = device_create_file(&device->dev, &dev_attr_display);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
From a36aa80f3cb2540fb1dbad6240852de4365a2e82 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Thu, 30 Jun 2016 11:51:44 +0300
|
||||
Subject: [PATCH] intel_th: Fix a deadlock in modprobing
|
||||
|
||||
Driver initialization tries to request a hub (GTH) driver module from
|
||||
its probe callback, resulting in a deadlock.
|
||||
|
||||
This patch solves the problem by adding a deferred work for requesting
|
||||
the hub module.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org> # 4.4.x-
|
||||
---
|
||||
drivers/hwtracing/intel_th/core.c | 35 ++++++++++++++++++++++++++++++++++-
|
||||
drivers/hwtracing/intel_th/intel_th.h | 3 +++
|
||||
2 files changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
|
||||
index 1be543e..0b112ae 100644
|
||||
--- a/drivers/hwtracing/intel_th/core.c
|
||||
+++ b/drivers/hwtracing/intel_th/core.c
|
||||
@@ -465,6 +465,38 @@ static struct intel_th_subdevice {
|
||||
},
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_MODULES
|
||||
+static void __intel_th_request_hub_module(struct work_struct *work)
|
||||
+{
|
||||
+ struct intel_th *th = container_of(work, struct intel_th,
|
||||
+ request_module_work);
|
||||
+
|
||||
+ request_module("intel_th_%s", th->hub->name);
|
||||
+}
|
||||
+
|
||||
+static int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ INIT_WORK(&th->request_module_work, __intel_th_request_hub_module);
|
||||
+ schedule_work(&th->request_module_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+ flush_work(&th->request_module_work);
|
||||
+}
|
||||
+#else
|
||||
+static inline int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+}
|
||||
+#endif /* CONFIG_MODULES */
|
||||
+
|
||||
static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
unsigned int ndevres, int irq)
|
||||
{
|
||||
@@ -535,7 +567,7 @@ static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
/* need switch driver to be loaded to enumerate the rest */
|
||||
if (subdev->type == INTEL_TH_SWITCH && !req) {
|
||||
th->hub = thdev;
|
||||
- err = request_module("intel_th_%s", subdev->name);
|
||||
+ err = intel_th_request_hub_module(th);
|
||||
if (!err)
|
||||
req++;
|
||||
}
|
||||
@@ -652,6 +684,7 @@ void intel_th_free(struct intel_th *th)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ intel_th_request_hub_module_flush(th);
|
||||
for (i = 0; i < TH_SUBDEVICE_MAX; i++)
|
||||
if (th->thdev[i] != th->hub)
|
||||
intel_th_device_remove(th->thdev[i]);
|
||||
diff --git a/drivers/hwtracing/intel_th/intel_th.h b/drivers/hwtracing/intel_th/intel_th.h
|
||||
index 0df22e3..0482848 100644
|
||||
--- a/drivers/hwtracing/intel_th/intel_th.h
|
||||
+++ b/drivers/hwtracing/intel_th/intel_th.h
|
||||
@@ -205,6 +205,9 @@ struct intel_th {
|
||||
|
||||
int id;
|
||||
int major;
|
||||
+#ifdef CONFIG_MODULES
|
||||
+ struct work_struct request_module_work;
|
||||
+#endif /* CONFIG_MODULES */
|
||||
#ifdef CONFIG_INTEL_TH_DEBUG
|
||||
struct dentry *dbg;
|
||||
#endif
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 7a1a47ce35821b40f5b2ce46379ba14393bc3873 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Tue, 28 Jun 2016 18:55:23 +0300
|
||||
Subject: [PATCH] intel_th: pci: Add Kaby Lake PCH-H support
|
||||
|
||||
This adds Intel(R) Trace Hub PCI ID for Kaby Lake PCH-H.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
---
|
||||
drivers/hwtracing/intel_th/pci.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
|
||||
index 5e25c7e..0bba384 100644
|
||||
--- a/drivers/hwtracing/intel_th/pci.c
|
||||
+++ b/drivers/hwtracing/intel_th/pci.c
|
||||
@@ -80,6 +80,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1a8e),
|
||||
.driver_data = (kernel_ulong_t)0,
|
||||
},
|
||||
+ {
|
||||
+ /* Kaby Lake PCH-H */
|
||||
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6),
|
||||
+ .driver_data = (kernel_ulong_t)0,
|
||||
+ },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
From 2a00932f082aff93c3a55426e0c7af6d0ec03997 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Leach <matthew@mattleach.net>
|
||||
Date: Fri, 8 Jul 2016 09:04:27 -0300
|
||||
Subject: [PATCH] [media] media: usbtv: prevent access to free'd resources
|
||||
|
||||
When disconnecting the usbtv device, the sound card is unregistered
|
||||
from ALSA and the snd member of the usbtv struct is set to NULL. If
|
||||
the usbtv snd_trigger work is running, this can cause a race condition
|
||||
where the kernel will attempt to access free'd resources, shown in
|
||||
[1].
|
||||
|
||||
This patch fixes the disconnection code by cancelling any snd_trigger
|
||||
work before unregistering the sound card from ALSA and checking that
|
||||
the snd member still exists in the work function.
|
||||
|
||||
[1]:
|
||||
usb 3-1.2: USB disconnect, device number 6
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
|
||||
IP: [<ffffffff81093850>] process_one_work+0x30/0x480
|
||||
PGD 405bbf067 PUD 405bbe067 PMD 0
|
||||
Call Trace:
|
||||
[<ffffffff81093ce8>] worker_thread+0x48/0x4e0
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81099998>] kthread+0xd8/0xf0
|
||||
[<ffffffff815c73c2>] ret_from_fork+0x22/0x40
|
||||
[<ffffffff810998c0>] ? kthread_worker_fn+0x170/0x170
|
||||
---[ end trace 0f3dac5c1a38e610 ]---
|
||||
|
||||
Signed-off-by: Matthew Leach <matthew@mattleach.net>
|
||||
Tested-by: Peter Sutton <foxxy@foxdogstudios.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/usb/usbtv/usbtv-audio.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/usb/usbtv/usbtv-audio.c b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
index d4b4db3..1965ff1 100644
|
||||
--- a/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
+++ b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
@@ -292,6 +292,9 @@ static void snd_usbtv_trigger(struct work_struct *work)
|
||||
{
|
||||
struct usbtv *chip = container_of(work, struct usbtv, snd_trigger);
|
||||
|
||||
+ if (!chip->snd)
|
||||
+ return;
|
||||
+
|
||||
if (atomic_read(&chip->snd_stream))
|
||||
usbtv_audio_start(chip);
|
||||
else
|
||||
@@ -392,6 +395,8 @@ err:
|
||||
|
||||
void usbtv_audio_free(struct usbtv *usbtv)
|
||||
{
|
||||
+ cancel_work_sync(&usbtv->snd_trigger);
|
||||
+
|
||||
if (usbtv->snd && usbtv->udev) {
|
||||
snd_card_free(usbtv->snd);
|
||||
usbtv->snd = NULL;
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
From 126f40298446a82116e1f92a1aaf72b8c8228fae Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Wed, 11 May 2016 18:44:32 -0300
|
||||
Subject: [PATCH] [media] vb2: core: Skip planes array verification if pb is
|
||||
NULL
|
||||
|
||||
An earlier patch fixing an input validation issue introduced another
|
||||
issue: vb2_core_dqbuf() is called with pb argument value NULL in some
|
||||
cases, causing a NULL pointer dereference. Fix this by skipping the
|
||||
verification as there's nothing to verify.
|
||||
|
||||
Fixes: e7e0c3e26587 ("[media] videobuf2-core: Check user space planes array in dqbuf")
|
||||
|
||||
Signed-off-by: David R <david@unsolicited.net>
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-core.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
index 9fbcb67..633fc1a 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-core.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
@@ -1648,7 +1648,7 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
void *pb, int nonblocking)
|
||||
{
|
||||
unsigned long flags;
|
||||
- int ret;
|
||||
+ int ret = 0;
|
||||
|
||||
/*
|
||||
* Wait for at least one buffer to become available on the done_list.
|
||||
@@ -1664,10 +1664,12 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
spin_lock_irqsave(&q->done_lock, flags);
|
||||
*vb = list_first_entry(&q->done_list, struct vb2_buffer, done_entry);
|
||||
/*
|
||||
- * Only remove the buffer from done_list if v4l2_buffer can handle all
|
||||
- * the planes.
|
||||
+ * Only remove the buffer from done_list if all planes can be
|
||||
+ * handled. Some cases such as V4L2 file I/O and DVB have pb
|
||||
+ * == NULL; skip the check then as there's nothing to verify.
|
||||
*/
|
||||
- ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
+ if (pb)
|
||||
+ ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
if (!ret)
|
||||
list_del(&(*vb)->done_entry);
|
||||
spin_unlock_irqrestore(&q->done_lock, flags);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
From 83934b75c368f529d084815c463a7ef781dc9751 Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Sun, 3 Apr 2016 16:31:03 -0300
|
||||
Subject: [PATCH] [media] videobuf2-v4l2: Verify planes array in buffer
|
||||
dequeueing
|
||||
|
||||
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
|
||||
which will be dequeued is not known until the buffer has been removed from
|
||||
the queue. The number of planes is specific to a buffer, not to the queue.
|
||||
|
||||
This does lead to the situation where multi-plane buffers may be requested
|
||||
and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument
|
||||
struct with fewer planes.
|
||||
|
||||
__fill_v4l2_buffer() however uses the number of planes from the dequeued
|
||||
videobuf2 buffer, overwriting kernel memory (the m.planes array allocated
|
||||
in video_usercopy() in v4l2-ioctl.c) if the user provided fewer
|
||||
planes than the dequeued buffer had. Oops!
|
||||
|
||||
Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2")
|
||||
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
index 0b1b8c7..7f366f1 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
@@ -74,6 +74,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
|
||||
+{
|
||||
+ return __verify_planes_array(vb, pb);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* __verify_length() - Verify that the bytesused value for each plane fits in
|
||||
* the plane length and that the data offset doesn't exceed the bytesused value.
|
||||
@@ -437,6 +442,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
|
||||
}
|
||||
|
||||
static const struct vb2_buf_ops v4l2_buf_ops = {
|
||||
+ .verify_planes_array = __verify_planes_array_core,
|
||||
.fill_user_buffer = __fill_v4l2_buffer,
|
||||
.fill_vb2_buffer = __fill_vb2_buffer,
|
||||
.copy_timestamp = __copy_timestamp,
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
From d9083160c2f6ee456ea867ea2279c1fc6124e56f Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Date: Fri, 8 Jul 2016 03:30:16 -0700
|
||||
Subject: [PATCH] megaraid_sas: Do not fire MR_DCMD_PD_LIST_QUERY to
|
||||
controllers which do not support it
|
||||
|
||||
There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue
|
||||
reported, megaraid_sas driver goes into an infinite error reporting loop
|
||||
as soon as there is a change in the status of one of the
|
||||
arrays (degrade, resync online etc ). Below are the error logs reported
|
||||
continuously-
|
||||
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.757017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.820018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.841018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
|
||||
This issue is very much specific to controllers which do not support
|
||||
DCMD- MR_DCMD_PD_LIST_QUERY. In case of any hotplugging/rescanning of
|
||||
drives, AEN thread will be scheduled by driver and fire DCMD-
|
||||
MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will fail
|
||||
this event processing and will not go ahead for further events. This
|
||||
will cause infinite loop of same event getting retried infinitely and
|
||||
causing above mentioned logs.
|
||||
|
||||
Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for
|
||||
controllers which do not support it and send DCMD SUCCESS status to AEN
|
||||
function so that it can go ahead with other event processing.
|
||||
|
||||
Reported-by: Lucz Geza <geza@lucz.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
---
|
||||
drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
index f4b0690..2dab3dc 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
@@ -4079,6 +4079,12 @@ megasas_get_pd_list(struct megasas_instance *instance)
|
||||
struct MR_PD_ADDRESS *pd_addr;
|
||||
dma_addr_t ci_h = 0;
|
||||
|
||||
+ if (instance->pd_list_not_supported) {
|
||||
+ dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
|
||||
+ "not supported by firmware\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
cmd = megasas_get_cmd(instance);
|
||||
|
||||
if (!cmd) {
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
From 1bea0512c3394965de28a152149b90afd686fae5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Mon, 11 Jul 2016 23:01:36 +0200
|
||||
Subject: [PATCH] bcma: add PCI ID for Foxconn's BCM43142 device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
After discovering there are 2 very different 14e4:4365 PCI devices we
|
||||
made ID tables less generic. Back then we believed there are only 2 such
|
||||
devices:
|
||||
1) 14e4:4365 1028:0016 with SoftMAC BCM43142 chipset
|
||||
2) 14e4:4365 14e4:4365 with FullMAC BCM4366 chipset
|
||||
|
||||
>From the recent report it appears there is also 14e4:4365 105b:e092
|
||||
which should be claimed by bcma. Add back support for it.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=121881
|
||||
Fixes: 515b399c9a20 ("bcma: claim only 14e4:4365 PCI Dell card with SoftMAC BCM43142")
|
||||
Reported-by: Igor Mammedov <imammedo@redhat.com>
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Cc: Stable <stable@vger.kernel.org> [4.6+]
|
||||
Tested-by: Igor Mammedov <imammedo@redhat.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
drivers/bcma/host_pci.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
|
||||
index cae5385..bd46569 100644
|
||||
--- a/drivers/bcma/host_pci.c
|
||||
+++ b/drivers/bcma/host_pci.c
|
||||
@@ -295,6 +295,7 @@ static const struct pci_device_id bcma_pci_bridge_tbl[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_DELL, 0x0016) },
|
||||
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_FOXCONN, 0xe092) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43aa) },
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
From 82bc9ab6a8f577d2174a736c33f3d4ecf7d9ef47 Mon Sep 17 00:00:00 2001
|
||||
From: Arend Van Spriel <arend.vanspriel@broadcom.com>
|
||||
Date: Fri, 15 Jul 2016 12:16:12 +0200
|
||||
Subject: [PATCH] brcmfmac: restore stopping netdev queue when bus clogs up
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When the host-interface bus has hard time handling transmit packets
|
||||
it informs higher layer about this and it would stop the netdev
|
||||
queue when needed. However, since commit 9cd18359d31e ("brcmfmac:
|
||||
Make FWS queueing configurable.") this was broken. With this patch
|
||||
the behaviour is restored.
|
||||
|
||||
Cc: stable@vger.kernel.org # v4.5, v4.6, v4.7
|
||||
Fixes: 9cd18359d31e ("brcmfmac: Make FWS queueing configurable.")
|
||||
Tested-by: Per Förlin <per.forlin@gmail.com>
|
||||
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
|
||||
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
|
||||
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
|
||||
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
|
||||
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/fwsignal.c | 22 +++++++++++++++++-----
|
||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
index cd221ab..9f9024a 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
|
||||
@@ -2469,10 +2469,22 @@ void brcmf_fws_bustxfail(struct brcmf_fws_info *fws, struct sk_buff *skb)
|
||||
void brcmf_fws_bus_blocked(struct brcmf_pub *drvr, bool flow_blocked)
|
||||
{
|
||||
struct brcmf_fws_info *fws = drvr->fws;
|
||||
+ struct brcmf_if *ifp;
|
||||
+ int i;
|
||||
|
||||
- fws->bus_flow_blocked = flow_blocked;
|
||||
- if (!flow_blocked)
|
||||
- brcmf_fws_schedule_deq(fws);
|
||||
- else
|
||||
- fws->stats.bus_flow_block++;
|
||||
+ if (fws->avoid_queueing) {
|
||||
+ for (i = 0; i < BRCMF_MAX_IFS; i++) {
|
||||
+ ifp = drvr->iflist[i];
|
||||
+ if (!ifp || !ifp->ndev)
|
||||
+ continue;
|
||||
+ brcmf_txflowblock_if(ifp, BRCMF_NETIF_STOP_REASON_FLOW,
|
||||
+ flow_blocked);
|
||||
+ }
|
||||
+ } else {
|
||||
+ fws->bus_flow_blocked = flow_blocked;
|
||||
+ if (!flow_blocked)
|
||||
+ brcmf_fws_schedule_deq(fws);
|
||||
+ else
|
||||
+ fws->stats.bus_flow_block++;
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
From 0bd50d719b004110e791800450ad204399100a86 Mon Sep 17 00:00:00 2001
|
||||
From: Dan O'Donovan <dan@emutex.com>
|
||||
Date: Fri, 10 Jun 2016 13:23:34 +0100
|
||||
Subject: [PATCH] pinctrl: cherryview: prevent concurrent access to GPIO
|
||||
controllers
|
||||
|
||||
Due to a silicon issue on the Atom X5-Z8000 "Cherry Trail" processor
|
||||
series, a common lock must be used to prevent concurrent accesses
|
||||
across the 4 GPIO controllers managed by this driver.
|
||||
|
||||
See Intel Atom Z8000 Processor Series Specification Update
|
||||
(Rev. 005), errata #CHT34, for further information.
|
||||
|
||||
Cc: stable <stable@vger.kernel.org>
|
||||
Signed-off-by: Dan O'Donovan <dan@emutex.com>
|
||||
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
drivers/pinctrl/intel/pinctrl-cherryview.c | 80 ++++++++++++++++--------------
|
||||
1 file changed, 44 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
index ac4f564..bf65c94 100644
|
||||
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
|
||||
@@ -160,7 +160,6 @@ struct chv_pin_context {
|
||||
* @pctldev: Pointer to the pin controller device
|
||||
* @chip: GPIO chip in this pin controller
|
||||
* @regs: MMIO registers
|
||||
- * @lock: Lock to serialize register accesses
|
||||
* @intr_lines: Stores mapping between 16 HW interrupt wires and GPIO
|
||||
* offset (in GPIO number space)
|
||||
* @community: Community this pinctrl instance represents
|
||||
@@ -174,7 +173,6 @@ struct chv_pinctrl {
|
||||
struct pinctrl_dev *pctldev;
|
||||
struct gpio_chip chip;
|
||||
void __iomem *regs;
|
||||
- raw_spinlock_t lock;
|
||||
unsigned intr_lines[16];
|
||||
const struct chv_community *community;
|
||||
u32 saved_intmask;
|
||||
@@ -657,6 +655,17 @@ static const struct chv_community *chv_communities[] = {
|
||||
&southeast_community,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * Lock to serialize register accesses
|
||||
+ *
|
||||
+ * Due to a silicon issue, a shared lock must be used to prevent
|
||||
+ * concurrent accesses across the 4 GPIO controllers.
|
||||
+ *
|
||||
+ * See Intel Atom Z8000 Processor Series Specification Update (Rev. 005),
|
||||
+ * errata #CHT34, for further information.
|
||||
+ */
|
||||
+static DEFINE_RAW_SPINLOCK(chv_lock);
|
||||
+
|
||||
static void __iomem *chv_padreg(struct chv_pinctrl *pctrl, unsigned offset,
|
||||
unsigned reg)
|
||||
{
|
||||
@@ -718,13 +727,13 @@ static void chv_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s,
|
||||
u32 ctrl0, ctrl1;
|
||||
bool locked;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
ctrl0 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0));
|
||||
ctrl1 = readl(chv_padreg(pctrl, offset, CHV_PADCTRL1));
|
||||
locked = chv_pad_locked(pctrl, offset);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
if (ctrl0 & CHV_PADCTRL0_GPIOEN) {
|
||||
seq_puts(s, "GPIO ");
|
||||
@@ -787,14 +796,14 @@ static int chv_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
||||
|
||||
grp = &pctrl->community->groups[group];
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
/* Check first that the pad is not locked */
|
||||
for (i = 0; i < grp->npins; i++) {
|
||||
if (chv_pad_locked(pctrl, grp->pins[i])) {
|
||||
dev_warn(pctrl->dev, "unable to set mode for locked pin %u\n",
|
||||
grp->pins[i]);
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
@@ -837,7 +846,7 @@ static int chv_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
||||
pin, altfunc->mode, altfunc->invert_oe ? "" : "not ");
|
||||
}
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -851,13 +860,13 @@ static int chv_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
void __iomem *reg;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
if (chv_pad_locked(pctrl, offset)) {
|
||||
value = readl(chv_padreg(pctrl, offset, CHV_PADCTRL0));
|
||||
if (!(value & CHV_PADCTRL0_GPIOEN)) {
|
||||
/* Locked so cannot enable */
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EBUSY;
|
||||
}
|
||||
} else {
|
||||
@@ -897,7 +906,7 @@ static int chv_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
chv_writel(value, reg);
|
||||
}
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -911,13 +920,13 @@ static void chv_gpio_disable_free(struct pinctrl_dev *pctldev,
|
||||
void __iomem *reg;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
reg = chv_padreg(pctrl, offset, CHV_PADCTRL0);
|
||||
value = readl(reg) & ~CHV_PADCTRL0_GPIOEN;
|
||||
chv_writel(value, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
@@ -929,7 +938,7 @@ static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
unsigned long flags;
|
||||
u32 ctrl0;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
ctrl0 = readl(reg) & ~CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
if (input)
|
||||
@@ -938,7 +947,7 @@ static int chv_gpio_set_direction(struct pinctrl_dev *pctldev,
|
||||
ctrl0 |= CHV_PADCTRL0_GPIOCFG_GPO << CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
chv_writel(ctrl0, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -963,10 +972,10 @@ static int chv_config_get(struct pinctrl_dev *pctldev, unsigned pin,
|
||||
u16 arg = 0;
|
||||
u32 term;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
ctrl1 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL1));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
term = (ctrl0 & CHV_PADCTRL0_TERM_MASK) >> CHV_PADCTRL0_TERM_SHIFT;
|
||||
|
||||
@@ -1040,7 +1049,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
unsigned long flags;
|
||||
u32 ctrl0, pull;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(reg);
|
||||
|
||||
switch (param) {
|
||||
@@ -1063,7 +1072,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
pull = CHV_PADCTRL0_TERM_20K << CHV_PADCTRL0_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1081,7 +1090,7 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
pull = CHV_PADCTRL0_TERM_20K << CHV_PADCTRL0_TERM_SHIFT;
|
||||
break;
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1089,12 +1098,12 @@ static int chv_config_set_pull(struct chv_pinctrl *pctrl, unsigned pin,
|
||||
break;
|
||||
|
||||
default:
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
chv_writel(ctrl0, reg);
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1160,9 +1169,9 @@ static int chv_gpio_get(struct gpio_chip *chip, unsigned offset)
|
||||
unsigned long flags;
|
||||
u32 ctrl0, cfg;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
cfg = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
cfg >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
@@ -1180,7 +1189,7 @@ static void chv_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
void __iomem *reg;
|
||||
u32 ctrl0;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
reg = chv_padreg(pctrl, pin, CHV_PADCTRL0);
|
||||
ctrl0 = readl(reg);
|
||||
@@ -1192,7 +1201,7 @@ static void chv_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
|
||||
chv_writel(ctrl0, reg);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
@@ -1202,9 +1211,9 @@ static int chv_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
|
||||
u32 ctrl0, direction;
|
||||
unsigned long flags;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
ctrl0 = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
direction = ctrl0 & CHV_PADCTRL0_GPIOCFG_MASK;
|
||||
direction >>= CHV_PADCTRL0_GPIOCFG_SHIFT;
|
||||
@@ -1242,14 +1251,14 @@ static void chv_gpio_irq_ack(struct irq_data *d)
|
||||
int pin = chv_gpio_offset_to_pin(pctrl, irqd_to_hwirq(d));
|
||||
u32 intr_line;
|
||||
|
||||
- raw_spin_lock(&pctrl->lock);
|
||||
+ raw_spin_lock(&chv_lock);
|
||||
|
||||
intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intr_line &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
intr_line >>= CHV_PADCTRL0_INTSEL_SHIFT;
|
||||
chv_writel(BIT(intr_line), pctrl->regs + CHV_INTSTAT);
|
||||
|
||||
- raw_spin_unlock(&pctrl->lock);
|
||||
+ raw_spin_unlock(&chv_lock);
|
||||
}
|
||||
|
||||
static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
@@ -1260,7 +1269,7 @@ static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
u32 value, intr_line;
|
||||
unsigned long flags;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
intr_line = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intr_line &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
@@ -1273,7 +1282,7 @@ static void chv_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
||||
value |= BIT(intr_line);
|
||||
chv_writel(value, pctrl->regs + CHV_INTMASK);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
static void chv_gpio_irq_mask(struct irq_data *d)
|
||||
@@ -1307,7 +1316,7 @@ static unsigned chv_gpio_irq_startup(struct irq_data *d)
|
||||
unsigned long flags;
|
||||
u32 intsel, value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
intsel = readl(chv_padreg(pctrl, pin, CHV_PADCTRL0));
|
||||
intsel &= CHV_PADCTRL0_INTSEL_MASK;
|
||||
intsel >>= CHV_PADCTRL0_INTSEL_SHIFT;
|
||||
@@ -1322,7 +1331,7 @@ static unsigned chv_gpio_irq_startup(struct irq_data *d)
|
||||
irq_set_handler_locked(d, handler);
|
||||
pctrl->intr_lines[intsel] = offset;
|
||||
}
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
}
|
||||
|
||||
chv_gpio_irq_unmask(d);
|
||||
@@ -1338,7 +1347,7 @@ static int chv_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
unsigned long flags;
|
||||
u32 value;
|
||||
|
||||
- raw_spin_lock_irqsave(&pctrl->lock, flags);
|
||||
+ raw_spin_lock_irqsave(&chv_lock, flags);
|
||||
|
||||
/*
|
||||
* Pins which can be used as shared interrupt are configured in
|
||||
@@ -1387,7 +1396,7 @@ static int chv_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
else if (type & IRQ_TYPE_LEVEL_MASK)
|
||||
irq_set_handler_locked(d, handle_level_irq);
|
||||
|
||||
- raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
+ raw_spin_unlock_irqrestore(&chv_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1499,7 +1508,6 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
|
||||
if (i == ARRAY_SIZE(chv_communities))
|
||||
return -ENODEV;
|
||||
|
||||
- raw_spin_lock_init(&pctrl->lock);
|
||||
pctrl->dev = &pdev->dev;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -38,9 +38,15 @@ x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch
|
||||
# slows down boot
|
||||
Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch
|
||||
|
||||
#
|
||||
Revert-cpufreq-pcc-cpufreq-update-default-value-of-c.patch
|
||||
|
||||
# breaks nvidia304
|
||||
Revert-x86-mm-mtrr-Remove-kernel-internal-MTRR-inter.patch
|
||||
|
||||
#
|
||||
x86-power-64-Fix-hibernation-return-address-corrupti.patch
|
||||
|
||||
###
|
||||
### Core
|
||||
###
|
||||
@@ -122,6 +128,9 @@ block-Make-CFQ-default-to-IOPS-mode-on-SSDs.patch
|
||||
# ahci ids
|
||||
ahci-add-new-Intel-device-IDs.patch
|
||||
|
||||
#
|
||||
megaraid_sas-Do-not-fire-MR_DCMD_PD_LIST_QUERY-to-co.patch
|
||||
|
||||
###
|
||||
### Char
|
||||
###
|
||||
@@ -138,6 +147,10 @@ fs-aufs-4.7.patch
|
||||
fs-aufs-4.7-modular.patch
|
||||
fs-aufs-4.7-ver-fix.patch
|
||||
|
||||
# ext4
|
||||
fs-ext4-don-t-call-ext4_should_journal_data-on-the-jour.patch
|
||||
fs-ext4-fix-deadlock-during-page-writeback.patch
|
||||
|
||||
###
|
||||
### FireWire
|
||||
###
|
||||
@@ -228,6 +241,10 @@ net-wireless-iwlwifi-add-new-8265.patch
|
||||
net-wireless-iwlwifi-pcie-enable-interrupts-before-releasing-the-NICs-CPU.patch
|
||||
net-wireless-iwlwifi-pcie-fix-a-race-in-firmware-loading-flow.patch
|
||||
|
||||
#
|
||||
net-bcma-add-PCI-ID-for-Foxconn-s-BCM43142-device.patch
|
||||
net-brcmfmac-restore-stopping-netdev-queue-when-bus-clog.patch
|
||||
|
||||
###
|
||||
### Platform drivers
|
||||
###
|
||||
@@ -238,6 +255,14 @@ platform-x86-add-shuttle-wmi-driver.patch
|
||||
platform-x86-shuttle-wmi-drop-devinit-exit.patch
|
||||
platform-x86-shuttle-wmi-4.2-buildfix.patch
|
||||
|
||||
#
|
||||
hp-wmi-Fix-wifi-cannot-be-hard-unblocked.patch
|
||||
|
||||
Bluetooth-Add-support-of-13d3-3490-AR3012-device.patch
|
||||
intel_th-Fix-a-deadlock-in-modprobing.patch
|
||||
intel_th-pci-Add-Kaby-Lake-PCH-H-support.patch
|
||||
pinctrl-cherryview-prevent-concurrent-access-to-GPIO.patch
|
||||
|
||||
###
|
||||
### RTC
|
||||
###
|
||||
@@ -275,6 +300,13 @@ hid-usbhid-IBM-BladeCenterHS20-quirk.patch
|
||||
usb-storage-unusual_devs-add-id.patch
|
||||
usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch
|
||||
|
||||
#
|
||||
usb-dwc3-fix-for-the-isoc-transfer-EP_BUSY-flag.patch
|
||||
usb-renesas_usbhs-fix-NULL-pointer-dereference-in-xf.patch
|
||||
|
||||
#
|
||||
HID-uhid-fix-timeout-when-probe-races-with-IO.patch
|
||||
|
||||
###
|
||||
### V4L
|
||||
###
|
||||
@@ -282,6 +314,11 @@ usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch
|
||||
# pwc driver name in /proc/bus/devices, /sys fix and "advertisement" removal
|
||||
media-usb-pwc-lie-in-proc-usb-devices.patch
|
||||
|
||||
#
|
||||
media-media-usbtv-prevent-access-to-free-d-resources.patch
|
||||
media-vb2-core-Skip-planes-array-verification-if-pb-.patch
|
||||
media-videobuf2-v4l2-Verify-planes-array-in-buffer-d.patch
|
||||
|
||||
###
|
||||
### Video
|
||||
###
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From 9cad39fe4e4a4fe95d8ea5a7b0692b0a6e89e38b Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Leszczynski <konrad.leszczynski@intel.com>
|
||||
Date: Mon, 8 Feb 2016 16:13:12 +0100
|
||||
Subject: [PATCH] usb: dwc3: fix for the isoc transfer EP_BUSY flag
|
||||
|
||||
commit f3af36511e60 ("usb: dwc3: gadget: always
|
||||
enable IOC on bulk/interrupt transfers") ended up
|
||||
regressing Isochronous endpoints by clearing
|
||||
DWC3_EP_BUSY flag too early, which resulted in
|
||||
choppy audio playback over USB.
|
||||
|
||||
Fix that by partially reverting original commit and
|
||||
making sure that we check for isochronous endpoints.
|
||||
|
||||
Fixes: f3af36511e60 ("usb: dwc3: gadget: always enable IOC
|
||||
on bulk/interrupt transfers")
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
|
||||
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/dwc3/gadget.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
|
||||
index 5e7b2ba..867adc9 100644
|
||||
--- a/drivers/usb/dwc3/gadget.c
|
||||
+++ b/drivers/usb/dwc3/gadget.c
|
||||
@@ -2058,6 +2058,10 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
|
||||
+ if ((event->status & DEPEVT_STATUS_IOC) &&
|
||||
+ (trb->ctrl & DWC3_TRB_CTRL_IOC))
|
||||
+ return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
From 4fdef698383db07d829da567e0e405fc41ff3a89 Mon Sep 17 00:00:00 2001
|
||||
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
|
||||
Date: Wed, 8 Jun 2016 16:32:49 +0900
|
||||
Subject: [PATCH] usb: renesas_usbhs: fix NULL pointer dereference in
|
||||
xfer_work()
|
||||
|
||||
This patch fixes an issue that the xfer_work() is possible to cause
|
||||
NULL pointer dereference if the usb cable is disconnected while data
|
||||
transfer is running.
|
||||
|
||||
In such case, a gadget driver may call usb_ep_disable()) before
|
||||
xfer_work() is actually called. In this case, the usbhs_pkt_pop()
|
||||
will call usbhsf_fifo_unselect(), and then usbhs_pipe_to_fifo()
|
||||
in xfer_work() will return NULL.
|
||||
|
||||
Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support")
|
||||
Cc: <stable@vger.kernel.org> # v3.1+
|
||||
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
|
||||
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||||
---
|
||||
drivers/usb/renesas_usbhs/fifo.c | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
|
||||
index 7be4e7d..280ed5f 100644
|
||||
--- a/drivers/usb/renesas_usbhs/fifo.c
|
||||
+++ b/drivers/usb/renesas_usbhs/fifo.c
|
||||
@@ -810,20 +810,27 @@ static void xfer_work(struct work_struct *work)
|
||||
{
|
||||
struct usbhs_pkt *pkt = container_of(work, struct usbhs_pkt, work);
|
||||
struct usbhs_pipe *pipe = pkt->pipe;
|
||||
- struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
|
||||
+ struct usbhs_fifo *fifo;
|
||||
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
|
||||
struct dma_async_tx_descriptor *desc;
|
||||
- struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
|
||||
+ struct dma_chan *chan;
|
||||
struct device *dev = usbhs_priv_to_dev(priv);
|
||||
enum dma_transfer_direction dir;
|
||||
+ unsigned long flags;
|
||||
|
||||
+ usbhs_lock(priv, flags);
|
||||
+ fifo = usbhs_pipe_to_fifo(pipe);
|
||||
+ if (!fifo)
|
||||
+ goto xfer_work_end;
|
||||
+
|
||||
+ chan = usbhsf_dma_chan_get(fifo, pkt);
|
||||
dir = usbhs_pipe_is_dir_in(pipe) ? DMA_DEV_TO_MEM : DMA_MEM_TO_DEV;
|
||||
|
||||
desc = dmaengine_prep_slave_single(chan, pkt->dma + pkt->actual,
|
||||
pkt->trans, dir,
|
||||
DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
|
||||
if (!desc)
|
||||
- return;
|
||||
+ goto xfer_work_end;
|
||||
|
||||
desc->callback = usbhsf_dma_complete;
|
||||
desc->callback_param = pipe;
|
||||
@@ -831,7 +838,7 @@ static void xfer_work(struct work_struct *work)
|
||||
pkt->cookie = dmaengine_submit(desc);
|
||||
if (pkt->cookie < 0) {
|
||||
dev_err(dev, "Failed to submit dma descriptor\n");
|
||||
- return;
|
||||
+ goto xfer_work_end;
|
||||
}
|
||||
|
||||
dev_dbg(dev, " %s %d (%d/ %d)\n",
|
||||
@@ -842,6 +849,9 @@ static void xfer_work(struct work_struct *work)
|
||||
usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
|
||||
dma_async_issue_pending(chan);
|
||||
usbhs_pipe_enable(pipe);
|
||||
+
|
||||
+xfer_work_end:
|
||||
+ usbhs_unlock(priv, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
From 4ce827b4cc58bec7952591b96cce2b28553e4d5b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
Date: Thu, 28 Jul 2016 23:15:21 +0200
|
||||
Subject: [PATCH] x86/power/64: Fix hibernation return address corruption
|
||||
|
||||
In kernel bug 150021, a kernel panic was reported when restoring a
|
||||
hibernate image. Only a picture of the oops was reported, so I can't
|
||||
paste the whole thing here. But here are the most interesting parts:
|
||||
|
||||
kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
|
||||
BUG: unable to handle kernel paging request at ffff8804615cfd78
|
||||
...
|
||||
RIP: ffff8804615cfd78
|
||||
RSP: ffff8804615f0000
|
||||
RBP: ffff8804615cfdc0
|
||||
...
|
||||
Call Trace:
|
||||
do_signal+0x23
|
||||
exit_to_usermode_loop+0x64
|
||||
...
|
||||
|
||||
The RIP is on the same page as RBP, so it apparently started executing
|
||||
on the stack.
|
||||
|
||||
The bug was bisected to commit ef0f3ed5a4ac (x86/asm/power: Create
|
||||
stack frames in hibernate_asm_64.S), which in retrospect seems quite
|
||||
dangerous, since that code saves and restores the stack pointer from a
|
||||
global variable ('saved_context').
|
||||
|
||||
There are a lot of moving parts in the hibernate save and restore paths,
|
||||
so I don't know exactly what caused the panic. Presumably, a FRAME_END
|
||||
was executed without the corresponding FRAME_BEGIN, or vice versa. That
|
||||
would corrupt the return address on the stack and would be consistent
|
||||
with the details of the above panic.
|
||||
|
||||
[ rjw: One major problem is that by the time the FRAME_BEGIN in
|
||||
restore_registers() is executed, the stack pointer value may not
|
||||
be valid any more. Namely, the stack area pointed to by it
|
||||
previously may have been overwritten by some image memory contents
|
||||
and that page frame may now be used for whatever different purpose
|
||||
it had been allocated for before hibernation. In that case, the
|
||||
FRAME_BEGIN will corrupt that memory. ]
|
||||
|
||||
Instead of doing the frame pointer save/restore around the bounds of the
|
||||
affected functions, just do it around the call to swsusp_save().
|
||||
|
||||
That has the same effect of ensuring that if swsusp_save() sleeps, the
|
||||
frame pointers will be correct. It's also a much more obviously safe
|
||||
way to do it than the original patch. And objtool still doesn't report
|
||||
any warnings.
|
||||
|
||||
Fixes: ef0f3ed5a4ac (x86/asm/power: Create stack frames in hibernate_asm_64.S)
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=150021
|
||||
Cc: 4.6+ <stable@vger.kernel.org> # 4.6+
|
||||
Reported-by: Andre Reinke <andre.reinke@mailbox.org>
|
||||
Tested-by: Andre Reinke <andre.reinke@mailbox.org>
|
||||
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
|
||||
Acked-by: Ingo Molnar <mingo@kernel.org>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
arch/x86/power/hibernate_asm_64.S | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/power/hibernate_asm_64.S b/arch/x86/power/hibernate_asm_64.S
|
||||
index 3177c2b..8eee0e9 100644
|
||||
--- a/arch/x86/power/hibernate_asm_64.S
|
||||
+++ b/arch/x86/power/hibernate_asm_64.S
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <asm/frame.h>
|
||||
|
||||
ENTRY(swsusp_arch_suspend)
|
||||
- FRAME_BEGIN
|
||||
movq $saved_context, %rax
|
||||
movq %rsp, pt_regs_sp(%rax)
|
||||
movq %rbp, pt_regs_bp(%rax)
|
||||
@@ -48,6 +47,7 @@ ENTRY(swsusp_arch_suspend)
|
||||
movq %cr3, %rax
|
||||
movq %rax, restore_cr3(%rip)
|
||||
|
||||
+ FRAME_BEGIN
|
||||
call swsusp_save
|
||||
FRAME_END
|
||||
ret
|
||||
@@ -104,7 +104,6 @@ ENTRY(core_restore_code)
|
||||
/* code below belongs to the image kernel */
|
||||
.align PAGE_SIZE
|
||||
ENTRY(restore_registers)
|
||||
- FRAME_BEGIN
|
||||
/* go back to the original page tables */
|
||||
movq %r9, %cr3
|
||||
|
||||
@@ -145,6 +144,5 @@ ENTRY(restore_registers)
|
||||
/* tell the hibernation core that we've just restored the memory */
|
||||
movq %rax, in_suspend(%rip)
|
||||
|
||||
- FRAME_END
|
||||
ret
|
||||
ENDPROC(restore_registers)
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+30
-1
@@ -29,7 +29,7 @@
|
||||
<Patches>
|
||||
<!-- Linux patches -->
|
||||
<!--Patch level="1" compressionType="xz">patches/linux/patch-4.6.3.xz</Patch-->
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.7.0/1.mga6/PATCHES/patches/series-->
|
||||
<!-- Mageia Linux patches // compatible with http://svnweb.mageia.org/packages/cauldron/kernel/releases/4.7.0/2.mga6/PATCHES/patches/series-->
|
||||
<!--stable patches-->
|
||||
<!--other patches-->
|
||||
<Patch level="1">patches/mageia/Revert-ipmi-Start-the-timer-and-thread-on-internal-m.patch</Patch>
|
||||
@@ -38,7 +38,9 @@
|
||||
<Patch level="1">patches/mageia/x86-default_poweroff_up_machines.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-increase-default-minimum-vmalloc-area-by-64MB-to-192MB.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-cpufreq-pcc-cpufreq-update-default-value-of-c.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Revert-x86-mm-mtrr-Remove-kernel-internal-MTRR-inter.patch</Patch>
|
||||
<Patch level="1">patches/mageia/x86-power-64-Fix-hibernation-return-address-corrupti.patch</Patch>
|
||||
<Patch level="1">patches/mageia/base-cacheinfo-silence-DT-warnings.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pci-add-ALI-M5229-ide-compatibility-mode-quirk.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pci-quirks-drop-devinit-exit.patch</Patch>
|
||||
@@ -61,6 +63,8 @@
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7-modular.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-aufs-4.7-ver-fix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-ext4-don-t-call-ext4_should_journal_data-on-the-jour.patch</Patch>
|
||||
<Patch level="1">patches/mageia/fs-ext4-fix-deadlock-during-page-writeback.patch</Patch>
|
||||
<Patch level="1">patches/mageia/firewire-ieee1394-module-aliases.patch</Patch>
|
||||
<Patch level="1">patches/mageia/char-agp-intel-new-Q57-id.patch</Patch>
|
||||
<!--remove external mach64 support for buildfix-->
|
||||
@@ -97,14 +101,27 @@
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-add-new-8265.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-pcie-enable-interrupts-before-releasing-the-NICs-CPU.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-wireless-iwlwifi-pcie-fix-a-race-in-firmware-loading-flow.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-bcma-add-PCI-ID-for-Foxconn-s-BCM43142-device.patch</Patch>
|
||||
<Patch level="1">patches/mageia/net-brcmfmac-restore-stopping-netdev-queue-when-bus-clog.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-add-shuttle-wmi-driver.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-drop-devinit-exit.patch</Patch>
|
||||
<Patch level="1">patches/mageia/platform-x86-shuttle-wmi-4.2-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/hp-wmi-Fix-wifi-cannot-be-hard-unblocked.patch</Patch>
|
||||
<Patch level="1">patches/mageia/Bluetooth-Add-support-of-13d3-3490-AR3012-device.patch</Patch>
|
||||
<Patch level="1">patches/mageia/intel_th-Fix-a-deadlock-in-modprobing.patch</Patch>
|
||||
<Patch level="1">patches/mageia/intel_th-pci-Add-Kaby-Lake-PCH-H-support.patch</Patch>
|
||||
<Patch level="1">patches/mageia/pinctrl-cherryview-prevent-concurrent-access-to-GPIO.patch</Patch>
|
||||
<Patch level="1">patches/mageia/include-kbuild-export-pci_ids.patch</Patch>
|
||||
<Patch level="1">patches/mageia/hid-usbhid-IBM-BladeCenterHS20-quirk.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-storage-unusual_devs-add-id-2.6.37-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-dwc3-fix-for-the-isoc-transfer-EP_BUSY-flag.patch</Patch>
|
||||
<Patch level="1">patches/mageia/usb-renesas_usbhs-fix-NULL-pointer-dereference-in-xf.patch</Patch>
|
||||
<Patch level="1">patches/mageia/HID-uhid-fix-timeout-when-probe-races-with-IO.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-usb-pwc-lie-in-proc-usb-devices.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-media-usbtv-prevent-access-to-free-d-resources.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-vb2-core-Skip-planes-array-verification-if-pb-.patch</Patch>
|
||||
<Patch level="1">patches/mageia/media-videobuf2-v4l2-Verify-planes-array-in-buffer-d.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-3rdparty-1.0-tree.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-3rdparty-merge.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-acerhk-0.5.35.patch</Patch>
|
||||
@@ -133,6 +150,7 @@
|
||||
<Patch level="1">patches/mageia/3rd-rtl8723bs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/3rd-rtl8723bs-4.7-buildfix.patch</Patch>
|
||||
<Patch level="1">patches/mageia/ahci-add-new-Intel-device-IDs.patch</Patch>
|
||||
<Patch level="1">patches/mageia/megaraid_sas-Do-not-fire-MR_DCMD_PD_LIST_QUERY-to-co.patch</Patch>
|
||||
<Patch level="1">patches/mageia/arm-0001-ARM-bcm2835-dt-Add-the-ethernet-to-the-device-trees.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
@@ -189,6 +207,17 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="5">
|
||||
<Date>2016-08-06</Date>
|
||||
<Version>4.7.0</Version>
|
||||
<Comment>ne patches added.</Comment>
|
||||
<Type package="kernel">security</Type>
|
||||
<Requires>
|
||||
<Action package="kernel">systemRestart</Action>
|
||||
</Requires>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2016-07-25</Date>
|
||||
<Version>4.7.0</Version>
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
|
||||
3rdparty/mkbuild.pl | 92 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
Documentation/3rdparty.txt | 76 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 168 insertions(+)
|
||||
|
||||
diff -Nurp linux-2.6.37/3rdparty/mkbuild.pl linux-2.6.37.3rdparty/3rdparty/mkbuild.pl
|
||||
--- linux-2.6.37/3rdparty/mkbuild.pl 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/mkbuild.pl 2004-04-23 14:59:03.000000000 +0300
|
||||
@@ -0,0 +1,92 @@
|
||||
+#!/usr/bin/perl -w
|
||||
+#
|
||||
+# Version 1.0
|
||||
+#
|
||||
+# Copyright 2001 Jeff Garzik <jgarzik@mandrakesoft.com>
|
||||
+# Copyright 2002 Juan Quintela <quintela@mandrakesoft.com>
|
||||
+# Copyright 2003 Nicolas Planel <nplanel@mandrakesoft.com>
|
||||
+#
|
||||
+# This software may be used and distributed according to the terms
|
||||
+# of the GNU General Public License, incorporated herein by reference.
|
||||
+#
|
||||
+#
|
||||
+# Run "mkbuild.pl"
|
||||
+#
|
||||
+# This program generates the following files
|
||||
+# Makefile
|
||||
+# Makefile.drivers
|
||||
+# Config.in
|
||||
+# using the information in the subdirs of this directory.
|
||||
+#
|
||||
+# subdirs need to have:
|
||||
+# a Config.in file
|
||||
+# a Makefile with a O_TARGET/L_TARGET targets
|
||||
+# The config.in should set a CONFIG_<module_dir_name> to m/y.
|
||||
+
|
||||
+use strict;
|
||||
+
|
||||
+opendir(THISDIR, ".");
|
||||
+# get dirs without . and .. garbage
|
||||
+my (@modules) = grep(!/\.\.?$/,grep(-d, readdir(THISDIR)));
|
||||
+closedir(THISDIR);
|
||||
+
|
||||
+generate_kconfig(@modules);
|
||||
+generate_makefile(@modules);
|
||||
+exit(0);
|
||||
+
|
||||
+##########################################################################
|
||||
+
|
||||
+sub generate_makefile {
|
||||
+ my (@modules) = @_;
|
||||
+
|
||||
+ local *F;
|
||||
+ open F, "> Makefile" or die "Cannot create new Makefile: $!\n";
|
||||
+ print F <<'EOM';
|
||||
+#
|
||||
+# THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
|
||||
+#
|
||||
+
|
||||
+EOM
|
||||
+ printf F "obj- := 3rdparty.o # Dummy rule to force built-in.o to be made\n";
|
||||
+ printf F "obj-\$(%s) += %s\n", to_CONFIG($_), $_ . '/' foreach @modules;
|
||||
+}
|
||||
+
|
||||
+sub generate_kconfig {
|
||||
+ my (@modules) = @_;
|
||||
+
|
||||
+ local *F;
|
||||
+ open F, "> Kconfig" or die "Cannot create Kconfig: $!\n";
|
||||
+ print F <<"EOM";
|
||||
+#
|
||||
+# THIS IS AN AUTOMATICALLY GENERATED FILE. DO NOT EDIT.
|
||||
+#
|
||||
+
|
||||
+menu "Unofficial 3rd party kernel additions"
|
||||
+
|
||||
+EOM
|
||||
+
|
||||
+ foreach (@modules) {
|
||||
+ die "No Kconfig in $_.\n" if ! -r "$_/Kconfig";
|
||||
+ print F "source 3rdparty/$_/Kconfig\n";
|
||||
+ }
|
||||
+ print F "\n\nendmenu\n";
|
||||
+}
|
||||
+
|
||||
+sub to_CONFIG {
|
||||
+ local $_ = $_[0];
|
||||
+ tr/a-z/A-Z/;
|
||||
+ s/[\-\. ]/_/g;
|
||||
+ "CONFIG_$_";
|
||||
+}
|
||||
+
|
||||
+sub find_target {
|
||||
+ my ($module_dir) = @_;
|
||||
+
|
||||
+ local *F;
|
||||
+ open(F, "$module_dir/Makefile") or die "$module_dir/Makefile: $!\n";
|
||||
+ while (<F>) {
|
||||
+ chomp;
|
||||
+ return $1 if (/[LO]_TARGET.*:=\s+(\S+)/);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
diff -Nurp linux-2.6.37/Documentation/3rdparty.txt linux-2.6.37.3rdparty/Documentation/3rdparty.txt
|
||||
--- linux-2.6.37/Documentation/3rdparty.txt 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/Documentation/3rdparty.txt 2003-11-22 01:07:26.000000000 +0200
|
||||
@@ -0,0 +1,76 @@
|
||||
+
|
||||
+Third-Party Kernel Source Module Support, or
|
||||
+an easy way to add modules to your kernel build.
|
||||
+
|
||||
+
|
||||
+
|
||||
+Vendors quite often add additional drivers and features to the kernel
|
||||
+which require nothing more than modifying Kconfig, Makefile, and
|
||||
+adding one or more files to a sub-directory. As a single discrete task,
|
||||
+this is not a problem. However, using patches to add modules to the
|
||||
+kernel very often results in patch conflicts, resulting in needless time
|
||||
+wastage as developers regenerate an otherwise working kernel patch.
|
||||
+
|
||||
+This is designed as a solution to these problems. It is NOT designed as
|
||||
+a replacement for the kernel build system, but merely as a tool for
|
||||
+vendors and system administrators to ease the pain of patch management.
|
||||
+
|
||||
+The key feature of this system is the distinct lack of patches. Drivers
|
||||
+are installed via unpacking a tarball.
|
||||
+
|
||||
+
|
||||
+
|
||||
+Adding a directory to the build (usually from a tarball)
|
||||
+--------------------------------------------------------
|
||||
+If a directory exists inside the 3rdparty sub-directory that contains a
|
||||
+proper Makefile, it can be added to the build. It also needs a
|
||||
+Kconfig file.
|
||||
+
|
||||
+ cd /usr/src/linux-2.4.3/3rdparty
|
||||
+ bzcat /tmp/my-driver2.tar.bz2 | tar xf - # creates "my2" dir
|
||||
+
|
||||
+
|
||||
+Limitations
|
||||
+-----------
|
||||
+There are some limitations to this system. This system is only
|
||||
+designed to support a very common case. If you find yourself running
|
||||
+into limitations (kernel build experts can spot them right off),
|
||||
+then you should probably be patching the kernel instead of using
|
||||
+mkbuild.pl for that particular module.
|
||||
+
|
||||
+FIXME: actually list the limitations
|
||||
+
|
||||
+
|
||||
+
|
||||
+Other notes
|
||||
+-----------
|
||||
+Link order is controlled by the order of mkbuild.pl executions.
|
||||
+
|
||||
+"make mrproper" will erase Makefile.meta, and empty Kconfig, Makefile,
|
||||
+and Makefile.drivers.
|
||||
+
|
||||
+IMPORTANT NOTE: Because this feature modifies the kernel's makefiles and
|
||||
+configuration system, you MUST complete all mkbuild.pl runs before
|
||||
+running any "make" command.
|
||||
+
|
||||
+Building in the 3rdparty dir
|
||||
+----------------------------
|
||||
+
|
||||
+If you use modules that:
|
||||
+ - are contained in one subdir with the name of the module
|
||||
+ - has a Makefile
|
||||
+ - has a Kconfig file
|
||||
+
|
||||
+The system calls the ./mkbuild.pl script. It will search for
|
||||
+subdirectories, and will try to build each of them as a module.
|
||||
+Things to note:
|
||||
+
|
||||
+ The dependencies will be done in a module called:
|
||||
+
|
||||
+ 3rdparty/<module_dir_name>/<module_name>
|
||||
+
|
||||
+depending of CONFIG_<module_name_in_uppercase>.
|
||||
+
|
||||
+<module_name> is the value of O_TARGET/L_TARGET.
|
||||
+
|
||||
+
|
||||
@@ -0,0 +1,189 @@
|
||||
|
||||
Include 3rdparty directory into the main build-system.
|
||||
|
||||
Original author is unknown.
|
||||
(Was either Juan Quintela or Jeff Garzik)
|
||||
|
||||
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
Makefile | 2 +-
|
||||
arch/alpha/Kconfig | 1 +
|
||||
arch/ia64/Kconfig | 2 ++
|
||||
arch/mips/Kconfig | 2 ++
|
||||
arch/powerpc/Kconfig | 2 ++
|
||||
arch/sparc/Kconfig | 2 ++
|
||||
arch/x86/Kconfig | 2 ++
|
||||
scripts/kconfig/Makefile | 33 ++++++++++++++++++---------------
|
||||
8 files changed, 30 insertions(+), 16 deletions(-)
|
||||
|
||||
diff -Nurp linux-4.2.2/arch/alpha/Kconfig linux-4.2.2-3rd/arch/alpha/Kconfig
|
||||
--- linux-4.2.2/arch/alpha/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/alpha/Kconfig 2015-09-29 23:02:44.024347272 +0300
|
||||
@@ -750,3 +750,4 @@ source "crypto/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/arch/ia64/Kconfig linux-4.2.2-3rd/arch/ia64/Kconfig
|
||||
--- linux-4.2.2/arch/ia64/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/ia64/Kconfig 2015-09-29 23:02:44.024347272 +0300
|
||||
@@ -613,3 +613,5 @@ source "lib/Kconfig"
|
||||
|
||||
config IOMMU_HELPER
|
||||
def_bool (IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB || IA64_GENERIC || SWIOTLB)
|
||||
+
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/arch/mips/Kconfig linux-4.2.2-3rd/arch/mips/Kconfig
|
||||
--- linux-4.2.2/arch/mips/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/mips/Kconfig 2015-09-29 23:02:44.024347272 +0300
|
||||
@@ -2944,3 +2944,5 @@ source "crypto/Kconfig"
|
||||
source "lib/Kconfig"
|
||||
|
||||
source "arch/mips/kvm/Kconfig"
|
||||
+
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/arch/powerpc/Kconfig linux-4.2.2-3rd/arch/powerpc/Kconfig
|
||||
--- linux-4.2.2/arch/powerpc/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/powerpc/Kconfig 2015-09-29 23:02:44.025347276 +0300
|
||||
@@ -1112,3 +1112,5 @@ config PPC_LIB_RHEAP
|
||||
source "arch/powerpc/kvm/Kconfig"
|
||||
|
||||
source "kernel/livepatch/Kconfig"
|
||||
+
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/arch/sparc/Kconfig linux-4.2.2-3rd/arch/sparc/Kconfig
|
||||
--- linux-4.2.2/arch/sparc/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/sparc/Kconfig 2015-09-29 23:02:44.025347276 +0300
|
||||
@@ -569,3 +569,5 @@ source "security/Kconfig"
|
||||
source "crypto/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
+
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/arch/x86/Kconfig linux-4.2.2-3rd/arch/x86/Kconfig
|
||||
--- linux-4.2.2/arch/x86/Kconfig 2015-08-30 21:34:09.000000000 +0300
|
||||
+++ linux-4.2.2-3rd/arch/x86/Kconfig 2015-09-29 23:02:44.025347276 +0300
|
||||
@@ -2601,3 +2601,5 @@ source "crypto/Kconfig"
|
||||
source "arch/x86/kvm/Kconfig"
|
||||
|
||||
source "lib/Kconfig"
|
||||
+
|
||||
+source "3rdparty/Kconfig"
|
||||
diff -Nurp linux-4.2.2/Makefile linux-4.2.2-3rd/Makefile
|
||||
--- linux-4.2.2/Makefile 2015-09-29 22:13:44.743650710 +0300
|
||||
+++ linux-4.2.2-3rd/Makefile 2015-09-29 23:02:44.026347280 +0300
|
||||
@@ -546,7 +546,7 @@ scripts: scripts_basic include/config/au
|
||||
|
||||
# Objects we will link into vmlinux / subdirs we need to visit
|
||||
init-y := init/
|
||||
-drivers-y := drivers/ sound/ firmware/
|
||||
+drivers-y := drivers/ sound/ firmware/ 3rdparty/
|
||||
net-y := net/
|
||||
libs-y := lib/
|
||||
core-y := usr/
|
||||
diff -Nurp linux-4.6/scripts/kconfig/Makefile linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
--- linux-4.6/scripts/kconfig/Makefile
|
||||
+++ linux-4.6-3rd/scripts/kconfig/Makefile
|
||||
@@ -18,26 +18,26 @@ endif
|
||||
# We need this, in case the user has it in its environment
|
||||
unexport CONFIG_
|
||||
|
||||
-xconfig: $(obj)/qconf
|
||||
+xconfig: $(obj)/qconf 3rdparty/Makefile
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
-gconfig: $(obj)/gconf
|
||||
+gconfig: $(obj)/gconf 3rdparty/Makefile
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
-menuconfig: $(obj)/mconf
|
||||
+menuconfig: $(obj)/mconf 3rdparty/Makefile
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
-config: $(obj)/conf
|
||||
+config: $(obj)/conf 3rdparty/Makefile
|
||||
$< $(silent) --oldaskconfig $(Kconfig)
|
||||
|
||||
-nconfig: $(obj)/nconf
|
||||
+nconfig: $(obj)/nconf 3rdparty/Makefile
|
||||
$< $(silent) $(Kconfig)
|
||||
|
||||
-silentoldconfig: $(obj)/conf
|
||||
+silentoldconfig: $(obj)/conf 3rdparty/Makefile
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
-localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
|
||||
+localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf 3rdparty/Makefile
|
||||
$(Q)mkdir -p include/config include/generated
|
||||
$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
|
||||
$(Q)if [ -f .config ]; then \
|
||||
@@ -80,7 +80,7 @@ simple-targets := oldconfig allnoconfig
|
||||
alldefconfig randconfig listnewconfig olddefconfig
|
||||
PHONY += $(simple-targets)
|
||||
|
||||
-$(simple-targets): $(obj)/conf
|
||||
+$(simple-targets): $(obj)/conf 3rdparty/Makefile
|
||||
$< $(silent) --$@ $(Kconfig)
|
||||
|
||||
PHONY += oldnoconfig savedefconfig defconfig
|
||||
@@ -88,12 +88,12 @@ PHONY += oldnoconfig savedefconfig defco
|
||||
# oldnoconfig is an alias of olddefconfig, because people already are dependent
|
||||
# on its behavior (sets new symbols to their default value but not 'n') with the
|
||||
# counter-intuitive name.
|
||||
-oldnoconfig: olddefconfig
|
||||
+oldnoconfig: olddefconfig 3rdparty/Makefile
|
||||
|
||||
-savedefconfig: $(obj)/conf
|
||||
+savedefconfig: $(obj)/conf 3rdparty/Makefile
|
||||
$< $(silent) --$@=defconfig $(Kconfig)
|
||||
|
||||
-defconfig: $(obj)/conf
|
||||
+defconfig: $(obj)/conf 3rdparty/Makefile
|
||||
ifeq ($(KBUILD_DEFCONFIG),)
|
||||
$< $(silent) --defconfig $(Kconfig)
|
||||
else
|
||||
@@ -106,26 +106,26 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
-%_defconfig: $(obj)/conf
|
||||
+%_defconfig: $(obj)/conf 3rdparty/Makefile
|
||||
$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
|
||||
|
||||
configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
|
||||
|
||||
-%.config: $(obj)/conf
|
||||
+%.config: $(obj)/conf 3rdparty/Makefile
|
||||
$(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
|
||||
+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
|
||||
|
||||
PHONY += kvmconfig
|
||||
-kvmconfig: kvm_guest.config
|
||||
+kvmconfig: kvm_guest.config 3rdparty/Makefile
|
||||
@:
|
||||
|
||||
PHONY += xenconfig
|
||||
-xenconfig: xen.config
|
||||
+xenconfig: xen.config 3rdparty/Makefile
|
||||
@:
|
||||
|
||||
PHONY += tinyconfig
|
||||
-tinyconfig:
|
||||
+tinyconfig:
|
||||
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
|
||||
|
||||
# Help text used by make help
|
||||
@@ -188,6 +188,9 @@ gconf-objs := gconf.o zconf.tab.o
|
||||
|
||||
hostprogs-y := conf nconf mconf kxgettext qconf gconf
|
||||
|
||||
+3rdparty/Makefile:
|
||||
+ pushd $(srctree)/3rdparty ; $(PERL) ./mkbuild.pl ; popd
|
||||
+
|
||||
clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
|
||||
clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
|
||||
clean-files += config.pot linux.pot
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
--- linux-2.6.35/3rdparty/acerhk/acerhk.c.orig 2010-10-03 12:50:33.000000000 +0000
|
||||
+++ linux-2.6.35/3rdparty/acerhk/acerhk.c 2010-10-03 13:13:22.093868410 +0000
|
||||
@@ -2730,7 +2730,7 @@ static void acerhk_proc_cleanup(void)
|
||||
|
||||
/* {{{ file operations */
|
||||
|
||||
-static int acerhk_ioctl( struct inode *inode, struct file *file,
|
||||
+static long acerhk_ioctl( struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg )
|
||||
{
|
||||
int retval;
|
||||
@@ -2827,7 +2827,7 @@ static int acerhk_release( struct inode
|
||||
|
||||
static struct file_operations acerhk_fops = {
|
||||
owner: THIS_MODULE,
|
||||
- ioctl: acerhk_ioctl,
|
||||
+ unlocked_ioctl: acerhk_ioctl,
|
||||
open: acerhk_open,
|
||||
#ifdef ACERDEBUG
|
||||
write: acerhk_write,
|
||||
@@ -0,0 +1,33 @@
|
||||
CFLAGS use isn't allowed anymore with 2.6.24, we must use EXTRA_CFLAGS
|
||||
in its place
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
|
||||
|
||||
--- linux-2.6.23/3rdparty/acerhk/Makefile.orig 2007-11-08 21:32:43.000000000 -0200
|
||||
+++ linux-2.6.23/3rdparty/acerhk/Makefile 2007-11-08 21:33:28.000000000 -0200
|
||||
@@ -14,7 +14,7 @@
|
||||
CONFIG_ACERHK?=m
|
||||
obj-$(CONFIG_ACERHK) += acerhk.o
|
||||
|
||||
-CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
|
||||
+EXTRA_CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
|
||||
INCLUDE=-I$(KERNELSRC)/include
|
||||
|
||||
ifeq ($(KERNELMAJOR), 2.6)
|
||||
@@ -41,13 +41,13 @@ acerhk.ko: $(SOURCE) acerhk.h
|
||||
$(MAKE) -C $(KERNELSRC) SUBDIRS=$(PWD) modules
|
||||
|
||||
acerhk.o: $(SOURCE) acerhk.h
|
||||
- $(CC) $(INCLUDE) $(CFLAGS) -DMODVERSIONS -DMODULE -D__KERNEL__ -o $(TARGET) $(SOURCE)
|
||||
+ $(CC) $(INCLUDE) $(EXTRA_CFLAGS) -DMODVERSIONS -DMODULE -D__KERNEL__ -o $(TARGET) $(SOURCE)
|
||||
|
||||
asm: $(SOURCE)
|
||||
ifeq ($(KERNELMAJOR), 2.6)
|
||||
- $(CC) $(INCLUDE) $(INCLUDE)/asm-i386/mach-default $(CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
|
||||
+ $(CC) $(INCLUDE) $(INCLUDE)/asm-i386/mach-default $(EXTRA_CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
|
||||
else
|
||||
- $(CC) $(INCLUDE) $(CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
|
||||
+ $(CC) $(INCLUDE) $(EXTRA_CFLAGS) -fverbose-asm -S -DMODVERSIONS -DMODULE -D__KERNEL__ $(SOURCE)
|
||||
endif
|
||||
|
||||
clean:
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
Fix acerhk build with FUNCTION_TRACER enabled.
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
---
|
||||
3rdparty/acerhk/Makefile | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff -p -up linux-2.6.31/3rdparty/acerhk/Makefile.orig linux-2.6.31/3rdparty/acerhk/Makefile
|
||||
--- linux-2.6.31/3rdparty/acerhk/Makefile.orig 2009-10-02 16:39:06.000000000 -0300
|
||||
+++ linux-2.6.31/3rdparty/acerhk/Makefile 2009-10-02 16:45:13.000000000 -0300
|
||||
@@ -14,7 +14,10 @@
|
||||
CONFIG_ACERHK?=m
|
||||
obj-$(CONFIG_ACERHK) += acerhk.o
|
||||
|
||||
-EXTRA_CFLAGS+=-c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
|
||||
+CFLAGS_acerhk.o += -c -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
|
||||
+ifdef CONFIG_FUNCTION_TRACER
|
||||
+CFLAGS_REMOVE_acerhk.o = -pg
|
||||
+endif
|
||||
INCLUDE=-I$(KERNELSRC)/include
|
||||
|
||||
ifeq ($(KERNELMAJOR), 2.6)
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
AUTOCONF_INCLUDED is not defined anymore in 2.6.38, so old include got exposed.
|
||||
|
||||
Fix by removing the offending bits.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/acerhk/acerhk.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
--- linux-2.6.38/3rdparty/acerhk/acerhk.c.orig 2011-03-20 13:57:32.000000000 +0200
|
||||
+++ linux-2.6.38/3rdparty/acerhk/acerhk.c 2011-03-20 15:00:45.768659568 +0200
|
||||
@@ -35,10 +35,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#ifndef AUTOCONF_INCLUDED
|
||||
-#include <linux/config.h>
|
||||
-#endif
|
||||
-
|
||||
/* This driver is heavily dependent on the architecture, don't let
|
||||
* anyone without an X86 machine use it. On laptops with AMD64
|
||||
* architecture this driver is only useable in 32 bit mode.
|
||||
@@ -0,0 +1,37 @@
|
||||
Fix Makefile and add Kconfig for the acerhk driver
|
||||
---
|
||||
3rdparty/acerhk/Kconfig | 8 8 + 0 - 0 !
|
||||
3rdparty/acerhk/Makefile | 6 3 + 3 - 0 !
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: linux-2.6.21/3rdparty/acerhk/Makefile
|
||||
===================================================================
|
||||
--- linux-2.6.21.orig/3rdparty/acerhk/Makefile 2007-05-15 15:34:48.000000000 +0200
|
||||
+++ linux-2.6.21/3rdparty/acerhk/Makefile 2007-05-15 15:37:17.000000000 +0200
|
||||
@@ -1,10 +1,10 @@
|
||||
# change KERNELSRC to the location of your kernel build tree only if
|
||||
# autodetection does not work
|
||||
#KERNELSRC=/usr/src/linux
|
||||
-KERNELSRC?=/lib/modules/`uname -r`/build
|
||||
+#KERNELSRC?=/lib/modules/`uname -r`/build
|
||||
# Starting with 2.6.18, the kernel version is in utsrelease.h instead of version.h, accomodate both cases
|
||||
-KERNELVERSION=$(shell awk -F\" '/REL/ {print $$2}' $(shell grep -s -l REL $(KERNELSRC)/include/linux/version.h $(KERNELSRC)/include/linux/utsrelease.h))
|
||||
-KERNELMAJOR=$(shell echo $(KERNELVERSION)|head -c3)
|
||||
+#KERNELVERSION=$(shell awk -F\" '/REL/ {print $$2}' $(shell grep -s -l REL $(KERNELSRC)/include/linux/version.h $(KERNELSRC)/include/linux/utsrelease.h))
|
||||
+#KERNELMAJOR=$(shell echo $(KERNELVERSION)|head -c3)
|
||||
|
||||
# next line is for kernel 2.6, if you integrate the driver in the kernel tree
|
||||
# /usr/src/linux/drivers/acerhk - or something similar
|
||||
Index: linux-2.6.21/3rdparty/acerhk/Kconfig
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux-2.6.21/3rdparty/acerhk/Kconfig 2007-05-15 15:39:30.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+config ACERHK
|
||||
+ tristate "Acerhk driver"
|
||||
+ depends on EXPERIMENTAL && X86
|
||||
+ ---help---
|
||||
+ This is an experimental acer keyboard driver for
|
||||
+ acer laptops. If you have a notebook with a ipw2X00
|
||||
+ wireless card, it allows you to turn off the rf_kill
|
||||
+
|
||||
@@ -0,0 +1,67 @@
|
||||
Updated for owner removal from struct proc_dir_entry (2.6.30)
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
|
||||
---
|
||||
3rdparty/acerhk/acerhk.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff -p -up linux-2.6.29/3rdparty/acerhk/acerhk.c.orig linux-2.6.29/3rdparty/acerhk/acerhk.c
|
||||
--- linux-2.6.29/3rdparty/acerhk/acerhk.c.orig 2009-05-22 02:42:44.000000000 -0300
|
||||
+++ linux-2.6.29/3rdparty/acerhk/acerhk.c 2009-05-22 02:43:45.000000000 -0300
|
||||
@@ -2626,7 +2626,6 @@ static int acerhk_proc_init(void)
|
||||
printk(KERN_INFO"acerhk: could not create /proc/driver/acerhk\n");
|
||||
}
|
||||
else {
|
||||
- proc_acer_dir->owner = THIS_MODULE;
|
||||
/* now create several files, first general info ... */
|
||||
entry = create_proc_read_entry("info",
|
||||
0444, proc_acer_dir, acerhk_proc_info, NULL);
|
||||
@@ -2635,7 +2634,6 @@ static int acerhk_proc_init(void)
|
||||
remove_proc_entry("driver/acerhk", NULL);
|
||||
retval = 0;
|
||||
} else {
|
||||
- entry->owner = THIS_MODULE;
|
||||
/* ... last pressed key ... */
|
||||
entry = create_proc_read_entry("key",
|
||||
0444, proc_acer_dir, acerhk_proc_key, NULL);
|
||||
@@ -2645,7 +2643,6 @@ static int acerhk_proc_init(void)
|
||||
remove_proc_entry("driver/acerhk", NULL);
|
||||
retval = 0;
|
||||
} else {
|
||||
- entry->owner = THIS_MODULE;
|
||||
/* ... and led control file */
|
||||
entry = create_proc_entry("led", 0222, proc_acer_dir);
|
||||
if (entry == NULL) {
|
||||
@@ -2657,7 +2654,6 @@ static int acerhk_proc_init(void)
|
||||
}
|
||||
else {
|
||||
entry->write_proc = acerhk_proc_led;
|
||||
- entry->owner = THIS_MODULE;
|
||||
/* ... and wireless led controll file */
|
||||
entry = create_proc_entry("wirelessled", 0222, proc_acer_dir);
|
||||
if (entry == NULL) {
|
||||
@@ -2670,7 +2666,6 @@ static int acerhk_proc_init(void)
|
||||
}
|
||||
else {
|
||||
entry->write_proc = acerhk_proc_wirelessled;
|
||||
- entry->owner = THIS_MODULE;
|
||||
/* ... and bluetooth led controll file */
|
||||
entry = create_proc_entry("blueled", 0222, proc_acer_dir);
|
||||
if (entry == NULL) {
|
||||
@@ -2683,7 +2678,6 @@ static int acerhk_proc_init(void)
|
||||
retval = 0;
|
||||
} else {
|
||||
entry->write_proc = acerhk_proc_blueled;
|
||||
- entry->owner = THIS_MODULE;
|
||||
retval = 1;
|
||||
#ifdef ACERDEBUG
|
||||
/* add extra file for debugging purposes */
|
||||
@@ -2700,7 +2694,6 @@ static int acerhk_proc_init(void)
|
||||
}
|
||||
else {
|
||||
entry->write_proc = acerhk_proc_debug;
|
||||
- entry->owner = THIS_MODULE;
|
||||
retval = 1;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,47 @@
|
||||
Fix Makefile and add Kconfig for the aes2501 driver.
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
|
||||
|
||||
---
|
||||
linux-2.6.23/3rdparty/aes2501/Kconfig | 10 ++++++++++
|
||||
linux-2.6.23/3rdparty/aes2501/Makefile | 19 +------------------
|
||||
2 files changed, 11 insertions(+), 18 deletions(-)
|
||||
|
||||
diff -p -up linux-2.6.23/3rdparty/aes2501/Kconfig.orig linux-2.6.23/3rdparty/aes2501/Kconfig
|
||||
--- linux-2.6.23/3rdparty/aes2501/Kconfig.orig 2008-01-13 23:14:47.000000000 -0200
|
||||
+++ linux-2.6.23/3rdparty/aes2501/Kconfig 2008-01-13 23:35:21.000000000 -0200
|
||||
@@ -0,0 +1,10 @@
|
||||
+config AES2501
|
||||
+ tristate "AuthenTec AES2501 Fingerprint Sensor Driver"
|
||||
+ depends on USB
|
||||
+ default m
|
||||
+ ---help---
|
||||
+ Say Y here if you have a AuthenTec AES2501 Fingerprint
|
||||
+ Sensor device.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called aes2501.
|
||||
diff -p -up linux-2.6.23/3rdparty/aes2501/Makefile.orig linux-2.6.23/3rdparty/aes2501/Makefile
|
||||
--- linux-2.6.23/3rdparty/aes2501/Makefile.orig 2008-01-13 23:14:36.000000000 -0200
|
||||
+++ linux-2.6.23/3rdparty/aes2501/Makefile 2008-01-13 23:21:33.000000000 -0200
|
||||
@@ -1,19 +1,2 @@
|
||||
-
|
||||
-obj-m := aes2501.o
|
||||
-
|
||||
-KERNELDIR ?= /lib/modules/$(shell uname -r)/build
|
||||
-
|
||||
-PWD := $(shell pwd)
|
||||
-
|
||||
-all: usertest
|
||||
- $(MAKE) -C $(KERNELDIR) M=$(PWD)
|
||||
-
|
||||
-usertest:
|
||||
- gcc -I. -o usertest usertest.c
|
||||
-
|
||||
-clean:
|
||||
- rm -f *.o *~ aes2501.ko aes2501.mod.c Module.symvers usertest
|
||||
- rm -rf .tmp_versions
|
||||
- rm -f .*.cmd
|
||||
-
|
||||
+obj-$(CONFIG_AES2501) := aes2501.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
Prevent oops on module removal when we don't have the device available.
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
|
||||
|
||||
---
|
||||
linux-2.6.23/3rdparty/aes2501/aes2501.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff -p -up linux-2.6.23/3rdparty/aes2501/aes2501.c.orig linux-2.6.23/3rdparty/aes2501/aes2501.c
|
||||
--- linux-2.6.23/3rdparty/aes2501/aes2501.c.orig 2008-01-13 23:37:38.000000000 -0200
|
||||
+++ linux-2.6.23/3rdparty/aes2501/aes2501.c 2008-01-13 23:38:26.000000000 -0200
|
||||
@@ -1616,7 +1616,8 @@ static int __init aes2501_init(void)
|
||||
|
||||
static void __exit aes2501_exit(void)
|
||||
{
|
||||
- _dev->stop_scan = 1;
|
||||
+ if (_dev)
|
||||
+ _dev->stop_scan = 1;
|
||||
destroy_workqueue(comm_queue);
|
||||
usb_deregister(&aes2501_driver);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
|
||||
Add supprto for 4.7 series kernels.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
diff -urp linux/3rdparty/ndiswrapper.orig/wrapndis.c linux/3rdparty/ndiswrapper/wrapndis.c
|
||||
--- linux/3rdparty/ndiswrapper.orig/wrapndis.c 2016-07-04 20:00:13.000000000 +0300
|
||||
+++ linux/3rdparty/ndiswrapper/wrapndis.c 2016-07-04 20:23:29.454819702 +0300
|
||||
@@ -704,7 +704,11 @@ static void tx_worker(struct work_struct
|
||||
n = wnd->max_tx_packets;
|
||||
n = mp_tx_packets(wnd, wnd->tx_ring_start, n);
|
||||
if (n) {
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 7, 0)
|
||||
wnd->net_dev->trans_start = jiffies;
|
||||
+#else
|
||||
+ netif_trans_update(wnd->net_dev);
|
||||
+#endif
|
||||
wnd->tx_ring_start =
|
||||
(wnd->tx_ring_start + n) % TX_RING_SIZE;
|
||||
wnd->is_tx_ring_full = 0;
|
||||
@@ -0,0 +1,7 @@
|
||||
--- linux-2.6.24.orig/3rdparty/ndiswrapper/Kconfig 1969-12-31 21:00:00.000000000 -0300
|
||||
+++ linux-2.6.24/3rdparty/ndiswrapper/Kconfig 2007-11-26 15:11:31.000000000 -0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+
|
||||
+config NDISWRAPPER
|
||||
+ tristate "NDIS driver wrapper support"
|
||||
+ depends on PCI && USB && !X86_64_XEN
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
--- linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile.orig 2013-11-28 21:42:10.000000000 +0200
|
||||
+++ linux-3.12.2-ndiswrapper-1.59/3rdparty/ndiswrapper/Makefile 2013-11-30 21:41:19.550504380 +0200
|
||||
@@ -9,24 +9,10 @@ DISTFILES = \
|
||||
winnt_types.h workqueue.c wrapmem.c wrapmem.h wrapndis.c wrapndis.h \
|
||||
wrapper.c wrapper.h
|
||||
|
||||
-# By default, we try to compile the modules for the currently running
|
||||
-# kernel. But it's the first approximation, as we will re-read the
|
||||
-# version from the kernel sources.
|
||||
-KVERS_UNAME ?= $(shell uname -r)
|
||||
-
|
||||
# KBUILD is the path to the Linux kernel build tree. It is usually the
|
||||
# same as the kernel source tree, except when the kernel was compiled in
|
||||
# a separate directory.
|
||||
-KBUILD ?= $(shell readlink -f /lib/modules/$(KVERS_UNAME)/build)
|
||||
-
|
||||
-ifeq (,$(KBUILD))
|
||||
-$(error Kernel build tree not found - please set KBUILD to configured kernel)
|
||||
-endif
|
||||
-
|
||||
-KCONFIG := $(KBUILD)/.config
|
||||
-ifeq (,$(wildcard $(KCONFIG)))
|
||||
-$(error No .config found in $(KBUILD), please set KBUILD to configured kernel)
|
||||
-endif
|
||||
+KBUILD ?= $(srctree)
|
||||
|
||||
ifneq (,$(wildcard $(KBUILD)/include/linux/version.h))
|
||||
ifneq (,$(wildcard $(KBUILD)/include/generated/uapi/linux/version.h))
|
||||
@@ -43,16 +29,9 @@ endif
|
||||
ifeq (,$(wildcard $(VERSION_H)))
|
||||
VERSION_H := $(KBUILD)/include/linux/version.h
|
||||
endif
|
||||
-ifeq (,$(wildcard $(VERSION_H)))
|
||||
-$(error Please run 'make modules_prepare' in $(KBUILD))
|
||||
-endif
|
||||
|
||||
KVERS := $(shell sed -ne 's/"//g;s/^\#define UTS_RELEASE //p' $(VERSION_H))
|
||||
|
||||
-ifeq (,$(KVERS))
|
||||
-$(error Cannot find UTS_RELEASE in $(VERSION_H), please report)
|
||||
-endif
|
||||
-
|
||||
INST_DIR = /lib/modules/$(KVERS)/misc
|
||||
|
||||
SRC_DIR=$(shell pwd)
|
||||
@@ -0,0 +1,978 @@
|
||||
3rdparty/rfswitch/FILES | 6
|
||||
3rdparty/rfswitch/ISSUES | 28 +++
|
||||
3rdparty/rfswitch/Kconfig | 22 ++
|
||||
3rdparty/rfswitch/LICENSE | 339 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
3rdparty/rfswitch/Makefile | 119 +++++++++++++++
|
||||
3rdparty/rfswitch/README | 44 +++++
|
||||
3rdparty/rfswitch/av5100.c | 174 +++++++++++++++++++++++
|
||||
3rdparty/rfswitch/pbe5.c | 205 +++++++++++++++++++++++++++
|
||||
8 files changed, 937 insertions(+)
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/av5100.c linux-2.6.37.3rdparty/3rdparty/rfswitch/av5100.c
|
||||
--- linux-2.6.37/3rdparty/rfswitch/av5100.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/av5100.c 2008-03-28 05:25:28.000000000 +0200
|
||||
@@ -0,0 +1,174 @@
|
||||
+/*******************************************************************************
|
||||
+
|
||||
+ Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved.
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify it
|
||||
+ under the terms of version 2 of the GNU General Public License as
|
||||
+ published by the Free Software Foundation.
|
||||
+
|
||||
+ This program 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.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along with
|
||||
+ this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
+ Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+ The full GNU General Public License is included in this distribution in the
|
||||
+ file called LICENSE.
|
||||
+
|
||||
+ Contact Information:
|
||||
+ James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
||||
+ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
+
|
||||
+*******************************************************************************/
|
||||
+#include <linux/compiler.h>
|
||||
+#include <linux/errno.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/netdevice.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/proc_fs.h>
|
||||
+#include <linux/ioport.h>
|
||||
+#include <asm/uaccess.h>
|
||||
+#include <asm/io.h>
|
||||
+
|
||||
+
|
||||
+#define DRV_NAME "av5100"
|
||||
+#define DRV_VERSION "1.3"
|
||||
+#define DRV_DESCRIPTION "SW RF kill switch for Averatec 5100P"
|
||||
+#define DRV_COPYRIGHT "Copyright(c) 2003-2004 Intel Corporation"
|
||||
+
|
||||
+static int radio = 1;
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+
|
||||
+MODULE_PARM(radio, "i");
|
||||
+
|
||||
+#else /* LINUX_VERSION_CODE < 2.6.0 */
|
||||
+
|
||||
+#include <linux/moduleparam.h>
|
||||
+module_param(radio, int, 1);
|
||||
+
|
||||
+#endif /* LINUX_VERSION_CODE < 2.6.0 */
|
||||
+
|
||||
+MODULE_PARM_DESC(radio, "controls state of radio (1=on, 0=off)");
|
||||
+
|
||||
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
|
||||
+MODULE_AUTHOR(DRV_COPYRIGHT);
|
||||
+MODULE_LICENSE("GPL");
|
||||
+
|
||||
+#define AV5100_RADIO_ON (0xe0)
|
||||
+#define AV5100_RADIO_OFF (0xe1)
|
||||
+
|
||||
+static int av5100_radio = AV5100_RADIO_OFF;
|
||||
+
|
||||
+static void av5100_set_radio(int state)
|
||||
+{
|
||||
+ printk(KERN_INFO DRV_NAME ": Radio being turned %s\n",
|
||||
+ (state == AV5100_RADIO_ON) ? "ON" : "OFF");
|
||||
+ outl(0x80020800, 0xcf8);
|
||||
+ outb(0x6f, 0x0072);
|
||||
+ outl(0x1800ffff, 0x1184);
|
||||
+ outb(state, 0x00b2);
|
||||
+ av5100_radio = state;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * proc stuff
|
||||
+ */
|
||||
+static struct proc_dir_entry *dir_base = NULL;
|
||||
+
|
||||
+static int proc_set_radio(struct file *file, const char *buffer,
|
||||
+ unsigned long count, void *data)
|
||||
+{
|
||||
+ av5100_set_radio(buffer[0] == '0' ? AV5100_RADIO_OFF : AV5100_RADIO_ON);
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static int proc_get_radio(char *page, char **start, off_t offset,
|
||||
+ int count, int *eof, void *data)
|
||||
+{
|
||||
+ int len = 0;
|
||||
+
|
||||
+ len += snprintf(page, count, DRV_NAME ": %d\n",
|
||||
+ av5100_radio == AV5100_RADIO_OFF ? 0 : 1);
|
||||
+
|
||||
+ *eof = 1;
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void av5100_proc_cleanup(void)
|
||||
+{
|
||||
+ if (dir_base) {
|
||||
+ remove_proc_entry("radio", dir_base);
|
||||
+ remove_proc_entry(DRV_NAME, &proc_root);
|
||||
+ dir_base = NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int av5100_proc_init(void)
|
||||
+{
|
||||
+ struct proc_dir_entry *ent;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
|
||||
+ if (dir_base == NULL) {
|
||||
+ printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
|
||||
+ DRV_NAME "\n");
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ ent = create_proc_entry("radio", S_IFREG | S_IRUGO | S_IWUSR,
|
||||
+ dir_base);
|
||||
+ if (ent) {
|
||||
+ ent->read_proc = proc_get_radio;
|
||||
+ ent->write_proc = proc_set_radio;
|
||||
+ } else {
|
||||
+ printk(KERN_ERR
|
||||
+ "Unable to initialize /proc/" DRV_NAME "/radio\n");
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+ fail:
|
||||
+ av5100_proc_cleanup();
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * module stuff
|
||||
+ */
|
||||
+static int __init av5100_init(void)
|
||||
+{
|
||||
+ av5100_proc_init();
|
||||
+
|
||||
+ av5100_set_radio((radio == 1) ? AV5100_RADIO_ON : AV5100_RADIO_OFF);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit av5100_exit(void)
|
||||
+{
|
||||
+ av5100_set_radio(AV5100_RADIO_OFF);
|
||||
+
|
||||
+ av5100_proc_cleanup();
|
||||
+}
|
||||
+
|
||||
+module_init(av5100_init);
|
||||
+module_exit(av5100_exit);
|
||||
+
|
||||
+/*
|
||||
+ 1 2 3 4 5 6 7
|
||||
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
+*/
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/FILES linux-2.6.37.3rdparty/3rdparty/rfswitch/FILES
|
||||
--- linux-2.6.37/3rdparty/rfswitch/FILES 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/FILES 2004-07-09 07:44:19.000000000 +0300
|
||||
@@ -0,0 +1,6 @@
|
||||
+Makefile Used for building on 2.4, 2.6, internally and exteranlly
|
||||
+
|
||||
+FILES This file
|
||||
+
|
||||
+av5100.c Averatec 5100P SW Switch Module
|
||||
+pbe5.c Packard Bell Easynote SW Switch Module
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/ISSUES linux-2.6.37.3rdparty/3rdparty/rfswitch/ISSUES
|
||||
--- linux-2.6.37/3rdparty/rfswitch/ISSUES 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/ISSUES 2004-07-09 07:43:22.000000000 +0300
|
||||
@@ -0,0 +1,28 @@
|
||||
+
|
||||
+ISSUES
|
||||
+------------ ----- ----- ---- --- -- -
|
||||
+
|
||||
+No packets! - RF kill switch
|
||||
+
|
||||
+If the module loads, but no packets are transferred you may have a SW based
|
||||
+radio kill switch. All laptops have some capability to disable the radio
|
||||
+via a button or switch. On some laptops that switch is physically tied to the
|
||||
+IPW2100; simply toggling the switch should enable the radio.
|
||||
+
|
||||
+On other laptops, the switch is a button that when pressed requires some
|
||||
+software driver to send some hardware command to some other piece of hardware
|
||||
+on the laptop, that then controls the radio. The driver currently has support
|
||||
+for the Averatec 5100P laptop's SW switch. Support will be added for other
|
||||
+laptop vendors as we become aware of them and figure out how to enable the
|
||||
+radio.
|
||||
+
|
||||
+To know if the radio is being disabled via the RF switch, perform the following:
|
||||
+
|
||||
+% cat /proc/net/ipw2100/eth1/state
|
||||
+Radio is disabled by RF switch
|
||||
+
|
||||
+If it says that, then your RF switch is currently disabling the radio. The
|
||||
+driver doesn't currently support switching back to the on state if you have a
|
||||
+physical RF switch (the radio may turn on and packets will work, but the proc
|
||||
+entry won't be updated)
|
||||
+
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/Kconfig linux-2.6.37.3rdparty/3rdparty/rfswitch/Kconfig
|
||||
--- linux-2.6.37/3rdparty/rfswitch/Kconfig 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/Kconfig 2008-05-27 23:39:10.000000000 +0300
|
||||
@@ -0,0 +1,22 @@
|
||||
+menu "RF Switch"
|
||||
+ depends on EXPERIMENTAL
|
||||
+
|
||||
+config RFSWITCH
|
||||
+ tristate "RF Switch"
|
||||
+ depends on EXPERIMENTAL
|
||||
+
|
||||
+config AVERATEC_5100P
|
||||
+ tristate "averatec 5100P driver"
|
||||
+ depends on RFSWITCH
|
||||
+ ---help---
|
||||
+ This is an experimental driver for the wireless switch
|
||||
+ of some laptops (usefull with some ipw2x00 cards)
|
||||
+
|
||||
+config PACKARDBELL_E5
|
||||
+ tristate "pbe5 driver"
|
||||
+ depends on RFSWITCH
|
||||
+ ---help---
|
||||
+ This is an experimental driver for the wireless switch
|
||||
+ of some laptops (usefull with some ipw2x00 cards)
|
||||
+
|
||||
+endmenu
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/LICENSE linux-2.6.37.3rdparty/3rdparty/rfswitch/LICENSE
|
||||
--- linux-2.6.37/3rdparty/rfswitch/LICENSE 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/LICENSE 2004-07-09 07:43:22.000000000 +0300
|
||||
@@ -0,0 +1,339 @@
|
||||
+
|
||||
+"This software program is licensed subject to the GNU General Public License
|
||||
+(GPL). Version 2, June 1991, available at
|
||||
+<http://www.fsf.org/copyleft/gpl.html>"
|
||||
+
|
||||
+GNU General Public License
|
||||
+
|
||||
+Version 2, June 1991
|
||||
+
|
||||
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
+
|
||||
+Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
+document, but changing it is not allowed.
|
||||
+
|
||||
+Preamble
|
||||
+
|
||||
+The licenses for most software are designed to take away your freedom to
|
||||
+share and change it. By contrast, the GNU General Public License is intended
|
||||
+to guarantee your freedom to share and change free software--to make sure
|
||||
+the software is free for all its users. This General Public License applies
|
||||
+to most of the Free Software Foundation's software and to any other program
|
||||
+whose authors commit to using it. (Some other Free Software Foundation
|
||||
+software is covered by the GNU Library General Public License instead.) You
|
||||
+can apply it to your programs, too.
|
||||
+
|
||||
+When we speak of free software, we are referring to freedom, not price. Our
|
||||
+General Public Licenses are designed to make sure that you have the freedom
|
||||
+to distribute copies of free software (and charge for this service if you
|
||||
+wish), that you receive source code or can get it if you want it, that you
|
||||
+can change the software or use pieces of it in new free programs; and that
|
||||
+you know you can do these things.
|
||||
+
|
||||
+To protect your rights, we need to make restrictions that forbid anyone to
|
||||
+deny you these rights or to ask you to surrender the rights. These
|
||||
+restrictions translate to certain responsibilities for you if you distribute
|
||||
+copies of the software, or if you modify it.
|
||||
+
|
||||
+For example, if you distribute copies of such a program, whether gratis or
|
||||
+for a fee, you must give the recipients all the rights that you have. You
|
||||
+must make sure that they, too, receive or can get the source code. And you
|
||||
+must show them these terms so they know their rights.
|
||||
+
|
||||
+We protect your rights with two steps: (1) copyright the software, and (2)
|
||||
+offer you this license which gives you legal permission to copy, distribute
|
||||
+and/or modify the software.
|
||||
+
|
||||
+Also, for each author's protection and ours, we want to make certain that
|
||||
+everyone understands that there is no warranty for this free software. If
|
||||
+the software is modified by someone else and passed on, we want its
|
||||
+recipients to know that what they have is not the original, so that any
|
||||
+problems introduced by others will not reflect on the original authors'
|
||||
+reputations.
|
||||
+
|
||||
+Finally, any free program is threatened constantly by software patents. We
|
||||
+wish to avoid the danger that redistributors of a free program will
|
||||
+individually obtain patent licenses, in effect making the program
|
||||
+proprietary. To prevent this, we have made it clear that any patent must be
|
||||
+licensed for everyone's free use or not licensed at all.
|
||||
+
|
||||
+The precise terms and conditions for copying, distribution and modification
|
||||
+follow.
|
||||
+
|
||||
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
+
|
||||
+0. This License applies to any program or other work which contains a notice
|
||||
+ placed by the copyright holder saying it may be distributed under the
|
||||
+ terms of this General Public License. The "Program", below, refers to any
|
||||
+ such program or work, and a "work based on the Program" means either the
|
||||
+ Program or any derivative work under copyright law: that is to say, a
|
||||
+ work containing the Program or a portion of it, either verbatim or with
|
||||
+ modifications and/or translated into another language. (Hereinafter,
|
||||
+ translation is included without limitation in the term "modification".)
|
||||
+ Each licensee is addressed as "you".
|
||||
+
|
||||
+ Activities other than copying, distribution and modification are not
|
||||
+ covered by this License; they are outside its scope. The act of running
|
||||
+ the Program is not restricted, and the output from the Program is covered
|
||||
+ only if its contents constitute a work based on the Program (independent
|
||||
+ of having been made by running the Program). Whether that is true depends
|
||||
+ on what the Program does.
|
||||
+
|
||||
+1. You may copy and distribute verbatim copies of the Program's source code
|
||||
+ as you receive it, in any medium, provided that you conspicuously and
|
||||
+ appropriately publish on each copy an appropriate copyright notice and
|
||||
+ disclaimer of warranty; keep intact all the notices that refer to this
|
||||
+ License and to the absence of any warranty; and give any other recipients
|
||||
+ of the Program a copy of this License along with the Program.
|
||||
+
|
||||
+ You may charge a fee for the physical act of transferring a copy, and you
|
||||
+ may at your option offer warranty protection in exchange for a fee.
|
||||
+
|
||||
+2. You may modify your copy or copies of the Program or any portion of it,
|
||||
+ thus forming a work based on the Program, and copy and distribute such
|
||||
+ modifications or work under the terms of Section 1 above, provided that
|
||||
+ you also meet all of these conditions:
|
||||
+
|
||||
+ * a) You must cause the modified files to carry prominent notices stating
|
||||
+ that you changed the files and the date of any change.
|
||||
+
|
||||
+ * b) You must cause any work that you distribute or publish, that in
|
||||
+ whole or in part contains or is derived from the Program or any part
|
||||
+ thereof, to be licensed as a whole at no charge to all third parties
|
||||
+ under the terms of this License.
|
||||
+
|
||||
+ * c) If the modified program normally reads commands interactively when
|
||||
+ run, you must cause it, when started running for such interactive
|
||||
+ use in the most ordinary way, to print or display an announcement
|
||||
+ including an appropriate copyright notice and a notice that there is
|
||||
+ no warranty (or else, saying that you provide a warranty) and that
|
||||
+ users may redistribute the program under these conditions, and
|
||||
+ telling the user how to view a copy of this License. (Exception: if
|
||||
+ the Program itself is interactive but does not normally print such
|
||||
+ an announcement, your work based on the Program is not required to
|
||||
+ print an announcement.)
|
||||
+
|
||||
+ These requirements apply to the modified work as a whole. If identifiable
|
||||
+ sections of that work are not derived from the Program, and can be
|
||||
+ reasonably considered independent and separate works in themselves, then
|
||||
+ this License, and its terms, do not apply to those sections when you
|
||||
+ distribute them as separate works. But when you distribute the same
|
||||
+ sections as part of a whole which is a work based on the Program, the
|
||||
+ distribution of the whole must be on the terms of this License, whose
|
||||
+ permissions for other licensees extend to the entire whole, and thus to
|
||||
+ each and every part regardless of who wrote it.
|
||||
+
|
||||
+ Thus, it is not the intent of this section to claim rights or contest
|
||||
+ your rights to work written entirely by you; rather, the intent is to
|
||||
+ exercise the right to control the distribution of derivative or
|
||||
+ collective works based on the Program.
|
||||
+
|
||||
+ In addition, mere aggregation of another work not based on the Program
|
||||
+ with the Program (or with a work based on the Program) on a volume of a
|
||||
+ storage or distribution medium does not bring the other work under the
|
||||
+ scope of this License.
|
||||
+
|
||||
+3. You may copy and distribute the Program (or a work based on it, under
|
||||
+ Section 2) in object code or executable form under the terms of Sections
|
||||
+ 1 and 2 above provided that you also do one of the following:
|
||||
+
|
||||
+ * a) Accompany it with the complete corresponding machine-readable source
|
||||
+ code, which must be distributed under the terms of Sections 1 and 2
|
||||
+ above on a medium customarily used for software interchange; or,
|
||||
+
|
||||
+ * b) Accompany it with a written offer, valid for at least three years,
|
||||
+ to give any third party, for a charge no more than your cost of
|
||||
+ physically performing source distribution, a complete machine-
|
||||
+ readable copy of the corresponding source code, to be distributed
|
||||
+ under the terms of Sections 1 and 2 above on a medium customarily
|
||||
+ used for software interchange; or,
|
||||
+
|
||||
+ * c) Accompany it with the information you received as to the offer to
|
||||
+ distribute corresponding source code. (This alternative is allowed
|
||||
+ only for noncommercial distribution and only if you received the
|
||||
+ program in object code or executable form with such an offer, in
|
||||
+ accord with Subsection b above.)
|
||||
+
|
||||
+ The source code for a work means the preferred form of the work for
|
||||
+ making modifications to it. For an executable work, complete source code
|
||||
+ means all the source code for all modules it contains, plus any
|
||||
+ associated interface definition files, plus the scripts used to control
|
||||
+ compilation and installation of the executable. However, as a special
|
||||
+ exception, the source code distributed need not include anything that is
|
||||
+ normally distributed (in either source or binary form) with the major
|
||||
+ components (compiler, kernel, and so on) of the operating system on which
|
||||
+ the executable runs, unless that component itself accompanies the
|
||||
+ executable.
|
||||
+
|
||||
+ If distribution of executable or object code is made by offering access
|
||||
+ to copy from a designated place, then offering equivalent access to copy
|
||||
+ the source code from the same place counts as distribution of the source
|
||||
+ code, even though third parties are not compelled to copy the source
|
||||
+ along with the object code.
|
||||
+
|
||||
+4. You may not copy, modify, sublicense, or distribute the Program except as
|
||||
+ expressly provided under this License. Any attempt otherwise to copy,
|
||||
+ modify, sublicense or distribute the Program is void, and will
|
||||
+ automatically terminate your rights under this License. However, parties
|
||||
+ who have received copies, or rights, from you under this License will not
|
||||
+ have their licenses terminated so long as such parties remain in full
|
||||
+ compliance.
|
||||
+
|
||||
+5. You are not required to accept this License, since you have not signed
|
||||
+ it. However, nothing else grants you permission to modify or distribute
|
||||
+ the Program or its derivative works. These actions are prohibited by law
|
||||
+ if you do not accept this License. Therefore, by modifying or
|
||||
+ distributing the Program (or any work based on the Program), you
|
||||
+ indicate your acceptance of this License to do so, and all its terms and
|
||||
+ conditions for copying, distributing or modifying the Program or works
|
||||
+ based on it.
|
||||
+
|
||||
+6. Each time you redistribute the Program (or any work based on the
|
||||
+ Program), the recipient automatically receives a license from the
|
||||
+ original licensor to copy, distribute or modify the Program subject to
|
||||
+ these terms and conditions. You may not impose any further restrictions
|
||||
+ on the recipients' exercise of the rights granted herein. You are not
|
||||
+ responsible for enforcing compliance by third parties to this License.
|
||||
+
|
||||
+7. If, as a consequence of a court judgment or allegation of patent
|
||||
+ infringement or for any other reason (not limited to patent issues),
|
||||
+ conditions are imposed on you (whether by court order, agreement or
|
||||
+ otherwise) that contradict the conditions of this License, they do not
|
||||
+ excuse you from the conditions of this License. If you cannot distribute
|
||||
+ so as to satisfy simultaneously your obligations under this License and
|
||||
+ any other pertinent obligations, then as a consequence you may not
|
||||
+ distribute the Program at all. For example, if a patent license would
|
||||
+ not permit royalty-free redistribution of the Program by all those who
|
||||
+ receive copies directly or indirectly through you, then the only way you
|
||||
+ could satisfy both it and this License would be to refrain entirely from
|
||||
+ distribution of the Program.
|
||||
+
|
||||
+ If any portion of this section is held invalid or unenforceable under any
|
||||
+ particular circumstance, the balance of the section is intended to apply
|
||||
+ and the section as a whole is intended to apply in other circumstances.
|
||||
+
|
||||
+ It is not the purpose of this section to induce you to infringe any
|
||||
+ patents or other property right claims or to contest validity of any
|
||||
+ such claims; this section has the sole purpose of protecting the
|
||||
+ integrity of the free software distribution system, which is implemented
|
||||
+ by public license practices. Many people have made generous contributions
|
||||
+ to the wide range of software distributed through that system in
|
||||
+ reliance on consistent application of that system; it is up to the
|
||||
+ author/donor to decide if he or she is willing to distribute software
|
||||
+ through any other system and a licensee cannot impose that choice.
|
||||
+
|
||||
+ This section is intended to make thoroughly clear what is believed to be
|
||||
+ a consequence of the rest of this License.
|
||||
+
|
||||
+8. If the distribution and/or use of the Program is restricted in certain
|
||||
+ countries either by patents or by copyrighted interfaces, the original
|
||||
+ copyright holder who places the Program under this License may add an
|
||||
+ explicit geographical distribution limitation excluding those countries,
|
||||
+ so that distribution is permitted only in or among countries not thus
|
||||
+ excluded. In such case, this License incorporates the limitation as if
|
||||
+ written in the body of this License.
|
||||
+
|
||||
+9. The Free Software Foundation may publish revised and/or new versions of
|
||||
+ the General Public License from time to time. Such new versions will be
|
||||
+ similar in spirit to the present version, but may differ in detail to
|
||||
+ address new problems or concerns.
|
||||
+
|
||||
+ Each version is given a distinguishing version number. If the Program
|
||||
+ specifies a version number of this License which applies to it and "any
|
||||
+ later version", you have the option of following the terms and
|
||||
+ conditions either of that version or of any later version published by
|
||||
+ the Free Software Foundation. If the Program does not specify a version
|
||||
+ number of this License, you may choose any version ever published by the
|
||||
+ Free Software Foundation.
|
||||
+
|
||||
+10. If you wish to incorporate parts of the Program into other free programs
|
||||
+ whose distribution conditions are different, write to the author to ask
|
||||
+ for permission. For software which is copyrighted by the Free Software
|
||||
+ Foundation, write to the Free Software Foundation; we sometimes make
|
||||
+ exceptions for this. Our decision will be guided by the two goals of
|
||||
+ preserving the free status of all derivatives of our free software and
|
||||
+ of promoting the sharing and reuse of software generally.
|
||||
+
|
||||
+ NO WARRANTY
|
||||
+
|
||||
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
|
||||
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
|
||||
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
|
||||
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
+
|
||||
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
|
||||
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
|
||||
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
|
||||
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
|
||||
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
|
||||
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
+
|
||||
+END OF TERMS AND CONDITIONS
|
||||
+
|
||||
+How to Apply These Terms to Your New Programs
|
||||
+
|
||||
+If you develop a new program, and you want it to be of the greatest
|
||||
+possible use to the public, the best way to achieve this is to make it free
|
||||
+software which everyone can redistribute and change under these terms.
|
||||
+
|
||||
+To do so, attach the following notices to the program. It is safest to
|
||||
+attach them to the start of each source file to most effectively convey the
|
||||
+exclusion of warranty; and each file should have at least the "copyright"
|
||||
+line and a pointer to where the full notice is found.
|
||||
+
|
||||
+one line to give the program's name and an idea of what it does.
|
||||
+Copyright (C) yyyy name of author
|
||||
+
|
||||
+This program 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, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+This program 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.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License along with
|
||||
+this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
+Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+Also add information on how to contact you by electronic and paper mail.
|
||||
+
|
||||
+If the program is interactive, make it output a short notice like this when
|
||||
+it starts in an interactive mode:
|
||||
+
|
||||
+Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
|
||||
+with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
|
||||
+software, and you are welcome to redistribute it under certain conditions;
|
||||
+type 'show c' for details.
|
||||
+
|
||||
+The hypothetical commands 'show w' and 'show c' should show the appropriate
|
||||
+parts of the General Public License. Of course, the commands you use may be
|
||||
+called something other than 'show w' and 'show c'; they could even be
|
||||
+mouse-clicks or menu items--whatever suits your program.
|
||||
+
|
||||
+You should also get your employer (if you work as a programmer) or your
|
||||
+school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
+necessary. Here is a sample; alter the names:
|
||||
+
|
||||
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
+'Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
+
|
||||
+signature of Ty Coon, 1 April 1989
|
||||
+Ty Coon, President of Vice
|
||||
+
|
||||
+This General Public License does not permit incorporating your program into
|
||||
+proprietary programs. If your program is a subroutine library, you may
|
||||
+consider it more useful to permit linking proprietary applications with the
|
||||
+library. If this is what you want to do, use the GNU Library General Public
|
||||
+License instead of this License.
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/Makefile linux-2.6.37.3rdparty/3rdparty/rfswitch/Makefile
|
||||
--- linux-2.6.37/3rdparty/rfswitch/Makefile 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/Makefile 2008-03-28 05:17:16.000000000 +0200
|
||||
@@ -0,0 +1,119 @@
|
||||
+#
|
||||
+# Makefile for the SW RF Switch kernel modules
|
||||
+#
|
||||
+# NOTE: This make file can serve as both an external Makefile (launched
|
||||
+# directly by the user), or as the sub-dir Makefile used by the kernel
|
||||
+# build system.
|
||||
+
|
||||
+
|
||||
+CONFIG_AVERATEC_5100P=m
|
||||
+CONFIG_PACKARDBELL_E5=m
|
||||
+
|
||||
+
|
||||
+
|
||||
+list-m :=
|
||||
+list-$(CONFIG_AVERATEC_5100P) += av5100
|
||||
+list-$(CONFIG_PACKARDBELL_E5) += pbe5
|
||||
+
|
||||
+
|
||||
+obj-$(CONFIG_AVERATEC_5100P) += av5100.o
|
||||
+obj-$(CONFIG_PACKARDBELL_E5) += pbe5.o
|
||||
+
|
||||
+#
|
||||
+# Begin dual Makefile mode here. First we provide support for when we
|
||||
+# are being invoked by the kernel build system
|
||||
+#
|
||||
+ifneq ($(KERNELRELEASE),)
|
||||
+
|
||||
+ifneq ($(PATCHLEVEL),6) # If we are not on a 2.6, then do 2.4 specific things
|
||||
+
|
||||
+O_TARGET := rfswitch.o
|
||||
+
|
||||
+include $(TOPDIR)/Rules.make
|
||||
+
|
||||
+endif # End if 2.4 specific settings
|
||||
+
|
||||
+else
|
||||
+# Here we begin the portion that is executed if the user invoked this Makefile
|
||||
+# directly.
|
||||
+
|
||||
+# KSRC should be set to the path to your sources
|
||||
+# modules are installed into KMISC
|
||||
+KVER := $(shell uname -r)
|
||||
+KSRC := /lib/modules/$(KVER)/build
|
||||
+KMISC := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
|
||||
+
|
||||
+# KSRC_OUTPUT should be overridden if you are using a 2.6 kernel that
|
||||
+# has it's output sent elsewhere via KBUILD_OUTPUT= or O=
|
||||
+KSRC_OUTPUT := $(KSRC)
|
||||
+
|
||||
+# If we find Rules.make, we can assume we're using the old 2.4 style building
|
||||
+OLDMAKE=$(wildcard $(KSRC)/Rules.make)
|
||||
+PWD=$(shell pwd)
|
||||
+
|
||||
+VERFILE := $(KSRC_OUTPUT)/include/linux/version.h
|
||||
+KERNELRELEASE := $(shell \
|
||||
+ if [ -r $(VERFILE) ]; then \
|
||||
+ (cat $(VERFILE); echo UTS_RELEASE) | \
|
||||
+ $(CC) -I$(KSRC_OUTPUT) $(CFLAGS) -E - | \
|
||||
+ tail -n 1 | \
|
||||
+ xargs echo; \
|
||||
+ else \
|
||||
+ uname -r; \
|
||||
+ fi)
|
||||
+
|
||||
+MODPATH := $(DESTDIR)/lib/modules/$(KERNELRELEASE)
|
||||
+
|
||||
+all: modules
|
||||
+
|
||||
+clean:
|
||||
+ rm -f *.mod.c *.mod *.o *.ko .*.cmd .*.flags Modules.symvers
|
||||
+ rm -rf $(PWD)/tmp
|
||||
+
|
||||
+
|
||||
+ifeq ($(OLDMAKE),)
|
||||
+
|
||||
+TMP=$(PWD)/tmp
|
||||
+MODVERDIR=$(TMP)/.tmp_versions
|
||||
+
|
||||
+modules:
|
||||
+ifdef ($(KSRC_OUTPUT)/.tmp_versions)
|
||||
+ mkdir -p $(MODVERDIR)
|
||||
+ -cp $(KSRC_OUTPUT)/.tmp_versions/*.mod $(MODVERDIR)
|
||||
+endif
|
||||
+ifeq ($(KSRC),$(KSRC_OUTPUT)) # We're not outputting elsewhere
|
||||
+ifdef ($(KSRC)/.tmp_versions)
|
||||
+ -cp $(KSRC)/.tmp_versions/*.mod $(MODVERDIR)
|
||||
+endif
|
||||
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) MODVERDIR=$(MODVERDIR) modules
|
||||
+else # We've got a kernel with seperate output, copy the config, and use O=
|
||||
+ mkdir -p $(TMP)
|
||||
+ cp $(KSRC_OUTPUT)/.config $(TMP)
|
||||
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) MODVERDIR=$(MODVERDIR) O=$(PWD)/tmp modules
|
||||
+endif
|
||||
+
|
||||
+install: modules
|
||||
+ install -d $(KMISC)
|
||||
+ install -m 644 -c $(addsuffix .ko,$(list-m)) $(KMISC)
|
||||
+ /sbin/depmod -a
|
||||
+
|
||||
+
|
||||
+else # We're on 2.4, and things are slightly different
|
||||
+
|
||||
+modules:
|
||||
+ $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) BUILD_DIR=$(PWD) modules
|
||||
+
|
||||
+install: modules
|
||||
+ install -d $(KMISC)
|
||||
+ install -m 644 -c $(addsuffix .o,$(list-m)) $(KMISC)
|
||||
+ /sbin/depmod -a
|
||||
+
|
||||
+endif
|
||||
+
|
||||
+uninstall:
|
||||
+ cd $(KMISC)
|
||||
+ rm -rf $(addsuffix .ko,$(list-m))
|
||||
+ cd -
|
||||
+ /sbin/depmod -a
|
||||
+
|
||||
+endif
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/pbe5.c linux-2.6.37.3rdparty/3rdparty/rfswitch/pbe5.c
|
||||
--- linux-2.6.37/3rdparty/rfswitch/pbe5.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/pbe5.c 2008-03-28 05:25:16.000000000 +0200
|
||||
@@ -0,0 +1,205 @@
|
||||
+/*******************************************************************************
|
||||
+
|
||||
+ This program is free software; you can redistribute it and/or modify it
|
||||
+ under the terms of version 2 of the GNU General Public License as
|
||||
+ published by the Free Software Foundation.
|
||||
+
|
||||
+ This program 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.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License along with
|
||||
+ this program; if not, write to the Free Software Foundation, Inc., 59
|
||||
+ Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+ The full GNU General Public License is included in this distribution in the
|
||||
+ file called LICENSE.
|
||||
+
|
||||
+ Author:
|
||||
+ Pedro Ramalhais <pmr09313@students.fct.unl.pt>
|
||||
+
|
||||
+ Based on:
|
||||
+ av5100.c from http://ipw2100.sourceforge.net/
|
||||
+
|
||||
+*******************************************************************************/
|
||||
+
|
||||
+#include <linux/compiler.h>
|
||||
+#include <linux/errno.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/netdevice.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/proc_fs.h>
|
||||
+#include <linux/ioport.h>
|
||||
+#include <asm/uaccess.h>
|
||||
+#include <asm/io.h>
|
||||
+
|
||||
+#define DRV_NAME "pbe5"
|
||||
+#define DRV_VERSION "1.3"
|
||||
+#define DRV_DESCRIPTION "SW RF kill switch for Packard Bell EasyNote E5"
|
||||
+#define DRV_AUTHOR "Pedro Ramalhais"
|
||||
+#define DRV_LICENSE "GPL"
|
||||
+
|
||||
+static int radio = 1;
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+
|
||||
+MODULE_PARM(radio, "i");
|
||||
+
|
||||
+#else /* LINUX_VERSION_CODE < 2.6.0 */
|
||||
+
|
||||
+#include <linux/moduleparam.h>
|
||||
+module_param(radio, int, 1);
|
||||
+
|
||||
+#endif /* LINUX_VERSION_CODE < 2.6.0 */
|
||||
+
|
||||
+MODULE_PARM_DESC(radio, "controls state of radio (1=on, 0=off)");
|
||||
+
|
||||
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
|
||||
+MODULE_AUTHOR(DRV_AUTHOR);
|
||||
+MODULE_LICENSE(DRV_LICENSE);
|
||||
+
|
||||
+/*
|
||||
+ * NOTE: These values were obtained from disassembling the Icon.exe program
|
||||
+ * installed in the Packard Bell EasyNote E5 laptop. The names were guessed,
|
||||
+ * so don't rely on them.
|
||||
+ */
|
||||
+#define PBE5_PORT_TOGGLE 0x0b3
|
||||
+#define PBE5_VALUE_TOGGLE_ON 0x01
|
||||
+#define PBE5_VALUE_TOGGLE_OFF 0x00
|
||||
+#define PBE5_PORT_APPLY 0x0b2
|
||||
+#define PBE5_VALUE_APPLY 0xef
|
||||
+
|
||||
+// Some "booleans" =;-)
|
||||
+#define PBE5_RADIO_OFF 0
|
||||
+#define PBE5_RADIO_ON 1
|
||||
+
|
||||
+static int pbe5_radio_status = PBE5_RADIO_ON;
|
||||
+
|
||||
+unsigned char pbe5_get_radio(void)
|
||||
+{
|
||||
+ unsigned char val = 0x00;
|
||||
+
|
||||
+ val = inb(PBE5_PORT_TOGGLE);
|
||||
+
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static void pbe5_set_radio(int state_set)
|
||||
+{
|
||||
+ pbe5_radio_status = pbe5_get_radio();
|
||||
+
|
||||
+ if (pbe5_radio_status != state_set) {
|
||||
+ // Set the radio toggle register
|
||||
+ outb(PBE5_VALUE_TOGGLE_ON, PBE5_PORT_TOGGLE);
|
||||
+ // Commit the radio toggle register value
|
||||
+ outb(PBE5_VALUE_APPLY, PBE5_PORT_APPLY);
|
||||
+ // Update the radio status
|
||||
+ pbe5_radio_status = pbe5_get_radio();
|
||||
+
|
||||
+ printk(KERN_INFO DRV_NAME ": Radio turned %s\n",
|
||||
+ (state_set == PBE5_RADIO_ON) ? "ON" : "OFF");
|
||||
+ } else {
|
||||
+ printk(KERN_INFO DRV_NAME ": Radio already %s\n",
|
||||
+ (state_set == PBE5_RADIO_ON) ? "ON" : "OFF");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * proc stuff
|
||||
+ */
|
||||
+static struct proc_dir_entry *dir_base = NULL;
|
||||
+
|
||||
+static int proc_set_radio(struct file *file, const char *buffer,
|
||||
+ unsigned long count, void *data)
|
||||
+{
|
||||
+ pbe5_set_radio(buffer[0] == '0' ? PBE5_RADIO_OFF : PBE5_RADIO_ON);
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
+static int proc_get_radio(char *page, char **start, off_t offset,
|
||||
+ int count, int *eof, void *data)
|
||||
+{
|
||||
+ int len = 0;
|
||||
+
|
||||
+ len += snprintf(page, count, DRV_NAME ": %d\n",
|
||||
+ pbe5_radio_status == PBE5_RADIO_OFF ? 0 : 1);
|
||||
+
|
||||
+ *eof = 1;
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void pbe5_proc_cleanup(void)
|
||||
+{
|
||||
+ if (dir_base) {
|
||||
+ remove_proc_entry("radio", dir_base);
|
||||
+ remove_proc_entry(DRV_NAME, &proc_root);
|
||||
+ dir_base = NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int pbe5_proc_init(void)
|
||||
+{
|
||||
+ struct proc_dir_entry *ent;
|
||||
+ int err = 0;
|
||||
+
|
||||
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
|
||||
+ if (dir_base == NULL) {
|
||||
+ printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
|
||||
+ DRV_NAME "\n");
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ ent = create_proc_entry("radio", S_IFREG | S_IRUGO | S_IWUSR,
|
||||
+ dir_base);
|
||||
+ if (ent) {
|
||||
+ ent->read_proc = proc_get_radio;
|
||||
+ ent->write_proc = proc_set_radio;
|
||||
+ } else {
|
||||
+ printk(KERN_ERR
|
||||
+ "Unable to initialize /proc/" DRV_NAME "/radio\n");
|
||||
+ err = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+ fail:
|
||||
+ pbe5_proc_cleanup();
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * module stuff
|
||||
+ */
|
||||
+static int __init pbe5_init(void)
|
||||
+{
|
||||
+ pbe5_proc_init();
|
||||
+
|
||||
+ pbe5_set_radio((radio == 1) ? PBE5_RADIO_ON : PBE5_RADIO_OFF);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit pbe5_exit(void)
|
||||
+{
|
||||
+ pbe5_set_radio(PBE5_RADIO_OFF);
|
||||
+
|
||||
+ pbe5_proc_cleanup();
|
||||
+}
|
||||
+
|
||||
+module_init(pbe5_init);
|
||||
+module_exit(pbe5_exit);
|
||||
+
|
||||
+/*
|
||||
+ 1 2 3 4 5 6 7
|
||||
+12345678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
+*/
|
||||
diff -Nurp linux-2.6.37/3rdparty/rfswitch/README linux-2.6.37.3rdparty/3rdparty/rfswitch/README
|
||||
--- linux-2.6.37/3rdparty/rfswitch/README 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/rfswitch/README 2004-07-09 17:26:20.000000000 +0300
|
||||
@@ -0,0 +1,44 @@
|
||||
+Radio Kill Switch
|
||||
+------------ ----- ----- ---- --- -- -
|
||||
+Most laptops provide the ability for the user to physically disable the radio.
|
||||
+Some vendors have implemented this as a physical switch that requires no
|
||||
+software to turn the radio off and on. On other laptops, however, the switch
|
||||
+is controlled through a button being pressed and a software driver then making
|
||||
+calls to turn the radio off and on. This is referred to as a "software based
|
||||
+RF kill switch"
|
||||
+
|
||||
+Currently this project provides modules for controlling the software RF kill
|
||||
+switch on the Averatec 5100P and Packard Bell EasyNote E5. The code may work
|
||||
+on other laptops, but these are the only models on which it has been tested.
|
||||
+
|
||||
+To determine if you have a system that might be compatible with one of the
|
||||
+provided SW RF Kill switch modules, you can run:
|
||||
+
|
||||
+
|
||||
+ To check for the Packard Bell (to use module pbe) --
|
||||
+
|
||||
+ % dd if=/dev/mem bs=1 skip=983040 count=65535 2>/dev/null | strings | egrep "NEW-PC|Insyde Software MobilePRO BIOS"
|
||||
+
|
||||
+ To check for the Averatec (to use module av5100) --
|
||||
+
|
||||
+ % dd if=/dev/mem bs=1 skip=983040 count=65535 2>/dev/null | strings | egrep "AVERATEC"
|
||||
+
|
||||
+If you have one of those laptop models you can imply loading the av5100/pbe5
|
||||
+module and the radio will be toggled on and off. In addition, you can turn
|
||||
+the driver on and off by writing either a 1 or 0 to /proc/av5100/radio or
|
||||
+/proc/pbe5/radio. If you automatically load the av5100/pbe5 module when your
|
||||
+system boots, you may wish to use the radio module parameter to control the
|
||||
+state of the radio upon loading:
|
||||
+
|
||||
+ modprobe av5100 radio=0
|
||||
+ modprobe pbe5 radio=0
|
||||
+
|
||||
+results in the module loading with the radio turned off. You can then turn the
|
||||
+radio on by:
|
||||
+
|
||||
+ echo 1 > /proc/av5100/radio
|
||||
+ echo 1 > /proc/pbe5/radio
|
||||
+
|
||||
+If you have a SW RF kill switch and can not use one of the above modules,
|
||||
+please join us on IRC (irc.freenode.net) on channel #ipw2100 and someone may
|
||||
+be able to help.
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
fix build with 3.0
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/rfswitch/Makefile | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
--- a/3rdparty/rfswitch/Makefile.orig 2011-07-15 02:37:27.000000000 +0300
|
||||
+++ a/3rdparty/rfswitch/Makefile 2011-07-15 13:47:10.463914526 +0300
|
||||
@@ -29,8 +29,6 @@ ifneq ($(PATCHLEVEL),6) # If we are not
|
||||
|
||||
O_TARGET := rfswitch.o
|
||||
|
||||
-include $(TOPDIR)/Rules.make
|
||||
-
|
||||
endif # End if 2.4 specific settings
|
||||
|
||||
else
|
||||
@@ -0,0 +1,51 @@
|
||||
Remove 'proc_root' usage
|
||||
|
||||
Commit c74c120a21d87b0b6925ada5830d8cac21e852d9 (Linus's tree) removed
|
||||
the export of 'proc_root' variable, because you can create on the proc's
|
||||
root directory by passing NULL where you would pass 'proc_root'.
|
||||
|
||||
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
|
||||
Index: linux-2.6.25/3rdparty/rfswitch/av5100.c
|
||||
===================================================================
|
||||
--- linux-2.6.25.orig/3rdparty/rfswitch/av5100.c
|
||||
+++ linux-2.6.25/3rdparty/rfswitch/av5100.c
|
||||
@@ -107,7 +107,7 @@ static void av5100_proc_cleanup(void)
|
||||
{
|
||||
if (dir_base) {
|
||||
remove_proc_entry("radio", dir_base);
|
||||
- remove_proc_entry(DRV_NAME, &proc_root);
|
||||
+ remove_proc_entry(DRV_NAME, NULL);
|
||||
dir_base = NULL;
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,7 @@ static int av5100_proc_init(void)
|
||||
struct proc_dir_entry *ent;
|
||||
int err = 0;
|
||||
|
||||
- dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
|
||||
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, NULL);
|
||||
if (dir_base == NULL) {
|
||||
printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
|
||||
DRV_NAME "\n");
|
||||
Index: linux-2.6.25/3rdparty/rfswitch/pbe5.c
|
||||
===================================================================
|
||||
--- linux-2.6.25.orig/3rdparty/rfswitch/pbe5.c
|
||||
+++ linux-2.6.25/3rdparty/rfswitch/pbe5.c
|
||||
@@ -138,7 +138,7 @@ static void pbe5_proc_cleanup(void)
|
||||
{
|
||||
if (dir_base) {
|
||||
remove_proc_entry("radio", dir_base);
|
||||
- remove_proc_entry(DRV_NAME, &proc_root);
|
||||
+ remove_proc_entry(DRV_NAME, NULL);
|
||||
dir_base = NULL;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ static int pbe5_proc_init(void)
|
||||
struct proc_dir_entry *ent;
|
||||
int err = 0;
|
||||
|
||||
- dir_base = create_proc_entry(DRV_NAME, S_IFDIR, &proc_root);
|
||||
+ dir_base = create_proc_entry(DRV_NAME, S_IFDIR, NULL);
|
||||
if (dir_base == NULL) {
|
||||
printk(KERN_ERR DRV_NAME ": Unable to initialise /proc/"
|
||||
DRV_NAME "\n");
|
||||
@@ -0,0 +1,178 @@
|
||||
|
||||
Fix building with kernel-4.7 series.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c | 32 ++++++++++++++---------------
|
||||
3rdparty/rtl8723bs/os_dep/wifi_regd.c | 6 ++---
|
||||
2 files changed, 19 insertions(+), 19 deletions(-)
|
||||
|
||||
diff -urp linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c
|
||||
--- linux/3rdparty/rtl8723bs.orig/os_dep/ioctl_cfg80211.c 2016-07-04 20:00:13.000000000 +0300
|
||||
+++ linux/3rdparty/rtl8723bs/os_dep/ioctl_cfg80211.c 2016-07-04 20:37:45.054379270 +0300
|
||||
@@ -44,7 +44,7 @@ static const u32 rtw_cipher_suites[] = {
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -120,13 +120,13 @@ static void rtw_2g_rates_init(struct iee
|
||||
}
|
||||
|
||||
static struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
- enum ieee80211_band band
|
||||
+ enum nl80211_band band
|
||||
)
|
||||
{
|
||||
struct ieee80211_supported_band *spt_band = NULL;
|
||||
int n_channels, n_bitrates;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
n_channels = RTW_2G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_G_RATES_NUM;
|
||||
@@ -150,7 +150,7 @@ static struct ieee80211_supported_band *
|
||||
spt_band->n_channels = n_channels;
|
||||
spt_band->n_bitrates = n_bitrates;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
rtw_2g_channels_init(spt_band->channels);
|
||||
rtw_2g_rates_init(spt_band->bitrates);
|
||||
@@ -170,7 +170,7 @@ static void rtw_spt_band_free(struct iee
|
||||
if (!spt_band)
|
||||
return;
|
||||
|
||||
- if (spt_band->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (spt_band->band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
|
||||
@@ -232,7 +232,7 @@ static int rtw_ieee80211_channel_to_freq
|
||||
{
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
- if (band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (band == NL80211_BAND_2GHZ) {
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -336,7 +336,7 @@ struct cfg80211_bss *rtw_cfg80211_inform
|
||||
|
||||
|
||||
channel = pnetwork->network.Configuration.DSConfig;
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -420,7 +420,7 @@ int rtw_cfg80211_check_bss(struct adapte
|
||||
if (!(pnetwork) || !(padapter->rtw_wdev))
|
||||
return false;
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
|
||||
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
|
||||
@@ -542,7 +542,7 @@ check_bss:
|
||||
u32 freq;
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -3064,7 +3064,7 @@ void rtw_cfg80211_rx_action(struct adapt
|
||||
else
|
||||
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
|
||||
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
}
|
||||
@@ -3311,7 +3311,7 @@ static int cfg80211_rtw_sched_scan_stop(
|
||||
}
|
||||
#endif /* CONFIG_PNO_SUPPORT */
|
||||
|
||||
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
|
||||
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
|
||||
{
|
||||
|
||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
@@ -3335,7 +3335,7 @@ static void rtw_cfg80211_init_ht_capab(s
|
||||
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
/*
|
||||
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
|
||||
*base on ant_num
|
||||
*rx_mask: RX mask
|
||||
*if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
|
||||
@@ -3379,9 +3379,9 @@ void rtw_cfg80211_init_wiphy(struct adap
|
||||
DBG_8192C("%s:rf_type =%d\n", __func__, rf_type);
|
||||
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if (bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* init regulary domain */
|
||||
@@ -3417,7 +3417,7 @@ static void rtw_cfg80211_preinit_wiphy(s
|
||||
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
|
||||
|
||||
wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
|
||||
@@ -3564,7 +3564,7 @@ void rtw_wdev_free(struct wireless_dev *
|
||||
if (!wdev)
|
||||
return;
|
||||
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
|
||||
|
||||
wiphy_free(wdev->wiphy);
|
||||
|
||||
diff -urp linux/3rdparty/rtl8723bs.orig/os_dep/wifi_regd.c linux/3rdparty/rtl8723bs/os_dep/wifi_regd.c
|
||||
--- linux/3rdparty/rtl8723bs.orig/os_dep/wifi_regd.c 2016-07-04 20:00:13.000000000 +0300
|
||||
+++ linux/3rdparty/rtl8723bs/os_dep/wifi_regd.c 2016-07-04 20:35:31.427278665 +0300
|
||||
@@ -105,7 +105,7 @@ static int rtw_ieee80211_channel_to_freq
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- /* IEEE80211_BAND_2GHZ */
|
||||
+ /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -128,7 +128,7 @@ static void _rtw_reg_apply_flags(struct
|
||||
u32 freq;
|
||||
|
||||
/* all channels disable */
|
||||
- for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
||||
+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
|
||||
sband = wiphy->bands[i];
|
||||
|
||||
if (sband) {
|
||||
@@ -146,7 +146,7 @@ static void _rtw_reg_apply_flags(struct
|
||||
channel = channel_set[i].ChannelNum;
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_2GHZ);
|
||||
+ NL80211_BAND_2GHZ);
|
||||
|
||||
ch = ieee80211_get_channel(wiphy, freq);
|
||||
if (ch) {
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,189 @@
|
||||
3rdparty/viahss/Kconfig | 14 +++++++
|
||||
3rdparty/viahss/Makefile | 3 +
|
||||
3rdparty/viahss/README.html | 68 ++++++++++++++++++++++++++++++++++++
|
||||
3rdparty/viahss/viahss.c | 83 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 168 insertions(+)
|
||||
diff -Nurp linux-2.6.37/3rdparty/viahss/Kconfig linux-2.6.37.3rdparty/3rdparty/viahss/Kconfig
|
||||
--- linux-2.6.37/3rdparty/viahss/Kconfig 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/viahss/Kconfig 2003-12-01 01:53:51.000000000 +0200
|
||||
@@ -0,0 +1,14 @@
|
||||
+config VIAHSS
|
||||
+ tristate "VIA High Speed Serial"
|
||||
+ depends on SERIAL_CORE && m
|
||||
+ ---help---
|
||||
+ VIA High Speed Serial is a little kernel module (1 KB) which enables
|
||||
+ high speed serial port modes of VIA VT82C686A or VT82C686B
|
||||
+ southbridge-equipped motherboards. With this module, you can use the
|
||||
+ serial port at 230400 bit/s so that you can get the full 128000 bit/s
|
||||
+ from ISDN-TA. The module has been tested with both 686A and 686B
|
||||
+ chipsets.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called viahss.
|
||||
+
|
||||
diff -Nurp linux-2.6.37/3rdparty/viahss/Makefile linux-2.6.37.3rdparty/3rdparty/viahss/Makefile
|
||||
--- linux-2.6.37/3rdparty/viahss/Makefile 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/viahss/Makefile 2003-12-01 01:43:23.000000000 +0200
|
||||
@@ -0,0 +1,3 @@
|
||||
+
|
||||
+obj-$(CONFIG_VIAHSS) += viahss.o
|
||||
+
|
||||
diff -Nurp linux-2.6.37/3rdparty/viahss/README.html linux-2.6.37.3rdparty/3rdparty/viahss/README.html
|
||||
--- linux-2.6.37/3rdparty/viahss/README.html 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/viahss/README.html 2003-12-01 01:58:23.000000000 +0200
|
||||
@@ -0,0 +1,68 @@
|
||||
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
+<html>
|
||||
+<head>
|
||||
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
+ <title>High speed serial port for VIA VT82C686 chipsets for linux</title>
|
||||
+</head>
|
||||
+<body>
|
||||
+<H3>Setting the serial port speed over 115,200bps</H3>
|
||||
+<br>
|
||||
+If you have motherboard which has VIA VT82C686A or VT82C686B chipset
|
||||
+you can set serial ports in high speed mode with this kernel module.
|
||||
+I use module with external ISDN-TA and haven't had any problems
|
||||
+so far but I cannot guarantee that you won't have buffer overflows if
|
||||
+you use full 230K or 460K speed all the time (FIFO's are still 16550A size).
|
||||
+ISDN with two channels maxes out at 128 Kb which means that it doesn't
|
||||
+really stress serial ports at 230400. Unlike SHSMOD-patches you don't have
|
||||
+to patch serial driver and module takes only 1KB of memory when it's
|
||||
+loaded which should leave enough room for other programs. It should
|
||||
+be also possible to make this work from userspace but accessing
|
||||
+pci devices is so much easier from kernel.
|
||||
+
|
||||
+<H3>How to use module</H3>
|
||||
+Get the <A href=http://www.kati.fi/viahss/viahss-0.92.tar.gz>package</A>
|
||||
+and compile it using included makefiles.
|
||||
+<H3>For 2.4</H3>
|
||||
+If you have kernel in some other location than /usr/src/linux edit Makefile
|
||||
+before compiling. You can also install module with "make install". After
|
||||
+you have loaded module in kernel (use modprobe or insmod) you can set serial
|
||||
+ports to use high speed modes with setserial.<br>
|
||||
+<H3>For 2.5/2.6</H3>
|
||||
+Copy Makefile-2.6 on top of Makefile and do make. After loading module set
|
||||
+serial speed with setserial. (NOTE: This gives a warning on depracated
|
||||
+method).
|
||||
+
|
||||
+<br>
|
||||
+# setserial /dev/ttyS0 spd_cust divisor 0x8002
|
||||
+<br><br>
|
||||
+which sets COM1: speed to 230400. With 0x8001 you should get 460800
|
||||
+but I haven't tested it. If you want to use COM2: use ttyS1 instead of ttyS0.
|
||||
+
|
||||
+After this you should set program which you are using to use 38400 bps
|
||||
+speed which is now actually 230K or 460K. For more information check
|
||||
+setserial man page (spd_cust).
|
||||
+
|
||||
+You can use serial port work as normal if you do<br>
|
||||
+<br>
|
||||
+# setserial /dev/ttyS0 spd_normal <br><br>
|
||||
+After this you can also remove viahss module with rmmod if you need to. Module doesn't intefere with normal serial port usage so you can leave
|
||||
+it loaded if you don't need that extra 1KB which module uses.
|
||||
+<H3>Download</H3>
|
||||
+<A href=http://www.kati.fi/viahss/viahss-0.92.tar.gz>viahss-0.92.tar.gz</A>
|
||||
+
|
||||
+<H3>Acknowledgments</H3>
|
||||
+
|
||||
+Thanks to Kimmo Rintala for help with divisor settings.<br>
|
||||
+I also like to thank Jeff Garzik for help with VIA datasheets.<br>
|
||||
+Port to 2.5/2.6 by Kingsly John with the help of <A href=http://lwn.net>LWN</A>
|
||||
+
|
||||
+<H3>Version History</H3>
|
||||
+0.90 First release<br>
|
||||
+0.91 Fixed Makefile <br>
|
||||
+0.92 Fixed for 2.5/2.6<br>
|
||||
+
|
||||
+<H3>Contact</H3>
|
||||
+
|
||||
+You can reach me by email: <A href=mailto:jrauti@iki.fi>jrauti@iki.fi</A>
|
||||
+</body>
|
||||
+</html>
|
||||
diff -Nurp linux-2.6.37/3rdparty/viahss/viahss.c linux-2.6.37.3rdparty/3rdparty/viahss/viahss.c
|
||||
--- linux-2.6.37/3rdparty/viahss/viahss.c 1970-01-01 02:00:00.000000000 +0200
|
||||
+++ linux-2.6.37.3rdparty/3rdparty/viahss/viahss.c 2003-07-17 09:49:59.000000000 +0300
|
||||
@@ -0,0 +1,83 @@
|
||||
+/*
|
||||
+ * VIA VT 82c686[AB] high speed serial port enabler
|
||||
+ * Version 0.92
|
||||
+ * Copyright (c) 2000-2001 Juhani Rautiainen <jrauti@iki.fi>
|
||||
+ *
|
||||
+ * 0.92:
|
||||
+ * Ported to 2.5/2.6 by Kingsly John
|
||||
+ * - Corrected locking (no more cli() and sti())
|
||||
+ * - New makefile
|
||||
+ *
|
||||
+ * Can be freely distributed and used under the terms of the GNU GPL.
|
||||
+*/
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/pci.h>
|
||||
+
|
||||
+const unsigned short confindex=0x3F0,confdata=0x3F1;
|
||||
+const unsigned char spcidx=0xEE;
|
||||
+
|
||||
+spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
|
||||
+
|
||||
+static int __init viahss_init(void)
|
||||
+{
|
||||
+ struct pci_dev *pcidev = NULL;
|
||||
+ unsigned char confval,val;
|
||||
+ pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
+ if (pcidev) {
|
||||
+ spin_lock_irq(&driver_lock);
|
||||
+ /* start config */
|
||||
+ pci_read_config_byte(pcidev,0x85,&confval);
|
||||
+ confval |= 0x2;
|
||||
+ pci_write_config_byte (pcidev, 0x85,confval);
|
||||
+ /* activate high speed bits */
|
||||
+ outb(spcidx,confindex); /* set index */
|
||||
+ val = (unsigned char) inb(confdata);
|
||||
+ val |= 0xC0; /* both ports on high speed*/
|
||||
+ outb (spcidx,confindex);
|
||||
+ outb (val,confdata);
|
||||
+ /*stop config*/
|
||||
+ confval &= ~0x2;
|
||||
+ pci_write_config_byte(pcidev, 0x85, confval);
|
||||
+ spin_unlock_irq(&driver_lock);
|
||||
+ printk (KERN_INFO "VIA VT82C686[AB] serial port high speed enabled\n");
|
||||
+ }
|
||||
+ else {
|
||||
+ printk (KERN_INFO "Couldn't locate VIA chipset\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void __exit viahss_exit(void)
|
||||
+{
|
||||
+ struct pci_dev *pcidev = NULL;
|
||||
+ unsigned char confval,val;
|
||||
+ pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
+ if (pcidev) {
|
||||
+ spin_lock_irq(&driver_lock);
|
||||
+ /* start config */
|
||||
+ pci_read_config_byte(pcidev,0x85,&confval);
|
||||
+ confval |= 0x2;
|
||||
+ pci_write_config_byte (pcidev, 0x85,confval);
|
||||
+ /* activate high speed bits */
|
||||
+ outb(spcidx,confindex); /* set index */
|
||||
+ val = (unsigned char) inb(confdata);
|
||||
+ val &= ~0xC0; /* both ports off high speed*/
|
||||
+ outb (spcidx,confindex);
|
||||
+ outb (val,confdata);
|
||||
+ /*stop config*/
|
||||
+ confval &= ~0x2;
|
||||
+ pci_write_config_byte(pcidev, 0x85, confval);
|
||||
+ spin_unlock_irq(&driver_lock);
|
||||
+ printk (KERN_INFO "VIA VT82C686[AB] serial port high speed disabled\n");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+module_init(viahss_init);
|
||||
+module_exit(viahss_exit);
|
||||
+MODULE_DESCRIPTION("VIA VT82C686[AB] high speed serial port enabler");
|
||||
+MODULE_AUTHOR("Juhani Rautiainen <jrauti@iki.fi>");
|
||||
@@ -0,0 +1,20 @@
|
||||
--- linux-2.6.35-rc6-git-mnb0.1/3rdparty/viahss/viahss.c.orig 2010-07-30 21:17:30.000000000 +0300
|
||||
+++ linux-2.6.35-rc6-git-mnb0.1/3rdparty/viahss/viahss.c 2010-07-30 23:10:21.324978822 +0300
|
||||
@@ -25,7 +25,7 @@ static int __init viahss_init(void)
|
||||
{
|
||||
struct pci_dev *pcidev = NULL;
|
||||
unsigned char confval,val;
|
||||
- pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
+ pcidev = pci_get_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
if (pcidev) {
|
||||
spin_lock_irq(&driver_lock);
|
||||
/* start config */
|
||||
@@ -55,7 +55,7 @@ static void __exit viahss_exit(void)
|
||||
{
|
||||
struct pci_dev *pcidev = NULL;
|
||||
unsigned char confval,val;
|
||||
- pcidev = pci_find_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
+ pcidev = pci_get_device (PCI_VENDOR_ID_VIA,PCI_DEVICE_ID_VIA_82C686,NULL);
|
||||
if (pcidev) {
|
||||
spin_lock_irq(&driver_lock);
|
||||
/* start config */
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
fix build with 3.0
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
3rdparty/viahss/viahss.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/3rdparty/viahss/viahss.c.orig 2011-07-15 02:37:27.000000000 +0300
|
||||
+++ a/3rdparty/viahss/viahss.c 2011-07-15 13:48:13.204291256 +0300
|
||||
@@ -19,7 +19,7 @@
|
||||
const unsigned short confindex=0x3F0,confdata=0x3F1;
|
||||
const unsigned char spcidx=0xEE;
|
||||
|
||||
-spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;
|
||||
+DEFINE_SPINLOCK(driver_lock);
|
||||
|
||||
static int __init viahss_init(void)
|
||||
{
|
||||
@@ -0,0 +1,18 @@
|
||||
linux/config.h is gone in 2.6.21
|
||||
|
||||
---
|
||||
3rdparty/viahss/viahss.c | 1 0 + 1 - 0 !
|
||||
1 files changed, 1 deletion(-)
|
||||
|
||||
Index: linux-2.6.21/3rdparty/viahss/viahss.c
|
||||
===================================================================
|
||||
--- linux-2.6.21.orig/3rdparty/viahss/viahss.c 2003-07-17 08:49:59.000000000 +0200
|
||||
+++ linux-2.6.21/3rdparty/viahss/viahss.c 2007-05-14 17:06:56.000000000 +0200
|
||||
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
-#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pci.h>
|
||||
@@ -0,0 +1,7 @@
|
||||
--- linux-2.6.25/3rdparty/viahss/viahss.c.orig 2008-06-28 22:50:05.000000000 +0300
|
||||
+++ linux-2.6.25/3rdparty/viahss/viahss.c 2008-06-29 14:26:55.000000000 +0300
|
||||
@@ -80,3 +80,4 @@ module_init(viahss_init);
|
||||
module_exit(viahss_exit);
|
||||
MODULE_DESCRIPTION("VIA VT82C686[AB] high speed serial port enabler");
|
||||
MODULE_AUTHOR("Juhani Rautiainen <jrauti@iki.fi>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
@@ -0,0 +1,3 @@
|
||||
# Mageia SVN does not like binaries in /packages tree
|
||||
# it can still be used for out ov svn builds
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
From 61f9738d65094a6b18d22c7beb6bb8c3dc0606b9 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Mon, 26 Oct 2015 15:20:46 +0100
|
||||
Subject: [PATCH] ACPI / video: Add a quirk to force acpi-video backlight on
|
||||
Dell XPS L421X
|
||||
|
||||
Just like the Dell XPS 15 (L521X) the Dell XPS 14 (L421X) needs to use
|
||||
the acpi-video backlight interface rather then the native one for backlight
|
||||
control to work, add a quirk for this.
|
||||
|
||||
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1272633
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/video_detect.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
|
||||
index 0d3a384..daaf1c4 100644
|
||||
--- a/drivers/acpi/video_detect.c
|
||||
+++ b/drivers/acpi/video_detect.c
|
||||
@@ -233,6 +233,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
},
|
||||
},
|
||||
{
|
||||
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1272633 */
|
||||
+ .callback = video_detect_force_video,
|
||||
+ .ident = "Dell XPS14 L421X",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS L421X"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
/* https://bugzilla.redhat.com/show_bug.cgi?id=1163574 */
|
||||
.callback = video_detect_force_video,
|
||||
.ident = "Dell XPS15 L521X",
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
From 12d868964f7352e8b18e755488f7265a93431de1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Date: Tue, 12 Jul 2016 01:35:18 +0300
|
||||
Subject: [PATCH] Bluetooth: Add support of 13d3:3490 AR3012 device
|
||||
|
||||
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=05 Dev#= 5 Spd=12 MxCh= 0
|
||||
D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
|
||||
P: Vendor=13d3 ProdID=3490 Rev=00.01
|
||||
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
|
||||
I: If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
|
||||
BugLink: https://bugs.launchpad.net/bugs/1600623
|
||||
|
||||
Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
|
||||
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/bluetooth/ath3k.c | 2 ++
|
||||
drivers/bluetooth/btusb.c | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
|
||||
index 2589468..fadba88 100644
|
||||
--- a/drivers/bluetooth/ath3k.c
|
||||
+++ b/drivers/bluetooth/ath3k.c
|
||||
@@ -123,6 +123,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472) },
|
||||
{ USB_DEVICE(0x13d3, 0x3474) },
|
||||
{ USB_DEVICE(0x13d3, 0x3487) },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
@@ -190,6 +191,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU22 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index f2e8fd7..811f9b9 100644
|
||||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -237,6 +237,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3472), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3487), .driver_info = BTUSB_ATH3012 },
|
||||
+ { USB_DEVICE(0x13d3, 0x3490), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
From 67f8ecc550b5bda03335f845dc869b8501d25fd0 Mon Sep 17 00:00:00 2001
|
||||
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Date: Wed, 18 May 2016 13:11:09 -0700
|
||||
Subject: [PATCH] HID: uhid: fix timeout when probe races with IO
|
||||
|
||||
Many devices use userspace bluetooth stacks like BlueZ or Bluedroid in combination
|
||||
with uhid. If any of these stacks is used with a HID device for which the driver
|
||||
performs a HID request as part .probe (or technically another HID operation),
|
||||
this results in a deadlock situation. The deadlock results in a 5 second timeout
|
||||
for I/O operations in HID drivers, so isn't fatal, but none of the I/O operations
|
||||
have a chance of succeeding.
|
||||
|
||||
The root cause for the problem is that uhid only allows for one request to be
|
||||
processed at a time per uhid instance and locks out other operations. This means
|
||||
that if a user space is creating a new HID device through 'UHID_CREATE', which
|
||||
ultimately triggers '.probe' through the HID layer. Then any HID request e.g. a
|
||||
read for calibration data would trigger a HID operation on uhid again, but it
|
||||
won't go out to userspace, because it is still stuck in UHID_CREATE.
|
||||
In addition bluetooth stacks are typically single threaded, so they wouldn't be
|
||||
able to handle any requests while waiting on uhid.
|
||||
|
||||
Lucikly the UHID spec is somewhat flexible and allows for fixing the issue,
|
||||
without breaking user space. The idea which the patch implements as discussed
|
||||
with David Herrmann is to decouple adding of a hid device (which triggers .probe)
|
||||
from UHID_CREATE. The work will kick off roughly once UHID_CREATE completed (or
|
||||
else will wait a tiny bit of time in .probe for a lock). A HID driver has to call
|
||||
HID to call 'hid_hw_start()' as part of .probe once it is ready for I/O, which
|
||||
triggers UHID_START to user space. Any HID operations should function now within
|
||||
.probe and won't deadlock because userspace is stuck on UHID_CREATE.
|
||||
|
||||
We verified this patch on Bluedroid with Android 6.0 and on desktop Linux with
|
||||
BlueZ stacks. Prior to the patch they had the deadlock issue.
|
||||
|
||||
[jkosina@suse.cz: reword subject]
|
||||
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/uhid.c | 33 ++++++++++++++++++++++++---------
|
||||
1 file changed, 24 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
|
||||
index 16b6f11..99ec3ff 100644
|
||||
--- a/drivers/hid/uhid.c
|
||||
+++ b/drivers/hid/uhid.c
|
||||
@@ -51,10 +51,26 @@ struct uhid_device {
|
||||
u32 report_id;
|
||||
u32 report_type;
|
||||
struct uhid_event report_buf;
|
||||
+ struct work_struct worker;
|
||||
};
|
||||
|
||||
static struct miscdevice uhid_misc;
|
||||
|
||||
+static void uhid_device_add_worker(struct work_struct *work)
|
||||
+{
|
||||
+ struct uhid_device *uhid = container_of(work, struct uhid_device, worker);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hid_add_device(uhid->hid);
|
||||
+ if (ret) {
|
||||
+ hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret);
|
||||
+
|
||||
+ hid_destroy_device(uhid->hid);
|
||||
+ uhid->hid = NULL;
|
||||
+ uhid->running = false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void uhid_queue(struct uhid_device *uhid, struct uhid_event *ev)
|
||||
{
|
||||
__u8 newhead;
|
||||
@@ -498,18 +514,14 @@ static int uhid_dev_create2(struct uhid_device *uhid,
|
||||
uhid->hid = hid;
|
||||
uhid->running = true;
|
||||
|
||||
- ret = hid_add_device(hid);
|
||||
- if (ret) {
|
||||
- hid_err(hid, "Cannot register HID device\n");
|
||||
- goto err_hid;
|
||||
- }
|
||||
+ /* Adding of a HID device is done through a worker, to allow HID drivers
|
||||
+ * which use feature requests during .probe to work, without they would
|
||||
+ * be blocked on devlock, which is held by uhid_char_write.
|
||||
+ */
|
||||
+ schedule_work(&uhid->worker);
|
||||
|
||||
return 0;
|
||||
|
||||
-err_hid:
|
||||
- hid_destroy_device(hid);
|
||||
- uhid->hid = NULL;
|
||||
- uhid->running = false;
|
||||
err_free:
|
||||
kfree(uhid->rd_data);
|
||||
uhid->rd_data = NULL;
|
||||
@@ -550,6 +562,8 @@ static int uhid_dev_destroy(struct uhid_device *uhid)
|
||||
uhid->running = false;
|
||||
wake_up_interruptible(&uhid->report_wait);
|
||||
|
||||
+ cancel_work_sync(&uhid->worker);
|
||||
+
|
||||
hid_destroy_device(uhid->hid);
|
||||
kfree(uhid->rd_data);
|
||||
|
||||
@@ -612,6 +626,7 @@ static int uhid_char_open(struct inode *inode, struct file *file)
|
||||
init_waitqueue_head(&uhid->waitq);
|
||||
init_waitqueue_head(&uhid->report_wait);
|
||||
uhid->running = false;
|
||||
+ INIT_WORK(&uhid->worker, uhid_device_add_worker);
|
||||
|
||||
file->private_data = uhid;
|
||||
nonseekable_open(inode, file);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From 88299efb05387c2c94120fdc9661aab2ec3a1ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Backlund <tmb@mageia.org>
|
||||
Date: Fri, 3 Apr 2015 00:10:34 +0259
|
||||
Subject: [PATCH] Revert "cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI
|
||||
processors"
|
||||
|
||||
This reverts commit 7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9.
|
||||
---
|
||||
drivers/cpufreq/pcc-cpufreq.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
|
||||
index 2a0d589..4d2c8e8 100644
|
||||
--- a/drivers/cpufreq/pcc-cpufreq.c
|
||||
+++ b/drivers/cpufreq/pcc-cpufreq.c
|
||||
@@ -603,13 +603,6 @@ static void __exit pcc_cpufreq_exit(void)
|
||||
free_percpu(pcc_cpu_info);
|
||||
}
|
||||
|
||||
-static const struct acpi_device_id processor_device_ids[] = {
|
||||
- {ACPI_PROCESSOR_OBJECT_HID, },
|
||||
- {ACPI_PROCESSOR_DEVICE_HID, },
|
||||
- {},
|
||||
-};
|
||||
-MODULE_DEVICE_TABLE(acpi, processor_device_ids);
|
||||
-
|
||||
MODULE_AUTHOR("Matthew Garrett, Naga Chumbalkar");
|
||||
MODULE_VERSION(PCC_VERSION);
|
||||
MODULE_DESCRIPTION("Processor Clocking Control interface driver");
|
||||
--
|
||||
2.3.1
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
From da7d3abe1c9e5ebac2cf86f97e9e89888a5e2094 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Herrmann <aherrmann@suse.com>
|
||||
Date: Fri, 22 Jul 2016 17:14:11 +0200
|
||||
Subject: [PATCH] Revert "cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency"
|
||||
|
||||
This reverts commit 790d849bf811a8ab5d4cd2cce0f6fda92f6aebf2.
|
||||
|
||||
Using a v4.7-rc7 kernel on a HP ProLiant triggered following messages
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
|
||||
The last line was shown for each CPU in the system.
|
||||
Testing v4.5 (where commit 790d849b was integrated) triggered
|
||||
similar messages. Same behaviour on a 2nd HP Proliant system.
|
||||
|
||||
So commit 790d849bf (cpufreq: pcc-cpufreq: update default value of
|
||||
cpuinfo_transition_latency) causes the system to use performance
|
||||
governor which, I guess, was not the intention of the patch.
|
||||
|
||||
Enabling debug output in pcc-cpufreq provides following verbose output:
|
||||
|
||||
pcc-cpufreq: (v1.10.00) driver loaded with frequency limits: 1200 MHz, 2800 MHz
|
||||
pcc_get_offset: for CPU 0: pcc_cpu_data input_offset: 0x44, pcc_cpu_data output_offset: 0x48
|
||||
init: policy->max is 2800000, policy->min is 1200000
|
||||
get: get_freq for CPU 0
|
||||
get: SUCCESS: (virtual) output_offset for cpu 0 is 0xffffc9000d7c0048, contains a value of: 0xff06. Speed is: 168000 MHz
|
||||
cpufreq: ondemand governor failed, too long transition latency of HW, fallback to performance governor
|
||||
target: CPU 0 should go to target freq: 2800000 (virtual) input_offset is 0xffffc9000d7c0044
|
||||
target: was SUCCESSFUL for cpu 0
|
||||
|
||||
I am asking to revert 790d849bf to re-enable usage of ondemand
|
||||
governor with pcc-cpufreq.
|
||||
|
||||
Fixes: 790d849bf (cpufreq: pcc-cpufreq: update default value of cpuinfo_transition_latency)
|
||||
CC: <stable@vger.kernel.org> # 4.5+
|
||||
Signed-off-by: Andreas Herrmann <aherrmann@suse.com>
|
||||
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
Documentation/cpu-freq/pcc-cpufreq.txt | 4 ++--
|
||||
drivers/cpufreq/pcc-cpufreq.c | 2 --
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Documentation/cpu-freq/pcc-cpufreq.txt b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
index 0a94224..9e3c3b3 100644
|
||||
--- a/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
+++ b/Documentation/cpu-freq/pcc-cpufreq.txt
|
||||
@@ -159,8 +159,8 @@ to be strictly associated with a P-state.
|
||||
|
||||
2.2 cpuinfo_transition_latency:
|
||||
-------------------------------
|
||||
-The cpuinfo_transition_latency field is CPUFREQ_ETERNAL. The PCC specification
|
||||
-does not include a field to expose this value currently.
|
||||
+The cpuinfo_transition_latency field is 0. The PCC specification does
|
||||
+not include a field to expose this value currently.
|
||||
|
||||
2.3 cpuinfo_cur_freq:
|
||||
---------------------
|
||||
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
|
||||
index a7ecb9a..3f0ce2a 100644
|
||||
--- a/drivers/cpufreq/pcc-cpufreq.c
|
||||
+++ b/drivers/cpufreq/pcc-cpufreq.c
|
||||
@@ -555,8 +555,6 @@ static int pcc_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||
policy->min = policy->cpuinfo.min_freq =
|
||||
ioread32(&pcch_hdr->minimum_frequency) * 1000;
|
||||
|
||||
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
|
||||
-
|
||||
pr_debug("init: policy->max is %d, policy->min is %d\n",
|
||||
policy->max, policy->min);
|
||||
out:
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
From 43034bc4606f1f21186ca6fe27bc0448159d5e00 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Backlund <tmb@mageia.org>
|
||||
Date: Thu, 10 Mar 2016 15:44:13 +0200
|
||||
Subject: [PATCH] Revert "ipmi: Start the timer and thread on internal msgs"
|
||||
|
||||
This reverts commit 0cfec916e86d881e209de4b4ae9959a6271e6660.
|
||||
|
||||
It's reported on ipmi list that Dell R720xd servers will always panic
|
||||
on dell ipmi services load
|
||||
|
||||
Reverting this fixes the issue.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
---
|
||||
drivers/char/ipmi/ipmi_si_intf.c | 73 ++++++++++++++++------------------------
|
||||
1 file changed, 29 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
|
||||
index 4cc72fa..f667be8 100644
|
||||
--- a/drivers/char/ipmi/ipmi_si_intf.c
|
||||
+++ b/drivers/char/ipmi/ipmi_si_intf.c
|
||||
@@ -412,42 +412,18 @@ static enum si_sm_result start_next_msg(struct smi_info *smi_info)
|
||||
return rv;
|
||||
}
|
||||
|
||||
-static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
|
||||
-{
|
||||
- smi_info->last_timeout_jiffies = jiffies;
|
||||
- mod_timer(&smi_info->si_timer, new_val);
|
||||
- smi_info->timer_running = true;
|
||||
-}
|
||||
-
|
||||
-/*
|
||||
- * Start a new message and (re)start the timer and thread.
|
||||
- */
|
||||
-static void start_new_msg(struct smi_info *smi_info, unsigned char *msg,
|
||||
- unsigned int size)
|
||||
-{
|
||||
- smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
|
||||
-
|
||||
- if (smi_info->thread)
|
||||
- wake_up_process(smi_info->thread);
|
||||
-
|
||||
- smi_info->handlers->start_transaction(smi_info->si_sm, msg, size);
|
||||
-}
|
||||
-
|
||||
-static void start_check_enables(struct smi_info *smi_info, bool start_timer)
|
||||
+static void start_check_enables(struct smi_info *smi_info)
|
||||
{
|
||||
unsigned char msg[2];
|
||||
|
||||
msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
|
||||
msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
|
||||
|
||||
- if (start_timer)
|
||||
- start_new_msg(smi_info, msg, 2);
|
||||
- else
|
||||
- smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
|
||||
+ smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
|
||||
smi_info->si_state = SI_CHECKING_ENABLES;
|
||||
}
|
||||
|
||||
-static void start_clear_flags(struct smi_info *smi_info, bool start_timer)
|
||||
+static void start_clear_flags(struct smi_info *smi_info)
|
||||
{
|
||||
unsigned char msg[3];
|
||||
|
||||
@@ -456,10 +432,7 @@ static void start_clear_flags(struct smi_info *smi_info, bool start_timer)
|
||||
msg[1] = IPMI_CLEAR_MSG_FLAGS_CMD;
|
||||
msg[2] = WDT_PRE_TIMEOUT_INT;
|
||||
|
||||
- if (start_timer)
|
||||
- start_new_msg(smi_info, msg, 3);
|
||||
- else
|
||||
- smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
|
||||
+ smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
|
||||
smi_info->si_state = SI_CLEARING_FLAGS;
|
||||
}
|
||||
|
||||
@@ -469,8 +442,10 @@ static void start_getting_msg_queue(struct smi_info *smi_info)
|
||||
smi_info->curr_msg->data[1] = IPMI_GET_MSG_CMD;
|
||||
smi_info->curr_msg->data_size = 2;
|
||||
|
||||
- start_new_msg(smi_info, smi_info->curr_msg->data,
|
||||
- smi_info->curr_msg->data_size);
|
||||
+ smi_info->handlers->start_transaction(
|
||||
+ smi_info->si_sm,
|
||||
+ smi_info->curr_msg->data,
|
||||
+ smi_info->curr_msg->data_size);
|
||||
smi_info->si_state = SI_GETTING_MESSAGES;
|
||||
}
|
||||
|
||||
@@ -480,11 +455,20 @@ static void start_getting_events(struct smi_info *smi_info)
|
||||
smi_info->curr_msg->data[1] = IPMI_READ_EVENT_MSG_BUFFER_CMD;
|
||||
smi_info->curr_msg->data_size = 2;
|
||||
|
||||
- start_new_msg(smi_info, smi_info->curr_msg->data,
|
||||
- smi_info->curr_msg->data_size);
|
||||
+ smi_info->handlers->start_transaction(
|
||||
+ smi_info->si_sm,
|
||||
+ smi_info->curr_msg->data,
|
||||
+ smi_info->curr_msg->data_size);
|
||||
smi_info->si_state = SI_GETTING_EVENTS;
|
||||
}
|
||||
|
||||
+static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
|
||||
+{
|
||||
+ smi_info->last_timeout_jiffies = jiffies;
|
||||
+ mod_timer(&smi_info->si_timer, new_val);
|
||||
+ smi_info->timer_running = true;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* When we have a situtaion where we run out of memory and cannot
|
||||
* allocate messages, we just leave them in the BMC and run the system
|
||||
@@ -494,11 +478,11 @@ static void start_getting_events(struct smi_info *smi_info)
|
||||
* Note that we cannot just use disable_irq(), since the interrupt may
|
||||
* be shared.
|
||||
*/
|
||||
-static inline bool disable_si_irq(struct smi_info *smi_info, bool start_timer)
|
||||
+static inline bool disable_si_irq(struct smi_info *smi_info)
|
||||
{
|
||||
if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
|
||||
smi_info->interrupt_disabled = true;
|
||||
- start_check_enables(smi_info, start_timer);
|
||||
+ start_check_enables(smi_info);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -508,7 +492,7 @@ static inline bool enable_si_irq(struct smi_info *smi_info)
|
||||
{
|
||||
if ((smi_info->irq) && (smi_info->interrupt_disabled)) {
|
||||
smi_info->interrupt_disabled = false;
|
||||
- start_check_enables(smi_info, true);
|
||||
+ start_check_enables(smi_info);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -526,7 +510,7 @@ static struct ipmi_smi_msg *alloc_msg_handle_irq(struct smi_info *smi_info)
|
||||
|
||||
msg = ipmi_alloc_smi_msg();
|
||||
if (!msg) {
|
||||
- if (!disable_si_irq(smi_info, true))
|
||||
+ if (!disable_si_irq(smi_info))
|
||||
smi_info->si_state = SI_NORMAL;
|
||||
} else if (enable_si_irq(smi_info)) {
|
||||
ipmi_free_smi_msg(msg);
|
||||
@@ -542,7 +526,7 @@ static void handle_flags(struct smi_info *smi_info)
|
||||
/* Watchdog pre-timeout */
|
||||
smi_inc_stat(smi_info, watchdog_pretimeouts);
|
||||
|
||||
- start_clear_flags(smi_info, true);
|
||||
+ start_clear_flags(smi_info);
|
||||
smi_info->msg_flags &= ~WDT_PRE_TIMEOUT_INT;
|
||||
if (smi_info->intf)
|
||||
ipmi_smi_watchdog_pretimeout(smi_info->intf);
|
||||
@@ -895,7 +879,8 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
|
||||
msg[0] = (IPMI_NETFN_APP_REQUEST << 2);
|
||||
msg[1] = IPMI_GET_MSG_FLAGS_CMD;
|
||||
|
||||
- start_new_msg(smi_info, msg, 2);
|
||||
+ smi_info->handlers->start_transaction(
|
||||
+ smi_info->si_sm, msg, 2);
|
||||
smi_info->si_state = SI_GETTING_FLAGS;
|
||||
goto restart;
|
||||
}
|
||||
@@ -925,7 +910,7 @@ static enum si_sm_result smi_event_handler(struct smi_info *smi_info,
|
||||
* disable and messages disabled.
|
||||
*/
|
||||
if (smi_info->supports_event_msg_buff || smi_info->irq) {
|
||||
- start_check_enables(smi_info, true);
|
||||
+ start_check_enables(smi_info);
|
||||
} else {
|
||||
smi_info->curr_msg = alloc_msg_handle_irq(smi_info);
|
||||
if (!smi_info->curr_msg)
|
||||
@@ -3635,7 +3620,7 @@ static int try_smi_init(struct smi_info *new_smi)
|
||||
* Start clearing the flags before we enable interrupts or the
|
||||
* timer to avoid racing with the timer.
|
||||
*/
|
||||
- start_clear_flags(new_smi, false);
|
||||
+ start_clear_flags(new_smi);
|
||||
|
||||
/*
|
||||
* IRQ is defined to be set when non-zero. req_events will
|
||||
@@ -3930,7 +3915,7 @@ static void cleanup_one_si(struct smi_info *to_clean)
|
||||
poll(to_clean);
|
||||
schedule_timeout_uninterruptible(1);
|
||||
}
|
||||
- disable_si_irq(to_clean, false);
|
||||
+ disable_si_irq(to_clean);
|
||||
while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
|
||||
poll(to_clean);
|
||||
schedule_timeout_uninterruptible(1);
|
||||
--
|
||||
2.7.2
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
From ca45663819accf038291dbe2d67ed66dc48d714c Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Backlund <tmb@mageia.org>
|
||||
Date: Sun, 29 Nov 2015 14:44:22 +0200
|
||||
Subject: [PATCH] Revert "x86/mm/mtrr: Remove kernel internal MTRR interfaces:
|
||||
unexport mtrr_add() and mtrr_del()"
|
||||
|
||||
This reverts commit 2baa891e42d84159b693eadd44f6fe1486285bdc.
|
||||
|
||||
It currently breaks nvidia304 driver.
|
||||
|
||||
Signed-of-by: Thomas Backlund <tmb@mageia.org>
|
||||
---
|
||||
Documentation/x86/mtrr.txt | 20 ++++----------------
|
||||
arch/x86/kernel/cpu/mtrr/main.c | 2 ++
|
||||
2 files changed, 6 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Documentation/x86/mtrr.txt b/Documentation/x86/mtrr.txt
|
||||
index dc3e703..860bc3a 100644
|
||||
--- a/Documentation/x86/mtrr.txt
|
||||
+++ b/Documentation/x86/mtrr.txt
|
||||
@@ -6,22 +6,10 @@ Luis R. Rodriguez <mcgrof@do-not-panic.com> - April 9, 2015
|
||||
===============================================================================
|
||||
Phasing out MTRR use
|
||||
|
||||
-MTRR use is replaced on modern x86 hardware with PAT. Direct MTRR use by
|
||||
-drivers on Linux is now completely phased out, device drivers should use
|
||||
-arch_phys_wc_add() in combination with ioremap_wc() to make MTRR effective on
|
||||
-non-PAT systems while a no-op but equally effective on PAT enabled systems.
|
||||
-
|
||||
-Even if Linux does not use MTRRs directly, some x86 platform firmware may still
|
||||
-set up MTRRs early before booting the OS. They do this as some platform
|
||||
-firmware may still have implemented access to MTRRs which would be controlled
|
||||
-and handled by the platform firmware directly. An example of platform use of
|
||||
-MTRRs is through the use of SMI handlers, one case could be for fan control,
|
||||
-the platform code would need uncachable access to some of its fan control
|
||||
-registers. Such platform access does not need any Operating System MTRR code in
|
||||
-place other than mtrr_type_lookup() to ensure any OS specific mapping requests
|
||||
-are aligned with platform MTRR setup. If MTRRs are only set up by the platform
|
||||
-firmware code though and the OS does not make any specific MTRR mapping
|
||||
-requests mtrr_type_lookup() should always return MTRR_TYPE_INVALID.
|
||||
+MTRR use is replaced on modern x86 hardware with PAT. Over time the only type
|
||||
+of effective MTRR that is expected to be supported will be for write-combining.
|
||||
+As MTRR use is phased out device drivers should use arch_phys_wc_add() to make
|
||||
+MTRR effective on non-PAT systems while a no-op on PAT enabled systems.
|
||||
|
||||
For details refer to Documentation/x86/pat.txt.
|
||||
|
||||
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
|
||||
index f891b47..e7ed0d8 100644
|
||||
--- a/arch/x86/kernel/cpu/mtrr/main.c
|
||||
+++ b/arch/x86/kernel/cpu/mtrr/main.c
|
||||
@@ -448,6 +448,7 @@ int mtrr_add(unsigned long base, unsigned long size, unsigned int type,
|
||||
return mtrr_add_page(base >> PAGE_SHIFT, size >> PAGE_SHIFT, type,
|
||||
increment);
|
||||
}
|
||||
+EXPORT_SYMBOL(mtrr_add);
|
||||
|
||||
/**
|
||||
* mtrr_del_page - delete a memory type region
|
||||
@@ -536,6 +537,7 @@ int mtrr_del(int reg, unsigned long base, unsigned long size)
|
||||
return -EINVAL;
|
||||
return mtrr_del_page(reg, base >> PAGE_SHIFT, size >> PAGE_SHIFT);
|
||||
}
|
||||
+EXPORT_SYMBOL(mtrr_del);
|
||||
|
||||
/**
|
||||
* arch_phys_wc_add - add a WC MTRR and handle errors if PAT is unavailable
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
Subject: CLEVO M360S acpi irq workaround
|
||||
|
||||
Some Hardware vendor use CLEVO M360S Laptop OEM.
|
||||
This acpi IRQ routing is not correct. we use normal IRQ routing for default.
|
||||
|
||||
Signed-off-by: Go Taniguchi <go@turbolinux.co.jp>
|
||||
|
||||
---
|
||||
arch/x86/kernel/acpi/boot.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/arch/x86/kernel/acpi/boot.c
|
||||
+++ b/arch/x86/kernel/acpi/boot.c
|
||||
@@ -1615,6 +1615,14 @@ static struct dmi_system_id __initdata a
|
||||
},
|
||||
},
|
||||
{
|
||||
+ .callback = disable_acpi_irq,
|
||||
+ .ident = "CLEVO M360S",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "M360S"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
/*
|
||||
* Latest BIOS for IBM 600E (1.16) has bad pcinum
|
||||
* for LPC bridge, which is needed for the PCI
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
Limit Clevo M720SR to C2, going to C3 makes the machine freeze. This
|
||||
needs more investigation, sis chipset/bios problem may be?
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
|
||||
|
||||
---
|
||||
drivers/acpi/processor_idle.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- linux-2.6.33-rc8-git4-t2/drivers/acpi/processor_idle.c.orig 2010-02-20 12:45:35.000000000 +0200
|
||||
+++ linux-2.6.33-rc8-git4-t2/drivers/acpi/processor_idle.c 2010-02-20 12:53:39.679099592 +0200
|
||||
@@ -110,6 +110,9 @@ static struct dmi_system_id __cpuinitdat
|
||||
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
|
||||
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
|
||||
(void *)2},
|
||||
+ { set_max_cstate, "Clevo M720SR", {
|
||||
+ DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME,"M720SR")}, (void *)2},
|
||||
{ set_max_cstate, "Pavilion zv5000", {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME,"Pavilion zv5000 (DS502A#ABA)")},
|
||||
@@ -0,0 +1,37 @@
|
||||
From 56e74338a535cbcc2f2da08b1ea1a92920194364 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandra Yates <alexandra.yates@linux.intel.com>
|
||||
Date: Tue, 3 Nov 2015 14:14:18 -0800
|
||||
Subject: [PATCH] ahci: add new Intel device IDs
|
||||
|
||||
Adding Intel codename Lewisburg platform device IDs for SATA.
|
||||
|
||||
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
---
|
||||
drivers/ata/ahci.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
|
||||
index ff343c4..ff02bb4 100644
|
||||
--- a/drivers/ata/ahci.c
|
||||
+++ b/drivers/ata/ahci.c
|
||||
@@ -314,6 +314,16 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
|
||||
+ { PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa202), board_ahci }, /* Lewisburg AHCI*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa184), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa204), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa18e), board_ahci }, /* Lewisburg RAID*/
|
||||
+ { PCI_VDEVICE(INTEL, 0xa20e), board_ahci }, /* Lewisburg RAID*/
|
||||
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
|
||||
--
|
||||
2.3.10
|
||||
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
From f7c8d3a509e51f4a555371ded4957b225f1818ad Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 2 May 2016 09:06:51 +0200
|
||||
Subject: [PATCH] ARM: bcm2835: dt: Add the ethernet to the device trees
|
||||
|
||||
The hub and the ethernet in its port 1 are hardwired on the board.
|
||||
|
||||
Compared to the adapters that can be plugged into the USB ports, this
|
||||
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
|
||||
has the MAC address for this adapter in its ROM, accessible from its
|
||||
firmware.
|
||||
|
||||
U-Boot can read out the address and set the local-mac-address property of the
|
||||
node with "ethernet" alias. Let's add the node so that U-Boot can do its
|
||||
business.
|
||||
|
||||
Model B rev2 and Model B+ entries were verified by me, the hierarchy and
|
||||
pid/vid pair for the Version 2 was provided by Peter Chen. Original
|
||||
Model B is a blind shot, though very likely correct.
|
||||
|
||||
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 ++
|
||||
7 files changed, 44 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
index ef54050..c3e01ce 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index 86f1f2f..364086a 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
index 4859e9d..4420b09 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
index ff94666..b975f29 100644
|
||||
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2836.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..12c981e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9512";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..3f0a56e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9514";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 8aaf193..04504b7 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -287,6 +287,8 @@
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
reg = <0x7e980000 0x10000>;
|
||||
interrupts = <1 9>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
};
|
||||
|
||||
v3d: v3d@7ec00000 {
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
>From 9f04e51293b130474504216a477bb2a73cbf59e1 Mon Sep 17 00:00:00 2001
|
||||
From: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Date: Thu, 22 Mar 2012 22:29:11 +0200
|
||||
Subject: [PATCH] ata: prefer ata drivers over ide drivers when both are built
|
||||
|
||||
Currently the old IDE drivers are preferred over ATA drivers when both
|
||||
are built, since ide/ is listed first in drivers/Makefile and therefore
|
||||
the IDE drivers end up before ATA drivers in modules.order which is used
|
||||
by depmod/modprobe for module ordering.
|
||||
|
||||
Change it so that ATA drivers are preferred over IDE driver by moving
|
||||
the ide/ entry under ata/ in drivers/Makefile.
|
||||
|
||||
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
---
|
||||
drivers/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/Makefile b/drivers/Makefile
|
||||
index 932e8bf..e8df3d0 100644
|
||||
--- a/drivers/Makefile
|
||||
+++ b/drivers/Makefile
|
||||
@@ -69,10 +69,10 @@ obj-$(CONFIG_LIBNVDIMM) += nvdimm/
|
||||
obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
|
||||
obj-$(CONFIG_NUBUS) += nubus/
|
||||
obj-y += macintosh/
|
||||
-obj-$(CONFIG_IDE) += ide/
|
||||
obj-$(CONFIG_SCSI) += scsi/
|
||||
obj-y += nvme/
|
||||
obj-$(CONFIG_ATA) += ata/
|
||||
+obj-$(CONFIG_IDE) += ide/
|
||||
obj-$(CONFIG_TARGET_CORE) += target/
|
||||
obj-$(CONFIG_MTD) += mtd/
|
||||
obj-$(CONFIG_SPI) += spi/
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
|
||||
Devicetree is enabled on 32bit kernels for OLPC support,
|
||||
but this causes error messages:
|
||||
|
||||
'Failed to find cpu0 device node' that breaks bootsplash.
|
||||
|
||||
https://bugs.mageia.org/show_bug.cgi?id=16655#c39
|
||||
https://bugs.mageia.org/show_bug.cgi?id=17010
|
||||
|
||||
So hide them behind debug for cleaner boot.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
|
||||
--- linux/drivers/base/cacheinfo.c.orig
|
||||
+++ linux/drivers/base/cacheinfo.c
|
||||
@@ -53,12 +53,12 @@
|
||||
return 0;
|
||||
|
||||
if (!cpu_dev) {
|
||||
- pr_err("No cpu device for CPU %d\n", cpu);
|
||||
+ pr_debug("No cpu device for CPU %d\n", cpu);
|
||||
return -ENODEV;
|
||||
}
|
||||
np = cpu_dev->of_node;
|
||||
if (!np) {
|
||||
- pr_err("Failed to find cpu%d device node\n", cpu);
|
||||
+ pr_debug("Failed to find cpu%d device node\n", cpu);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
*/
|
||||
ret = cache_shared_cpu_map_setup(cpu);
|
||||
if (ret) {
|
||||
- pr_warn("Unable to detect cache hierarchy from DT for CPU %d\n",
|
||||
+ pr_debug("Unable to detect cache hierarchy from DT for CPU %d\n",
|
||||
cpu);
|
||||
goto free_ci;
|
||||
}
|
||||
@@ -540,7 +540,7 @@
|
||||
rc = cache_add_dev(cpu);
|
||||
if (rc) {
|
||||
free_cache_attributes(cpu);
|
||||
- pr_err("error populating cacheinfo..cpu%d\n", cpu);
|
||||
+ pr_debug("error populating cacheinfo..cpu%d\n", cpu);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
From 41c0126b3f22ef36b97b3c38b8f29569848a5ce2 Mon Sep 17 00:00:00 2001
|
||||
From: Tahsin Erdogan <tahsin@google.com>
|
||||
Date: Tue, 19 May 2015 13:55:21 -0700
|
||||
Subject: block: Make CFQ default to IOPS mode on SSDs
|
||||
|
||||
CFQ idling causes reduced IOPS throughput on non-rotational disks.
|
||||
Since disk head seeking is not applicable to SSDs, it doesn't really
|
||||
help performance by anticipating future near-by IO requests.
|
||||
|
||||
By turning off idling (and switching to IOPS mode), we allow other
|
||||
processes to dispatch IO requests down to the driver and so increase IO
|
||||
throughput.
|
||||
|
||||
Following FIO benchmark results were taken on a cloud SSD offering with
|
||||
idling on and off:
|
||||
|
||||
Idling iops avg-lat(ms) stddev bw
|
||||
------------------------------------------------------
|
||||
On 7054 90.107 38.697 28217KB/s
|
||||
Off 29255 21.836 11.730 117022KB/s
|
||||
|
||||
fio --name=temp --size=100G --time_based --ioengine=libaio \
|
||||
--randrepeat=0 --direct=1 --invalidate=1 --verify=0 \
|
||||
--verify_fatal=0 --rw=randread --blocksize=4k --group_reporting=1 \
|
||||
--filename=/dev/sdb --runtime=10 --iodepth=64 --numjobs=10
|
||||
|
||||
And the following is from a local SSD run:
|
||||
|
||||
Idling iops avg-lat(ms) stddev bw
|
||||
------------------------------------------------------
|
||||
On 19320 33.043 14.068 77281KB/s
|
||||
Off 21626 29.465 12.662 86507KB/s
|
||||
|
||||
fio --name=temp --size=5G --time_based --ioengine=libaio \
|
||||
--randrepeat=0 --direct=1 --invalidate=1 --verify=0 \
|
||||
--verify_fatal=0 --rw=randread --blocksize=4k --group_reporting=1 \
|
||||
--filename=/fio_data --runtime=10 --iodepth=64 --numjobs=10
|
||||
|
||||
Reviewed-by: Nauman Rafique <nauman@google.com>
|
||||
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
|
||||
Signed-off-by: Jens Axboe <axboe@fb.com>
|
||||
|
||||
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
|
||||
index 5da8e6e..402be01 100644
|
||||
--- a/block/cfq-iosched.c
|
||||
+++ b/block/cfq-iosched.c
|
||||
@@ -4460,7 +4460,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
|
||||
cfqd->cfq_slice[1] = cfq_slice_sync;
|
||||
cfqd->cfq_target_latency = cfq_target_latency;
|
||||
cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
|
||||
- cfqd->cfq_slice_idle = cfq_slice_idle;
|
||||
+ cfqd->cfq_slice_idle = blk_queue_nonrot(q) ? 0 : cfq_slice_idle;
|
||||
cfqd->cfq_group_idle = cfq_group_idle;
|
||||
cfqd->cfq_latency = 1;
|
||||
cfqd->hw_tag = -1;
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
Disable floppy autoloading as it makes systems without real hw,
|
||||
but that has the pnp headers hang.
|
||||
|
||||
See https://bugs.mageia.org/show_bug.cgi?id=4696
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
diff -Nurp linux-3.3.3-rc1/drivers/block/floppy.c.orig linux-3.3.3-rc1/drivers/block/floppy.c
|
||||
--- linux-3.3.3-rc1/drivers/block/floppy.c.orig 2012-03-19 01:15:34.000000000 +0200
|
||||
+++ linux-3.3.3-rc1/drivers/block/floppy.c 2012-04-22 02:58:10.238498303 +0300
|
||||
@@ -4621,8 +4621,7 @@ static const struct pnp_device_id floppy
|
||||
{"PNP0700", 0},
|
||||
{}
|
||||
};
|
||||
-
|
||||
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
|
||||
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
|
||||
|
||||
#else
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
agp/intel: add new host bridge id for Q57 system
|
||||
|
||||
Add new Host Bridge ID found on a Q57 based system from Positivo. I
|
||||
don't know what abbreviation id for this would be best, may be Q_HB
|
||||
instead of UNKNOWN currently used would be better.
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
|
||||
[ rebased for 3.8-rc3 /tmb ]
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
Removed the parts of the patch that are already applied in the kernel by
|
||||
the commit 67384fe3fd450536342330f684ea1f7dcaef8130:
|
||||
"char/agp: add another Ironlake host bridge"
|
||||
|
||||
Rediffed for kernel 3.10.24.
|
||||
|
||||
Signed-off-by: Eugene A. Shatokhin <eugene.shatokhin@rosalab.ru>
|
||||
|
||||
drivers/char/agp/intel-gtt.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff -Nurp linux-3.8-rc3/drivers/char/agp/intel-gtt.c linux-3.8-rc3.q57/drivers/char/agp/intel-gtt.c
|
||||
--- linux-3.8-rc3/drivers/char/agp/intel-gtt.c 2013-01-10 08:17:09.690594184 +0200
|
||||
+++ linux-3.8-rc3.q57/drivers/char/agp/intel-gtt.c 2013-01-10 08:38:56.649888839 +0200
|
||||
@@ -1303,6 +1303,8 @@ static const struct intel_gtt_driver_des
|
||||
&g4x_gtt_driver },
|
||||
{ PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG,
|
||||
"HD Graphics", &ironlake_gtt_driver },
|
||||
+ { PCI_DEVICE_ID_INTEL_IRONLAKE_D2_HB,
|
||||
+ "HD Graphics", &ironlake_gtt_driver },
|
||||
{ PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG,
|
||||
"HD Graphics", &ironlake_gtt_driver },
|
||||
{ 0, NULL, NULL }
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
This patch adds module aliases for matching the old dm-raid45 patch
|
||||
by heinzm@redhat.com carried by kernel-tmb series in order to make
|
||||
sure there is an upgrade path.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
drivers/md/dm-raid.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- linux-2.6.38.2-mga2/drivers/md/dm-raid.c.orig 2011-03-15 03:20:32.000000000 +0200
|
||||
+++ linux-2.6.38.2-mga2/drivers/md/dm-raid.c 2011-04-02 21:52:21.331302590 +0300
|
||||
@@ -693,5 +693,7 @@ MODULE_DESCRIPTION(DM_NAME " raid4/5/6 t
|
||||
MODULE_ALIAS("dm-raid4");
|
||||
MODULE_ALIAS("dm-raid5");
|
||||
MODULE_ALIAS("dm-raid6");
|
||||
+MODULE_ALIAS("dm-raid45");
|
||||
+MODULE_ALIAS("dm-raid4-5");
|
||||
MODULE_AUTHOR("Neil Brown <dm-devel@redhat.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
|
||||
This patch adds missing module aliases for the old ieee1394 stack
|
||||
to make it easier for endusers.
|
||||
|
||||
Note: firewire-sbp2 and firewire-ohci already contains the needed aliases.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
diff -Nurp linux-2.6.38.4/drivers/firewire/core-transaction.c linux-2.6.38.4.fw/drivers/firewire/core-transaction.c
|
||||
--- linux-2.6.38.4/drivers/firewire/core-transaction.c 2011-03-15 03:20:32.000000000 +0200
|
||||
+++ linux-2.6.38.4.fw/drivers/firewire/core-transaction.c 2011-04-22 16:22:28.461386738 +0300
|
||||
@@ -1174,6 +1174,9 @@ static struct fw_address_handler registe
|
||||
MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
|
||||
MODULE_DESCRIPTION("Core IEEE1394 transaction logic");
|
||||
MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS("ieee1394");
|
||||
+MODULE_ALIAS("raw1394");
|
||||
+MODULE_ALIAS("video1394");
|
||||
|
||||
static const u32 vendor_textual_descriptor[] = {
|
||||
/* textual descriptor leaf () */
|
||||
diff -Nurp linux-2.6.38.4/drivers/firewire/net.c linux-2.6.38.4.fw/drivers/firewire/net.c
|
||||
--- linux-2.6.38.4/drivers/firewire/net.c 2011-03-15 03:20:32.000000000 +0200
|
||||
+++ linux-2.6.38.4.fw/drivers/firewire/net.c 2011-04-22 16:20:34.008883920 +0300
|
||||
@@ -1719,3 +1719,4 @@ MODULE_AUTHOR("Jay Fenlason <fenlason@re
|
||||
MODULE_DESCRIPTION("IP over IEEE1394 as per RFC 2734/3146");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(ieee1394, fwnet_id_table);
|
||||
+MODULE_ALIAS("eth1394");
|
||||
@@ -0,0 +1,394 @@
|
||||
|
||||
fs/aufs/Kconfig | 2 +-
|
||||
fs/dcache.c | 1 +
|
||||
fs/exec.c | 1 +
|
||||
fs/fcntl.c | 1 +
|
||||
fs/file_table.c | 4 ++++
|
||||
fs/inode.c | 1 +
|
||||
fs/namespace.c | 2 ++
|
||||
fs/notify/group.c | 4 ++++
|
||||
fs/notify/mark.c | 4 ++++
|
||||
fs/open.c | 2 ++
|
||||
fs/read_write.c | 2 ++
|
||||
fs/splice.c | 2 ++
|
||||
fs/xattr.c | 1 +
|
||||
kernel/task_work.c | 1 +
|
||||
security/commoncap.c | 2 ++
|
||||
security/device_cgroup.c | 2 ++
|
||||
security/security.c | 10 ++++++++++
|
||||
17 files changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/aufs/Kconfig linux-4.7-rc6-aufs-mod/fs/aufs/Kconfig
|
||||
--- linux-4.7-rc6-aufs/fs/aufs/Kconfig 2016-07-04 19:02:29.246286120 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/aufs/Kconfig 2016-07-04 19:03:53.653714965 +0300
|
||||
@@ -1,5 +1,5 @@
|
||||
config AUFS_FS
|
||||
- bool "Aufs (Advanced multi layered unification filesystem) support"
|
||||
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
|
||||
help
|
||||
Aufs is a stackable unification filesystem such as Unionfs,
|
||||
which unifies several directories and provides a merged single
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/dcache.c linux-4.7-rc6-aufs-mod/fs/dcache.c
|
||||
--- linux-4.7-rc6-aufs/fs/dcache.c 2016-07-04 19:02:29.260286196 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/dcache.c 2016-07-04 19:03:53.653714965 +0300
|
||||
@@ -1310,6 +1310,7 @@ rename_retry:
|
||||
seq = 1;
|
||||
goto again;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(d_walk);
|
||||
|
||||
/*
|
||||
* Search for at least 1 mount point in the dentry's subdirs.
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/exec.c linux-4.7-rc6-aufs-mod/fs/exec.c
|
||||
--- linux-4.7-rc6-aufs/fs/exec.c 2016-07-04 17:58:15.707773651 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/exec.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -104,6 +104,7 @@ bool path_noexec(const struct path *path
|
||||
return (path->mnt->mnt_flags & MNT_NOEXEC) ||
|
||||
(path->mnt->mnt_sb->s_iflags & SB_I_NOEXEC);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(path_noexec);
|
||||
|
||||
#ifdef CONFIG_USELIB
|
||||
/*
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/fcntl.c linux-4.7-rc6-aufs-mod/fs/fcntl.c
|
||||
--- linux-4.7-rc6-aufs/fs/fcntl.c 2016-07-04 19:02:29.260286196 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/fcntl.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -82,6 +82,7 @@ int setfl(int fd, struct file * filp, un
|
||||
out:
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(setfl);
|
||||
|
||||
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
|
||||
int force)
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/file_table.c linux-4.7-rc6-aufs-mod/fs/file_table.c
|
||||
--- linux-4.7-rc6-aufs/fs/file_table.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/file_table.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -147,6 +147,7 @@ over:
|
||||
}
|
||||
return ERR_PTR(-ENFILE);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(get_empty_filp);
|
||||
|
||||
/**
|
||||
* alloc_file - allocate and initialize a 'struct file'
|
||||
@@ -258,6 +259,7 @@ void flush_delayed_fput(void)
|
||||
{
|
||||
delayed_fput(NULL);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(flush_delayed_fput);
|
||||
|
||||
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
|
||||
|
||||
@@ -300,6 +302,7 @@ void __fput_sync(struct file *file)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(fput);
|
||||
+EXPORT_SYMBOL_GPL(__fput_sync);
|
||||
|
||||
void put_filp(struct file *file)
|
||||
{
|
||||
@@ -308,6 +311,7 @@ void put_filp(struct file *file)
|
||||
file_free(file);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(put_filp);
|
||||
|
||||
void __init files_init(void)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/inode.c linux-4.7-rc6-aufs-mod/fs/inode.c
|
||||
--- linux-4.7-rc6-aufs/fs/inode.c 2016-07-04 19:02:29.261286202 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/inode.c 2016-07-04 20:51:39.805168596 +0300
|
||||
@@ -1600,6 +1600,7 @@ int update_time(struct inode *inode, str
|
||||
|
||||
return update_time(inode, time, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(update_time);
|
||||
|
||||
/**
|
||||
* touch_atime - update the access time
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/namespace.c linux-4.7-rc6-aufs-mod/fs/namespace.c
|
||||
--- linux-4.7-rc6-aufs/fs/namespace.c 2016-07-04 17:58:15.729773645 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/namespace.c 2016-07-04 19:03:53.654714970 +0300
|
||||
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *m
|
||||
mnt_dec_writers(real_mount(mnt));
|
||||
preempt_enable();
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__mnt_drop_write);
|
||||
|
||||
/**
|
||||
* mnt_drop_write - give up write access to a mount
|
||||
@@ -1812,6 +1813,7 @@ int iterate_mounts(int (*f)(struct vfsmo
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(iterate_mounts);
|
||||
|
||||
static void cleanup_group_ids(struct mount *mnt, struct mount *end)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/notify/group.c linux-4.7-rc6-aufs-mod/fs/notify/group.c
|
||||
--- linux-4.7-rc6-aufs/fs/notify/group.c 2016-07-04 17:58:15.742773641 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/notify/group.c 2016-07-04 19:03:53.655714975 +0300
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/wait.h>
|
||||
+#include <linux/module.h>
|
||||
|
||||
#include <linux/fsnotify_backend.h>
|
||||
#include "fsnotify.h"
|
||||
@@ -81,6 +82,7 @@ void fsnotify_get_group(struct fsnotify_
|
||||
{
|
||||
atomic_inc(&group->refcnt);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_get_group);
|
||||
|
||||
/*
|
||||
* Drop a reference to a group. Free it if it's through.
|
||||
@@ -90,6 +92,7 @@ void fsnotify_put_group(struct fsnotify_
|
||||
if (atomic_dec_and_test(&group->refcnt))
|
||||
fsnotify_final_destroy_group(group);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
|
||||
|
||||
/*
|
||||
* Create a new fsnotify_group and hold a reference for the group returned.
|
||||
@@ -118,6 +121,7 @@ struct fsnotify_group *fsnotify_alloc_gr
|
||||
|
||||
return group;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
|
||||
|
||||
int fsnotify_fasync(int fd, struct file *file, int on)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/notify/mark.c linux-4.7-rc6-aufs-mod/fs/notify/mark.c
|
||||
--- linux-4.7-rc6-aufs/fs/notify/mark.c 2016-07-04 17:58:15.742773641 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/notify/mark.c 2016-07-04 19:03:53.655714975 +0300
|
||||
@@ -113,6 +113,7 @@ void fsnotify_put_mark(struct fsnotify_m
|
||||
mark->free_mark(mark);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
|
||||
|
||||
/* Calculate mask of events for a list of marks */
|
||||
u32 fsnotify_recalc_mask(struct hlist_head *head)
|
||||
@@ -230,6 +231,7 @@ void fsnotify_destroy_mark(struct fsnoti
|
||||
mutex_unlock(&group->mark_mutex);
|
||||
fsnotify_free_mark(mark);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
|
||||
|
||||
void fsnotify_destroy_marks(struct hlist_head *head, spinlock_t *lock)
|
||||
{
|
||||
@@ -415,6 +417,7 @@ err:
|
||||
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
|
||||
|
||||
int fsnotify_add_mark(struct fsnotify_mark *mark, struct fsnotify_group *group,
|
||||
struct inode *inode, struct vfsmount *mnt, int allow_dups)
|
||||
@@ -521,6 +524,7 @@ void fsnotify_duplicate_mark(struct fsno
|
||||
new->mask = old->mask;
|
||||
new->free_mark = old->free_mark;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
|
||||
|
||||
/*
|
||||
* Nothing fancy, just initialize lists and locks and counters.
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/open.c linux-4.7-rc6-aufs-mod/fs/open.c
|
||||
--- linux-4.7-rc6-aufs/fs/open.c 2016-07-04 17:58:15.746773640 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/open.c 2016-07-04 19:03:53.655714975 +0300
|
||||
@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, l
|
||||
inode_unlock(dentry->d_inode);
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_truncate);
|
||||
|
||||
long vfs_truncate(const struct path *path, loff_t length)
|
||||
{
|
||||
@@ -678,6 +679,7 @@ int open_check_o_direct(struct file *f)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(open_check_o_direct);
|
||||
|
||||
static int do_dentry_open(struct file *f,
|
||||
struct inode *inode,
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/read_write.c linux-4.7-rc6-aufs-mod/fs/read_write.c
|
||||
--- linux-4.7-rc6-aufs/fs/read_write.c 2016-07-04 19:02:29.262286207 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/read_write.c 2016-07-04 19:03:53.655714975 +0300
|
||||
@@ -525,6 +525,7 @@ vfs_readf_t vfs_readf(struct file *file)
|
||||
return new_sync_read;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_readf);
|
||||
|
||||
vfs_writef_t vfs_writef(struct file *file)
|
||||
{
|
||||
@@ -536,6 +537,7 @@ vfs_writef_t vfs_writef(struct file *fil
|
||||
return new_sync_write;
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_writef);
|
||||
|
||||
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/splice.c linux-4.7-rc6-aufs-mod/fs/splice.c
|
||||
--- linux-4.7-rc6-aufs/fs/splice.c 2016-07-04 19:02:29.262286207 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/splice.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -1124,6 +1124,7 @@ long do_splice_from(struct pipe_inode_in
|
||||
|
||||
return splice_write(pipe, out, ppos, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_from);
|
||||
|
||||
/*
|
||||
* Attempt to initiate a splice from a file to a pipe.
|
||||
@@ -1153,6 +1154,7 @@ long do_splice_to(struct file *in, loff_
|
||||
|
||||
return splice_read(in, ppos, pipe, len, flags);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(do_splice_to);
|
||||
|
||||
/**
|
||||
* splice_direct_to_actor - splices data directly between two non-pipes
|
||||
diff -Nurp linux-4.7-rc6-aufs/fs/xattr.c linux-4.7-rc6-aufs-mod/fs/xattr.c
|
||||
--- linux-4.7-rc6-aufs/fs/xattr.c 2016-07-04 17:58:15.754773638 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/fs/xattr.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry
|
||||
*xattr_value = value;
|
||||
return error;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(vfs_getxattr_alloc);
|
||||
|
||||
ssize_t
|
||||
vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
|
||||
diff -Nurp linux-4.7-rc6-aufs/kernel/task_work.c linux-4.7-rc6-aufs-mod/kernel/task_work.c
|
||||
--- linux-4.7-rc6-aufs/kernel/task_work.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/kernel/task_work.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -118,3 +118,4 @@ void task_work_run(void)
|
||||
} while (work);
|
||||
}
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(task_work_run);
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/commoncap.c linux-4.7-rc6-aufs-mod/security/commoncap.c
|
||||
--- linux-4.7-rc6-aufs/security/commoncap.c 2016-07-04 17:58:15.945773585 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/commoncap.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -1058,12 +1058,14 @@ int cap_mmap_addr(unsigned long addr)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_addr);
|
||||
|
||||
int cap_mmap_file(struct file *file, unsigned long reqprot,
|
||||
unsigned long prot, unsigned long flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(cap_mmap_file);
|
||||
|
||||
#ifdef CONFIG_SECURITY
|
||||
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/device_cgroup.c linux-4.7-rc6-aufs-mod/security/device_cgroup.c
|
||||
--- linux-4.7-rc6-aufs/security/device_cgroup.c 2016-05-16 01:43:13.000000000 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/device_cgroup.c 2016-07-04 19:03:53.656714979 +0300
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/device_cgroup.h>
|
||||
#include <linux/cgroup.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/export.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -849,6 +850,7 @@ int __devcgroup_inode_permission(struct
|
||||
return __devcgroup_check_permission(type, imajor(inode), iminor(inode),
|
||||
access);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
|
||||
|
||||
int devcgroup_inode_mknod(int mode, dev_t dev)
|
||||
{
|
||||
diff -Nurp linux-4.7-rc6-aufs/security/security.c linux-4.7-rc6-aufs-mod/security/security.c
|
||||
--- linux-4.7-rc6-aufs/security/security.c 2016-07-04 17:58:15.948773584 +0300
|
||||
+++ linux-4.7-rc6-aufs-mod/security/security.c 2016-07-04 19:03:53.657714984 +0300
|
||||
@@ -434,6 +434,7 @@ int security_path_rmdir(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_rmdir, 0, dir, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_rmdir);
|
||||
|
||||
int security_path_unlink(const struct path *dir, struct dentry *dentry)
|
||||
{
|
||||
@@ -450,6 +451,7 @@ int security_path_symlink(const struct p
|
||||
return 0;
|
||||
return call_int_hook(path_symlink, 0, dir, dentry, old_name);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_symlink);
|
||||
|
||||
int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
|
||||
struct dentry *new_dentry)
|
||||
@@ -458,6 +460,7 @@ int security_path_link(struct dentry *ol
|
||||
return 0;
|
||||
return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_link);
|
||||
|
||||
int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
|
||||
const struct path *new_dir, struct dentry *new_dentry,
|
||||
@@ -485,6 +488,7 @@ int security_path_truncate(const struct
|
||||
return 0;
|
||||
return call_int_hook(path_truncate, 0, path);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_truncate);
|
||||
|
||||
int security_path_chmod(const struct path *path, umode_t mode)
|
||||
{
|
||||
@@ -492,6 +496,7 @@ int security_path_chmod(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chmod, 0, path, mode);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chmod);
|
||||
|
||||
int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
|
||||
{
|
||||
@@ -499,6 +504,7 @@ int security_path_chown(const struct pat
|
||||
return 0;
|
||||
return call_int_hook(path_chown, 0, path, uid, gid);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_path_chown);
|
||||
|
||||
int security_path_chroot(const struct path *path)
|
||||
{
|
||||
@@ -584,6 +590,7 @@ int security_inode_readlink(struct dentr
|
||||
return 0;
|
||||
return call_int_hook(inode_readlink, 0, dentry);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_readlink);
|
||||
|
||||
int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
|
||||
bool rcu)
|
||||
@@ -599,6 +606,7 @@ int security_inode_permission(struct ino
|
||||
return 0;
|
||||
return call_int_hook(inode_permission, 0, inode, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_inode_permission);
|
||||
|
||||
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
@@ -737,6 +745,7 @@ int security_file_permission(struct file
|
||||
|
||||
return fsnotify_perm(file, mask);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_file_permission);
|
||||
|
||||
int security_file_alloc(struct file *file)
|
||||
{
|
||||
@@ -796,6 +805,7 @@ int security_mmap_file(struct file *file
|
||||
return ret;
|
||||
return ima_file_mmap(file, prot);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(security_mmap_file);
|
||||
|
||||
int security_mmap_addr(unsigned long addr)
|
||||
{
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
Mark as 4.7 so we can rebuild aufs tools with matching 4.7 check
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
--- linux/include/uapi/linux/aufs_type.h.orig
|
||||
+++ linux/include/uapi/linux/aufs_type.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <linux/limits.h>
|
||||
|
||||
-#define AUFS_VERSION "4.x-rcN"
|
||||
+#define AUFS_VERSION "4.7"
|
||||
|
||||
/* todo? move this to linux-2.6.19/include/magic.h */
|
||||
#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
|
||||
File diff suppressed because it is too large
Load Diff
+45
@@ -0,0 +1,45 @@
|
||||
From 6a7fd522a7c94cdef0a3b08acf8e6702056e635c Mon Sep 17 00:00:00 2001
|
||||
From: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Date: Mon, 4 Jul 2016 11:03:00 -0400
|
||||
Subject: [PATCH] ext4: don't call ext4_should_journal_data() on the journal
|
||||
inode
|
||||
|
||||
If ext4_fill_super() fails early, it's possible for ext4_evict_inode()
|
||||
to call ext4_should_journal_data() before superblock options and flags
|
||||
are fully set up. In that case, the iput() on the journal inode can
|
||||
end up causing a BUG().
|
||||
|
||||
Work around this problem by reordering the tests so we only call
|
||||
ext4_should_journal_data() after we know it's not the journal inode.
|
||||
|
||||
Fixes: 2d859db3e4 ("ext4: fix data corruption in inodes with journalled data")
|
||||
Fixes: 2b405bfa84 ("ext4: fix data=journal fast mount/umount hang")
|
||||
Cc: Jan Kara <jack@suse.cz>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
Reviewed-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 321a31c..ea39d19 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -211,9 +211,9 @@ void ext4_evict_inode(struct inode *inode)
|
||||
* Note that directories do not have this problem because they
|
||||
* don't use page cache.
|
||||
*/
|
||||
- if (ext4_should_journal_data(inode) &&
|
||||
- (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) &&
|
||||
- inode->i_ino != EXT4_JOURNAL_INO) {
|
||||
+ if (inode->i_ino != EXT4_JOURNAL_INO &&
|
||||
+ ext4_should_journal_data(inode) &&
|
||||
+ (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) {
|
||||
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
|
||||
tid_t commit_tid = EXT4_I(inode)->i_datasync_tid;
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
From 646caa9c8e196880b41cd3e3d33a2ebc752bdb85 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Kara <jack@suse.cz>
|
||||
Date: Mon, 4 Jul 2016 10:14:01 -0400
|
||||
Subject: [PATCH] ext4: fix deadlock during page writeback
|
||||
|
||||
Commit 06bd3c36a733 (ext4: fix data exposure after a crash) uncovered a
|
||||
deadlock in ext4_writepages() which was previously much harder to hit.
|
||||
After this commit xfstest generic/130 reproduces the deadlock on small
|
||||
filesystems.
|
||||
|
||||
The problem happens when ext4_do_update_inode() sets LARGE_FILE feature
|
||||
and marks current inode handle as synchronous. That subsequently results
|
||||
in ext4_journal_stop() called from ext4_writepages() to block waiting for
|
||||
transaction commit while still holding page locks, reference to io_end,
|
||||
and some prepared bio in mpd structure each of which can possibly block
|
||||
transaction commit from completing and thus results in deadlock.
|
||||
|
||||
Fix the problem by releasing page locks, io_end reference, and
|
||||
submitting prepared bio before calling ext4_journal_stop().
|
||||
|
||||
[ Changed to defer the call to ext4_journal_stop() only if the handle
|
||||
is synchronous. --tytso ]
|
||||
|
||||
Reported-and-tested-by: Eryu Guan <eguan@redhat.com>
|
||||
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
||||
CC: stable@vger.kernel.org
|
||||
Signed-off-by: Jan Kara <jack@suse.cz>
|
||||
---
|
||||
fs/ext4/inode.c | 29 ++++++++++++++++++++++++++---
|
||||
1 file changed, 26 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
|
||||
index 44ee5d9..321a31c 100644
|
||||
--- a/fs/ext4/inode.c
|
||||
+++ b/fs/ext4/inode.c
|
||||
@@ -2754,13 +2754,36 @@ retry:
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
- ext4_journal_stop(handle);
|
||||
+ /*
|
||||
+ * Caution: If the handle is synchronous,
|
||||
+ * ext4_journal_stop() can wait for transaction commit
|
||||
+ * to finish which may depend on writeback of pages to
|
||||
+ * complete or on page lock to be released. In that
|
||||
+ * case, we have to wait until after after we have
|
||||
+ * submitted all the IO, released page locks we hold,
|
||||
+ * and dropped io_end reference (for extent conversion
|
||||
+ * to be able to complete) before stopping the handle.
|
||||
+ */
|
||||
+ if (!ext4_handle_valid(handle) || handle->h_sync == 0) {
|
||||
+ ext4_journal_stop(handle);
|
||||
+ handle = NULL;
|
||||
+ }
|
||||
/* Submit prepared bio */
|
||||
ext4_io_submit(&mpd.io_submit);
|
||||
/* Unlock pages we didn't use */
|
||||
mpage_release_unused_pages(&mpd, give_up_on_write);
|
||||
- /* Drop our io_end reference we got from init */
|
||||
- ext4_put_io_end(mpd.io_submit.io_end);
|
||||
+ /*
|
||||
+ * Drop our io_end reference we got from init. We have
|
||||
+ * to be careful and use deferred io_end finishing if
|
||||
+ * we are still holding the transaction as we can
|
||||
+ * release the last reference to io_end which may end
|
||||
+ * up doing unwritten extent conversion.
|
||||
+ */
|
||||
+ if (handle) {
|
||||
+ ext4_put_io_end_defer(mpd.io_submit.io_end);
|
||||
+ ext4_journal_stop(handle);
|
||||
+ } else
|
||||
+ ext4_put_io_end(mpd.io_submit.io_end);
|
||||
|
||||
if (ret == -ENOSPC && sbi->s_journal) {
|
||||
/*
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
Adapt mach64 to build with 2.6.31 series kernels
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
|
||||
|
||||
diff -urp linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_dma.c linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_dma.c
|
||||
--- linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_dma.c 2009-07-23 00:24:12.000000000 +0300
|
||||
+++ linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_dma.c 2009-07-23 02:28:21.000000000 +0300
|
||||
@@ -1006,7 +1006,7 @@ static int mach64_do_dma_init(struct drm
|
||||
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
- dev_priv = drm_alloc(sizeof(drm_mach64_private_t), DRM_MEM_DRIVER);
|
||||
+ dev_priv = kmalloc(sizeof(drm_mach64_private_t), GFP_KERNEL);
|
||||
if (dev_priv == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1386,8 +1386,7 @@ int mach64_do_cleanup_dma(struct drm_dev
|
||||
|
||||
mach64_destroy_freelist(dev);
|
||||
|
||||
- drm_free(dev_priv, sizeof(drm_mach64_private_t),
|
||||
- DRM_MEM_DRIVER);
|
||||
+ kfree(dev_priv);
|
||||
dev->dev_private = NULL;
|
||||
}
|
||||
|
||||
@@ -1476,8 +1475,8 @@ int mach64_init_freelist(struct drm_devi
|
||||
for (i = 0; i < dma->buf_count; i++) {
|
||||
if ((entry =
|
||||
(drm_mach64_freelist_t *)
|
||||
- drm_alloc(sizeof(drm_mach64_freelist_t),
|
||||
- DRM_MEM_BUFLISTS)) == NULL)
|
||||
+ kmalloc(sizeof(drm_mach64_freelist_t),
|
||||
+ GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
memset(entry, 0, sizeof(drm_mach64_freelist_t));
|
||||
entry->buf = dma->buflist[i];
|
||||
@@ -1500,18 +1499,18 @@ void mach64_destroy_freelist(struct drm_
|
||||
list_for_each_safe(ptr, tmp, &dev_priv->pending) {
|
||||
list_del(ptr);
|
||||
entry = list_entry(ptr, drm_mach64_freelist_t, list);
|
||||
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
|
||||
+ kfree(entry);
|
||||
}
|
||||
list_for_each_safe(ptr, tmp, &dev_priv->placeholders) {
|
||||
list_del(ptr);
|
||||
entry = list_entry(ptr, drm_mach64_freelist_t, list);
|
||||
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
|
||||
+ kfree(entry);
|
||||
}
|
||||
|
||||
list_for_each_safe(ptr, tmp, &dev_priv->free_list) {
|
||||
list_del(ptr);
|
||||
entry = list_entry(ptr, drm_mach64_freelist_t, list);
|
||||
- drm_free(entry, sizeof(*entry), DRM_MEM_BUFLISTS);
|
||||
+ kfree(entry);
|
||||
}
|
||||
}
|
||||
|
||||
diff -urp linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_state.c linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_state.c
|
||||
--- linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64/mach64_state.c 2009-07-23 00:24:12.000000000 +0300
|
||||
+++ linux-2.6.31-rc3-git5-mnb1/drivers/gpu/drm/mach64.fixed/mach64_state.c 2009-07-23 02:29:24.000000000 +0300
|
||||
@@ -490,12 +490,12 @@ static __inline__ int copy_from_user_ver
|
||||
unsigned long n = bytes; /* dwords remaining in buffer */
|
||||
u32 *from, *orig_from;
|
||||
|
||||
- from = drm_alloc(bytes, DRM_MEM_DRIVER);
|
||||
+ from = kmalloc(bytes, GFP_KERNEL);
|
||||
if (from == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
if (DRM_COPY_FROM_USER(from, ufrom, bytes)) {
|
||||
- drm_free(from, bytes, DRM_MEM_DRIVER);
|
||||
+ kfree(from);
|
||||
return -EFAULT;
|
||||
}
|
||||
orig_from = from; /* we'll be modifying the "from" ptr, so save it */
|
||||
@@ -526,19 +526,19 @@ static __inline__ int copy_from_user_ver
|
||||
to += count;
|
||||
} else {
|
||||
DRM_ERROR("Got bad command: 0x%04x\n", reg);
|
||||
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
|
||||
+ kfree(orig_from);
|
||||
return -EACCES;
|
||||
}
|
||||
} else {
|
||||
DRM_ERROR
|
||||
("Got bad command count(=%u) dwords remaining=%lu\n",
|
||||
count, n);
|
||||
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
|
||||
+ kfree(orig_from);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
- drm_free(orig_from, bytes, DRM_MEM_DRIVER);
|
||||
+ kfree(orig_from);
|
||||
if (n == 0)
|
||||
return 0;
|
||||
else {
|
||||
@@ -0,0 +1,27 @@
|
||||
--- linux-2.6.35/drivers/gpu/drm/mach64/mach64_state.c.orig 2010-10-03 13:29:10.000000000 +0300
|
||||
+++ linux-2.6.35/drivers/gpu/drm/mach64/mach64_state.c 2010-10-03 14:04:45.991164007 +0300
|
||||
@@ -41,15 +41,15 @@
|
||||
*
|
||||
*/
|
||||
struct drm_ioctl_desc mach64_ioctls[] = {
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_INIT, mach64_dma_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_CLEAR, mach64_dma_clear, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_SWAP, mach64_dma_swap, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_IDLE, mach64_dma_idle, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_RESET, mach64_engine_reset, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_VERTEX, mach64_dma_vertex, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_BLIT, mach64_dma_blit, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_FLUSH, mach64_dma_flush, DRM_AUTH),
|
||||
- DRM_IOCTL_DEF(DRM_MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_INIT, mach64_dma_init, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_CLEAR, mach64_dma_clear, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_SWAP, mach64_dma_swap, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_IDLE, mach64_dma_idle, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_RESET, mach64_engine_reset, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_VERTEX, mach64_dma_vertex, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_BLIT, mach64_dma_blit, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_FLUSH, mach64_dma_flush, DRM_AUTH),
|
||||
+ DRM_IOCTL_DEF_DRV(MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
|
||||
};
|
||||
|
||||
int mach64_max_ioctl = DRM_ARRAY_SIZE(mach64_ioctls);
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
Fix build for 2.6.37
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
|
||||
|
||||
--- a/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-01-02 16:55:48.000000000 +0200
|
||||
+++ a/drivers/gpu/drm/mach64/mach64_drv.c 2011-01-02 17:53:54.808775632 +0200
|
||||
@@ -51,8 +51,6 @@ static struct drm_driver driver = {
|
||||
.irq_uninstall = mach64_driver_irq_uninstall,
|
||||
.irq_handler = mach64_driver_irq_handler,
|
||||
.reclaim_buffers = drm_core_reclaim_buffers,
|
||||
- .get_map_ofs = drm_core_get_map_ofs,
|
||||
- .get_reg_ofs = drm_core_get_reg_ofs,
|
||||
.ioctls = mach64_ioctls,
|
||||
.dma_ioctl = mach64_dma_buffers,
|
||||
.fops = {
|
||||
@@ -63,6 +61,7 @@ static struct drm_driver driver = {
|
||||
.mmap = drm_mmap,
|
||||
.poll = drm_poll,
|
||||
.fasync = drm_fasync,
|
||||
+ .llseek = noop_llseek,
|
||||
},
|
||||
.pci_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
fix build with linux-3.0
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
drivers/gpu/drm/mach64/mach64_drv.c | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-07-15 02:48:40.000000000 +0300
|
||||
+++ a/drivers/gpu/drm/mach64/mach64_drv.c 2011-07-15 13:24:41.454753025 +0300
|
||||
@@ -63,10 +63,6 @@ static struct drm_driver driver = {
|
||||
.fasync = drm_fasync,
|
||||
.llseek = noop_llseek,
|
||||
},
|
||||
- .pci_driver = {
|
||||
- .name = DRIVER_NAME,
|
||||
- .id_table = pciidlist,
|
||||
- },
|
||||
|
||||
.name = DRIVER_NAME,
|
||||
.desc = DRIVER_DESC,
|
||||
@@ -76,15 +72,20 @@ static struct drm_driver driver = {
|
||||
.patchlevel = DRIVER_PATCHLEVEL,
|
||||
};
|
||||
|
||||
+static struct pci_driver mach64_pci_driver = {
|
||||
+ .name = DRIVER_NAME,
|
||||
+ .id_table = pciidlist,
|
||||
+};
|
||||
+
|
||||
static int __init mach64_init(void)
|
||||
{
|
||||
driver.num_ioctls = mach64_max_ioctl;
|
||||
- return drm_init(&driver);
|
||||
+ return drm_pci_init(&driver, &mach64_pci_driver);
|
||||
}
|
||||
|
||||
static void __exit mach64_exit(void)
|
||||
{
|
||||
- drm_exit(&driver);
|
||||
+ drm_pci_exit(&driver, &mach64_pci_driver);
|
||||
}
|
||||
|
||||
module_init(mach64_init);
|
||||
@@ -0,0 +1,17 @@
|
||||
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2013-10-13 12:19:41.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2013-10-13 14:27:25.684247911 +0300
|
||||
@@ -46,13 +46,12 @@ static const struct file_operations mach
|
||||
.unlocked_ioctl = drm_ioctl,
|
||||
.mmap = drm_mmap,
|
||||
.poll = drm_poll,
|
||||
- .fasync = drm_fasync,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
- DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
|
||||
+ DRIVER_USE_AGP | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
|
||||
| DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED,
|
||||
.lastclose = mach64_driver_lastclose,
|
||||
.get_vblank_counter = mach64_get_vblank_counter,
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
Adapt for kernel-3.17
|
||||
|
||||
DRM_ARRAY_SIZE is a duplicate of ARRAY_SIZE and have been dropped.
|
||||
|
||||
drm_dev_to_irq has been dropped, so call dev->pdev->irq directly
|
||||
for code simplicity.
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
diff -urp linux/drivers/gpu/drm/mach64/mach64_state.c.orig linux/drivers/gpu/drm/mach64/mach64_state.c
|
||||
--- linux/drivers/gpu/drm/mach64/mach64_state.c.orig
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_state.c
|
||||
@@ -52,7 +52,7 @@ struct drm_ioctl_desc mach64_ioctls[] =
|
||||
DRM_IOCTL_DEF_DRV(MACH64_GETPARAM, mach64_get_param, DRM_AUTH),
|
||||
};
|
||||
|
||||
-int mach64_max_ioctl = DRM_ARRAY_SIZE(mach64_ioctls);
|
||||
+int mach64_max_ioctl = ARRAY_SIZE(mach64_ioctls);
|
||||
|
||||
/* ================================================================
|
||||
* DMA hardware state programming functions
|
||||
@@ -895,7 +895,7 @@ int mach64_get_param(struct drm_device *
|
||||
value = mach64_do_get_frames_queued(dev_priv);
|
||||
break;
|
||||
case MACH64_PARAM_IRQ_NR:
|
||||
- value = drm_dev_to_irq(dev);
|
||||
+ value = dev->pdev->irq;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -0,0 +1,142 @@
|
||||
|
||||
Fix build with kernel 3.18
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_dma.c linux/drivers/gpu/drm/mach64/mach64_dma.c
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_dma.c 2014-11-29 22:01:54.000000000 +0200
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_dma.c 2014-11-30 00:02:06.906821818 +0200
|
||||
@@ -1038,21 +1038,21 @@ static int mach64_do_dma_init(struct drm
|
||||
INIT_LIST_HEAD(&dev_priv->placeholders);
|
||||
INIT_LIST_HEAD(&dev_priv->pending);
|
||||
|
||||
- dev_priv->sarea = drm_getsarea(dev);
|
||||
+ dev_priv->sarea = drm_legacy_getsarea(dev);
|
||||
if (!dev_priv->sarea) {
|
||||
DRM_ERROR("can not find sarea!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
mach64_do_cleanup_dma(dev);
|
||||
return -EINVAL;
|
||||
}
|
||||
- dev_priv->fb = drm_core_findmap(dev, init->fb_offset);
|
||||
+ dev_priv->fb = drm_legacy_findmap(dev, init->fb_offset);
|
||||
if (!dev_priv->fb) {
|
||||
DRM_ERROR("can not find frame buffer map!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
mach64_do_cleanup_dma(dev);
|
||||
return -EINVAL;
|
||||
}
|
||||
- dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset);
|
||||
+ dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset);
|
||||
if (!dev_priv->mmio) {
|
||||
DRM_ERROR("can not find mmio map!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
@@ -1060,7 +1060,7 @@ static int mach64_do_dma_init(struct drm
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- dev_priv->ring_map = drm_core_findmap(dev, init->ring_offset);
|
||||
+ dev_priv->ring_map = drm_legacy_findmap(dev, init->ring_offset);
|
||||
if (!dev_priv->ring_map) {
|
||||
DRM_ERROR("can not find ring map!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
@@ -1072,7 +1072,7 @@ static int mach64_do_dma_init(struct drm
|
||||
((u8 *) dev_priv->sarea->handle + init->sarea_priv_offset);
|
||||
|
||||
if (!dev_priv->is_pci) {
|
||||
- drm_core_ioremap(dev_priv->ring_map, dev);
|
||||
+ drm_legacy_ioremap(dev_priv->ring_map, dev);
|
||||
if (!dev_priv->ring_map->handle) {
|
||||
DRM_ERROR("can not ioremap virtual address for"
|
||||
" descriptor ring\n");
|
||||
@@ -1082,7 +1082,7 @@ static int mach64_do_dma_init(struct drm
|
||||
}
|
||||
dev->agp_buffer_token = init->buffers_offset;
|
||||
dev->agp_buffer_map =
|
||||
- drm_core_findmap(dev, init->buffers_offset);
|
||||
+ drm_legacy_findmap(dev, init->buffers_offset);
|
||||
if (!dev->agp_buffer_map) {
|
||||
DRM_ERROR("can not find dma buffer map!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
@@ -1093,7 +1093,7 @@ static int mach64_do_dma_init(struct drm
|
||||
dev isn't passed all the way though the mach64 - DA */
|
||||
dev_priv->dev_buffers = dev->agp_buffer_map;
|
||||
|
||||
- drm_core_ioremap(dev->agp_buffer_map, dev);
|
||||
+ drm_legacy_ioremap(dev->agp_buffer_map, dev);
|
||||
if (!dev->agp_buffer_map->handle) {
|
||||
DRM_ERROR("can not ioremap virtual address for"
|
||||
" dma buffer\n");
|
||||
@@ -1102,7 +1102,7 @@ static int mach64_do_dma_init(struct drm
|
||||
return -ENOMEM;
|
||||
}
|
||||
dev_priv->agp_textures =
|
||||
- drm_core_findmap(dev, init->agp_textures_offset);
|
||||
+ drm_legacy_findmap(dev, init->agp_textures_offset);
|
||||
if (!dev_priv->agp_textures) {
|
||||
DRM_ERROR("can not find agp texture region!\n");
|
||||
dev->dev_private = (void *)dev_priv;
|
||||
@@ -1376,10 +1376,10 @@ int mach64_do_cleanup_dma(struct drm_dev
|
||||
|
||||
if (!dev_priv->is_pci) {
|
||||
if (dev_priv->ring_map)
|
||||
- drm_core_ioremapfree(dev_priv->ring_map, dev);
|
||||
+ drm_legacy_ioremapfree(dev_priv->ring_map, dev);
|
||||
|
||||
if (dev->agp_buffer_map) {
|
||||
- drm_core_ioremapfree(dev->agp_buffer_map, dev);
|
||||
+ drm_legacy_ioremapfree(dev->agp_buffer_map, dev);
|
||||
dev->agp_buffer_map = NULL;
|
||||
}
|
||||
}
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.c linux/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.c 2014-11-29 22:01:54.000000000 +0200
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2014-11-29 23:14:21.918009653 +0200
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "mach64_drv.h"
|
||||
|
||||
#include <drm/drm_pciids.h>
|
||||
+#include <drm/drm_legacy.h>
|
||||
|
||||
static struct pci_device_id pciidlist[] = {
|
||||
mach64_PCI_IDS
|
||||
@@ -44,7 +45,7 @@ static const struct file_operations mach
|
||||
.open = drm_open,
|
||||
.release = drm_release,
|
||||
.unlocked_ioctl = drm_ioctl,
|
||||
- .mmap = drm_mmap,
|
||||
+ .mmap = drm_legacy_mmap,
|
||||
.poll = drm_poll,
|
||||
.llseek = noop_llseek,
|
||||
};
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.h linux/drivers/gpu/drm/mach64/mach64_drv.h
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.h 2014-11-29 22:01:54.000000000 +0200
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.h 2014-11-29 23:58:20.111491646 +0200
|
||||
@@ -35,6 +35,8 @@
|
||||
#ifndef __MACH64_DRV_H__
|
||||
#define __MACH64_DRV_H__
|
||||
|
||||
+#include <drm/drm_legacy.h>
|
||||
+
|
||||
/* General customization:
|
||||
*/
|
||||
|
||||
@@ -102,12 +104,12 @@ typedef struct drm_mach64_private {
|
||||
u32 back_offset_pitch;
|
||||
u32 depth_offset_pitch;
|
||||
|
||||
- drm_local_map_t *sarea;
|
||||
- drm_local_map_t *fb;
|
||||
- drm_local_map_t *mmio;
|
||||
- drm_local_map_t *ring_map;
|
||||
- drm_local_map_t *dev_buffers; /* this is a pointer to a structure in dev */
|
||||
- drm_local_map_t *agp_textures;
|
||||
+ struct drm_local_map *sarea;
|
||||
+ struct drm_local_map *fb;
|
||||
+ struct drm_local_map *mmio;
|
||||
+ struct drm_local_map *ring_map;
|
||||
+ struct drm_local_map *dev_buffers; /* this is a pointer to a structure in dev */
|
||||
+ struct drm_local_map *agp_textures;
|
||||
} drm_mach64_private_t;
|
||||
|
||||
extern struct drm_ioctl_desc mach64_ioctls[];
|
||||
@@ -0,0 +1,47 @@
|
||||
|
||||
This moves the .fops to a separate struct as required by kernel-3.3
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
b/drivers/gpu/drm/mach64/mach64_drv.c | 23 ++++++++++++-----------
|
||||
1 file changed, 12 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
+++ b/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
@@ -39,6 +39,17 @@ static struct pci_device_id pciidlist[]
|
||||
mach64_PCI_IDS
|
||||
};
|
||||
|
||||
+static const struct file_operations mach64_driver_fops = {
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .open = drm_open,
|
||||
+ .release = drm_release,
|
||||
+ .unlocked_ioctl = drm_ioctl,
|
||||
+ .mmap = drm_mmap,
|
||||
+ .poll = drm_poll,
|
||||
+ .fasync = drm_fasync,
|
||||
+ .llseek = noop_llseek,
|
||||
+};
|
||||
+
|
||||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
|
||||
@@ -54,17 +65,7 @@ static struct drm_driver driver = {
|
||||
.reclaim_buffers = drm_core_reclaim_buffers,
|
||||
.ioctls = mach64_ioctls,
|
||||
.dma_ioctl = mach64_dma_buffers,
|
||||
- .fops = {
|
||||
- .owner = THIS_MODULE,
|
||||
- .open = drm_open,
|
||||
- .release = drm_release,
|
||||
- .unlocked_ioctl = drm_ioctl,
|
||||
- .mmap = drm_mmap,
|
||||
- .poll = drm_poll,
|
||||
- .fasync = drm_fasync,
|
||||
- .llseek = noop_llseek,
|
||||
- },
|
||||
-
|
||||
+ .fops = &mach64_driver_fops,
|
||||
.name = DRIVER_NAME,
|
||||
.desc = DRIVER_DESC,
|
||||
.date = DRIVER_DATE,
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
reclaim_buffers is gone in 3.6
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2012-10-17 22:26:58.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2012-10-17 23:05:10.212566630 +0300
|
||||
@@ -62,7 +62,6 @@ static struct drm_driver driver = {
|
||||
.irq_postinstall = mach64_driver_irq_postinstall,
|
||||
.irq_uninstall = mach64_driver_irq_uninstall,
|
||||
.irq_handler = mach64_driver_irq_handler,
|
||||
- .reclaim_buffers = drm_core_reclaim_buffers,
|
||||
.ioctls = mach64_ioctls,
|
||||
.dma_ioctl = mach64_dma_buffers,
|
||||
.fops = &mach64_driver_fops,
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_dma.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_dma.c
|
||||
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_dma.c 2012-12-06 19:50:10.000000000 +0200
|
||||
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_dma.c 2012-12-06 20:19:10.590681644 +0200
|
||||
@@ -34,8 +34,8 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
-#include "drmP.h"
|
||||
-#include "drm.h"
|
||||
+#include <drm/drmP.h>
|
||||
+#include <drm/drm.h>
|
||||
#include "mach64_drm.h"
|
||||
#include "mach64_drv.h"
|
||||
|
||||
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_drv.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_drv.c 2012-12-06 19:50:10.000000000 +0200
|
||||
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_drv.c 2012-12-06 20:20:13.062073838 +0200
|
||||
@@ -28,12 +28,12 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
-#include "drmP.h"
|
||||
-#include "drm.h"
|
||||
+#include <drm/drmP.h>
|
||||
+#include <drm/drm.h>
|
||||
#include "mach64_drm.h"
|
||||
#include "mach64_drv.h"
|
||||
|
||||
-#include "drm_pciids.h"
|
||||
+#include <drm/drm_pciids.h>
|
||||
|
||||
static struct pci_device_id pciidlist[] = {
|
||||
mach64_PCI_IDS
|
||||
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_irq.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_irq.c
|
||||
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_irq.c 2012-12-06 19:50:10.000000000 +0200
|
||||
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_irq.c 2012-12-06 20:20:40.192678476 +0200
|
||||
@@ -35,8 +35,8 @@
|
||||
* Leif Delgass <ldelgass@retinalburn.net>
|
||||
*/
|
||||
|
||||
-#include "drmP.h"
|
||||
-#include "drm.h"
|
||||
+#include <drm/drmP.h>
|
||||
+#include <drm/drm.h>
|
||||
#include "mach64_drm.h"
|
||||
#include "mach64_drv.h"
|
||||
|
||||
diff -Nurp linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_state.c linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_state.c
|
||||
--- linux-3.7-rc8/drivers/gpu/drm/mach64.orig/mach64_state.c 2012-12-06 19:50:10.000000000 +0200
|
||||
+++ linux-3.7-rc8/drivers/gpu/drm/mach64/mach64_state.c 2012-12-06 20:21:00.783137370 +0200
|
||||
@@ -30,8 +30,8 @@
|
||||
* José Fonseca <j_r_fonseca@yahoo.co.uk>
|
||||
*/
|
||||
|
||||
-#include "drmP.h"
|
||||
-#include "drm.h"
|
||||
+#include <drm/drmP.h>
|
||||
+#include <drm/drm.h>
|
||||
#include "mach64_drm.h"
|
||||
#include "mach64_drv.h"
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
Update mach64 for changes in drm_ioctl done in 2.6.33:
|
||||
"drm: convert drm_ioctl to unlocked_ioctl" (commit ed8b670)
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
---
|
||||
drivers/gpu/drm/mach64/mach64_drv.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff -p -up linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c.orig linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
--- linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c.orig 2010-03-16 19:27:22.517068880 -0300
|
||||
+++ linux-2.6.33/drivers/gpu/drm/mach64/mach64_drv.c 2010-03-16 19:27:54.890318416 -0300
|
||||
@@ -59,7 +59,7 @@ static struct drm_driver driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = drm_open,
|
||||
.release = drm_release,
|
||||
- .ioctl = drm_ioctl,
|
||||
+ .unlocked_ioctl = drm_ioctl,
|
||||
.mmap = drm_mmap,
|
||||
.poll = drm_poll,
|
||||
.fasync = drm_fasync,
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
diff -p -up linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c.orig linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c
|
||||
--- linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c.orig 2010-01-06 11:35:13.784843304 -0200
|
||||
+++ linux-2.6.32/drivers/gpu/drm/mach64/mach64_dma.c 2010-01-06 11:37:50.793843502 -0200
|
||||
@@ -835,7 +835,7 @@ static int mach64_bm_dma_test(struct drm
|
||||
/* FIXME: get a dma buffer from the freelist here */
|
||||
DRM_DEBUG("Allocating data memory ...\n");
|
||||
cpu_addr_dmah =
|
||||
- drm_pci_alloc(dev, 0x1000, 0x1000, 0xfffffffful);
|
||||
+ drm_pci_alloc(dev, 0x1000, 0x1000);
|
||||
if (!cpu_addr_dmah) {
|
||||
DRM_INFO("data-memory allocation failed!\n");
|
||||
return -ENOMEM;
|
||||
@@ -0,0 +1,97 @@
|
||||
Fix/cleanup mach64 drm module for building with current kernel.
|
||||
|
||||
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
||||
|
||||
---
|
||||
drivers/gpu/drm/mach64/mach64_dma.c | 9 +--------
|
||||
drivers/gpu/drm/mach64/mach64_drv.c | 11 +----------
|
||||
drivers/gpu/drm/mach64/mach64_state.c | 4 ++--
|
||||
3 files changed, 4 insertions(+), 20 deletions(-)
|
||||
|
||||
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c
|
||||
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c.orig 2008-12-10 12:19:14.000000000 -0500
|
||||
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_dma.c 2008-12-10 13:34:19.000000000 -0500
|
||||
@@ -834,14 +834,8 @@ static int mach64_bm_dma_test(struct drm
|
||||
|
||||
/* FIXME: get a dma buffer from the freelist here */
|
||||
DRM_DEBUG("Allocating data memory ...\n");
|
||||
-#ifdef __FreeBSD__
|
||||
- DRM_UNLOCK();
|
||||
-#endif
|
||||
cpu_addr_dmah =
|
||||
drm_pci_alloc(dev, 0x1000, 0x1000, 0xfffffffful);
|
||||
-#ifdef __FreeBSD__
|
||||
- DRM_LOCK();
|
||||
-#endif
|
||||
if (!cpu_addr_dmah) {
|
||||
DRM_INFO("data-memory allocation failed!\n");
|
||||
return -ENOMEM;
|
||||
@@ -1375,8 +1369,7 @@ int mach64_do_cleanup_dma(struct drm_dev
|
||||
* may not have been called from userspace and after dev_private
|
||||
* is freed, it's too late.
|
||||
*/
|
||||
- if (dev->irq)
|
||||
- drm_irq_uninstall(dev);
|
||||
+ drm_irq_uninstall(dev);
|
||||
|
||||
if (dev->dev_private) {
|
||||
drm_mach64_private_t *dev_priv = dev->dev_private;
|
||||
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c
|
||||
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c.orig 2008-12-10 12:13:13.000000000 -0500
|
||||
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_drv.c 2008-12-10 12:16:54.000000000 -0500
|
||||
@@ -38,7 +38,6 @@ static struct pci_device_id pciidlist[]
|
||||
mach64_PCI_IDS
|
||||
};
|
||||
|
||||
-static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||
static struct drm_driver driver = {
|
||||
.driver_features =
|
||||
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_HAVE_DMA
|
||||
@@ -68,8 +67,6 @@ static struct drm_driver driver = {
|
||||
.pci_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.id_table = pciidlist,
|
||||
- .probe = probe,
|
||||
- .remove = __devexit_p(drm_cleanup_pci),
|
||||
},
|
||||
|
||||
.name = DRIVER_NAME,
|
||||
@@ -80,16 +77,10 @@ static struct drm_driver driver = {
|
||||
.patchlevel = DRIVER_PATCHLEVEL,
|
||||
};
|
||||
|
||||
-static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
-{
|
||||
- return drm_get_dev(pdev, ent, &driver);
|
||||
-}
|
||||
-
|
||||
-
|
||||
static int __init mach64_init(void)
|
||||
{
|
||||
driver.num_ioctls = mach64_max_ioctl;
|
||||
- return drm_init(&driver, pciidlist);
|
||||
+ return drm_init(&driver);
|
||||
}
|
||||
|
||||
static void __exit mach64_exit(void)
|
||||
diff -p -up linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c.orig linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c
|
||||
--- linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c.orig 2008-12-10 12:13:13.000000000 -0500
|
||||
+++ linux-2.6.28/drivers/gpu/drm/mach64/mach64_state.c 2008-12-10 13:38:54.000000000 -0500
|
||||
@@ -455,7 +455,7 @@ static int mach64_do_get_frames_queued(d
|
||||
head = ring->head;
|
||||
|
||||
start = (MACH64_MAX_QUEUED_FRAMES -
|
||||
- DRM_MIN(MACH64_MAX_QUEUED_FRAMES, sarea_priv->frames_queued));
|
||||
+ min(MACH64_MAX_QUEUED_FRAMES, sarea_priv->frames_queued));
|
||||
|
||||
if (head == tail) {
|
||||
sarea_priv->frames_queued = 0;
|
||||
@@ -895,7 +895,7 @@ int mach64_get_param(struct drm_device *
|
||||
value = mach64_do_get_frames_queued(dev_priv);
|
||||
break;
|
||||
case MACH64_PARAM_IRQ_NR:
|
||||
- value = dev->irq;
|
||||
+ value = drm_dev_to_irq(dev);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -0,0 +1,10 @@
|
||||
--- linux/drivers/gpu/drm/mach64/mach64_drv.c.orig 2011-12-25 00:48:42.814932355 +0200
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.c 2011-12-25 00:47:43.393625260 +0200
|
||||
@@ -27,6 +27,7 @@
|
||||
* Leif Delgass <ldelgass@retinalburn.net>
|
||||
*/
|
||||
|
||||
+#include <linux/module.h>
|
||||
#include "drmP.h"
|
||||
#include "drm.h"
|
||||
#include "mach64_drm.h"
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
|
||||
Fix build with kernel-3.14
|
||||
|
||||
Signed-off-by: Thomas Backlund <tmb@mageia.org>
|
||||
|
||||
drivers/gpu/drm/mach64/mach64_dma.c | 10 +++++-----
|
||||
drivers/gpu/drm/mach64/mach64_drv.h | 2 +-
|
||||
drivers/gpu/drm/mach64/mach64_irq.c | 2 +-
|
||||
drivers/gpu/drm/mach64/mach64_state.c | 6 +++---
|
||||
4 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_dma.c linux/drivers/gpu/drm/mach64/mach64_dma.c
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_dma.c 2014-04-26 19:10:55.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_dma.c 2014-04-26 20:26:05.263501325 +0300
|
||||
@@ -696,9 +696,9 @@ do { \
|
||||
DRM_INFO( "ADVANCE_RING() wr=0x%06x tail=0x%06x\n", \
|
||||
_ring_write, _ring_tail ); \
|
||||
} \
|
||||
- DRM_MEMORYBARRIER(); \
|
||||
+ mb(); \
|
||||
mach64_clear_dma_eol( &_ring[(_ring_tail - 2) & _ring_mask] ); \
|
||||
- DRM_MEMORYBARRIER(); \
|
||||
+ mb(); \
|
||||
dev_priv->ring.tail = _ring_write; \
|
||||
mach64_ring_tick( dev_priv, &(dev_priv)->ring ); \
|
||||
} while (0)
|
||||
@@ -912,7 +912,7 @@ static int mach64_bm_dma_test(struct drm
|
||||
DRM_DEBUG(" data[%d] = 0x%08x\n", i, data[i]);
|
||||
}
|
||||
|
||||
- DRM_MEMORYBARRIER();
|
||||
+ mb();
|
||||
|
||||
DRM_DEBUG("waiting for idle...\n");
|
||||
if ((i = mach64_do_wait_for_idle(dev_priv))) {
|
||||
@@ -1716,10 +1716,10 @@ static int mach64_dma_get_buffers(struct
|
||||
|
||||
buf->file_priv = file_priv;
|
||||
|
||||
- if (DRM_COPY_TO_USER(&d->request_indices[i], &buf->idx,
|
||||
+ if (copy_to_user(&d->request_indices[i], &buf->idx,
|
||||
sizeof(buf->idx)))
|
||||
return -EFAULT;
|
||||
- if (DRM_COPY_TO_USER(&d->request_sizes[i], &buf->total,
|
||||
+ if (copy_to_user(&d->request_sizes[i], &buf->total,
|
||||
sizeof(buf->total)))
|
||||
return -EFAULT;
|
||||
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_drv.h linux/drivers/gpu/drm/mach64/mach64_drv.h
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_drv.h 2014-04-26 19:10:55.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_drv.h 2014-04-26 20:28:43.693457652 +0300
|
||||
@@ -166,7 +166,7 @@ extern int mach64_get_param(struct drm_d
|
||||
extern u32 mach64_get_vblank_counter(struct drm_device *dev, int crtc);
|
||||
extern int mach64_enable_vblank(struct drm_device *dev, int crtc);
|
||||
extern void mach64_disable_vblank(struct drm_device *dev, int crtc);
|
||||
-extern irqreturn_t mach64_driver_irq_handler(DRM_IRQ_ARGS);
|
||||
+extern irqreturn_t mach64_driver_irq_handler(int irq, void *arg);
|
||||
extern void mach64_driver_irq_preinstall(struct drm_device *dev);
|
||||
extern int mach64_driver_irq_postinstall(struct drm_device *dev);
|
||||
extern void mach64_driver_irq_uninstall(struct drm_device *dev);
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_irq.c linux/drivers/gpu/drm/mach64/mach64_irq.c
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_irq.c 2014-04-26 19:10:55.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_irq.c 2014-04-26 20:32:01.464898140 +0300
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "mach64_drm.h"
|
||||
#include "mach64_drv.h"
|
||||
|
||||
-irqreturn_t mach64_driver_irq_handler(DRM_IRQ_ARGS)
|
||||
+irqreturn_t mach64_driver_irq_handler(int irq, void *arg)
|
||||
{
|
||||
struct drm_device *dev = arg;
|
||||
drm_mach64_private_t *dev_priv = dev->dev_private;
|
||||
diff -urp linux/drivers/gpu/drm/mach64.orig/mach64_state.c linux/drivers/gpu/drm/mach64/mach64_state.c
|
||||
--- linux/drivers/gpu/drm/mach64.orig/mach64_state.c 2014-04-26 19:10:55.000000000 +0300
|
||||
+++ linux/drivers/gpu/drm/mach64/mach64_state.c 2014-04-26 20:07:16.701527488 +0300
|
||||
@@ -494,7 +494,7 @@ static __inline__ int copy_from_user_ver
|
||||
if (from == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
- if (DRM_COPY_FROM_USER(from, ufrom, bytes)) {
|
||||
+ if (copy_from_user(from, ufrom, bytes)) {
|
||||
kfree(from);
|
||||
return -EFAULT;
|
||||
}
|
||||
@@ -640,7 +640,7 @@ static __inline__ int copy_from_user_bli
|
||||
{
|
||||
to = (u32 *)((char *)to + MACH64_HOSTDATA_BLIT_OFFSET);
|
||||
|
||||
- if (DRM_COPY_FROM_USER(to, ufrom, bytes)) {
|
||||
+ if (copy_from_user(to, ufrom, bytes)) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@@ -901,7 +901,7 @@ int mach64_get_param(struct drm_device *
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- if (DRM_COPY_TO_USER(param->value, &value, sizeof(int))) {
|
||||
+ if (copy_to_user(param->value, &value, sizeof(int))) {
|
||||
DRM_ERROR("copy_to_user\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
Theese got dropped in 3.12-rc
|
||||
|
||||
Restore for now to get the mach64 driver to build
|
||||
|
||||
TODO: Need to check mesa & drm if it's dropped there too...
|
||||
|
||||
--- linux/include/drm/drm_pciids.h.orig 2013-10-13 11:05:33.000000000 +0300
|
||||
+++ linux/include/drm/drm_pciids.h 2013-10-13 14:30:43.625995248 +0300
|
||||
@@ -711,6 +711,29 @@
|
||||
{0x102b, 0x2527, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MGA_CARD_TYPE_G550}, \
|
||||
{0, 0, 0}
|
||||
|
||||
+#define mach64_PCI_IDS \
|
||||
+ {0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4744, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c51, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x474c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x474f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4752, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4753, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x474d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x474e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c52, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
+ {0, 0, 0}
|
||||
+
|
||||
#define sisdrv_PCI_IDS \
|
||||
{0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
{0x1039, 0x5300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
|
||||
File diff suppressed because it is too large
Load Diff
+37
@@ -0,0 +1,37 @@
|
||||
Subject: Add blacklist of usb hid modules
|
||||
|
||||
IBM Blade Center HS20 can connect PS2 kerboard and mouse, It is USB emulation.
|
||||
This devices need HID_QUIRK_IGNORE option.
|
||||
|
||||
This patch is workaround.
|
||||
|
||||
[ rediffed for 2.6.28 -- herton ]
|
||||
Signed-off-by: Go Taniguchi <go@turbolinux.co.jp>
|
||||
|
||||
---
|
||||
drivers/hid/hid-core.c | 2 ++
|
||||
drivers/hid/hid-ids.h | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -2062,6 +2062,8 @@ static const struct hid_device_id hid_ig
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_IBM, 0x4001) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_IBM, 0x4002) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_410) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_510) },
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -46,6 +46,8 @@
|
||||
#define USB_VENDOR_ID_AFATECH 0x15a4
|
||||
#define USB_DEVICE_ID_AFATECH_AF9016 0x9016
|
||||
|
||||
+#define USB_VENDOR_ID_IBM 0x04b3
|
||||
+
|
||||
#define USB_VENDOR_ID_AIPTEK 0x08ca
|
||||
#define USB_DEVICE_ID_AIPTEK_01 0x0001
|
||||
#define USB_DEVICE_ID_AIPTEK_10 0x0010
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
From fc8a601e1175ae351f662506030f9939cb7fdbfe Mon Sep 17 00:00:00 2001
|
||||
From: Alex Hung <alex.hung@canonical.com>
|
||||
Date: Mon, 13 Jun 2016 19:44:00 +0800
|
||||
Subject: [PATCH] hp-wmi: Fix wifi cannot be hard-unblocked
|
||||
|
||||
Several users reported wifi cannot be unblocked as discussed in [1].
|
||||
This patch removes the use of the 2009 flag by BIOS but uses the actual
|
||||
WMI function calls - it will be skipped if WMI reports unsupported.
|
||||
|
||||
[1] https://bugzilla.kernel.org/show_bug.cgi?id=69131
|
||||
|
||||
Signed-off-by: Alex Hung <alex.hung@canonical.com>
|
||||
Tested-by: Evgenii Shatokhin <eugene.shatokhin@yandex.ru>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
|
||||
---
|
||||
drivers/platform/x86/hp-wmi.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
|
||||
index 6f145f2..96ffda4 100644
|
||||
--- a/drivers/platform/x86/hp-wmi.c
|
||||
+++ b/drivers/platform/x86/hp-wmi.c
|
||||
@@ -718,6 +718,11 @@ static int __init hp_wmi_rfkill_setup(struct platform_device *device)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
+ err = hp_wmi_perform_query(HPWMI_WIRELESS_QUERY, 1, &wireless,
|
||||
+ sizeof(wireless), 0);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
if (wireless & 0x1) {
|
||||
wifi_rfkill = rfkill_alloc("hp-wifi", &device->dev,
|
||||
RFKILL_TYPE_WLAN,
|
||||
@@ -882,7 +887,7 @@ static int __init hp_wmi_bios_setup(struct platform_device *device)
|
||||
wwan_rfkill = NULL;
|
||||
rfkill2_count = 0;
|
||||
|
||||
- if (hp_wmi_bios_2009_later() || hp_wmi_rfkill_setup(device))
|
||||
+ if (hp_wmi_rfkill_setup(device))
|
||||
hp_wmi_rfkill2_setup(device);
|
||||
|
||||
err = device_create_file(&device->dev, &dev_attr_display);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
drivers/ide/sis5513.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff -p -up linux-2.6.28/drivers/ide/sis5513.c.orig linux-2.6.28/drivers/ide/sis5513.c
|
||||
--- linux-2.6.28/drivers/ide/sis5513.c.orig 2008-12-08 12:41:13.000000000 -0500
|
||||
+++ linux-2.6.28/drivers/ide/sis5513.c 2008-12-08 12:51:32.000000000 -0500
|
||||
@@ -412,6 +412,15 @@ static int __devinit sis_find_family(str
|
||||
pci_name(dev));
|
||||
}
|
||||
}
|
||||
+ else if (trueid == 0x180) { /* sis965L */
|
||||
+ u16 pci_command;
|
||||
+ pci_read_config_word(dev, PCI_COMMAND, &pci_command);
|
||||
+ pci_command &= ~PCI_COMMAND_INTX_DISABLE;
|
||||
+ pci_write_config_word(dev, PCI_COMMAND, pci_command);
|
||||
+ chipset_family = ATA_133;
|
||||
+ printk(KERN_INFO DRV_NAME " %s: SiS 965 IDE UDMA133 controller\n",
|
||||
+ pci_name(dev));
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!chipset_family) { /* Belongs to pci-quirks */
|
||||
@@ -0,0 +1,19 @@
|
||||
From Thierry Vignaud <tvignaud@mandriva.com> (Mandriva)
|
||||
|
||||
We now lacks /usr/include/linux/pci_ids.h which break ldetect build...
|
||||
Can you readd it please?
|
||||
Thanks
|
||||
---
|
||||
include/linux/Kbuild | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- linux/include/uapi/linux/Kbuild.include-kbuild-export-pci_ids.orig
|
||||
+++ linux/include/uapi/linux/Kbuild
|
||||
@@ -277,6 +277,7 @@ header-y += param.h
|
||||
header-y += parport.h
|
||||
header-y += patchkey.h
|
||||
header-y += pci.h
|
||||
+header-y += pci_ids.h
|
||||
header-y += pci_regs.h
|
||||
header-y += perf_event.h
|
||||
header-y += personality.h
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
From 993b3a3f80a7842a48cd46c2b41e1b3ef6302468 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Fri, 24 Oct 2014 14:55:24 -0700
|
||||
Subject: [PATCH] Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook
|
||||
AH544
|
||||
|
||||
These models need i8042.notimeout, otherwise the touchpad will not work.
|
||||
|
||||
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=69731
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1111138
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
||||
---
|
||||
drivers/input/serio/i8042-x86ia64io.h | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
|
||||
index a0bcbb6..aa9b299 100644
|
||||
--- a/drivers/input/serio/i8042-x86ia64io.h
|
||||
+++ b/drivers/input/serio/i8042-x86ia64io.h
|
||||
@@ -364,6 +364,22 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = {
|
||||
},
|
||||
},
|
||||
{
|
||||
+ /* Fujitsu A544 laptop */
|
||||
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=1111138 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK A544"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ /* Fujitsu AH544 laptop */
|
||||
+ /* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK AH544"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
/* Fujitsu U574 laptop */
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=69731 */
|
||||
.matches = {
|
||||
--
|
||||
2.1.2
|
||||
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
From a36aa80f3cb2540fb1dbad6240852de4365a2e82 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Thu, 30 Jun 2016 11:51:44 +0300
|
||||
Subject: [PATCH] intel_th: Fix a deadlock in modprobing
|
||||
|
||||
Driver initialization tries to request a hub (GTH) driver module from
|
||||
its probe callback, resulting in a deadlock.
|
||||
|
||||
This patch solves the problem by adding a deferred work for requesting
|
||||
the hub module.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org> # 4.4.x-
|
||||
---
|
||||
drivers/hwtracing/intel_th/core.c | 35 ++++++++++++++++++++++++++++++++++-
|
||||
drivers/hwtracing/intel_th/intel_th.h | 3 +++
|
||||
2 files changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
|
||||
index 1be543e..0b112ae 100644
|
||||
--- a/drivers/hwtracing/intel_th/core.c
|
||||
+++ b/drivers/hwtracing/intel_th/core.c
|
||||
@@ -465,6 +465,38 @@ static struct intel_th_subdevice {
|
||||
},
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_MODULES
|
||||
+static void __intel_th_request_hub_module(struct work_struct *work)
|
||||
+{
|
||||
+ struct intel_th *th = container_of(work, struct intel_th,
|
||||
+ request_module_work);
|
||||
+
|
||||
+ request_module("intel_th_%s", th->hub->name);
|
||||
+}
|
||||
+
|
||||
+static int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ INIT_WORK(&th->request_module_work, __intel_th_request_hub_module);
|
||||
+ schedule_work(&th->request_module_work);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+ flush_work(&th->request_module_work);
|
||||
+}
|
||||
+#else
|
||||
+static inline int intel_th_request_hub_module(struct intel_th *th)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static inline void intel_th_request_hub_module_flush(struct intel_th *th)
|
||||
+{
|
||||
+}
|
||||
+#endif /* CONFIG_MODULES */
|
||||
+
|
||||
static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
unsigned int ndevres, int irq)
|
||||
{
|
||||
@@ -535,7 +567,7 @@ static int intel_th_populate(struct intel_th *th, struct resource *devres,
|
||||
/* need switch driver to be loaded to enumerate the rest */
|
||||
if (subdev->type == INTEL_TH_SWITCH && !req) {
|
||||
th->hub = thdev;
|
||||
- err = request_module("intel_th_%s", subdev->name);
|
||||
+ err = intel_th_request_hub_module(th);
|
||||
if (!err)
|
||||
req++;
|
||||
}
|
||||
@@ -652,6 +684,7 @@ void intel_th_free(struct intel_th *th)
|
||||
{
|
||||
int i;
|
||||
|
||||
+ intel_th_request_hub_module_flush(th);
|
||||
for (i = 0; i < TH_SUBDEVICE_MAX; i++)
|
||||
if (th->thdev[i] != th->hub)
|
||||
intel_th_device_remove(th->thdev[i]);
|
||||
diff --git a/drivers/hwtracing/intel_th/intel_th.h b/drivers/hwtracing/intel_th/intel_th.h
|
||||
index 0df22e3..0482848 100644
|
||||
--- a/drivers/hwtracing/intel_th/intel_th.h
|
||||
+++ b/drivers/hwtracing/intel_th/intel_th.h
|
||||
@@ -205,6 +205,9 @@ struct intel_th {
|
||||
|
||||
int id;
|
||||
int major;
|
||||
+#ifdef CONFIG_MODULES
|
||||
+ struct work_struct request_module_work;
|
||||
+#endif /* CONFIG_MODULES */
|
||||
#ifdef CONFIG_INTEL_TH_DEBUG
|
||||
struct dentry *dbg;
|
||||
#endif
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From 7a1a47ce35821b40f5b2ce46379ba14393bc3873 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Date: Tue, 28 Jun 2016 18:55:23 +0300
|
||||
Subject: [PATCH] intel_th: pci: Add Kaby Lake PCH-H support
|
||||
|
||||
This adds Intel(R) Trace Hub PCI ID for Kaby Lake PCH-H.
|
||||
|
||||
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
---
|
||||
drivers/hwtracing/intel_th/pci.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/hwtracing/intel_th/pci.c b/drivers/hwtracing/intel_th/pci.c
|
||||
index 5e25c7e..0bba384 100644
|
||||
--- a/drivers/hwtracing/intel_th/pci.c
|
||||
+++ b/drivers/hwtracing/intel_th/pci.c
|
||||
@@ -80,6 +80,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1a8e),
|
||||
.driver_data = (kernel_ulong_t)0,
|
||||
},
|
||||
+ {
|
||||
+ /* Kaby Lake PCH-H */
|
||||
+ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6),
|
||||
+ .driver_data = (kernel_ulong_t)0,
|
||||
+ },
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
From 2a00932f082aff93c3a55426e0c7af6d0ec03997 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Leach <matthew@mattleach.net>
|
||||
Date: Fri, 8 Jul 2016 09:04:27 -0300
|
||||
Subject: [PATCH] [media] media: usbtv: prevent access to free'd resources
|
||||
|
||||
When disconnecting the usbtv device, the sound card is unregistered
|
||||
from ALSA and the snd member of the usbtv struct is set to NULL. If
|
||||
the usbtv snd_trigger work is running, this can cause a race condition
|
||||
where the kernel will attempt to access free'd resources, shown in
|
||||
[1].
|
||||
|
||||
This patch fixes the disconnection code by cancelling any snd_trigger
|
||||
work before unregistering the sound card from ALSA and checking that
|
||||
the snd member still exists in the work function.
|
||||
|
||||
[1]:
|
||||
usb 3-1.2: USB disconnect, device number 6
|
||||
BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
|
||||
IP: [<ffffffff81093850>] process_one_work+0x30/0x480
|
||||
PGD 405bbf067 PUD 405bbe067 PMD 0
|
||||
Call Trace:
|
||||
[<ffffffff81093ce8>] worker_thread+0x48/0x4e0
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81093ca0>] ? process_one_work+0x480/0x480
|
||||
[<ffffffff81099998>] kthread+0xd8/0xf0
|
||||
[<ffffffff815c73c2>] ret_from_fork+0x22/0x40
|
||||
[<ffffffff810998c0>] ? kthread_worker_fn+0x170/0x170
|
||||
---[ end trace 0f3dac5c1a38e610 ]---
|
||||
|
||||
Signed-off-by: Matthew Leach <matthew@mattleach.net>
|
||||
Tested-by: Peter Sutton <foxxy@foxdogstudios.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/usb/usbtv/usbtv-audio.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/usb/usbtv/usbtv-audio.c b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
index d4b4db3..1965ff1 100644
|
||||
--- a/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
+++ b/drivers/media/usb/usbtv/usbtv-audio.c
|
||||
@@ -292,6 +292,9 @@ static void snd_usbtv_trigger(struct work_struct *work)
|
||||
{
|
||||
struct usbtv *chip = container_of(work, struct usbtv, snd_trigger);
|
||||
|
||||
+ if (!chip->snd)
|
||||
+ return;
|
||||
+
|
||||
if (atomic_read(&chip->snd_stream))
|
||||
usbtv_audio_start(chip);
|
||||
else
|
||||
@@ -392,6 +395,8 @@ err:
|
||||
|
||||
void usbtv_audio_free(struct usbtv *usbtv)
|
||||
{
|
||||
+ cancel_work_sync(&usbtv->snd_trigger);
|
||||
+
|
||||
if (usbtv->snd && usbtv->udev) {
|
||||
snd_card_free(usbtv->snd);
|
||||
usbtv->snd = NULL;
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
|
||||
index f976df4..32c883b 100644
|
||||
--- a/drivers/media/usb/pwc/pwc-if.c
|
||||
+++ b/drivers/media/usb/pwc/pwc-if.c
|
||||
@@ -119,7 +119,7 @@ static void usb_pwc_disconnect(struct us
|
||||
static void pwc_isoc_cleanup(struct pwc_device *pdev);
|
||||
|
||||
static struct usb_driver pwc_driver = {
|
||||
- .name = "Philips webcam", /* name */
|
||||
+ .name = "pwc", /* name */
|
||||
.id_table = pwc_device_table,
|
||||
.probe = usb_pwc_probe, /* probe() */
|
||||
.disconnect = usb_pwc_disconnect, /* disconnect() */
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
From 126f40298446a82116e1f92a1aaf72b8c8228fae Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Wed, 11 May 2016 18:44:32 -0300
|
||||
Subject: [PATCH] [media] vb2: core: Skip planes array verification if pb is
|
||||
NULL
|
||||
|
||||
An earlier patch fixing an input validation issue introduced another
|
||||
issue: vb2_core_dqbuf() is called with pb argument value NULL in some
|
||||
cases, causing a NULL pointer dereference. Fix this by skipping the
|
||||
verification as there's nothing to verify.
|
||||
|
||||
Fixes: e7e0c3e26587 ("[media] videobuf2-core: Check user space planes array in dqbuf")
|
||||
|
||||
Signed-off-by: David R <david@unsolicited.net>
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-core.c | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
index 9fbcb67..633fc1a 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-core.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-core.c
|
||||
@@ -1648,7 +1648,7 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
void *pb, int nonblocking)
|
||||
{
|
||||
unsigned long flags;
|
||||
- int ret;
|
||||
+ int ret = 0;
|
||||
|
||||
/*
|
||||
* Wait for at least one buffer to become available on the done_list.
|
||||
@@ -1664,10 +1664,12 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
|
||||
spin_lock_irqsave(&q->done_lock, flags);
|
||||
*vb = list_first_entry(&q->done_list, struct vb2_buffer, done_entry);
|
||||
/*
|
||||
- * Only remove the buffer from done_list if v4l2_buffer can handle all
|
||||
- * the planes.
|
||||
+ * Only remove the buffer from done_list if all planes can be
|
||||
+ * handled. Some cases such as V4L2 file I/O and DVB have pb
|
||||
+ * == NULL; skip the check then as there's nothing to verify.
|
||||
*/
|
||||
- ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
+ if (pb)
|
||||
+ ret = call_bufop(q, verify_planes_array, *vb, pb);
|
||||
if (!ret)
|
||||
list_del(&(*vb)->done_entry);
|
||||
spin_unlock_irqrestore(&q->done_lock, flags);
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
From 83934b75c368f529d084815c463a7ef781dc9751 Mon Sep 17 00:00:00 2001
|
||||
From: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Date: Sun, 3 Apr 2016 16:31:03 -0300
|
||||
Subject: [PATCH] [media] videobuf2-v4l2: Verify planes array in buffer
|
||||
dequeueing
|
||||
|
||||
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
|
||||
which will be dequeued is not known until the buffer has been removed from
|
||||
the queue. The number of planes is specific to a buffer, not to the queue.
|
||||
|
||||
This does lead to the situation where multi-plane buffers may be requested
|
||||
and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument
|
||||
struct with fewer planes.
|
||||
|
||||
__fill_v4l2_buffer() however uses the number of planes from the dequeued
|
||||
videobuf2 buffer, overwriting kernel memory (the m.planes array allocated
|
||||
in video_usercopy() in v4l2-ioctl.c) if the user provided fewer
|
||||
planes than the dequeued buffer had. Oops!
|
||||
|
||||
Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2")
|
||||
|
||||
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
|
||||
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
|
||||
Cc: stable@vger.kernel.org # for v4.4 and later
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
|
||||
---
|
||||
drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
index 0b1b8c7..7f366f1 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
|
||||
@@ -74,6 +74,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
|
||||
+{
|
||||
+ return __verify_planes_array(vb, pb);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* __verify_length() - Verify that the bytesused value for each plane fits in
|
||||
* the plane length and that the data offset doesn't exceed the bytesused value.
|
||||
@@ -437,6 +442,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
|
||||
}
|
||||
|
||||
static const struct vb2_buf_ops v4l2_buf_ops = {
|
||||
+ .verify_planes_array = __verify_planes_array_core,
|
||||
.fill_user_buffer = __fill_v4l2_buffer,
|
||||
.fill_vb2_buffer = __fill_vb2_buffer,
|
||||
.copy_timestamp = __copy_timestamp,
|
||||
--
|
||||
2.9.2
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
From d9083160c2f6ee456ea867ea2279c1fc6124e56f Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Date: Fri, 8 Jul 2016 03:30:16 -0700
|
||||
Subject: [PATCH] megaraid_sas: Do not fire MR_DCMD_PD_LIST_QUERY to
|
||||
controllers which do not support it
|
||||
|
||||
There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue
|
||||
reported, megaraid_sas driver goes into an infinite error reporting loop
|
||||
as soon as there is a change in the status of one of the
|
||||
arrays (degrade, resync online etc ). Below are the error logs reported
|
||||
continuously-
|
||||
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.757017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.820018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
Jun 25 08:49:30 ns8 kernel: [ 757.841018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
|
||||
|
||||
This issue is very much specific to controllers which do not support
|
||||
DCMD- MR_DCMD_PD_LIST_QUERY. In case of any hotplugging/rescanning of
|
||||
drives, AEN thread will be scheduled by driver and fire DCMD-
|
||||
MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will fail
|
||||
this event processing and will not go ahead for further events. This
|
||||
will cause infinite loop of same event getting retried infinitely and
|
||||
causing above mentioned logs.
|
||||
|
||||
Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for
|
||||
controllers which do not support it and send DCMD SUCCESS status to AEN
|
||||
function so that it can go ahead with other event processing.
|
||||
|
||||
Reported-by: Lucz Geza <geza@lucz.com>
|
||||
Cc: <stable@vger.kernel.org>
|
||||
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
|
||||
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
---
|
||||
drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
index f4b0690..2dab3dc 100644
|
||||
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
|
||||
@@ -4079,6 +4079,12 @@ megasas_get_pd_list(struct megasas_instance *instance)
|
||||
struct MR_PD_ADDRESS *pd_addr;
|
||||
dma_addr_t ci_h = 0;
|
||||
|
||||
+ if (instance->pd_list_not_supported) {
|
||||
+ dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
|
||||
+ "not supported by firmware\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
cmd = megasas_get_cmd(instance);
|
||||
|
||||
if (!cmd) {
|
||||
--
|
||||
2.9.2
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
Subject: mpt scsi modules for VMWare's emulated
|
||||
|
||||
The attached patch is a workaround for a bug in VMWare's emulated LSI
|
||||
Fusion SCSI HBA. The emulated firmware returns zero for the maximum
|
||||
number of attached devices; the real firmware returns a positive
|
||||
number. Therefore, the kernel that boots and works fine on bare metal
|
||||
will fail on VMWare because this firmware value is handed to the SCSI
|
||||
midlayer, which then skips the entire bus scan.
|
||||
|
||||
F7 bz 241935
|
||||
|
||||
The patch below was submitted by Eric Moore of LSI to the linux-scsi
|
||||
mailing list:
|
||||
|
||||
http://marc.info/?l=linux-scsi&m=117432237404247
|
||||
|
||||
then immediately rejected by Christoph Hellwig, who prefers that
|
||||
VMWare fix their emulation instead.
|
||||
|
||||
This patch is workaround.
|
||||
|
||||
---
|
||||
drivers/message/fusion/mptbase.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/message/fusion/mptbase.c
|
||||
+++ b/drivers/message/fusion/mptbase.c
|
||||
@@ -3051,8 +3051,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
|
||||
pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
|
||||
pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
|
||||
|
||||
- max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
|
||||
- pfacts->MaxDevices;
|
||||
+ switch (ioc->bus_type) {
|
||||
+ case SAS:
|
||||
+ max_id = pfacts->PortSCSIID;
|
||||
+ break;
|
||||
+ case FC:
|
||||
+ max_id = pfacts->MaxDevices;
|
||||
+ break;
|
||||
+ case SPI:
|
||||
+ default:
|
||||
+ max_id = MPT_MAX_SCSI_DEVICES;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
|
||||
ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user