diff options
author | Denys Dmytriyenko <denys@ti.com> | 2015-05-06 13:24:53 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2015-05-06 13:51:41 -0400 |
commit | 84a71a2560d56081a04b26fe50cfbb666df22f95 (patch) | |
tree | d681a25b2dc1533c5661f31a01fddf934602d0e5 /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2 | |
parent | 7126dca19c9f109c7394267176547d24fd5eb259 (diff) | |
download | meta-ti-84a71a2560d56081a04b26fe50cfbb666df22f95.tar.gz |
linux: remove outdated kernel recipes
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2')
129 files changed, 0 insertions, 10993 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch deleted file mode 100644 index ed10e3a9..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0001-mtdoops-fix-the-oops_page_used-array-size.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 8ca3e7c57df66813802542ce347e79ba5537f303 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roman Tereshonkov <roman.tereshonkov@nokia.com> | ||
3 | Date: Tue, 29 Nov 2011 12:49:18 +0200 | ||
4 | Subject: [PATCH 001/129] mtdoops: fix the oops_page_used array size | ||
5 | |||
6 | commit 556f063580db2953a7e53cd46b47724246320f60 upstream. | ||
7 | |||
8 | The array of unsigned long pointed by oops_page_used is allocated | ||
9 | by vmalloc which requires the size to be in bytes. | ||
10 | |||
11 | BITS_PER_LONG is equal to 32. | ||
12 | If we want to allocate memory for 32 pages with one bit per page then | ||
13 | 32 / BITS_PER_LONG is equal to 1 byte that is 8 bits. | ||
14 | To fix it we need to multiply the result by sizeof(unsigned long) equal to 4. | ||
15 | |||
16 | Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> | ||
17 | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | ||
18 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | drivers/mtd/mtdoops.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c | ||
25 | index 1e2fa62..0782b31 100644 | ||
26 | --- a/drivers/mtd/mtdoops.c | ||
27 | +++ b/drivers/mtd/mtdoops.c | ||
28 | @@ -369,7 +369,7 @@ static void mtdoops_notify_add(struct mtd_info *mtd) | ||
29 | |||
30 | /* oops_page_used is a bit field */ | ||
31 | cxt->oops_page_used = vmalloc(DIV_ROUND_UP(mtdoops_pages, | ||
32 | - BITS_PER_LONG)); | ||
33 | + BITS_PER_LONG) * sizeof(unsigned long)); | ||
34 | if (!cxt->oops_page_used) { | ||
35 | printk(KERN_ERR "mtdoops: could not allocate page array\n"); | ||
36 | return; | ||
37 | -- | ||
38 | 1.7.9.5 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch deleted file mode 100644 index 3933c59d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0002-mtd-mtdoops-skip-reading-initially-bad-blocks.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From bfaedde2c4ae9dcab0aabf7dc7172999df5669ec Mon Sep 17 00:00:00 2001 | ||
2 | From: Roman Tereshonkov <roman.tereshonkov@nokia.com> | ||
3 | Date: Fri, 2 Dec 2011 15:07:17 +0200 | ||
4 | Subject: [PATCH 002/129] mtd: mtdoops: skip reading initially bad blocks | ||
5 | |||
6 | commit 3538c56329936c78f7d356889908790006d0124c upstream. | ||
7 | |||
8 | Use block_isbad to check and skip the bad blocks reading. | ||
9 | This will allow to get rid of the read errors if bad blocks | ||
10 | are present initially. | ||
11 | |||
12 | Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> | ||
13 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
14 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/mtd/mtdoops.c | 3 +++ | ||
18 | 1 file changed, 3 insertions(+) | ||
19 | |||
20 | diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c | ||
21 | index 0782b31..f3cdce9 100644 | ||
22 | --- a/drivers/mtd/mtdoops.c | ||
23 | +++ b/drivers/mtd/mtdoops.c | ||
24 | @@ -253,6 +253,9 @@ static void find_next_position(struct mtdoops_context *cxt) | ||
25 | size_t retlen; | ||
26 | |||
27 | for (page = 0; page < cxt->oops_pages; page++) { | ||
28 | + if (mtd->block_isbad && | ||
29 | + mtd->block_isbad(mtd, page * record_size)) | ||
30 | + continue; | ||
31 | /* Assume the page is used */ | ||
32 | mark_page_used(cxt, page); | ||
33 | ret = mtd->read(mtd, page * record_size, MTDOOPS_HEADER_SIZE, | ||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch deleted file mode 100644 index 11ea5834..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0003-mtd-mtd_blkdevs-don-t-increase-open-count-on-error-p.patch +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | From 1e5cac540c54d687fea366251cc0ddf9266c0685 Mon Sep 17 00:00:00 2001 | ||
2 | From: Brian Norris <computersforpeace@gmail.com> | ||
3 | Date: Mon, 7 Nov 2011 15:51:05 -0800 | ||
4 | Subject: [PATCH 003/129] mtd: mtd_blkdevs: don't increase 'open' count on | ||
5 | error path | ||
6 | |||
7 | commit 342ff28f5a2e5aa3236617bd2bddf6c749677ef2 upstream. | ||
8 | |||
9 | Some error paths in mtd_blkdevs were fixed in the following commit: | ||
10 | |||
11 | commit 94735ec4044a6d318b83ad3c5794e931ed168d10 | ||
12 | mtd: mtd_blkdevs: fix error path in blktrans_open | ||
13 | |||
14 | But on these error paths, the block device's `dev->open' count is | ||
15 | already incremented before we check for errors. This meant that, while | ||
16 | the error path was handled correctly on the first time through | ||
17 | blktrans_open(), the device is erroneously considered already open on | ||
18 | the second time through. | ||
19 | |||
20 | This problem can be seen, for instance, when a UBI volume is | ||
21 | simultaneously mounted as a UBIFS partition and read through its | ||
22 | corresponding gluebi mtdblockX device. This results in blktrans_open() | ||
23 | passing its error checks (with `dev->open > 0') without actually having | ||
24 | a handle on the device. Here's a summarized log of the actions and | ||
25 | results with nandsim: | ||
26 | |||
27 | # modprobe nandsim | ||
28 | # modprobe mtdblock | ||
29 | # modprobe gluebi | ||
30 | # modprobe ubifs | ||
31 | # ubiattach /dev/ubi_ctrl -m 0 | ||
32 | ... | ||
33 | # ubimkvol /dev/ubi0 -N test -s 16MiB | ||
34 | ... | ||
35 | # mount -t ubifs ubi0:test /mnt | ||
36 | # ls /dev/mtdblock* | ||
37 | /dev/mtdblock0 /dev/mtdblock1 | ||
38 | # cat /dev/mtdblock1 > /dev/null | ||
39 | cat: can't open '/dev/mtdblock4': Device or resource busy | ||
40 | # cat /dev/mtdblock1 > /dev/null | ||
41 | |||
42 | CPU 0 Unable to handle kernel paging request at virtual address | ||
43 | fffffff0, epc == 8031536c, ra == 8031f280 | ||
44 | Oops[#1]: | ||
45 | ... | ||
46 | Call Trace: | ||
47 | [<8031536c>] ubi_leb_read+0x14/0x164 | ||
48 | [<8031f280>] gluebi_read+0xf0/0x148 | ||
49 | [<802edba8>] mtdblock_readsect+0x64/0x198 | ||
50 | [<802ecfe4>] mtd_blktrans_thread+0x330/0x3f4 | ||
51 | [<8005be98>] kthread+0x88/0x90 | ||
52 | [<8000bc04>] kernel_thread_helper+0x10/0x18 | ||
53 | |||
54 | Signed-off-by: Brian Norris <computersforpeace@gmail.com> | ||
55 | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | ||
56 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
57 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
58 | --- | ||
59 | drivers/mtd/mtd_blkdevs.c | 3 ++- | ||
60 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
61 | |||
62 | diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c | ||
63 | index ed8b5e7..424ca5f 100644 | ||
64 | --- a/drivers/mtd/mtd_blkdevs.c | ||
65 | +++ b/drivers/mtd/mtd_blkdevs.c | ||
66 | @@ -215,7 +215,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) | ||
67 | |||
68 | mutex_lock(&dev->lock); | ||
69 | |||
70 | - if (dev->open++) | ||
71 | + if (dev->open) | ||
72 | goto unlock; | ||
73 | |||
74 | kref_get(&dev->ref); | ||
75 | @@ -235,6 +235,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode) | ||
76 | goto error_release; | ||
77 | |||
78 | unlock: | ||
79 | + dev->open++; | ||
80 | mutex_unlock(&dev->lock); | ||
81 | blktrans_dev_put(dev); | ||
82 | return ret; | ||
83 | -- | ||
84 | 1.7.9.5 | ||
85 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch deleted file mode 100644 index 6a4a0e05..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0004-mtd-tests-stresstest-bail-out-if-device-has-not-enou.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 401f9918c9daf754c70eb65a895c8ef3bde5b441 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wolfram Sang <w.sang@pengutronix.de> | ||
3 | Date: Tue, 29 Nov 2011 15:34:08 +0100 | ||
4 | Subject: [PATCH 004/129] mtd: tests: stresstest: bail out if device has not | ||
5 | enough eraseblocks | ||
6 | |||
7 | commit 2f4478ccff7df845dc9c0f8996a96373122c4417 upstream. | ||
8 | |||
9 | stresstest needs at least two eraseblocks. Bail out gracefully if that | ||
10 | condition is not met. Fixes the following 'division by zero' OOPS: | ||
11 | |||
12 | [ 619.100000] mtd_stresstest: MTD device size 131072, eraseblock size 131072, page size 2048, count of eraseblocks 1, pages per eraseblock 64, OOB size 64 | ||
13 | [ 619.120000] mtd_stresstest: scanning for bad eraseblocks | ||
14 | [ 619.120000] mtd_stresstest: scanned 1 eraseblocks, 0 are bad | ||
15 | [ 619.130000] mtd_stresstest: doing operations | ||
16 | [ 619.130000] mtd_stresstest: 0 operations done | ||
17 | [ 619.140000] Division by zero in kernel. | ||
18 | ... | ||
19 | |||
20 | caused by | ||
21 | |||
22 | /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */ | ||
23 | eb %= (ebcnt - 1); | ||
24 | |||
25 | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> | ||
26 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
27 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | drivers/mtd/tests/mtd_stresstest.c | 7 +++++++ | ||
31 | 1 file changed, 7 insertions(+) | ||
32 | |||
33 | diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c | ||
34 | index 52ffd91..811642f 100644 | ||
35 | --- a/drivers/mtd/tests/mtd_stresstest.c | ||
36 | +++ b/drivers/mtd/tests/mtd_stresstest.c | ||
37 | @@ -284,6 +284,12 @@ static int __init mtd_stresstest_init(void) | ||
38 | (unsigned long long)mtd->size, mtd->erasesize, | ||
39 | pgsize, ebcnt, pgcnt, mtd->oobsize); | ||
40 | |||
41 | + if (ebcnt < 2) { | ||
42 | + printk(PRINT_PREF "error: need at least 2 eraseblocks\n"); | ||
43 | + err = -ENOSPC; | ||
44 | + goto out_put_mtd; | ||
45 | + } | ||
46 | + | ||
47 | /* Read or write up 2 eraseblocks at a time */ | ||
48 | bufsize = mtd->erasesize * 2; | ||
49 | |||
50 | @@ -322,6 +328,7 @@ out: | ||
51 | kfree(bbt); | ||
52 | vfree(writebuf); | ||
53 | vfree(readbuf); | ||
54 | +out_put_mtd: | ||
55 | put_mtd_device(mtd); | ||
56 | if (err) | ||
57 | printk(PRINT_PREF "error %d occurred\n", err); | ||
58 | -- | ||
59 | 1.7.9.5 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch deleted file mode 100644 index 26ba973b..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0005-drivers-rtc-interface.c-fix-alarm-rollover-when-day-.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 4795aa3e23be426bc3971ce821f37983dcee409f Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Tue, 10 Jan 2012 15:11:02 -0800 | ||
4 | Subject: [PATCH 005/129] drivers/rtc/interface.c: fix alarm rollover when day | ||
5 | or month is out-of-range | ||
6 | |||
7 | commit e74a8f2edb92cb690b467cea0ab652c509e9f624 upstream. | ||
8 | |||
9 | Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a | ||
10 | potential infinite loop. If an alarm time contains a wildcard month and | ||
11 | an invalid day (> 31), or a wildcard year and an invalid month (>= 12), | ||
12 | the loop searching for the next matching date will never terminate. Treat | ||
13 | the invalid values as wildcards. | ||
14 | |||
15 | Fixes <http://bugs.debian.org/646429>, <http://bugs.debian.org/653331> | ||
16 | |||
17 | Reported-by: leo weppelman <leoweppelman@googlemail.com> | ||
18 | Reported-by: "P. van Gaans" <mailme667@yahoo.co.uk> | ||
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
20 | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> | ||
21 | Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
22 | Cc: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> | ||
23 | Cc: Thomas Gleixner <tglx@linutronix.de> | ||
24 | Cc: John Stultz <john.stultz@linaro.org> | ||
25 | Acked-by: Alessandro Zummo <a.zummo@towertech.it> | ||
26 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | drivers/rtc/interface.c | 4 ++-- | ||
31 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c | ||
34 | index 8e28625..8a1c031 100644 | ||
35 | --- a/drivers/rtc/interface.c | ||
36 | +++ b/drivers/rtc/interface.c | ||
37 | @@ -228,11 +228,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | ||
38 | alarm->time.tm_hour = now.tm_hour; | ||
39 | |||
40 | /* For simplicity, only support date rollover for now */ | ||
41 | - if (alarm->time.tm_mday == -1) { | ||
42 | + if (alarm->time.tm_mday < 1 || alarm->time.tm_mday > 31) { | ||
43 | alarm->time.tm_mday = now.tm_mday; | ||
44 | missing = day; | ||
45 | } | ||
46 | - if (alarm->time.tm_mon == -1) { | ||
47 | + if ((unsigned)alarm->time.tm_mon >= 12) { | ||
48 | alarm->time.tm_mon = now.tm_mon; | ||
49 | if (missing == none) | ||
50 | missing = month; | ||
51 | -- | ||
52 | 1.7.9.5 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch deleted file mode 100644 index 31d7359c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0006-ext4-add-missing-ext4_resize_end-on-error-paths.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | From e6f3a0306b95afbc5965b42a05d85c102401b48c Mon Sep 17 00:00:00 2001 | ||
2 | From: Djalal Harouni <tixxdz@opendz.org> | ||
3 | Date: Wed, 4 Jan 2012 17:09:52 -0500 | ||
4 | Subject: [PATCH 006/129] ext4: add missing ext4_resize_end on error paths | ||
5 | |||
6 | commit 014a1770371a028d22f364718c805f4216911ecd upstream. | ||
7 | |||
8 | Online resize ioctls 'EXT4_IOC_GROUP_EXTEND' and 'EXT4_IOC_GROUP_ADD' | ||
9 | call ext4_resize_begin() to check permissions and to set the | ||
10 | EXT4_RESIZING bit lock, they do their work and they must finish with | ||
11 | ext4_resize_end() which calls clear_bit_unlock() to unlock and to | ||
12 | avoid -EBUSY errors for the next resize operations. | ||
13 | |||
14 | This patch adds the missing ext4_resize_end() calls on error paths. | ||
15 | |||
16 | Patch tested. | ||
17 | |||
18 | Signed-off-by: Djalal Harouni <tixxdz@opendz.org> | ||
19 | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
21 | --- | ||
22 | fs/ext4/ioctl.c | 28 ++++++++++++++++++---------- | ||
23 | 1 file changed, 18 insertions(+), 10 deletions(-) | ||
24 | |||
25 | diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c | ||
26 | index a567968..ab25f57 100644 | ||
27 | --- a/fs/ext4/ioctl.c | ||
28 | +++ b/fs/ext4/ioctl.c | ||
29 | @@ -182,19 +182,22 @@ setversion_out: | ||
30 | if (err) | ||
31 | return err; | ||
32 | |||
33 | - if (get_user(n_blocks_count, (__u32 __user *)arg)) | ||
34 | - return -EFAULT; | ||
35 | + if (get_user(n_blocks_count, (__u32 __user *)arg)) { | ||
36 | + err = -EFAULT; | ||
37 | + goto group_extend_out; | ||
38 | + } | ||
39 | |||
40 | if (EXT4_HAS_RO_COMPAT_FEATURE(sb, | ||
41 | EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | ||
42 | ext4_msg(sb, KERN_ERR, | ||
43 | "Online resizing not supported with bigalloc"); | ||
44 | - return -EOPNOTSUPP; | ||
45 | + err = -EOPNOTSUPP; | ||
46 | + goto group_extend_out; | ||
47 | } | ||
48 | |||
49 | err = mnt_want_write(filp->f_path.mnt); | ||
50 | if (err) | ||
51 | - return err; | ||
52 | + goto group_extend_out; | ||
53 | |||
54 | err = ext4_group_extend(sb, EXT4_SB(sb)->s_es, n_blocks_count); | ||
55 | if (EXT4_SB(sb)->s_journal) { | ||
56 | @@ -204,9 +207,10 @@ setversion_out: | ||
57 | } | ||
58 | if (err == 0) | ||
59 | err = err2; | ||
60 | + | ||
61 | mnt_drop_write(filp->f_path.mnt); | ||
62 | +group_extend_out: | ||
63 | ext4_resize_end(sb); | ||
64 | - | ||
65 | return err; | ||
66 | } | ||
67 | |||
68 | @@ -267,19 +271,22 @@ mext_out: | ||
69 | return err; | ||
70 | |||
71 | if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg, | ||
72 | - sizeof(input))) | ||
73 | - return -EFAULT; | ||
74 | + sizeof(input))) { | ||
75 | + err = -EFAULT; | ||
76 | + goto group_add_out; | ||
77 | + } | ||
78 | |||
79 | if (EXT4_HAS_RO_COMPAT_FEATURE(sb, | ||
80 | EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | ||
81 | ext4_msg(sb, KERN_ERR, | ||
82 | "Online resizing not supported with bigalloc"); | ||
83 | - return -EOPNOTSUPP; | ||
84 | + err = -EOPNOTSUPP; | ||
85 | + goto group_add_out; | ||
86 | } | ||
87 | |||
88 | err = mnt_want_write(filp->f_path.mnt); | ||
89 | if (err) | ||
90 | - return err; | ||
91 | + goto group_add_out; | ||
92 | |||
93 | err = ext4_group_add(sb, &input); | ||
94 | if (EXT4_SB(sb)->s_journal) { | ||
95 | @@ -289,9 +296,10 @@ mext_out: | ||
96 | } | ||
97 | if (err == 0) | ||
98 | err = err2; | ||
99 | + | ||
100 | mnt_drop_write(filp->f_path.mnt); | ||
101 | +group_add_out: | ||
102 | ext4_resize_end(sb); | ||
103 | - | ||
104 | return err; | ||
105 | } | ||
106 | |||
107 | -- | ||
108 | 1.7.9.5 | ||
109 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch deleted file mode 100644 index 8d8449f9..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0007-ext4-fix-undefined-behavior-in-ext4_fill_flex_info.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From 7105c77677c92d13510d38fd5dd085944464015e Mon Sep 17 00:00:00 2001 | ||
2 | From: Xi Wang <xi.wang@gmail.com> | ||
3 | Date: Tue, 10 Jan 2012 11:51:10 -0500 | ||
4 | Subject: [PATCH 007/129] ext4: fix undefined behavior in | ||
5 | ext4_fill_flex_info() | ||
6 | |||
7 | commit d50f2ab6f050311dbf7b8f5501b25f0bf64a439b upstream. | ||
8 | |||
9 | Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by | ||
10 | zero when trying to mount a corrupted file system") fixes CVE-2009-4307 | ||
11 | by performing a sanity check on s_log_groups_per_flex, since it can be | ||
12 | set to a bogus value by an attacker. | ||
13 | |||
14 | sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; | ||
15 | groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
16 | |||
17 | if (groups_per_flex < 2) { ... } | ||
18 | |||
19 | This patch fixes two potential issues in the previous commit. | ||
20 | |||
21 | 1) The sanity check might only work on architectures like PowerPC. | ||
22 | On x86, 5 bits are used for the shifting amount. That means, given a | ||
23 | large s_log_groups_per_flex value like 36, groups_per_flex = 1 << 36 | ||
24 | is essentially 1 << 4 = 16, rather than 0. This will bypass the check, | ||
25 | leaving s_log_groups_per_flex and groups_per_flex inconsistent. | ||
26 | |||
27 | 2) The sanity check relies on undefined behavior, i.e., oversized shift. | ||
28 | A standard-confirming C compiler could rewrite the check in unexpected | ||
29 | ways. Consider the following equivalent form, assuming groups_per_flex | ||
30 | is unsigned for simplicity. | ||
31 | |||
32 | groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
33 | if (groups_per_flex == 0 || groups_per_flex == 1) { | ||
34 | |||
35 | We compile the code snippet using Clang 3.0 and GCC 4.6. Clang will | ||
36 | completely optimize away the check groups_per_flex == 0, leaving the | ||
37 | patched code as vulnerable as the original. GCC keeps the check, but | ||
38 | there is no guarantee that future versions will do the same. | ||
39 | |||
40 | Signed-off-by: Xi Wang <xi.wang@gmail.com> | ||
41 | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ||
42 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
43 | --- | ||
44 | fs/ext4/super.c | 7 +++---- | ||
45 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
46 | |||
47 | diff --git a/fs/ext4/super.c b/fs/ext4/super.c | ||
48 | index 3e1329e..9281dbe 100644 | ||
49 | --- a/fs/ext4/super.c | ||
50 | +++ b/fs/ext4/super.c | ||
51 | @@ -2006,17 +2006,16 @@ static int ext4_fill_flex_info(struct super_block *sb) | ||
52 | struct ext4_group_desc *gdp = NULL; | ||
53 | ext4_group_t flex_group_count; | ||
54 | ext4_group_t flex_group; | ||
55 | - int groups_per_flex = 0; | ||
56 | + unsigned int groups_per_flex = 0; | ||
57 | size_t size; | ||
58 | int i; | ||
59 | |||
60 | sbi->s_log_groups_per_flex = sbi->s_es->s_log_groups_per_flex; | ||
61 | - groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
62 | - | ||
63 | - if (groups_per_flex < 2) { | ||
64 | + if (sbi->s_log_groups_per_flex < 1 || sbi->s_log_groups_per_flex > 31) { | ||
65 | sbi->s_log_groups_per_flex = 0; | ||
66 | return 1; | ||
67 | } | ||
68 | + groups_per_flex = 1 << sbi->s_log_groups_per_flex; | ||
69 | |||
70 | /* We allocate both existing and potentially added groups */ | ||
71 | flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) + | ||
72 | -- | ||
73 | 1.7.9.5 | ||
74 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch deleted file mode 100644 index bf1692bc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0008-ALSA-snd-usb-us122l-Delete-calls-to-preempt_disable.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 14f05d5692c7431710f71ea914ad07dc0b60d2a2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Karsten Wiese <fzu@wemgehoertderstaat.de> | ||
3 | Date: Fri, 30 Dec 2011 01:42:01 +0100 | ||
4 | Subject: [PATCH 008/129] ALSA: snd-usb-us122l: Delete calls to | ||
5 | preempt_disable | ||
6 | |||
7 | commit d0f3a2eb9062560bebca8b923424f3ca02a331ba upstream. | ||
8 | |||
9 | They are not needed here. | ||
10 | |||
11 | Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> | ||
12 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | sound/usb/usx2y/usb_stream.c | 6 ++---- | ||
16 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/sound/usb/usx2y/usb_stream.c b/sound/usb/usx2y/usb_stream.c | ||
19 | index c400ade..1e7a47a 100644 | ||
20 | --- a/sound/usb/usx2y/usb_stream.c | ||
21 | +++ b/sound/usb/usx2y/usb_stream.c | ||
22 | @@ -674,7 +674,7 @@ dotry: | ||
23 | inurb->transfer_buffer_length = | ||
24 | inurb->number_of_packets * | ||
25 | inurb->iso_frame_desc[0].length; | ||
26 | - preempt_disable(); | ||
27 | + | ||
28 | if (u == 0) { | ||
29 | int now; | ||
30 | struct usb_device *dev = inurb->dev; | ||
31 | @@ -686,19 +686,17 @@ dotry: | ||
32 | } | ||
33 | err = usb_submit_urb(inurb, GFP_ATOMIC); | ||
34 | if (err < 0) { | ||
35 | - preempt_enable(); | ||
36 | snd_printk(KERN_ERR"usb_submit_urb(sk->inurb[%i])" | ||
37 | " returned %i\n", u, err); | ||
38 | return err; | ||
39 | } | ||
40 | err = usb_submit_urb(outurb, GFP_ATOMIC); | ||
41 | if (err < 0) { | ||
42 | - preempt_enable(); | ||
43 | snd_printk(KERN_ERR"usb_submit_urb(sk->outurb[%i])" | ||
44 | " returned %i\n", u, err); | ||
45 | return err; | ||
46 | } | ||
47 | - preempt_enable(); | ||
48 | + | ||
49 | if (inurb->start_frame != outurb->start_frame) { | ||
50 | snd_printd(KERN_DEBUG | ||
51 | "u[%i] start_frames differ in:%u out:%u\n", | ||
52 | -- | ||
53 | 1.7.9.5 | ||
54 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch deleted file mode 100644 index 17e9a30f..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0009-ALSA-HDA-Fix-master-control-for-Cirrus-Logic-421X.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From 78e0e9b19b4202874115f3a2745dad208dad51e2 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Henningsson <david.henningsson@canonical.com> | ||
3 | Date: Mon, 2 Jan 2012 12:40:15 +0100 | ||
4 | Subject: [PATCH 009/129] ALSA: HDA: Fix master control for Cirrus Logic 421X | ||
5 | |||
6 | commit 40d03e63e91af8ddccdfd5a536cc2a6e51433e1d upstream. | ||
7 | |||
8 | The control name "HP/Speakers" is non-standard, and since there is | ||
9 | only one DAC on this chip there is no need for a virtual master | ||
10 | anyway. | ||
11 | |||
12 | Signed-off-by: David Henningsson <david.henningsson@canonical.com> | ||
13 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | sound/pci/hda/patch_cirrus.c | 13 +------------ | ||
17 | 1 file changed, 1 insertion(+), 12 deletions(-) | ||
18 | |||
19 | diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c | ||
20 | index 70a7abd..f55ceb6 100644 | ||
21 | --- a/sound/pci/hda/patch_cirrus.c | ||
22 | +++ b/sound/pci/hda/patch_cirrus.c | ||
23 | @@ -1771,30 +1771,19 @@ static int build_cs421x_output(struct hda_codec *codec) | ||
24 | struct auto_pin_cfg *cfg = &spec->autocfg; | ||
25 | struct snd_kcontrol *kctl; | ||
26 | int err; | ||
27 | - char *name = "HP/Speakers"; | ||
28 | + char *name = "Master"; | ||
29 | |||
30 | fix_volume_caps(codec, dac); | ||
31 | - if (!spec->vmaster_sw) { | ||
32 | - err = add_vmaster(codec, dac); | ||
33 | - if (err < 0) | ||
34 | - return err; | ||
35 | - } | ||
36 | |||
37 | err = add_mute(codec, name, 0, | ||
38 | HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT), 0, &kctl); | ||
39 | if (err < 0) | ||
40 | return err; | ||
41 | - err = snd_ctl_add_slave(spec->vmaster_sw, kctl); | ||
42 | - if (err < 0) | ||
43 | - return err; | ||
44 | |||
45 | err = add_volume(codec, name, 0, | ||
46 | HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT), 0, &kctl); | ||
47 | if (err < 0) | ||
48 | return err; | ||
49 | - err = snd_ctl_add_slave(spec->vmaster_vol, kctl); | ||
50 | - if (err < 0) | ||
51 | - return err; | ||
52 | |||
53 | if (cfg->speaker_outs) { | ||
54 | err = snd_hda_ctl_add(codec, 0, | ||
55 | -- | ||
56 | 1.7.9.5 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch deleted file mode 100644 index 4d0d47a7..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0010-ALSA-HDA-Fix-automute-for-Cirrus-Logic-421x.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From d16d6a4af51d31f0b7a1a0109c99fd926416cd1f Mon Sep 17 00:00:00 2001 | ||
2 | From: David Henningsson <david.henningsson@canonical.com> | ||
3 | Date: Mon, 2 Jan 2012 12:40:16 +0100 | ||
4 | Subject: [PATCH 010/129] ALSA: HDA: Fix automute for Cirrus Logic 421x | ||
5 | |||
6 | commit 78e2a928e377d5124932d4399c6c581908b027a0 upstream. | ||
7 | |||
8 | There was a bug in the automute logic causing speakers not to | ||
9 | mute when headphones were plugged in. | ||
10 | |||
11 | Tested-by: Hsin-Yi Chen <hychen@canonical.com> | ||
12 | Signed-off-by: David Henningsson <david.henningsson@canonical.com> | ||
13 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | sound/pci/hda/patch_cirrus.c | 14 ++++++-------- | ||
17 | 1 file changed, 6 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c | ||
20 | index f55ceb6..5b0a9bb 100644 | ||
21 | --- a/sound/pci/hda/patch_cirrus.c | ||
22 | +++ b/sound/pci/hda/patch_cirrus.c | ||
23 | @@ -920,16 +920,14 @@ static void cs_automute(struct hda_codec *codec) | ||
24 | |||
25 | /* mute speakers if spdif or hp jack is plugged in */ | ||
26 | for (i = 0; i < cfg->speaker_outs; i++) { | ||
27 | + int pin_ctl = hp_present ? 0 : PIN_OUT; | ||
28 | + /* detect on spdif is specific to CS421x */ | ||
29 | + if (spdif_present && (spec->vendor_nid == CS421X_VENDOR_NID)) | ||
30 | + pin_ctl = 0; | ||
31 | + | ||
32 | nid = cfg->speaker_pins[i]; | ||
33 | snd_hda_codec_write(codec, nid, 0, | ||
34 | - AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
35 | - hp_present ? 0 : PIN_OUT); | ||
36 | - /* detect on spdif is specific to CS421x */ | ||
37 | - if (spec->vendor_nid == CS421X_VENDOR_NID) { | ||
38 | - snd_hda_codec_write(codec, nid, 0, | ||
39 | - AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
40 | - spdif_present ? 0 : PIN_OUT); | ||
41 | - } | ||
42 | + AC_VERB_SET_PIN_WIDGET_CONTROL, pin_ctl); | ||
43 | } | ||
44 | if (spec->gpio_eapd_hp) { | ||
45 | unsigned int gpio = hp_present ? | ||
46 | -- | ||
47 | 1.7.9.5 | ||
48 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch deleted file mode 100644 index 4187528a..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 97a18462c03b9c0c3e22aaec73045024f198aacc Mon Sep 17 00:00:00 2001 | ||
2 | From: Pavel Hofman <pavel.hofman@ivitera.com> | ||
3 | Date: Thu, 5 Jan 2012 23:05:18 +0100 | ||
4 | Subject: [PATCH 011/129] ALSA: ice1724 - Check for ac97 to avoid kernel oops | ||
5 | |||
6 | commit e7848163aa2a649d9065f230fadff80dc3519775 upstream. | ||
7 | |||
8 | Cards with identical PCI ids but no AC97 config in EEPROM do not have | ||
9 | the ac97 field initialized. We must check for this case to avoid kernel oops. | ||
10 | |||
11 | Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> | ||
12 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | sound/pci/ice1712/amp.c | 7 +++++-- | ||
16 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c | ||
19 | index e328cfb..e525da2 100644 | ||
20 | --- a/sound/pci/ice1712/amp.c | ||
21 | +++ b/sound/pci/ice1712/amp.c | ||
22 | @@ -68,8 +68,11 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice) | ||
23 | |||
24 | static int __devinit snd_vt1724_amp_add_controls(struct snd_ice1712 *ice) | ||
25 | { | ||
26 | - /* we use pins 39 and 41 of the VT1616 for left and right read outputs */ | ||
27 | - snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000); | ||
28 | + if (ice->ac97) | ||
29 | + /* we use pins 39 and 41 of the VT1616 for left and right | ||
30 | + read outputs */ | ||
31 | + snd_ac97_write_cache(ice->ac97, 0x5a, | ||
32 | + snd_ac97_read(ice->ac97, 0x5a) & ~0x8000); | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | -- | ||
37 | 1.7.9.5 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch deleted file mode 100644 index 1fe6016a..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0012-ALSA-usb-audio-Avoid-flood-of-frame-active-debug-mes.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From fc0b965ed3b89f9f6cacff2dcd472f473b82ed99 Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Mon, 9 Jan 2012 11:37:20 +0100 | ||
4 | Subject: [PATCH 012/129] ALSA: usb-audio - Avoid flood of frame-active debug | ||
5 | messages | ||
6 | |||
7 | commit 80c8a2a372599e604b04a9c568952fe39cd1851d upstream. | ||
8 | |||
9 | With some buggy devices, the usb-audio driver may give "frame xxx active" | ||
10 | kernel messages too often. Better to keep it as debug-only using | ||
11 | snd_printdd(), and also add the rate-limit for avoiding floods. | ||
12 | |||
13 | Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=738681 | ||
14 | |||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | sound/usb/endpoint.c | 5 +++-- | ||
19 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c | ||
22 | index 81c6ede..08dcce5 100644 | ||
23 | --- a/sound/usb/endpoint.c | ||
24 | +++ b/sound/usb/endpoint.c | ||
25 | @@ -17,6 +17,7 @@ | ||
26 | |||
27 | #include <linux/gfp.h> | ||
28 | #include <linux/init.h> | ||
29 | +#include <linux/ratelimit.h> | ||
30 | #include <linux/usb.h> | ||
31 | #include <linux/usb/audio.h> | ||
32 | |||
33 | @@ -458,8 +459,8 @@ static int retire_capture_urb(struct snd_usb_substream *subs, | ||
34 | |||
35 | for (i = 0; i < urb->number_of_packets; i++) { | ||
36 | cp = (unsigned char *)urb->transfer_buffer + urb->iso_frame_desc[i].offset; | ||
37 | - if (urb->iso_frame_desc[i].status) { | ||
38 | - snd_printd(KERN_ERR "frame %d active: %d\n", i, urb->iso_frame_desc[i].status); | ||
39 | + if (urb->iso_frame_desc[i].status && printk_ratelimit()) { | ||
40 | + snd_printdd("frame %d active: %d\n", i, urb->iso_frame_desc[i].status); | ||
41 | // continue; | ||
42 | } | ||
43 | bytes = urb->iso_frame_desc[i].actual_length; | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch deleted file mode 100644 index 5ab9509c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0013-ALSA-hda-Use-auto-parser-for-HP-laptops-with-cx20459.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 0f951c7e3066c834b47172ee36435129c7c1d978 Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Tue, 10 Jan 2012 08:59:56 +0100 | ||
4 | Subject: [PATCH 013/129] ALSA: hda - Use auto-parser for HP laptops with | ||
5 | cx20459 codec | ||
6 | |||
7 | commit de4da59e480cdf1075b33dbaf8078fc87bc52241 upstream. | ||
8 | |||
9 | These laptops can work well with the auto-parser and their BIOS setups, | ||
10 | and in addition, the auto-parser fixes the problem with S3/S4 where | ||
11 | the unsol event handling is killed after resume due to fallback to the | ||
12 | single-cmd mode. | ||
13 | |||
14 | Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740115 | ||
15 | |||
16 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | sound/pci/hda/patch_conexant.c | 2 -- | ||
20 | 1 file changed, 2 deletions(-) | ||
21 | |||
22 | diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c | ||
23 | index 0de2119..7072251 100644 | ||
24 | --- a/sound/pci/hda/patch_conexant.c | ||
25 | +++ b/sound/pci/hda/patch_conexant.c | ||
26 | @@ -1120,8 +1120,6 @@ static const char * const cxt5045_models[CXT5045_MODELS] = { | ||
27 | |||
28 | static const struct snd_pci_quirk cxt5045_cfg_tbl[] = { | ||
29 | SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HP530), | ||
30 | - SND_PCI_QUIRK_MASK(0x103c, 0xff00, 0x3000, "HP DV Series", | ||
31 | - CXT5045_LAPTOP_HPSENSE), | ||
32 | SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P105", CXT5045_LAPTOP_MICSENSE), | ||
33 | SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ), | ||
34 | SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE), | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch deleted file mode 100644 index 52789054..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0014-ALSA-hda-Return-the-error-from-get_wcaps_type-for-in.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 244e54a801fd96fbe05447599832c9eb110debeb Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Tue, 10 Jan 2012 12:41:22 +0100 | ||
4 | Subject: [PATCH 014/129] ALSA: hda - Return the error from get_wcaps_type() | ||
5 | for invalid NIDs | ||
6 | |||
7 | commit 3a90274de3548ebb2aabfbf488cea8e275a73dc6 upstream. | ||
8 | |||
9 | When an invalid NID is given, get_wcaps() returns zero as the error, | ||
10 | but get_wcaps_type() takes it as the normal value and returns a bogus | ||
11 | AC_WID_AUD_OUT value. This confuses the parser. | ||
12 | |||
13 | With this patch, get_wcaps_type() returns -1 when value 0 is given, | ||
14 | i.e. an invalid NID is passed to get_wcaps(). | ||
15 | |||
16 | Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118 | ||
17 | |||
18 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | sound/pci/hda/hda_local.h | 7 ++++++- | ||
22 | sound/pci/hda/hda_proc.c | 2 ++ | ||
23 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h | ||
26 | index 618ddad..368f0c5 100644 | ||
27 | --- a/sound/pci/hda/hda_local.h | ||
28 | +++ b/sound/pci/hda/hda_local.h | ||
29 | @@ -487,7 +487,12 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) | ||
30 | } | ||
31 | |||
32 | /* get the widget type from widget capability bits */ | ||
33 | -#define get_wcaps_type(wcaps) (((wcaps) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT) | ||
34 | +static inline int get_wcaps_type(unsigned int wcaps) | ||
35 | +{ | ||
36 | + if (!wcaps) | ||
37 | + return -1; /* invalid type */ | ||
38 | + return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; | ||
39 | +} | ||
40 | |||
41 | static inline unsigned int get_wcaps_channels(u32 wcaps) | ||
42 | { | ||
43 | diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c | ||
44 | index 2c981b5..254ab52 100644 | ||
45 | --- a/sound/pci/hda/hda_proc.c | ||
46 | +++ b/sound/pci/hda/hda_proc.c | ||
47 | @@ -54,6 +54,8 @@ static const char *get_wid_type_name(unsigned int wid_value) | ||
48 | [AC_WID_BEEP] = "Beep Generator Widget", | ||
49 | [AC_WID_VENDOR] = "Vendor Defined Widget", | ||
50 | }; | ||
51 | + if (wid_value == -1) | ||
52 | + return "UNKNOWN Widget"; | ||
53 | wid_value &= 0xf; | ||
54 | if (names[wid_value]) | ||
55 | return names[wid_value]; | ||
56 | -- | ||
57 | 1.7.9.5 | ||
58 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch deleted file mode 100644 index 5284246e..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0015-ALSA-hda-Fix-the-detection-of-Loopback-Mixing-contro.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From cf6e92f0c3bbf4cdbd62a8838b9b8f2153d9607a Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Tue, 10 Jan 2012 15:16:02 +0100 | ||
4 | Subject: [PATCH 015/129] ALSA: hda - Fix the detection of "Loopback Mixing" | ||
5 | control for VIA codecs | ||
6 | |||
7 | commit 4808d12d1dddb046ec86425e5f6766f02e950292 upstream. | ||
8 | |||
9 | Currently the driver checks only the out_mix_path[] for the primary | ||
10 | output route for judging whether to create the loopback-mixing control | ||
11 | or not. But, there are cases where aamix-routing is available only on | ||
12 | headphone or speaker paths but not on the primary output path. So, the | ||
13 | driver ignores such cases inappropriately. | ||
14 | |||
15 | This patch fixes the check of the loopback-mixing control by testing | ||
16 | all mix-routing paths. | ||
17 | |||
18 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | sound/pci/hda/patch_via.c | 5 ++++- | ||
22 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c | ||
25 | index b513762..8d69e59 100644 | ||
26 | --- a/sound/pci/hda/patch_via.c | ||
27 | +++ b/sound/pci/hda/patch_via.c | ||
28 | @@ -2200,7 +2200,10 @@ static int via_auto_create_loopback_switch(struct hda_codec *codec) | ||
29 | { | ||
30 | struct via_spec *spec = codec->spec; | ||
31 | |||
32 | - if (!spec->aa_mix_nid || !spec->out_mix_path.depth) | ||
33 | + if (!spec->aa_mix_nid) | ||
34 | + return 0; /* no loopback switching available */ | ||
35 | + if (!(spec->out_mix_path.depth || spec->hp_mix_path.depth || | ||
36 | + spec->speaker_path.depth)) | ||
37 | return 0; /* no loopback switching available */ | ||
38 | if (!via_clone_control(spec, &via_aamix_ctl_enum)) | ||
39 | return -ENOMEM; | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch deleted file mode 100644 index 457ebc2c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0016-ALSA-hda-Fix-the-lost-power-setup-of-seconary-pins-a.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 2fb2fe7e67d82706d84fdcf8876c28958c69998b Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Wed, 11 Jan 2012 12:34:11 +0100 | ||
4 | Subject: [PATCH 016/129] ALSA: hda - Fix the lost power-setup of seconary | ||
5 | pins after PM resume | ||
6 | |||
7 | commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 upstream. | ||
8 | |||
9 | When multiple headphone or other detectable output pins are present, | ||
10 | the power-map has to be updated after resume appropriately, but the | ||
11 | current driver doesn't check all pins but only the first pin (since | ||
12 | it's enough to check it for the mute-behavior). This resulted in the | ||
13 | silent output from the secondary outputs after PM resume. | ||
14 | |||
15 | This patch fixes the problem by checking all pins at (re-)init time. | ||
16 | |||
17 | Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347 | ||
18 | |||
19 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
21 | --- | ||
22 | sound/pci/hda/patch_sigmatel.c | 36 +++++++++++++++++++++++------------- | ||
23 | 1 file changed, 23 insertions(+), 13 deletions(-) | ||
24 | |||
25 | diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c | ||
26 | index 616678f..a87b260 100644 | ||
27 | --- a/sound/pci/hda/patch_sigmatel.c | ||
28 | +++ b/sound/pci/hda/patch_sigmatel.c | ||
29 | @@ -4326,6 +4326,27 @@ static void stac_store_hints(struct hda_codec *codec) | ||
30 | } | ||
31 | } | ||
32 | |||
33 | +static void stac_issue_unsol_events(struct hda_codec *codec, int num_pins, | ||
34 | + const hda_nid_t *pins) | ||
35 | +{ | ||
36 | + while (num_pins--) | ||
37 | + stac_issue_unsol_event(codec, *pins++); | ||
38 | +} | ||
39 | + | ||
40 | +/* fake event to set up pins */ | ||
41 | +static void stac_fake_hp_events(struct hda_codec *codec) | ||
42 | +{ | ||
43 | + struct sigmatel_spec *spec = codec->spec; | ||
44 | + | ||
45 | + if (spec->autocfg.hp_outs) | ||
46 | + stac_issue_unsol_events(codec, spec->autocfg.hp_outs, | ||
47 | + spec->autocfg.hp_pins); | ||
48 | + if (spec->autocfg.line_outs && | ||
49 | + spec->autocfg.line_out_pins[0] != spec->autocfg.hp_pins[0]) | ||
50 | + stac_issue_unsol_events(codec, spec->autocfg.line_outs, | ||
51 | + spec->autocfg.line_out_pins); | ||
52 | +} | ||
53 | + | ||
54 | static int stac92xx_init(struct hda_codec *codec) | ||
55 | { | ||
56 | struct sigmatel_spec *spec = codec->spec; | ||
57 | @@ -4376,10 +4397,7 @@ static int stac92xx_init(struct hda_codec *codec) | ||
58 | stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], | ||
59 | AC_PINCTL_OUT_EN); | ||
60 | /* fake event to set up pins */ | ||
61 | - if (cfg->hp_pins[0]) | ||
62 | - stac_issue_unsol_event(codec, cfg->hp_pins[0]); | ||
63 | - else if (cfg->line_out_pins[0]) | ||
64 | - stac_issue_unsol_event(codec, cfg->line_out_pins[0]); | ||
65 | + stac_fake_hp_events(codec); | ||
66 | } else { | ||
67 | stac92xx_auto_init_multi_out(codec); | ||
68 | stac92xx_auto_init_hp_out(codec); | ||
69 | @@ -5028,19 +5046,11 @@ static void stac927x_proc_hook(struct snd_info_buffer *buffer, | ||
70 | #ifdef CONFIG_PM | ||
71 | static int stac92xx_resume(struct hda_codec *codec) | ||
72 | { | ||
73 | - struct sigmatel_spec *spec = codec->spec; | ||
74 | - | ||
75 | stac92xx_init(codec); | ||
76 | snd_hda_codec_resume_amp(codec); | ||
77 | snd_hda_codec_resume_cache(codec); | ||
78 | /* fake event to set up pins again to override cached values */ | ||
79 | - if (spec->hp_detect) { | ||
80 | - if (spec->autocfg.hp_pins[0]) | ||
81 | - stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); | ||
82 | - else if (spec->autocfg.line_out_pins[0]) | ||
83 | - stac_issue_unsol_event(codec, | ||
84 | - spec->autocfg.line_out_pins[0]); | ||
85 | - } | ||
86 | + stac_fake_hp_events(codec); | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | -- | ||
91 | 1.7.9.5 | ||
92 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch deleted file mode 100644 index f39bef50..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0017-drm-radeon-kms-workaround-invalid-AVI-infoframe-chec.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 27ce68d3d7c9f0815bb269da0495aa675eebf846 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> | ||
3 | Date: Fri, 23 Dec 2011 20:32:18 +0100 | ||
4 | Subject: [PATCH 017/129] drm/radeon/kms: workaround invalid AVI infoframe | ||
5 | checksum issue | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | commit 92db7f6c860b8190571a9dc1fcbc16d003422fe8 upstream. | ||
11 | |||
12 | This change was verified to fix both issues with no video I've | ||
13 | investigated. I've also checked checksum calculation with fglrx on: | ||
14 | RV620, HD54xx, HD5450, HD6310, HD6320. | ||
15 | |||
16 | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> | ||
17 | Signed-off-by: Dave Airlie <airlied@redhat.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | drivers/gpu/drm/radeon/r600_hdmi.c | 7 +++++++ | ||
21 | 1 file changed, 7 insertions(+) | ||
22 | |||
23 | diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c | ||
24 | index f5ac7e7..c45d921 100644 | ||
25 | --- a/drivers/gpu/drm/radeon/r600_hdmi.c | ||
26 | +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | ||
27 | @@ -196,6 +196,13 @@ static void r600_hdmi_videoinfoframe( | ||
28 | frame[0xD] = (right_bar >> 8); | ||
29 | |||
30 | r600_hdmi_infoframe_checksum(0x82, 0x02, 0x0D, frame); | ||
31 | + /* Our header values (type, version, length) should be alright, Intel | ||
32 | + * is using the same. Checksum function also seems to be OK, it works | ||
33 | + * fine for audio infoframe. However calculated value is always lower | ||
34 | + * by 2 in comparison to fglrx. It breaks displaying anything in case | ||
35 | + * of TVs that strictly check the checksum. Hack it manually here to | ||
36 | + * workaround this issue. */ | ||
37 | + frame[0x0] += 2; | ||
38 | |||
39 | WREG32(offset+R600_HDMI_VIDEOINFOFRAME_0, | ||
40 | frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24)); | ||
41 | -- | ||
42 | 1.7.9.5 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch deleted file mode 100644 index 8eb632dd..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0018-drm-radeon-kms-disable-writeback-on-pre-R300-asics.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 4080c93fb98e70e64d31c2ab2bd036a940c0807b Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Deucher <alexander.deucher@amd.com> | ||
3 | Date: Tue, 3 Jan 2012 09:48:38 -0500 | ||
4 | Subject: [PATCH 018/129] drm/radeon/kms: disable writeback on pre-R300 asics | ||
5 | |||
6 | commit 28eebb703e28bc455ba704adb1026f76649b768c upstream. | ||
7 | |||
8 | We often end up missing fences on older asics with | ||
9 | writeback enabled which leads to delays in the userspace | ||
10 | accel code, so just disable it by default on those asics. | ||
11 | |||
12 | Reported-by: Helge Deller <deller@gmx.de> | ||
13 | Reported-by: Dave Airlie <airlied@redhat.com> | ||
14 | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ||
15 | Signed-off-by: Dave Airlie <airlied@redhat.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | drivers/gpu/drm/radeon/radeon_device.c | 5 ++++- | ||
19 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c | ||
22 | index c4d00a1..9b39145 100644 | ||
23 | --- a/drivers/gpu/drm/radeon/radeon_device.c | ||
24 | +++ b/drivers/gpu/drm/radeon/radeon_device.c | ||
25 | @@ -224,8 +224,11 @@ int radeon_wb_init(struct radeon_device *rdev) | ||
26 | if (radeon_no_wb == 1) | ||
27 | rdev->wb.enabled = false; | ||
28 | else { | ||
29 | - /* often unreliable on AGP */ | ||
30 | if (rdev->flags & RADEON_IS_AGP) { | ||
31 | + /* often unreliable on AGP */ | ||
32 | + rdev->wb.enabled = false; | ||
33 | + } else if (rdev->family < CHIP_R300) { | ||
34 | + /* often unreliable on pre-r300 */ | ||
35 | rdev->wb.enabled = false; | ||
36 | } else { | ||
37 | rdev->wb.enabled = true; | ||
38 | -- | ||
39 | 1.7.9.5 | ||
40 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch deleted file mode 100644 index 64a0b207..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0019-radeon-Fix-disabling-PCI-bus-mastering-on-big-endian.patch +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | From 73267cb0dea18d38a023f20c110e79b742c030c9 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com> | ||
3 | Date: Thu, 5 Jan 2012 18:42:17 +0100 | ||
4 | Subject: [PATCH 019/129] radeon: Fix disabling PCI bus mastering on big | ||
5 | endian hosts. | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | commit 3df96909b75835d487a9178761622b0cbd7310d4 upstream. | ||
11 | |||
12 | It would previously write basically random bits to PCI configuration space... | ||
13 | Not very surprising that the GPU tended to stop responding completely. The | ||
14 | resulting MCE even froze the whole machine sometimes. | ||
15 | |||
16 | Now resetting the GPU after a lockup has at least a fighting chance of | ||
17 | succeeding. | ||
18 | |||
19 | Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> | ||
20 | Reviewed-by: Alex Deucher <alexander.deucher@amd.com> | ||
21 | Signed-off-by: Dave Airlie <airlied@redhat.com> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | drivers/gpu/drm/radeon/r100.c | 5 +++-- | ||
25 | drivers/gpu/drm/radeon/rs600.c | 4 ++-- | ||
26 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c | ||
29 | index bfc08f6..31b0d1a 100644 | ||
30 | --- a/drivers/gpu/drm/radeon/r100.c | ||
31 | +++ b/drivers/gpu/drm/radeon/r100.c | ||
32 | @@ -2177,6 +2177,7 @@ bool r100_gpu_is_lockup(struct radeon_device *rdev) | ||
33 | void r100_bm_disable(struct radeon_device *rdev) | ||
34 | { | ||
35 | u32 tmp; | ||
36 | + u16 tmp16; | ||
37 | |||
38 | /* disable bus mastering */ | ||
39 | tmp = RREG32(R_000030_BUS_CNTL); | ||
40 | @@ -2187,8 +2188,8 @@ void r100_bm_disable(struct radeon_device *rdev) | ||
41 | WREG32(R_000030_BUS_CNTL, (tmp & 0xFFFFFFFF) | 0x00000040); | ||
42 | tmp = RREG32(RADEON_BUS_CNTL); | ||
43 | mdelay(1); | ||
44 | - pci_read_config_word(rdev->pdev, 0x4, (u16*)&tmp); | ||
45 | - pci_write_config_word(rdev->pdev, 0x4, tmp & 0xFFFB); | ||
46 | + pci_read_config_word(rdev->pdev, 0x4, &tmp16); | ||
47 | + pci_write_config_word(rdev->pdev, 0x4, tmp16 & 0xFFFB); | ||
48 | mdelay(1); | ||
49 | } | ||
50 | |||
51 | diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c | ||
52 | index b1053d6..c259e21 100644 | ||
53 | --- a/drivers/gpu/drm/radeon/rs600.c | ||
54 | +++ b/drivers/gpu/drm/radeon/rs600.c | ||
55 | @@ -324,10 +324,10 @@ void rs600_hpd_fini(struct radeon_device *rdev) | ||
56 | |||
57 | void rs600_bm_disable(struct radeon_device *rdev) | ||
58 | { | ||
59 | - u32 tmp; | ||
60 | + u16 tmp; | ||
61 | |||
62 | /* disable bus mastering */ | ||
63 | - pci_read_config_word(rdev->pdev, 0x4, (u16*)&tmp); | ||
64 | + pci_read_config_word(rdev->pdev, 0x4, &tmp); | ||
65 | pci_write_config_word(rdev->pdev, 0x4, tmp & 0xFFFB); | ||
66 | mdelay(1); | ||
67 | } | ||
68 | -- | ||
69 | 1.7.9.5 | ||
70 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch deleted file mode 100644 index 68ba0561..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0020-pnfs-obj-pNFS-errors-are-communicated-on-iodata-pnfs.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 873440a8680a5cf108ce5372f065fec762b7f73c Mon Sep 17 00:00:00 2001 | ||
2 | From: Boaz Harrosh <bharrosh@panasas.com> | ||
3 | Date: Fri, 6 Jan 2012 09:28:12 +0200 | ||
4 | Subject: [PATCH 020/129] pnfs-obj: pNFS errors are communicated on | ||
5 | iodata->pnfs_error | ||
6 | |||
7 | commit 5c0b4129c07b902b27d3f3ebc087757f534a3abd upstream. | ||
8 | |||
9 | Some time along the way pNFS IO errors were switched to | ||
10 | communicate with a special iodata->pnfs_error member instead | ||
11 | of the regular RPC members. But objlayout was not switched | ||
12 | over. | ||
13 | |||
14 | Fix that! | ||
15 | Without this fix any IO error is hanged, because IO is not | ||
16 | switched to MDS and pages are never cleared or read. | ||
17 | |||
18 | [Applies to 3.2.0. Same bug different patch for 3.1/0 Kernels] | ||
19 | Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> | ||
20 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
22 | --- | ||
23 | fs/nfs/objlayout/objlayout.c | 4 ++++ | ||
24 | 1 file changed, 4 insertions(+) | ||
25 | |||
26 | diff --git a/fs/nfs/objlayout/objlayout.c b/fs/nfs/objlayout/objlayout.c | ||
27 | index 72074e3..b3c2903 100644 | ||
28 | --- a/fs/nfs/objlayout/objlayout.c | ||
29 | +++ b/fs/nfs/objlayout/objlayout.c | ||
30 | @@ -254,6 +254,8 @@ objlayout_read_done(struct objlayout_io_res *oir, ssize_t status, bool sync) | ||
31 | oir->status = rdata->task.tk_status = status; | ||
32 | if (status >= 0) | ||
33 | rdata->res.count = status; | ||
34 | + else | ||
35 | + rdata->pnfs_error = status; | ||
36 | objlayout_iodone(oir); | ||
37 | /* must not use oir after this point */ | ||
38 | |||
39 | @@ -334,6 +336,8 @@ objlayout_write_done(struct objlayout_io_res *oir, ssize_t status, bool sync) | ||
40 | if (status >= 0) { | ||
41 | wdata->res.count = status; | ||
42 | wdata->verf.committed = oir->committed; | ||
43 | + } else { | ||
44 | + wdata->pnfs_error = status; | ||
45 | } | ||
46 | objlayout_iodone(oir); | ||
47 | /* must not use oir after this point */ | ||
48 | -- | ||
49 | 1.7.9.5 | ||
50 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch deleted file mode 100644 index b05bc19e..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0021-pnfs-obj-Must-return-layout-on-IO-error.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From e20497d523b9954e6fe3a3cd333d1286e3c241ed Mon Sep 17 00:00:00 2001 | ||
2 | From: Boaz Harrosh <bharrosh@panasas.com> | ||
3 | Date: Fri, 6 Jan 2012 09:31:20 +0200 | ||
4 | Subject: [PATCH 021/129] pnfs-obj: Must return layout on IO error | ||
5 | |||
6 | commit fe0fe83585f88346557868a803a479dfaaa0688a upstream. | ||
7 | |||
8 | As mandated by the standard. In case of an IO error, a pNFS | ||
9 | objects layout driver must return it's layout. This is because | ||
10 | all device errors are reported to the server as part of the | ||
11 | layout return buffer. | ||
12 | |||
13 | This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR | ||
14 | is done, through a bit flag on the pnfs_layoutdriver_type->flags | ||
15 | member. The flag is set by the layout driver that wants a | ||
16 | layout_return preformed at pnfs_ld_{write,read}_done in case | ||
17 | of an error. | ||
18 | (Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr | ||
19 | because this code is never called outside of pnfs.c and pnfs IO | ||
20 | paths) | ||
21 | |||
22 | Without this patch 3.[0-2] Kernels leak memory and have an annoying | ||
23 | WARN_ON after every IO error utilizing the pnfs-obj driver. | ||
24 | |||
25 | Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> | ||
26 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
28 | --- | ||
29 | fs/nfs/objlayout/objio_osd.c | 3 ++- | ||
30 | fs/nfs/pnfs.c | 12 ++++++++++++ | ||
31 | fs/nfs/pnfs.h | 1 + | ||
32 | 3 files changed, 15 insertions(+), 1 deletion(-) | ||
33 | |||
34 | diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c | ||
35 | index c807ab9..55d0128 100644 | ||
36 | --- a/fs/nfs/objlayout/objio_osd.c | ||
37 | +++ b/fs/nfs/objlayout/objio_osd.c | ||
38 | @@ -551,7 +551,8 @@ static const struct nfs_pageio_ops objio_pg_write_ops = { | ||
39 | static struct pnfs_layoutdriver_type objlayout_type = { | ||
40 | .id = LAYOUT_OSD2_OBJECTS, | ||
41 | .name = "LAYOUT_OSD2_OBJECTS", | ||
42 | - .flags = PNFS_LAYOUTRET_ON_SETATTR, | ||
43 | + .flags = PNFS_LAYOUTRET_ON_SETATTR | | ||
44 | + PNFS_LAYOUTRET_ON_ERROR, | ||
45 | |||
46 | .alloc_layout_hdr = objlayout_alloc_layout_hdr, | ||
47 | .free_layout_hdr = objlayout_free_layout_hdr, | ||
48 | diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c | ||
49 | index 8e672a2..f881a63 100644 | ||
50 | --- a/fs/nfs/pnfs.c | ||
51 | +++ b/fs/nfs/pnfs.c | ||
52 | @@ -1178,6 +1178,15 @@ void pnfs_ld_write_done(struct nfs_write_data *data) | ||
53 | put_lseg(data->lseg); | ||
54 | data->lseg = NULL; | ||
55 | dprintk("pnfs write error = %d\n", data->pnfs_error); | ||
56 | + if (NFS_SERVER(data->inode)->pnfs_curr_ld->flags & | ||
57 | + PNFS_LAYOUTRET_ON_ERROR) { | ||
58 | + /* Don't lo_commit on error, Server will needs to | ||
59 | + * preform a file recovery. | ||
60 | + */ | ||
61 | + clear_bit(NFS_INO_LAYOUTCOMMIT, | ||
62 | + &NFS_I(data->inode)->flags); | ||
63 | + pnfs_return_layout(data->inode); | ||
64 | + } | ||
65 | } | ||
66 | data->mds_ops->rpc_release(data); | ||
67 | } | ||
68 | @@ -1267,6 +1276,9 @@ static void pnfs_ld_handle_read_error(struct nfs_read_data *data) | ||
69 | put_lseg(data->lseg); | ||
70 | data->lseg = NULL; | ||
71 | dprintk("pnfs write error = %d\n", data->pnfs_error); | ||
72 | + if (NFS_SERVER(data->inode)->pnfs_curr_ld->flags & | ||
73 | + PNFS_LAYOUTRET_ON_ERROR) | ||
74 | + pnfs_return_layout(data->inode); | ||
75 | |||
76 | nfs_pageio_init_read_mds(&pgio, data->inode); | ||
77 | |||
78 | diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h | ||
79 | index 1509530..53d593a 100644 | ||
80 | --- a/fs/nfs/pnfs.h | ||
81 | +++ b/fs/nfs/pnfs.h | ||
82 | @@ -68,6 +68,7 @@ enum { | ||
83 | enum layoutdriver_policy_flags { | ||
84 | /* Should the pNFS client commit and return the layout upon a setattr */ | ||
85 | PNFS_LAYOUTRET_ON_SETATTR = 1 << 0, | ||
86 | + PNFS_LAYOUTRET_ON_ERROR = 1 << 1, | ||
87 | }; | ||
88 | |||
89 | struct nfs4_deviceid_node; | ||
90 | -- | ||
91 | 1.7.9.5 | ||
92 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch deleted file mode 100644 index ceac5a90..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0022-NFS-Retry-mounting-NFSROOT.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 51a699a0c53b199599fe16688248143ee98a167e Mon Sep 17 00:00:00 2001 | ||
2 | From: Chuck Lever <chuck.lever@oracle.com> | ||
3 | Date: Mon, 5 Dec 2011 15:40:30 -0500 | ||
4 | Subject: [PATCH 022/129] NFS: Retry mounting NFSROOT | ||
5 | |||
6 | commit 43717c7daebf10b43f12e68512484b3095bb1ba5 upstream. | ||
7 | |||
8 | Lukas Razik <linux@razik.name> reports that on his SPARC system, | ||
9 | booting with an NFS root file system stopped working after commit | ||
10 | 56463e50 "NFS: Use super.c for NFSROOT mount option parsing." | ||
11 | |||
12 | We found that the network switch to which Lukas' client was attached | ||
13 | was delaying access to the LAN after the client's NIC driver reported | ||
14 | that its link was up. The delay was longer than the timeouts used in | ||
15 | the NFS client during mounting. | ||
16 | |||
17 | NFSROOT worked for Lukas before commit 56463e50 because in those | ||
18 | kernels, the client's first operation was an rpcbind request to | ||
19 | determine which port the NFS server was listening on. When that | ||
20 | request failed after a long timeout, the client simply selected the | ||
21 | default NFS port (2049). By that time the switch was allowing access | ||
22 | to the LAN, and the mount succeeded. | ||
23 | |||
24 | Neither of these client behaviors is desirable, so reverting 56463e50 | ||
25 | is really not a choice. Instead, introduce a mechanism that retries | ||
26 | the NFSROOT mount request several times. This is the same tactic that | ||
27 | normal user space NFS mounts employ to overcome server and network | ||
28 | delays. | ||
29 | |||
30 | Signed-off-by: Lukas Razik <linux@razik.name> | ||
31 | [ cel: match kernel coding style, add proper patch description ] | ||
32 | [ cel: add exponential back-off ] | ||
33 | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> | ||
34 | Tested-by: Lukas Razik <linux@razik.name> | ||
35 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
36 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
37 | --- | ||
38 | init/do_mounts.c | 35 +++++++++++++++++++++++++++++++---- | ||
39 | 1 file changed, 31 insertions(+), 4 deletions(-) | ||
40 | |||
41 | diff --git a/init/do_mounts.c b/init/do_mounts.c | ||
42 | index 0f6e1d9..db6e5ee 100644 | ||
43 | --- a/init/do_mounts.c | ||
44 | +++ b/init/do_mounts.c | ||
45 | @@ -398,15 +398,42 @@ out: | ||
46 | } | ||
47 | |||
48 | #ifdef CONFIG_ROOT_NFS | ||
49 | + | ||
50 | +#define NFSROOT_TIMEOUT_MIN 5 | ||
51 | +#define NFSROOT_TIMEOUT_MAX 30 | ||
52 | +#define NFSROOT_RETRY_MAX 5 | ||
53 | + | ||
54 | static int __init mount_nfs_root(void) | ||
55 | { | ||
56 | char *root_dev, *root_data; | ||
57 | + unsigned int timeout; | ||
58 | + int try, err; | ||
59 | |||
60 | - if (nfs_root_data(&root_dev, &root_data) != 0) | ||
61 | - return 0; | ||
62 | - if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0) | ||
63 | + err = nfs_root_data(&root_dev, &root_data); | ||
64 | + if (err != 0) | ||
65 | return 0; | ||
66 | - return 1; | ||
67 | + | ||
68 | + /* | ||
69 | + * The server or network may not be ready, so try several | ||
70 | + * times. Stop after a few tries in case the client wants | ||
71 | + * to fall back to other boot methods. | ||
72 | + */ | ||
73 | + timeout = NFSROOT_TIMEOUT_MIN; | ||
74 | + for (try = 1; ; try++) { | ||
75 | + err = do_mount_root(root_dev, "nfs", | ||
76 | + root_mountflags, root_data); | ||
77 | + if (err == 0) | ||
78 | + return 1; | ||
79 | + if (try > NFSROOT_RETRY_MAX) | ||
80 | + break; | ||
81 | + | ||
82 | + /* Wait, in case the server refused us immediately */ | ||
83 | + ssleep(timeout); | ||
84 | + timeout <<= 1; | ||
85 | + if (timeout > NFSROOT_TIMEOUT_MAX) | ||
86 | + timeout = NFSROOT_TIMEOUT_MAX; | ||
87 | + } | ||
88 | + return 0; | ||
89 | } | ||
90 | #endif | ||
91 | |||
92 | -- | ||
93 | 1.7.9.5 | ||
94 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch deleted file mode 100644 index 34ea494a..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0023-NFSv4.1-fix-backchannel-slotid-off-by-one-bug.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 4d12390d5a9b1c151416e0fbef4702455f4a2626 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Adamson <andros@netapp.com> | ||
3 | Date: Wed, 9 Nov 2011 13:58:20 -0500 | ||
4 | Subject: [PATCH 023/129] NFSv4.1: fix backchannel slotid off-by-one bug | ||
5 | |||
6 | commit 61f2e5106582d02f30b6807e3f9c07463c572ccb upstream. | ||
7 | |||
8 | Signed-off-by: Andy Adamson <andros@netapp.com> | ||
9 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
10 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
11 | --- | ||
12 | fs/nfs/callback_proc.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c | ||
16 | index 43926ad..54cea8a 100644 | ||
17 | --- a/fs/nfs/callback_proc.c | ||
18 | +++ b/fs/nfs/callback_proc.c | ||
19 | @@ -339,7 +339,7 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) | ||
20 | dprintk("%s enter. slotid %d seqid %d\n", | ||
21 | __func__, args->csa_slotid, args->csa_sequenceid); | ||
22 | |||
23 | - if (args->csa_slotid > NFS41_BC_MAX_CALLBACKS) | ||
24 | + if (args->csa_slotid >= NFS41_BC_MAX_CALLBACKS) | ||
25 | return htonl(NFS4ERR_BADSLOT); | ||
26 | |||
27 | slot = tbl->slots + args->csa_slotid; | ||
28 | -- | ||
29 | 1.7.9.5 | ||
30 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch deleted file mode 100644 index 70d96b31..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0024-NFS-fix-recent-breakage-to-NFS-error-handling.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 7aab7b372a174e80233a74ff10d55ded1ea28c2f Mon Sep 17 00:00:00 2001 | ||
2 | From: NeilBrown <neilb@suse.de> | ||
3 | Date: Wed, 16 Nov 2011 11:46:31 +1100 | ||
4 | Subject: [PATCH 024/129] NFS - fix recent breakage to NFS error handling. | ||
5 | |||
6 | commit 2edb6bc3852c681c0d948245bd55108dc6407604 upstream. | ||
7 | |||
8 | From c6d615d2b97fe305cbf123a8751ced859dca1d5e Mon Sep 17 00:00:00 2001 | ||
9 | From: NeilBrown <neilb@suse.de> | ||
10 | Date: Wed, 16 Nov 2011 09:39:05 +1100 | ||
11 | Subject: NFS - fix recent breakage to NFS error handling. | ||
12 | |||
13 | commit 02c24a82187d5a628c68edfe71ae60dc135cd178 made a small and | ||
14 | presumably unintended change to write error handling in NFS. | ||
15 | |||
16 | Previously an error from filemap_write_and_wait_range would only be of | ||
17 | interest if nfs_file_fsync did not return an error. After this commit, | ||
18 | an error from filemap_write_and_wait_range would mean that (the rest of) | ||
19 | nfs_file_fsync would not even be called. | ||
20 | |||
21 | This means that: | ||
22 | 1/ you are more likely to see EIO than e.g. EDQUOT or ENOSPC. | ||
23 | 2/ NFS_CONTEXT_ERROR_WRITE remains set for longer so more writes are | ||
24 | synchronous. | ||
25 | |||
26 | This patch restores previous behaviour. | ||
27 | |||
28 | Cc: Josef Bacik <josef@redhat.com> | ||
29 | Cc: Jan Kara <jack@suse.cz> | ||
30 | Cc: Al Viro <viro@zeniv.linux.org.uk> | ||
31 | Signed-off-by: NeilBrown <neilb@suse.de> | ||
32 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
34 | --- | ||
35 | fs/nfs/file.c | 4 ++-- | ||
36 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
37 | |||
38 | diff --git a/fs/nfs/file.c b/fs/nfs/file.c | ||
39 | index 606ef0f..c43a452 100644 | ||
40 | --- a/fs/nfs/file.c | ||
41 | +++ b/fs/nfs/file.c | ||
42 | @@ -272,13 +272,13 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | ||
43 | datasync); | ||
44 | |||
45 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | ||
46 | - if (ret) | ||
47 | - return ret; | ||
48 | mutex_lock(&inode->i_mutex); | ||
49 | |||
50 | nfs_inc_stats(inode, NFSIOS_VFSFSYNC); | ||
51 | have_error = test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); | ||
52 | status = nfs_commit_inode(inode, FLUSH_SYNC); | ||
53 | + if (status >= 0 && ret < 0) | ||
54 | + status = ret; | ||
55 | have_error |= test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags); | ||
56 | if (have_error) | ||
57 | ret = xchg(&ctx->error, 0); | ||
58 | -- | ||
59 | 1.7.9.5 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch deleted file mode 100644 index f57d7326..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0025-NFSv4-include-bitmap-in-nfsv4-get-acl-data.patch +++ /dev/null | |||
@@ -1,313 +0,0 @@ | |||
1 | From 0ae2afe3f515d5e56beeefa0f0e5fd23cb358f4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Adamson <andros@netapp.com> | ||
3 | Date: Wed, 7 Dec 2011 11:55:27 -0500 | ||
4 | Subject: [PATCH 025/129] NFSv4: include bitmap in nfsv4 get acl data | ||
5 | |||
6 | commit bf118a342f10dafe44b14451a1392c3254629a1f upstream. | ||
7 | |||
8 | The NFSv4 bitmap size is unbounded: a server can return an arbitrary | ||
9 | sized bitmap in an FATTR4_WORD0_ACL request. Replace using the | ||
10 | nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server | ||
11 | with the inclusion of the bitmap (xdr length plus bitmasks) and the acl data | ||
12 | xdr length to the (cached) acl page data. | ||
13 | |||
14 | This is a general solution to commit e5012d1f "NFSv4.1: update | ||
15 | nfs4_fattr_bitmap_maxsz" and fixes hitting a BUG_ON in xdr_shrink_bufhead | ||
16 | when getting ACLs. | ||
17 | |||
18 | Fix a bug in decode_getacl that returned -EINVAL on ACLs > page when getxattr | ||
19 | was called with a NULL buffer, preventing ACL > PAGE_SIZE from being retrieved. | ||
20 | |||
21 | Signed-off-by: Andy Adamson <andros@netapp.com> | ||
22 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
24 | --- | ||
25 | fs/nfs/nfs4proc.c | 96 ++++++++++++++++++++++++++------------------ | ||
26 | fs/nfs/nfs4xdr.c | 31 ++++++++++---- | ||
27 | include/linux/nfs_xdr.h | 5 +++ | ||
28 | include/linux/sunrpc/xdr.h | 2 + | ||
29 | net/sunrpc/xdr.c | 3 +- | ||
30 | 5 files changed, 89 insertions(+), 48 deletions(-) | ||
31 | |||
32 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | ||
33 | index d9f4d78..055d702 100644 | ||
34 | --- a/fs/nfs/nfs4proc.c | ||
35 | +++ b/fs/nfs/nfs4proc.c | ||
36 | @@ -3430,19 +3430,6 @@ static inline int nfs4_server_supports_acls(struct nfs_server *server) | ||
37 | */ | ||
38 | #define NFS4ACL_MAXPAGES (XATTR_SIZE_MAX >> PAGE_CACHE_SHIFT) | ||
39 | |||
40 | -static void buf_to_pages(const void *buf, size_t buflen, | ||
41 | - struct page **pages, unsigned int *pgbase) | ||
42 | -{ | ||
43 | - const void *p = buf; | ||
44 | - | ||
45 | - *pgbase = offset_in_page(buf); | ||
46 | - p -= *pgbase; | ||
47 | - while (p < buf + buflen) { | ||
48 | - *(pages++) = virt_to_page(p); | ||
49 | - p += PAGE_CACHE_SIZE; | ||
50 | - } | ||
51 | -} | ||
52 | - | ||
53 | static int buf_to_pages_noslab(const void *buf, size_t buflen, | ||
54 | struct page **pages, unsigned int *pgbase) | ||
55 | { | ||
56 | @@ -3539,9 +3526,19 @@ out: | ||
57 | nfs4_set_cached_acl(inode, acl); | ||
58 | } | ||
59 | |||
60 | +/* | ||
61 | + * The getxattr API returns the required buffer length when called with a | ||
62 | + * NULL buf. The NFSv4 acl tool then calls getxattr again after allocating | ||
63 | + * the required buf. On a NULL buf, we send a page of data to the server | ||
64 | + * guessing that the ACL request can be serviced by a page. If so, we cache | ||
65 | + * up to the page of ACL data, and the 2nd call to getxattr is serviced by | ||
66 | + * the cache. If not so, we throw away the page, and cache the required | ||
67 | + * length. The next getxattr call will then produce another round trip to | ||
68 | + * the server, this time with the input buf of the required size. | ||
69 | + */ | ||
70 | static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen) | ||
71 | { | ||
72 | - struct page *pages[NFS4ACL_MAXPAGES]; | ||
73 | + struct page *pages[NFS4ACL_MAXPAGES] = {NULL, }; | ||
74 | struct nfs_getaclargs args = { | ||
75 | .fh = NFS_FH(inode), | ||
76 | .acl_pages = pages, | ||
77 | @@ -3556,41 +3553,60 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu | ||
78 | .rpc_argp = &args, | ||
79 | .rpc_resp = &res, | ||
80 | }; | ||
81 | - struct page *localpage = NULL; | ||
82 | - int ret; | ||
83 | + int ret = -ENOMEM, npages, i, acl_len = 0; | ||
84 | |||
85 | - if (buflen < PAGE_SIZE) { | ||
86 | - /* As long as we're doing a round trip to the server anyway, | ||
87 | - * let's be prepared for a page of acl data. */ | ||
88 | - localpage = alloc_page(GFP_KERNEL); | ||
89 | - resp_buf = page_address(localpage); | ||
90 | - if (localpage == NULL) | ||
91 | - return -ENOMEM; | ||
92 | - args.acl_pages[0] = localpage; | ||
93 | - args.acl_pgbase = 0; | ||
94 | - args.acl_len = PAGE_SIZE; | ||
95 | - } else { | ||
96 | - resp_buf = buf; | ||
97 | - buf_to_pages(buf, buflen, args.acl_pages, &args.acl_pgbase); | ||
98 | + npages = (buflen + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
99 | + /* As long as we're doing a round trip to the server anyway, | ||
100 | + * let's be prepared for a page of acl data. */ | ||
101 | + if (npages == 0) | ||
102 | + npages = 1; | ||
103 | + | ||
104 | + for (i = 0; i < npages; i++) { | ||
105 | + pages[i] = alloc_page(GFP_KERNEL); | ||
106 | + if (!pages[i]) | ||
107 | + goto out_free; | ||
108 | + } | ||
109 | + if (npages > 1) { | ||
110 | + /* for decoding across pages */ | ||
111 | + args.acl_scratch = alloc_page(GFP_KERNEL); | ||
112 | + if (!args.acl_scratch) | ||
113 | + goto out_free; | ||
114 | } | ||
115 | - ret = nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode), &msg, &args.seq_args, &res.seq_res, 0); | ||
116 | + args.acl_len = npages * PAGE_SIZE; | ||
117 | + args.acl_pgbase = 0; | ||
118 | + /* Let decode_getfacl know not to fail if the ACL data is larger than | ||
119 | + * the page we send as a guess */ | ||
120 | + if (buf == NULL) | ||
121 | + res.acl_flags |= NFS4_ACL_LEN_REQUEST; | ||
122 | + resp_buf = page_address(pages[0]); | ||
123 | + | ||
124 | + dprintk("%s buf %p buflen %ld npages %d args.acl_len %ld\n", | ||
125 | + __func__, buf, buflen, npages, args.acl_len); | ||
126 | + ret = nfs4_call_sync(NFS_SERVER(inode)->client, NFS_SERVER(inode), | ||
127 | + &msg, &args.seq_args, &res.seq_res, 0); | ||
128 | if (ret) | ||
129 | goto out_free; | ||
130 | - if (res.acl_len > args.acl_len) | ||
131 | - nfs4_write_cached_acl(inode, NULL, res.acl_len); | ||
132 | + | ||
133 | + acl_len = res.acl_len - res.acl_data_offset; | ||
134 | + if (acl_len > args.acl_len) | ||
135 | + nfs4_write_cached_acl(inode, NULL, acl_len); | ||
136 | else | ||
137 | - nfs4_write_cached_acl(inode, resp_buf, res.acl_len); | ||
138 | + nfs4_write_cached_acl(inode, resp_buf + res.acl_data_offset, | ||
139 | + acl_len); | ||
140 | if (buf) { | ||
141 | ret = -ERANGE; | ||
142 | - if (res.acl_len > buflen) | ||
143 | + if (acl_len > buflen) | ||
144 | goto out_free; | ||
145 | - if (localpage) | ||
146 | - memcpy(buf, resp_buf, res.acl_len); | ||
147 | + _copy_from_pages(buf, pages, res.acl_data_offset, | ||
148 | + res.acl_len); | ||
149 | } | ||
150 | - ret = res.acl_len; | ||
151 | + ret = acl_len; | ||
152 | out_free: | ||
153 | - if (localpage) | ||
154 | - __free_page(localpage); | ||
155 | + for (i = 0; i < npages; i++) | ||
156 | + if (pages[i]) | ||
157 | + __free_page(pages[i]); | ||
158 | + if (args.acl_scratch) | ||
159 | + __free_page(args.acl_scratch); | ||
160 | return ret; | ||
161 | } | ||
162 | |||
163 | @@ -3621,6 +3637,8 @@ static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen) | ||
164 | nfs_zap_acl_cache(inode); | ||
165 | ret = nfs4_read_cached_acl(inode, buf, buflen); | ||
166 | if (ret != -ENOENT) | ||
167 | + /* -ENOENT is returned if there is no ACL or if there is an ACL | ||
168 | + * but no cached acl data, just the acl length */ | ||
169 | return ret; | ||
170 | return nfs4_get_acl_uncached(inode, buf, buflen); | ||
171 | } | ||
172 | diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c | ||
173 | index e6161b2..dcaf693 100644 | ||
174 | --- a/fs/nfs/nfs4xdr.c | ||
175 | +++ b/fs/nfs/nfs4xdr.c | ||
176 | @@ -2517,11 +2517,13 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, | ||
177 | encode_compound_hdr(xdr, req, &hdr); | ||
178 | encode_sequence(xdr, &args->seq_args, &hdr); | ||
179 | encode_putfh(xdr, args->fh, &hdr); | ||
180 | - replen = hdr.replen + op_decode_hdr_maxsz + nfs4_fattr_bitmap_maxsz + 1; | ||
181 | + replen = hdr.replen + op_decode_hdr_maxsz + 1; | ||
182 | encode_getattr_two(xdr, FATTR4_WORD0_ACL, 0, &hdr); | ||
183 | |||
184 | xdr_inline_pages(&req->rq_rcv_buf, replen << 2, | ||
185 | args->acl_pages, args->acl_pgbase, args->acl_len); | ||
186 | + xdr_set_scratch_buffer(xdr, page_address(args->acl_scratch), PAGE_SIZE); | ||
187 | + | ||
188 | encode_nops(&hdr); | ||
189 | } | ||
190 | |||
191 | @@ -4957,17 +4959,18 @@ decode_restorefh(struct xdr_stream *xdr) | ||
192 | } | ||
193 | |||
194 | static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req, | ||
195 | - size_t *acl_len) | ||
196 | + struct nfs_getaclres *res) | ||
197 | { | ||
198 | - __be32 *savep; | ||
199 | + __be32 *savep, *bm_p; | ||
200 | uint32_t attrlen, | ||
201 | bitmap[3] = {0}; | ||
202 | struct kvec *iov = req->rq_rcv_buf.head; | ||
203 | int status; | ||
204 | |||
205 | - *acl_len = 0; | ||
206 | + res->acl_len = 0; | ||
207 | if ((status = decode_op_hdr(xdr, OP_GETATTR)) != 0) | ||
208 | goto out; | ||
209 | + bm_p = xdr->p; | ||
210 | if ((status = decode_attr_bitmap(xdr, bitmap)) != 0) | ||
211 | goto out; | ||
212 | if ((status = decode_attr_length(xdr, &attrlen, &savep)) != 0) | ||
213 | @@ -4979,18 +4982,30 @@ static int decode_getacl(struct xdr_stream *xdr, struct rpc_rqst *req, | ||
214 | size_t hdrlen; | ||
215 | u32 recvd; | ||
216 | |||
217 | + /* The bitmap (xdr len + bitmaps) and the attr xdr len words | ||
218 | + * are stored with the acl data to handle the problem of | ||
219 | + * variable length bitmaps.*/ | ||
220 | + xdr->p = bm_p; | ||
221 | + res->acl_data_offset = be32_to_cpup(bm_p) + 2; | ||
222 | + res->acl_data_offset <<= 2; | ||
223 | + | ||
224 | /* We ignore &savep and don't do consistency checks on | ||
225 | * the attr length. Let userspace figure it out.... */ | ||
226 | hdrlen = (u8 *)xdr->p - (u8 *)iov->iov_base; | ||
227 | + attrlen += res->acl_data_offset; | ||
228 | recvd = req->rq_rcv_buf.len - hdrlen; | ||
229 | if (attrlen > recvd) { | ||
230 | - dprintk("NFS: server cheating in getattr" | ||
231 | - " acl reply: attrlen %u > recvd %u\n", | ||
232 | + if (res->acl_flags & NFS4_ACL_LEN_REQUEST) { | ||
233 | + /* getxattr interface called with a NULL buf */ | ||
234 | + res->acl_len = attrlen; | ||
235 | + goto out; | ||
236 | + } | ||
237 | + dprintk("NFS: acl reply: attrlen %u > recvd %u\n", | ||
238 | attrlen, recvd); | ||
239 | return -EINVAL; | ||
240 | } | ||
241 | xdr_read_pages(xdr, attrlen); | ||
242 | - *acl_len = attrlen; | ||
243 | + res->acl_len = attrlen; | ||
244 | } else | ||
245 | status = -EOPNOTSUPP; | ||
246 | |||
247 | @@ -6028,7 +6043,7 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | ||
248 | status = decode_putfh(xdr); | ||
249 | if (status) | ||
250 | goto out; | ||
251 | - status = decode_getacl(xdr, rqstp, &res->acl_len); | ||
252 | + status = decode_getacl(xdr, rqstp, res); | ||
253 | |||
254 | out: | ||
255 | return status; | ||
256 | diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h | ||
257 | index 2a7c533..6c898af 100644 | ||
258 | --- a/include/linux/nfs_xdr.h | ||
259 | +++ b/include/linux/nfs_xdr.h | ||
260 | @@ -602,11 +602,16 @@ struct nfs_getaclargs { | ||
261 | size_t acl_len; | ||
262 | unsigned int acl_pgbase; | ||
263 | struct page ** acl_pages; | ||
264 | + struct page * acl_scratch; | ||
265 | struct nfs4_sequence_args seq_args; | ||
266 | }; | ||
267 | |||
268 | +/* getxattr ACL interface flags */ | ||
269 | +#define NFS4_ACL_LEN_REQUEST 0x0001 /* zero length getxattr buffer */ | ||
270 | struct nfs_getaclres { | ||
271 | size_t acl_len; | ||
272 | + size_t acl_data_offset; | ||
273 | + int acl_flags; | ||
274 | struct nfs4_sequence_res seq_res; | ||
275 | }; | ||
276 | |||
277 | diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h | ||
278 | index a20970e..af70af3 100644 | ||
279 | --- a/include/linux/sunrpc/xdr.h | ||
280 | +++ b/include/linux/sunrpc/xdr.h | ||
281 | @@ -191,6 +191,8 @@ extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, | ||
282 | struct xdr_array2_desc *desc); | ||
283 | extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | ||
284 | struct xdr_array2_desc *desc); | ||
285 | +extern void _copy_from_pages(char *p, struct page **pages, size_t pgbase, | ||
286 | + size_t len); | ||
287 | |||
288 | /* | ||
289 | * Provide some simple tools for XDR buffer overflow-checking etc. | ||
290 | diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c | ||
291 | index 277ebd4..593f4c6 100644 | ||
292 | --- a/net/sunrpc/xdr.c | ||
293 | +++ b/net/sunrpc/xdr.c | ||
294 | @@ -296,7 +296,7 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len) | ||
295 | * Copies data into an arbitrary memory location from an array of pages | ||
296 | * The copy is assumed to be non-overlapping. | ||
297 | */ | ||
298 | -static void | ||
299 | +void | ||
300 | _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) | ||
301 | { | ||
302 | struct page **pgfrom; | ||
303 | @@ -324,6 +324,7 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len) | ||
304 | |||
305 | } while ((len -= copy) != 0); | ||
306 | } | ||
307 | +EXPORT_SYMBOL_GPL(_copy_from_pages); | ||
308 | |||
309 | /* | ||
310 | * xdr_shrink_bufhead | ||
311 | -- | ||
312 | 1.7.9.5 | ||
313 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch deleted file mode 100644 index ccc04bdc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0026-nfs-fix-regression-in-handling-of-context-option-in-.patch +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | From 116cbe8665b2a7fd6538b2d92e04f016317fee84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jeff Layton <jlayton@redhat.com> | ||
3 | Date: Tue, 20 Dec 2011 06:57:45 -0500 | ||
4 | Subject: [PATCH 026/129] nfs: fix regression in handling of context= option | ||
5 | in NFSv4 | ||
6 | |||
7 | commit 8a0d551a59ac92d8ff048d6cb29d3a02073e81e8 upstream. | ||
8 | |||
9 | Setting the security context of a NFSv4 mount via the context= mount | ||
10 | option is currently broken. The NFSv4 codepath allocates a parsed | ||
11 | options struct, and then parses the mount options to fill it. It | ||
12 | eventually calls nfs4_remote_mount which calls security_init_mnt_opts. | ||
13 | That clobbers the lsm_opts struct that was populated earlier. This bug | ||
14 | also looks like it causes a small memory leak on each v4 mount where | ||
15 | context= is used. | ||
16 | |||
17 | Fix this by moving the initialization of the lsm_opts into | ||
18 | nfs_alloc_parsed_mount_data. Also, add a destructor for | ||
19 | nfs_parsed_mount_data to make it easier to free all of the allocations | ||
20 | hanging off of it, and to ensure that the security_free_mnt_opts is | ||
21 | called whenever security_init_mnt_opts is. | ||
22 | |||
23 | I believe this regression was introduced quite some time ago, probably | ||
24 | by commit c02d7adf. | ||
25 | |||
26 | Signed-off-by: Jeff Layton <jlayton@redhat.com> | ||
27 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | fs/nfs/super.c | 43 +++++++++++++++++++------------------------ | ||
31 | 1 file changed, 19 insertions(+), 24 deletions(-) | ||
32 | |||
33 | diff --git a/fs/nfs/super.c b/fs/nfs/super.c | ||
34 | index 1347774..3ada13c 100644 | ||
35 | --- a/fs/nfs/super.c | ||
36 | +++ b/fs/nfs/super.c | ||
37 | @@ -909,10 +909,24 @@ static struct nfs_parsed_mount_data *nfs_alloc_parsed_mount_data(unsigned int ve | ||
38 | data->auth_flavor_len = 1; | ||
39 | data->version = version; | ||
40 | data->minorversion = 0; | ||
41 | + security_init_mnt_opts(&data->lsm_opts); | ||
42 | } | ||
43 | return data; | ||
44 | } | ||
45 | |||
46 | +static void nfs_free_parsed_mount_data(struct nfs_parsed_mount_data *data) | ||
47 | +{ | ||
48 | + if (data) { | ||
49 | + kfree(data->client_address); | ||
50 | + kfree(data->mount_server.hostname); | ||
51 | + kfree(data->nfs_server.export_path); | ||
52 | + kfree(data->nfs_server.hostname); | ||
53 | + kfree(data->fscache_uniq); | ||
54 | + security_free_mnt_opts(&data->lsm_opts); | ||
55 | + kfree(data); | ||
56 | + } | ||
57 | +} | ||
58 | + | ||
59 | /* | ||
60 | * Sanity-check a server address provided by the mount command. | ||
61 | * | ||
62 | @@ -2220,9 +2234,7 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | ||
63 | data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION); | ||
64 | mntfh = nfs_alloc_fhandle(); | ||
65 | if (data == NULL || mntfh == NULL) | ||
66 | - goto out_free_fh; | ||
67 | - | ||
68 | - security_init_mnt_opts(&data->lsm_opts); | ||
69 | + goto out; | ||
70 | |||
71 | /* Validate the mount data */ | ||
72 | error = nfs_validate_mount_data(raw_data, data, mntfh, dev_name); | ||
73 | @@ -2234,8 +2246,6 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | ||
74 | #ifdef CONFIG_NFS_V4 | ||
75 | if (data->version == 4) { | ||
76 | mntroot = nfs4_try_mount(flags, dev_name, data); | ||
77 | - kfree(data->client_address); | ||
78 | - kfree(data->nfs_server.export_path); | ||
79 | goto out; | ||
80 | } | ||
81 | #endif /* CONFIG_NFS_V4 */ | ||
82 | @@ -2290,13 +2300,8 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type, | ||
83 | s->s_flags |= MS_ACTIVE; | ||
84 | |||
85 | out: | ||
86 | - kfree(data->nfs_server.hostname); | ||
87 | - kfree(data->mount_server.hostname); | ||
88 | - kfree(data->fscache_uniq); | ||
89 | - security_free_mnt_opts(&data->lsm_opts); | ||
90 | -out_free_fh: | ||
91 | + nfs_free_parsed_mount_data(data); | ||
92 | nfs_free_fhandle(mntfh); | ||
93 | - kfree(data); | ||
94 | return mntroot; | ||
95 | |||
96 | out_err_nosb: | ||
97 | @@ -2623,9 +2628,7 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | ||
98 | |||
99 | mntfh = nfs_alloc_fhandle(); | ||
100 | if (data == NULL || mntfh == NULL) | ||
101 | - goto out_free_fh; | ||
102 | - | ||
103 | - security_init_mnt_opts(&data->lsm_opts); | ||
104 | + goto out; | ||
105 | |||
106 | /* Get a volume representation */ | ||
107 | server = nfs4_create_server(data, mntfh); | ||
108 | @@ -2677,13 +2680,10 @@ nfs4_remote_mount(struct file_system_type *fs_type, int flags, | ||
109 | |||
110 | s->s_flags |= MS_ACTIVE; | ||
111 | |||
112 | - security_free_mnt_opts(&data->lsm_opts); | ||
113 | nfs_free_fhandle(mntfh); | ||
114 | return mntroot; | ||
115 | |||
116 | out: | ||
117 | - security_free_mnt_opts(&data->lsm_opts); | ||
118 | -out_free_fh: | ||
119 | nfs_free_fhandle(mntfh); | ||
120 | return ERR_PTR(error); | ||
121 | |||
122 | @@ -2838,7 +2838,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type, | ||
123 | |||
124 | data = nfs_alloc_parsed_mount_data(4); | ||
125 | if (data == NULL) | ||
126 | - goto out_free_data; | ||
127 | + goto out; | ||
128 | |||
129 | /* Validate the mount data */ | ||
130 | error = nfs4_validate_mount_data(raw_data, data, dev_name); | ||
131 | @@ -2852,12 +2852,7 @@ static struct dentry *nfs4_mount(struct file_system_type *fs_type, | ||
132 | error = PTR_ERR(res); | ||
133 | |||
134 | out: | ||
135 | - kfree(data->client_address); | ||
136 | - kfree(data->nfs_server.export_path); | ||
137 | - kfree(data->nfs_server.hostname); | ||
138 | - kfree(data->fscache_uniq); | ||
139 | -out_free_data: | ||
140 | - kfree(data); | ||
141 | + nfs_free_parsed_mount_data(data); | ||
142 | dprintk("<-- nfs4_mount() = %d%s\n", error, | ||
143 | error != 0 ? " [error]" : ""); | ||
144 | return res; | ||
145 | -- | ||
146 | 1.7.9.5 | ||
147 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch deleted file mode 100644 index 22df17c5..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0027-HID-bump-maximum-global-item-tag-report-size-to-96-b.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From b475e4ad0950706030ae96b367c2dbb065a785be Mon Sep 17 00:00:00 2001 | ||
2 | From: Chase Douglas <chase.douglas@canonical.com> | ||
3 | Date: Mon, 7 Nov 2011 11:08:05 -0800 | ||
4 | Subject: [PATCH 027/129] HID: bump maximum global item tag report size to 96 | ||
5 | bytes | ||
6 | |||
7 | commit e46e927b9b7e8d95526e69322855243882b7e1a3 upstream. | ||
8 | |||
9 | This allows the latest N-Trig devices to function properly. | ||
10 | |||
11 | BugLink: https://bugs.launchpad.net/bugs/724831 | ||
12 | |||
13 | Signed-off-by: Chase Douglas <chase.douglas@canonical.com> | ||
14 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/hid/hid-core.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
21 | index af35384..1473067 100644 | ||
22 | --- a/drivers/hid/hid-core.c | ||
23 | +++ b/drivers/hid/hid-core.c | ||
24 | @@ -362,7 +362,7 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item) | ||
25 | |||
26 | case HID_GLOBAL_ITEM_TAG_REPORT_SIZE: | ||
27 | parser->global.report_size = item_udata(item); | ||
28 | - if (parser->global.report_size > 32) { | ||
29 | + if (parser->global.report_size > 96) { | ||
30 | dbg_hid("invalid report_size %d\n", | ||
31 | parser->global.report_size); | ||
32 | return -1; | ||
33 | -- | ||
34 | 1.7.9.5 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch deleted file mode 100644 index 02166721..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0028-HID-wiimote-Select-INPUT_FF_MEMLESS.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 2cfaf0fb0c2b2fb54ecae98d34df27d549a6e92c Mon Sep 17 00:00:00 2001 | ||
2 | From: David Herrmann <dh.herrmann@googlemail.com> | ||
3 | Date: Wed, 7 Dec 2011 21:33:59 +0100 | ||
4 | Subject: [PATCH 028/129] HID: wiimote: Select INPUT_FF_MEMLESS | ||
5 | |||
6 | commit ef6f41157f3864d9bf42671b2ed66062dcafb72e upstream. | ||
7 | |||
8 | We depend on memless force-feedback support, therefore correctly select the | ||
9 | related config options. | ||
10 | |||
11 | Reported-by: Randy Dunlap <rdunlap@xenotime.net> | ||
12 | Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> | ||
13 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | drivers/hid/Kconfig | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig | ||
20 | index 22a4a05..332c22a 100644 | ||
21 | --- a/drivers/hid/Kconfig | ||
22 | +++ b/drivers/hid/Kconfig | ||
23 | @@ -620,6 +620,7 @@ config HID_WIIMOTE | ||
24 | depends on BT_HIDP | ||
25 | depends on LEDS_CLASS | ||
26 | select POWER_SUPPLY | ||
27 | + select INPUT_FF_MEMLESS | ||
28 | ---help--- | ||
29 | Support for the Nintendo Wii Remote bluetooth device. | ||
30 | |||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch deleted file mode 100644 index 75dbf575..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0029-UBI-fix-missing-scrub-when-there-is-a-bit-flip.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | From 68ff23dc67132bf9668c4e7dab105f7d8a83937f Mon Sep 17 00:00:00 2001 | ||
2 | From: Bhavesh Parekh <bparekh@nvidia.com> | ||
3 | Date: Wed, 30 Nov 2011 17:43:42 +0530 | ||
4 | Subject: [PATCH 029/129] UBI: fix missing scrub when there is a bit-flip | ||
5 | |||
6 | commit e801e128b2200c40a0ec236cf2330b2586b6e05a upstream. | ||
7 | |||
8 | Under some cases, when scrubbing the PEB if we did not get the lock on | ||
9 | the PEB it fails to scrub. Add that PEB again to the scrub list | ||
10 | |||
11 | Artem: minor amendments. | ||
12 | |||
13 | Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> | ||
14 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/mtd/ubi/eba.c | 6 ++++-- | ||
18 | drivers/mtd/ubi/ubi.h | 2 ++ | ||
19 | drivers/mtd/ubi/wl.c | 5 ++++- | ||
20 | 3 files changed, 10 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c | ||
23 | index fb7f19b..cd26da8 100644 | ||
24 | --- a/drivers/mtd/ubi/eba.c | ||
25 | +++ b/drivers/mtd/ubi/eba.c | ||
26 | @@ -1028,12 +1028,14 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to, | ||
27 | * 'ubi_wl_put_peb()' function on the @ubi->move_mutex. In turn, we are | ||
28 | * holding @ubi->move_mutex and go sleep on the LEB lock. So, if the | ||
29 | * LEB is already locked, we just do not move it and return | ||
30 | - * %MOVE_CANCEL_RACE, which means that UBI will re-try, but later. | ||
31 | + * %MOVE_RETRY. Note, we do not return %MOVE_CANCEL_RACE here because | ||
32 | + * we do not know the reasons of the contention - it may be just a | ||
33 | + * normal I/O on this LEB, so we want to re-try. | ||
34 | */ | ||
35 | err = leb_write_trylock(ubi, vol_id, lnum); | ||
36 | if (err) { | ||
37 | dbg_wl("contention on LEB %d:%d, cancel", vol_id, lnum); | ||
38 | - return MOVE_CANCEL_RACE; | ||
39 | + return MOVE_RETRY; | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h | ||
44 | index dc64c76..d51d75d 100644 | ||
45 | --- a/drivers/mtd/ubi/ubi.h | ||
46 | +++ b/drivers/mtd/ubi/ubi.h | ||
47 | @@ -120,6 +120,7 @@ enum { | ||
48 | * PEB | ||
49 | * MOVE_CANCEL_BITFLIPS: canceled because a bit-flip was detected in the | ||
50 | * target PEB | ||
51 | + * MOVE_RETRY: retry scrubbing the PEB | ||
52 | */ | ||
53 | enum { | ||
54 | MOVE_CANCEL_RACE = 1, | ||
55 | @@ -127,6 +128,7 @@ enum { | ||
56 | MOVE_TARGET_RD_ERR, | ||
57 | MOVE_TARGET_WR_ERR, | ||
58 | MOVE_CANCEL_BITFLIPS, | ||
59 | + MOVE_RETRY, | ||
60 | }; | ||
61 | |||
62 | /** | ||
63 | diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c | ||
64 | index 42c684c..277c429 100644 | ||
65 | --- a/drivers/mtd/ubi/wl.c | ||
66 | +++ b/drivers/mtd/ubi/wl.c | ||
67 | @@ -795,7 +795,10 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, | ||
68 | protect = 1; | ||
69 | goto out_not_moved; | ||
70 | } | ||
71 | - | ||
72 | + if (err == MOVE_RETRY) { | ||
73 | + scrubbing = 1; | ||
74 | + goto out_not_moved; | ||
75 | + } | ||
76 | if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR || | ||
77 | err == MOVE_TARGET_RD_ERR) { | ||
78 | /* | ||
79 | -- | ||
80 | 1.7.9.5 | ||
81 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch deleted file mode 100644 index ee5d64cc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0030-UBI-fix-use-after-free-on-error-path.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 917c71669ddf01983d843f8fc19bbdc296748a9c Mon Sep 17 00:00:00 2001 | ||
2 | From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
3 | Date: Thu, 5 Jan 2012 10:47:18 +0200 | ||
4 | Subject: [PATCH 030/129] UBI: fix use-after-free on error path | ||
5 | |||
6 | commit e57e0d8e818512047fe379157c3f77f1b9fabffb upstream. | ||
7 | |||
8 | When we fail to erase a PEB, we free the corresponding erase entry object, | ||
9 | but then re-schedule this object if the error code was something like -EAGAIN. | ||
10 | Obviously, it is a bug to use the object after we have freed it. | ||
11 | |||
12 | Reported-by: Emese Revfy <re.emese@gmail.com> | ||
13 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | drivers/mtd/ubi/wl.c | 7 ++++--- | ||
17 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c | ||
20 | index 277c429..0696e36 100644 | ||
21 | --- a/drivers/mtd/ubi/wl.c | ||
22 | +++ b/drivers/mtd/ubi/wl.c | ||
23 | @@ -1052,7 +1052,6 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, | ||
24 | |||
25 | ubi_err("failed to erase PEB %d, error %d", pnum, err); | ||
26 | kfree(wl_wrk); | ||
27 | - kmem_cache_free(ubi_wl_entry_slab, e); | ||
28 | |||
29 | if (err == -EINTR || err == -ENOMEM || err == -EAGAIN || | ||
30 | err == -EBUSY) { | ||
31 | @@ -1065,14 +1064,16 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, | ||
32 | goto out_ro; | ||
33 | } | ||
34 | return err; | ||
35 | - } else if (err != -EIO) { | ||
36 | + } | ||
37 | + | ||
38 | + kmem_cache_free(ubi_wl_entry_slab, e); | ||
39 | + if (err != -EIO) | ||
40 | /* | ||
41 | * If this is not %-EIO, we have no idea what to do. Scheduling | ||
42 | * this physical eraseblock for erasure again would cause | ||
43 | * errors again and again. Well, lets switch to R/O mode. | ||
44 | */ | ||
45 | goto out_ro; | ||
46 | - } | ||
47 | |||
48 | /* It is %-EIO, the PEB went bad */ | ||
49 | |||
50 | -- | ||
51 | 1.7.9.5 | ||
52 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch deleted file mode 100644 index ab3d2d47..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0031-PCI-Fix-PCI_EXP_TYPE_RC_EC-value.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From 9e38af95ee520c7c6ffa8b4fcc976a3437ef8103 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Williamson <alex.williamson@redhat.com> | ||
3 | Date: Wed, 16 Nov 2011 09:24:16 -0700 | ||
4 | Subject: [PATCH 031/129] PCI: Fix PCI_EXP_TYPE_RC_EC value | ||
5 | |||
6 | commit 1830ea91c20b06608f7cdb2455ce05ba834b3214 upstream. | ||
7 | |||
8 | Spec shows this as 1010b = 0xa | ||
9 | |||
10 | Signed-off-by: Alex Williamson <alex.williamson@redhat.com> | ||
11 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | include/linux/pci_regs.h | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h | ||
18 | index b5d9657..411c412 100644 | ||
19 | --- a/include/linux/pci_regs.h | ||
20 | +++ b/include/linux/pci_regs.h | ||
21 | @@ -392,7 +392,7 @@ | ||
22 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ | ||
23 | #define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | ||
24 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ | ||
25 | -#define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ | ||
26 | +#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ | ||
27 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ | ||
28 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ | ||
29 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch deleted file mode 100644 index 6da8ef88..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0032-PCI-msi-Disable-msi-interrupts-when-we-initialize-a-.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 948a5d9ea80dfda0b40581e02217f30ffefd8e60 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Eric W. Biederman" <ebiederm@xmission.com> | ||
3 | Date: Mon, 17 Oct 2011 11:46:06 -0700 | ||
4 | Subject: [PATCH 032/129] PCI: msi: Disable msi interrupts when we initialize | ||
5 | a pci device | ||
6 | |||
7 | commit a776c491ca5e38c26d9f66923ff574d041e747f4 upstream. | ||
8 | |||
9 | I traced a nasty kexec on panic boot failure to the fact that we had | ||
10 | screaming msi interrupts and we were not disabling the msi messages at | ||
11 | kernel startup. The booting kernel had not enabled those interupts so | ||
12 | was not prepared to handle them. | ||
13 | |||
14 | I can see no reason why we would ever want to leave the msi interrupts | ||
15 | enabled at boot if something else has enabled those interrupts. The pci | ||
16 | spec specifies that msi interrupts should be off by default. Drivers | ||
17 | are expected to enable the msi interrupts if they want to use them. Our | ||
18 | interrupt handling code reprograms the interrupt handlers at boot and | ||
19 | will not be be able to do anything useful with an unexpected interrupt. | ||
20 | |||
21 | This patch applies cleanly all of the way back to 2.6.32 where I noticed | ||
22 | the problem. | ||
23 | |||
24 | Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> | ||
25 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
27 | --- | ||
28 | drivers/pci/msi.c | 10 ++++++++++ | ||
29 | 1 file changed, 10 insertions(+) | ||
30 | |||
31 | diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c | ||
32 | index 0e6d04d..e3efb43 100644 | ||
33 | --- a/drivers/pci/msi.c | ||
34 | +++ b/drivers/pci/msi.c | ||
35 | @@ -870,5 +870,15 @@ EXPORT_SYMBOL(pci_msi_enabled); | ||
36 | |||
37 | void pci_msi_init_pci_dev(struct pci_dev *dev) | ||
38 | { | ||
39 | + int pos; | ||
40 | INIT_LIST_HEAD(&dev->msi_list); | ||
41 | + | ||
42 | + /* Disable the msi hardware to avoid screaming interrupts | ||
43 | + * during boot. This is the power on reset default so | ||
44 | + * usually this should be a noop. | ||
45 | + */ | ||
46 | + pos = pci_find_capability(dev, PCI_CAP_ID_MSI); | ||
47 | + if (pos) | ||
48 | + msi_set_enable(dev, pos, 0); | ||
49 | + msix_set_enable(dev, 0); | ||
50 | } | ||
51 | -- | ||
52 | 1.7.9.5 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch deleted file mode 100644 index b7dc6e82..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0033-x86-PCI-Ignore-CPU-non-addressable-_CRS-reserved-mem.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From 08ba39eb25bcf540f859e7204c3307ee43b52eff Mon Sep 17 00:00:00 2001 | ||
2 | From: Gary Hade <garyhade@us.ibm.com> | ||
3 | Date: Mon, 14 Nov 2011 15:42:16 -0800 | ||
4 | Subject: [PATCH 033/129] x86/PCI: Ignore CPU non-addressable _CRS reserved | ||
5 | memory resources | ||
6 | |||
7 | commit ae5cd86455381282ece162966183d3f208c6fad7 upstream. | ||
8 | |||
9 | This assures that a _CRS reserved host bridge window or window region is | ||
10 | not used if it is not addressable by the CPU. The new code either trims | ||
11 | the window to exclude the non-addressable portion or totally ignores the | ||
12 | window if the entire window is non-addressable. | ||
13 | |||
14 | The current code has been shown to be problematic with 32-bit non-PAE | ||
15 | kernels on systems where _CRS reserves resources above 4GB. | ||
16 | |||
17 | Signed-off-by: Gary Hade <garyhade@us.ibm.com> | ||
18 | Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> | ||
19 | Cc: Thomas Renninger <trenn@novell.com> | ||
20 | Cc: linux-kernel@vger.kernel.org | ||
21 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | arch/x86/pci/acpi.c | 18 ++++++++++++++++-- | ||
25 | 1 file changed, 16 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c | ||
28 | index 404f21a..f8348ab 100644 | ||
29 | --- a/arch/x86/pci/acpi.c | ||
30 | +++ b/arch/x86/pci/acpi.c | ||
31 | @@ -149,7 +149,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | ||
32 | struct acpi_resource_address64 addr; | ||
33 | acpi_status status; | ||
34 | unsigned long flags; | ||
35 | - u64 start, end; | ||
36 | + u64 start, orig_end, end; | ||
37 | |||
38 | status = resource_to_addr(acpi_res, &addr); | ||
39 | if (!ACPI_SUCCESS(status)) | ||
40 | @@ -165,7 +165,21 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | ||
41 | return AE_OK; | ||
42 | |||
43 | start = addr.minimum + addr.translation_offset; | ||
44 | - end = addr.maximum + addr.translation_offset; | ||
45 | + orig_end = end = addr.maximum + addr.translation_offset; | ||
46 | + | ||
47 | + /* Exclude non-addressable range or non-addressable portion of range */ | ||
48 | + end = min(end, (u64)iomem_resource.end); | ||
49 | + if (end <= start) { | ||
50 | + dev_info(&info->bridge->dev, | ||
51 | + "host bridge window [%#llx-%#llx] " | ||
52 | + "(ignored, not CPU addressable)\n", start, orig_end); | ||
53 | + return AE_OK; | ||
54 | + } else if (orig_end != end) { | ||
55 | + dev_info(&info->bridge->dev, | ||
56 | + "host bridge window [%#llx-%#llx] " | ||
57 | + "([%#llx-%#llx] ignored, not CPU addressable)\n", | ||
58 | + start, orig_end, end + 1, orig_end); | ||
59 | + } | ||
60 | |||
61 | res = &info->res[info->res_num]; | ||
62 | res->name = info->name; | ||
63 | -- | ||
64 | 1.7.9.5 | ||
65 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch deleted file mode 100644 index 8d30b65d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0034-x86-PCI-amd-factor-out-MMCONFIG-discovery.patch +++ /dev/null | |||
@@ -1,160 +0,0 @@ | |||
1 | From 64525bdf1bbff67faf88ccd7bc83ef856489ed24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bjorn Helgaas <bhelgaas@google.com> | ||
3 | Date: Thu, 5 Jan 2012 14:27:19 -0700 | ||
4 | Subject: [PATCH 034/129] x86/PCI: amd: factor out MMCONFIG discovery | ||
5 | |||
6 | commit 24d25dbfa63c376323096660bfa9ad45a08870ce upstream. | ||
7 | |||
8 | This factors out the AMD native MMCONFIG discovery so we can use it | ||
9 | outside amd_bus.c. | ||
10 | |||
11 | amd_bus.c reads AMD MSRs so it can remove the MMCONFIG area from the | ||
12 | PCI resources. We may also need the MMCONFIG information to work | ||
13 | around BIOS defects in the ACPI MCFG table. | ||
14 | |||
15 | Cc: Borislav Petkov <borislav.petkov@amd.com> | ||
16 | Cc: Yinghai Lu <yinghai@kernel.org> | ||
17 | Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | ||
18 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | arch/x86/include/asm/amd_nb.h | 2 ++ | ||
22 | arch/x86/kernel/amd_nb.c | 31 ++++++++++++++++++++++++++++++ | ||
23 | arch/x86/pci/amd_bus.c | 42 +++++++++++------------------------------ | ||
24 | 3 files changed, 44 insertions(+), 31 deletions(-) | ||
25 | |||
26 | diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h | ||
27 | index 8e41071..49ad773 100644 | ||
28 | --- a/arch/x86/include/asm/amd_nb.h | ||
29 | +++ b/arch/x86/include/asm/amd_nb.h | ||
30 | @@ -1,6 +1,7 @@ | ||
31 | #ifndef _ASM_X86_AMD_NB_H | ||
32 | #define _ASM_X86_AMD_NB_H | ||
33 | |||
34 | +#include <linux/ioport.h> | ||
35 | #include <linux/pci.h> | ||
36 | |||
37 | struct amd_nb_bus_dev_range { | ||
38 | @@ -13,6 +14,7 @@ extern const struct pci_device_id amd_nb_misc_ids[]; | ||
39 | extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[]; | ||
40 | |||
41 | extern bool early_is_amd_nb(u32 value); | ||
42 | +extern struct resource *amd_get_mmconfig_range(struct resource *res); | ||
43 | extern int amd_cache_northbridges(void); | ||
44 | extern void amd_flush_garts(void); | ||
45 | extern int amd_numa_init(void); | ||
46 | diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c | ||
47 | index 4c39baa..bae1efe 100644 | ||
48 | --- a/arch/x86/kernel/amd_nb.c | ||
49 | +++ b/arch/x86/kernel/amd_nb.c | ||
50 | @@ -119,6 +119,37 @@ bool __init early_is_amd_nb(u32 device) | ||
51 | return false; | ||
52 | } | ||
53 | |||
54 | +struct resource *amd_get_mmconfig_range(struct resource *res) | ||
55 | +{ | ||
56 | + u32 address; | ||
57 | + u64 base, msr; | ||
58 | + unsigned segn_busn_bits; | ||
59 | + | ||
60 | + if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) | ||
61 | + return NULL; | ||
62 | + | ||
63 | + /* assume all cpus from fam10h have mmconfig */ | ||
64 | + if (boot_cpu_data.x86 < 0x10) | ||
65 | + return NULL; | ||
66 | + | ||
67 | + address = MSR_FAM10H_MMIO_CONF_BASE; | ||
68 | + rdmsrl(address, msr); | ||
69 | + | ||
70 | + /* mmconfig is not enabled */ | ||
71 | + if (!(msr & FAM10H_MMIO_CONF_ENABLE)) | ||
72 | + return NULL; | ||
73 | + | ||
74 | + base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT); | ||
75 | + | ||
76 | + segn_busn_bits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & | ||
77 | + FAM10H_MMIO_CONF_BUSRANGE_MASK; | ||
78 | + | ||
79 | + res->flags = IORESOURCE_MEM; | ||
80 | + res->start = base; | ||
81 | + res->end = base + (1ULL<<(segn_busn_bits + 20)) - 1; | ||
82 | + return res; | ||
83 | +} | ||
84 | + | ||
85 | int amd_get_subcaches(int cpu) | ||
86 | { | ||
87 | struct pci_dev *link = node_to_amd_nb(amd_get_nb_id(cpu))->link; | ||
88 | diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c | ||
89 | index 026e493..385a940 100644 | ||
90 | --- a/arch/x86/pci/amd_bus.c | ||
91 | +++ b/arch/x86/pci/amd_bus.c | ||
92 | @@ -30,34 +30,6 @@ static struct pci_hostbridge_probe pci_probes[] __initdata = { | ||
93 | { 0, 0x18, PCI_VENDOR_ID_AMD, 0x1300 }, | ||
94 | }; | ||
95 | |||
96 | -static u64 __initdata fam10h_mmconf_start; | ||
97 | -static u64 __initdata fam10h_mmconf_end; | ||
98 | -static void __init get_pci_mmcfg_amd_fam10h_range(void) | ||
99 | -{ | ||
100 | - u32 address; | ||
101 | - u64 base, msr; | ||
102 | - unsigned segn_busn_bits; | ||
103 | - | ||
104 | - /* assume all cpus from fam10h have mmconf */ | ||
105 | - if (boot_cpu_data.x86 < 0x10) | ||
106 | - return; | ||
107 | - | ||
108 | - address = MSR_FAM10H_MMIO_CONF_BASE; | ||
109 | - rdmsrl(address, msr); | ||
110 | - | ||
111 | - /* mmconfig is not enable */ | ||
112 | - if (!(msr & FAM10H_MMIO_CONF_ENABLE)) | ||
113 | - return; | ||
114 | - | ||
115 | - base = msr & (FAM10H_MMIO_CONF_BASE_MASK<<FAM10H_MMIO_CONF_BASE_SHIFT); | ||
116 | - | ||
117 | - segn_busn_bits = (msr >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & | ||
118 | - FAM10H_MMIO_CONF_BUSRANGE_MASK; | ||
119 | - | ||
120 | - fam10h_mmconf_start = base; | ||
121 | - fam10h_mmconf_end = base + (1ULL<<(segn_busn_bits + 20)) - 1; | ||
122 | -} | ||
123 | - | ||
124 | #define RANGE_NUM 16 | ||
125 | |||
126 | /** | ||
127 | @@ -85,6 +57,9 @@ static int __init early_fill_mp_bus_info(void) | ||
128 | u64 val; | ||
129 | u32 address; | ||
130 | bool found; | ||
131 | + struct resource fam10h_mmconf_res, *fam10h_mmconf; | ||
132 | + u64 fam10h_mmconf_start; | ||
133 | + u64 fam10h_mmconf_end; | ||
134 | |||
135 | if (!early_pci_allowed()) | ||
136 | return -1; | ||
137 | @@ -211,12 +186,17 @@ static int __init early_fill_mp_bus_info(void) | ||
138 | subtract_range(range, RANGE_NUM, 0, end); | ||
139 | |||
140 | /* get mmconfig */ | ||
141 | - get_pci_mmcfg_amd_fam10h_range(); | ||
142 | + fam10h_mmconf = amd_get_mmconfig_range(&fam10h_mmconf_res); | ||
143 | /* need to take out mmconf range */ | ||
144 | - if (fam10h_mmconf_end) { | ||
145 | - printk(KERN_DEBUG "Fam 10h mmconf [%llx, %llx]\n", fam10h_mmconf_start, fam10h_mmconf_end); | ||
146 | + if (fam10h_mmconf) { | ||
147 | + printk(KERN_DEBUG "Fam 10h mmconf %pR\n", fam10h_mmconf); | ||
148 | + fam10h_mmconf_start = fam10h_mmconf->start; | ||
149 | + fam10h_mmconf_end = fam10h_mmconf->end; | ||
150 | subtract_range(range, RANGE_NUM, fam10h_mmconf_start, | ||
151 | fam10h_mmconf_end + 1); | ||
152 | + } else { | ||
153 | + fam10h_mmconf_start = 0; | ||
154 | + fam10h_mmconf_end = 0; | ||
155 | } | ||
156 | |||
157 | /* mmio resource */ | ||
158 | -- | ||
159 | 1.7.9.5 | ||
160 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch deleted file mode 100644 index 3fd79be1..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0035-x86-PCI-build-amd_bus.o-only-when-CONFIG_AMD_NB-y.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From ab624504467af8cf207855de15bc8b835605ba88 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bjorn Helgaas <bhelgaas@google.com> | ||
3 | Date: Thu, 12 Jan 2012 08:01:40 -0700 | ||
4 | Subject: [PATCH 035/129] x86/PCI: build amd_bus.o only when CONFIG_AMD_NB=y | ||
5 | |||
6 | commit 5cf9a4e69c1ff0ccdd1d2b7404f95c0531355274 upstream. | ||
7 | |||
8 | We only need amd_bus.o for AMD systems with PCI. arch/x86/pci/Makefile | ||
9 | already depends on CONFIG_PCI=y, so this patch just adds the dependency | ||
10 | on CONFIG_AMD_NB. | ||
11 | |||
12 | Cc: Yinghai Lu <yinghai@kernel.org> | ||
13 | Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | ||
14 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | arch/x86/pci/Makefile | 3 ++- | ||
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile | ||
21 | index 6b8759f..d24d3da 100644 | ||
22 | --- a/arch/x86/pci/Makefile | ||
23 | +++ b/arch/x86/pci/Makefile | ||
24 | @@ -18,8 +18,9 @@ obj-$(CONFIG_X86_NUMAQ) += numaq_32.o | ||
25 | obj-$(CONFIG_X86_MRST) += mrst.o | ||
26 | |||
27 | obj-y += common.o early.o | ||
28 | -obj-y += amd_bus.o bus_numa.o | ||
29 | +obj-y += bus_numa.o | ||
30 | |||
31 | +obj-$(CONFIG_AMD_NB) += amd_bus.o | ||
32 | obj-$(CONFIG_PCI_CNB20LE_QUIRK) += broadcom_bus.o | ||
33 | |||
34 | ifeq ($(CONFIG_PCI_DEBUG),y) | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch deleted file mode 100644 index 411ca8bc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0036-SCSI-mpt2sas-Release-spinlock-for-the-raid-device-li.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From b76617ff2fa38409d3065f944359e5e47b290014 Mon Sep 17 00:00:00 2001 | ||
2 | From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com> | ||
3 | Date: Thu, 1 Dec 2011 07:52:56 +0530 | ||
4 | Subject: [PATCH 036/129] SCSI: mpt2sas: Release spinlock for the raid device | ||
5 | list before blocking it | ||
6 | |||
7 | commit 30c43282f3d347f47f9e05199d2b14f56f3f2837 upstream. | ||
8 | |||
9 | Added code to release the spinlock that is used to protect the | ||
10 | raid device list before calling a function that can block. The | ||
11 | blocking was causing a reschedule, and subsequently it is tried | ||
12 | to acquire the same lock, resulting in a panic (NMI Watchdog | ||
13 | detecting a CPU lockup). | ||
14 | |||
15 | Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> | ||
16 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 7 ++++--- | ||
20 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
23 | index d570573..3a4f666 100644 | ||
24 | --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
25 | +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
26 | @@ -6714,6 +6714,7 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid, | ||
27 | } else | ||
28 | sas_target_priv_data = NULL; | ||
29 | raid_device->responding = 1; | ||
30 | + spin_unlock_irqrestore(&ioc->raid_device_lock, flags); | ||
31 | starget_printk(KERN_INFO, raid_device->starget, | ||
32 | "handle(0x%04x), wwid(0x%016llx)\n", handle, | ||
33 | (unsigned long long)raid_device->wwid); | ||
34 | @@ -6724,16 +6725,16 @@ _scsih_mark_responding_raid_device(struct MPT2SAS_ADAPTER *ioc, u64 wwid, | ||
35 | */ | ||
36 | _scsih_init_warpdrive_properties(ioc, raid_device); | ||
37 | if (raid_device->handle == handle) | ||
38 | - goto out; | ||
39 | + return; | ||
40 | printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n", | ||
41 | raid_device->handle); | ||
42 | raid_device->handle = handle; | ||
43 | if (sas_target_priv_data) | ||
44 | sas_target_priv_data->handle = handle; | ||
45 | - goto out; | ||
46 | + return; | ||
47 | } | ||
48 | } | ||
49 | - out: | ||
50 | + | ||
51 | spin_unlock_irqrestore(&ioc->raid_device_lock, flags); | ||
52 | } | ||
53 | |||
54 | -- | ||
55 | 1.7.9.5 | ||
56 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch deleted file mode 100644 index d58ff27f..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0037-SCSI-mpt2sas-Fix-for-memory-allocation-error-for-lar.patch +++ /dev/null | |||
@@ -1,177 +0,0 @@ | |||
1 | From c987e1592482d819fd950fbaad9a1405f892c39e Mon Sep 17 00:00:00 2001 | ||
2 | From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com> | ||
3 | Date: Thu, 1 Dec 2011 07:53:08 +0530 | ||
4 | Subject: [PATCH 037/129] SCSI: mpt2sas : Fix for memory allocation error for | ||
5 | large host credits | ||
6 | |||
7 | commit aff132d95ffe14eca96cab90597cdd010b457af7 upstream. | ||
8 | |||
9 | The amount of memory required for tracking chain buffers is rather | ||
10 | large, and when the host credit count is big, memory allocation | ||
11 | failure occurs inside __get_free_pages. | ||
12 | |||
13 | The fix is to limit the number of chains to 100,000. In addition, | ||
14 | the number of host credits is limited to 30,000 IOs. However this | ||
15 | limitation can be overridden this using the command line option | ||
16 | max_queue_depth. The algorithm for calculating the | ||
17 | reply_post_queue_depth is changed so that it is equal to | ||
18 | (reply_free_queue_depth + 16), previously it was (reply_free_queue_depth * 2). | ||
19 | |||
20 | Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> | ||
21 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | drivers/scsi/mpt2sas/mpt2sas_base.c | 83 +++++++++++----------------------- | ||
25 | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 4 +- | ||
26 | 2 files changed, 29 insertions(+), 58 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
29 | index beda04a..0794c72 100644 | ||
30 | --- a/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
31 | +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | ||
32 | @@ -65,6 +65,8 @@ static MPT_CALLBACK mpt_callbacks[MPT_MAX_CALLBACKS]; | ||
33 | |||
34 | #define FAULT_POLLING_INTERVAL 1000 /* in milliseconds */ | ||
35 | |||
36 | +#define MAX_HBA_QUEUE_DEPTH 30000 | ||
37 | +#define MAX_CHAIN_DEPTH 100000 | ||
38 | static int max_queue_depth = -1; | ||
39 | module_param(max_queue_depth, int, 0); | ||
40 | MODULE_PARM_DESC(max_queue_depth, " max controller queue depth "); | ||
41 | @@ -2311,8 +2313,6 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc) | ||
42 | } | ||
43 | if (ioc->chain_dma_pool) | ||
44 | pci_pool_destroy(ioc->chain_dma_pool); | ||
45 | - } | ||
46 | - if (ioc->chain_lookup) { | ||
47 | free_pages((ulong)ioc->chain_lookup, ioc->chain_pages); | ||
48 | ioc->chain_lookup = NULL; | ||
49 | } | ||
50 | @@ -2330,9 +2330,7 @@ static int | ||
51 | _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | ||
52 | { | ||
53 | struct mpt2sas_facts *facts; | ||
54 | - u32 queue_size, queue_diff; | ||
55 | u16 max_sge_elements; | ||
56 | - u16 num_of_reply_frames; | ||
57 | u16 chains_needed_per_io; | ||
58 | u32 sz, total_sz, reply_post_free_sz; | ||
59 | u32 retry_sz; | ||
60 | @@ -2359,7 +2357,8 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | ||
61 | max_request_credit = (max_queue_depth < facts->RequestCredit) | ||
62 | ? max_queue_depth : facts->RequestCredit; | ||
63 | else | ||
64 | - max_request_credit = facts->RequestCredit; | ||
65 | + max_request_credit = min_t(u16, facts->RequestCredit, | ||
66 | + MAX_HBA_QUEUE_DEPTH); | ||
67 | |||
68 | ioc->hba_queue_depth = max_request_credit; | ||
69 | ioc->hi_priority_depth = facts->HighPriorityCredit; | ||
70 | @@ -2400,50 +2399,25 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | ||
71 | } | ||
72 | ioc->chains_needed_per_io = chains_needed_per_io; | ||
73 | |||
74 | - /* reply free queue sizing - taking into account for events */ | ||
75 | - num_of_reply_frames = ioc->hba_queue_depth + 32; | ||
76 | - | ||
77 | - /* number of replies frames can't be a multiple of 16 */ | ||
78 | - /* decrease number of reply frames by 1 */ | ||
79 | - if (!(num_of_reply_frames % 16)) | ||
80 | - num_of_reply_frames--; | ||
81 | - | ||
82 | - /* calculate number of reply free queue entries | ||
83 | - * (must be multiple of 16) | ||
84 | - */ | ||
85 | - | ||
86 | - /* (we know reply_free_queue_depth is not a multiple of 16) */ | ||
87 | - queue_size = num_of_reply_frames; | ||
88 | - queue_size += 16 - (queue_size % 16); | ||
89 | - ioc->reply_free_queue_depth = queue_size; | ||
90 | - | ||
91 | - /* reply descriptor post queue sizing */ | ||
92 | - /* this size should be the number of request frames + number of reply | ||
93 | - * frames | ||
94 | - */ | ||
95 | - | ||
96 | - queue_size = ioc->hba_queue_depth + num_of_reply_frames + 1; | ||
97 | - /* round up to 16 byte boundary */ | ||
98 | - if (queue_size % 16) | ||
99 | - queue_size += 16 - (queue_size % 16); | ||
100 | - | ||
101 | - /* check against IOC maximum reply post queue depth */ | ||
102 | - if (queue_size > facts->MaxReplyDescriptorPostQueueDepth) { | ||
103 | - queue_diff = queue_size - | ||
104 | - facts->MaxReplyDescriptorPostQueueDepth; | ||
105 | + /* reply free queue sizing - taking into account for 64 FW events */ | ||
106 | + ioc->reply_free_queue_depth = ioc->hba_queue_depth + 64; | ||
107 | |||
108 | - /* round queue_diff up to multiple of 16 */ | ||
109 | - if (queue_diff % 16) | ||
110 | - queue_diff += 16 - (queue_diff % 16); | ||
111 | - | ||
112 | - /* adjust hba_queue_depth, reply_free_queue_depth, | ||
113 | - * and queue_size | ||
114 | - */ | ||
115 | - ioc->hba_queue_depth -= (queue_diff / 2); | ||
116 | - ioc->reply_free_queue_depth -= (queue_diff / 2); | ||
117 | - queue_size = facts->MaxReplyDescriptorPostQueueDepth; | ||
118 | + /* align the reply post queue on the next 16 count boundary */ | ||
119 | + if (!ioc->reply_free_queue_depth % 16) | ||
120 | + ioc->reply_post_queue_depth = ioc->reply_free_queue_depth + 16; | ||
121 | + else | ||
122 | + ioc->reply_post_queue_depth = ioc->reply_free_queue_depth + | ||
123 | + 32 - (ioc->reply_free_queue_depth % 16); | ||
124 | + if (ioc->reply_post_queue_depth > | ||
125 | + facts->MaxReplyDescriptorPostQueueDepth) { | ||
126 | + ioc->reply_post_queue_depth = min_t(u16, | ||
127 | + (facts->MaxReplyDescriptorPostQueueDepth - | ||
128 | + (facts->MaxReplyDescriptorPostQueueDepth % 16)), | ||
129 | + (ioc->hba_queue_depth - (ioc->hba_queue_depth % 16))); | ||
130 | + ioc->reply_free_queue_depth = ioc->reply_post_queue_depth - 16; | ||
131 | + ioc->hba_queue_depth = ioc->reply_free_queue_depth - 64; | ||
132 | } | ||
133 | - ioc->reply_post_queue_depth = queue_size; | ||
134 | + | ||
135 | |||
136 | dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scatter gather: " | ||
137 | "sge_in_main_msg(%d), sge_per_chain(%d), sge_per_io(%d), " | ||
138 | @@ -2529,15 +2503,12 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) | ||
139 | "depth(%d)\n", ioc->name, ioc->request, | ||
140 | ioc->scsiio_depth)); | ||
141 | |||
142 | - /* loop till the allocation succeeds */ | ||
143 | - do { | ||
144 | - sz = ioc->chain_depth * sizeof(struct chain_tracker); | ||
145 | - ioc->chain_pages = get_order(sz); | ||
146 | - ioc->chain_lookup = (struct chain_tracker *)__get_free_pages( | ||
147 | - GFP_KERNEL, ioc->chain_pages); | ||
148 | - if (ioc->chain_lookup == NULL) | ||
149 | - ioc->chain_depth -= 100; | ||
150 | - } while (ioc->chain_lookup == NULL); | ||
151 | + ioc->chain_depth = min_t(u32, ioc->chain_depth, MAX_CHAIN_DEPTH); | ||
152 | + sz = ioc->chain_depth * sizeof(struct chain_tracker); | ||
153 | + ioc->chain_pages = get_order(sz); | ||
154 | + | ||
155 | + ioc->chain_lookup = (struct chain_tracker *)__get_free_pages( | ||
156 | + GFP_KERNEL, ioc->chain_pages); | ||
157 | ioc->chain_dma_pool = pci_pool_create("chain pool", ioc->pdev, | ||
158 | ioc->request_sz, 16, 0); | ||
159 | if (!ioc->chain_dma_pool) { | ||
160 | diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
161 | index 3a4f666..9bc6fb2 100644 | ||
162 | --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
163 | +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | ||
164 | @@ -1007,8 +1007,8 @@ _scsih_get_chain_buffer_tracker(struct MPT2SAS_ADAPTER *ioc, u16 smid) | ||
165 | spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); | ||
166 | if (list_empty(&ioc->free_chain_list)) { | ||
167 | spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); | ||
168 | - printk(MPT2SAS_WARN_FMT "chain buffers not available\n", | ||
169 | - ioc->name); | ||
170 | + dfailprintk(ioc, printk(MPT2SAS_WARN_FMT "chain buffers not " | ||
171 | + "available\n", ioc->name)); | ||
172 | return NULL; | ||
173 | } | ||
174 | chain_req = list_entry(ioc->free_chain_list.next, | ||
175 | -- | ||
176 | 1.7.9.5 | ||
177 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch deleted file mode 100644 index ce8871b6..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0038-xen-xenbus-Reject-replies-with-payload-XENSTORE_PAYL.patch +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | From 60ff826ed445ff093db42fd2e5ac97839c3c43d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ian Campbell <Ian.Campbell@citrix.com> | ||
3 | Date: Wed, 4 Jan 2012 09:34:49 +0000 | ||
4 | Subject: [PATCH 038/129] xen/xenbus: Reject replies with payload > | ||
5 | XENSTORE_PAYLOAD_MAX. | ||
6 | |||
7 | commit 9e7860cee18241633eddb36a4c34c7b61d8cecbc upstream. | ||
8 | |||
9 | Haogang Chen found out that: | ||
10 | |||
11 | There is a potential integer overflow in process_msg() that could result | ||
12 | in cross-domain attack. | ||
13 | |||
14 | body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH); | ||
15 | |||
16 | When a malicious guest passes 0xffffffff in msg->hdr.len, the subsequent | ||
17 | call to xb_read() would write to a zero-length buffer. | ||
18 | |||
19 | The other end of this connection is always the xenstore backend daemon | ||
20 | so there is no guest (malicious or otherwise) which can do this. The | ||
21 | xenstore daemon is a trusted component in the system. | ||
22 | |||
23 | However this seem like a reasonable robustness improvement so we should | ||
24 | have it. | ||
25 | |||
26 | And Ian when read the API docs found that: | ||
27 | The payload length (len field of the header) is limited to 4096 | ||
28 | (XENSTORE_PAYLOAD_MAX) in both directions. If a client exceeds the | ||
29 | limit, its xenstored connection will be immediately killed by | ||
30 | xenstored, which is usually catastrophic from the client's point of | ||
31 | view. Clients (particularly domains, which cannot just reconnect) | ||
32 | should avoid this. | ||
33 | |||
34 | so this patch checks against that instead. | ||
35 | |||
36 | This also avoids a potential integer overflow pointed out by Haogang Chen. | ||
37 | |||
38 | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> | ||
39 | Cc: Haogang Chen <haogangchen@gmail.com> | ||
40 | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ||
41 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
42 | --- | ||
43 | drivers/xen/xenbus/xenbus_xs.c | 6 ++++++ | ||
44 | include/xen/interface/io/xs_wire.h | 3 +++ | ||
45 | 2 files changed, 9 insertions(+) | ||
46 | |||
47 | diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c | ||
48 | index ede860f..a580b17 100644 | ||
49 | --- a/drivers/xen/xenbus/xenbus_xs.c | ||
50 | +++ b/drivers/xen/xenbus/xenbus_xs.c | ||
51 | @@ -801,6 +801,12 @@ static int process_msg(void) | ||
52 | goto out; | ||
53 | } | ||
54 | |||
55 | + if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) { | ||
56 | + kfree(msg); | ||
57 | + err = -EINVAL; | ||
58 | + goto out; | ||
59 | + } | ||
60 | + | ||
61 | body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH); | ||
62 | if (body == NULL) { | ||
63 | kfree(msg); | ||
64 | diff --git a/include/xen/interface/io/xs_wire.h b/include/xen/interface/io/xs_wire.h | ||
65 | index f6f07aa..7cdfca2 100644 | ||
66 | --- a/include/xen/interface/io/xs_wire.h | ||
67 | +++ b/include/xen/interface/io/xs_wire.h | ||
68 | @@ -87,4 +87,7 @@ struct xenstore_domain_interface { | ||
69 | XENSTORE_RING_IDX rsp_cons, rsp_prod; | ||
70 | }; | ||
71 | |||
72 | +/* Violating this is very bad. See docs/misc/xenstore.txt. */ | ||
73 | +#define XENSTORE_PAYLOAD_MAX 4096 | ||
74 | + | ||
75 | #endif /* _XS_WIRE_H */ | ||
76 | -- | ||
77 | 1.7.9.5 | ||
78 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch deleted file mode 100644 index a6df9065..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0039-md-raid1-perform-bad-block-tests-for-WriteMostly-dev.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 4f2bf4b7d712836951cdbfa4807ae0309711487c Mon Sep 17 00:00:00 2001 | ||
2 | From: NeilBrown <neilb@suse.de> | ||
3 | Date: Mon, 9 Jan 2012 01:41:51 +1100 | ||
4 | Subject: [PATCH 039/129] md/raid1: perform bad-block tests for WriteMostly | ||
5 | devices too. | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | commit 307729c8bc5b5a41361af8af95906eee7552acb1 upstream. | ||
11 | |||
12 | We normally try to avoid reading from write-mostly devices, but when | ||
13 | we do we really have to check for bad blocks and be sure not to | ||
14 | try reading them. | ||
15 | |||
16 | With the current code, best_good_sectors might not get set and that | ||
17 | causes zero-length read requests to be send down which is very | ||
18 | confusing. | ||
19 | |||
20 | This bug was introduced in commit d2eb35acfdccbe2 and so the patch | ||
21 | is suitable for 3.1.x and 3.2.x | ||
22 | |||
23 | Reported-and-tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> | ||
24 | Reported-and-tested-by: Art -kwaak- van Breemen <ard@telegraafnet.nl> | ||
25 | Signed-off-by: NeilBrown <neilb@suse.de> | ||
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
27 | --- | ||
28 | drivers/md/raid1.c | 11 ++++++++++- | ||
29 | 1 file changed, 10 insertions(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c | ||
32 | index ede2461..7d9e071 100644 | ||
33 | --- a/drivers/md/raid1.c | ||
34 | +++ b/drivers/md/raid1.c | ||
35 | @@ -525,8 +525,17 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect | ||
36 | if (test_bit(WriteMostly, &rdev->flags)) { | ||
37 | /* Don't balance among write-mostly, just | ||
38 | * use the first as a last resort */ | ||
39 | - if (best_disk < 0) | ||
40 | + if (best_disk < 0) { | ||
41 | + if (is_badblock(rdev, this_sector, sectors, | ||
42 | + &first_bad, &bad_sectors)) { | ||
43 | + if (first_bad < this_sector) | ||
44 | + /* Cannot use this */ | ||
45 | + continue; | ||
46 | + best_good_sectors = first_bad - this_sector; | ||
47 | + } else | ||
48 | + best_good_sectors = sectors; | ||
49 | best_disk = disk; | ||
50 | + } | ||
51 | continue; | ||
52 | } | ||
53 | /* This is a reasonable device to use. It might | ||
54 | -- | ||
55 | 1.7.9.5 | ||
56 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch deleted file mode 100644 index 221f3df6..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0040-ima-free-duplicate-measurement-memory.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 5800ae9277818c4ce77d7efd4a1035738ec40400 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roberto Sassu <roberto.sassu@polito.it> | ||
3 | Date: Mon, 19 Dec 2011 15:57:27 +0100 | ||
4 | Subject: [PATCH 040/129] ima: free duplicate measurement memory | ||
5 | |||
6 | commit 45fae7493970d7c45626ccd96d4a74f5f1eea5a9 upstream. | ||
7 | |||
8 | Info about new measurements are cached in the iint for performance. When | ||
9 | the inode is flushed from cache, the associated iint is flushed as well. | ||
10 | Subsequent access to the inode will cause the inode to be re-measured and | ||
11 | will attempt to add a duplicate entry to the measurement list. | ||
12 | |||
13 | This patch frees the duplicate measurement memory, fixing a memory leak. | ||
14 | |||
15 | Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> | ||
16 | Signed-off-by: Mimi Zohar <zohar@us.ibm.com> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | security/integrity/ima/ima_api.c | 4 ++-- | ||
20 | security/integrity/ima/ima_queue.c | 1 + | ||
21 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c | ||
24 | index 0d50df0..88a2788 100644 | ||
25 | --- a/security/integrity/ima/ima_api.c | ||
26 | +++ b/security/integrity/ima/ima_api.c | ||
27 | @@ -178,8 +178,8 @@ void ima_store_measurement(struct integrity_iint_cache *iint, | ||
28 | strncpy(entry->template.file_name, filename, IMA_EVENT_NAME_LEN_MAX); | ||
29 | |||
30 | result = ima_store_template(entry, violation, inode); | ||
31 | - if (!result) | ||
32 | + if (!result || result == -EEXIST) | ||
33 | iint->flags |= IMA_MEASURED; | ||
34 | - else | ||
35 | + if (result < 0) | ||
36 | kfree(entry); | ||
37 | } | ||
38 | diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c | ||
39 | index 8e28f04..e1a5062 100644 | ||
40 | --- a/security/integrity/ima/ima_queue.c | ||
41 | +++ b/security/integrity/ima/ima_queue.c | ||
42 | @@ -114,6 +114,7 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation, | ||
43 | memcpy(digest, entry->digest, sizeof digest); | ||
44 | if (ima_lookup_digest_entry(digest)) { | ||
45 | audit_cause = "hash_exists"; | ||
46 | + result = -EEXIST; | ||
47 | goto out; | ||
48 | } | ||
49 | } | ||
50 | -- | ||
51 | 1.7.9.5 | ||
52 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch deleted file mode 100644 index 3f30fe21..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0041-ima-fix-invalid-memory-reference.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From 2c5908ebba650537dda1db47220afc062e7d61bd Mon Sep 17 00:00:00 2001 | ||
2 | From: Roberto Sassu <roberto.sassu@polito.it> | ||
3 | Date: Mon, 19 Dec 2011 15:57:28 +0100 | ||
4 | Subject: [PATCH 041/129] ima: fix invalid memory reference | ||
5 | |||
6 | commit 7b7e5916aa2f46e57f8bd8cb89c34620ebfda5da upstream. | ||
7 | |||
8 | Don't free a valid measurement entry on TPM PCR extend failure. | ||
9 | |||
10 | Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> | ||
11 | Signed-off-by: Mimi Zohar <zohar@us.ibm.com> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | security/integrity/ima/ima_queue.c | 16 +++++++++++----- | ||
15 | 1 file changed, 11 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/security/integrity/ima/ima_queue.c b/security/integrity/ima/ima_queue.c | ||
18 | index e1a5062..55a6271 100644 | ||
19 | --- a/security/integrity/ima/ima_queue.c | ||
20 | +++ b/security/integrity/ima/ima_queue.c | ||
21 | @@ -23,6 +23,8 @@ | ||
22 | #include <linux/slab.h> | ||
23 | #include "ima.h" | ||
24 | |||
25 | +#define AUDIT_CAUSE_LEN_MAX 32 | ||
26 | + | ||
27 | LIST_HEAD(ima_measurements); /* list of all measurements */ | ||
28 | |||
29 | /* key: inode (before secure-hashing a file) */ | ||
30 | @@ -94,7 +96,8 @@ static int ima_pcr_extend(const u8 *hash) | ||
31 | |||
32 | result = tpm_pcr_extend(TPM_ANY_NUM, CONFIG_IMA_MEASURE_PCR_IDX, hash); | ||
33 | if (result != 0) | ||
34 | - pr_err("IMA: Error Communicating to TPM chip\n"); | ||
35 | + pr_err("IMA: Error Communicating to TPM chip, result: %d\n", | ||
36 | + result); | ||
37 | return result; | ||
38 | } | ||
39 | |||
40 | @@ -106,8 +109,9 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation, | ||
41 | { | ||
42 | u8 digest[IMA_DIGEST_SIZE]; | ||
43 | const char *audit_cause = "hash_added"; | ||
44 | + char tpm_audit_cause[AUDIT_CAUSE_LEN_MAX]; | ||
45 | int audit_info = 1; | ||
46 | - int result = 0; | ||
47 | + int result = 0, tpmresult = 0; | ||
48 | |||
49 | mutex_lock(&ima_extend_list_mutex); | ||
50 | if (!violation) { | ||
51 | @@ -129,9 +133,11 @@ int ima_add_template_entry(struct ima_template_entry *entry, int violation, | ||
52 | if (violation) /* invalidate pcr */ | ||
53 | memset(digest, 0xff, sizeof digest); | ||
54 | |||
55 | - result = ima_pcr_extend(digest); | ||
56 | - if (result != 0) { | ||
57 | - audit_cause = "TPM error"; | ||
58 | + tpmresult = ima_pcr_extend(digest); | ||
59 | + if (tpmresult != 0) { | ||
60 | + snprintf(tpm_audit_cause, AUDIT_CAUSE_LEN_MAX, "TPM_error(%d)", | ||
61 | + tpmresult); | ||
62 | + audit_cause = tpm_audit_cause; | ||
63 | audit_info = 0; | ||
64 | } | ||
65 | out: | ||
66 | -- | ||
67 | 1.7.9.5 | ||
68 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch deleted file mode 100644 index 2af89dd8..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0042-slub-fix-a-possible-memleak-in-__slab_alloc.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 71490e8f6f58ec56533554888983ce09d6ee5cb1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Tue, 13 Dec 2011 04:57:06 +0100 | ||
4 | Subject: [PATCH 042/129] slub: fix a possible memleak in __slab_alloc() | ||
5 | |||
6 | commit 73736e0387ba0e6d2b703407b4d26168d31516a7 upstream. | ||
7 | |||
8 | Zhihua Che reported a possible memleak in slub allocator on | ||
9 | CONFIG_PREEMPT=y builds. | ||
10 | |||
11 | It is possible current thread migrates right before disabling irqs in | ||
12 | __slab_alloc(). We must check again c->freelist, and perform a normal | ||
13 | allocation instead of scratching c->freelist. | ||
14 | |||
15 | Many thanks to Zhihua Che for spotting this bug, introduced in 2.6.39 | ||
16 | |||
17 | V2: Its also possible an IRQ freed one (or several) object(s) and | ||
18 | populated c->freelist, so its not a CONFIG_PREEMPT only problem. | ||
19 | |||
20 | Reported-by: Zhihua Che <zhihua.che@gmail.com> | ||
21 | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
22 | Acked-by: Christoph Lameter <cl@linux.com> | ||
23 | Signed-off-by: Pekka Enberg <penberg@kernel.org> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
25 | --- | ||
26 | mm/slub.c | 5 +++++ | ||
27 | 1 file changed, 5 insertions(+) | ||
28 | |||
29 | diff --git a/mm/slub.c b/mm/slub.c | ||
30 | index ed3334d..1a919f0 100644 | ||
31 | --- a/mm/slub.c | ||
32 | +++ b/mm/slub.c | ||
33 | @@ -2166,6 +2166,11 @@ redo: | ||
34 | goto new_slab; | ||
35 | } | ||
36 | |||
37 | + /* must check again c->freelist in case of cpu migration or IRQ */ | ||
38 | + object = c->freelist; | ||
39 | + if (object) | ||
40 | + goto load_freelist; | ||
41 | + | ||
42 | stat(s, ALLOC_SLOWPATH); | ||
43 | |||
44 | do { | ||
45 | -- | ||
46 | 1.7.9.5 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch deleted file mode 100644 index c8c5bd7a..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0043-PNP-work-around-Dell-1536-1546-BIOS-MMCONFIG-bug-tha.patch +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | From ac901f18d34bc2bf1be5e6b56cf6eeb045c0bbee Mon Sep 17 00:00:00 2001 | ||
2 | From: Bjorn Helgaas <bhelgaas@google.com> | ||
3 | Date: Thu, 5 Jan 2012 14:27:24 -0700 | ||
4 | Subject: [PATCH 043/129] PNP: work around Dell 1536/1546 BIOS MMCONFIG bug | ||
5 | that breaks USB | ||
6 | |||
7 | commit eb31aae8cb5eb54e234ed2d857ddac868195d911 upstream. | ||
8 | |||
9 | Some Dell BIOSes have MCFG tables that don't report the entire | ||
10 | MMCONFIG area claimed by the chipset. If we move PCI devices into | ||
11 | that claimed-but-unreported area, they don't work. | ||
12 | |||
13 | This quirk reads the AMD MMCONFIG MSRs and adds PNP0C01 resources as | ||
14 | needed to cover the entire area. | ||
15 | |||
16 | Example problem scenario: | ||
17 | |||
18 | BIOS-e820: 00000000cfec5400 - 00000000d4000000 (reserved) | ||
19 | Fam 10h mmconf [d0000000, dfffffff] | ||
20 | PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xd0000000-0xd3ffffff] (base 0xd0000000) | ||
21 | pnp 00:0c: [mem 0xd0000000-0xd3ffffff] | ||
22 | pci 0000:00:12.0: reg 10: [mem 0xffb00000-0xffb00fff] | ||
23 | pci 0000:00:12.0: no compatible bridge window for [mem 0xffb00000-0xffb00fff] | ||
24 | pci 0000:00:12.0: BAR 0: assigned [mem 0xd4000000-0xd40000ff] | ||
25 | |||
26 | Reported-by: Lisa Salimbas <lisa.salimbas@canonical.com> | ||
27 | Reported-by: <thuban@singularity.fr> | ||
28 | Tested-by: dann frazier <dann.frazier@canonical.com> | ||
29 | References: https://bugzilla.kernel.org/show_bug.cgi?id=31602 | ||
30 | References: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/647043 | ||
31 | References: https://bugzilla.redhat.com/show_bug.cgi?id=770308 | ||
32 | Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> | ||
33 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
34 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
35 | --- | ||
36 | drivers/pnp/quirks.c | 42 ++++++++++++++++++++++++++++++++++++++++++ | ||
37 | 1 file changed, 42 insertions(+) | ||
38 | |||
39 | diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c | ||
40 | index dfbd5a6..258fef2 100644 | ||
41 | --- a/drivers/pnp/quirks.c | ||
42 | +++ b/drivers/pnp/quirks.c | ||
43 | @@ -295,6 +295,45 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) | ||
44 | } | ||
45 | } | ||
46 | |||
47 | +#ifdef CONFIG_AMD_NB | ||
48 | + | ||
49 | +#include <asm/amd_nb.h> | ||
50 | + | ||
51 | +static void quirk_amd_mmconfig_area(struct pnp_dev *dev) | ||
52 | +{ | ||
53 | + resource_size_t start, end; | ||
54 | + struct pnp_resource *pnp_res; | ||
55 | + struct resource *res; | ||
56 | + struct resource mmconfig_res, *mmconfig; | ||
57 | + | ||
58 | + mmconfig = amd_get_mmconfig_range(&mmconfig_res); | ||
59 | + if (!mmconfig) | ||
60 | + return; | ||
61 | + | ||
62 | + list_for_each_entry(pnp_res, &dev->resources, list) { | ||
63 | + res = &pnp_res->res; | ||
64 | + if (res->end < mmconfig->start || res->start > mmconfig->end || | ||
65 | + (res->start == mmconfig->start && res->end == mmconfig->end)) | ||
66 | + continue; | ||
67 | + | ||
68 | + dev_info(&dev->dev, FW_BUG | ||
69 | + "%pR covers only part of AMD MMCONFIG area %pR; adding more reservations\n", | ||
70 | + res, mmconfig); | ||
71 | + if (mmconfig->start < res->start) { | ||
72 | + start = mmconfig->start; | ||
73 | + end = res->start - 1; | ||
74 | + pnp_add_mem_resource(dev, start, end, 0); | ||
75 | + } | ||
76 | + if (mmconfig->end > res->end) { | ||
77 | + start = res->end + 1; | ||
78 | + end = mmconfig->end; | ||
79 | + pnp_add_mem_resource(dev, start, end, 0); | ||
80 | + } | ||
81 | + break; | ||
82 | + } | ||
83 | +} | ||
84 | +#endif | ||
85 | + | ||
86 | /* | ||
87 | * PnP Quirks | ||
88 | * Cards or devices that need some tweaking due to incomplete resource info | ||
89 | @@ -322,6 +361,9 @@ static struct pnp_fixup pnp_fixups[] = { | ||
90 | /* PnP resources that might overlap PCI BARs */ | ||
91 | {"PNP0c01", quirk_system_pci_resources}, | ||
92 | {"PNP0c02", quirk_system_pci_resources}, | ||
93 | +#ifdef CONFIG_AMD_NB | ||
94 | + {"PNP0c01", quirk_amd_mmconfig_area}, | ||
95 | +#endif | ||
96 | {""} | ||
97 | }; | ||
98 | |||
99 | -- | ||
100 | 1.7.9.5 | ||
101 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch deleted file mode 100644 index ec9189d8..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0044-asix-fix-setting-custom-MAC-address-on-Asix-88178-de.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 45268a6d90150936994e8b3e21eb91a54586685e Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
3 | Date: Tue, 10 Jan 2012 06:40:23 +0000 | ||
4 | Subject: [PATCH 044/129] asix: fix setting custom MAC address on Asix 88178 | ||
5 | devices | ||
6 | |||
7 | commit 71bc5d94061516c4e70303570128797bcf768b10 upstream. | ||
8 | |||
9 | In kernel v3.2 initialization sequence for Asix 88178 devices was changed so | ||
10 | that hardware is reseted on every time interface is brought up (ifconfig up), | ||
11 | instead just at USB probe time. This causes problem with setting custom MAC | ||
12 | address to device as ax88178_reset causes reload of MAC address from EEPROM. | ||
13 | |||
14 | This patch fixes the issue by rewriting MAC address at end of ax88178_reset. | ||
15 | |||
16 | Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
17 | Acked-by: Grant Grundler <grundler@chromium.org> | ||
18 | Cc: Allan Chou <allan@asix.com.tw> | ||
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
21 | --- | ||
22 | drivers/net/usb/asix.c | 7 +++++++ | ||
23 | 1 file changed, 7 insertions(+) | ||
24 | |||
25 | diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c | ||
26 | index dd2625a..b495821 100644 | ||
27 | --- a/drivers/net/usb/asix.c | ||
28 | +++ b/drivers/net/usb/asix.c | ||
29 | @@ -1316,6 +1316,13 @@ static int ax88178_reset(struct usbnet *dev) | ||
30 | if (ret < 0) | ||
31 | return ret; | ||
32 | |||
33 | + /* Rewrite MAC address */ | ||
34 | + memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN); | ||
35 | + ret = asix_write_cmd(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN, | ||
36 | + data->mac_addr); | ||
37 | + if (ret < 0) | ||
38 | + return ret; | ||
39 | + | ||
40 | ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL); | ||
41 | if (ret < 0) | ||
42 | return ret; | ||
43 | -- | ||
44 | 1.7.9.5 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch deleted file mode 100644 index b39ee830..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0045-asix-fix-setting-custom-MAC-address-on-Asix-88772-de.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From fa83c408b16aae1d3d85868c528caf491e14af76 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
3 | Date: Tue, 10 Jan 2012 06:40:17 +0000 | ||
4 | Subject: [PATCH 045/129] asix: fix setting custom MAC address on Asix 88772 | ||
5 | devices | ||
6 | |||
7 | commit 8ef66bdc4bda6aac2dae73b84d79dc8c2db33637 upstream. | ||
8 | |||
9 | In kernel v3.2 initialization sequence for Asix 88772 devices was changed so | ||
10 | that hardware is reseted on every time interface is brought up (ifconfig up), | ||
11 | instead just at USB probe time. This causes problem with setting custom MAC | ||
12 | address to device as ax88772_reset causes reload of MAC address from EEPROM. | ||
13 | |||
14 | This patch fixes the issue by rewriting MAC address at end of ax88772_reset. | ||
15 | |||
16 | Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | ||
17 | Acked-by: Grant Grundler <grundler@chromium.org> | ||
18 | Cc: Allan Chou <allan@asix.com.tw> | ||
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
21 | --- | ||
22 | drivers/net/usb/asix.c | 8 ++++++++ | ||
23 | 1 file changed, 8 insertions(+) | ||
24 | |||
25 | diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c | ||
26 | index b495821..f5e063a 100644 | ||
27 | --- a/drivers/net/usb/asix.c | ||
28 | +++ b/drivers/net/usb/asix.c | ||
29 | @@ -974,6 +974,7 @@ static int ax88772_link_reset(struct usbnet *dev) | ||
30 | |||
31 | static int ax88772_reset(struct usbnet *dev) | ||
32 | { | ||
33 | + struct asix_data *data = (struct asix_data *)&dev->data; | ||
34 | int ret, embd_phy; | ||
35 | u16 rx_ctl; | ||
36 | |||
37 | @@ -1051,6 +1052,13 @@ static int ax88772_reset(struct usbnet *dev) | ||
38 | goto out; | ||
39 | } | ||
40 | |||
41 | + /* Rewrite MAC address */ | ||
42 | + memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN); | ||
43 | + ret = asix_write_cmd(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN, | ||
44 | + data->mac_addr); | ||
45 | + if (ret < 0) | ||
46 | + goto out; | ||
47 | + | ||
48 | /* Set RX_CTL to default values with 2k buffer, and enable cactus */ | ||
49 | ret = asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL); | ||
50 | if (ret < 0) | ||
51 | -- | ||
52 | 1.7.9.5 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch deleted file mode 100644 index 3fe1fc76..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0046-include-linux-crash_dump.h-needs-elf.h.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From a509baa477542eca7e6f6d8d23dc1ba04248a62f Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabio Estevam <festevam@gmail.com> | ||
3 | Date: Thu, 12 Jan 2012 17:20:20 -0800 | ||
4 | Subject: [PATCH 046/129] include/linux/crash_dump.h needs elf.h | ||
5 | |||
6 | commit 1f536b9e9f85456df93614b3c2f6a1a2b7d7cb9b upstream. | ||
7 | |||
8 | Building an ARM target we get the following warnings: | ||
9 | |||
10 | CC arch/arm/kernel/setup.o | ||
11 | In file included from arch/arm/kernel/setup.c:39: | ||
12 | arch/arm/include/asm/elf.h:102:1: warning: "vmcore_elf64_check_arch" redefined | ||
13 | In file included from arch/arm/kernel/setup.c:24: | ||
14 | include/linux/crash_dump.h:30:1: warning: this is the location of the previous definition | ||
15 | |||
16 | Quoting Russell King: | ||
17 | |||
18 | "linux/crash_dump.h makes no attempt to include asm/elf.h, but it depends | ||
19 | on stuff in asm/elf.h to determine how stuff inside this file is defined | ||
20 | at parse time. | ||
21 | |||
22 | So, if asm/elf.h is included after linux/crash_dump.h or not at all, you | ||
23 | get a different result from the situation where asm/elf.h is included | ||
24 | before." | ||
25 | |||
26 | So add elf.h header to crash_dump.h to avoid this problem. | ||
27 | |||
28 | The original discussion about this can be found at: | ||
29 | http://www.spinics.net/lists/arm-kernel/msg154113.html | ||
30 | |||
31 | Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> | ||
32 | Cc: Russell King <rmk@arm.linux.org.uk> | ||
33 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
34 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
35 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
36 | --- | ||
37 | include/linux/crash_dump.h | 1 + | ||
38 | 1 file changed, 1 insertion(+) | ||
39 | |||
40 | diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h | ||
41 | index 5c4abce..b936763 100644 | ||
42 | --- a/include/linux/crash_dump.h | ||
43 | +++ b/include/linux/crash_dump.h | ||
44 | @@ -5,6 +5,7 @@ | ||
45 | #include <linux/kexec.h> | ||
46 | #include <linux/device.h> | ||
47 | #include <linux/proc_fs.h> | ||
48 | +#include <linux/elf.h> | ||
49 | |||
50 | #define ELFCORE_ADDR_MAX (-1ULL) | ||
51 | #define ELFCORE_ADDR_ERR (-2ULL) | ||
52 | -- | ||
53 | 1.7.9.5 | ||
54 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch deleted file mode 100644 index 083f876e..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0047-rtl8192se-Fix-BUG-caused-by-failure-to-check-skb-all.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From b12320439e84a510f0043ea4b2540080c8bbb9a7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Larry Finger <Larry.Finger@lwfinger.net> | ||
3 | Date: Wed, 4 Jan 2012 20:50:47 -0600 | ||
4 | Subject: [PATCH 047/129] rtl8192se: Fix BUG caused by failure to check skb | ||
5 | allocation | ||
6 | |||
7 | commit d90db4b12bc1b9b8a787ef28550fdb767ee25a49 upstream. | ||
8 | |||
9 | When downloading firmware into the device, the driver fails to check the | ||
10 | return when allocating an skb. When the allocation fails, a BUG can be | ||
11 | generated, as seen in https://bugzilla.redhat.com/show_bug.cgi?id=771656. | ||
12 | |||
13 | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> | ||
14 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/net/wireless/rtlwifi/rtl8192se/fw.c | 4 ++++ | ||
18 | 1 file changed, 4 insertions(+) | ||
19 | |||
20 | diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c | ||
21 | index 6f91a14..3fda6b1 100644 | ||
22 | --- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c | ||
23 | +++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c | ||
24 | @@ -196,6 +196,8 @@ static bool _rtl92s_firmware_downloadcode(struct ieee80211_hw *hw, | ||
25 | /* Allocate skb buffer to contain firmware */ | ||
26 | /* info and tx descriptor info. */ | ||
27 | skb = dev_alloc_skb(frag_length); | ||
28 | + if (!skb) | ||
29 | + return false; | ||
30 | skb_reserve(skb, extra_descoffset); | ||
31 | seg_ptr = (u8 *)skb_put(skb, (u32)(frag_length - | ||
32 | extra_descoffset)); | ||
33 | @@ -573,6 +575,8 @@ static bool _rtl92s_firmware_set_h2c_cmd(struct ieee80211_hw *hw, u8 h2c_cmd, | ||
34 | |||
35 | len = _rtl92s_get_h2c_cmdlen(MAX_TRANSMIT_BUFFER_SIZE, 1, &cmd_len); | ||
36 | skb = dev_alloc_skb(len); | ||
37 | + if (!skb) | ||
38 | + return false; | ||
39 | cb_desc = (struct rtl_tcb_desc *)(skb->cb); | ||
40 | cb_desc->queue_index = TXCMD_QUEUE; | ||
41 | cb_desc->cmd_or_init = DESC_PACKET_TYPE_NORMAL; | ||
42 | -- | ||
43 | 1.7.9.5 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch deleted file mode 100644 index e7063dfc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0048-mac80211-fix-rx-key-NULL-pointer-dereference-in-prom.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 12b3ec5c806e2daef619f068f80115f4dc0aa6bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Stanislaw Gruszka <sgruszka@redhat.com> | ||
3 | Date: Wed, 11 Jan 2012 09:26:54 +0100 | ||
4 | Subject: [PATCH 048/129] mac80211: fix rx->key NULL pointer dereference in | ||
5 | promiscuous mode | ||
6 | |||
7 | commit 1140afa862842ac3e56678693050760edc4ecde9 upstream. | ||
8 | |||
9 | Since: | ||
10 | |||
11 | commit 816c04fe7ef01dd9649f5ccfe796474db8708be5 | ||
12 | Author: Christian Lamparter <chunkeey@googlemail.com> | ||
13 | Date: Sat Apr 30 15:24:30 2011 +0200 | ||
14 | |||
15 | mac80211: consolidate MIC failure report handling | ||
16 | |||
17 | is possible to that we dereference rx->key == NULL when driver set | ||
18 | RX_FLAG_MMIC_STRIPPED and not RX_FLAG_IV_STRIPPED and we are in | ||
19 | promiscuous mode. This happen with rt73usb and rt61pci at least. | ||
20 | |||
21 | Before the commit we always check rx->key against NULL, so I assume | ||
22 | fix should be done in mac80211 (also mic_fail path has similar check). | ||
23 | |||
24 | References: | ||
25 | https://bugzilla.redhat.com/show_bug.cgi?id=769766 | ||
26 | http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2012-January/004395.html | ||
27 | |||
28 | Reported-by: Stuart D Gathman <stuart@gathman.org> | ||
29 | Reported-by: Kai Wohlfahrt <kai.scorpio@gmail.com> | ||
30 | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> | ||
31 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
33 | --- | ||
34 | net/mac80211/wpa.c | 2 +- | ||
35 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
36 | |||
37 | diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c | ||
38 | index f614ce7..28a39bb 100644 | ||
39 | --- a/net/mac80211/wpa.c | ||
40 | +++ b/net/mac80211/wpa.c | ||
41 | @@ -106,7 +106,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx) | ||
42 | if (status->flag & RX_FLAG_MMIC_ERROR) | ||
43 | goto mic_fail; | ||
44 | |||
45 | - if (!(status->flag & RX_FLAG_IV_STRIPPED)) | ||
46 | + if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key) | ||
47 | goto update_iv; | ||
48 | |||
49 | return RX_CONTINUE; | ||
50 | -- | ||
51 | 1.7.9.5 | ||
52 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch deleted file mode 100644 index 13131032..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0049-ath9k-Fix-regression-in-channelwidth-switch-at-the-s.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From f7938357cefb08ed00118138736f4d475fbc6578 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | ||
3 | Date: Mon, 9 Jan 2012 15:37:53 +0530 | ||
4 | Subject: [PATCH 049/129] ath9k: Fix regression in channelwidth switch at the | ||
5 | same channel | ||
6 | |||
7 | commit 1a19f77f3642b8194ad9cf55548cc5d92e841766 upstream. | ||
8 | |||
9 | The commit "ath9k: Fix invalid noisefloor reading due to channel update" | ||
10 | preserves the current channel noisefloor readings before updating | ||
11 | channel type at the same channel index. It is also updating the curchan | ||
12 | pointer. As survey updation is also referring curchan pointer to fetch | ||
13 | the appropriate index, which might leads to invalid memory access. This | ||
14 | patch partially reverts the change and stores the noise floor history | ||
15 | buffer before updating channel type w/o updating curchan. | ||
16 | |||
17 | Cc: Gary Morain <gmorain@google.com> | ||
18 | Cc: Paul Stewart <pstew@google.com> | ||
19 | Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | ||
20 | Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | ||
21 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | drivers/net/wireless/ath/ath9k/calib.c | 1 + | ||
25 | drivers/net/wireless/ath/ath9k/main.c | 8 ++------ | ||
26 | 2 files changed, 3 insertions(+), 6 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c | ||
29 | index 9953881..8ddef3e 100644 | ||
30 | --- a/drivers/net/wireless/ath/ath9k/calib.c | ||
31 | +++ b/drivers/net/wireless/ath/ath9k/calib.c | ||
32 | @@ -402,6 +402,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) | ||
33 | ah->noise = ath9k_hw_getchan_noise(ah, chan); | ||
34 | return true; | ||
35 | } | ||
36 | +EXPORT_SYMBOL(ath9k_hw_getnf); | ||
37 | |||
38 | void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah, | ||
39 | struct ath9k_channel *chan) | ||
40 | diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c | ||
41 | index a9c5ae7..f76a814 100644 | ||
42 | --- a/drivers/net/wireless/ath/ath9k/main.c | ||
43 | +++ b/drivers/net/wireless/ath/ath9k/main.c | ||
44 | @@ -1667,7 +1667,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | ||
45 | |||
46 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { | ||
47 | struct ieee80211_channel *curchan = hw->conf.channel; | ||
48 | - struct ath9k_channel old_chan; | ||
49 | int pos = curchan->hw_value; | ||
50 | int old_pos = -1; | ||
51 | unsigned long flags; | ||
52 | @@ -1693,11 +1692,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | ||
53 | * Preserve the current channel values, before updating | ||
54 | * the same channel | ||
55 | */ | ||
56 | - if (old_pos == pos) { | ||
57 | - memcpy(&old_chan, &sc->sc_ah->channels[pos], | ||
58 | - sizeof(struct ath9k_channel)); | ||
59 | - ah->curchan = &old_chan; | ||
60 | - } | ||
61 | + if (ah->curchan && (old_pos == pos)) | ||
62 | + ath9k_hw_getnf(ah, ah->curchan); | ||
63 | |||
64 | ath9k_cmn_update_ichannel(&sc->sc_ah->channels[pos], | ||
65 | curchan, conf->channel_type); | ||
66 | -- | ||
67 | 1.7.9.5 | ||
68 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch deleted file mode 100644 index a3cc1885..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0050-memcg-add-mem_cgroup_replace_page_cache-to-fix-LRU-i.patch +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | From 3a43cb3518148d31838d97bff3e6fcc29487499d Mon Sep 17 00:00:00 2001 | ||
2 | From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | ||
3 | Date: Thu, 12 Jan 2012 17:17:44 -0800 | ||
4 | Subject: [PATCH 050/129] memcg: add mem_cgroup_replace_page_cache() to fix | ||
5 | LRU issue | ||
6 | |||
7 | commit ab936cbcd02072a34b60d268f94440fd5cf1970b upstream. | ||
8 | |||
9 | Commit ef6a3c6311 ("mm: add replace_page_cache_page() function") added a | ||
10 | function replace_page_cache_page(). This function replaces a page in the | ||
11 | radix-tree with a new page. WHen doing this, memory cgroup needs to fix | ||
12 | up the accounting information. memcg need to check PCG_USED bit etc. | ||
13 | |||
14 | In some(many?) cases, 'newpage' is on LRU before calling | ||
15 | replace_page_cache(). So, memcg's LRU accounting information should be | ||
16 | fixed, too. | ||
17 | |||
18 | This patch adds mem_cgroup_replace_page_cache() and removes the old hooks. | ||
19 | In that function, old pages will be unaccounted without touching | ||
20 | res_counter and new page will be accounted to the memcg (of old page). | ||
21 | WHen overwriting pc->mem_cgroup of newpage, take zone->lru_lock and avoid | ||
22 | races with LRU handling. | ||
23 | |||
24 | Background: | ||
25 | replace_page_cache_page() is called by FUSE code in its splice() handling. | ||
26 | Here, 'newpage' is replacing oldpage but this newpage is not a newly allocated | ||
27 | page and may be on LRU. LRU mis-accounting will be critical for memory cgroup | ||
28 | because rmdir() checks the whole LRU is empty and there is no account leak. | ||
29 | If a page is on the other LRU than it should be, rmdir() will fail. | ||
30 | |||
31 | This bug was added in March 2011, but no bug report yet. I guess there | ||
32 | are not many people who use memcg and FUSE at the same time with upstream | ||
33 | kernels. | ||
34 | |||
35 | The result of this bug is that admin cannot destroy a memcg because of | ||
36 | account leak. So, no panic, no deadlock. And, even if an active cgroup | ||
37 | exist, umount can succseed. So no problem at shutdown. | ||
38 | |||
39 | Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | ||
40 | Acked-by: Johannes Weiner <hannes@cmpxchg.org> | ||
41 | Acked-by: Michal Hocko <mhocko@suse.cz> | ||
42 | Cc: Miklos Szeredi <mszeredi@suse.cz> | ||
43 | Cc: Hugh Dickins <hughd@google.com> | ||
44 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
45 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
46 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
47 | --- | ||
48 | include/linux/memcontrol.h | 6 ++++++ | ||
49 | mm/filemap.c | 18 ++---------------- | ||
50 | mm/memcontrol.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ | ||
51 | 3 files changed, 52 insertions(+), 16 deletions(-) | ||
52 | |||
53 | diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h | ||
54 | index b87068a..81572af 100644 | ||
55 | --- a/include/linux/memcontrol.h | ||
56 | +++ b/include/linux/memcontrol.h | ||
57 | @@ -119,6 +119,8 @@ struct zone_reclaim_stat* | ||
58 | mem_cgroup_get_reclaim_stat_from_page(struct page *page); | ||
59 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | ||
60 | struct task_struct *p); | ||
61 | +extern void mem_cgroup_replace_page_cache(struct page *oldpage, | ||
62 | + struct page *newpage); | ||
63 | |||
64 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
65 | extern int do_swap_account; | ||
66 | @@ -366,6 +368,10 @@ static inline | ||
67 | void mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx) | ||
68 | { | ||
69 | } | ||
70 | +static inline void mem_cgroup_replace_page_cache(struct page *oldpage, | ||
71 | + struct page *newpage) | ||
72 | +{ | ||
73 | +} | ||
74 | #endif /* CONFIG_CGROUP_MEM_CONT */ | ||
75 | |||
76 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | ||
77 | diff --git a/mm/filemap.c b/mm/filemap.c | ||
78 | index 5f0a3c9..90286a4 100644 | ||
79 | --- a/mm/filemap.c | ||
80 | +++ b/mm/filemap.c | ||
81 | @@ -393,24 +393,11 @@ EXPORT_SYMBOL(filemap_write_and_wait_range); | ||
82 | int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask) | ||
83 | { | ||
84 | int error; | ||
85 | - struct mem_cgroup *memcg = NULL; | ||
86 | |||
87 | VM_BUG_ON(!PageLocked(old)); | ||
88 | VM_BUG_ON(!PageLocked(new)); | ||
89 | VM_BUG_ON(new->mapping); | ||
90 | |||
91 | - /* | ||
92 | - * This is not page migration, but prepare_migration and | ||
93 | - * end_migration does enough work for charge replacement. | ||
94 | - * | ||
95 | - * In the longer term we probably want a specialized function | ||
96 | - * for moving the charge from old to new in a more efficient | ||
97 | - * manner. | ||
98 | - */ | ||
99 | - error = mem_cgroup_prepare_migration(old, new, &memcg, gfp_mask); | ||
100 | - if (error) | ||
101 | - return error; | ||
102 | - | ||
103 | error = radix_tree_preload(gfp_mask & ~__GFP_HIGHMEM); | ||
104 | if (!error) { | ||
105 | struct address_space *mapping = old->mapping; | ||
106 | @@ -432,13 +419,12 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask) | ||
107 | if (PageSwapBacked(new)) | ||
108 | __inc_zone_page_state(new, NR_SHMEM); | ||
109 | spin_unlock_irq(&mapping->tree_lock); | ||
110 | + /* mem_cgroup codes must not be called under tree_lock */ | ||
111 | + mem_cgroup_replace_page_cache(old, new); | ||
112 | radix_tree_preload_end(); | ||
113 | if (freepage) | ||
114 | freepage(old); | ||
115 | page_cache_release(old); | ||
116 | - mem_cgroup_end_migration(memcg, old, new, true); | ||
117 | - } else { | ||
118 | - mem_cgroup_end_migration(memcg, old, new, false); | ||
119 | } | ||
120 | |||
121 | return error; | ||
122 | diff --git a/mm/memcontrol.c b/mm/memcontrol.c | ||
123 | index b63f5f7..f538e9b 100644 | ||
124 | --- a/mm/memcontrol.c | ||
125 | +++ b/mm/memcontrol.c | ||
126 | @@ -3366,6 +3366,50 @@ void mem_cgroup_end_migration(struct mem_cgroup *memcg, | ||
127 | cgroup_release_and_wakeup_rmdir(&memcg->css); | ||
128 | } | ||
129 | |||
130 | +/* | ||
131 | + * At replace page cache, newpage is not under any memcg but it's on | ||
132 | + * LRU. So, this function doesn't touch res_counter but handles LRU | ||
133 | + * in correct way. Both pages are locked so we cannot race with uncharge. | ||
134 | + */ | ||
135 | +void mem_cgroup_replace_page_cache(struct page *oldpage, | ||
136 | + struct page *newpage) | ||
137 | +{ | ||
138 | + struct mem_cgroup *memcg; | ||
139 | + struct page_cgroup *pc; | ||
140 | + struct zone *zone; | ||
141 | + enum charge_type type = MEM_CGROUP_CHARGE_TYPE_CACHE; | ||
142 | + unsigned long flags; | ||
143 | + | ||
144 | + if (mem_cgroup_disabled()) | ||
145 | + return; | ||
146 | + | ||
147 | + pc = lookup_page_cgroup(oldpage); | ||
148 | + /* fix accounting on old pages */ | ||
149 | + lock_page_cgroup(pc); | ||
150 | + memcg = pc->mem_cgroup; | ||
151 | + mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), -1); | ||
152 | + ClearPageCgroupUsed(pc); | ||
153 | + unlock_page_cgroup(pc); | ||
154 | + | ||
155 | + if (PageSwapBacked(oldpage)) | ||
156 | + type = MEM_CGROUP_CHARGE_TYPE_SHMEM; | ||
157 | + | ||
158 | + zone = page_zone(newpage); | ||
159 | + pc = lookup_page_cgroup(newpage); | ||
160 | + /* | ||
161 | + * Even if newpage->mapping was NULL before starting replacement, | ||
162 | + * the newpage may be on LRU(or pagevec for LRU) already. We lock | ||
163 | + * LRU while we overwrite pc->mem_cgroup. | ||
164 | + */ | ||
165 | + spin_lock_irqsave(&zone->lru_lock, flags); | ||
166 | + if (PageLRU(newpage)) | ||
167 | + del_page_from_lru_list(zone, newpage, page_lru(newpage)); | ||
168 | + __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type); | ||
169 | + if (PageLRU(newpage)) | ||
170 | + add_page_to_lru_list(zone, newpage, page_lru(newpage)); | ||
171 | + spin_unlock_irqrestore(&zone->lru_lock, flags); | ||
172 | +} | ||
173 | + | ||
174 | #ifdef CONFIG_DEBUG_VM | ||
175 | static struct page_cgroup *lookup_page_cgroup_used(struct page *page) | ||
176 | { | ||
177 | -- | ||
178 | 1.7.9.5 | ||
179 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch deleted file mode 100644 index fce15686..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0051-x86-Fix-mmap-random-address-range.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 65ce587697fd360eea3dc06a3a1422d63a159fd1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ludwig Nussel <ludwig.nussel@suse.de> | ||
3 | Date: Tue, 15 Nov 2011 14:46:46 -0800 | ||
4 | Subject: [PATCH 051/129] x86: Fix mmap random address range | ||
5 | |||
6 | commit 9af0c7a6fa860698d080481f24a342ba74b68982 upstream. | ||
7 | |||
8 | On x86_32 casting the unsigned int result of get_random_int() to | ||
9 | long may result in a negative value. On x86_32 the range of | ||
10 | mmap_rnd() therefore was -255 to 255. The 32bit mode on x86_64 | ||
11 | used 0 to 255 as intended. | ||
12 | |||
13 | The bug was introduced by 675a081 ("x86: unify mmap_{32|64}.c") | ||
14 | in January 2008. | ||
15 | |||
16 | Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de> | ||
17 | Cc: Linus Torvalds <torvalds@linux-foundation.org> | ||
18 | Cc: harvey.harrison@gmail.com | ||
19 | Cc: "H. Peter Anvin" <hpa@zytor.com> | ||
20 | Cc: Harvey Harrison <harvey.harrison@gmail.com> | ||
21 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
22 | Link: http://lkml.kernel.org/r/201111152246.pAFMklOB028527@wpaz5.hot.corp.google.com | ||
23 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
25 | --- | ||
26 | arch/x86/mm/mmap.c | 4 ++-- | ||
27 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c | ||
30 | index 4b5ba85..845df68 100644 | ||
31 | --- a/arch/x86/mm/mmap.c | ||
32 | +++ b/arch/x86/mm/mmap.c | ||
33 | @@ -75,9 +75,9 @@ static unsigned long mmap_rnd(void) | ||
34 | */ | ||
35 | if (current->flags & PF_RANDOMIZE) { | ||
36 | if (mmap_is_ia32()) | ||
37 | - rnd = (long)get_random_int() % (1<<8); | ||
38 | + rnd = get_random_int() % (1<<8); | ||
39 | else | ||
40 | - rnd = (long)(get_random_int() % (1<<28)); | ||
41 | + rnd = get_random_int() % (1<<28); | ||
42 | } | ||
43 | return rnd << PAGE_SHIFT; | ||
44 | } | ||
45 | -- | ||
46 | 1.7.9.5 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch deleted file mode 100644 index 5d261cc6..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0052-UBI-fix-nameless-volumes-handling.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From addbb632cd11d02b5386a9ebf040b0f89b6e2c84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Weinberger <richard@nod.at> | ||
3 | Date: Fri, 13 Jan 2012 15:07:40 +0100 | ||
4 | Subject: [PATCH 052/129] UBI: fix nameless volumes handling | ||
5 | |||
6 | commit 4a59c797a18917a5cf3ff7ade296b46134d91e6a upstream. | ||
7 | |||
8 | Currently it's possible to create a volume without a name. E.g: | ||
9 | ubimkvol -n 32 -s 2MiB -t static /dev/ubi0 -N "" | ||
10 | |||
11 | After that vtbl_check() will always fail because it does not permit | ||
12 | empty strings. | ||
13 | |||
14 | Signed-off-by: Richard Weinberger <richard@nod.at> | ||
15 | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | drivers/mtd/ubi/cdev.c | 3 +++ | ||
19 | 1 file changed, 3 insertions(+) | ||
20 | |||
21 | diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c | ||
22 | index 3320a50..ad76592 100644 | ||
23 | --- a/drivers/mtd/ubi/cdev.c | ||
24 | +++ b/drivers/mtd/ubi/cdev.c | ||
25 | @@ -632,6 +632,9 @@ static int verify_mkvol_req(const struct ubi_device *ubi, | ||
26 | if (req->alignment != 1 && n) | ||
27 | goto bad; | ||
28 | |||
29 | + if (!req->name[0] || !req->name_len) | ||
30 | + goto bad; | ||
31 | + | ||
32 | if (req->name_len > UBI_VOL_NAME_MAX) { | ||
33 | err = -ENAMETOOLONG; | ||
34 | goto bad; | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch deleted file mode 100644 index 83cd1b12..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0053-UBI-fix-debugging-messages.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 96bd5436400b64fe57b0be756f9424b1e1d1e430 Mon Sep 17 00:00:00 2001 | ||
2 | From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
3 | Date: Tue, 10 Jan 2012 19:32:30 +0200 | ||
4 | Subject: [PATCH 053/129] UBI: fix debugging messages | ||
5 | |||
6 | commit 72f0d453d81d35087b1d3ad7c8285628c2be6e1d upstream. | ||
7 | |||
8 | Patch ab50ff684707031ed4bad2fdd313208ae392e5bb broke UBI debugging messages: | ||
9 | before that commit when UBI debugging was enabled, users saw few useful | ||
10 | debugging messages after attaching an MTD device. However, that patch turned | ||
11 | 'dbg_msg()' into 'pr_debug()', so to enable the debugging messages users have | ||
12 | to enable them first via /sys/kernel/debug/dynamic_debug/control, which is | ||
13 | very impractical. | ||
14 | |||
15 | This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just | ||
16 | as it was before the breakage. | ||
17 | |||
18 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | drivers/mtd/ubi/debug.h | 5 ++++- | ||
22 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h | ||
25 | index 64fbb00..ead2cd1 100644 | ||
26 | --- a/drivers/mtd/ubi/debug.h | ||
27 | +++ b/drivers/mtd/ubi/debug.h | ||
28 | @@ -43,7 +43,10 @@ | ||
29 | pr_debug("UBI DBG " type ": " fmt "\n", ##__VA_ARGS__) | ||
30 | |||
31 | /* Just a debugging messages not related to any specific UBI subsystem */ | ||
32 | -#define dbg_msg(fmt, ...) ubi_dbg_msg("msg", fmt, ##__VA_ARGS__) | ||
33 | +#define dbg_msg(fmt, ...) \ | ||
34 | + printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \ | ||
35 | + current->pid, __func__, ##__VA_ARGS__) | ||
36 | + | ||
37 | /* General debugging messages */ | ||
38 | #define dbg_gen(fmt, ...) ubi_dbg_msg("gen", fmt, ##__VA_ARGS__) | ||
39 | /* Messages from the eraseblock association sub-system */ | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch deleted file mode 100644 index 2790744f..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0054-UBI-make-vid_hdr-non-static.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From f767fd8bc40accebf74bdee01946ed6452a626df Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Weinberger <rw@linutronix.de> | ||
3 | Date: Thu, 22 Dec 2011 16:12:57 +0100 | ||
4 | Subject: [PATCH 054/129] UBI: make vid_hdr non-static | ||
5 | |||
6 | commit 6bdccffe8c4268d02f71873102131fb6ed37ed9a upstream. | ||
7 | |||
8 | Remove 'static' modifier from the 'vid_hdr' local variable. I do not know | ||
9 | how it slipped in, but this is a bug and will break UBI if someone attaches | ||
10 | 2 UBI volumes at the same time. | ||
11 | |||
12 | Artem: amended teh commit message, added -stable. | ||
13 | |||
14 | Signed-off-by: Richard Weinberger <rw@linutronix.de> | ||
15 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | drivers/mtd/ubi/vtbl.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c | ||
22 | index 9ad18da..890754c 100644 | ||
23 | --- a/drivers/mtd/ubi/vtbl.c | ||
24 | +++ b/drivers/mtd/ubi/vtbl.c | ||
25 | @@ -306,7 +306,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si, | ||
26 | int copy, void *vtbl) | ||
27 | { | ||
28 | int err, tries = 0; | ||
29 | - static struct ubi_vid_hdr *vid_hdr; | ||
30 | + struct ubi_vid_hdr *vid_hdr; | ||
31 | struct ubi_scan_leb *new_seb; | ||
32 | |||
33 | ubi_msg("create volume table (copy #%d)", copy + 1); | ||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch deleted file mode 100644 index 9c457123..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0055-UBIFS-fix-debugging-messages.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 6c07a86a7e8ac8231be518705c91ba4b32da1813 Mon Sep 17 00:00:00 2001 | ||
2 | From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
3 | Date: Tue, 10 Jan 2012 19:32:30 +0200 | ||
4 | Subject: [PATCH 055/129] UBIFS: fix debugging messages | ||
5 | |||
6 | commit d34315da9146253351146140ea4b277193ee5e5f upstream. | ||
7 | |||
8 | Patch 56e46742e846e4de167dde0e1e1071ace1c882a5 broke UBIFS debugging messages: | ||
9 | before that commit when UBIFS debugging was enabled, users saw few useful | ||
10 | debugging messages after mount. However, that patch turned 'dbg_msg()' into | ||
11 | 'pr_debug()', so to enable the debugging messages users have to enable them | ||
12 | first via /sys/kernel/debug/dynamic_debug/control, which is very impractical. | ||
13 | |||
14 | This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just | ||
15 | as it was before the breakage. | ||
16 | |||
17 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | fs/ubifs/debug.h | 5 ++++- | ||
21 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h | ||
24 | index 8d9c468..3f65829 100644 | ||
25 | --- a/fs/ubifs/debug.h | ||
26 | +++ b/fs/ubifs/debug.h | ||
27 | @@ -190,7 +190,10 @@ extern spinlock_t dbg_lock; | ||
28 | } while (0) | ||
29 | |||
30 | /* Just a debugging messages not related to any specific UBIFS subsystem */ | ||
31 | -#define dbg_msg(fmt, ...) ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__) | ||
32 | +#define dbg_msg(fmt, ...) \ | ||
33 | + printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid, \ | ||
34 | + __func__, ##__VA_ARGS__) | ||
35 | + | ||
36 | /* General messages */ | ||
37 | #define dbg_gen(fmt, ...) ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__) | ||
38 | /* Additional journal messages */ | ||
39 | -- | ||
40 | 1.7.9.5 | ||
41 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch deleted file mode 100644 index 8ad2285d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0056-UBIFS-make-debugging-messages-light-again.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | From 400fba6cfdfd168d550113f665c3b168cf9214cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
3 | Date: Wed, 11 Jan 2012 15:13:27 +0200 | ||
4 | Subject: [PATCH 056/129] UBIFS: make debugging messages light again | ||
5 | |||
6 | commit 1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52 upstream. | ||
7 | |||
8 | We switch to dynamic debugging in commit | ||
9 | 56e46742e846e4de167dde0e1e1071ace1c882a5 but did not take into account that | ||
10 | now we do not control anymore whether a specific message is enabled or not. | ||
11 | So now we lock the "dbg_lock" and release it in every debugging macro, which | ||
12 | make them not so light-weight. | ||
13 | |||
14 | This commit removes the "dbg_lock" protection from the debugging macros to | ||
15 | fix the issue. | ||
16 | |||
17 | The downside is that now our DBGKEY() stuff is broken, but this is not | ||
18 | critical at all and will be fixed later. | ||
19 | |||
20 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
22 | --- | ||
23 | fs/ubifs/debug.h | 12 +++++------- | ||
24 | 1 file changed, 5 insertions(+), 7 deletions(-) | ||
25 | |||
26 | diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h | ||
27 | index 3f65829..c9d2941 100644 | ||
28 | --- a/fs/ubifs/debug.h | ||
29 | +++ b/fs/ubifs/debug.h | ||
30 | @@ -175,19 +175,17 @@ const char *dbg_key_str1(const struct ubifs_info *c, | ||
31 | const union ubifs_key *key); | ||
32 | |||
33 | /* | ||
34 | - * DBGKEY macros require @dbg_lock to be held, which it is in the dbg message | ||
35 | - * macros. | ||
36 | + * TODO: these macros are now broken because there is no locking around them | ||
37 | + * and we use a global buffer for the key string. This means that in case of | ||
38 | + * concurrent execution we will end up with incorrect and messy key strings. | ||
39 | */ | ||
40 | #define DBGKEY(key) dbg_key_str0(c, (key)) | ||
41 | #define DBGKEY1(key) dbg_key_str1(c, (key)) | ||
42 | |||
43 | extern spinlock_t dbg_lock; | ||
44 | |||
45 | -#define ubifs_dbg_msg(type, fmt, ...) do { \ | ||
46 | - spin_lock(&dbg_lock); \ | ||
47 | - pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__); \ | ||
48 | - spin_unlock(&dbg_lock); \ | ||
49 | -} while (0) | ||
50 | +#define ubifs_dbg_msg(type, fmt, ...) \ | ||
51 | + pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__) | ||
52 | |||
53 | /* Just a debugging messages not related to any specific UBIFS subsystem */ | ||
54 | #define dbg_msg(fmt, ...) \ | ||
55 | -- | ||
56 | 1.7.9.5 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch deleted file mode 100644 index 528fc93d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0057-i2c-Fix-error-value-returned-by-several-bus-drivers.patch +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | From c9f51b32db94ab1e2dc628cc379f7cc7013801f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jean Delvare <khali@linux-fr.org> | ||
3 | Date: Thu, 12 Jan 2012 20:32:03 +0100 | ||
4 | Subject: [PATCH 057/129] i2c: Fix error value returned by several bus drivers | ||
5 | |||
6 | commit 7c1f59c9d5caf3a84f35549b5d58f3c055a68da5 upstream. | ||
7 | |||
8 | When adding checks for ACPI resource conflicts to many bus drivers, | ||
9 | not enough attention was paid to the error paths, and for several | ||
10 | drivers this causes 0 to be returned on error in some cases. Fix this | ||
11 | by properly returning a non-zero value on every error. | ||
12 | |||
13 | Signed-off-by: Jean Delvare <khali@linux-fr.org> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | drivers/i2c/busses/i2c-ali1535.c | 11 +++++++---- | ||
17 | drivers/i2c/busses/i2c-nforce2.c | 2 +- | ||
18 | drivers/i2c/busses/i2c-sis5595.c | 4 ++-- | ||
19 | drivers/i2c/busses/i2c-sis630.c | 6 +++++- | ||
20 | drivers/i2c/busses/i2c-viapro.c | 7 +++++-- | ||
21 | 5 files changed, 20 insertions(+), 10 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c | ||
24 | index b6807db..5b667e5 100644 | ||
25 | --- a/drivers/i2c/busses/i2c-ali1535.c | ||
26 | +++ b/drivers/i2c/busses/i2c-ali1535.c | ||
27 | @@ -140,7 +140,7 @@ static unsigned short ali1535_smba; | ||
28 | defined to make the transition easier. */ | ||
29 | static int __devinit ali1535_setup(struct pci_dev *dev) | ||
30 | { | ||
31 | - int retval = -ENODEV; | ||
32 | + int retval; | ||
33 | unsigned char temp; | ||
34 | |||
35 | /* Check the following things: | ||
36 | @@ -155,6 +155,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | ||
37 | if (ali1535_smba == 0) { | ||
38 | dev_warn(&dev->dev, | ||
39 | "ALI1535_smb region uninitialized - upgrade BIOS?\n"); | ||
40 | + retval = -ENODEV; | ||
41 | goto exit; | ||
42 | } | ||
43 | |||
44 | @@ -167,6 +168,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | ||
45 | ali1535_driver.name)) { | ||
46 | dev_err(&dev->dev, "ALI1535_smb region 0x%x already in use!\n", | ||
47 | ali1535_smba); | ||
48 | + retval = -EBUSY; | ||
49 | goto exit; | ||
50 | } | ||
51 | |||
52 | @@ -174,6 +176,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | ||
53 | pci_read_config_byte(dev, SMBCFG, &temp); | ||
54 | if ((temp & ALI1535_SMBIO_EN) == 0) { | ||
55 | dev_err(&dev->dev, "SMB device not enabled - upgrade BIOS?\n"); | ||
56 | + retval = -ENODEV; | ||
57 | goto exit_free; | ||
58 | } | ||
59 | |||
60 | @@ -181,6 +184,7 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | ||
61 | pci_read_config_byte(dev, SMBHSTCFG, &temp); | ||
62 | if ((temp & 1) == 0) { | ||
63 | dev_err(&dev->dev, "SMBus controller not enabled - upgrade BIOS?\n"); | ||
64 | + retval = -ENODEV; | ||
65 | goto exit_free; | ||
66 | } | ||
67 | |||
68 | @@ -198,12 +202,11 @@ static int __devinit ali1535_setup(struct pci_dev *dev) | ||
69 | dev_dbg(&dev->dev, "SMBREV = 0x%X\n", temp); | ||
70 | dev_dbg(&dev->dev, "ALI1535_smba = 0x%X\n", ali1535_smba); | ||
71 | |||
72 | - retval = 0; | ||
73 | -exit: | ||
74 | - return retval; | ||
75 | + return 0; | ||
76 | |||
77 | exit_free: | ||
78 | release_region(ali1535_smba, ALI1535_SMB_IOSIZE); | ||
79 | +exit: | ||
80 | return retval; | ||
81 | } | ||
82 | |||
83 | diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c | ||
84 | index ff1e127..4853b52 100644 | ||
85 | --- a/drivers/i2c/busses/i2c-nforce2.c | ||
86 | +++ b/drivers/i2c/busses/i2c-nforce2.c | ||
87 | @@ -356,7 +356,7 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar, | ||
88 | error = acpi_check_region(smbus->base, smbus->size, | ||
89 | nforce2_driver.name); | ||
90 | if (error) | ||
91 | - return -1; | ||
92 | + return error; | ||
93 | |||
94 | if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { | ||
95 | dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", | ||
96 | diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c | ||
97 | index 4375866..6d60284 100644 | ||
98 | --- a/drivers/i2c/busses/i2c-sis5595.c | ||
99 | +++ b/drivers/i2c/busses/i2c-sis5595.c | ||
100 | @@ -147,7 +147,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev) | ||
101 | u16 a; | ||
102 | u8 val; | ||
103 | int *i; | ||
104 | - int retval = -ENODEV; | ||
105 | + int retval; | ||
106 | |||
107 | /* Look for imposters */ | ||
108 | for (i = blacklist; *i != 0; i++) { | ||
109 | @@ -223,7 +223,7 @@ static int __devinit sis5595_setup(struct pci_dev *SIS5595_dev) | ||
110 | |||
111 | error: | ||
112 | release_region(sis5595_base + SMB_INDEX, 2); | ||
113 | - return retval; | ||
114 | + return -ENODEV; | ||
115 | } | ||
116 | |||
117 | static int sis5595_transaction(struct i2c_adapter *adap) | ||
118 | diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c | ||
119 | index e6f539e..b617fd0 100644 | ||
120 | --- a/drivers/i2c/busses/i2c-sis630.c | ||
121 | +++ b/drivers/i2c/busses/i2c-sis630.c | ||
122 | @@ -393,7 +393,7 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev) | ||
123 | { | ||
124 | unsigned char b; | ||
125 | struct pci_dev *dummy = NULL; | ||
126 | - int retval = -ENODEV, i; | ||
127 | + int retval, i; | ||
128 | |||
129 | /* check for supported SiS devices */ | ||
130 | for (i=0; supported[i] > 0 ; i++) { | ||
131 | @@ -418,18 +418,21 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev) | ||
132 | */ | ||
133 | if (pci_read_config_byte(sis630_dev, SIS630_BIOS_CTL_REG,&b)) { | ||
134 | dev_err(&sis630_dev->dev, "Error: Can't read bios ctl reg\n"); | ||
135 | + retval = -ENODEV; | ||
136 | goto exit; | ||
137 | } | ||
138 | /* if ACPI already enabled , do nothing */ | ||
139 | if (!(b & 0x80) && | ||
140 | pci_write_config_byte(sis630_dev, SIS630_BIOS_CTL_REG, b | 0x80)) { | ||
141 | dev_err(&sis630_dev->dev, "Error: Can't enable ACPI\n"); | ||
142 | + retval = -ENODEV; | ||
143 | goto exit; | ||
144 | } | ||
145 | |||
146 | /* Determine the ACPI base address */ | ||
147 | if (pci_read_config_word(sis630_dev,SIS630_ACPI_BASE_REG,&acpi_base)) { | ||
148 | dev_err(&sis630_dev->dev, "Error: Can't determine ACPI base address\n"); | ||
149 | + retval = -ENODEV; | ||
150 | goto exit; | ||
151 | } | ||
152 | |||
153 | @@ -445,6 +448,7 @@ static int __devinit sis630_setup(struct pci_dev *sis630_dev) | ||
154 | sis630_driver.name)) { | ||
155 | dev_err(&sis630_dev->dev, "SMBus registers 0x%04x-0x%04x already " | ||
156 | "in use!\n", acpi_base + SMB_STS, acpi_base + SMB_SAA); | ||
157 | + retval = -EBUSY; | ||
158 | goto exit; | ||
159 | } | ||
160 | |||
161 | diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c | ||
162 | index 0b012f1..58261d4 100644 | ||
163 | --- a/drivers/i2c/busses/i2c-viapro.c | ||
164 | +++ b/drivers/i2c/busses/i2c-viapro.c | ||
165 | @@ -324,7 +324,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev, | ||
166 | const struct pci_device_id *id) | ||
167 | { | ||
168 | unsigned char temp; | ||
169 | - int error = -ENODEV; | ||
170 | + int error; | ||
171 | |||
172 | /* Determine the address of the SMBus areas */ | ||
173 | if (force_addr) { | ||
174 | @@ -390,6 +390,7 @@ found: | ||
175 | dev_err(&pdev->dev, "SMBUS: Error: Host SMBus " | ||
176 | "controller not enabled! - upgrade BIOS or " | ||
177 | "use force=1\n"); | ||
178 | + error = -ENODEV; | ||
179 | goto release_region; | ||
180 | } | ||
181 | } | ||
182 | @@ -422,9 +423,11 @@ found: | ||
183 | "SMBus Via Pro adapter at %04x", vt596_smba); | ||
184 | |||
185 | vt596_pdev = pci_dev_get(pdev); | ||
186 | - if (i2c_add_adapter(&vt596_adapter)) { | ||
187 | + error = i2c_add_adapter(&vt596_adapter); | ||
188 | + if (error) { | ||
189 | pci_dev_put(vt596_pdev); | ||
190 | vt596_pdev = NULL; | ||
191 | + goto release_region; | ||
192 | } | ||
193 | |||
194 | /* Always return failure here. This is to allow other drivers to bind | ||
195 | -- | ||
196 | 1.7.9.5 | ||
197 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch deleted file mode 100644 index db3a0d05..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0058-mmc-core-Fix-voltage-select-in-DDR-mode.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 4272b6efe99cd197257777ddeaff1b2bf5428a13 Mon Sep 17 00:00:00 2001 | ||
2 | From: Girish K S <girish.shivananjappa@linaro.org> | ||
3 | Date: Thu, 15 Dec 2011 17:27:42 +0530 | ||
4 | Subject: [PATCH 058/129] mmc: core: Fix voltage select in DDR mode | ||
5 | |||
6 | commit 913047e9e5787a90696533a9f109552b7694ecc9 upstream. | ||
7 | |||
8 | This patch fixes the wrong comparison before setting the interface | ||
9 | voltage in DDR mode. | ||
10 | |||
11 | The assignment to the variable ddr before comaprison is either | ||
12 | ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison | ||
13 | is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V. | ||
14 | |||
15 | Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> | ||
16 | Acked-by: Subhash Jadavani <subhashj@codeaurora.org> | ||
17 | Acked-by: Philip Rakity <prakity@marvell.com> | ||
18 | Signed-off-by: Chris Ball <cjb@laptop.org> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | drivers/mmc/core/mmc.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c | ||
25 | index d240427..fb7c27f 100644 | ||
26 | --- a/drivers/mmc/core/mmc.c | ||
27 | +++ b/drivers/mmc/core/mmc.c | ||
28 | @@ -1048,7 +1048,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | ||
29 | * | ||
30 | * WARNING: eMMC rules are NOT the same as SD DDR | ||
31 | */ | ||
32 | - if (ddr == EXT_CSD_CARD_TYPE_DDR_1_2V) { | ||
33 | + if (ddr == MMC_1_2V_DDR_MODE) { | ||
34 | err = mmc_set_signal_voltage(host, | ||
35 | MMC_SIGNAL_VOLTAGE_120, 0); | ||
36 | if (err) | ||
37 | -- | ||
38 | 1.7.9.5 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch deleted file mode 100644 index 2d011333..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0059-mmc-sdhci-Fix-tuning-timer-incorrect-setting-when-su.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 5fda16f987c13e470fd4a4ae87dd3ed6b4f5be46 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Lu <aaron.lu@amd.com> | ||
3 | Date: Wed, 28 Dec 2011 11:11:12 +0800 | ||
4 | Subject: [PATCH 059/129] mmc: sdhci: Fix tuning timer incorrect setting when | ||
5 | suspending host | ||
6 | |||
7 | commit c6ced0db08010ed75df221a2946c5228454b38d5 upstream. | ||
8 | |||
9 | When suspending host, the tuning timer shoule be deactivated. | ||
10 | And the HOST_NEEDS_TUNING flag should be set after tuning timer is | ||
11 | deactivated. | ||
12 | |||
13 | Signed-off-by: Philip Rakity <prakity@marvell.com> | ||
14 | Signed-off-by: Aaron Lu <aaron.lu@amd.com> | ||
15 | Acked-by: Adrian Hunter <adrian.hunter@intel.com> | ||
16 | Signed-off-by: Chris Ball <cjb@laptop.org> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | drivers/mmc/host/sdhci.c | 3 +-- | ||
20 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c | ||
23 | index 19ed580..9279c1b 100644 | ||
24 | --- a/drivers/mmc/host/sdhci.c | ||
25 | +++ b/drivers/mmc/host/sdhci.c | ||
26 | @@ -2336,9 +2336,8 @@ int sdhci_suspend_host(struct sdhci_host *host) | ||
27 | /* Disable tuning since we are suspending */ | ||
28 | if (host->version >= SDHCI_SPEC_300 && host->tuning_count && | ||
29 | host->tuning_mode == SDHCI_TUNING_MODE_1) { | ||
30 | + del_timer_sync(&host->tuning_timer); | ||
31 | host->flags &= ~SDHCI_NEEDS_RETUNING; | ||
32 | - mod_timer(&host->tuning_timer, jiffies + | ||
33 | - host->tuning_count * HZ); | ||
34 | } | ||
35 | |||
36 | ret = mmc_suspend_host(host->mmc); | ||
37 | -- | ||
38 | 1.7.9.5 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch deleted file mode 100644 index 0760c625..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0060-mmc-sd-Fix-SDR12-timing-regression.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 54914e0a2c7c46dd863ba4ca2f530591c8cea37f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Elbs <alex@segv.de> | ||
3 | Date: Tue, 3 Jan 2012 23:26:53 -0500 | ||
4 | Subject: [PATCH 060/129] mmc: sd: Fix SDR12 timing regression | ||
5 | |||
6 | commit dd8df17fe83483d7ea06ff229895e35a42071599 upstream. | ||
7 | |||
8 | This patch fixes a failure to recognize SD cards reported on a Dell | ||
9 | Vostro with O2 Micro SD card reader. Patch 49c468f ("mmc: sd: add | ||
10 | support for uhs bus speed mode selection") caused the problem, by | ||
11 | setting the SDHCI_CTRL_HISPD flag even for legacy timings. | ||
12 | |||
13 | Signed-off-by: Alexander Elbs <alex@segv.de> | ||
14 | Acked-by: Philip Rakity <prakity@marvell.com> | ||
15 | Acked-by: Arindam Nath <arindam.nath@amd.com> | ||
16 | Signed-off-by: Chris Ball <cjb@laptop.org> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | drivers/mmc/host/sdhci.c | 3 +-- | ||
20 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c | ||
23 | index 9279c1b..6ce32a7 100644 | ||
24 | --- a/drivers/mmc/host/sdhci.c | ||
25 | +++ b/drivers/mmc/host/sdhci.c | ||
26 | @@ -1364,8 +1364,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) | ||
27 | if ((ios->timing == MMC_TIMING_UHS_SDR50) || | ||
28 | (ios->timing == MMC_TIMING_UHS_SDR104) || | ||
29 | (ios->timing == MMC_TIMING_UHS_DDR50) || | ||
30 | - (ios->timing == MMC_TIMING_UHS_SDR25) || | ||
31 | - (ios->timing == MMC_TIMING_UHS_SDR12)) | ||
32 | + (ios->timing == MMC_TIMING_UHS_SDR25)) | ||
33 | ctrl |= SDHCI_CTRL_HISPD; | ||
34 | |||
35 | ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); | ||
36 | -- | ||
37 | 1.7.9.5 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch deleted file mode 100644 index 293dd528..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0061-V4L-DVB-v4l2-ioctl-integer-overflow-in-video_usercop.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 51aa88e66716df0c5b5df5b8815cbf0b7b50ac35 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Carpenter <dan.carpenter@oracle.com> | ||
3 | Date: Thu, 5 Jan 2012 02:27:57 -0300 | ||
4 | Subject: [PATCH 061/129] V4L/DVB: v4l2-ioctl: integer overflow in | ||
5 | video_usercopy() | ||
6 | |||
7 | commit 6c06108be53ca5e94d8b0e93883d534dd9079646 upstream. | ||
8 | |||
9 | If ctrls->count is too high the multiplication could overflow and | ||
10 | array_size would be lower than expected. Mauro and Hans Verkuil | ||
11 | suggested that we cap it at 1024. That comes from the maximum | ||
12 | number of controls with lots of room for expantion. | ||
13 | |||
14 | $ grep V4L2_CID include/linux/videodev2.h | wc -l | ||
15 | 211 | ||
16 | |||
17 | Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> | ||
18 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | drivers/media/video/v4l2-ioctl.c | 4 ++++ | ||
22 | include/linux/videodev2.h | 1 + | ||
23 | 2 files changed, 5 insertions(+) | ||
24 | |||
25 | diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c | ||
26 | index e1da8fc..639abee 100644 | ||
27 | --- a/drivers/media/video/v4l2-ioctl.c | ||
28 | +++ b/drivers/media/video/v4l2-ioctl.c | ||
29 | @@ -2226,6 +2226,10 @@ static int check_array_args(unsigned int cmd, void *parg, size_t *array_size, | ||
30 | struct v4l2_ext_controls *ctrls = parg; | ||
31 | |||
32 | if (ctrls->count != 0) { | ||
33 | + if (ctrls->count > V4L2_CID_MAX_CTRLS) { | ||
34 | + ret = -EINVAL; | ||
35 | + break; | ||
36 | + } | ||
37 | *user_ptr = (void __user *)ctrls->controls; | ||
38 | *kernel_ptr = (void *)&ctrls->controls; | ||
39 | *array_size = sizeof(struct v4l2_ext_control) | ||
40 | diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h | ||
41 | index 4b752d5..45a7698 100644 | ||
42 | --- a/include/linux/videodev2.h | ||
43 | +++ b/include/linux/videodev2.h | ||
44 | @@ -1131,6 +1131,7 @@ struct v4l2_querymenu { | ||
45 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 | ||
46 | |||
47 | /* User-class control IDs defined by V4L2 */ | ||
48 | +#define V4L2_CID_MAX_CTRLS 1024 | ||
49 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) | ||
50 | #define V4L2_CID_USER_BASE V4L2_CID_BASE | ||
51 | /* IDs reserved for driver specific controls */ | ||
52 | -- | ||
53 | 1.7.9.5 | ||
54 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch deleted file mode 100644 index 1ca3eaef..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0062-Unused-iocbs-in-a-batch-should-not-be-accounted-as-a.patch +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | From 0eeb9347d25c283bdbdd1a9e4d7d4881852887d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gleb Natapov <gleb@redhat.com> | ||
3 | Date: Sun, 8 Jan 2012 17:07:28 +0200 | ||
4 | Subject: [PATCH 062/129] Unused iocbs in a batch should not be accounted as | ||
5 | active. | ||
6 | |||
7 | commit 69e4747ee9727d660b88d7e1efe0f4afcb35db1b upstream. | ||
8 | |||
9 | Since commit 080d676de095 ("aio: allocate kiocbs in batches") iocbs are | ||
10 | allocated in a batch during processing of first iocbs. All iocbs in a | ||
11 | batch are automatically added to ctx->active_reqs list and accounted in | ||
12 | ctx->reqs_active. | ||
13 | |||
14 | If one (not the last one) of iocbs submitted by an user fails, further | ||
15 | iocbs are not processed, but they are still present in ctx->active_reqs | ||
16 | and accounted in ctx->reqs_active. This causes process to stuck in a D | ||
17 | state in wait_for_all_aios() on exit since ctx->reqs_active will never | ||
18 | go down to zero. Furthermore since kiocb_batch_free() frees iocb | ||
19 | without removing it from active_reqs list the list become corrupted | ||
20 | which may cause oops. | ||
21 | |||
22 | Fix this by removing iocb from ctx->active_reqs and updating | ||
23 | ctx->reqs_active in kiocb_batch_free(). | ||
24 | |||
25 | Signed-off-by: Gleb Natapov <gleb@redhat.com> | ||
26 | Reviewed-by: Jeff Moyer <jmoyer@redhat.com> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | fs/aio.c | 11 +++++++++-- | ||
31 | 1 file changed, 9 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/fs/aio.c b/fs/aio.c | ||
34 | index 78c514c..969beb0 100644 | ||
35 | --- a/fs/aio.c | ||
36 | +++ b/fs/aio.c | ||
37 | @@ -476,14 +476,21 @@ static void kiocb_batch_init(struct kiocb_batch *batch, long total) | ||
38 | batch->count = total; | ||
39 | } | ||
40 | |||
41 | -static void kiocb_batch_free(struct kiocb_batch *batch) | ||
42 | +static void kiocb_batch_free(struct kioctx *ctx, struct kiocb_batch *batch) | ||
43 | { | ||
44 | struct kiocb *req, *n; | ||
45 | |||
46 | + if (list_empty(&batch->head)) | ||
47 | + return; | ||
48 | + | ||
49 | + spin_lock_irq(&ctx->ctx_lock); | ||
50 | list_for_each_entry_safe(req, n, &batch->head, ki_batch) { | ||
51 | list_del(&req->ki_batch); | ||
52 | + list_del(&req->ki_list); | ||
53 | kmem_cache_free(kiocb_cachep, req); | ||
54 | + ctx->reqs_active--; | ||
55 | } | ||
56 | + spin_unlock_irq(&ctx->ctx_lock); | ||
57 | } | ||
58 | |||
59 | /* | ||
60 | @@ -1742,7 +1749,7 @@ long do_io_submit(aio_context_t ctx_id, long nr, | ||
61 | } | ||
62 | blk_finish_plug(&plug); | ||
63 | |||
64 | - kiocb_batch_free(&batch); | ||
65 | + kiocb_batch_free(ctx, &batch); | ||
66 | put_ioctx(ctx); | ||
67 | return i ? i : ret; | ||
68 | } | ||
69 | -- | ||
70 | 1.7.9.5 | ||
71 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch deleted file mode 100644 index 4a0cf7bd..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0063-ftrace-Fix-unregister-ftrace_ops-accounting.patch +++ /dev/null | |||
@@ -1,227 +0,0 @@ | |||
1 | From 87a8f79b24eaa28f865547dc85b9c10b97a80686 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiri Olsa <jolsa@redhat.com> | ||
3 | Date: Mon, 5 Dec 2011 18:22:48 +0100 | ||
4 | Subject: [PATCH 063/129] ftrace: Fix unregister ftrace_ops accounting | ||
5 | |||
6 | commit 30fb6aa74011dcf595f306ca2727254d708b786e upstream. | ||
7 | |||
8 | Multiple users of the function tracer can register their functions | ||
9 | with the ftrace_ops structure. The accounting within ftrace will | ||
10 | update the counter on each function record that is being traced. | ||
11 | When the ftrace_ops filtering adds or removes functions, the | ||
12 | function records will be updated accordingly if the ftrace_ops is | ||
13 | still registered. | ||
14 | |||
15 | When a ftrace_ops is removed, the counter of the function records, | ||
16 | that the ftrace_ops traces, are decremented. When they reach zero | ||
17 | the functions that they represent are modified to stop calling the | ||
18 | mcount code. | ||
19 | |||
20 | When changes are made, the code is updated via stop_machine() with | ||
21 | a command passed to the function to tell it what to do. There is an | ||
22 | ENABLE and DISABLE command that tells the called function to enable | ||
23 | or disable the functions. But the ENABLE is really a misnomer as it | ||
24 | should just update the records, as records that have been enabled | ||
25 | and now have a count of zero should be disabled. | ||
26 | |||
27 | The DISABLE command is used to disable all functions regardless of | ||
28 | their counter values. This is the big off switch and is not the | ||
29 | complement of the ENABLE command. | ||
30 | |||
31 | To make matters worse, when a ftrace_ops is unregistered and there | ||
32 | is another ftrace_ops registered, neither the DISABLE nor the | ||
33 | ENABLE command are set when calling into the stop_machine() function | ||
34 | and the records will not be updated to match their counter. A command | ||
35 | is passed to that function that will update the mcount code to call | ||
36 | the registered callback directly if it is the only one left. This | ||
37 | means that the ftrace_ops that is still registered will have its callback | ||
38 | called by all functions that have been set for it as well as the ftrace_ops | ||
39 | that was just unregistered. | ||
40 | |||
41 | Here's a way to trigger this bug. Compile the kernel with | ||
42 | CONFIG_FUNCTION_PROFILER set and with CONFIG_FUNCTION_GRAPH not set: | ||
43 | |||
44 | CONFIG_FUNCTION_PROFILER=y | ||
45 | # CONFIG_FUNCTION_GRAPH is not set | ||
46 | |||
47 | This will force the function profiler to use the function tracer instead | ||
48 | of the function graph tracer. | ||
49 | |||
50 | # cd /sys/kernel/debug/tracing | ||
51 | # echo schedule > set_ftrace_filter | ||
52 | # echo function > current_tracer | ||
53 | # cat set_ftrace_filter | ||
54 | schedule | ||
55 | # cat trace | ||
56 | # tracer: nop | ||
57 | # | ||
58 | # entries-in-buffer/entries-written: 692/68108025 #P:4 | ||
59 | # | ||
60 | # _-----=> irqs-off | ||
61 | # / _----=> need-resched | ||
62 | # | / _---=> hardirq/softirq | ||
63 | # || / _--=> preempt-depth | ||
64 | # ||| / delay | ||
65 | # TASK-PID CPU# |||| TIMESTAMP FUNCTION | ||
66 | # | | | |||| | | | ||
67 | kworker/0:2-909 [000] .... 531.235574: schedule <-worker_thread | ||
68 | <idle>-0 [001] .N.. 531.235575: schedule <-cpu_idle | ||
69 | kworker/0:2-909 [000] .... 531.235597: schedule <-worker_thread | ||
70 | sshd-2563 [001] .... 531.235647: schedule <-schedule_hrtimeout_range_clock | ||
71 | |||
72 | # echo 1 > function_profile_enabled | ||
73 | # echo 0 > function_porfile_enabled | ||
74 | # cat set_ftrace_filter | ||
75 | schedule | ||
76 | # cat trace | ||
77 | # tracer: function | ||
78 | # | ||
79 | # entries-in-buffer/entries-written: 159701/118821262 #P:4 | ||
80 | # | ||
81 | # _-----=> irqs-off | ||
82 | # / _----=> need-resched | ||
83 | # | / _---=> hardirq/softirq | ||
84 | # || / _--=> preempt-depth | ||
85 | # ||| / delay | ||
86 | # TASK-PID CPU# |||| TIMESTAMP FUNCTION | ||
87 | # | | | |||| | | | ||
88 | <idle>-0 [002] ...1 604.870655: local_touch_nmi <-cpu_idle | ||
89 | <idle>-0 [002] d..1 604.870655: enter_idle <-cpu_idle | ||
90 | <idle>-0 [002] d..1 604.870656: atomic_notifier_call_chain <-enter_idle | ||
91 | <idle>-0 [002] d..1 604.870656: __atomic_notifier_call_chain <-atomic_notifier_call_chain | ||
92 | |||
93 | The same problem could have happened with the trace_probe_ops, | ||
94 | but they are modified with the set_frace_filter file which does the | ||
95 | update at closure of the file. | ||
96 | |||
97 | The simple solution is to change ENABLE to UPDATE and call it every | ||
98 | time an ftrace_ops is unregistered. | ||
99 | |||
100 | Link: http://lkml.kernel.org/r/1323105776-26961-3-git-send-email-jolsa@redhat.com | ||
101 | |||
102 | Signed-off-by: Jiri Olsa <jolsa@redhat.com> | ||
103 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
104 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
105 | --- | ||
106 | kernel/trace/ftrace.c | 27 +++++++++++++-------------- | ||
107 | 1 file changed, 13 insertions(+), 14 deletions(-) | ||
108 | |||
109 | diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c | ||
110 | index b1e8943..25b4f4d 100644 | ||
111 | --- a/kernel/trace/ftrace.c | ||
112 | +++ b/kernel/trace/ftrace.c | ||
113 | @@ -948,7 +948,7 @@ struct ftrace_func_probe { | ||
114 | }; | ||
115 | |||
116 | enum { | ||
117 | - FTRACE_ENABLE_CALLS = (1 << 0), | ||
118 | + FTRACE_UPDATE_CALLS = (1 << 0), | ||
119 | FTRACE_DISABLE_CALLS = (1 << 1), | ||
120 | FTRACE_UPDATE_TRACE_FUNC = (1 << 2), | ||
121 | FTRACE_START_FUNC_RET = (1 << 3), | ||
122 | @@ -1519,7 +1519,7 @@ int ftrace_text_reserved(void *start, void *end) | ||
123 | |||
124 | |||
125 | static int | ||
126 | -__ftrace_replace_code(struct dyn_ftrace *rec, int enable) | ||
127 | +__ftrace_replace_code(struct dyn_ftrace *rec, int update) | ||
128 | { | ||
129 | unsigned long ftrace_addr; | ||
130 | unsigned long flag = 0UL; | ||
131 | @@ -1527,17 +1527,17 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | ||
132 | ftrace_addr = (unsigned long)FTRACE_ADDR; | ||
133 | |||
134 | /* | ||
135 | - * If we are enabling tracing: | ||
136 | + * If we are updating calls: | ||
137 | * | ||
138 | * If the record has a ref count, then we need to enable it | ||
139 | * because someone is using it. | ||
140 | * | ||
141 | * Otherwise we make sure its disabled. | ||
142 | * | ||
143 | - * If we are disabling tracing, then disable all records that | ||
144 | + * If we are disabling calls, then disable all records that | ||
145 | * are enabled. | ||
146 | */ | ||
147 | - if (enable && (rec->flags & ~FTRACE_FL_MASK)) | ||
148 | + if (update && (rec->flags & ~FTRACE_FL_MASK)) | ||
149 | flag = FTRACE_FL_ENABLED; | ||
150 | |||
151 | /* If the state of this record hasn't changed, then do nothing */ | ||
152 | @@ -1553,7 +1553,7 @@ __ftrace_replace_code(struct dyn_ftrace *rec, int enable) | ||
153 | return ftrace_make_nop(NULL, rec, ftrace_addr); | ||
154 | } | ||
155 | |||
156 | -static void ftrace_replace_code(int enable) | ||
157 | +static void ftrace_replace_code(int update) | ||
158 | { | ||
159 | struct dyn_ftrace *rec; | ||
160 | struct ftrace_page *pg; | ||
161 | @@ -1567,7 +1567,7 @@ static void ftrace_replace_code(int enable) | ||
162 | if (rec->flags & FTRACE_FL_FREE) | ||
163 | continue; | ||
164 | |||
165 | - failed = __ftrace_replace_code(rec, enable); | ||
166 | + failed = __ftrace_replace_code(rec, update); | ||
167 | if (failed) { | ||
168 | ftrace_bug(failed, rec->ip); | ||
169 | /* Stop processing */ | ||
170 | @@ -1623,7 +1623,7 @@ static int __ftrace_modify_code(void *data) | ||
171 | */ | ||
172 | function_trace_stop++; | ||
173 | |||
174 | - if (*command & FTRACE_ENABLE_CALLS) | ||
175 | + if (*command & FTRACE_UPDATE_CALLS) | ||
176 | ftrace_replace_code(1); | ||
177 | else if (*command & FTRACE_DISABLE_CALLS) | ||
178 | ftrace_replace_code(0); | ||
179 | @@ -1691,7 +1691,7 @@ static int ftrace_startup(struct ftrace_ops *ops, int command) | ||
180 | return -ENODEV; | ||
181 | |||
182 | ftrace_start_up++; | ||
183 | - command |= FTRACE_ENABLE_CALLS; | ||
184 | + command |= FTRACE_UPDATE_CALLS; | ||
185 | |||
186 | /* ops marked global share the filter hashes */ | ||
187 | if (ops->flags & FTRACE_OPS_FL_GLOBAL) { | ||
188 | @@ -1743,8 +1743,7 @@ static void ftrace_shutdown(struct ftrace_ops *ops, int command) | ||
189 | if (ops != &global_ops || !global_start_up) | ||
190 | ops->flags &= ~FTRACE_OPS_FL_ENABLED; | ||
191 | |||
192 | - if (!ftrace_start_up) | ||
193 | - command |= FTRACE_DISABLE_CALLS; | ||
194 | + command |= FTRACE_UPDATE_CALLS; | ||
195 | |||
196 | if (saved_ftrace_func != ftrace_trace_function) { | ||
197 | saved_ftrace_func = ftrace_trace_function; | ||
198 | @@ -1766,7 +1765,7 @@ static void ftrace_startup_sysctl(void) | ||
199 | saved_ftrace_func = NULL; | ||
200 | /* ftrace_start_up is true if we want ftrace running */ | ||
201 | if (ftrace_start_up) | ||
202 | - ftrace_run_update_code(FTRACE_ENABLE_CALLS); | ||
203 | + ftrace_run_update_code(FTRACE_UPDATE_CALLS); | ||
204 | } | ||
205 | |||
206 | static void ftrace_shutdown_sysctl(void) | ||
207 | @@ -2919,7 +2918,7 @@ ftrace_set_regex(struct ftrace_ops *ops, unsigned char *buf, int len, | ||
208 | ret = ftrace_hash_move(ops, enable, orig_hash, hash); | ||
209 | if (!ret && ops->flags & FTRACE_OPS_FL_ENABLED | ||
210 | && ftrace_enabled) | ||
211 | - ftrace_run_update_code(FTRACE_ENABLE_CALLS); | ||
212 | + ftrace_run_update_code(FTRACE_UPDATE_CALLS); | ||
213 | |||
214 | mutex_unlock(&ftrace_lock); | ||
215 | |||
216 | @@ -3107,7 +3106,7 @@ ftrace_regex_release(struct inode *inode, struct file *file) | ||
217 | orig_hash, iter->hash); | ||
218 | if (!ret && (iter->ops->flags & FTRACE_OPS_FL_ENABLED) | ||
219 | && ftrace_enabled) | ||
220 | - ftrace_run_update_code(FTRACE_ENABLE_CALLS); | ||
221 | + ftrace_run_update_code(FTRACE_UPDATE_CALLS); | ||
222 | |||
223 | mutex_unlock(&ftrace_lock); | ||
224 | } | ||
225 | -- | ||
226 | 1.7.9.5 | ||
227 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch deleted file mode 100644 index 383b3f8c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0064-kconfig-streamline-config.pl-Simplify-backslash-line.patch +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | From a3bca61c4e149d9e00102d41a0b81cae4fbca06f Mon Sep 17 00:00:00 2001 | ||
2 | From: Steven Rostedt <srostedt@redhat.com> | ||
3 | Date: Fri, 13 Jan 2012 17:50:39 -0500 | ||
4 | Subject: [PATCH 064/129] kconfig/streamline-config.pl: Simplify backslash | ||
5 | line concatination | ||
6 | |||
7 | commit d060d963e88f3e990cec2fe5214de49de9a49eca upstream. | ||
8 | |||
9 | Simplify the way lines ending with backslashes (continuation) in Makefiles | ||
10 | is parsed. This is needed to implement a necessary fix. | ||
11 | |||
12 | Tested-by: Thomas Lange <thomas-lange2@gmx.de> | ||
13 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | scripts/kconfig/streamline_config.pl | 25 ++++++++++++------------- | ||
17 | 1 file changed, 12 insertions(+), 13 deletions(-) | ||
18 | |||
19 | diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl | ||
20 | index ec7afce..42ef5ea 100644 | ||
21 | --- a/scripts/kconfig/streamline_config.pl | ||
22 | +++ b/scripts/kconfig/streamline_config.pl | ||
23 | @@ -253,17 +253,22 @@ if ($kconfig) { | ||
24 | # Read all Makefiles to map the configs to the objects | ||
25 | foreach my $makefile (@makefiles) { | ||
26 | |||
27 | - my $cont = 0; | ||
28 | + my $line = ""; | ||
29 | |||
30 | open(MIN,$makefile) || die "Can't open $makefile"; | ||
31 | while (<MIN>) { | ||
32 | - my $objs; | ||
33 | - | ||
34 | - # is this a line after a line with a backslash? | ||
35 | - if ($cont && /(\S.*)$/) { | ||
36 | - $objs = $1; | ||
37 | + # if this line ends with a backslash, continue | ||
38 | + chomp; | ||
39 | + if (/^(.*)\\$/) { | ||
40 | + $line .= $1; | ||
41 | + next; | ||
42 | } | ||
43 | - $cont = 0; | ||
44 | + | ||
45 | + $line .= $_; | ||
46 | + $_ = $line; | ||
47 | + $line = ""; | ||
48 | + | ||
49 | + my $objs; | ||
50 | |||
51 | # collect objects after obj-$(CONFIG_FOO_BAR) | ||
52 | if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { | ||
53 | @@ -271,12 +276,6 @@ foreach my $makefile (@makefiles) { | ||
54 | $objs = $2; | ||
55 | } | ||
56 | if (defined($objs)) { | ||
57 | - # test if the line ends with a backslash | ||
58 | - if ($objs =~ m,(.*)\\$,) { | ||
59 | - $objs = $1; | ||
60 | - $cont = 1; | ||
61 | - } | ||
62 | - | ||
63 | foreach my $obj (split /\s+/,$objs) { | ||
64 | $obj =~ s/-/_/g; | ||
65 | if ($obj =~ /(.*)\.o$/) { | ||
66 | -- | ||
67 | 1.7.9.5 | ||
68 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch deleted file mode 100644 index 141754e7..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0065-kconfig-streamline-config.pl-Fix-parsing-Makefile-wi.patch +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | From ac774661d11eb00497542857681b22c652d3d67c Mon Sep 17 00:00:00 2001 | ||
2 | From: Steven Rostedt <srostedt@redhat.com> | ||
3 | Date: Fri, 13 Jan 2012 17:53:40 -0500 | ||
4 | Subject: [PATCH 065/129] kconfig/streamline-config.pl: Fix parsing Makefile | ||
5 | with variables | ||
6 | |||
7 | commit 364212fddaaa60c5a64f67a0f5624ad996ecc8a0 upstream. | ||
8 | |||
9 | Thomas Lange reported that when he did a 'make localmodconfig', his | ||
10 | config was missing the brcmsmac driver, even though he had the module | ||
11 | loaded. | ||
12 | |||
13 | Looking into this, I found the file: | ||
14 | drivers/net/wireless/brcm80211/brcmsmac/Makefile | ||
15 | had the following in the Makefile: | ||
16 | |||
17 | MODULEPFX := brcmsmac | ||
18 | |||
19 | obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o | ||
20 | |||
21 | The way streamline-config.pl works, is parsing all the | ||
22 | obj-$(CONFIG_FOO) += foo.o | ||
23 | lines to find that CONFIG_FOO belongs to the module foo.ko. | ||
24 | |||
25 | But in this case, the brcmsmac.o was not used, but a variable in its place. | ||
26 | |||
27 | By changing streamline-config.pl to remember defined variables in Makefiles | ||
28 | and substituting them when they are used in the obj-X lines, allows | ||
29 | Thomas (and others) to have their brcmsmac module stay configured | ||
30 | when it is loaded and running "make localmodconfig". | ||
31 | |||
32 | Reported-by: Thomas Lange <thomas-lange2@gmx.de> | ||
33 | Tested-by: Thomas Lange <thomas-lange2@gmx.de> | ||
34 | Cc: Arend van Spriel <arend@broadcom.com> | ||
35 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
36 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
37 | --- | ||
38 | scripts/kconfig/streamline_config.pl | 29 +++++++++++++++++++++++++++++ | ||
39 | 1 file changed, 29 insertions(+) | ||
40 | |||
41 | diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl | ||
42 | index 42ef5ea..bccf07dd 100644 | ||
43 | --- a/scripts/kconfig/streamline_config.pl | ||
44 | +++ b/scripts/kconfig/streamline_config.pl | ||
45 | @@ -250,10 +250,33 @@ if ($kconfig) { | ||
46 | read_kconfig($kconfig); | ||
47 | } | ||
48 | |||
49 | +sub convert_vars { | ||
50 | + my ($line, %vars) = @_; | ||
51 | + | ||
52 | + my $process = ""; | ||
53 | + | ||
54 | + while ($line =~ s/^(.*?)(\$\((.*?)\))//) { | ||
55 | + my $start = $1; | ||
56 | + my $variable = $2; | ||
57 | + my $var = $3; | ||
58 | + | ||
59 | + if (defined($vars{$var})) { | ||
60 | + $process .= $start . $vars{$var}; | ||
61 | + } else { | ||
62 | + $process .= $start . $variable; | ||
63 | + } | ||
64 | + } | ||
65 | + | ||
66 | + $process .= $line; | ||
67 | + | ||
68 | + return $process; | ||
69 | +} | ||
70 | + | ||
71 | # Read all Makefiles to map the configs to the objects | ||
72 | foreach my $makefile (@makefiles) { | ||
73 | |||
74 | my $line = ""; | ||
75 | + my %make_vars; | ||
76 | |||
77 | open(MIN,$makefile) || die "Can't open $makefile"; | ||
78 | while (<MIN>) { | ||
79 | @@ -270,10 +293,16 @@ foreach my $makefile (@makefiles) { | ||
80 | |||
81 | my $objs; | ||
82 | |||
83 | + $_ = convert_vars($_, %make_vars); | ||
84 | + | ||
85 | # collect objects after obj-$(CONFIG_FOO_BAR) | ||
86 | if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { | ||
87 | $var = $1; | ||
88 | $objs = $2; | ||
89 | + | ||
90 | + # check if variables are set | ||
91 | + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) { | ||
92 | + $make_vars{$1} = $2; | ||
93 | } | ||
94 | if (defined($objs)) { | ||
95 | foreach my $obj (split /\s+/,$objs) { | ||
96 | -- | ||
97 | 1.7.9.5 | ||
98 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch deleted file mode 100644 index 76168fbf..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0066-svcrpc-fix-double-free-on-shutdown-of-nfsd-after-cha.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 184eee2d8b585d5e2a0ec3f2c50f682e91ef769a Mon Sep 17 00:00:00 2001 | ||
2 | From: "J. Bruce Fields" <bfields@redhat.com> | ||
3 | Date: Thu, 22 Dec 2011 18:22:49 -0700 | ||
4 | Subject: [PATCH 066/129] svcrpc: fix double-free on shutdown of nfsd after | ||
5 | changing pool mode | ||
6 | |||
7 | commit 61c8504c428edcebf23b97775a129c5b393a302b upstream. | ||
8 | |||
9 | The pool_to and to_pool fields of the global svc_pool_map are freed on | ||
10 | shutdown, but are initialized in nfsd startup only in the | ||
11 | SVC_POOL_PERCPU and SVC_POOL_PERNODE cases. | ||
12 | |||
13 | They *are* initialized to zero on kernel startup. So as long as you use | ||
14 | only SVC_POOL_GLOBAL (the default), this will never be a problem. | ||
15 | |||
16 | You're also OK if you only ever use SVC_POOL_PERCPU or SVC_POOL_PERNODE. | ||
17 | |||
18 | However, the following sequence events leads to a double-free: | ||
19 | |||
20 | 1. set SVC_POOL_PERCPU or SVC_POOL_PERNODE | ||
21 | 2. start nfsd: both fields are initialized. | ||
22 | 3. shutdown nfsd: both fields are freed. | ||
23 | 4. set SVC_POOL_GLOBAL | ||
24 | 5. start nfsd: the fields are left untouched. | ||
25 | 6. shutdown nfsd: now we try to free them again. | ||
26 | |||
27 | Step 4 is actually unnecessary, since (for some bizarre reason), nfsd | ||
28 | automatically resets the pool mode to SVC_POOL_GLOBAL on shutdown. | ||
29 | |||
30 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
32 | --- | ||
33 | net/sunrpc/svc.c | 3 +++ | ||
34 | 1 file changed, 3 insertions(+) | ||
35 | |||
36 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | ||
37 | index 6e03888..5443ffd 100644 | ||
38 | --- a/net/sunrpc/svc.c | ||
39 | +++ b/net/sunrpc/svc.c | ||
40 | @@ -167,6 +167,7 @@ svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools) | ||
41 | |||
42 | fail_free: | ||
43 | kfree(m->to_pool); | ||
44 | + m->to_pool = NULL; | ||
45 | fail: | ||
46 | return -ENOMEM; | ||
47 | } | ||
48 | @@ -287,7 +288,9 @@ svc_pool_map_put(void) | ||
49 | if (!--m->count) { | ||
50 | m->mode = SVC_POOL_DEFAULT; | ||
51 | kfree(m->to_pool); | ||
52 | + m->to_pool = NULL; | ||
53 | kfree(m->pool_to); | ||
54 | + m->pool_to = NULL; | ||
55 | m->npools = 0; | ||
56 | } | ||
57 | |||
58 | -- | ||
59 | 1.7.9.5 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch deleted file mode 100644 index 23264cae..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | From 7bbbb974406d83275664903d43b9e9bf4b99c131 Mon Sep 17 00:00:00 2001 | ||
2 | From: "J. Bruce Fields" <bfields@redhat.com> | ||
3 | Date: Tue, 29 Nov 2011 11:35:35 -0500 | ||
4 | Subject: [PATCH 067/129] svcrpc: destroy server sockets all at once | ||
5 | |||
6 | commit 2fefb8a09e7ed251ae8996e0c69066e74c5aa560 upstream. | ||
7 | |||
8 | There's no reason I can see that we need to call sv_shutdown between | ||
9 | closing the two lists of sockets. | ||
10 | |||
11 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | include/linux/sunrpc/svcsock.h | 2 +- | ||
15 | net/sunrpc/svc.c | 7 +------ | ||
16 | net/sunrpc/svc_xprt.c | 11 ++++++++++- | ||
17 | 3 files changed, 12 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h | ||
20 | index 85c50b4..c84e974 100644 | ||
21 | --- a/include/linux/sunrpc/svcsock.h | ||
22 | +++ b/include/linux/sunrpc/svcsock.h | ||
23 | @@ -34,7 +34,7 @@ struct svc_sock { | ||
24 | /* | ||
25 | * Function prototypes. | ||
26 | */ | ||
27 | -void svc_close_all(struct list_head *); | ||
28 | +void svc_close_all(struct svc_serv *); | ||
29 | int svc_recv(struct svc_rqst *, long); | ||
30 | int svc_send(struct svc_rqst *); | ||
31 | void svc_drop(struct svc_rqst *); | ||
32 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | ||
33 | index 5443ffd..7ddfb04 100644 | ||
34 | --- a/net/sunrpc/svc.c | ||
35 | +++ b/net/sunrpc/svc.c | ||
36 | @@ -531,16 +531,11 @@ svc_destroy(struct svc_serv *serv) | ||
37 | |||
38 | del_timer_sync(&serv->sv_temptimer); | ||
39 | |||
40 | - svc_close_all(&serv->sv_tempsocks); | ||
41 | + svc_close_all(serv); | ||
42 | |||
43 | if (serv->sv_shutdown) | ||
44 | serv->sv_shutdown(serv); | ||
45 | |||
46 | - svc_close_all(&serv->sv_permsocks); | ||
47 | - | ||
48 | - BUG_ON(!list_empty(&serv->sv_permsocks)); | ||
49 | - BUG_ON(!list_empty(&serv->sv_tempsocks)); | ||
50 | - | ||
51 | cache_clean_deferred(serv); | ||
52 | |||
53 | if (svc_serv_is_pooled(serv)) | ||
54 | diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c | ||
55 | index 447cd0e..dcdc8df 100644 | ||
56 | --- a/net/sunrpc/svc_xprt.c | ||
57 | +++ b/net/sunrpc/svc_xprt.c | ||
58 | @@ -928,7 +928,7 @@ void svc_close_xprt(struct svc_xprt *xprt) | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(svc_close_xprt); | ||
61 | |||
62 | -void svc_close_all(struct list_head *xprt_list) | ||
63 | +static void svc_close_list(struct list_head *xprt_list) | ||
64 | { | ||
65 | struct svc_xprt *xprt; | ||
66 | struct svc_xprt *tmp; | ||
67 | @@ -946,6 +946,15 @@ void svc_close_all(struct list_head *xprt_list) | ||
68 | } | ||
69 | } | ||
70 | |||
71 | +void svc_close_all(struct svc_serv *serv) | ||
72 | +{ | ||
73 | + svc_close_list(&serv->sv_tempsocks); | ||
74 | + svc_close_list(&serv->sv_permsocks); | ||
75 | + BUG_ON(!list_empty(&serv->sv_permsocks)); | ||
76 | + BUG_ON(!list_empty(&serv->sv_tempsocks)); | ||
77 | + | ||
78 | +} | ||
79 | + | ||
80 | /* | ||
81 | * Handle defer and revisit of requests | ||
82 | */ | ||
83 | -- | ||
84 | 1.7.9.5 | ||
85 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch deleted file mode 100644 index 494d9098..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0068-svcrpc-avoid-memory-corruption-on-pool-shutdown.patch +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | From 5faa65a4101dc292e7d43c525e87f4f2acae40e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: "J. Bruce Fields" <bfields@redhat.com> | ||
3 | Date: Tue, 29 Nov 2011 17:00:26 -0500 | ||
4 | Subject: [PATCH 068/129] svcrpc: avoid memory-corruption on pool shutdown | ||
5 | |||
6 | commit b4f36f88b3ee7cf26bf0be84e6c7fc15f84dcb71 upstream. | ||
7 | |||
8 | Socket callbacks use svc_xprt_enqueue() to add an xprt to a | ||
9 | pool->sp_sockets list. In normal operation a server thread will later | ||
10 | come along and take the xprt off that list. On shutdown, after all the | ||
11 | threads have exited, we instead manually walk the sv_tempsocks and | ||
12 | sv_permsocks lists to find all the xprt's and delete them. | ||
13 | |||
14 | So the sp_sockets lists don't really matter any more. As a result, | ||
15 | we've mostly just ignored them and hoped they would go away. | ||
16 | |||
17 | Which has gotten us into trouble; witness for example ebc63e531cc6 | ||
18 | "svcrpc: fix list-corrupting race on nfsd shutdown", the result of Ben | ||
19 | Greear noticing that a still-running svc_xprt_enqueue() could re-add an | ||
20 | xprt to an sp_sockets list just before it was deleted. The fix was to | ||
21 | remove it from the list at the end of svc_delete_xprt(). But that only | ||
22 | made corruption less likely--I can see nothing that prevents a | ||
23 | svc_xprt_enqueue() from adding another xprt to the list at the same | ||
24 | moment that we're removing this xprt from the list. In fact, despite | ||
25 | the earlier xpo_detach(), I don't even see what guarantees that | ||
26 | svc_xprt_enqueue() couldn't still be running on this xprt. | ||
27 | |||
28 | So, instead, note that svc_xprt_enqueue() essentially does: | ||
29 | lock sp_lock | ||
30 | if XPT_BUSY unset | ||
31 | add to sp_sockets | ||
32 | unlock sp_lock | ||
33 | |||
34 | So, if we do: | ||
35 | |||
36 | set XPT_BUSY on every xprt. | ||
37 | Empty every sp_sockets list, under the sp_socks locks. | ||
38 | |||
39 | Then we're left knowing that the sp_sockets lists are all empty and will | ||
40 | stay that way, since any svc_xprt_enqueue() will check XPT_BUSY under | ||
41 | the sp_lock and see it set. | ||
42 | |||
43 | And *then* we can continue deleting the xprt's. | ||
44 | |||
45 | (Thanks to Jeff Layton for being correctly suspicious of this code....) | ||
46 | |||
47 | Cc: Ben Greear <greearb@candelatech.com> | ||
48 | Cc: Jeff Layton <jlayton@redhat.com> | ||
49 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
50 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
51 | --- | ||
52 | net/sunrpc/svc.c | 10 +++++++++- | ||
53 | net/sunrpc/svc_xprt.c | 48 +++++++++++++++++++++++++++++------------------- | ||
54 | 2 files changed, 38 insertions(+), 20 deletions(-) | ||
55 | |||
56 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | ||
57 | index 7ddfb04..d4ad50e 100644 | ||
58 | --- a/net/sunrpc/svc.c | ||
59 | +++ b/net/sunrpc/svc.c | ||
60 | @@ -530,7 +530,15 @@ svc_destroy(struct svc_serv *serv) | ||
61 | printk("svc_destroy: no threads for serv=%p!\n", serv); | ||
62 | |||
63 | del_timer_sync(&serv->sv_temptimer); | ||
64 | - | ||
65 | + /* | ||
66 | + * The set of xprts (contained in the sv_tempsocks and | ||
67 | + * sv_permsocks lists) is now constant, since it is modified | ||
68 | + * only by accepting new sockets (done by service threads in | ||
69 | + * svc_recv) or aging old ones (done by sv_temptimer), or | ||
70 | + * configuration changes (excluded by whatever locking the | ||
71 | + * caller is using--nfsd_mutex in the case of nfsd). So it's | ||
72 | + * safe to traverse those lists and shut everything down: | ||
73 | + */ | ||
74 | svc_close_all(serv); | ||
75 | |||
76 | if (serv->sv_shutdown) | ||
77 | diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c | ||
78 | index dcdc8df..9ed2cd0 100644 | ||
79 | --- a/net/sunrpc/svc_xprt.c | ||
80 | +++ b/net/sunrpc/svc_xprt.c | ||
81 | @@ -893,14 +893,7 @@ void svc_delete_xprt(struct svc_xprt *xprt) | ||
82 | spin_lock_bh(&serv->sv_lock); | ||
83 | if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags)) | ||
84 | list_del_init(&xprt->xpt_list); | ||
85 | - /* | ||
86 | - * The only time we're called while xpt_ready is still on a list | ||
87 | - * is while the list itself is about to be destroyed (in | ||
88 | - * svc_destroy). BUT svc_xprt_enqueue could still be attempting | ||
89 | - * to add new entries to the sp_sockets list, so we can't leave | ||
90 | - * a freed xprt on it. | ||
91 | - */ | ||
92 | - list_del_init(&xprt->xpt_ready); | ||
93 | + BUG_ON(!list_empty(&xprt->xpt_ready)); | ||
94 | if (test_bit(XPT_TEMP, &xprt->xpt_flags)) | ||
95 | serv->sv_tmpcnt--; | ||
96 | spin_unlock_bh(&serv->sv_lock); | ||
97 | @@ -931,28 +924,45 @@ EXPORT_SYMBOL_GPL(svc_close_xprt); | ||
98 | static void svc_close_list(struct list_head *xprt_list) | ||
99 | { | ||
100 | struct svc_xprt *xprt; | ||
101 | - struct svc_xprt *tmp; | ||
102 | |||
103 | - /* | ||
104 | - * The server is shutting down, and no more threads are running. | ||
105 | - * svc_xprt_enqueue() might still be running, but at worst it | ||
106 | - * will re-add the xprt to sp_sockets, which will soon get | ||
107 | - * freed. So we don't bother with any more locking, and don't | ||
108 | - * leave the close to the (nonexistent) server threads: | ||
109 | - */ | ||
110 | - list_for_each_entry_safe(xprt, tmp, xprt_list, xpt_list) { | ||
111 | + list_for_each_entry(xprt, xprt_list, xpt_list) { | ||
112 | set_bit(XPT_CLOSE, &xprt->xpt_flags); | ||
113 | - svc_delete_xprt(xprt); | ||
114 | + set_bit(XPT_BUSY, &xprt->xpt_flags); | ||
115 | } | ||
116 | } | ||
117 | |||
118 | void svc_close_all(struct svc_serv *serv) | ||
119 | { | ||
120 | + struct svc_pool *pool; | ||
121 | + struct svc_xprt *xprt; | ||
122 | + struct svc_xprt *tmp; | ||
123 | + int i; | ||
124 | + | ||
125 | svc_close_list(&serv->sv_tempsocks); | ||
126 | svc_close_list(&serv->sv_permsocks); | ||
127 | + | ||
128 | + for (i = 0; i < serv->sv_nrpools; i++) { | ||
129 | + pool = &serv->sv_pools[i]; | ||
130 | + | ||
131 | + spin_lock_bh(&pool->sp_lock); | ||
132 | + while (!list_empty(&pool->sp_sockets)) { | ||
133 | + xprt = list_first_entry(&pool->sp_sockets, struct svc_xprt, xpt_ready); | ||
134 | + list_del_init(&xprt->xpt_ready); | ||
135 | + } | ||
136 | + spin_unlock_bh(&pool->sp_lock); | ||
137 | + } | ||
138 | + /* | ||
139 | + * At this point the sp_sockets lists will stay empty, since | ||
140 | + * svc_enqueue will not add new entries without taking the | ||
141 | + * sp_lock and checking XPT_BUSY. | ||
142 | + */ | ||
143 | + list_for_each_entry_safe(xprt, tmp, &serv->sv_tempsocks, xpt_list) | ||
144 | + svc_delete_xprt(xprt); | ||
145 | + list_for_each_entry_safe(xprt, tmp, &serv->sv_permsocks, xpt_list) | ||
146 | + svc_delete_xprt(xprt); | ||
147 | + | ||
148 | BUG_ON(!list_empty(&serv->sv_permsocks)); | ||
149 | BUG_ON(!list_empty(&serv->sv_tempsocks)); | ||
150 | - | ||
151 | } | ||
152 | |||
153 | /* | ||
154 | -- | ||
155 | 1.7.9.5 | ||
156 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch deleted file mode 100644 index 06f300bf..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0069-nfsd4-fix-lockowner-matching.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 041400912607efd62cf9aa6ad4e5ad6baf957f1a Mon Sep 17 00:00:00 2001 | ||
2 | From: "J. Bruce Fields" <bfields@redhat.com> | ||
3 | Date: Mon, 7 Nov 2011 16:37:57 -0500 | ||
4 | Subject: [PATCH 069/129] nfsd4: fix lockowner matching | ||
5 | |||
6 | commit b93d87c19821ba7d3ee11557403d782e541071ad upstream. | ||
7 | |||
8 | Lockowners are looked up by file as well as by owner, but we were | ||
9 | forgetting to do a comparison on the file. This could cause an | ||
10 | incorrect result from lockt. | ||
11 | |||
12 | (Note looking up the inode from the lockowner is pretty awkward here. | ||
13 | The data structures need fixing.) | ||
14 | |||
15 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | fs/nfsd/nfs4state.c | 17 +++++++++++++++-- | ||
19 | 1 file changed, 15 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c | ||
22 | index 47e94e3..5abced7 100644 | ||
23 | --- a/fs/nfsd/nfs4state.c | ||
24 | +++ b/fs/nfsd/nfs4state.c | ||
25 | @@ -3809,16 +3809,29 @@ nevermind: | ||
26 | deny->ld_type = NFS4_WRITE_LT; | ||
27 | } | ||
28 | |||
29 | +static bool same_lockowner_ino(struct nfs4_lockowner *lo, struct inode *inode, clientid_t *clid, struct xdr_netobj *owner) | ||
30 | +{ | ||
31 | + struct nfs4_ol_stateid *lst; | ||
32 | + | ||
33 | + if (!same_owner_str(&lo->lo_owner, owner, clid)) | ||
34 | + return false; | ||
35 | + lst = list_first_entry(&lo->lo_owner.so_stateids, | ||
36 | + struct nfs4_ol_stateid, st_perstateowner); | ||
37 | + return lst->st_file->fi_inode == inode; | ||
38 | +} | ||
39 | + | ||
40 | static struct nfs4_lockowner * | ||
41 | find_lockowner_str(struct inode *inode, clientid_t *clid, | ||
42 | struct xdr_netobj *owner) | ||
43 | { | ||
44 | unsigned int hashval = lock_ownerstr_hashval(inode, clid->cl_id, owner); | ||
45 | + struct nfs4_lockowner *lo; | ||
46 | struct nfs4_stateowner *op; | ||
47 | |||
48 | list_for_each_entry(op, &lock_ownerstr_hashtbl[hashval], so_strhash) { | ||
49 | - if (same_owner_str(op, owner, clid)) | ||
50 | - return lockowner(op); | ||
51 | + lo = lockowner(op); | ||
52 | + if (same_lockowner_ino(lo, inode, clid, owner)) | ||
53 | + return lo; | ||
54 | } | ||
55 | return NULL; | ||
56 | } | ||
57 | -- | ||
58 | 1.7.9.5 | ||
59 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch deleted file mode 100644 index 42f3853f..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0070-nfsd-Fix-oops-when-parsing-a-0-length-export.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | From 57a7686869f3ca7dfb8694583c88b5dfd510e4f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sasha Levin <levinsasha928@gmail.com> | ||
3 | Date: Fri, 18 Nov 2011 12:14:49 +0200 | ||
4 | Subject: [PATCH 070/129] nfsd: Fix oops when parsing a 0 length export | ||
5 | |||
6 | commit b2ea70afade7080360ac55c4e64ff7a5fafdb67b upstream. | ||
7 | |||
8 | expkey_parse() oopses when handling a 0 length export. This is easily | ||
9 | triggerable from usermode by writing 0 bytes into | ||
10 | '/proc/[proc id]/net/rpc/nfsd.fh/channel'. | ||
11 | |||
12 | Below is the log: | ||
13 | |||
14 | [ 1402.286893] BUG: unable to handle kernel paging request at ffff880077c49fff | ||
15 | [ 1402.287632] IP: [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1 | ||
16 | [ 1402.287632] PGD 2206063 PUD 1fdfd067 PMD 1ffbc067 PTE 8000000077c49160 | ||
17 | [ 1402.287632] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC | ||
18 | [ 1402.287632] CPU 1 | ||
19 | [ 1402.287632] Pid: 20198, comm: trinity Not tainted 3.2.0-rc2-sasha-00058-gc65cd37 #6 | ||
20 | [ 1402.287632] RIP: 0010:[<ffffffff812b4b99>] [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1 | ||
21 | [ 1402.287632] RSP: 0018:ffff880077f0fd68 EFLAGS: 00010292 | ||
22 | [ 1402.287632] RAX: ffff880077c49fff RBX: 00000000ffffffea RCX: 0000000001043400 | ||
23 | [ 1402.287632] RDX: 0000000000000000 RSI: ffff880077c4a000 RDI: ffffffff82283de0 | ||
24 | [ 1402.287632] RBP: ffff880077f0fe18 R08: 0000000000000001 R09: ffff880000000000 | ||
25 | [ 1402.287632] R10: 0000000000000000 R11: 0000000000000001 R12: ffff880077c4a000 | ||
26 | [ 1402.287632] R13: ffffffff82283de0 R14: 0000000001043400 R15: ffffffff82283de0 | ||
27 | [ 1402.287632] FS: 00007f25fec3f700(0000) GS:ffff88007d400000(0000) knlGS:0000000000000000 | ||
28 | [ 1402.287632] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b | ||
29 | [ 1402.287632] CR2: ffff880077c49fff CR3: 0000000077e1d000 CR4: 00000000000406e0 | ||
30 | [ 1402.287632] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 | ||
31 | [ 1402.287632] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 | ||
32 | [ 1402.287632] Process trinity (pid: 20198, threadinfo ffff880077f0e000, task ffff880077db17b0) | ||
33 | [ 1402.287632] Stack: | ||
34 | [ 1402.287632] ffff880077db17b0 ffff880077c4a000 ffff880077f0fdb8 ffffffff810b411e | ||
35 | [ 1402.287632] ffff880000000000 ffff880077db17b0 ffff880077c4a000 ffffffff82283de0 | ||
36 | [ 1402.287632] 0000000001043400 ffffffff82283de0 ffff880077f0fde8 ffffffff81111f63 | ||
37 | [ 1402.287632] Call Trace: | ||
38 | [ 1402.287632] [<ffffffff810b411e>] ? lock_release+0x1af/0x1bc | ||
39 | [ 1402.287632] [<ffffffff81111f63>] ? might_fault+0x97/0x9e | ||
40 | [ 1402.287632] [<ffffffff81111f1a>] ? might_fault+0x4e/0x9e | ||
41 | [ 1402.287632] [<ffffffff81a8bcf2>] cache_do_downcall+0x3e/0x4f | ||
42 | [ 1402.287632] [<ffffffff81a8c950>] cache_write.clone.16+0xbb/0x130 | ||
43 | [ 1402.287632] [<ffffffff81a8c9df>] ? cache_write_pipefs+0x1a/0x1a | ||
44 | [ 1402.287632] [<ffffffff81a8c9f8>] cache_write_procfs+0x19/0x1b | ||
45 | [ 1402.287632] [<ffffffff8118dc54>] proc_reg_write+0x8e/0xad | ||
46 | [ 1402.287632] [<ffffffff8113fe81>] vfs_write+0xaa/0xfd | ||
47 | [ 1402.287632] [<ffffffff8114142d>] ? fget_light+0x35/0x9e | ||
48 | [ 1402.287632] [<ffffffff8113ff8b>] sys_write+0x48/0x6f | ||
49 | [ 1402.287632] [<ffffffff81bbdb92>] system_call_fastpath+0x16/0x1b | ||
50 | [ 1402.287632] Code: c0 c9 c3 55 48 63 d2 48 89 e5 48 8d 44 32 ff 41 57 41 56 41 55 41 54 53 bb ea ff ff ff 48 81 ec 88 00 00 00 48 89 b5 58 ff ff ff | ||
51 | [ 1402.287632] 38 0a 0f 85 89 02 00 00 c6 00 00 48 8b 3d 44 4a e5 01 48 85 | ||
52 | [ 1402.287632] RIP [<ffffffff812b4b99>] expkey_parse+0x28/0x2e1 | ||
53 | [ 1402.287632] RSP <ffff880077f0fd68> | ||
54 | [ 1402.287632] CR2: ffff880077c49fff | ||
55 | [ 1402.287632] ---[ end trace 368ef53ff773a5e3 ]--- | ||
56 | |||
57 | Cc: "J. Bruce Fields" <bfields@fieldses.org> | ||
58 | Cc: Neil Brown <neilb@suse.de> | ||
59 | Cc: linux-nfs@vger.kernel.org | ||
60 | Signed-off-by: Sasha Levin <levinsasha928@gmail.com> | ||
61 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
62 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
63 | --- | ||
64 | fs/nfsd/export.c | 2 +- | ||
65 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
66 | |||
67 | diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c | ||
68 | index 62f3b90..5f312ab 100644 | ||
69 | --- a/fs/nfsd/export.c | ||
70 | +++ b/fs/nfsd/export.c | ||
71 | @@ -87,7 +87,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen) | ||
72 | struct svc_expkey key; | ||
73 | struct svc_expkey *ek = NULL; | ||
74 | |||
75 | - if (mesg[mlen-1] != '\n') | ||
76 | + if (mlen < 1 || mesg[mlen-1] != '\n') | ||
77 | return -EINVAL; | ||
78 | mesg[mlen-1] = 0; | ||
79 | |||
80 | -- | ||
81 | 1.7.9.5 | ||
82 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch deleted file mode 100644 index b3204672..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0071-fsnotify-don-t-BUG-in-fsnotify_destroy_mark.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 25778654573b3763a5f34e694b17ec9ff43fb3bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Miklos Szeredi <mszeredi@suse.cz> | ||
3 | Date: Thu, 12 Jan 2012 17:59:46 +0100 | ||
4 | Subject: [PATCH 071/129] fsnotify: don't BUG in fsnotify_destroy_mark() | ||
5 | |||
6 | commit fed474857efbed79cd390d0aee224231ca718f63 upstream. | ||
7 | |||
8 | Removing the parent of a watched file results in "kernel BUG at | ||
9 | fs/notify/mark.c:139". | ||
10 | |||
11 | To reproduce | ||
12 | |||
13 | add "-w /tmp/audit/dir/watched_file" to audit.rules | ||
14 | rm -rf /tmp/audit/dir | ||
15 | |||
16 | This is caused by fsnotify_destroy_mark() being called without an | ||
17 | extra reference taken by the caller. | ||
18 | |||
19 | Reported by Francesco Cosoleto here: | ||
20 | |||
21 | https://bugzilla.novell.com/show_bug.cgi?id=689860 | ||
22 | |||
23 | Fix by removing the BUG_ON and adding a comment about not accessing mark after | ||
24 | the iput. | ||
25 | |||
26 | Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | fs/notify/mark.c | 8 +++++--- | ||
31 | 1 file changed, 5 insertions(+), 3 deletions(-) | ||
32 | |||
33 | diff --git a/fs/notify/mark.c b/fs/notify/mark.c | ||
34 | index e14587d..f104d56 100644 | ||
35 | --- a/fs/notify/mark.c | ||
36 | +++ b/fs/notify/mark.c | ||
37 | @@ -135,9 +135,6 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark) | ||
38 | |||
39 | mark->flags &= ~FSNOTIFY_MARK_FLAG_ALIVE; | ||
40 | |||
41 | - /* 1 from caller and 1 for being on i_list/g_list */ | ||
42 | - BUG_ON(atomic_read(&mark->refcnt) < 2); | ||
43 | - | ||
44 | spin_lock(&group->mark_lock); | ||
45 | |||
46 | if (mark->flags & FSNOTIFY_MARK_FLAG_INODE) { | ||
47 | @@ -182,6 +179,11 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark) | ||
48 | iput(inode); | ||
49 | |||
50 | /* | ||
51 | + * We don't necessarily have a ref on mark from caller so the above iput | ||
52 | + * may have already destroyed it. Don't touch from now on. | ||
53 | + */ | ||
54 | + | ||
55 | + /* | ||
56 | * it's possible that this group tried to destroy itself, but this | ||
57 | * this mark was simultaneously being freed by inode. If that's the | ||
58 | * case, we finish freeing the group here. | ||
59 | -- | ||
60 | 1.7.9.5 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch deleted file mode 100644 index fc5632bb..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0072-x86-UV-Update-Boot-messages-for-SGI-UV2-platform.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 76df9b14b1edf95a3f1194c0b08547e50931fefd Mon Sep 17 00:00:00 2001 | ||
2 | From: Jack Steiner <steiner@sgi.com> | ||
3 | Date: Fri, 6 Jan 2012 13:19:00 -0600 | ||
4 | Subject: [PATCH 072/129] x86, UV: Update Boot messages for SGI UV2 platform | ||
5 | |||
6 | commit da517a08ac5913cd80ce3507cddd00f2a091b13c upstream. | ||
7 | |||
8 | SGI UV systems print a message during boot: | ||
9 | |||
10 | UV: Found <num> blades | ||
11 | |||
12 | Due to packaging changes, the blade count is not accurate for | ||
13 | on the next generation of the platform. This patch corrects the | ||
14 | count. | ||
15 | |||
16 | Signed-off-by: Jack Steiner <steiner@sgi.com> | ||
17 | Link: http://lkml.kernel.org/r/20120106191900.GA19772@sgi.com | ||
18 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | arch/x86/kernel/apic/x2apic_uv_x.c | 7 ++++++- | ||
22 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c | ||
25 | index 9d59bba..79b05b8 100644 | ||
26 | --- a/arch/x86/kernel/apic/x2apic_uv_x.c | ||
27 | +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | ||
28 | @@ -769,7 +769,12 @@ void __init uv_system_init(void) | ||
29 | for(i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) | ||
30 | uv_possible_blades += | ||
31 | hweight64(uv_read_local_mmr( UVH_NODE_PRESENT_TABLE + i * 8)); | ||
32 | - printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades()); | ||
33 | + | ||
34 | + /* uv_num_possible_blades() is really the hub count */ | ||
35 | + printk(KERN_INFO "UV: Found %d blades, %d hubs\n", | ||
36 | + is_uv1_hub() ? uv_num_possible_blades() : | ||
37 | + (uv_num_possible_blades() + 1) / 2, | ||
38 | + uv_num_possible_blades()); | ||
39 | |||
40 | bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); | ||
41 | uv_blade_info = kzalloc(bytes, GFP_KERNEL); | ||
42 | -- | ||
43 | 1.7.9.5 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch deleted file mode 100644 index 06552c01..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0073-recordmcount-Fix-handling-of-elf64-big-endian-object.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 4b493a169e4e0955d63015a30910a15d4d2cefed Mon Sep 17 00:00:00 2001 | ||
2 | From: David Daney <david.daney@cavium.com> | ||
3 | Date: Mon, 19 Dec 2011 17:42:42 -0800 | ||
4 | Subject: [PATCH 073/129] recordmcount: Fix handling of elf64 big-endian | ||
5 | objects. | ||
6 | |||
7 | commit 2e885057b7f75035f0b85e02f737891482815a81 upstream. | ||
8 | |||
9 | In ELF64, the sh_flags field is 64-bits wide. recordmcount was | ||
10 | erroneously treating it as a 32-bit wide field. For little endian | ||
11 | objects this works because the flags of interest (SHF_EXECINSTR) | ||
12 | reside in the lower 32 bits of the word, and you get the same result | ||
13 | with either a 32-bit or 64-bit read. Big endian objects on the | ||
14 | other hand do not work at all with this error. | ||
15 | |||
16 | The fix: Correctly treat sh_flags as 64-bits wide in elf64 objects. | ||
17 | |||
18 | The symptom I observed was that my | ||
19 | __start_mcount_loc..__stop_mcount_loc was empty even though ftrace | ||
20 | function tracing was enabled. | ||
21 | |||
22 | Link: http://lkml.kernel.org/r/1324345362-12230-1-git-send-email-ddaney.cavm@gmail.com | ||
23 | |||
24 | Signed-off-by: David Daney <david.daney@cavium.com> | ||
25 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
27 | --- | ||
28 | scripts/recordmcount.h | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/scripts/recordmcount.h b/scripts/recordmcount.h | ||
32 | index f40a6af6..54e35c1 100644 | ||
33 | --- a/scripts/recordmcount.h | ||
34 | +++ b/scripts/recordmcount.h | ||
35 | @@ -462,7 +462,7 @@ __has_rel_mcount(Elf_Shdr const *const relhdr, /* is SHT_REL or SHT_RELA */ | ||
36 | succeed_file(); | ||
37 | } | ||
38 | if (w(txthdr->sh_type) != SHT_PROGBITS || | ||
39 | - !(w(txthdr->sh_flags) & SHF_EXECINSTR)) | ||
40 | + !(_w(txthdr->sh_flags) & SHF_EXECINSTR)) | ||
41 | return NULL; | ||
42 | return txtname; | ||
43 | } | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch deleted file mode 100644 index d9a8f19b..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0074-uvcvideo-Fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From ea50d13fefca15eb7d541f1830b2361943090063 Mon Sep 17 00:00:00 2001 | ||
2 | From: Haogang Chen <haogangchen@gmail.com> | ||
3 | Date: Tue, 29 Nov 2011 18:32:25 -0300 | ||
4 | Subject: [PATCH 074/129] uvcvideo: Fix integer overflow in | ||
5 | uvc_ioctl_ctrl_map() | ||
6 | |||
7 | commit 806e23e95f94a27ee445022d724060b9b45cb64a upstream. | ||
8 | |||
9 | There is a potential integer overflow in uvc_ioctl_ctrl_map(). When a | ||
10 | large xmap->menu_count is passed from the userspace, the subsequent call | ||
11 | to kmalloc() will allocate a buffer smaller than expected. | ||
12 | map->menu_count and map->menu_info would later be used in a loop (e.g. | ||
13 | in uvc_query_v4l2_ctrl), which leads to out-of-bound access. | ||
14 | |||
15 | The patch checks the ioctl argument and returns -EINVAL for zero or too | ||
16 | large values in xmap->menu_count. | ||
17 | |||
18 | Signed-off-by: Haogang Chen <haogangchen@gmail.com> | ||
19 | [laurent.pinchart@ideasonboard.com Prevent excessive memory consumption] | ||
20 | Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
21 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | drivers/media/video/uvc/uvc_v4l2.c | 9 +++++++++ | ||
25 | drivers/media/video/uvc/uvcvideo.h | 1 + | ||
26 | 2 files changed, 10 insertions(+) | ||
27 | |||
28 | diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c | ||
29 | index dadf11f..cf7788f 100644 | ||
30 | --- a/drivers/media/video/uvc/uvc_v4l2.c | ||
31 | +++ b/drivers/media/video/uvc/uvc_v4l2.c | ||
32 | @@ -58,6 +58,15 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain, | ||
33 | break; | ||
34 | |||
35 | case V4L2_CTRL_TYPE_MENU: | ||
36 | + /* Prevent excessive memory consumption, as well as integer | ||
37 | + * overflows. | ||
38 | + */ | ||
39 | + if (xmap->menu_count == 0 || | ||
40 | + xmap->menu_count > UVC_MAX_CONTROL_MENU_ENTRIES) { | ||
41 | + ret = -EINVAL; | ||
42 | + goto done; | ||
43 | + } | ||
44 | + | ||
45 | size = xmap->menu_count * sizeof(*map->menu_info); | ||
46 | map->menu_info = kmalloc(size, GFP_KERNEL); | ||
47 | if (map->menu_info == NULL) { | ||
48 | diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h | ||
49 | index 4c1392e..bc446ba 100644 | ||
50 | --- a/drivers/media/video/uvc/uvcvideo.h | ||
51 | +++ b/drivers/media/video/uvc/uvcvideo.h | ||
52 | @@ -113,6 +113,7 @@ | ||
53 | |||
54 | /* Maximum allowed number of control mappings per device */ | ||
55 | #define UVC_MAX_CONTROL_MAPPINGS 1024 | ||
56 | +#define UVC_MAX_CONTROL_MENU_ENTRIES 32 | ||
57 | |||
58 | /* Devices quirks */ | ||
59 | #define UVC_QUIRK_STATUS_INTERVAL 0x00000001 | ||
60 | -- | ||
61 | 1.7.9.5 | ||
62 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch deleted file mode 100644 index 9ab9f3dc..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0075-dcache-use-a-dispose-list-in-select_parent.patch +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | From 4289e10c1a424c39e50bb4c44447da025fdf37b9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dave Chinner <david@fromorbit.com> | ||
3 | Date: Tue, 23 Aug 2011 18:56:24 +1000 | ||
4 | Subject: [PATCH 075/129] dcache: use a dispose list in select_parent | ||
5 | |||
6 | commit b48f03b319ba78f3abf9a7044d1f436d8d90f4f9 upstream. | ||
7 | |||
8 | select_parent currently abuses the dentry cache LRU to provide | ||
9 | cleanup features for child dentries that need to be freed. It moves | ||
10 | them to the tail of the LRU, then tells shrink_dcache_parent() to | ||
11 | calls __shrink_dcache_sb to unconditionally move them to a dispose | ||
12 | list (as DCACHE_REFERENCED is ignored). __shrink_dcache_sb() has to | ||
13 | relock the dentries to move them off the LRU onto the dispose list, | ||
14 | but otherwise does not touch the dentries that select_parent() moved | ||
15 | to the tail of the LRU. It then passses the dispose list to | ||
16 | shrink_dentry_list() which tries to free the dentries. | ||
17 | |||
18 | IOWs, the use of __shrink_dcache_sb() is superfluous - we can build | ||
19 | exactly the same list of dentries for disposal directly in | ||
20 | select_parent() and call shrink_dentry_list() instead of calling | ||
21 | __shrink_dcache_sb() to do that. This means that we avoid long holds | ||
22 | on the lru lock walking the LRU moving dentries to the dispose list | ||
23 | We also avoid the need to relock each dentry just to move it off the | ||
24 | LRU, reducing the numebr of times we lock each dentry to dispose of | ||
25 | them in shrink_dcache_parent() from 3 to 2 times. | ||
26 | |||
27 | Further, we remove one of the two callers of __shrink_dcache_sb(). | ||
28 | This also means that __shrink_dcache_sb can be moved into back into | ||
29 | prune_dcache_sb() and we no longer have to handle referenced | ||
30 | dentries conditionally, simplifying the code. | ||
31 | |||
32 | Signed-off-by: Dave Chinner <dchinner@redhat.com> | ||
33 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
34 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ||
35 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
36 | --- | ||
37 | fs/dcache.c | 63 ++++++++++++++++++++--------------------------------------- | ||
38 | 1 file changed, 21 insertions(+), 42 deletions(-) | ||
39 | |||
40 | diff --git a/fs/dcache.c b/fs/dcache.c | ||
41 | index 89509b5..108116e 100644 | ||
42 | --- a/fs/dcache.c | ||
43 | +++ b/fs/dcache.c | ||
44 | @@ -275,15 +275,15 @@ static void dentry_lru_prune(struct dentry *dentry) | ||
45 | } | ||
46 | } | ||
47 | |||
48 | -static void dentry_lru_move_tail(struct dentry *dentry) | ||
49 | +static void dentry_lru_move_list(struct dentry *dentry, struct list_head *list) | ||
50 | { | ||
51 | spin_lock(&dcache_lru_lock); | ||
52 | if (list_empty(&dentry->d_lru)) { | ||
53 | - list_add_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru); | ||
54 | + list_add_tail(&dentry->d_lru, list); | ||
55 | dentry->d_sb->s_nr_dentry_unused++; | ||
56 | dentry_stat.nr_unused++; | ||
57 | } else { | ||
58 | - list_move_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru); | ||
59 | + list_move_tail(&dentry->d_lru, list); | ||
60 | } | ||
61 | spin_unlock(&dcache_lru_lock); | ||
62 | } | ||
63 | @@ -769,14 +769,18 @@ static void shrink_dentry_list(struct list_head *list) | ||
64 | } | ||
65 | |||
66 | /** | ||
67 | - * __shrink_dcache_sb - shrink the dentry LRU on a given superblock | ||
68 | - * @sb: superblock to shrink dentry LRU. | ||
69 | - * @count: number of entries to prune | ||
70 | - * @flags: flags to control the dentry processing | ||
71 | + * prune_dcache_sb - shrink the dcache | ||
72 | + * @sb: superblock | ||
73 | + * @count: number of entries to try to free | ||
74 | + * | ||
75 | + * Attempt to shrink the superblock dcache LRU by @count entries. This is | ||
76 | + * done when we need more memory an called from the superblock shrinker | ||
77 | + * function. | ||
78 | * | ||
79 | - * If flags contains DCACHE_REFERENCED reference dentries will not be pruned. | ||
80 | + * This function may fail to free any resources if all the dentries are in | ||
81 | + * use. | ||
82 | */ | ||
83 | -static void __shrink_dcache_sb(struct super_block *sb, int count, int flags) | ||
84 | +void prune_dcache_sb(struct super_block *sb, int count) | ||
85 | { | ||
86 | struct dentry *dentry; | ||
87 | LIST_HEAD(referenced); | ||
88 | @@ -795,13 +799,7 @@ relock: | ||
89 | goto relock; | ||
90 | } | ||
91 | |||
92 | - /* | ||
93 | - * If we are honouring the DCACHE_REFERENCED flag and the | ||
94 | - * dentry has this flag set, don't free it. Clear the flag | ||
95 | - * and put it back on the LRU. | ||
96 | - */ | ||
97 | - if (flags & DCACHE_REFERENCED && | ||
98 | - dentry->d_flags & DCACHE_REFERENCED) { | ||
99 | + if (dentry->d_flags & DCACHE_REFERENCED) { | ||
100 | dentry->d_flags &= ~DCACHE_REFERENCED; | ||
101 | list_move(&dentry->d_lru, &referenced); | ||
102 | spin_unlock(&dentry->d_lock); | ||
103 | @@ -821,23 +819,6 @@ relock: | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | - * prune_dcache_sb - shrink the dcache | ||
108 | - * @sb: superblock | ||
109 | - * @nr_to_scan: number of entries to try to free | ||
110 | - * | ||
111 | - * Attempt to shrink the superblock dcache LRU by @nr_to_scan entries. This is | ||
112 | - * done when we need more memory an called from the superblock shrinker | ||
113 | - * function. | ||
114 | - * | ||
115 | - * This function may fail to free any resources if all the dentries are in | ||
116 | - * use. | ||
117 | - */ | ||
118 | -void prune_dcache_sb(struct super_block *sb, int nr_to_scan) | ||
119 | -{ | ||
120 | - __shrink_dcache_sb(sb, nr_to_scan, DCACHE_REFERENCED); | ||
121 | -} | ||
122 | - | ||
123 | -/** | ||
124 | * shrink_dcache_sb - shrink dcache for a superblock | ||
125 | * @sb: superblock | ||
126 | * | ||
127 | @@ -1091,7 +1072,7 @@ EXPORT_SYMBOL(have_submounts); | ||
128 | * drop the lock and return early due to latency | ||
129 | * constraints. | ||
130 | */ | ||
131 | -static int select_parent(struct dentry * parent) | ||
132 | +static int select_parent(struct dentry *parent, struct list_head *dispose) | ||
133 | { | ||
134 | struct dentry *this_parent; | ||
135 | struct list_head *next; | ||
136 | @@ -1113,12 +1094,11 @@ resume: | ||
137 | |||
138 | spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED); | ||
139 | |||
140 | - /* | ||
141 | - * move only zero ref count dentries to the end | ||
142 | - * of the unused list for prune_dcache | ||
143 | + /* | ||
144 | + * move only zero ref count dentries to the dispose list. | ||
145 | */ | ||
146 | if (!dentry->d_count) { | ||
147 | - dentry_lru_move_tail(dentry); | ||
148 | + dentry_lru_move_list(dentry, dispose); | ||
149 | found++; | ||
150 | } else { | ||
151 | dentry_lru_del(dentry); | ||
152 | @@ -1180,14 +1160,13 @@ rename_retry: | ||
153 | * | ||
154 | * Prune the dcache to remove unused children of the parent dentry. | ||
155 | */ | ||
156 | - | ||
157 | void shrink_dcache_parent(struct dentry * parent) | ||
158 | { | ||
159 | - struct super_block *sb = parent->d_sb; | ||
160 | + LIST_HEAD(dispose); | ||
161 | int found; | ||
162 | |||
163 | - while ((found = select_parent(parent)) != 0) | ||
164 | - __shrink_dcache_sb(sb, found, 0); | ||
165 | + while ((found = select_parent(parent, &dispose)) != 0) | ||
166 | + shrink_dentry_list(&dispose); | ||
167 | } | ||
168 | EXPORT_SYMBOL(shrink_dcache_parent); | ||
169 | |||
170 | -- | ||
171 | 1.7.9.5 | ||
172 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch deleted file mode 100644 index 7d33d3cb..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0076-fix-shrink_dcache_parent-livelock.patch +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | From 72a350429f61098d46984c13e8da293ec7a8ffe4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Miklos Szeredi <miklos@szeredi.hu> | ||
3 | Date: Tue, 10 Jan 2012 18:22:25 +0100 | ||
4 | Subject: [PATCH 076/129] fix shrink_dcache_parent() livelock | ||
5 | |||
6 | commit eaf5f9073533cde21c7121c136f1c3f072d9cf59 upstream. | ||
7 | |||
8 | Two (or more) concurrent calls of shrink_dcache_parent() on the same dentry may | ||
9 | cause shrink_dcache_parent() to loop forever. | ||
10 | |||
11 | Here's what appears to happen: | ||
12 | |||
13 | 1 - CPU0: select_parent(P) finds C and puts it on dispose list, returns 1 | ||
14 | |||
15 | 2 - CPU1: select_parent(P) locks P->d_lock | ||
16 | |||
17 | 3 - CPU0: shrink_dentry_list() locks C->d_lock | ||
18 | dentry_kill(C) tries to lock P->d_lock but fails, unlocks C->d_lock | ||
19 | |||
20 | 4 - CPU1: select_parent(P) locks C->d_lock, | ||
21 | moves C from dispose list being processed on CPU0 to the new | ||
22 | dispose list, returns 1 | ||
23 | |||
24 | 5 - CPU0: shrink_dentry_list() finds dispose list empty, returns | ||
25 | |||
26 | 6 - Goto 2 with CPU0 and CPU1 switched | ||
27 | |||
28 | Basically select_parent() steals the dentry from shrink_dentry_list() and thinks | ||
29 | it found a new one, causing shrink_dentry_list() to think it's making progress | ||
30 | and loop over and over. | ||
31 | |||
32 | One way to trigger this is to make udev calls stat() on the sysfs file while it | ||
33 | is going away. | ||
34 | |||
35 | Having a file in /lib/udev/rules.d/ with only this one rule seems to the trick: | ||
36 | |||
37 | ATTR{vendor}=="0x8086", ATTR{device}=="0x10ca", ENV{PCI_SLOT_NAME}="%k", ENV{MATCHADDR}="$attr{address}", RUN+="/bin/true" | ||
38 | |||
39 | Then execute the following loop: | ||
40 | |||
41 | while true; do | ||
42 | echo -bond0 > /sys/class/net/bonding_masters | ||
43 | echo +bond0 > /sys/class/net/bonding_masters | ||
44 | echo -bond1 > /sys/class/net/bonding_masters | ||
45 | echo +bond1 > /sys/class/net/bonding_masters | ||
46 | done | ||
47 | |||
48 | One fix would be to check all callers and prevent concurrent calls to | ||
49 | shrink_dcache_parent(). But I think a better solution is to stop the | ||
50 | stealing behavior. | ||
51 | |||
52 | This patch adds a new dentry flag that is set when the dentry is added to the | ||
53 | dispose list. The flag is cleared in dentry_lru_del() in case the dentry gets a | ||
54 | new reference just before being pruned. | ||
55 | |||
56 | If the dentry has this flag, select_parent() will skip it and let | ||
57 | shrink_dentry_list() retry pruning it. With select_parent() skipping those | ||
58 | dentries there will not be the appearance of progress (new dentries found) when | ||
59 | there is none, hence shrink_dcache_parent() will not loop forever. | ||
60 | |||
61 | Set the flag is also set in prune_dcache_sb() for consistency as suggested by | ||
62 | Linus. | ||
63 | |||
64 | Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> | ||
65 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ||
66 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
67 | --- | ||
68 | fs/dcache.c | 15 +++++++++++---- | ||
69 | include/linux/dcache.h | 1 + | ||
70 | 2 files changed, 12 insertions(+), 4 deletions(-) | ||
71 | |||
72 | diff --git a/fs/dcache.c b/fs/dcache.c | ||
73 | index 108116e..f7908ae 100644 | ||
74 | --- a/fs/dcache.c | ||
75 | +++ b/fs/dcache.c | ||
76 | @@ -242,6 +242,7 @@ static void dentry_lru_add(struct dentry *dentry) | ||
77 | static void __dentry_lru_del(struct dentry *dentry) | ||
78 | { | ||
79 | list_del_init(&dentry->d_lru); | ||
80 | + dentry->d_flags &= ~DCACHE_SHRINK_LIST; | ||
81 | dentry->d_sb->s_nr_dentry_unused--; | ||
82 | dentry_stat.nr_unused--; | ||
83 | } | ||
84 | @@ -805,6 +806,7 @@ relock: | ||
85 | spin_unlock(&dentry->d_lock); | ||
86 | } else { | ||
87 | list_move_tail(&dentry->d_lru, &tmp); | ||
88 | + dentry->d_flags |= DCACHE_SHRINK_LIST; | ||
89 | spin_unlock(&dentry->d_lock); | ||
90 | if (!--count) | ||
91 | break; | ||
92 | @@ -1096,14 +1098,19 @@ resume: | ||
93 | |||
94 | /* | ||
95 | * move only zero ref count dentries to the dispose list. | ||
96 | + * | ||
97 | + * Those which are presently on the shrink list, being processed | ||
98 | + * by shrink_dentry_list(), shouldn't be moved. Otherwise the | ||
99 | + * loop in shrink_dcache_parent() might not make any progress | ||
100 | + * and loop forever. | ||
101 | */ | ||
102 | - if (!dentry->d_count) { | ||
103 | + if (dentry->d_count) { | ||
104 | + dentry_lru_del(dentry); | ||
105 | + } else if (!(dentry->d_flags & DCACHE_SHRINK_LIST)) { | ||
106 | dentry_lru_move_list(dentry, dispose); | ||
107 | + dentry->d_flags |= DCACHE_SHRINK_LIST; | ||
108 | found++; | ||
109 | - } else { | ||
110 | - dentry_lru_del(dentry); | ||
111 | } | ||
112 | - | ||
113 | /* | ||
114 | * We can return to the caller if we have found some (this | ||
115 | * ensures forward progress). We'll be coming back to find | ||
116 | diff --git a/include/linux/dcache.h b/include/linux/dcache.h | ||
117 | index ed9f74f..4eb8c80 100644 | ||
118 | --- a/include/linux/dcache.h | ||
119 | +++ b/include/linux/dcache.h | ||
120 | @@ -203,6 +203,7 @@ struct dentry_operations { | ||
121 | |||
122 | #define DCACHE_CANT_MOUNT 0x0100 | ||
123 | #define DCACHE_GENOCIDE 0x0200 | ||
124 | +#define DCACHE_SHRINK_LIST 0x0400 | ||
125 | |||
126 | #define DCACHE_NFSFS_RENAMED 0x1000 | ||
127 | /* this dentry has been "silly renamed" and has to be deleted on the last | ||
128 | -- | ||
129 | 1.7.9.5 | ||
130 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch deleted file mode 100644 index 50c770c6..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0077-pnfsblock-acquire-im_lock-in-_preload_range.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From ff2123e28998f18ebfddf17f1babbc0db77e9857 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peng Tao <bergwolf@gmail.com> | ||
3 | Date: Thu, 12 Jan 2012 23:18:41 +0800 | ||
4 | Subject: [PATCH 077/129] pnfsblock: acquire im_lock in _preload_range | ||
5 | |||
6 | commit 39e567ae36fe03c2b446e1b83ee3d39bea08f90b upstream. | ||
7 | |||
8 | When calling _add_entry, we should take the im_lock to protect | ||
9 | agains other modifiers. | ||
10 | |||
11 | Signed-off-by: Peng Tao <peng_tao@emc.com> | ||
12 | Signed-off-by: Benny Halevy <bhalevy@tonian.com> | ||
13 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | fs/nfs/blocklayout/extents.c | 11 ++++++----- | ||
17 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
18 | |||
19 | diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c | ||
20 | index 19fa7b0..c69682a 100644 | ||
21 | --- a/fs/nfs/blocklayout/extents.c | ||
22 | +++ b/fs/nfs/blocklayout/extents.c | ||
23 | @@ -139,11 +139,13 @@ static int _set_range(struct my_tree *tree, int32_t tag, u64 s, u64 length) | ||
24 | } | ||
25 | |||
26 | /* Ensure that future operations on given range of tree will not malloc */ | ||
27 | -static int _preload_range(struct my_tree *tree, u64 offset, u64 length) | ||
28 | +static int _preload_range(struct pnfs_inval_markings *marks, | ||
29 | + u64 offset, u64 length) | ||
30 | { | ||
31 | u64 start, end, s; | ||
32 | int count, i, used = 0, status = -ENOMEM; | ||
33 | struct pnfs_inval_tracking **storage; | ||
34 | + struct my_tree *tree = &marks->im_tree; | ||
35 | |||
36 | dprintk("%s(%llu, %llu) enter\n", __func__, offset, length); | ||
37 | start = normalize(offset, tree->mtt_step_size); | ||
38 | @@ -161,12 +163,11 @@ static int _preload_range(struct my_tree *tree, u64 offset, u64 length) | ||
39 | goto out_cleanup; | ||
40 | } | ||
41 | |||
42 | - /* Now need lock - HOW??? */ | ||
43 | - | ||
44 | + spin_lock(&marks->im_lock); | ||
45 | for (s = start; s < end; s += tree->mtt_step_size) | ||
46 | used += _add_entry(tree, s, INTERNAL_EXISTS, storage[used]); | ||
47 | + spin_unlock(&marks->im_lock); | ||
48 | |||
49 | - /* Unlock - HOW??? */ | ||
50 | status = 0; | ||
51 | |||
52 | out_cleanup: | ||
53 | @@ -286,7 +287,7 @@ int bl_mark_sectors_init(struct pnfs_inval_markings *marks, | ||
54 | |||
55 | start = normalize(offset, marks->im_block_size); | ||
56 | end = normalize_up(offset + length, marks->im_block_size); | ||
57 | - if (_preload_range(&marks->im_tree, start, end - start)) | ||
58 | + if (_preload_range(marks, start, end - start)) | ||
59 | goto outerr; | ||
60 | |||
61 | spin_lock(&marks->im_lock); | ||
62 | -- | ||
63 | 1.7.9.5 | ||
64 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch deleted file mode 100644 index bc8b40dd..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0078-pnfsblock-don-t-spinlock-when-freeing-block_dev.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From c483f16efb181ee2384aa9d5672ebebfc714ab1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Peng Tao <bergwolf@gmail.com> | ||
3 | Date: Thu, 12 Jan 2012 23:18:47 +0800 | ||
4 | Subject: [PATCH 078/129] pnfsblock: don't spinlock when freeing block_dev | ||
5 | |||
6 | commit 93a3844ee0f843b05a1df4b52e1a19ff26b98d24 upstream. | ||
7 | |||
8 | bl_free_block_dev() may sleep. We can not call it with spinlock held. | ||
9 | Besides, there is no need to take bm_lock as we are last user freeing bm_devlist. | ||
10 | |||
11 | Signed-off-by: Peng Tao <peng_tao@emc.com> | ||
12 | Signed-off-by: Benny Halevy <bhalevy@tonian.com> | ||
13 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | fs/nfs/blocklayout/blocklayout.c | 11 ++++------- | ||
17 | 1 file changed, 4 insertions(+), 7 deletions(-) | ||
18 | |||
19 | diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c | ||
20 | index 281ae95..ce8129d 100644 | ||
21 | --- a/fs/nfs/blocklayout/blocklayout.c | ||
22 | +++ b/fs/nfs/blocklayout/blocklayout.c | ||
23 | @@ -779,16 +779,13 @@ bl_cleanup_layoutcommit(struct nfs4_layoutcommit_data *lcdata) | ||
24 | static void free_blk_mountid(struct block_mount_id *mid) | ||
25 | { | ||
26 | if (mid) { | ||
27 | - struct pnfs_block_dev *dev; | ||
28 | - spin_lock(&mid->bm_lock); | ||
29 | - while (!list_empty(&mid->bm_devlist)) { | ||
30 | - dev = list_first_entry(&mid->bm_devlist, | ||
31 | - struct pnfs_block_dev, | ||
32 | - bm_node); | ||
33 | + struct pnfs_block_dev *dev, *tmp; | ||
34 | + | ||
35 | + /* No need to take bm_lock as we are last user freeing bm_devlist */ | ||
36 | + list_for_each_entry_safe(dev, tmp, &mid->bm_devlist, bm_node) { | ||
37 | list_del(&dev->bm_node); | ||
38 | bl_free_block_dev(dev); | ||
39 | } | ||
40 | - spin_unlock(&mid->bm_lock); | ||
41 | kfree(mid); | ||
42 | } | ||
43 | } | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch deleted file mode 100644 index f003ff07..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0079-pnfsblock-limit-bio-page-count.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From a9de14f6624613210b273a24046142495f745038 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peng Tao <bergwolf@gmail.com> | ||
3 | Date: Thu, 12 Jan 2012 23:18:48 +0800 | ||
4 | Subject: [PATCH 079/129] pnfsblock: limit bio page count | ||
5 | |||
6 | commit 74a6eeb44ca6174d9cc93b9b8b4d58211c57bc80 upstream. | ||
7 | |||
8 | One bio can have at most BIO_MAX_PAGES pages. We should limit it bec otherwise | ||
9 | bio_alloc will fail when there are many pages in one read/write_pagelist. | ||
10 | |||
11 | Signed-off-by: Peng Tao <peng_tao@emc.com> | ||
12 | Signed-off-by: Benny Halevy <bhalevy@tonian.com> | ||
13 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | fs/nfs/blocklayout/blocklayout.c | 17 +++++++++++------ | ||
17 | 1 file changed, 11 insertions(+), 6 deletions(-) | ||
18 | |||
19 | diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c | ||
20 | index ce8129d..3db6b82 100644 | ||
21 | --- a/fs/nfs/blocklayout/blocklayout.c | ||
22 | +++ b/fs/nfs/blocklayout/blocklayout.c | ||
23 | @@ -146,14 +146,19 @@ static struct bio *bl_alloc_init_bio(int npg, sector_t isect, | ||
24 | { | ||
25 | struct bio *bio; | ||
26 | |||
27 | + npg = min(npg, BIO_MAX_PAGES); | ||
28 | bio = bio_alloc(GFP_NOIO, npg); | ||
29 | - if (!bio) | ||
30 | - return NULL; | ||
31 | + if (!bio && (current->flags & PF_MEMALLOC)) { | ||
32 | + while (!bio && (npg /= 2)) | ||
33 | + bio = bio_alloc(GFP_NOIO, npg); | ||
34 | + } | ||
35 | |||
36 | - bio->bi_sector = isect - be->be_f_offset + be->be_v_offset; | ||
37 | - bio->bi_bdev = be->be_mdev; | ||
38 | - bio->bi_end_io = end_io; | ||
39 | - bio->bi_private = par; | ||
40 | + if (bio) { | ||
41 | + bio->bi_sector = isect - be->be_f_offset + be->be_v_offset; | ||
42 | + bio->bi_bdev = be->be_mdev; | ||
43 | + bio->bi_end_io = end_io; | ||
44 | + bio->bi_private = par; | ||
45 | + } | ||
46 | return bio; | ||
47 | } | ||
48 | |||
49 | -- | ||
50 | 1.7.9.5 | ||
51 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch deleted file mode 100644 index 77b753d0..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0080-mac80211-revert-on-channel-work-optimisations.patch +++ /dev/null | |||
@@ -1,635 +0,0 @@ | |||
1 | From 785fae0af79dd35416a44469930c2cbe87ff2c48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Johannes Berg <johannes.berg@intel.com> | ||
3 | Date: Tue, 29 Nov 2011 10:20:02 +0100 | ||
4 | Subject: [PATCH 080/129] mac80211: revert on-channel work optimisations | ||
5 | |||
6 | commit e76aadc572288a158ae18ae1c10fe395c7bca066 upstream. | ||
7 | |||
8 | Backport note: | ||
9 | This patch it's a full revert of commit b23b025f "mac80211: Optimize | ||
10 | scans on current operating channel.". On upstrem revert e76aadc5 we | ||
11 | keep some bits from that commit, which are needed for upstream version | ||
12 | of mac80211. | ||
13 | |||
14 | The on-channel work optimisations have caused a | ||
15 | number of issues, and the code is unfortunately | ||
16 | very complex and almost impossible to follow. | ||
17 | Instead of attempting to put in more workarounds | ||
18 | let's just remove those optimisations, we can | ||
19 | work on them again later, after we change the | ||
20 | whole auth/assoc design. | ||
21 | |||
22 | This should fix rate_control_send_low() warnings, | ||
23 | see RH bug 731365. | ||
24 | |||
25 | Signed-off-by: Johannes Berg <johannes.berg@intel.com> | ||
26 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
27 | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
29 | --- | ||
30 | net/mac80211/ieee80211_i.h | 13 ++++---- | ||
31 | net/mac80211/main.c | 58 ++++----------------------------- | ||
32 | net/mac80211/offchannel.c | 68 ++++++++++++++++++-------------------- | ||
33 | net/mac80211/rx.c | 10 ++++-- | ||
34 | net/mac80211/scan.c | 77 +++++++++++++------------------------------- | ||
35 | net/mac80211/tx.c | 3 +- | ||
36 | net/mac80211/work.c | 77 +++++++------------------------------------- | ||
37 | 7 files changed, 85 insertions(+), 221 deletions(-) | ||
38 | |||
39 | diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h | ||
40 | index ea10a51..73495f1 100644 | ||
41 | --- a/net/mac80211/ieee80211_i.h | ||
42 | +++ b/net/mac80211/ieee80211_i.h | ||
43 | @@ -702,6 +702,8 @@ struct tpt_led_trigger { | ||
44 | * well be on the operating channel | ||
45 | * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to | ||
46 | * determine if we are on the operating channel or not | ||
47 | + * @SCAN_OFF_CHANNEL: We're off our operating channel for scanning, | ||
48 | + * gets only set in conjunction with SCAN_SW_SCANNING | ||
49 | * @SCAN_COMPLETED: Set for our scan work function when the driver reported | ||
50 | * that the scan completed. | ||
51 | * @SCAN_ABORTED: Set for our scan work function when the driver reported | ||
52 | @@ -710,6 +712,7 @@ struct tpt_led_trigger { | ||
53 | enum { | ||
54 | SCAN_SW_SCANNING, | ||
55 | SCAN_HW_SCANNING, | ||
56 | + SCAN_OFF_CHANNEL, | ||
57 | SCAN_COMPLETED, | ||
58 | SCAN_ABORTED, | ||
59 | }; | ||
60 | @@ -1140,14 +1143,10 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata); | ||
61 | void ieee80211_sched_scan_stopped_work(struct work_struct *work); | ||
62 | |||
63 | /* off-channel helpers */ | ||
64 | -bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local); | ||
65 | -void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local, | ||
66 | - bool tell_ap); | ||
67 | -void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
68 | - bool offchannel_ps_enable); | ||
69 | +void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local); | ||
70 | +void ieee80211_offchannel_stop_station(struct ieee80211_local *local); | ||
71 | void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
72 | - bool enable_beaconing, | ||
73 | - bool offchannel_ps_disable); | ||
74 | + bool enable_beaconing); | ||
75 | void ieee80211_hw_roc_setup(struct ieee80211_local *local); | ||
76 | |||
77 | /* interface handling */ | ||
78 | diff --git a/net/mac80211/main.c b/net/mac80211/main.c | ||
79 | index cae4435..a7536fd 100644 | ||
80 | --- a/net/mac80211/main.c | ||
81 | +++ b/net/mac80211/main.c | ||
82 | @@ -92,47 +92,6 @@ static void ieee80211_reconfig_filter(struct work_struct *work) | ||
83 | ieee80211_configure_filter(local); | ||
84 | } | ||
85 | |||
86 | -/* | ||
87 | - * Returns true if we are logically configured to be on | ||
88 | - * the operating channel AND the hardware-conf is currently | ||
89 | - * configured on the operating channel. Compares channel-type | ||
90 | - * as well. | ||
91 | - */ | ||
92 | -bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local) | ||
93 | -{ | ||
94 | - struct ieee80211_channel *chan, *scan_chan; | ||
95 | - enum nl80211_channel_type channel_type; | ||
96 | - | ||
97 | - /* This logic needs to match logic in ieee80211_hw_config */ | ||
98 | - if (local->scan_channel) { | ||
99 | - chan = local->scan_channel; | ||
100 | - /* If scanning on oper channel, use whatever channel-type | ||
101 | - * is currently in use. | ||
102 | - */ | ||
103 | - if (chan == local->oper_channel) | ||
104 | - channel_type = local->_oper_channel_type; | ||
105 | - else | ||
106 | - channel_type = NL80211_CHAN_NO_HT; | ||
107 | - } else if (local->tmp_channel) { | ||
108 | - chan = scan_chan = local->tmp_channel; | ||
109 | - channel_type = local->tmp_channel_type; | ||
110 | - } else { | ||
111 | - chan = local->oper_channel; | ||
112 | - channel_type = local->_oper_channel_type; | ||
113 | - } | ||
114 | - | ||
115 | - if (chan != local->oper_channel || | ||
116 | - channel_type != local->_oper_channel_type) | ||
117 | - return false; | ||
118 | - | ||
119 | - /* Check current hardware-config against oper_channel. */ | ||
120 | - if ((local->oper_channel != local->hw.conf.channel) || | ||
121 | - (local->_oper_channel_type != local->hw.conf.channel_type)) | ||
122 | - return false; | ||
123 | - | ||
124 | - return true; | ||
125 | -} | ||
126 | - | ||
127 | int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | ||
128 | { | ||
129 | struct ieee80211_channel *chan, *scan_chan; | ||
130 | @@ -145,9 +104,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | ||
131 | |||
132 | scan_chan = local->scan_channel; | ||
133 | |||
134 | - /* If this off-channel logic ever changes, ieee80211_on_oper_channel | ||
135 | - * may need to change as well. | ||
136 | - */ | ||
137 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; | ||
138 | if (scan_chan) { | ||
139 | chan = scan_chan; | ||
140 | @@ -158,19 +114,17 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | ||
141 | channel_type = local->_oper_channel_type; | ||
142 | else | ||
143 | channel_type = NL80211_CHAN_NO_HT; | ||
144 | - } else if (local->tmp_channel) { | ||
145 | + local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; | ||
146 | + } else if (local->tmp_channel && | ||
147 | + local->oper_channel != local->tmp_channel) { | ||
148 | chan = scan_chan = local->tmp_channel; | ||
149 | channel_type = local->tmp_channel_type; | ||
150 | + local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; | ||
151 | } else { | ||
152 | chan = local->oper_channel; | ||
153 | channel_type = local->_oper_channel_type; | ||
154 | - } | ||
155 | - | ||
156 | - if (chan != local->oper_channel || | ||
157 | - channel_type != local->_oper_channel_type) | ||
158 | - local->hw.conf.flags |= IEEE80211_CONF_OFFCHANNEL; | ||
159 | - else | ||
160 | local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL; | ||
161 | + } | ||
162 | |||
163 | offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; | ||
164 | |||
165 | @@ -279,7 +233,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | ||
166 | |||
167 | if (changed & BSS_CHANGED_BEACON_ENABLED) { | ||
168 | if (local->quiescing || !ieee80211_sdata_running(sdata) || | ||
169 | - test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) { | ||
170 | + test_bit(SCAN_SW_SCANNING, &local->scanning)) { | ||
171 | sdata->vif.bss_conf.enable_beacon = false; | ||
172 | } else { | ||
173 | /* | ||
174 | diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c | ||
175 | index 3d41441..1b239be 100644 | ||
176 | --- a/net/mac80211/offchannel.c | ||
177 | +++ b/net/mac80211/offchannel.c | ||
178 | @@ -18,14 +18,10 @@ | ||
179 | #include "driver-trace.h" | ||
180 | |||
181 | /* | ||
182 | - * Tell our hardware to disable PS. | ||
183 | - * Optionally inform AP that we will go to sleep so that it will buffer | ||
184 | - * the frames while we are doing off-channel work. This is optional | ||
185 | - * because we *may* be doing work on-operating channel, and want our | ||
186 | - * hardware unconditionally awake, but still let the AP send us normal frames. | ||
187 | + * inform AP that we will go to sleep so that it will buffer the frames | ||
188 | + * while we scan | ||
189 | */ | ||
190 | -static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata, | ||
191 | - bool tell_ap) | ||
192 | +static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata) | ||
193 | { | ||
194 | struct ieee80211_local *local = sdata->local; | ||
195 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | ||
196 | @@ -46,8 +42,8 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata, | ||
197 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); | ||
198 | } | ||
199 | |||
200 | - if (tell_ap && (!local->offchannel_ps_enabled || | ||
201 | - !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK))) | ||
202 | + if (!(local->offchannel_ps_enabled) || | ||
203 | + !(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) | ||
204 | /* | ||
205 | * If power save was enabled, no need to send a nullfunc | ||
206 | * frame because AP knows that we are sleeping. But if the | ||
207 | @@ -82,9 +78,6 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata) | ||
208 | * we are sleeping, let's just enable power save mode in | ||
209 | * hardware. | ||
210 | */ | ||
211 | - /* TODO: Only set hardware if CONF_PS changed? | ||
212 | - * TODO: Should we set offchannel_ps_enabled to false? | ||
213 | - */ | ||
214 | local->hw.conf.flags |= IEEE80211_CONF_PS; | ||
215 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); | ||
216 | } else if (local->hw.conf.dynamic_ps_timeout > 0) { | ||
217 | @@ -103,61 +96,63 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata) | ||
218 | ieee80211_sta_reset_conn_monitor(sdata); | ||
219 | } | ||
220 | |||
221 | -void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, | ||
222 | - bool offchannel_ps_enable) | ||
223 | +void ieee80211_offchannel_stop_beaconing(struct ieee80211_local *local) | ||
224 | { | ||
225 | struct ieee80211_sub_if_data *sdata; | ||
226 | |||
227 | - /* | ||
228 | - * notify the AP about us leaving the channel and stop all | ||
229 | - * STA interfaces. | ||
230 | - */ | ||
231 | mutex_lock(&local->iflist_mtx); | ||
232 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
233 | if (!ieee80211_sdata_running(sdata)) | ||
234 | continue; | ||
235 | |||
236 | - if (sdata->vif.type != NL80211_IFTYPE_MONITOR) | ||
237 | - set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); | ||
238 | - | ||
239 | - /* Check to see if we should disable beaconing. */ | ||
240 | + /* disable beaconing */ | ||
241 | if (sdata->vif.type == NL80211_IFTYPE_AP || | ||
242 | sdata->vif.type == NL80211_IFTYPE_ADHOC || | ||
243 | sdata->vif.type == NL80211_IFTYPE_MESH_POINT) | ||
244 | ieee80211_bss_info_change_notify( | ||
245 | sdata, BSS_CHANGED_BEACON_ENABLED); | ||
246 | |||
247 | - if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { | ||
248 | + /* | ||
249 | + * only handle non-STA interfaces here, STA interfaces | ||
250 | + * are handled in ieee80211_offchannel_stop_station(), | ||
251 | + * e.g., from the background scan state machine. | ||
252 | + * | ||
253 | + * In addition, do not stop monitor interface to allow it to be | ||
254 | + * used from user space controlled off-channel operations. | ||
255 | + */ | ||
256 | + if (sdata->vif.type != NL80211_IFTYPE_STATION && | ||
257 | + sdata->vif.type != NL80211_IFTYPE_MONITOR) { | ||
258 | + set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); | ||
259 | netif_tx_stop_all_queues(sdata->dev); | ||
260 | - if (offchannel_ps_enable && | ||
261 | - (sdata->vif.type == NL80211_IFTYPE_STATION) && | ||
262 | - sdata->u.mgd.associated) | ||
263 | - ieee80211_offchannel_ps_enable(sdata, true); | ||
264 | } | ||
265 | } | ||
266 | mutex_unlock(&local->iflist_mtx); | ||
267 | } | ||
268 | |||
269 | -void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local, | ||
270 | - bool tell_ap) | ||
271 | +void ieee80211_offchannel_stop_station(struct ieee80211_local *local) | ||
272 | { | ||
273 | struct ieee80211_sub_if_data *sdata; | ||
274 | |||
275 | + /* | ||
276 | + * notify the AP about us leaving the channel and stop all STA interfaces | ||
277 | + */ | ||
278 | mutex_lock(&local->iflist_mtx); | ||
279 | list_for_each_entry(sdata, &local->interfaces, list) { | ||
280 | if (!ieee80211_sdata_running(sdata)) | ||
281 | continue; | ||
282 | |||
283 | - if (sdata->vif.type == NL80211_IFTYPE_STATION && | ||
284 | - sdata->u.mgd.associated) | ||
285 | - ieee80211_offchannel_ps_enable(sdata, tell_ap); | ||
286 | + if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
287 | + set_bit(SDATA_STATE_OFFCHANNEL, &sdata->state); | ||
288 | + netif_tx_stop_all_queues(sdata->dev); | ||
289 | + if (sdata->u.mgd.associated) | ||
290 | + ieee80211_offchannel_ps_enable(sdata); | ||
291 | + } | ||
292 | } | ||
293 | mutex_unlock(&local->iflist_mtx); | ||
294 | } | ||
295 | |||
296 | void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
297 | - bool enable_beaconing, | ||
298 | - bool offchannel_ps_disable) | ||
299 | + bool enable_beaconing) | ||
300 | { | ||
301 | struct ieee80211_sub_if_data *sdata; | ||
302 | |||
303 | @@ -167,8 +162,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
304 | continue; | ||
305 | |||
306 | /* Tell AP we're back */ | ||
307 | - if (offchannel_ps_disable && | ||
308 | - sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
309 | + if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
310 | if (sdata->u.mgd.associated) | ||
311 | ieee80211_offchannel_ps_disable(sdata); | ||
312 | } | ||
313 | @@ -188,7 +182,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local, | ||
314 | netif_tx_wake_all_queues(sdata->dev); | ||
315 | } | ||
316 | |||
317 | - /* Check to see if we should re-enable beaconing */ | ||
318 | + /* re-enable beaconing */ | ||
319 | if (enable_beaconing && | ||
320 | (sdata->vif.type == NL80211_IFTYPE_AP || | ||
321 | sdata->vif.type == NL80211_IFTYPE_ADHOC || | ||
322 | diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c | ||
323 | index fb123e2..5c51607 100644 | ||
324 | --- a/net/mac80211/rx.c | ||
325 | +++ b/net/mac80211/rx.c | ||
326 | @@ -421,10 +421,16 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx) | ||
327 | return RX_CONTINUE; | ||
328 | |||
329 | if (test_bit(SCAN_HW_SCANNING, &local->scanning) || | ||
330 | - test_bit(SCAN_SW_SCANNING, &local->scanning) || | ||
331 | local->sched_scanning) | ||
332 | return ieee80211_scan_rx(rx->sdata, skb); | ||
333 | |||
334 | + if (test_bit(SCAN_SW_SCANNING, &local->scanning)) { | ||
335 | + /* drop all the other packets during a software scan anyway */ | ||
336 | + if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) | ||
337 | + dev_kfree_skb(skb); | ||
338 | + return RX_QUEUED; | ||
339 | + } | ||
340 | + | ||
341 | /* scanning finished during invoking of handlers */ | ||
342 | I802_DEBUG_INC(local->rx_handlers_drop_passive_scan); | ||
343 | return RX_DROP_UNUSABLE; | ||
344 | @@ -2858,7 +2864,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | ||
345 | local->dot11ReceivedFragmentCount++; | ||
346 | |||
347 | if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning) || | ||
348 | - test_bit(SCAN_SW_SCANNING, &local->scanning))) | ||
349 | + test_bit(SCAN_OFF_CHANNEL, &local->scanning))) | ||
350 | status->rx_flags |= IEEE80211_RX_IN_SCAN; | ||
351 | |||
352 | if (ieee80211_is_mgmt(fc)) | ||
353 | diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c | ||
354 | index 105436d..5279300 100644 | ||
355 | --- a/net/mac80211/scan.c | ||
356 | +++ b/net/mac80211/scan.c | ||
357 | @@ -213,14 +213,6 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) | ||
358 | if (bss) | ||
359 | ieee80211_rx_bss_put(sdata->local, bss); | ||
360 | |||
361 | - /* If we are on-operating-channel, and this packet is for the | ||
362 | - * current channel, pass the pkt on up the stack so that | ||
363 | - * the rest of the stack can make use of it. | ||
364 | - */ | ||
365 | - if (ieee80211_cfg_on_oper_channel(sdata->local) | ||
366 | - && (channel == sdata->local->oper_channel)) | ||
367 | - return RX_CONTINUE; | ||
368 | - | ||
369 | dev_kfree_skb(skb); | ||
370 | return RX_QUEUED; | ||
371 | } | ||
372 | @@ -264,8 +256,6 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, | ||
373 | bool was_hw_scan) | ||
374 | { | ||
375 | struct ieee80211_local *local = hw_to_local(hw); | ||
376 | - bool on_oper_chan; | ||
377 | - bool enable_beacons = false; | ||
378 | |||
379 | lockdep_assert_held(&local->mtx); | ||
380 | |||
381 | @@ -298,25 +288,11 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted, | ||
382 | local->scanning = 0; | ||
383 | local->scan_channel = NULL; | ||
384 | |||
385 | - on_oper_chan = ieee80211_cfg_on_oper_channel(local); | ||
386 | - | ||
387 | - if (was_hw_scan || !on_oper_chan) | ||
388 | - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | ||
389 | - else | ||
390 | - /* Set power back to normal operating levels. */ | ||
391 | - ieee80211_hw_config(local, 0); | ||
392 | - | ||
393 | + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | ||
394 | if (!was_hw_scan) { | ||
395 | - bool on_oper_chan2; | ||
396 | ieee80211_configure_filter(local); | ||
397 | drv_sw_scan_complete(local); | ||
398 | - on_oper_chan2 = ieee80211_cfg_on_oper_channel(local); | ||
399 | - /* We should always be on-channel at this point. */ | ||
400 | - WARN_ON(!on_oper_chan2); | ||
401 | - if (on_oper_chan2 && (on_oper_chan != on_oper_chan2)) | ||
402 | - enable_beacons = true; | ||
403 | - | ||
404 | - ieee80211_offchannel_return(local, enable_beacons, true); | ||
405 | + ieee80211_offchannel_return(local, true); | ||
406 | } | ||
407 | |||
408 | ieee80211_recalc_idle(local); | ||
409 | @@ -357,15 +333,13 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | ||
410 | */ | ||
411 | drv_sw_scan_start(local); | ||
412 | |||
413 | + ieee80211_offchannel_stop_beaconing(local); | ||
414 | + | ||
415 | local->leave_oper_channel_time = 0; | ||
416 | local->next_scan_state = SCAN_DECISION; | ||
417 | local->scan_channel_idx = 0; | ||
418 | |||
419 | - /* We always want to use off-channel PS, even if we | ||
420 | - * are not really leaving oper-channel. Don't | ||
421 | - * tell the AP though, as long as we are on-channel. | ||
422 | - */ | ||
423 | - ieee80211_offchannel_enable_all_ps(local, false); | ||
424 | + drv_flush(local, false); | ||
425 | |||
426 | ieee80211_configure_filter(local); | ||
427 | |||
428 | @@ -508,20 +482,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, | ||
429 | } | ||
430 | mutex_unlock(&local->iflist_mtx); | ||
431 | |||
432 | - next_chan = local->scan_req->channels[local->scan_channel_idx]; | ||
433 | - | ||
434 | - if (ieee80211_cfg_on_oper_channel(local)) { | ||
435 | - /* We're currently on operating channel. */ | ||
436 | - if (next_chan == local->oper_channel) | ||
437 | - /* We don't need to move off of operating channel. */ | ||
438 | - local->next_scan_state = SCAN_SET_CHANNEL; | ||
439 | - else | ||
440 | - /* | ||
441 | - * We do need to leave operating channel, as next | ||
442 | - * scan is somewhere else. | ||
443 | - */ | ||
444 | - local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL; | ||
445 | - } else { | ||
446 | + if (local->scan_channel) { | ||
447 | /* | ||
448 | * we're currently scanning a different channel, let's | ||
449 | * see if we can scan another channel without interfering | ||
450 | @@ -537,6 +498,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, | ||
451 | * | ||
452 | * Otherwise switch back to the operating channel. | ||
453 | */ | ||
454 | + next_chan = local->scan_req->channels[local->scan_channel_idx]; | ||
455 | |||
456 | bad_latency = time_after(jiffies + | ||
457 | ieee80211_scan_get_channel_time(next_chan), | ||
458 | @@ -554,6 +516,12 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, | ||
459 | local->next_scan_state = SCAN_ENTER_OPER_CHANNEL; | ||
460 | else | ||
461 | local->next_scan_state = SCAN_SET_CHANNEL; | ||
462 | + } else { | ||
463 | + /* | ||
464 | + * we're on the operating channel currently, let's | ||
465 | + * leave that channel now to scan another one | ||
466 | + */ | ||
467 | + local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL; | ||
468 | } | ||
469 | |||
470 | *next_delay = 0; | ||
471 | @@ -562,10 +530,9 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local, | ||
472 | static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local, | ||
473 | unsigned long *next_delay) | ||
474 | { | ||
475 | - /* PS will already be in off-channel mode, | ||
476 | - * we do that once at the beginning of scanning. | ||
477 | - */ | ||
478 | - ieee80211_offchannel_stop_vifs(local, false); | ||
479 | + ieee80211_offchannel_stop_station(local); | ||
480 | + | ||
481 | + __set_bit(SCAN_OFF_CHANNEL, &local->scanning); | ||
482 | |||
483 | /* | ||
484 | * What if the nullfunc frames didn't arrive? | ||
485 | @@ -588,15 +555,15 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca | ||
486 | { | ||
487 | /* switch back to the operating channel */ | ||
488 | local->scan_channel = NULL; | ||
489 | - if (!ieee80211_cfg_on_oper_channel(local)) | ||
490 | - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | ||
491 | + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); | ||
492 | |||
493 | /* | ||
494 | - * Re-enable vifs and beaconing. Leave PS | ||
495 | - * in off-channel state..will put that back | ||
496 | - * on-channel at the end of scanning. | ||
497 | + * Only re-enable station mode interface now; beaconing will be | ||
498 | + * re-enabled once the full scan has been completed. | ||
499 | */ | ||
500 | - ieee80211_offchannel_return(local, true, false); | ||
501 | + ieee80211_offchannel_return(local, false); | ||
502 | + | ||
503 | + __clear_bit(SCAN_OFF_CHANNEL, &local->scanning); | ||
504 | |||
505 | *next_delay = HZ / 5; | ||
506 | local->next_scan_state = SCAN_DECISION; | ||
507 | diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c | ||
508 | index 1f8b120..eff1f4e 100644 | ||
509 | --- a/net/mac80211/tx.c | ||
510 | +++ b/net/mac80211/tx.c | ||
511 | @@ -259,8 +259,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) | ||
512 | if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) | ||
513 | return TX_CONTINUE; | ||
514 | |||
515 | - if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) && | ||
516 | - test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) && | ||
517 | + if (unlikely(test_bit(SCAN_OFF_CHANNEL, &tx->local->scanning)) && | ||
518 | !ieee80211_is_probe_req(hdr->frame_control) && | ||
519 | !ieee80211_is_nullfunc(hdr->frame_control)) | ||
520 | /* | ||
521 | diff --git a/net/mac80211/work.c b/net/mac80211/work.c | ||
522 | index 6c53b6d..99165ef 100644 | ||
523 | --- a/net/mac80211/work.c | ||
524 | +++ b/net/mac80211/work.c | ||
525 | @@ -899,26 +899,6 @@ static bool ieee80211_work_ct_coexists(enum nl80211_channel_type wk_ct, | ||
526 | return false; | ||
527 | } | ||
528 | |||
529 | -static enum nl80211_channel_type | ||
530 | -ieee80211_calc_ct(enum nl80211_channel_type wk_ct, | ||
531 | - enum nl80211_channel_type oper_ct) | ||
532 | -{ | ||
533 | - switch (wk_ct) { | ||
534 | - case NL80211_CHAN_NO_HT: | ||
535 | - return oper_ct; | ||
536 | - case NL80211_CHAN_HT20: | ||
537 | - if (oper_ct != NL80211_CHAN_NO_HT) | ||
538 | - return oper_ct; | ||
539 | - return wk_ct; | ||
540 | - case NL80211_CHAN_HT40MINUS: | ||
541 | - case NL80211_CHAN_HT40PLUS: | ||
542 | - return wk_ct; | ||
543 | - } | ||
544 | - WARN_ON(1); /* shouldn't get here */ | ||
545 | - return wk_ct; | ||
546 | -} | ||
547 | - | ||
548 | - | ||
549 | static void ieee80211_work_timer(unsigned long data) | ||
550 | { | ||
551 | struct ieee80211_local *local = (void *) data; | ||
552 | @@ -969,52 +949,18 @@ static void ieee80211_work_work(struct work_struct *work) | ||
553 | } | ||
554 | |||
555 | if (!started && !local->tmp_channel) { | ||
556 | - bool on_oper_chan; | ||
557 | - bool tmp_chan_changed = false; | ||
558 | - bool on_oper_chan2; | ||
559 | - enum nl80211_channel_type wk_ct; | ||
560 | - on_oper_chan = ieee80211_cfg_on_oper_channel(local); | ||
561 | - | ||
562 | - /* Work with existing channel type if possible. */ | ||
563 | - wk_ct = wk->chan_type; | ||
564 | - if (wk->chan == local->hw.conf.channel) | ||
565 | - wk_ct = ieee80211_calc_ct(wk->chan_type, | ||
566 | - local->hw.conf.channel_type); | ||
567 | - | ||
568 | - if (local->tmp_channel) | ||
569 | - if ((local->tmp_channel != wk->chan) || | ||
570 | - (local->tmp_channel_type != wk_ct)) | ||
571 | - tmp_chan_changed = true; | ||
572 | - | ||
573 | - local->tmp_channel = wk->chan; | ||
574 | - local->tmp_channel_type = wk_ct; | ||
575 | /* | ||
576 | - * Leave the station vifs in awake mode if they | ||
577 | - * happen to be on the same channel as | ||
578 | - * the requested channel. | ||
579 | + * TODO: could optimize this by leaving the | ||
580 | + * station vifs in awake mode if they | ||
581 | + * happen to be on the same channel as | ||
582 | + * the requested channel | ||
583 | */ | ||
584 | - on_oper_chan2 = ieee80211_cfg_on_oper_channel(local); | ||
585 | - if (on_oper_chan != on_oper_chan2) { | ||
586 | - if (on_oper_chan2) { | ||
587 | - /* going off oper channel, PS too */ | ||
588 | - ieee80211_offchannel_stop_vifs(local, | ||
589 | - true); | ||
590 | - ieee80211_hw_config(local, 0); | ||
591 | - } else { | ||
592 | - /* going on channel, but leave PS | ||
593 | - * off-channel. */ | ||
594 | - ieee80211_hw_config(local, 0); | ||
595 | - ieee80211_offchannel_return(local, | ||
596 | - true, | ||
597 | - false); | ||
598 | - } | ||
599 | - } else if (tmp_chan_changed) | ||
600 | - /* Still off-channel, but on some other | ||
601 | - * channel, so update hardware. | ||
602 | - * PS should already be off-channel. | ||
603 | - */ | ||
604 | - ieee80211_hw_config(local, 0); | ||
605 | + ieee80211_offchannel_stop_beaconing(local); | ||
606 | + ieee80211_offchannel_stop_station(local); | ||
607 | |||
608 | + local->tmp_channel = wk->chan; | ||
609 | + local->tmp_channel_type = wk->chan_type; | ||
610 | + ieee80211_hw_config(local, 0); | ||
611 | started = true; | ||
612 | wk->timeout = jiffies; | ||
613 | } | ||
614 | @@ -1100,8 +1046,7 @@ static void ieee80211_work_work(struct work_struct *work) | ||
615 | * we still need to do a hardware config. Currently, | ||
616 | * we cannot be here while scanning, however. | ||
617 | */ | ||
618 | - if (!ieee80211_cfg_on_oper_channel(local)) | ||
619 | - ieee80211_hw_config(local, 0); | ||
620 | + ieee80211_hw_config(local, 0); | ||
621 | |||
622 | /* At the least, we need to disable offchannel_ps, | ||
623 | * so just go ahead and run the entire offchannel | ||
624 | @@ -1109,7 +1054,7 @@ static void ieee80211_work_work(struct work_struct *work) | ||
625 | * beaconing if we were already on-oper-channel | ||
626 | * as a future optimization. | ||
627 | */ | ||
628 | - ieee80211_offchannel_return(local, true, true); | ||
629 | + ieee80211_offchannel_return(local, true); | ||
630 | |||
631 | /* give connection some time to breathe */ | ||
632 | run_again(local, jiffies + HZ/2); | ||
633 | -- | ||
634 | 1.7.9.5 | ||
635 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch deleted file mode 100644 index 5db3fea1..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0081-HID-hid-multitouch-add-another-eGalax-id.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 15efaf9be89966a57b4d147511de686976e4a4eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Bagwell <chris@cnpbagwell.com> | ||
3 | Date: Wed, 23 Nov 2011 10:54:27 +0100 | ||
4 | Subject: [PATCH 081/129] HID: hid-multitouch - add another eGalax id | ||
5 | |||
6 | commit 1fd8f047490dd0ec4e4db710fcbc1bd4798d944c upstream. | ||
7 | |||
8 | This allows ASUS Eee Slate touchscreens to work. | ||
9 | |||
10 | Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> | ||
11 | Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
12 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | drivers/hid/hid-core.c | 1 + | ||
16 | drivers/hid/hid-ids.h | 1 + | ||
17 | drivers/hid/hid-multitouch.c | 3 +++ | ||
18 | 3 files changed, 5 insertions(+) | ||
19 | |||
20 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
21 | index 1473067..b51cbf2 100644 | ||
22 | --- a/drivers/hid/hid-core.c | ||
23 | +++ b/drivers/hid/hid-core.c | ||
24 | @@ -1409,6 +1409,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | ||
25 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | ||
26 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
27 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
28 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, | ||
29 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | ||
30 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, | ||
31 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, | ||
32 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
33 | index 4a441a6..4c9a342 100644 | ||
34 | --- a/drivers/hid/hid-ids.h | ||
35 | +++ b/drivers/hid/hid-ids.h | ||
36 | @@ -235,6 +235,7 @@ | ||
37 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 | ||
38 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e | ||
39 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b | ||
40 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001 | ||
41 | |||
42 | #define USB_VENDOR_ID_ELECOM 0x056e | ||
43 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 | ||
44 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
45 | index f1c909f..a59d939 100644 | ||
46 | --- a/drivers/hid/hid-multitouch.c | ||
47 | +++ b/drivers/hid/hid-multitouch.c | ||
48 | @@ -662,6 +662,9 @@ static const struct hid_device_id mt_devices[] = { | ||
49 | { .driver_data = MT_CLS_EGALAX, | ||
50 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
51 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
52 | + { .driver_data = MT_CLS_EGALAX, | ||
53 | + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
54 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, | ||
55 | |||
56 | /* Elo TouchSystems IntelliTouch Plus panel */ | ||
57 | { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, | ||
58 | -- | ||
59 | 1.7.9.5 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch deleted file mode 100644 index 807223b6..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0082-HID-multitouch-cleanup-with-eGalax-PID-definitions.patch +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | From 13e475d4826aa0be579632fd2a7473aee213e82b Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
3 | Date: Wed, 23 Nov 2011 10:54:31 +0100 | ||
4 | Subject: [PATCH 082/129] HID: multitouch: cleanup with eGalax PID definitions | ||
5 | |||
6 | commit e36f690b37945e0a9bb1554e1546eeec93f7d1f6 upstream. | ||
7 | |||
8 | This is just a renaming of USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH{N} | ||
9 | to USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_{PID} to handle more eGalax | ||
10 | devices. | ||
11 | |||
12 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
13 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | drivers/hid/hid-core.c | 12 ++++++------ | ||
17 | drivers/hid/hid-ids.h | 12 ++++++------ | ||
18 | drivers/hid/hid-multitouch.c | 24 ++++++++++++------------ | ||
19 | 3 files changed, 24 insertions(+), 24 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
22 | index b51cbf2..4434aba 100644 | ||
23 | --- a/drivers/hid/hid-core.c | ||
24 | +++ b/drivers/hid/hid-core.c | ||
25 | @@ -1404,12 +1404,12 @@ static const struct hid_device_id hid_have_special_driver[] = { | ||
26 | { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, | ||
27 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, | ||
28 | { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) }, | ||
29 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | ||
30 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, | ||
31 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | ||
32 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
33 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
34 | - { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, | ||
35 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) }, | ||
36 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) }, | ||
37 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, | ||
38 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, | ||
39 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, | ||
40 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, | ||
41 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | ||
42 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, | ||
43 | { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, | ||
44 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
45 | index 4c9a342..9db8789 100644 | ||
46 | --- a/drivers/hid/hid-ids.h | ||
47 | +++ b/drivers/hid/hid-ids.h | ||
48 | @@ -230,12 +230,12 @@ | ||
49 | |||
50 | #define USB_VENDOR_ID_DWAV 0x0eef | ||
51 | #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 | ||
52 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d | ||
53 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c | ||
54 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 | ||
55 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e | ||
56 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b | ||
57 | -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001 | ||
58 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d | ||
59 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e | ||
60 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c | ||
61 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b | ||
62 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 | ||
63 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 | ||
64 | |||
65 | #define USB_VENDOR_ID_ELECOM 0x056e | ||
66 | #define USB_DEVICE_ID_ELECOM_BM084 0x0061 | ||
67 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
68 | index a59d939..815bd22 100644 | ||
69 | --- a/drivers/hid/hid-multitouch.c | ||
70 | +++ b/drivers/hid/hid-multitouch.c | ||
71 | @@ -645,26 +645,26 @@ static const struct hid_device_id mt_devices[] = { | ||
72 | USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, | ||
73 | |||
74 | /* eGalax devices (resistive) */ | ||
75 | - { .driver_data = MT_CLS_EGALAX, | ||
76 | + { .driver_data = MT_CLS_EGALAX, | ||
77 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
78 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, | ||
79 | - { .driver_data = MT_CLS_EGALAX, | ||
80 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) }, | ||
81 | + { .driver_data = MT_CLS_EGALAX, | ||
82 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
83 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, | ||
84 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) }, | ||
85 | |||
86 | /* eGalax devices (capacitive) */ | ||
87 | - { .driver_data = MT_CLS_EGALAX, | ||
88 | + { .driver_data = MT_CLS_EGALAX, | ||
89 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
90 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, | ||
91 | - { .driver_data = MT_CLS_EGALAX, | ||
92 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, | ||
93 | + { .driver_data = MT_CLS_EGALAX, | ||
94 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
95 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, | ||
96 | - { .driver_data = MT_CLS_EGALAX, | ||
97 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, | ||
98 | + { .driver_data = MT_CLS_EGALAX, | ||
99 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
100 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, | ||
101 | - { .driver_data = MT_CLS_EGALAX, | ||
102 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, | ||
103 | + { .driver_data = MT_CLS_EGALAX, | ||
104 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
105 | - USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, | ||
106 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, | ||
107 | |||
108 | /* Elo TouchSystems IntelliTouch Plus panel */ | ||
109 | { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, | ||
110 | -- | ||
111 | 1.7.9.5 | ||
112 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch deleted file mode 100644 index f038705d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0083-HID-multitouch-Add-egalax-ID-for-Acer-Iconia-W500.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From d92a1f3e6dbdf628dec0f2a37f3920f89ef304fa Mon Sep 17 00:00:00 2001 | ||
2 | From: Marek Vasut <marek.vasut@gmail.com> | ||
3 | Date: Wed, 23 Nov 2011 10:54:32 +0100 | ||
4 | Subject: [PATCH 083/129] HID: multitouch: Add egalax ID for Acer Iconia W500 | ||
5 | |||
6 | commit bb9ff21072043634f147c05ac65dbf8185d4af6d upstream. | ||
7 | |||
8 | This patch adds USB ID for the touchpanel in Acer Iconia W500. The panel | ||
9 | supports up to five fingers, therefore the need for a new addition of panel | ||
10 | types. | ||
11 | |||
12 | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> | ||
13 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
14 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/hid/hid-core.c | 1 + | ||
18 | drivers/hid/hid-ids.h | 1 + | ||
19 | drivers/hid/hid-multitouch.c | 3 +++ | ||
20 | 3 files changed, 5 insertions(+) | ||
21 | |||
22 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
23 | index 4434aba..9cee7b2 100644 | ||
24 | --- a/drivers/hid/hid-core.c | ||
25 | +++ b/drivers/hid/hid-core.c | ||
26 | @@ -1409,6 +1409,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | ||
27 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, | ||
28 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, | ||
29 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, | ||
30 | + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, | ||
31 | { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, | ||
32 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, | ||
33 | { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, | ||
34 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
35 | index 9db8789..9eb90b1 100644 | ||
36 | --- a/drivers/hid/hid-ids.h | ||
37 | +++ b/drivers/hid/hid-ids.h | ||
38 | @@ -235,6 +235,7 @@ | ||
39 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c | ||
40 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b | ||
41 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 | ||
42 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 | ||
43 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 | ||
44 | |||
45 | #define USB_VENDOR_ID_ELECOM 0x056e | ||
46 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
47 | index 815bd22..c77d495 100644 | ||
48 | --- a/drivers/hid/hid-multitouch.c | ||
49 | +++ b/drivers/hid/hid-multitouch.c | ||
50 | @@ -664,6 +664,9 @@ static const struct hid_device_id mt_devices[] = { | ||
51 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, | ||
52 | { .driver_data = MT_CLS_EGALAX, | ||
53 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
54 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, | ||
55 | + { .driver_data = MT_CLS_EGALAX, | ||
56 | + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
57 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, | ||
58 | |||
59 | /* Elo TouchSystems IntelliTouch Plus panel */ | ||
60 | -- | ||
61 | 1.7.9.5 | ||
62 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch deleted file mode 100644 index 94eb6c36..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0084-HID-multitouch-add-support-for-the-MSI-Windpad-110W.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From a68c39aa3ae77996cb2f2cefe21ad1e62e1767a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
3 | Date: Wed, 23 Nov 2011 10:54:33 +0100 | ||
4 | Subject: [PATCH 084/129] HID: multitouch: add support for the MSI Windpad | ||
5 | 110W | ||
6 | |||
7 | commit 66f06127f34ad6e8a1b24a2c03144b694d19f99f upstream. | ||
8 | |||
9 | Just another eGalax device. | ||
10 | Please note that adding this device to have_special_driver | ||
11 | in hid-core.c is not required anymore. | ||
12 | |||
13 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
14 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/hid/hid-ids.h | 1 + | ||
18 | drivers/hid/hid-multitouch.c | 3 +++ | ||
19 | 2 files changed, 4 insertions(+) | ||
20 | |||
21 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
22 | index 9eb90b1..6ccd7df 100644 | ||
23 | --- a/drivers/hid/hid-ids.h | ||
24 | +++ b/drivers/hid/hid-ids.h | ||
25 | @@ -235,6 +235,7 @@ | ||
26 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c | ||
27 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b | ||
28 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 | ||
29 | +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa | ||
30 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 | ||
31 | #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 | ||
32 | |||
33 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
34 | index c77d495..6f6b1d9 100644 | ||
35 | --- a/drivers/hid/hid-multitouch.c | ||
36 | +++ b/drivers/hid/hid-multitouch.c | ||
37 | @@ -664,6 +664,9 @@ static const struct hid_device_id mt_devices[] = { | ||
38 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, | ||
39 | { .driver_data = MT_CLS_EGALAX, | ||
40 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
41 | + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) }, | ||
42 | + { .driver_data = MT_CLS_EGALAX, | ||
43 | + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
44 | USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, | ||
45 | { .driver_data = MT_CLS_EGALAX, | ||
46 | HID_USB_DEVICE(USB_VENDOR_ID_DWAV, | ||
47 | -- | ||
48 | 1.7.9.5 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch deleted file mode 100644 index f04d3eea..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0085-HID-hid-multitouch-add-support-for-new-Hanvon-panels.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 4ed2fc990faee86390129e45efc3a3538bbac92b Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
3 | Date: Tue, 29 Nov 2011 13:13:12 +0100 | ||
4 | Subject: [PATCH 085/129] HID: hid-multitouch: add support for new Hanvon | ||
5 | panels | ||
6 | |||
7 | commit 545803651da8dde248eeb8ce3ed1e547e9e4ac0a upstream. | ||
8 | |||
9 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr> | ||
10 | Acked-by: Henrik Rydberg <rydberg@euromail.se> | ||
11 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | drivers/hid/hid-core.c | 1 + | ||
15 | drivers/hid/hid-ids.h | 3 +++ | ||
16 | drivers/hid/hid-multitouch.c | 5 +++++ | ||
17 | 3 files changed, 9 insertions(+) | ||
18 | |||
19 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
20 | index 9cee7b2..a1cb906 100644 | ||
21 | --- a/drivers/hid/hid-core.c | ||
22 | +++ b/drivers/hid/hid-core.c | ||
23 | @@ -1425,6 +1425,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | ||
24 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) }, | ||
25 | { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) }, | ||
26 | { HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, | ||
27 | + { HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT, USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) }, | ||
28 | { HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, USB_DEVICE_ID_IDEACOM_IDC6650) }, | ||
29 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) }, | ||
30 | { HID_USB_DEVICE(USB_VENDOR_ID_ILITEK, USB_DEVICE_ID_ILITEK_MULTITOUCH) }, | ||
31 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
32 | index 6ccd7df..56df290 100644 | ||
33 | --- a/drivers/hid/hid-ids.h | ||
34 | +++ b/drivers/hid/hid-ids.h | ||
35 | @@ -359,6 +359,9 @@ | ||
36 | #define USB_VENDOR_ID_HANVON 0x20b3 | ||
37 | #define USB_DEVICE_ID_HANVON_MULTITOUCH 0x0a18 | ||
38 | |||
39 | +#define USB_VENDOR_ID_HANVON_ALT 0x22ed | ||
40 | +#define USB_DEVICE_ID_HANVON_ALT_MULTITOUCH 0x1010 | ||
41 | + | ||
42 | #define USB_VENDOR_ID_HAPP 0x078b | ||
43 | #define USB_DEVICE_ID_UGCI_DRIVING 0x0010 | ||
44 | #define USB_DEVICE_ID_UGCI_FLYING 0x0020 | ||
45 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
46 | index 6f6b1d9..ea20c8e 100644 | ||
47 | --- a/drivers/hid/hid-multitouch.c | ||
48 | +++ b/drivers/hid/hid-multitouch.c | ||
49 | @@ -687,6 +687,11 @@ static const struct hid_device_id mt_devices[] = { | ||
50 | HID_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH, | ||
51 | USB_DEVICE_ID_GOODTOUCH_000f) }, | ||
52 | |||
53 | + /* Hanvon panels */ | ||
54 | + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID, | ||
55 | + HID_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT, | ||
56 | + USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) }, | ||
57 | + | ||
58 | /* Ideacom panel */ | ||
59 | { .driver_data = MT_CLS_SERIAL, | ||
60 | HID_USB_DEVICE(USB_VENDOR_ID_IDEACOM, | ||
61 | -- | ||
62 | 1.7.9.5 | ||
63 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch deleted file mode 100644 index 4298a32c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0086-HID-multitouch-add-support-of-Atmel-multitouch-panel.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From e554f29a63f8eae08e42cb59b1bc715fbf91b340 Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
3 | Date: Fri, 23 Dec 2011 15:40:59 +0100 | ||
4 | Subject: [PATCH 086/129] HID: multitouch: add support of Atmel multitouch | ||
5 | panels | ||
6 | |||
7 | commit b105712469d957cf1ab223c1ea72b7ba88edb926 upstream. | ||
8 | |||
9 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
10 | Acked-by: Henrik Rydberg <rydberg@euromail.se> | ||
11 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | drivers/hid/Kconfig | 1 + | ||
15 | drivers/hid/hid-ids.h | 3 +++ | ||
16 | drivers/hid/hid-multitouch.c | 5 +++++ | ||
17 | 3 files changed, 9 insertions(+) | ||
18 | |||
19 | diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig | ||
20 | index 332c22a..36f5df3 100644 | ||
21 | --- a/drivers/hid/Kconfig | ||
22 | +++ b/drivers/hid/Kconfig | ||
23 | @@ -335,6 +335,7 @@ config HID_MULTITOUCH | ||
24 | Say Y here if you have one of the following devices: | ||
25 | - 3M PCT touch screens | ||
26 | - ActionStar dual touch panels | ||
27 | + - Atmel panels | ||
28 | - Cando dual touch panels | ||
29 | - Chunghwa panels | ||
30 | - CVTouch panels | ||
31 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
32 | index 56df290..bf95a50 100644 | ||
33 | --- a/drivers/hid/hid-ids.h | ||
34 | +++ b/drivers/hid/hid-ids.h | ||
35 | @@ -145,6 +145,9 @@ | ||
36 | #define USB_DEVICE_ID_ATEN_4PORTKVM 0x2205 | ||
37 | #define USB_DEVICE_ID_ATEN_4PORTKVMC 0x2208 | ||
38 | |||
39 | +#define USB_VENDOR_ID_ATMEL 0x03eb | ||
40 | +#define USB_DEVICE_ID_ATMEL_MULTITOUCH 0x211c | ||
41 | + | ||
42 | #define USB_VENDOR_ID_AVERMEDIA 0x07ca | ||
43 | #define USB_DEVICE_ID_AVER_FM_MR800 0xb800 | ||
44 | |||
45 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
46 | index ea20c8e..7f83024 100644 | ||
47 | --- a/drivers/hid/hid-multitouch.c | ||
48 | +++ b/drivers/hid/hid-multitouch.c | ||
49 | @@ -615,6 +615,11 @@ static const struct hid_device_id mt_devices[] = { | ||
50 | HID_USB_DEVICE(USB_VENDOR_ID_ACTIONSTAR, | ||
51 | USB_DEVICE_ID_ACTIONSTAR_1011) }, | ||
52 | |||
53 | + /* Atmel panels */ | ||
54 | + { .driver_data = MT_CLS_SERIAL, | ||
55 | + HID_USB_DEVICE(USB_VENDOR_ID_ATMEL, | ||
56 | + USB_DEVICE_ID_ATMEL_MULTITOUCH) }, | ||
57 | + | ||
58 | /* Cando panels */ | ||
59 | { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, | ||
60 | HID_USB_DEVICE(USB_VENDOR_ID_CANDO, | ||
61 | -- | ||
62 | 1.7.9.5 | ||
63 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch deleted file mode 100644 index f3afca55..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0087-HID-multitouch-add-support-for-3M-32.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 40fd7506c85fcb799dedb54d4bce3118a56078cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
3 | Date: Fri, 23 Dec 2011 15:41:00 +0100 | ||
4 | Subject: [PATCH 087/129] HID: multitouch: add support for 3M 32" | ||
5 | |||
6 | commit c4fad877cd0efb51d8180ae2eaa791c99c92051c upstream. | ||
7 | |||
8 | Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> | ||
9 | Acked-by: Henrik Rydberg <rydberg@euromail.se> | ||
10 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
11 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
12 | --- | ||
13 | drivers/hid/hid-ids.h | 1 + | ||
14 | drivers/hid/hid-multitouch.c | 3 +++ | ||
15 | 2 files changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
18 | index bf95a50..6e53391a 100644 | ||
19 | --- a/drivers/hid/hid-ids.h | ||
20 | +++ b/drivers/hid/hid-ids.h | ||
21 | @@ -21,6 +21,7 @@ | ||
22 | #define USB_VENDOR_ID_3M 0x0596 | ||
23 | #define USB_DEVICE_ID_3M1968 0x0500 | ||
24 | #define USB_DEVICE_ID_3M2256 0x0502 | ||
25 | +#define USB_DEVICE_ID_3M3266 0x0506 | ||
26 | |||
27 | #define USB_VENDOR_ID_A4TECH 0x09da | ||
28 | #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006 | ||
29 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
30 | index 7f83024..4a63dee 100644 | ||
31 | --- a/drivers/hid/hid-multitouch.c | ||
32 | +++ b/drivers/hid/hid-multitouch.c | ||
33 | @@ -609,6 +609,9 @@ static const struct hid_device_id mt_devices[] = { | ||
34 | { .driver_data = MT_CLS_3M, | ||
35 | HID_USB_DEVICE(USB_VENDOR_ID_3M, | ||
36 | USB_DEVICE_ID_3M2256) }, | ||
37 | + { .driver_data = MT_CLS_3M, | ||
38 | + HID_USB_DEVICE(USB_VENDOR_ID_3M, | ||
39 | + USB_DEVICE_ID_3M3266) }, | ||
40 | |||
41 | /* ActionStar panels */ | ||
42 | { .driver_data = MT_CLS_DEFAULT, | ||
43 | -- | ||
44 | 1.7.9.5 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch deleted file mode 100644 index 8d2bfef5..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0088-HID-hid-multitouch-add-support-9-new-Xiroku-devices.patch +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | From 7d63e2bd6f004a4c99c40f9768efe4fa3bef6d28 Mon Sep 17 00:00:00 2001 | ||
2 | From: Masatoshi Hoshikawa <hoshikawa@xiroku.com> | ||
3 | Date: Thu, 5 Jan 2012 11:53:46 +0900 | ||
4 | Subject: [PATCH 088/129] HID: hid-multitouch: add support 9 new Xiroku | ||
5 | devices | ||
6 | |||
7 | commit 11576c6114c3b6505aea2e0c988bedb856a0e20c upstream. | ||
8 | |||
9 | This patch adds support for the Xiroku Inc. panels (SPX/MPX/CSR/etc.). | ||
10 | |||
11 | Signed-off-by: Masatoshi Hoshikawa <hoshikawa@xiroku.com> | ||
12 | Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | drivers/hid/Kconfig | 1 + | ||
16 | drivers/hid/hid-core.c | 9 +++++++++ | ||
17 | drivers/hid/hid-ids.h | 11 +++++++++++ | ||
18 | drivers/hid/hid-multitouch.c | 29 +++++++++++++++++++++++++++++ | ||
19 | 4 files changed, 50 insertions(+) | ||
20 | |||
21 | diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig | ||
22 | index 36f5df3..d21f6d0 100644 | ||
23 | --- a/drivers/hid/Kconfig | ||
24 | +++ b/drivers/hid/Kconfig | ||
25 | @@ -356,6 +356,7 @@ config HID_MULTITOUCH | ||
26 | - Touch International Panels | ||
27 | - Unitec Panels | ||
28 | - XAT optical touch panels | ||
29 | + - Xiroku optical touch panels | ||
30 | |||
31 | If unsure, say N. | ||
32 | |||
33 | diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c | ||
34 | index a1cb906..bb656d8 100644 | ||
35 | --- a/drivers/hid/hid-core.c | ||
36 | +++ b/drivers/hid/hid-core.c | ||
37 | @@ -1552,6 +1552,15 @@ static const struct hid_device_id hid_have_special_driver[] = { | ||
38 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH) }, | ||
39 | { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH) }, | ||
40 | { HID_USB_DEVICE(USB_VENDOR_ID_XAT, USB_DEVICE_ID_XAT_CSR) }, | ||
41 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX) }, | ||
42 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX) }, | ||
43 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR) }, | ||
44 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX1) }, | ||
45 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX1) }, | ||
46 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR1) }, | ||
47 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_SPX2) }, | ||
48 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_MPX2) }, | ||
49 | + { HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, USB_DEVICE_ID_XIROKU_CSR2) }, | ||
50 | { HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE) }, | ||
51 | { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) }, | ||
52 | { HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) }, | ||
53 | diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h | ||
54 | index 6e53391a..00cabb3 100644 | ||
55 | --- a/drivers/hid/hid-ids.h | ||
56 | +++ b/drivers/hid/hid-ids.h | ||
57 | @@ -717,6 +717,17 @@ | ||
58 | #define USB_VENDOR_ID_XAT 0x2505 | ||
59 | #define USB_DEVICE_ID_XAT_CSR 0x0220 | ||
60 | |||
61 | +#define USB_VENDOR_ID_XIROKU 0x1477 | ||
62 | +#define USB_DEVICE_ID_XIROKU_SPX 0x1006 | ||
63 | +#define USB_DEVICE_ID_XIROKU_MPX 0x1007 | ||
64 | +#define USB_DEVICE_ID_XIROKU_CSR 0x100e | ||
65 | +#define USB_DEVICE_ID_XIROKU_SPX1 0x1021 | ||
66 | +#define USB_DEVICE_ID_XIROKU_CSR1 0x1022 | ||
67 | +#define USB_DEVICE_ID_XIROKU_MPX1 0x1023 | ||
68 | +#define USB_DEVICE_ID_XIROKU_SPX2 0x1024 | ||
69 | +#define USB_DEVICE_ID_XIROKU_CSR2 0x1025 | ||
70 | +#define USB_DEVICE_ID_XIROKU_MPX2 0x1026 | ||
71 | + | ||
72 | #define USB_VENDOR_ID_YEALINK 0x6993 | ||
73 | #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K 0xb001 | ||
74 | |||
75 | diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c | ||
76 | index 4a63dee..995fc4c 100644 | ||
77 | --- a/drivers/hid/hid-multitouch.c | ||
78 | +++ b/drivers/hid/hid-multitouch.c | ||
79 | @@ -780,6 +780,35 @@ static const struct hid_device_id mt_devices[] = { | ||
80 | HID_USB_DEVICE(USB_VENDOR_ID_XAT, | ||
81 | USB_DEVICE_ID_XAT_CSR) }, | ||
82 | |||
83 | + /* Xiroku */ | ||
84 | + { .driver_data = MT_CLS_DEFAULT, | ||
85 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
86 | + USB_DEVICE_ID_XIROKU_SPX) }, | ||
87 | + { .driver_data = MT_CLS_DEFAULT, | ||
88 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
89 | + USB_DEVICE_ID_XIROKU_MPX) }, | ||
90 | + { .driver_data = MT_CLS_DEFAULT, | ||
91 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
92 | + USB_DEVICE_ID_XIROKU_CSR) }, | ||
93 | + { .driver_data = MT_CLS_DEFAULT, | ||
94 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
95 | + USB_DEVICE_ID_XIROKU_SPX1) }, | ||
96 | + { .driver_data = MT_CLS_DEFAULT, | ||
97 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
98 | + USB_DEVICE_ID_XIROKU_MPX1) }, | ||
99 | + { .driver_data = MT_CLS_DEFAULT, | ||
100 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
101 | + USB_DEVICE_ID_XIROKU_CSR1) }, | ||
102 | + { .driver_data = MT_CLS_DEFAULT, | ||
103 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
104 | + USB_DEVICE_ID_XIROKU_SPX2) }, | ||
105 | + { .driver_data = MT_CLS_DEFAULT, | ||
106 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
107 | + USB_DEVICE_ID_XIROKU_MPX2) }, | ||
108 | + { .driver_data = MT_CLS_DEFAULT, | ||
109 | + HID_USB_DEVICE(USB_VENDOR_ID_XIROKU, | ||
110 | + USB_DEVICE_ID_XIROKU_CSR2) }, | ||
111 | + | ||
112 | { } | ||
113 | }; | ||
114 | MODULE_DEVICE_TABLE(hid, mt_devices); | ||
115 | -- | ||
116 | 1.7.9.5 | ||
117 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch deleted file mode 100644 index 94a3da33..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0089-fix-cputime-overflow-in-uptime_proc_show.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 36934c4efd11c4f65dd956b2a6649d99ccf5bd86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
3 | Date: Thu, 15 Dec 2011 14:56:10 +0100 | ||
4 | Subject: [PATCH 089/129] fix cputime overflow in uptime_proc_show | ||
5 | |||
6 | commit c3e0ef9a298e028a82ada28101ccd5cf64d209ee upstream. | ||
7 | |||
8 | For 32-bit architectures using standard jiffies the idletime calculation | ||
9 | in uptime_proc_show will quickly overflow. It takes (2^32 / HZ) seconds | ||
10 | of idle-time, or e.g. 12.45 days with no load on a quad-core with HZ=1000. | ||
11 | Switch to 64-bit calculations. | ||
12 | |||
13 | Cc: Michael Abbott <michael.abbott@diamond.ac.uk> | ||
14 | Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | fs/proc/uptime.c | 9 +++++++-- | ||
18 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c | ||
21 | index 766b1d4..29166ec 100644 | ||
22 | --- a/fs/proc/uptime.c | ||
23 | +++ b/fs/proc/uptime.c | ||
24 | @@ -11,15 +11,20 @@ static int uptime_proc_show(struct seq_file *m, void *v) | ||
25 | { | ||
26 | struct timespec uptime; | ||
27 | struct timespec idle; | ||
28 | + cputime64_t idletime; | ||
29 | + u64 nsec; | ||
30 | + u32 rem; | ||
31 | int i; | ||
32 | - cputime_t idletime = cputime_zero; | ||
33 | |||
34 | + idletime = 0; | ||
35 | for_each_possible_cpu(i) | ||
36 | idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle); | ||
37 | |||
38 | do_posix_clock_monotonic_gettime(&uptime); | ||
39 | monotonic_to_bootbased(&uptime); | ||
40 | - cputime_to_timespec(idletime, &idle); | ||
41 | + nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC; | ||
42 | + idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); | ||
43 | + idle.tv_nsec = rem; | ||
44 | seq_printf(m, "%lu.%02lu %lu.%02lu\n", | ||
45 | (unsigned long) uptime.tv_sec, | ||
46 | (uptime.tv_nsec / (NSEC_PER_SEC / 100)), | ||
47 | -- | ||
48 | 1.7.9.5 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch deleted file mode 100644 index e9a2e707..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0090-block-add-and-use-scsi_blk_cmd_ioctl.patch +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | From 151de2f79ddb7f437ada87d5f204be82db004f9d Mon Sep 17 00:00:00 2001 | ||
2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
3 | Date: Thu, 12 Jan 2012 16:01:27 +0100 | ||
4 | Subject: [PATCH 090/129] block: add and use scsi_blk_cmd_ioctl | ||
5 | |||
6 | commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream. | ||
7 | |||
8 | Introduce a wrapper around scsi_cmd_ioctl that takes a block device. | ||
9 | |||
10 | The function will then be enhanced to detect partition block devices | ||
11 | and, in that case, subject the ioctls to whitelisting. | ||
12 | |||
13 | Cc: linux-scsi@vger.kernel.org | ||
14 | Cc: Jens Axboe <axboe@kernel.dk> | ||
15 | Cc: James Bottomley <JBottomley@parallels.com> | ||
16 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
17 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | block/scsi_ioctl.c | 7 +++++++ | ||
21 | drivers/block/cciss.c | 6 +++--- | ||
22 | drivers/block/ub.c | 3 +-- | ||
23 | drivers/block/virtio_blk.c | 4 ++-- | ||
24 | drivers/cdrom/cdrom.c | 3 +-- | ||
25 | drivers/ide/ide-floppy_ioctl.c | 3 +-- | ||
26 | drivers/scsi/sd.c | 2 +- | ||
27 | include/linux/blkdev.h | 2 ++ | ||
28 | 8 files changed, 18 insertions(+), 12 deletions(-) | ||
29 | |||
30 | diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c | ||
31 | index fbdf0d8..a2c11f3 100644 | ||
32 | --- a/block/scsi_ioctl.c | ||
33 | +++ b/block/scsi_ioctl.c | ||
34 | @@ -690,6 +690,13 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod | ||
35 | } | ||
36 | EXPORT_SYMBOL(scsi_cmd_ioctl); | ||
37 | |||
38 | +int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode, | ||
39 | + unsigned int cmd, void __user *arg) | ||
40 | +{ | ||
41 | + return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg); | ||
42 | +} | ||
43 | +EXPORT_SYMBOL(scsi_cmd_blk_ioctl); | ||
44 | + | ||
45 | static int __init blk_scsi_ioctl_init(void) | ||
46 | { | ||
47 | blk_set_cmd_filter_defaults(&blk_default_cmd_filter); | ||
48 | diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c | ||
49 | index 587cce5..b0f553b 100644 | ||
50 | --- a/drivers/block/cciss.c | ||
51 | +++ b/drivers/block/cciss.c | ||
52 | @@ -1735,7 +1735,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode, | ||
53 | case CCISS_BIG_PASSTHRU: | ||
54 | return cciss_bigpassthru(h, argp); | ||
55 | |||
56 | - /* scsi_cmd_ioctl handles these, below, though some are not */ | ||
57 | + /* scsi_cmd_blk_ioctl handles these, below, though some are not */ | ||
58 | /* very meaningful for cciss. SG_IO is the main one people want. */ | ||
59 | |||
60 | case SG_GET_VERSION_NUM: | ||
61 | @@ -1746,9 +1746,9 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode, | ||
62 | case SG_EMULATED_HOST: | ||
63 | case SG_IO: | ||
64 | case SCSI_IOCTL_SEND_COMMAND: | ||
65 | - return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | ||
66 | + return scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); | ||
67 | |||
68 | - /* scsi_cmd_ioctl would normally handle these, below, but */ | ||
69 | + /* scsi_cmd_blk_ioctl would normally handle these, below, but */ | ||
70 | /* they aren't a good fit for cciss, as CD-ROMs are */ | ||
71 | /* not supported, and we don't have any bus/target/lun */ | ||
72 | /* which we present to the kernel. */ | ||
73 | diff --git a/drivers/block/ub.c b/drivers/block/ub.c | ||
74 | index 0e376d4..7333b9e 100644 | ||
75 | --- a/drivers/block/ub.c | ||
76 | +++ b/drivers/block/ub.c | ||
77 | @@ -1744,12 +1744,11 @@ static int ub_bd_release(struct gendisk *disk, fmode_t mode) | ||
78 | static int ub_bd_ioctl(struct block_device *bdev, fmode_t mode, | ||
79 | unsigned int cmd, unsigned long arg) | ||
80 | { | ||
81 | - struct gendisk *disk = bdev->bd_disk; | ||
82 | void __user *usermem = (void __user *) arg; | ||
83 | int ret; | ||
84 | |||
85 | mutex_lock(&ub_mutex); | ||
86 | - ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem); | ||
87 | + ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, usermem); | ||
88 | mutex_unlock(&ub_mutex); | ||
89 | |||
90 | return ret; | ||
91 | diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c | ||
92 | index 4d0b70a..e46f2f7 100644 | ||
93 | --- a/drivers/block/virtio_blk.c | ||
94 | +++ b/drivers/block/virtio_blk.c | ||
95 | @@ -243,8 +243,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | ||
96 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | ||
97 | return -ENOTTY; | ||
98 | |||
99 | - return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, | ||
100 | - (void __user *)data); | ||
101 | + return scsi_cmd_blk_ioctl(bdev, mode, cmd, | ||
102 | + (void __user *)data); | ||
103 | } | ||
104 | |||
105 | /* We provide getgeo only to please some old bootloader/partitioning tools */ | ||
106 | diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c | ||
107 | index f997c27..cedb231 100644 | ||
108 | --- a/drivers/cdrom/cdrom.c | ||
109 | +++ b/drivers/cdrom/cdrom.c | ||
110 | @@ -2747,12 +2747,11 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev, | ||
111 | { | ||
112 | void __user *argp = (void __user *)arg; | ||
113 | int ret; | ||
114 | - struct gendisk *disk = bdev->bd_disk; | ||
115 | |||
116 | /* | ||
117 | * Try the generic SCSI command ioctl's first. | ||
118 | */ | ||
119 | - ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | ||
120 | + ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); | ||
121 | if (ret != -ENOTTY) | ||
122 | return ret; | ||
123 | |||
124 | diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c | ||
125 | index d267b7a..a22ca84 100644 | ||
126 | --- a/drivers/ide/ide-floppy_ioctl.c | ||
127 | +++ b/drivers/ide/ide-floppy_ioctl.c | ||
128 | @@ -292,8 +292,7 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct block_device *bdev, | ||
129 | * and CDROM_SEND_PACKET (legacy) ioctls | ||
130 | */ | ||
131 | if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND) | ||
132 | - err = scsi_cmd_ioctl(bdev->bd_disk->queue, bdev->bd_disk, | ||
133 | - mode, cmd, argp); | ||
134 | + err = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); | ||
135 | |||
136 | if (err == -ENOTTY) | ||
137 | err = generic_ide_ioctl(drive, bdev, cmd, arg); | ||
138 | diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c | ||
139 | index fa3a591..ffa1c79 100644 | ||
140 | --- a/drivers/scsi/sd.c | ||
141 | +++ b/drivers/scsi/sd.c | ||
142 | @@ -1096,7 +1096,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, | ||
143 | error = scsi_ioctl(sdp, cmd, p); | ||
144 | break; | ||
145 | default: | ||
146 | - error = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, p); | ||
147 | + error = scsi_cmd_blk_ioctl(bdev, mode, cmd, p); | ||
148 | if (error != -ENOTTY) | ||
149 | break; | ||
150 | error = scsi_ioctl(sdp, cmd, p); | ||
151 | diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h | ||
152 | index 94acd81..ca7b869 100644 | ||
153 | --- a/include/linux/blkdev.h | ||
154 | +++ b/include/linux/blkdev.h | ||
155 | @@ -675,6 +675,8 @@ extern int blk_insert_cloned_request(struct request_queue *q, | ||
156 | struct request *rq); | ||
157 | extern void blk_delay_queue(struct request_queue *, unsigned long); | ||
158 | extern void blk_recount_segments(struct request_queue *, struct bio *); | ||
159 | +extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t, | ||
160 | + unsigned int, void __user *); | ||
161 | extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, | ||
162 | unsigned int, void __user *); | ||
163 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, | ||
164 | -- | ||
165 | 1.7.9.5 | ||
166 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch deleted file mode 100644 index 1fa4e50c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0091-block-fail-SCSI-passthrough-ioctls-on-partition-devi.patch +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | From 8dbedb00985bf3ed9848b179a45bb399a733d311 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
3 | Date: Thu, 12 Jan 2012 16:01:28 +0100 | ||
4 | Subject: [PATCH 091/129] block: fail SCSI passthrough ioctls on partition | ||
5 | devices | ||
6 | |||
7 | commit 0bfc96cb77224736dfa35c3c555d37b3646ef35e upstream. | ||
8 | |||
9 | [ Changes with respect to 3.3: return -ENOTTY from scsi_verify_blk_ioctl | ||
10 | and -ENOIOCTLCMD from sd_compat_ioctl. ] | ||
11 | |||
12 | Linux allows executing the SG_IO ioctl on a partition or LVM volume, and | ||
13 | will pass the command to the underlying block device. This is | ||
14 | well-known, but it is also a large security problem when (via Unix | ||
15 | permissions, ACLs, SELinux or a combination thereof) a program or user | ||
16 | needs to be granted access only to part of the disk. | ||
17 | |||
18 | This patch lets partitions forward a small set of harmless ioctls; | ||
19 | others are logged with printk so that we can see which ioctls are | ||
20 | actually sent. In my tests only CDROM_GET_CAPABILITY actually occurred. | ||
21 | Of course it was being sent to a (partition on a) hard disk, so it would | ||
22 | have failed with ENOTTY and the patch isn't changing anything in | ||
23 | practice. Still, I'm treating it specially to avoid spamming the logs. | ||
24 | |||
25 | In principle, this restriction should include programs running with | ||
26 | CAP_SYS_RAWIO. If for example I let a program access /dev/sda2 and | ||
27 | /dev/sdb, it still should not be able to read/write outside the | ||
28 | boundaries of /dev/sda2 independent of the capabilities. However, for | ||
29 | now programs with CAP_SYS_RAWIO will still be allowed to send the | ||
30 | ioctls. Their actions will still be logged. | ||
31 | |||
32 | This patch does not affect the non-libata IDE driver. That driver | ||
33 | however already tests for bd != bd->bd_contains before issuing some | ||
34 | ioctl; it could be restricted further to forbid these ioctls even for | ||
35 | programs running with CAP_SYS_ADMIN/CAP_SYS_RAWIO. | ||
36 | |||
37 | Cc: linux-scsi@vger.kernel.org | ||
38 | Cc: Jens Axboe <axboe@kernel.dk> | ||
39 | Cc: James Bottomley <JBottomley@parallels.com> | ||
40 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
41 | [ Make it also print the command name when warning - Linus ] | ||
42 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
43 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
44 | --- | ||
45 | block/scsi_ioctl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ | ||
46 | drivers/scsi/sd.c | 11 +++++++++-- | ||
47 | include/linux/blkdev.h | 1 + | ||
48 | 3 files changed, 55 insertions(+), 2 deletions(-) | ||
49 | |||
50 | diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c | ||
51 | index a2c11f3..688be8a 100644 | ||
52 | --- a/block/scsi_ioctl.c | ||
53 | +++ b/block/scsi_ioctl.c | ||
54 | @@ -24,6 +24,7 @@ | ||
55 | #include <linux/capability.h> | ||
56 | #include <linux/completion.h> | ||
57 | #include <linux/cdrom.h> | ||
58 | +#include <linux/ratelimit.h> | ||
59 | #include <linux/slab.h> | ||
60 | #include <linux/times.h> | ||
61 | #include <asm/uaccess.h> | ||
62 | @@ -690,9 +691,53 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod | ||
63 | } | ||
64 | EXPORT_SYMBOL(scsi_cmd_ioctl); | ||
65 | |||
66 | +int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd) | ||
67 | +{ | ||
68 | + if (bd && bd == bd->bd_contains) | ||
69 | + return 0; | ||
70 | + | ||
71 | + /* Actually none of these is particularly useful on a partition, | ||
72 | + * but they are safe. | ||
73 | + */ | ||
74 | + switch (cmd) { | ||
75 | + case SCSI_IOCTL_GET_IDLUN: | ||
76 | + case SCSI_IOCTL_GET_BUS_NUMBER: | ||
77 | + case SCSI_IOCTL_GET_PCI: | ||
78 | + case SCSI_IOCTL_PROBE_HOST: | ||
79 | + case SG_GET_VERSION_NUM: | ||
80 | + case SG_SET_TIMEOUT: | ||
81 | + case SG_GET_TIMEOUT: | ||
82 | + case SG_GET_RESERVED_SIZE: | ||
83 | + case SG_SET_RESERVED_SIZE: | ||
84 | + case SG_EMULATED_HOST: | ||
85 | + return 0; | ||
86 | + case CDROM_GET_CAPABILITY: | ||
87 | + /* Keep this until we remove the printk below. udev sends it | ||
88 | + * and we do not want to spam dmesg about it. CD-ROMs do | ||
89 | + * not have partitions, so we get here only for disks. | ||
90 | + */ | ||
91 | + return -ENOTTY; | ||
92 | + default: | ||
93 | + break; | ||
94 | + } | ||
95 | + | ||
96 | + /* In particular, rule out all resets and host-specific ioctls. */ | ||
97 | + printk_ratelimited(KERN_WARNING | ||
98 | + "%s: sending ioctl %x to a partition!\n", current->comm, cmd); | ||
99 | + | ||
100 | + return capable(CAP_SYS_RAWIO) ? 0 : -ENOTTY; | ||
101 | +} | ||
102 | +EXPORT_SYMBOL(scsi_verify_blk_ioctl); | ||
103 | + | ||
104 | int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode, | ||
105 | unsigned int cmd, void __user *arg) | ||
106 | { | ||
107 | + int ret; | ||
108 | + | ||
109 | + ret = scsi_verify_blk_ioctl(bd, cmd); | ||
110 | + if (ret < 0) | ||
111 | + return ret; | ||
112 | + | ||
113 | return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg); | ||
114 | } | ||
115 | EXPORT_SYMBOL(scsi_cmd_blk_ioctl); | ||
116 | diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c | ||
117 | index ffa1c79..4b63c73 100644 | ||
118 | --- a/drivers/scsi/sd.c | ||
119 | +++ b/drivers/scsi/sd.c | ||
120 | @@ -1074,6 +1074,10 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, | ||
121 | SCSI_LOG_IOCTL(1, sd_printk(KERN_INFO, sdkp, "sd_ioctl: disk=%s, " | ||
122 | "cmd=0x%x\n", disk->disk_name, cmd)); | ||
123 | |||
124 | + error = scsi_verify_blk_ioctl(bdev, cmd); | ||
125 | + if (error < 0) | ||
126 | + return error; | ||
127 | + | ||
128 | /* | ||
129 | * If we are in the middle of error recovery, don't let anyone | ||
130 | * else try and use this device. Also, if error recovery fails, it | ||
131 | @@ -1266,6 +1270,11 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, | ||
132 | unsigned int cmd, unsigned long arg) | ||
133 | { | ||
134 | struct scsi_device *sdev = scsi_disk(bdev->bd_disk)->device; | ||
135 | + int ret; | ||
136 | + | ||
137 | + ret = scsi_verify_blk_ioctl(bdev, cmd); | ||
138 | + if (ret < 0) | ||
139 | + return -ENOIOCTLCMD; | ||
140 | |||
141 | /* | ||
142 | * If we are in the middle of error recovery, don't let anyone | ||
143 | @@ -1277,8 +1286,6 @@ static int sd_compat_ioctl(struct block_device *bdev, fmode_t mode, | ||
144 | return -ENODEV; | ||
145 | |||
146 | if (sdev->host->hostt->compat_ioctl) { | ||
147 | - int ret; | ||
148 | - | ||
149 | ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg); | ||
150 | |||
151 | return ret; | ||
152 | diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h | ||
153 | index ca7b869..0ed1eb0 100644 | ||
154 | --- a/include/linux/blkdev.h | ||
155 | +++ b/include/linux/blkdev.h | ||
156 | @@ -675,6 +675,7 @@ extern int blk_insert_cloned_request(struct request_queue *q, | ||
157 | struct request *rq); | ||
158 | extern void blk_delay_queue(struct request_queue *, unsigned long); | ||
159 | extern void blk_recount_segments(struct request_queue *, struct bio *); | ||
160 | +extern int scsi_verify_blk_ioctl(struct block_device *, unsigned int); | ||
161 | extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t, | ||
162 | unsigned int, void __user *); | ||
163 | extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, | ||
164 | -- | ||
165 | 1.7.9.5 | ||
166 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch deleted file mode 100644 index 044086f3..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0092-dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 3d35ea93b3f19f86a464814e7b59464ec3832e9c Mon Sep 17 00:00:00 2001 | ||
2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
3 | Date: Thu, 12 Jan 2012 16:01:29 +0100 | ||
4 | Subject: [PATCH 092/129] dm: do not forward ioctls from logical volumes to | ||
5 | the underlying device | ||
6 | |||
7 | commit ec8013beddd717d1740cfefb1a9b900deef85462 upstream. | ||
8 | |||
9 | A logical volume can map to just part of underlying physical volume. | ||
10 | In this case, it must be treated like a partition. | ||
11 | |||
12 | Based on a patch from Alasdair G Kergon. | ||
13 | |||
14 | Cc: Alasdair G Kergon <agk@redhat.com> | ||
15 | Cc: dm-devel@redhat.com | ||
16 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
17 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | drivers/md/dm-flakey.c | 11 ++++++++++- | ||
21 | drivers/md/dm-linear.c | 12 +++++++++++- | ||
22 | drivers/md/dm-mpath.c | 6 ++++++ | ||
23 | 3 files changed, 27 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c | ||
26 | index f84c080..9fb18c1 100644 | ||
27 | --- a/drivers/md/dm-flakey.c | ||
28 | +++ b/drivers/md/dm-flakey.c | ||
29 | @@ -368,8 +368,17 @@ static int flakey_status(struct dm_target *ti, status_type_t type, | ||
30 | static int flakey_ioctl(struct dm_target *ti, unsigned int cmd, unsigned long arg) | ||
31 | { | ||
32 | struct flakey_c *fc = ti->private; | ||
33 | + struct dm_dev *dev = fc->dev; | ||
34 | + int r = 0; | ||
35 | |||
36 | - return __blkdev_driver_ioctl(fc->dev->bdev, fc->dev->mode, cmd, arg); | ||
37 | + /* | ||
38 | + * Only pass ioctls through if the device sizes match exactly. | ||
39 | + */ | ||
40 | + if (fc->start || | ||
41 | + ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT) | ||
42 | + r = scsi_verify_blk_ioctl(NULL, cmd); | ||
43 | + | ||
44 | + return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg); | ||
45 | } | ||
46 | |||
47 | static int flakey_merge(struct dm_target *ti, struct bvec_merge_data *bvm, | ||
48 | diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c | ||
49 | index 3921e3b..9728839 100644 | ||
50 | --- a/drivers/md/dm-linear.c | ||
51 | +++ b/drivers/md/dm-linear.c | ||
52 | @@ -116,7 +116,17 @@ static int linear_ioctl(struct dm_target *ti, unsigned int cmd, | ||
53 | unsigned long arg) | ||
54 | { | ||
55 | struct linear_c *lc = (struct linear_c *) ti->private; | ||
56 | - return __blkdev_driver_ioctl(lc->dev->bdev, lc->dev->mode, cmd, arg); | ||
57 | + struct dm_dev *dev = lc->dev; | ||
58 | + int r = 0; | ||
59 | + | ||
60 | + /* | ||
61 | + * Only pass ioctls through if the device sizes match exactly. | ||
62 | + */ | ||
63 | + if (lc->start || | ||
64 | + ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT) | ||
65 | + r = scsi_verify_blk_ioctl(NULL, cmd); | ||
66 | + | ||
67 | + return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg); | ||
68 | } | ||
69 | |||
70 | static int linear_merge(struct dm_target *ti, struct bvec_merge_data *bvm, | ||
71 | diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c | ||
72 | index 5e0090e..801d92d 100644 | ||
73 | --- a/drivers/md/dm-mpath.c | ||
74 | +++ b/drivers/md/dm-mpath.c | ||
75 | @@ -1520,6 +1520,12 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd, | ||
76 | |||
77 | spin_unlock_irqrestore(&m->lock, flags); | ||
78 | |||
79 | + /* | ||
80 | + * Only pass ioctls through if the device sizes match exactly. | ||
81 | + */ | ||
82 | + if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) | ||
83 | + r = scsi_verify_blk_ioctl(NULL, cmd); | ||
84 | + | ||
85 | return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg); | ||
86 | } | ||
87 | |||
88 | -- | ||
89 | 1.7.9.5 | ||
90 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch deleted file mode 100644 index 5c2c5661..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0093-proc-clean-up-and-fix-proc-pid-mem-handling.patch +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | From b1eff256d4110a894a3a70a224d3581136645ada Mon Sep 17 00:00:00 2001 | ||
2 | From: Linus Torvalds <torvalds@linux-foundation.org> | ||
3 | Date: Tue, 17 Jan 2012 15:21:19 -0800 | ||
4 | Subject: [PATCH 093/129] proc: clean up and fix /proc/<pid>/mem handling | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | commit e268337dfe26dfc7efd422a804dbb27977a3cccc upstream. | ||
10 | |||
11 | Jüri Aedla reported that the /proc/<pid>/mem handling really isn't very | ||
12 | robust, and it also doesn't match the permission checking of any of the | ||
13 | other related files. | ||
14 | |||
15 | This changes it to do the permission checks at open time, and instead of | ||
16 | tracking the process, it tracks the VM at the time of the open. That | ||
17 | simplifies the code a lot, but does mean that if you hold the file | ||
18 | descriptor open over an execve(), you'll continue to read from the _old_ | ||
19 | VM. | ||
20 | |||
21 | That is different from our previous behavior, but much simpler. If | ||
22 | somebody actually finds a load where this matters, we'll need to revert | ||
23 | this commit. | ||
24 | |||
25 | I suspect that nobody will ever notice - because the process mapping | ||
26 | addresses will also have changed as part of the execve. So you cannot | ||
27 | actually usefully access the fd across a VM change simply because all | ||
28 | the offsets for IO would have changed too. | ||
29 | |||
30 | Reported-by: Jüri Aedla <asd@ut.ee> | ||
31 | Cc: Al Viro <viro@zeniv.linux.org.uk> | ||
32 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
34 | --- | ||
35 | fs/proc/base.c | 145 +++++++++++++++----------------------------------------- | ||
36 | 1 file changed, 39 insertions(+), 106 deletions(-) | ||
37 | |||
38 | diff --git a/fs/proc/base.c b/fs/proc/base.c | ||
39 | index 851ba3d..1fc1dca 100644 | ||
40 | --- a/fs/proc/base.c | ||
41 | +++ b/fs/proc/base.c | ||
42 | @@ -194,65 +194,7 @@ static int proc_root_link(struct inode *inode, struct path *path) | ||
43 | return result; | ||
44 | } | ||
45 | |||
46 | -static struct mm_struct *__check_mem_permission(struct task_struct *task) | ||
47 | -{ | ||
48 | - struct mm_struct *mm; | ||
49 | - | ||
50 | - mm = get_task_mm(task); | ||
51 | - if (!mm) | ||
52 | - return ERR_PTR(-EINVAL); | ||
53 | - | ||
54 | - /* | ||
55 | - * A task can always look at itself, in case it chooses | ||
56 | - * to use system calls instead of load instructions. | ||
57 | - */ | ||
58 | - if (task == current) | ||
59 | - return mm; | ||
60 | - | ||
61 | - /* | ||
62 | - * If current is actively ptrace'ing, and would also be | ||
63 | - * permitted to freshly attach with ptrace now, permit it. | ||
64 | - */ | ||
65 | - if (task_is_stopped_or_traced(task)) { | ||
66 | - int match; | ||
67 | - rcu_read_lock(); | ||
68 | - match = (ptrace_parent(task) == current); | ||
69 | - rcu_read_unlock(); | ||
70 | - if (match && ptrace_may_access(task, PTRACE_MODE_ATTACH)) | ||
71 | - return mm; | ||
72 | - } | ||
73 | - | ||
74 | - /* | ||
75 | - * No one else is allowed. | ||
76 | - */ | ||
77 | - mmput(mm); | ||
78 | - return ERR_PTR(-EPERM); | ||
79 | -} | ||
80 | - | ||
81 | -/* | ||
82 | - * If current may access user memory in @task return a reference to the | ||
83 | - * corresponding mm, otherwise ERR_PTR. | ||
84 | - */ | ||
85 | -static struct mm_struct *check_mem_permission(struct task_struct *task) | ||
86 | -{ | ||
87 | - struct mm_struct *mm; | ||
88 | - int err; | ||
89 | - | ||
90 | - /* | ||
91 | - * Avoid racing if task exec's as we might get a new mm but validate | ||
92 | - * against old credentials. | ||
93 | - */ | ||
94 | - err = mutex_lock_killable(&task->signal->cred_guard_mutex); | ||
95 | - if (err) | ||
96 | - return ERR_PTR(err); | ||
97 | - | ||
98 | - mm = __check_mem_permission(task); | ||
99 | - mutex_unlock(&task->signal->cred_guard_mutex); | ||
100 | - | ||
101 | - return mm; | ||
102 | -} | ||
103 | - | ||
104 | -struct mm_struct *mm_for_maps(struct task_struct *task) | ||
105 | +static struct mm_struct *mm_access(struct task_struct *task, unsigned int mode) | ||
106 | { | ||
107 | struct mm_struct *mm; | ||
108 | int err; | ||
109 | @@ -263,7 +205,7 @@ struct mm_struct *mm_for_maps(struct task_struct *task) | ||
110 | |||
111 | mm = get_task_mm(task); | ||
112 | if (mm && mm != current->mm && | ||
113 | - !ptrace_may_access(task, PTRACE_MODE_READ)) { | ||
114 | + !ptrace_may_access(task, mode)) { | ||
115 | mmput(mm); | ||
116 | mm = ERR_PTR(-EACCES); | ||
117 | } | ||
118 | @@ -272,6 +214,11 @@ struct mm_struct *mm_for_maps(struct task_struct *task) | ||
119 | return mm; | ||
120 | } | ||
121 | |||
122 | +struct mm_struct *mm_for_maps(struct task_struct *task) | ||
123 | +{ | ||
124 | + return mm_access(task, PTRACE_MODE_READ); | ||
125 | +} | ||
126 | + | ||
127 | static int proc_pid_cmdline(struct task_struct *task, char * buffer) | ||
128 | { | ||
129 | int res = 0; | ||
130 | @@ -816,38 +763,39 @@ static const struct file_operations proc_single_file_operations = { | ||
131 | |||
132 | static int mem_open(struct inode* inode, struct file* file) | ||
133 | { | ||
134 | - file->private_data = (void*)((long)current->self_exec_id); | ||
135 | + struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); | ||
136 | + struct mm_struct *mm; | ||
137 | + | ||
138 | + if (!task) | ||
139 | + return -ESRCH; | ||
140 | + | ||
141 | + mm = mm_access(task, PTRACE_MODE_ATTACH); | ||
142 | + put_task_struct(task); | ||
143 | + | ||
144 | + if (IS_ERR(mm)) | ||
145 | + return PTR_ERR(mm); | ||
146 | + | ||
147 | /* OK to pass negative loff_t, we can catch out-of-range */ | ||
148 | file->f_mode |= FMODE_UNSIGNED_OFFSET; | ||
149 | + file->private_data = mm; | ||
150 | + | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | static ssize_t mem_read(struct file * file, char __user * buf, | ||
155 | size_t count, loff_t *ppos) | ||
156 | { | ||
157 | - struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); | ||
158 | + int ret; | ||
159 | char *page; | ||
160 | unsigned long src = *ppos; | ||
161 | - int ret = -ESRCH; | ||
162 | - struct mm_struct *mm; | ||
163 | + struct mm_struct *mm = file->private_data; | ||
164 | |||
165 | - if (!task) | ||
166 | - goto out_no_task; | ||
167 | + if (!mm) | ||
168 | + return 0; | ||
169 | |||
170 | - ret = -ENOMEM; | ||
171 | page = (char *)__get_free_page(GFP_TEMPORARY); | ||
172 | if (!page) | ||
173 | - goto out; | ||
174 | - | ||
175 | - mm = check_mem_permission(task); | ||
176 | - ret = PTR_ERR(mm); | ||
177 | - if (IS_ERR(mm)) | ||
178 | - goto out_free; | ||
179 | - | ||
180 | - ret = -EIO; | ||
181 | - | ||
182 | - if (file->private_data != (void*)((long)current->self_exec_id)) | ||
183 | - goto out_put; | ||
184 | + return -ENOMEM; | ||
185 | |||
186 | ret = 0; | ||
187 | |||
188 | @@ -874,13 +822,7 @@ static ssize_t mem_read(struct file * file, char __user * buf, | ||
189 | } | ||
190 | *ppos = src; | ||
191 | |||
192 | -out_put: | ||
193 | - mmput(mm); | ||
194 | -out_free: | ||
195 | free_page((unsigned long) page); | ||
196 | -out: | ||
197 | - put_task_struct(task); | ||
198 | -out_no_task: | ||
199 | return ret; | ||
200 | } | ||
201 | |||
202 | @@ -889,27 +831,15 @@ static ssize_t mem_write(struct file * file, const char __user *buf, | ||
203 | { | ||
204 | int copied; | ||
205 | char *page; | ||
206 | - struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode); | ||
207 | unsigned long dst = *ppos; | ||
208 | - struct mm_struct *mm; | ||
209 | + struct mm_struct *mm = file->private_data; | ||
210 | |||
211 | - copied = -ESRCH; | ||
212 | - if (!task) | ||
213 | - goto out_no_task; | ||
214 | + if (!mm) | ||
215 | + return 0; | ||
216 | |||
217 | - copied = -ENOMEM; | ||
218 | page = (char *)__get_free_page(GFP_TEMPORARY); | ||
219 | if (!page) | ||
220 | - goto out_task; | ||
221 | - | ||
222 | - mm = check_mem_permission(task); | ||
223 | - copied = PTR_ERR(mm); | ||
224 | - if (IS_ERR(mm)) | ||
225 | - goto out_free; | ||
226 | - | ||
227 | - copied = -EIO; | ||
228 | - if (file->private_data != (void *)((long)current->self_exec_id)) | ||
229 | - goto out_mm; | ||
230 | + return -ENOMEM; | ||
231 | |||
232 | copied = 0; | ||
233 | while (count > 0) { | ||
234 | @@ -933,13 +863,7 @@ static ssize_t mem_write(struct file * file, const char __user *buf, | ||
235 | } | ||
236 | *ppos = dst; | ||
237 | |||
238 | -out_mm: | ||
239 | - mmput(mm); | ||
240 | -out_free: | ||
241 | free_page((unsigned long) page); | ||
242 | -out_task: | ||
243 | - put_task_struct(task); | ||
244 | -out_no_task: | ||
245 | return copied; | ||
246 | } | ||
247 | |||
248 | @@ -959,11 +883,20 @@ loff_t mem_lseek(struct file *file, loff_t offset, int orig) | ||
249 | return file->f_pos; | ||
250 | } | ||
251 | |||
252 | +static int mem_release(struct inode *inode, struct file *file) | ||
253 | +{ | ||
254 | + struct mm_struct *mm = file->private_data; | ||
255 | + | ||
256 | + mmput(mm); | ||
257 | + return 0; | ||
258 | +} | ||
259 | + | ||
260 | static const struct file_operations proc_mem_operations = { | ||
261 | .llseek = mem_lseek, | ||
262 | .read = mem_read, | ||
263 | .write = mem_write, | ||
264 | .open = mem_open, | ||
265 | + .release = mem_release, | ||
266 | }; | ||
267 | |||
268 | static ssize_t environ_read(struct file *file, char __user *buf, | ||
269 | -- | ||
270 | 1.7.9.5 | ||
271 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch deleted file mode 100644 index 92722cf2..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0094-ALSA-HDA-Use-LPIB-position-fix-for-Macbook-Pro-7-1.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From a8cd5ec584f74044ccca71a50312fac4e69f4d64 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Henningsson <david.henningsson@canonical.com> | ||
3 | Date: Thu, 12 Jan 2012 16:31:14 +0100 | ||
4 | Subject: [PATCH 094/129] ALSA: HDA: Use LPIB position fix for Macbook Pro 7,1 | ||
5 | |||
6 | commit b01de4fb40137fbda7530550ff0cd37171dafb0c upstream. | ||
7 | |||
8 | Several users have reported "choppy" audio under the 3.2 kernel, | ||
9 | and that changing position_fix to 1 has resolved their problem. | ||
10 | The chip is an nVidia Corporation MCP89 High Definition Audio, | ||
11 | [10de:0d94] (rev a2). | ||
12 | |||
13 | BugLink: https://bugs.launchpad.net/bugs/909419 | ||
14 | Signed-off-by: David Henningsson <david.henningsson@canonical.com> | ||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | sound/pci/hda/hda_intel.c | 1 + | ||
19 | 1 file changed, 1 insertion(+) | ||
20 | |||
21 | diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c | ||
22 | index c2f79e6..5b2b75b 100644 | ||
23 | --- a/sound/pci/hda/hda_intel.c | ||
24 | +++ b/sound/pci/hda/hda_intel.c | ||
25 | @@ -2509,6 +2509,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | ||
26 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), | ||
27 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS 1101HA", POS_FIX_LPIB), | ||
28 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), | ||
29 | + SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), | ||
30 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), | ||
31 | SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB), | ||
32 | SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB), | ||
33 | -- | ||
34 | 1.7.9.5 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch deleted file mode 100644 index 5e1651fe..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0095-ALSA-virtuoso-Xonar-DS-fix-polarity-of-front-output.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 142a4939e76aa02d8e2d8338a63dabf59bc83f1b Mon Sep 17 00:00:00 2001 | ||
2 | From: Clemens Ladisch <clemens@ladisch.de> | ||
3 | Date: Sat, 14 Jan 2012 16:42:24 +0100 | ||
4 | Subject: [PATCH 095/129] ALSA: virtuoso: Xonar DS: fix polarity of front | ||
5 | output | ||
6 | |||
7 | commit f0e48b6bd4e407459715240cd241ddb6b89bdf81 upstream. | ||
8 | |||
9 | The two DACs for the front output and the surround/center/LFE/back | ||
10 | outputs are wired up out of phase, so when channels are duplicated, | ||
11 | their sound can cancel out each other and result in a weaker bass | ||
12 | response. To fix this, reverse the polarity of the neutron flow to | ||
13 | the front output. | ||
14 | |||
15 | Reported-any-tested-by: Daniel Hill <daniel@enemyplanet.geek.nz> | ||
16 | Signed-off-by: Clemens Ladisch <clemens@ladisch.de> | ||
17 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | sound/pci/oxygen/xonar_wm87x6.c | 1 + | ||
21 | 1 file changed, 1 insertion(+) | ||
22 | |||
23 | diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c | ||
24 | index 42d1ab1..915546a 100644 | ||
25 | --- a/sound/pci/oxygen/xonar_wm87x6.c | ||
26 | +++ b/sound/pci/oxygen/xonar_wm87x6.c | ||
27 | @@ -177,6 +177,7 @@ static void wm8776_registers_init(struct oxygen *chip) | ||
28 | struct xonar_wm87x6 *data = chip->model_data; | ||
29 | |||
30 | wm8776_write(chip, WM8776_RESET, 0); | ||
31 | + wm8776_write(chip, WM8776_PHASESWAP, WM8776_PH_MASK); | ||
32 | wm8776_write(chip, WM8776_DACCTRL1, WM8776_DZCEN | | ||
33 | WM8776_PL_LEFT_LEFT | WM8776_PL_RIGHT_RIGHT); | ||
34 | wm8776_write(chip, WM8776_DACMUTE, chip->dac_mute ? WM8776_DMUTE : 0); | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch deleted file mode 100644 index 6bad4a43..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0096-ALSA-HDA-Fix-internal-microphone-on-Dell-Studio-16-X.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From c46905cc61a1b5ff0500d15d79ba8110283e6c58 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Henningsson <david.henningsson@canonical.com> | ||
3 | Date: Mon, 16 Jan 2012 10:52:20 +0100 | ||
4 | Subject: [PATCH 096/129] ALSA: HDA: Fix internal microphone on Dell Studio 16 | ||
5 | XPS 1645 | ||
6 | |||
7 | commit ffe535edb9a9c5b4d5fe03dfa3d89a1495580f1b upstream. | ||
8 | |||
9 | More than one user reports that changing the model from "both" to | ||
10 | "dmic" makes their Internal Mic work. | ||
11 | |||
12 | Tested-by: Martin Ling <martin-launchpad@earth.li> | ||
13 | BugLink: https://bugs.launchpad.net/bugs/795823 | ||
14 | Signed-off-by: David Henningsson <david.henningsson@canonical.com> | ||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | sound/pci/hda/patch_sigmatel.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c | ||
22 | index a87b260..f3c73a9 100644 | ||
23 | --- a/sound/pci/hda/patch_sigmatel.c | ||
24 | +++ b/sound/pci/hda/patch_sigmatel.c | ||
25 | @@ -1631,7 +1631,7 @@ static const struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { | ||
26 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02bd, | ||
27 | "Dell Studio 1557", STAC_DELL_M6_DMIC), | ||
28 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02fe, | ||
29 | - "Dell Studio XPS 1645", STAC_DELL_M6_BOTH), | ||
30 | + "Dell Studio XPS 1645", STAC_DELL_M6_DMIC), | ||
31 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0413, | ||
32 | "Dell Studio 1558", STAC_DELL_M6_DMIC), | ||
33 | {} /* terminator */ | ||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch deleted file mode 100644 index 3393f768..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0097-TOMOYO-Accept-000-as-a-valid-character.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From df8b89ac669c66d219a762da1ba79151acce2bf1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tetsuo Handa <from-tomoyo-users-en@I-love.SAKURA.ne.jp> | ||
3 | Date: Sun, 15 Jan 2012 11:05:59 +0900 | ||
4 | Subject: [PATCH 097/129] TOMOYO: Accept \000 as a valid character. | ||
5 | |||
6 | commit 25add8cf99c9ec8b8dc0acd8b9241e963fc0d29c upstream. | ||
7 | |||
8 | TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address. | ||
9 | Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or | ||
10 | TOMOYO 2.5 cannot handle Unix domain's abstract socket address. | ||
11 | |||
12 | Reported-by: Steven Allen <steven@stebalien.com> | ||
13 | Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | ||
14 | Signed-off-by: James Morris <jmorris@namei.org> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | security/tomoyo/util.c | 6 +++--- | ||
18 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/security/tomoyo/util.c b/security/tomoyo/util.c | ||
21 | index 4a9b4b2..867558c 100644 | ||
22 | --- a/security/tomoyo/util.c | ||
23 | +++ b/security/tomoyo/util.c | ||
24 | @@ -492,13 +492,13 @@ static bool tomoyo_correct_word2(const char *string, size_t len) | ||
25 | if (d < '0' || d > '7' || e < '0' || e > '7') | ||
26 | break; | ||
27 | c = tomoyo_make_byte(c, d, e); | ||
28 | - if (tomoyo_invalid(c)) | ||
29 | - continue; /* pattern is not \000 */ | ||
30 | + if (c <= ' ' || c >= 127) | ||
31 | + continue; | ||
32 | } | ||
33 | goto out; | ||
34 | } else if (in_repetition && c == '/') { | ||
35 | goto out; | ||
36 | - } else if (tomoyo_invalid(c)) { | ||
37 | + } else if (c <= ' ' || c >= 127) { | ||
38 | goto out; | ||
39 | } | ||
40 | } | ||
41 | -- | ||
42 | 1.7.9.5 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch deleted file mode 100644 index 410dc4ff..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0098-intel-idle-Make-idle-driver-more-robust.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From 0e193a44b182c4d14fd4ec0eda63e1cba9e4a0a7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Renninger <trenn@suse.de> | ||
3 | Date: Sun, 4 Dec 2011 22:17:29 +0100 | ||
4 | Subject: [PATCH 098/129] intel idle: Make idle driver more robust | ||
5 | |||
6 | commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream. | ||
7 | |||
8 | kvm -cpu host passes the original cpuid info to the guest. | ||
9 | |||
10 | Latest kvm version seem to return true for mwait_leaf cpuid | ||
11 | function on recent Intel CPUs. But it does not return mwait | ||
12 | C-states (mwait_substates), instead zero is returned. | ||
13 | |||
14 | While real CPUs seem to always return non-zero values, the intel | ||
15 | idle driver should not get active in kvm (mwait_substates == 0) | ||
16 | case and bail out. | ||
17 | Otherwise a Null pointer exception will happen later when the | ||
18 | cpuidle subsystem tries to get active: | ||
19 | [0.984807] BUG: unable to handle kernel NULL pointer dereference at (null) | ||
20 | [0.984807] IP: [<(null)>] (null) | ||
21 | ... | ||
22 | [0.984807][<ffffffff8143cf34>] ? cpuidle_idle_call+0xb4/0x340 | ||
23 | [0.984807][<ffffffff8159e7bc>] ? __atomic_notifier_call_chain+0x4c/0x70 | ||
24 | [0.984807][<ffffffff81001198>] ? cpu_idle+0x78/0xd0 | ||
25 | |||
26 | Reference: | ||
27 | https://bugzilla.novell.com/show_bug.cgi?id=726296 | ||
28 | |||
29 | Signed-off-by: Thomas Renninger <trenn@suse.de> | ||
30 | CC: Bruno Friedmann <bruno@ioda-net.ch> | ||
31 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
33 | --- | ||
34 | drivers/idle/intel_idle.c | 3 ++- | ||
35 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
36 | |||
37 | diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c | ||
38 | index 5d2f8e1..1dafcc3 100644 | ||
39 | --- a/drivers/idle/intel_idle.c | ||
40 | +++ b/drivers/idle/intel_idle.c | ||
41 | @@ -348,7 +348,8 @@ static int intel_idle_probe(void) | ||
42 | cpuid(CPUID_MWAIT_LEAF, &eax, &ebx, &ecx, &mwait_substates); | ||
43 | |||
44 | if (!(ecx & CPUID5_ECX_EXTENSIONS_SUPPORTED) || | ||
45 | - !(ecx & CPUID5_ECX_INTERRUPT_BREAK)) | ||
46 | + !(ecx & CPUID5_ECX_INTERRUPT_BREAK) || | ||
47 | + !mwait_substates) | ||
48 | return -ENODEV; | ||
49 | |||
50 | pr_debug(PREFIX "MWAIT substates: 0x%x\n", mwait_substates); | ||
51 | -- | ||
52 | 1.7.9.5 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch deleted file mode 100644 index cbebf3b7..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0099-intel_idle-fix-API-misuse.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From c8fa4b79449fe6d516847fc308c7126e65d5eec1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shaohua Li <shaohua.li@intel.com> | ||
3 | Date: Tue, 10 Jan 2012 15:48:19 -0800 | ||
4 | Subject: [PATCH 099/129] intel_idle: fix API misuse | ||
5 | |||
6 | commit 39a74fdedd1c1461d6fb6d330b5266886513c98f upstream. | ||
7 | |||
8 | smp_call_function() only lets all other CPUs execute a specific function, | ||
9 | while we expect all CPUs do in intel_idle. Without the fix, we could have | ||
10 | one cpu which has auto_demotion enabled or has no broadcast timer setup. | ||
11 | Usually we don't see impact because auto demotion just harms power and the | ||
12 | intel_idle init is called in CPU 0, where boradcast timer delivers | ||
13 | interrupt, but this still could be a problem. | ||
14 | |||
15 | Signed-off-by: Shaohua Li <shaohua.li@intel.com> | ||
16 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
17 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | drivers/idle/intel_idle.c | 6 +++--- | ||
21 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c | ||
24 | index 1dafcc3..5b39216 100644 | ||
25 | --- a/drivers/idle/intel_idle.c | ||
26 | +++ b/drivers/idle/intel_idle.c | ||
27 | @@ -395,7 +395,7 @@ static int intel_idle_probe(void) | ||
28 | if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */ | ||
29 | lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE; | ||
30 | else { | ||
31 | - smp_call_function(__setup_broadcast_timer, (void *)true, 1); | ||
32 | + on_each_cpu(__setup_broadcast_timer, (void *)true, 1); | ||
33 | register_cpu_notifier(&setup_broadcast_notifier); | ||
34 | } | ||
35 | |||
36 | @@ -472,7 +472,7 @@ static int intel_idle_cpuidle_driver_init(void) | ||
37 | } | ||
38 | |||
39 | if (auto_demotion_disable_flags) | ||
40 | - smp_call_function(auto_demotion_disable, NULL, 1); | ||
41 | + on_each_cpu(auto_demotion_disable, NULL, 1); | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | @@ -569,7 +569,7 @@ static void __exit intel_idle_exit(void) | ||
46 | cpuidle_unregister_driver(&intel_idle_driver); | ||
47 | |||
48 | if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE) { | ||
49 | - smp_call_function(__setup_broadcast_timer, (void *)false, 1); | ||
50 | + on_each_cpu(__setup_broadcast_timer, (void *)false, 1); | ||
51 | unregister_cpu_notifier(&setup_broadcast_notifier); | ||
52 | } | ||
53 | |||
54 | -- | ||
55 | 1.7.9.5 | ||
56 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch deleted file mode 100644 index 5f6eb014..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0100-ACPI-Store-SRAT-table-revision.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From 8f15cb284e8a758b4040fd87729b365bb7805dbb Mon Sep 17 00:00:00 2001 | ||
2 | From: Kurt Garloff <kurt@garloff.de> | ||
3 | Date: Tue, 17 Jan 2012 04:18:02 -0500 | ||
4 | Subject: [PATCH 100/129] ACPI: Store SRAT table revision | ||
5 | |||
6 | commit 8df0eb7c9d96f9e82f233ee8b74e0f0c8471f868 upstream. | ||
7 | |||
8 | In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides | ||
9 | 32bits for these. The new fields were reserved before. | ||
10 | According to the ACPI spec, the OS must disregrard reserved fields. | ||
11 | In order to know whether or not, we must know what version the SRAT | ||
12 | table has. | ||
13 | |||
14 | This patch stores the SRAT table revision for later consumption | ||
15 | by arch specific __init functions. | ||
16 | |||
17 | Signed-off-by: Kurt Garloff <kurt@garloff.de> | ||
18 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
20 | --- | ||
21 | drivers/acpi/numa.c | 6 ++++++ | ||
22 | include/acpi/acpi_numa.h | 1 + | ||
23 | 2 files changed, 7 insertions(+) | ||
24 | |||
25 | diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c | ||
26 | index 3b5c318..e56f3be 100644 | ||
27 | --- a/drivers/acpi/numa.c | ||
28 | +++ b/drivers/acpi/numa.c | ||
29 | @@ -45,6 +45,8 @@ static int pxm_to_node_map[MAX_PXM_DOMAINS] | ||
30 | static int node_to_pxm_map[MAX_NUMNODES] | ||
31 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; | ||
32 | |||
33 | +unsigned char acpi_srat_revision __initdata; | ||
34 | + | ||
35 | int pxm_to_node(int pxm) | ||
36 | { | ||
37 | if (pxm < 0) | ||
38 | @@ -255,9 +257,13 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header, | ||
39 | |||
40 | static int __init acpi_parse_srat(struct acpi_table_header *table) | ||
41 | { | ||
42 | + struct acpi_table_srat *srat; | ||
43 | if (!table) | ||
44 | return -EINVAL; | ||
45 | |||
46 | + srat = (struct acpi_table_srat *)table; | ||
47 | + acpi_srat_revision = srat->header.revision; | ||
48 | + | ||
49 | /* Real work done in acpi_table_parse_srat below. */ | ||
50 | |||
51 | return 0; | ||
52 | diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h | ||
53 | index 1739726..451823c 100644 | ||
54 | --- a/include/acpi/acpi_numa.h | ||
55 | +++ b/include/acpi/acpi_numa.h | ||
56 | @@ -15,6 +15,7 @@ extern int pxm_to_node(int); | ||
57 | extern int node_to_pxm(int); | ||
58 | extern void __acpi_map_pxm_to_node(int, int); | ||
59 | extern int acpi_map_pxm_to_node(int); | ||
60 | +extern unsigned char acpi_srat_revision; | ||
61 | |||
62 | #endif /* CONFIG_ACPI_NUMA */ | ||
63 | #endif /* __ACP_NUMA_H */ | ||
64 | -- | ||
65 | 1.7.9.5 | ||
66 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch deleted file mode 100644 index 22098603..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0101-ACPI-x86-Use-SRAT-table-rev-to-use-8bit-or-32bit-PXM.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 63a87105c14ecf9a81f741a3864b775901237f53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kurt Garloff <kurt@garloff.de> | ||
3 | Date: Tue, 17 Jan 2012 04:20:31 -0500 | ||
4 | Subject: [PATCH 101/129] ACPI, x86: Use SRAT table rev to use 8bit or 32bit | ||
5 | PXM fields (x86/x86-64) | ||
6 | |||
7 | commit cd298f60a2451a16e0f077404bf69b62ec868733 upstream. | ||
8 | |||
9 | In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides | ||
10 | 32bits for these. The new fields were reserved before. | ||
11 | According to the ACPI spec, the OS must disregrard reserved fields. | ||
12 | |||
13 | x86/x86-64 was rather inconsistent prior to this patch; it used 8 bits | ||
14 | for the pxm field in cpu_affinity, but 32 bits in mem_affinity. | ||
15 | This patch makes it consistent: Either use 8 bits consistently (SRAT | ||
16 | rev 1 or lower) or 32 bits (SRAT rev 2 or higher). | ||
17 | |||
18 | cc: x86@kernel.org | ||
19 | Signed-off-by: Kurt Garloff <kurt@garloff.de> | ||
20 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
22 | --- | ||
23 | arch/x86/mm/srat.c | 4 ++++ | ||
24 | 1 file changed, 4 insertions(+) | ||
25 | |||
26 | diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c | ||
27 | index 81dbfde..7efd0c6 100644 | ||
28 | --- a/arch/x86/mm/srat.c | ||
29 | +++ b/arch/x86/mm/srat.c | ||
30 | @@ -104,6 +104,8 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) | ||
31 | if ((pa->flags & ACPI_SRAT_CPU_ENABLED) == 0) | ||
32 | return; | ||
33 | pxm = pa->proximity_domain_lo; | ||
34 | + if (acpi_srat_revision >= 2) | ||
35 | + pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8; | ||
36 | node = setup_node(pxm); | ||
37 | if (node < 0) { | ||
38 | printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm); | ||
39 | @@ -155,6 +157,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) | ||
40 | start = ma->base_address; | ||
41 | end = start + ma->length; | ||
42 | pxm = ma->proximity_domain; | ||
43 | + if (acpi_srat_revision <= 1) | ||
44 | + pxm &= 0xff; | ||
45 | node = setup_node(pxm); | ||
46 | if (node < 0) { | ||
47 | printk(KERN_ERR "SRAT: Too many proximity domains.\n"); | ||
48 | -- | ||
49 | 1.7.9.5 | ||
50 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch deleted file mode 100644 index 9aa68af7..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0102-ACPI-ia64-Use-SRAT-table-rev-to-use-8bit-or-16-32bit.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From d9beea03fc99ab5df65264a47802449c6630a8bf Mon Sep 17 00:00:00 2001 | ||
2 | From: Kurt Garloff <kurt@garloff.de> | ||
3 | Date: Tue, 17 Jan 2012 04:21:49 -0500 | ||
4 | Subject: [PATCH 102/129] ACPI, ia64: Use SRAT table rev to use 8bit or | ||
5 | 16/32bit PXM fields (ia64) | ||
6 | |||
7 | commit 9f10f6a520deb3639fac78d81151a3ade88b4e7f upstream. | ||
8 | |||
9 | In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides | ||
10 | 32bits for these. The new fields were reserved before. | ||
11 | According to the ACPI spec, the OS must disregrard reserved fields. | ||
12 | |||
13 | ia64 did handle the PXM fields almost consistently, but depending on | ||
14 | sgi's sn2 platform. This patch leaves the sn2 logic in, but does also | ||
15 | use 16/32 bits for PXM if the SRAT has rev 2 or higher. | ||
16 | |||
17 | The patch also adds __init to the two pxm accessor functions, as they | ||
18 | access __initdata now and are called from an __init function only anyway. | ||
19 | |||
20 | Note that the code only uses 16 bits for the PXM field in the processor | ||
21 | proximity field; the patch does not address this as 16 bits are more than | ||
22 | enough. | ||
23 | |||
24 | Signed-off-by: Kurt Garloff <kurt@garloff.de> | ||
25 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
27 | --- | ||
28 | arch/ia64/kernel/acpi.c | 10 ++++++---- | ||
29 | 1 file changed, 6 insertions(+), 4 deletions(-) | ||
30 | |||
31 | diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c | ||
32 | index bfb4d01..5207035 100644 | ||
33 | --- a/arch/ia64/kernel/acpi.c | ||
34 | +++ b/arch/ia64/kernel/acpi.c | ||
35 | @@ -429,22 +429,24 @@ static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; | ||
36 | static struct acpi_table_slit __initdata *slit_table; | ||
37 | cpumask_t early_cpu_possible_map = CPU_MASK_NONE; | ||
38 | |||
39 | -static int get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa) | ||
40 | +static int __init | ||
41 | +get_processor_proximity_domain(struct acpi_srat_cpu_affinity *pa) | ||
42 | { | ||
43 | int pxm; | ||
44 | |||
45 | pxm = pa->proximity_domain_lo; | ||
46 | - if (ia64_platform_is("sn2")) | ||
47 | + if (ia64_platform_is("sn2") || acpi_srat_revision >= 2) | ||
48 | pxm += pa->proximity_domain_hi[0] << 8; | ||
49 | return pxm; | ||
50 | } | ||
51 | |||
52 | -static int get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma) | ||
53 | +static int __init | ||
54 | +get_memory_proximity_domain(struct acpi_srat_mem_affinity *ma) | ||
55 | { | ||
56 | int pxm; | ||
57 | |||
58 | pxm = ma->proximity_domain; | ||
59 | - if (!ia64_platform_is("sn2")) | ||
60 | + if (!ia64_platform_is("sn2") && acpi_srat_revision <= 1) | ||
61 | pxm &= 0xff; | ||
62 | |||
63 | return pxm; | ||
64 | -- | ||
65 | 1.7.9.5 | ||
66 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch deleted file mode 100644 index 66d96729..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0103-ACPICA-Put-back-the-call-to-acpi_os_validate_address.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From 0279b040f1dafa5f545c9ef255b39a99f9490750 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lin Ming <ming.m.lin@intel.com> | ||
3 | Date: Tue, 29 Nov 2011 22:13:35 +0800 | ||
4 | Subject: [PATCH 103/129] ACPICA: Put back the call to | ||
5 | acpi_os_validate_address | ||
6 | |||
7 | commit da4d8b287abe783d30e968155614531a0937d090 upstream. | ||
8 | |||
9 | The call to acpi_os_validate_address in acpi_ds_get_region_arguments was | ||
10 | removed by mistake in commit 9ad19ac(ACPICA: Split large dsopcode and | ||
11 | dsload.c files). | ||
12 | |||
13 | Put it back. | ||
14 | |||
15 | Reported-and-bisected-by: Luca Tettamanti <kronos.it@gmail.com> | ||
16 | Signed-off-by: Lin Ming <ming.m.lin@intel.com> | ||
17 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | drivers/acpi/acpica/dsargs.c | 24 ++++++++++++++++++++++++ | ||
21 | 1 file changed, 24 insertions(+) | ||
22 | |||
23 | diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c | ||
24 | index 8c7b997..42163d8 100644 | ||
25 | --- a/drivers/acpi/acpica/dsargs.c | ||
26 | +++ b/drivers/acpi/acpica/dsargs.c | ||
27 | @@ -387,5 +387,29 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) | ||
28 | status = acpi_ds_execute_arguments(node, node->parent, | ||
29 | extra_desc->extra.aml_length, | ||
30 | extra_desc->extra.aml_start); | ||
31 | + if (ACPI_FAILURE(status)) { | ||
32 | + return_ACPI_STATUS(status); | ||
33 | + } | ||
34 | + | ||
35 | + /* Validate the region address/length via the host OS */ | ||
36 | + | ||
37 | + status = acpi_os_validate_address(obj_desc->region.space_id, | ||
38 | + obj_desc->region.address, | ||
39 | + (acpi_size) obj_desc->region.length, | ||
40 | + acpi_ut_get_node_name(node)); | ||
41 | + | ||
42 | + if (ACPI_FAILURE(status)) { | ||
43 | + /* | ||
44 | + * Invalid address/length. We will emit an error message and mark | ||
45 | + * the region as invalid, so that it will cause an additional error if | ||
46 | + * it is ever used. Then return AE_OK. | ||
47 | + */ | ||
48 | + ACPI_EXCEPTION((AE_INFO, status, | ||
49 | + "During address validation of OpRegion [%4.4s]", | ||
50 | + node->name.ascii)); | ||
51 | + obj_desc->common.flags |= AOPOBJ_INVALID; | ||
52 | + status = AE_OK; | ||
53 | + } | ||
54 | + | ||
55 | return_ACPI_STATUS(status); | ||
56 | } | ||
57 | -- | ||
58 | 1.7.9.5 | ||
59 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch deleted file mode 100644 index edd3fc36..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0104-ACPI-processor-fix-acpi_get_cpuid-for-UP-processor.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 639adc94e82ece74d00c447a2e5d9180bdfd5355 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lin Ming <ming.m.lin@intel.com> | ||
3 | Date: Tue, 13 Dec 2011 09:36:03 +0800 | ||
4 | Subject: [PATCH 104/129] ACPI: processor: fix acpi_get_cpuid for UP processor | ||
5 | |||
6 | commit d640113fe80e45ebd4a5b420b220d3f6bf37f682 upstream. | ||
7 | |||
8 | For UP processor, it is likely that no _MAT method or MADT table defined. | ||
9 | So currently acpi_get_cpuid(...) always return -1 for UP processor. | ||
10 | This is wrong. It should return valid value for CPU0. | ||
11 | |||
12 | In the other hand, BIOS may define multiple CPU handles even for UP | ||
13 | processor, for example | ||
14 | |||
15 | Scope (_PR) | ||
16 | { | ||
17 | Processor (CPU0, 0x00, 0x00000410, 0x06) {} | ||
18 | Processor (CPU1, 0x01, 0x00000410, 0x06) {} | ||
19 | Processor (CPU2, 0x02, 0x00000410, 0x06) {} | ||
20 | Processor (CPU3, 0x03, 0x00000410, 0x06) {} | ||
21 | } | ||
22 | |||
23 | We should only return valid value for CPU0's acpi handle. | ||
24 | And return invalid value for others. | ||
25 | |||
26 | http://marc.info/?t=132329819900003&r=1&w=2 | ||
27 | |||
28 | Reported-and-tested-by: wallak@free.fr | ||
29 | Signed-off-by: Lin Ming <ming.m.lin@intel.com> | ||
30 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
31 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
32 | --- | ||
33 | drivers/acpi/processor_core.c | 26 ++++++++++++++++++++++++-- | ||
34 | 1 file changed, 24 insertions(+), 2 deletions(-) | ||
35 | |||
36 | diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c | ||
37 | index 3a0428e..c850de4 100644 | ||
38 | --- a/drivers/acpi/processor_core.c | ||
39 | +++ b/drivers/acpi/processor_core.c | ||
40 | @@ -173,8 +173,30 @@ int acpi_get_cpuid(acpi_handle handle, int type, u32 acpi_id) | ||
41 | apic_id = map_mat_entry(handle, type, acpi_id); | ||
42 | if (apic_id == -1) | ||
43 | apic_id = map_madt_entry(type, acpi_id); | ||
44 | - if (apic_id == -1) | ||
45 | - return apic_id; | ||
46 | + if (apic_id == -1) { | ||
47 | + /* | ||
48 | + * On UP processor, there is no _MAT or MADT table. | ||
49 | + * So above apic_id is always set to -1. | ||
50 | + * | ||
51 | + * BIOS may define multiple CPU handles even for UP processor. | ||
52 | + * For example, | ||
53 | + * | ||
54 | + * Scope (_PR) | ||
55 | + * { | ||
56 | + * Processor (CPU0, 0x00, 0x00000410, 0x06) {} | ||
57 | + * Processor (CPU1, 0x01, 0x00000410, 0x06) {} | ||
58 | + * Processor (CPU2, 0x02, 0x00000410, 0x06) {} | ||
59 | + * Processor (CPU3, 0x03, 0x00000410, 0x06) {} | ||
60 | + * } | ||
61 | + * | ||
62 | + * Ignores apic_id and always return 0 for CPU0's handle. | ||
63 | + * Return -1 for other CPU's handle. | ||
64 | + */ | ||
65 | + if (acpi_id == 0) | ||
66 | + return acpi_id; | ||
67 | + else | ||
68 | + return apic_id; | ||
69 | + } | ||
70 | |||
71 | #ifdef CONFIG_SMP | ||
72 | for_each_possible_cpu(i) { | ||
73 | -- | ||
74 | 1.7.9.5 | ||
75 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch deleted file mode 100644 index e91b3609..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0105-sym53c8xx-Fix-NULL-pointer-dereference-in-slave_dest.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From af1ad4d4ecbbfca6424c1f8fa40e1aec8fae4836 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stratos Psomadakis <psomas@gentoo.org> | ||
3 | Date: Sun, 4 Dec 2011 02:23:54 +0200 | ||
4 | Subject: [PATCH 105/129] sym53c8xx: Fix NULL pointer dereference in | ||
5 | slave_destroy | ||
6 | |||
7 | commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b upstream. | ||
8 | |||
9 | sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has | ||
10 | succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference | ||
11 | (exposed by commit 4e6c82b). | ||
12 | |||
13 | Signed-off-by: Stratos Psomadakis <psomas@gentoo.org> | ||
14 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/scsi/sym53c8xx_2/sym_glue.c | 4 ++++ | ||
18 | 1 file changed, 4 insertions(+) | ||
19 | |||
20 | diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c | ||
21 | index b4543f5..36d1ed7 100644 | ||
22 | --- a/drivers/scsi/sym53c8xx_2/sym_glue.c | ||
23 | +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | ||
24 | @@ -839,6 +839,10 @@ static void sym53c8xx_slave_destroy(struct scsi_device *sdev) | ||
25 | struct sym_lcb *lp = sym_lp(tp, sdev->lun); | ||
26 | unsigned long flags; | ||
27 | |||
28 | + /* if slave_alloc returned before allocating a sym_lcb, return */ | ||
29 | + if (!lp) | ||
30 | + return; | ||
31 | + | ||
32 | spin_lock_irqsave(np->s.host->host_lock, flags); | ||
33 | |||
34 | if (lp->busy_itlq || lp->busy_itl) { | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch deleted file mode 100644 index 22c0c37c..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0106-target-Set-response-format-in-INQUIRY-response.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 860d8eb163f67712acbcc072e5362e3ca01ef2b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roland Dreier <roland@purestorage.com> | ||
3 | Date: Tue, 6 Dec 2011 10:02:09 -0800 | ||
4 | Subject: [PATCH 106/129] target: Set response format in INQUIRY response | ||
5 | |||
6 | commit ce136176fea522fc8f4c16dcae7e8ed1d890ca39 upstream. | ||
7 | |||
8 | Current SCSI specs say that the "response format" field in the standard | ||
9 | INQUIRY response should be set to 2, and all the real SCSI devices I | ||
10 | have do put 2 here. So let's do that too. | ||
11 | |||
12 | Signed-off-by: Roland Dreier <roland@purestorage.com> | ||
13 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | drivers/target/target_core_cdb.c | 12 ++++++++++++ | ||
17 | 1 file changed, 12 insertions(+) | ||
18 | |||
19 | diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c | ||
20 | index 831468b..2e8c1be 100644 | ||
21 | --- a/drivers/target/target_core_cdb.c | ||
22 | +++ b/drivers/target/target_core_cdb.c | ||
23 | @@ -94,6 +94,18 @@ target_emulate_inquiry_std(struct se_cmd *cmd) | ||
24 | buf[2] = dev->transport->get_device_rev(dev); | ||
25 | |||
26 | /* | ||
27 | + * NORMACA and HISUP = 0, RESPONSE DATA FORMAT = 2 | ||
28 | + * | ||
29 | + * SPC4 says: | ||
30 | + * A RESPONSE DATA FORMAT field set to 2h indicates that the | ||
31 | + * standard INQUIRY data is in the format defined in this | ||
32 | + * standard. Response data format values less than 2h are | ||
33 | + * obsolete. Response data format values greater than 2h are | ||
34 | + * reserved. | ||
35 | + */ | ||
36 | + buf[3] = 2; | ||
37 | + | ||
38 | + /* | ||
39 | * Enable SCCS and TPGS fields for Emulated ALUA | ||
40 | */ | ||
41 | if (dev->se_sub_dev->t10_alua.alua_type == SPC3_ALUA_EMULATED) | ||
42 | -- | ||
43 | 1.7.9.5 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch deleted file mode 100644 index 2d2bff53..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0107-target-Set-additional-sense-length-field-in-sense-da.patch +++ /dev/null | |||
@@ -1,177 +0,0 @@ | |||
1 | From ae86c4561c40068ef81f484829a47512c99853d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roland Dreier <roland@purestorage.com> | ||
3 | Date: Tue, 13 Dec 2011 14:55:33 -0800 | ||
4 | Subject: [PATCH 107/129] target: Set additional sense length field in sense | ||
5 | data | ||
6 | |||
7 | commit 895f3022523361e9b383cf48f51feb1f7d5e7e53 upstream. | ||
8 | |||
9 | The target code was not setting the additional sense length field in the | ||
10 | sense data it returned, which meant that at least the Linux stack | ||
11 | ignored the ASC/ASCQ fields. For example, without this patch, on a | ||
12 | tcm_loop device: | ||
13 | |||
14 | # sg_raw -v /dev/sda 2 0 0 0 0 0 | ||
15 | |||
16 | gives | ||
17 | |||
18 | cdb to send: 02 00 00 00 00 00 | ||
19 | SCSI Status: Check Condition | ||
20 | |||
21 | Sense Information: | ||
22 | Fixed format, current; Sense key: Illegal Request | ||
23 | Raw sense data (in hex): | ||
24 | 70 00 05 00 00 00 00 00 | ||
25 | |||
26 | while after the patch we correctly get the following (which matches what | ||
27 | a regular disk returns): | ||
28 | |||
29 | cdb to send: 02 00 00 00 00 00 | ||
30 | SCSI Status: Check Condition | ||
31 | |||
32 | Sense Information: | ||
33 | Fixed format, current; Sense key: Illegal Request | ||
34 | Additional sense: Invalid command operation code | ||
35 | Raw sense data (in hex): | ||
36 | 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 | ||
37 | 00 00 | ||
38 | |||
39 | Signed-off-by: Roland Dreier <roland@purestorage.com> | ||
40 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
41 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
42 | --- | ||
43 | drivers/target/target_core_transport.c | 14 ++++++++++++++ | ||
44 | include/target/target_core_base.h | 1 + | ||
45 | 2 files changed, 15 insertions(+) | ||
46 | |||
47 | diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c | ||
48 | index 0257658..e87d0eb 100644 | ||
49 | --- a/drivers/target/target_core_transport.c | ||
50 | +++ b/drivers/target/target_core_transport.c | ||
51 | @@ -4353,6 +4353,7 @@ int transport_send_check_condition_and_sense( | ||
52 | case TCM_NON_EXISTENT_LUN: | ||
53 | /* CURRENT ERROR */ | ||
54 | buffer[offset] = 0x70; | ||
55 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
56 | /* ILLEGAL REQUEST */ | ||
57 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | ||
58 | /* LOGICAL UNIT NOT SUPPORTED */ | ||
59 | @@ -4362,6 +4363,7 @@ int transport_send_check_condition_and_sense( | ||
60 | case TCM_SECTOR_COUNT_TOO_MANY: | ||
61 | /* CURRENT ERROR */ | ||
62 | buffer[offset] = 0x70; | ||
63 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
64 | /* ILLEGAL REQUEST */ | ||
65 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | ||
66 | /* INVALID COMMAND OPERATION CODE */ | ||
67 | @@ -4370,6 +4372,7 @@ int transport_send_check_condition_and_sense( | ||
68 | case TCM_UNKNOWN_MODE_PAGE: | ||
69 | /* CURRENT ERROR */ | ||
70 | buffer[offset] = 0x70; | ||
71 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
72 | /* ILLEGAL REQUEST */ | ||
73 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | ||
74 | /* INVALID FIELD IN CDB */ | ||
75 | @@ -4378,6 +4381,7 @@ int transport_send_check_condition_and_sense( | ||
76 | case TCM_CHECK_CONDITION_ABORT_CMD: | ||
77 | /* CURRENT ERROR */ | ||
78 | buffer[offset] = 0x70; | ||
79 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
80 | /* ABORTED COMMAND */ | ||
81 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
82 | /* BUS DEVICE RESET FUNCTION OCCURRED */ | ||
83 | @@ -4387,6 +4391,7 @@ int transport_send_check_condition_and_sense( | ||
84 | case TCM_INCORRECT_AMOUNT_OF_DATA: | ||
85 | /* CURRENT ERROR */ | ||
86 | buffer[offset] = 0x70; | ||
87 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
88 | /* ABORTED COMMAND */ | ||
89 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
90 | /* WRITE ERROR */ | ||
91 | @@ -4397,6 +4402,7 @@ int transport_send_check_condition_and_sense( | ||
92 | case TCM_INVALID_CDB_FIELD: | ||
93 | /* CURRENT ERROR */ | ||
94 | buffer[offset] = 0x70; | ||
95 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
96 | /* ABORTED COMMAND */ | ||
97 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
98 | /* INVALID FIELD IN CDB */ | ||
99 | @@ -4405,6 +4411,7 @@ int transport_send_check_condition_and_sense( | ||
100 | case TCM_INVALID_PARAMETER_LIST: | ||
101 | /* CURRENT ERROR */ | ||
102 | buffer[offset] = 0x70; | ||
103 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
104 | /* ABORTED COMMAND */ | ||
105 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
106 | /* INVALID FIELD IN PARAMETER LIST */ | ||
107 | @@ -4413,6 +4420,7 @@ int transport_send_check_condition_and_sense( | ||
108 | case TCM_UNEXPECTED_UNSOLICITED_DATA: | ||
109 | /* CURRENT ERROR */ | ||
110 | buffer[offset] = 0x70; | ||
111 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
112 | /* ABORTED COMMAND */ | ||
113 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
114 | /* WRITE ERROR */ | ||
115 | @@ -4423,6 +4431,7 @@ int transport_send_check_condition_and_sense( | ||
116 | case TCM_SERVICE_CRC_ERROR: | ||
117 | /* CURRENT ERROR */ | ||
118 | buffer[offset] = 0x70; | ||
119 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
120 | /* ABORTED COMMAND */ | ||
121 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
122 | /* PROTOCOL SERVICE CRC ERROR */ | ||
123 | @@ -4433,6 +4442,7 @@ int transport_send_check_condition_and_sense( | ||
124 | case TCM_SNACK_REJECTED: | ||
125 | /* CURRENT ERROR */ | ||
126 | buffer[offset] = 0x70; | ||
127 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
128 | /* ABORTED COMMAND */ | ||
129 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND; | ||
130 | /* READ ERROR */ | ||
131 | @@ -4443,6 +4453,7 @@ int transport_send_check_condition_and_sense( | ||
132 | case TCM_WRITE_PROTECTED: | ||
133 | /* CURRENT ERROR */ | ||
134 | buffer[offset] = 0x70; | ||
135 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
136 | /* DATA PROTECT */ | ||
137 | buffer[offset+SPC_SENSE_KEY_OFFSET] = DATA_PROTECT; | ||
138 | /* WRITE PROTECTED */ | ||
139 | @@ -4451,6 +4462,7 @@ int transport_send_check_condition_and_sense( | ||
140 | case TCM_CHECK_CONDITION_UNIT_ATTENTION: | ||
141 | /* CURRENT ERROR */ | ||
142 | buffer[offset] = 0x70; | ||
143 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
144 | /* UNIT ATTENTION */ | ||
145 | buffer[offset+SPC_SENSE_KEY_OFFSET] = UNIT_ATTENTION; | ||
146 | core_scsi3_ua_for_check_condition(cmd, &asc, &ascq); | ||
147 | @@ -4460,6 +4472,7 @@ int transport_send_check_condition_and_sense( | ||
148 | case TCM_CHECK_CONDITION_NOT_READY: | ||
149 | /* CURRENT ERROR */ | ||
150 | buffer[offset] = 0x70; | ||
151 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
152 | /* Not Ready */ | ||
153 | buffer[offset+SPC_SENSE_KEY_OFFSET] = NOT_READY; | ||
154 | transport_get_sense_codes(cmd, &asc, &ascq); | ||
155 | @@ -4470,6 +4483,7 @@ int transport_send_check_condition_and_sense( | ||
156 | default: | ||
157 | /* CURRENT ERROR */ | ||
158 | buffer[offset] = 0x70; | ||
159 | + buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10; | ||
160 | /* ILLEGAL REQUEST */ | ||
161 | buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST; | ||
162 | /* LOGICAL UNIT COMMUNICATION FAILURE */ | ||
163 | diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h | ||
164 | index 6873c7d..a79886c 100644 | ||
165 | --- a/include/target/target_core_base.h | ||
166 | +++ b/include/target/target_core_base.h | ||
167 | @@ -34,6 +34,7 @@ | ||
168 | #define TRANSPORT_SENSE_BUFFER SCSI_SENSE_BUFFERSIZE | ||
169 | /* Used by transport_send_check_condition_and_sense() */ | ||
170 | #define SPC_SENSE_KEY_OFFSET 2 | ||
171 | +#define SPC_ADD_SENSE_LEN_OFFSET 7 | ||
172 | #define SPC_ASC_KEY_OFFSET 12 | ||
173 | #define SPC_ASCQ_KEY_OFFSET 13 | ||
174 | #define TRANSPORT_IQN_LEN 224 | ||
175 | -- | ||
176 | 1.7.9.5 | ||
177 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch deleted file mode 100644 index 1d681ad2..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0108-bcma-invalidate-the-mapped-core-over-suspend-resume.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 744b53e5115a140039ef4e7834bb84797b4db37e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> | ||
3 | Date: Fri, 13 Jan 2012 23:58:38 +0100 | ||
4 | Subject: [PATCH 108/129] bcma: invalidate the mapped core over suspend/resume | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | commit 28e7d218da975f6ae1751e293aed938952c55c98 upstream. | ||
10 | |||
11 | This clears the currently mapped core when suspending, to force | ||
12 | re-mapping after resume. Without that we were touching default core | ||
13 | registers believing some other core is mapped. Such a behaviour | ||
14 | resulted in lockups on some machines. | ||
15 | |||
16 | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> | ||
17 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | drivers/bcma/host_pci.c | 3 +++ | ||
21 | 1 file changed, 3 insertions(+) | ||
22 | |||
23 | diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c | ||
24 | index 990f5a8..48e06be 100644 | ||
25 | --- a/drivers/bcma/host_pci.c | ||
26 | +++ b/drivers/bcma/host_pci.c | ||
27 | @@ -227,11 +227,14 @@ static void bcma_host_pci_remove(struct pci_dev *dev) | ||
28 | #ifdef CONFIG_PM | ||
29 | static int bcma_host_pci_suspend(struct pci_dev *dev, pm_message_t state) | ||
30 | { | ||
31 | + struct bcma_bus *bus = pci_get_drvdata(dev); | ||
32 | + | ||
33 | /* Host specific */ | ||
34 | pci_save_state(dev); | ||
35 | pci_disable_device(dev); | ||
36 | pci_set_power_state(dev, pci_choose_state(dev, state)); | ||
37 | |||
38 | + bus->mapped_core = NULL; | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | -- | ||
43 | 1.7.9.5 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch deleted file mode 100644 index 281a3800..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0109-cx23885-dvb-check-if-dvb_attach-succeded.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 3fcecb64e1ce21bda3d69718f0fefa1ed0d7f06b Mon Sep 17 00:00:00 2001 | ||
2 | From: Miroslav Slugen <thunder.mmm@gmail.com> | ||
3 | Date: Sun, 11 Dec 2011 18:57:58 -0300 | ||
4 | Subject: [PATCH 109/129] cx23885-dvb: check if dvb_attach() succeded | ||
5 | |||
6 | commit a7c8aadad39428b64d26c3971d967f8314e2397d upstream. | ||
7 | |||
8 | Fix possible null dereference for Leadtek DTV 3200H | ||
9 | XC4000 tuner when no firmware file available. | ||
10 | |||
11 | Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> | ||
12 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | drivers/media/video/cx23885/cx23885-dvb.c | 5 +++++ | ||
16 | 1 file changed, 5 insertions(+) | ||
17 | |||
18 | diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c | ||
19 | index bcb45be..f0482b2 100644 | ||
20 | --- a/drivers/media/video/cx23885/cx23885-dvb.c | ||
21 | +++ b/drivers/media/video/cx23885/cx23885-dvb.c | ||
22 | @@ -940,6 +940,11 @@ static int dvb_register(struct cx23885_tsport *port) | ||
23 | |||
24 | fe = dvb_attach(xc4000_attach, fe0->dvb.frontend, | ||
25 | &dev->i2c_bus[1].i2c_adap, &cfg); | ||
26 | + if (!fe) { | ||
27 | + printk(KERN_ERR "%s/2: xc4000 attach failed\n", | ||
28 | + dev->name); | ||
29 | + goto frontend_detach; | ||
30 | + } | ||
31 | } | ||
32 | break; | ||
33 | case CX23885_BOARD_TBS_6920: | ||
34 | -- | ||
35 | 1.7.9.5 | ||
36 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch deleted file mode 100644 index 3bb70b80..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0110-cx88-fix-don-t-duplicate-xc4000-entry-for-radio.patch +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | From dedbeeab016e8baaeed49bae9f4a0dab47da8a54 Mon Sep 17 00:00:00 2001 | ||
2 | From: Miroslav Slugen <thunder.mmm@gmail.com> | ||
3 | Date: Sun, 11 Dec 2011 19:00:06 -0300 | ||
4 | Subject: [PATCH 110/129] cx88: fix: don't duplicate xc4000 entry for radio | ||
5 | |||
6 | commit b6854e3f31402476bcc9d2f41570389fa491de17 upstream. | ||
7 | |||
8 | All radio tuners in cx88 driver using same address for radio and tuner, | ||
9 | so there is no need to probe it twice for same tuner and we can use | ||
10 | radio_type UNSET, this also fix broken radio since kernel 2.6.39-rc1 | ||
11 | for those tuners. | ||
12 | |||
13 | Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> | ||
14 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
16 | --- | ||
17 | drivers/media/video/cx88/cx88-cards.c | 24 ++++++++++++------------ | ||
18 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c | ||
21 | index 0d719fa..3929d93 100644 | ||
22 | --- a/drivers/media/video/cx88/cx88-cards.c | ||
23 | +++ b/drivers/media/video/cx88/cx88-cards.c | ||
24 | @@ -1573,8 +1573,8 @@ static const struct cx88_board cx88_boards[] = { | ||
25 | .name = "Pinnacle Hybrid PCTV", | ||
26 | .tuner_type = TUNER_XC2028, | ||
27 | .tuner_addr = 0x61, | ||
28 | - .radio_type = TUNER_XC2028, | ||
29 | - .radio_addr = 0x61, | ||
30 | + .radio_type = UNSET, | ||
31 | + .radio_addr = ADDR_UNSET, | ||
32 | .input = { { | ||
33 | .type = CX88_VMUX_TELEVISION, | ||
34 | .vmux = 0, | ||
35 | @@ -1611,8 +1611,8 @@ static const struct cx88_board cx88_boards[] = { | ||
36 | .name = "Leadtek TV2000 XP Global", | ||
37 | .tuner_type = TUNER_XC2028, | ||
38 | .tuner_addr = 0x61, | ||
39 | - .radio_type = TUNER_XC2028, | ||
40 | - .radio_addr = 0x61, | ||
41 | + .radio_type = UNSET, | ||
42 | + .radio_addr = ADDR_UNSET, | ||
43 | .input = { { | ||
44 | .type = CX88_VMUX_TELEVISION, | ||
45 | .vmux = 0, | ||
46 | @@ -2043,8 +2043,8 @@ static const struct cx88_board cx88_boards[] = { | ||
47 | .name = "Terratec Cinergy HT PCI MKII", | ||
48 | .tuner_type = TUNER_XC2028, | ||
49 | .tuner_addr = 0x61, | ||
50 | - .radio_type = TUNER_XC2028, | ||
51 | - .radio_addr = 0x61, | ||
52 | + .radio_type = UNSET, | ||
53 | + .radio_addr = ADDR_UNSET, | ||
54 | .input = { { | ||
55 | .type = CX88_VMUX_TELEVISION, | ||
56 | .vmux = 0, | ||
57 | @@ -2082,9 +2082,9 @@ static const struct cx88_board cx88_boards[] = { | ||
58 | [CX88_BOARD_WINFAST_DTV1800H] = { | ||
59 | .name = "Leadtek WinFast DTV1800 Hybrid", | ||
60 | .tuner_type = TUNER_XC2028, | ||
61 | - .radio_type = TUNER_XC2028, | ||
62 | + .radio_type = UNSET, | ||
63 | .tuner_addr = 0x61, | ||
64 | - .radio_addr = 0x61, | ||
65 | + .radio_addr = ADDR_UNSET, | ||
66 | /* | ||
67 | * GPIO setting | ||
68 | * | ||
69 | @@ -2123,9 +2123,9 @@ static const struct cx88_board cx88_boards[] = { | ||
70 | [CX88_BOARD_WINFAST_DTV1800H_XC4000] = { | ||
71 | .name = "Leadtek WinFast DTV1800 H (XC4000)", | ||
72 | .tuner_type = TUNER_XC4000, | ||
73 | - .radio_type = TUNER_XC4000, | ||
74 | + .radio_type = UNSET, | ||
75 | .tuner_addr = 0x61, | ||
76 | - .radio_addr = 0x61, | ||
77 | + .radio_addr = ADDR_UNSET, | ||
78 | /* | ||
79 | * GPIO setting | ||
80 | * | ||
81 | @@ -2164,9 +2164,9 @@ static const struct cx88_board cx88_boards[] = { | ||
82 | [CX88_BOARD_WINFAST_DTV2000H_PLUS] = { | ||
83 | .name = "Leadtek WinFast DTV2000 H PLUS", | ||
84 | .tuner_type = TUNER_XC4000, | ||
85 | - .radio_type = TUNER_XC4000, | ||
86 | + .radio_type = UNSET, | ||
87 | .tuner_addr = 0x61, | ||
88 | - .radio_addr = 0x61, | ||
89 | + .radio_addr = ADDR_UNSET, | ||
90 | /* | ||
91 | * GPIO | ||
92 | * 2: 1: mute audio | ||
93 | -- | ||
94 | 1.7.9.5 | ||
95 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch deleted file mode 100644 index ca034602..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0111-tuner-Fix-numberspace-conflict-between-xc4000-and-pt.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 5af871e87d37ab57459c6c7244aa4837993ee9eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Miroslav Slugen <thunder.mmm@gmail.com> | ||
3 | Date: Sun, 11 Dec 2011 18:47:32 -0300 | ||
4 | Subject: [PATCH 111/129] tuner: Fix numberspace conflict between xc4000 and | ||
5 | pti 5nf05 tuners | ||
6 | |||
7 | commit cd4ca7afc61d3b18fcd635002459fb6b1d701099 upstream. | ||
8 | |||
9 | Update xc4000 tuner definition, number 81 is already in use by | ||
10 | TUNER_PARTSNIC_PTI_5NF05. | ||
11 | |||
12 | Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> | ||
13 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
14 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
15 | --- | ||
16 | include/media/tuner.h | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/include/media/tuner.h b/include/media/tuner.h | ||
20 | index 89c290b..29e1920 100644 | ||
21 | --- a/include/media/tuner.h | ||
22 | +++ b/include/media/tuner.h | ||
23 | @@ -127,7 +127,6 @@ | ||
24 | #define TUNER_PHILIPS_FMD1216MEX_MK3 78 | ||
25 | #define TUNER_PHILIPS_FM1216MK5 79 | ||
26 | #define TUNER_PHILIPS_FQ1216LME_MK3 80 /* Active loopthrough, no FM */ | ||
27 | -#define TUNER_XC4000 81 /* Xceive Silicon Tuner */ | ||
28 | |||
29 | #define TUNER_PARTSNIC_PTI_5NF05 81 | ||
30 | #define TUNER_PHILIPS_CU1216L 82 | ||
31 | @@ -136,6 +135,8 @@ | ||
32 | #define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */ | ||
33 | #define TUNER_TENA_TNF_5337 86 | ||
34 | |||
35 | +#define TUNER_XC4000 87 /* Xceive Silicon Tuner */ | ||
36 | + | ||
37 | /* tv card specific */ | ||
38 | #define TDA9887_PRESENT (1<<0) | ||
39 | #define TDA9887_PORT1_INACTIVE (1<<1) | ||
40 | -- | ||
41 | 1.7.9.5 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch deleted file mode 100644 index fa68a226..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0112-tracepoints-module-Fix-disabling-tracepoints-with-ta.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 1c99223cf33c02c8f79d74bda8a0f4352bd4d7f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steven Rostedt <srostedt@redhat.com> | ||
3 | Date: Fri, 13 Jan 2012 21:40:59 -0500 | ||
4 | Subject: [PATCH 112/129] tracepoints/module: Fix disabling tracepoints with | ||
5 | taint CRAP or OOT | ||
6 | |||
7 | commit c10076c4304083af15a41f6bc5e657e781c1f9a6 upstream. | ||
8 | |||
9 | Tracepoints are disabled for tainted modules, which is usually because the | ||
10 | module is either proprietary or was forced, and we don't want either of them | ||
11 | using kernel tracepoints. | ||
12 | |||
13 | But, a module can also be tainted by being in the staging directory or | ||
14 | compiled out of tree. Either is fine for use with tracepoints, no need | ||
15 | to punish them. I found this out when I noticed that my sample trace event | ||
16 | module, when done out of tree, stopped working. | ||
17 | |||
18 | Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | ||
19 | Cc: Ben Hutchings <ben@decadent.org.uk> | ||
20 | Cc: Dave Jones <davej@redhat.com> | ||
21 | Cc: Greg Kroah-Hartman <gregkh@suse.de> | ||
22 | Cc: Rusty Russell <rusty@rustcorp.com.au> | ||
23 | Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
25 | --- | ||
26 | kernel/tracepoint.c | 7 ++++--- | ||
27 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
28 | |||
29 | diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c | ||
30 | index db110b8..f1539de 100644 | ||
31 | --- a/kernel/tracepoint.c | ||
32 | +++ b/kernel/tracepoint.c | ||
33 | @@ -634,10 +634,11 @@ static int tracepoint_module_coming(struct module *mod) | ||
34 | int ret = 0; | ||
35 | |||
36 | /* | ||
37 | - * We skip modules that tain the kernel, especially those with different | ||
38 | - * module header (for forced load), to make sure we don't cause a crash. | ||
39 | + * We skip modules that taint the kernel, especially those with different | ||
40 | + * module headers (for forced load), to make sure we don't cause a crash. | ||
41 | + * Staging and out-of-tree GPL modules are fine. | ||
42 | */ | ||
43 | - if (mod->taints) | ||
44 | + if (mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP))) | ||
45 | return 0; | ||
46 | mutex_lock(&tracepoints_mutex); | ||
47 | tp_mod = kmalloc(sizeof(struct tp_module), GFP_KERNEL); | ||
48 | -- | ||
49 | 1.7.9.5 | ||
50 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch deleted file mode 100644 index aec34657..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0113-x86-UV2-Fix-new-UV2-hardware-by-using-native-UV2-bro.patch +++ /dev/null | |||
@@ -1,350 +0,0 @@ | |||
1 | From ebde7b91a72ac0cc014d021051f8a46a786dbb00 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cliff Wickman <cpw@sgi.com> | ||
3 | Date: Mon, 16 Jan 2012 15:17:50 -0600 | ||
4 | Subject: [PATCH 113/129] x86/UV2: Fix new UV2 hardware by using native UV2 | ||
5 | broadcast mode | ||
6 | |||
7 | commit da87c937e5a2374686edd58df06cfd5050b125fa upstream. | ||
8 | |||
9 | Update the use of the Broadcast Assist Unit on SGI Altix UV2 to | ||
10 | the use of native UV2 mode on new hardware (not the legacy mode). | ||
11 | |||
12 | UV2 native mode has a different format for a broadcast message. | ||
13 | We also need quick differentiaton between UV1 and UV2. | ||
14 | |||
15 | Signed-off-by: Cliff Wickman <cpw@sgi.com> | ||
16 | Link: http://lkml.kernel.org/r/20120116211750.GA5767@sgi.com | ||
17 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | arch/x86/include/asm/uv/uv_bau.h | 93 +++++++++++++++++++++++++++++++++++--- | ||
21 | arch/x86/platform/uv/tlb_uv.c | 88 ++++++++++++++++++++++++++---------- | ||
22 | 2 files changed, 151 insertions(+), 30 deletions(-) | ||
23 | |||
24 | diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h | ||
25 | index 8e862aa..4a46b27 100644 | ||
26 | --- a/arch/x86/include/asm/uv/uv_bau.h | ||
27 | +++ b/arch/x86/include/asm/uv/uv_bau.h | ||
28 | @@ -65,7 +65,7 @@ | ||
29 | * UV2: Bit 19 selects between | ||
30 | * (0): 10 microsecond timebase and | ||
31 | * (1): 80 microseconds | ||
32 | - * we're using 655us, similar to UV1: 65 units of 10us | ||
33 | + * we're using 560us, similar to UV1: 65 units of 10us | ||
34 | */ | ||
35 | #define UV1_INTD_SOFT_ACK_TIMEOUT_PERIOD (9UL) | ||
36 | #define UV2_INTD_SOFT_ACK_TIMEOUT_PERIOD (15UL) | ||
37 | @@ -235,10 +235,10 @@ struct bau_msg_payload { | ||
38 | |||
39 | |||
40 | /* | ||
41 | - * Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor) | ||
42 | + * UV1 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor) | ||
43 | * see table 4.2.3.0.1 in broacast_assist spec. | ||
44 | */ | ||
45 | -struct bau_msg_header { | ||
46 | +struct uv1_bau_msg_header { | ||
47 | unsigned int dest_subnodeid:6; /* must be 0x10, for the LB */ | ||
48 | /* bits 5:0 */ | ||
49 | unsigned int base_dest_nasid:15; /* nasid of the first bit */ | ||
50 | @@ -318,19 +318,87 @@ struct bau_msg_header { | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | + * UV2 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor) | ||
55 | + * see figure 9-2 of harp_sys.pdf | ||
56 | + */ | ||
57 | +struct uv2_bau_msg_header { | ||
58 | + unsigned int base_dest_nasid:15; /* nasid of the first bit */ | ||
59 | + /* bits 14:0 */ /* in uvhub map */ | ||
60 | + unsigned int dest_subnodeid:5; /* must be 0x10, for the LB */ | ||
61 | + /* bits 19:15 */ | ||
62 | + unsigned int rsvd_1:1; /* must be zero */ | ||
63 | + /* bit 20 */ | ||
64 | + /* Address bits 59:21 */ | ||
65 | + /* bits 25:2 of address (44:21) are payload */ | ||
66 | + /* these next 24 bits become bytes 12-14 of msg */ | ||
67 | + /* bits 28:21 land in byte 12 */ | ||
68 | + unsigned int replied_to:1; /* sent as 0 by the source to | ||
69 | + byte 12 */ | ||
70 | + /* bit 21 */ | ||
71 | + unsigned int msg_type:3; /* software type of the | ||
72 | + message */ | ||
73 | + /* bits 24:22 */ | ||
74 | + unsigned int canceled:1; /* message canceled, resource | ||
75 | + is to be freed*/ | ||
76 | + /* bit 25 */ | ||
77 | + unsigned int payload_1:3; /* not currently used */ | ||
78 | + /* bits 28:26 */ | ||
79 | + | ||
80 | + /* bits 36:29 land in byte 13 */ | ||
81 | + unsigned int payload_2a:3; /* not currently used */ | ||
82 | + unsigned int payload_2b:5; /* not currently used */ | ||
83 | + /* bits 36:29 */ | ||
84 | + | ||
85 | + /* bits 44:37 land in byte 14 */ | ||
86 | + unsigned int payload_3:8; /* not currently used */ | ||
87 | + /* bits 44:37 */ | ||
88 | + | ||
89 | + unsigned int rsvd_2:7; /* reserved */ | ||
90 | + /* bits 51:45 */ | ||
91 | + unsigned int swack_flag:1; /* software acknowledge flag */ | ||
92 | + /* bit 52 */ | ||
93 | + unsigned int rsvd_3a:3; /* must be zero */ | ||
94 | + unsigned int rsvd_3b:8; /* must be zero */ | ||
95 | + unsigned int rsvd_3c:8; /* must be zero */ | ||
96 | + unsigned int rsvd_3d:3; /* must be zero */ | ||
97 | + /* bits 74:53 */ | ||
98 | + unsigned int fairness:3; /* usually zero */ | ||
99 | + /* bits 77:75 */ | ||
100 | + | ||
101 | + unsigned int sequence:16; /* message sequence number */ | ||
102 | + /* bits 93:78 Suppl_A */ | ||
103 | + unsigned int chaining:1; /* next descriptor is part of | ||
104 | + this activation*/ | ||
105 | + /* bit 94 */ | ||
106 | + unsigned int multilevel:1; /* multi-level multicast | ||
107 | + format */ | ||
108 | + /* bit 95 */ | ||
109 | + unsigned int rsvd_4:24; /* ordered / source node / | ||
110 | + source subnode / aging | ||
111 | + must be zero */ | ||
112 | + /* bits 119:96 */ | ||
113 | + unsigned int command:8; /* message type */ | ||
114 | + /* bits 127:120 */ | ||
115 | +}; | ||
116 | + | ||
117 | +/* | ||
118 | * The activation descriptor: | ||
119 | * The format of the message to send, plus all accompanying control | ||
120 | * Should be 64 bytes | ||
121 | */ | ||
122 | struct bau_desc { | ||
123 | - struct pnmask distribution; | ||
124 | + struct pnmask distribution; | ||
125 | /* | ||
126 | * message template, consisting of header and payload: | ||
127 | */ | ||
128 | - struct bau_msg_header header; | ||
129 | - struct bau_msg_payload payload; | ||
130 | + union bau_msg_header { | ||
131 | + struct uv1_bau_msg_header uv1_hdr; | ||
132 | + struct uv2_bau_msg_header uv2_hdr; | ||
133 | + } header; | ||
134 | + | ||
135 | + struct bau_msg_payload payload; | ||
136 | }; | ||
137 | -/* | ||
138 | +/* UV1: | ||
139 | * -payload-- ---------header------ | ||
140 | * bytes 0-11 bits 41-56 bits 58-81 | ||
141 | * A B (2) C (3) | ||
142 | @@ -340,6 +408,16 @@ struct bau_desc { | ||
143 | * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector) | ||
144 | * ------------payload queue----------- | ||
145 | */ | ||
146 | +/* UV2: | ||
147 | + * -payload-- ---------header------ | ||
148 | + * bytes 0-11 bits 70-78 bits 21-44 | ||
149 | + * A B (2) C (3) | ||
150 | + * | ||
151 | + * A/B/C are moved to: | ||
152 | + * A C B | ||
153 | + * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector) | ||
154 | + * ------------payload queue----------- | ||
155 | + */ | ||
156 | |||
157 | /* | ||
158 | * The payload queue on the destination side is an array of these. | ||
159 | @@ -511,6 +589,7 @@ struct bau_control { | ||
160 | short osnode; | ||
161 | short uvhub_cpu; | ||
162 | short uvhub; | ||
163 | + short uvhub_version; | ||
164 | short cpus_in_socket; | ||
165 | short cpus_in_uvhub; | ||
166 | short partition_base_pnode; | ||
167 | diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c | ||
168 | index 5b55219..1341a2e 100644 | ||
169 | --- a/arch/x86/platform/uv/tlb_uv.c | ||
170 | +++ b/arch/x86/platform/uv/tlb_uv.c | ||
171 | @@ -573,7 +573,7 @@ static int wait_completion(struct bau_desc *bau_desc, | ||
172 | right_shift = ((cpu - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE); | ||
173 | } | ||
174 | |||
175 | - if (is_uv1_hub()) | ||
176 | + if (bcp->uvhub_version == 1) | ||
177 | return uv1_wait_completion(bau_desc, mmr_offset, right_shift, | ||
178 | bcp, try); | ||
179 | else | ||
180 | @@ -757,15 +757,22 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
181 | { | ||
182 | int seq_number = 0; | ||
183 | int completion_stat = 0; | ||
184 | + int uv1 = 0; | ||
185 | long try = 0; | ||
186 | unsigned long index; | ||
187 | cycles_t time1; | ||
188 | cycles_t time2; | ||
189 | struct ptc_stats *stat = bcp->statp; | ||
190 | struct bau_control *hmaster = bcp->uvhub_master; | ||
191 | + struct uv1_bau_msg_header *uv1_hdr = NULL; | ||
192 | + struct uv2_bau_msg_header *uv2_hdr = NULL; | ||
193 | |||
194 | - if (is_uv1_hub()) | ||
195 | + if (bcp->uvhub_version == 1) { | ||
196 | + uv1 = 1; | ||
197 | uv1_throttle(hmaster, stat); | ||
198 | + uv1_hdr = &bau_desc->header.uv1_hdr; | ||
199 | + } else | ||
200 | + uv2_hdr = &bau_desc->header.uv2_hdr; | ||
201 | |||
202 | while (hmaster->uvhub_quiesce) | ||
203 | cpu_relax(); | ||
204 | @@ -773,14 +780,23 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
205 | time1 = get_cycles(); | ||
206 | do { | ||
207 | if (try == 0) { | ||
208 | - bau_desc->header.msg_type = MSG_REGULAR; | ||
209 | + if (uv1) | ||
210 | + uv1_hdr->msg_type = MSG_REGULAR; | ||
211 | + else | ||
212 | + uv2_hdr->msg_type = MSG_REGULAR; | ||
213 | seq_number = bcp->message_number++; | ||
214 | } else { | ||
215 | - bau_desc->header.msg_type = MSG_RETRY; | ||
216 | + if (uv1) | ||
217 | + uv1_hdr->msg_type = MSG_RETRY; | ||
218 | + else | ||
219 | + uv2_hdr->msg_type = MSG_RETRY; | ||
220 | stat->s_retry_messages++; | ||
221 | } | ||
222 | |||
223 | - bau_desc->header.sequence = seq_number; | ||
224 | + if (uv1) | ||
225 | + uv1_hdr->sequence = seq_number; | ||
226 | + else | ||
227 | + uv2_hdr->sequence = seq_number; | ||
228 | index = (1UL << AS_PUSH_SHIFT) | bcp->uvhub_cpu; | ||
229 | bcp->send_message = get_cycles(); | ||
230 | |||
231 | @@ -967,7 +983,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | ||
232 | stat->s_ntargself++; | ||
233 | |||
234 | bau_desc = bcp->descriptor_base; | ||
235 | - bau_desc += ITEMS_PER_DESC * bcp->uvhub_cpu; | ||
236 | + bau_desc += (ITEMS_PER_DESC * bcp->uvhub_cpu); | ||
237 | bau_uvhubs_clear(&bau_desc->distribution, UV_DISTRIBUTION_SIZE); | ||
238 | if (set_distrib_bits(flush_mask, bcp, bau_desc, &locals, &remotes)) | ||
239 | return NULL; | ||
240 | @@ -1083,7 +1099,7 @@ static void __init enable_timeouts(void) | ||
241 | */ | ||
242 | mmr_image |= (1L << SOFTACK_MSHIFT); | ||
243 | if (is_uv2_hub()) { | ||
244 | - mmr_image |= (1L << UV2_LEG_SHFT); | ||
245 | + mmr_image &= ~(1L << UV2_LEG_SHFT); | ||
246 | mmr_image |= (1L << UV2_EXT_SHFT); | ||
247 | } | ||
248 | write_mmr_misc_control(pnode, mmr_image); | ||
249 | @@ -1432,12 +1448,15 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode) | ||
250 | { | ||
251 | int i; | ||
252 | int cpu; | ||
253 | + int uv1 = 0; | ||
254 | unsigned long gpa; | ||
255 | unsigned long m; | ||
256 | unsigned long n; | ||
257 | size_t dsize; | ||
258 | struct bau_desc *bau_desc; | ||
259 | struct bau_desc *bd2; | ||
260 | + struct uv1_bau_msg_header *uv1_hdr; | ||
261 | + struct uv2_bau_msg_header *uv2_hdr; | ||
262 | struct bau_control *bcp; | ||
263 | |||
264 | /* | ||
265 | @@ -1451,6 +1470,8 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode) | ||
266 | gpa = uv_gpa(bau_desc); | ||
267 | n = uv_gpa_to_gnode(gpa); | ||
268 | m = uv_gpa_to_offset(gpa); | ||
269 | + if (is_uv1_hub()) | ||
270 | + uv1 = 1; | ||
271 | |||
272 | /* the 14-bit pnode */ | ||
273 | write_mmr_descriptor_base(pnode, (n << UV_DESC_PSHIFT | m)); | ||
274 | @@ -1461,21 +1482,33 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode) | ||
275 | */ | ||
276 | for (i = 0, bd2 = bau_desc; i < (ADP_SZ * ITEMS_PER_DESC); i++, bd2++) { | ||
277 | memset(bd2, 0, sizeof(struct bau_desc)); | ||
278 | - bd2->header.swack_flag = 1; | ||
279 | - /* | ||
280 | - * The base_dest_nasid set in the message header is the nasid | ||
281 | - * of the first uvhub in the partition. The bit map will | ||
282 | - * indicate destination pnode numbers relative to that base. | ||
283 | - * They may not be consecutive if nasid striding is being used. | ||
284 | - */ | ||
285 | - bd2->header.base_dest_nasid = UV_PNODE_TO_NASID(base_pnode); | ||
286 | - bd2->header.dest_subnodeid = UV_LB_SUBNODEID; | ||
287 | - bd2->header.command = UV_NET_ENDPOINT_INTD; | ||
288 | - bd2->header.int_both = 1; | ||
289 | - /* | ||
290 | - * all others need to be set to zero: | ||
291 | - * fairness chaining multilevel count replied_to | ||
292 | - */ | ||
293 | + if (uv1) { | ||
294 | + uv1_hdr = &bd2->header.uv1_hdr; | ||
295 | + uv1_hdr->swack_flag = 1; | ||
296 | + /* | ||
297 | + * The base_dest_nasid set in the message header | ||
298 | + * is the nasid of the first uvhub in the partition. | ||
299 | + * The bit map will indicate destination pnode numbers | ||
300 | + * relative to that base. They may not be consecutive | ||
301 | + * if nasid striding is being used. | ||
302 | + */ | ||
303 | + uv1_hdr->base_dest_nasid = | ||
304 | + UV_PNODE_TO_NASID(base_pnode); | ||
305 | + uv1_hdr->dest_subnodeid = UV_LB_SUBNODEID; | ||
306 | + uv1_hdr->command = UV_NET_ENDPOINT_INTD; | ||
307 | + uv1_hdr->int_both = 1; | ||
308 | + /* | ||
309 | + * all others need to be set to zero: | ||
310 | + * fairness chaining multilevel count replied_to | ||
311 | + */ | ||
312 | + } else { | ||
313 | + uv2_hdr = &bd2->header.uv2_hdr; | ||
314 | + uv2_hdr->swack_flag = 1; | ||
315 | + uv2_hdr->base_dest_nasid = | ||
316 | + UV_PNODE_TO_NASID(base_pnode); | ||
317 | + uv2_hdr->dest_subnodeid = UV_LB_SUBNODEID; | ||
318 | + uv2_hdr->command = UV_NET_ENDPOINT_INTD; | ||
319 | + } | ||
320 | } | ||
321 | for_each_present_cpu(cpu) { | ||
322 | if (pnode != uv_blade_to_pnode(uv_cpu_to_blade_id(cpu))) | ||
323 | @@ -1728,6 +1761,14 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp, | ||
324 | bcp->cpus_in_socket = sdp->num_cpus; | ||
325 | bcp->socket_master = *smasterp; | ||
326 | bcp->uvhub = bdp->uvhub; | ||
327 | + if (is_uv1_hub()) | ||
328 | + bcp->uvhub_version = 1; | ||
329 | + else if (is_uv2_hub()) | ||
330 | + bcp->uvhub_version = 2; | ||
331 | + else { | ||
332 | + printk(KERN_EMERG "uvhub version not 1 or 2\n"); | ||
333 | + return 1; | ||
334 | + } | ||
335 | bcp->uvhub_master = *hmasterp; | ||
336 | bcp->uvhub_cpu = uv_cpu_hub_info(cpu)->blade_processor_id; | ||
337 | if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) { | ||
338 | @@ -1867,7 +1908,8 @@ static int __init uv_bau_init(void) | ||
339 | val = 1L << 63; | ||
340 | write_gmmr_activation(pnode, val); | ||
341 | mmr = 1; /* should be 1 to broadcast to both sockets */ | ||
342 | - write_mmr_data_broadcast(pnode, mmr); | ||
343 | + if (!is_uv1_hub()) | ||
344 | + write_mmr_data_broadcast(pnode, mmr); | ||
345 | } | ||
346 | } | ||
347 | |||
348 | -- | ||
349 | 1.7.9.5 | ||
350 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-BAU-destination-timeout-initialization.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-BAU-destination-timeout-initialization.patch deleted file mode 100644 index 02118c96..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0114-x86-UV2-Fix-BAU-destination-timeout-initialization.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From dcca45052472bcbd331d0451777cb947588e1dd5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cliff Wickman <cpw@sgi.com> | ||
3 | Date: Mon, 16 Jan 2012 15:18:48 -0600 | ||
4 | Subject: [PATCH 114/129] x86/UV2: Fix BAU destination timeout initialization | ||
5 | |||
6 | commit d059f9fa84a30e04279c6ff615e9e2cf3b260191 upstream. | ||
7 | |||
8 | Move the call to enable_timeouts() forward so that | ||
9 | BAU_MISC_CONTROL is initialized before using it in | ||
10 | calculate_destination_timeout(). | ||
11 | |||
12 | Fix the calculation of a BAU destination timeout | ||
13 | for UV2 (in calculate_destination_timeout()). | ||
14 | |||
15 | Signed-off-by: Cliff Wickman <cpw@sgi.com> | ||
16 | Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com | ||
17 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | arch/x86/platform/uv/tlb_uv.c | 13 +++++++------ | ||
21 | 1 file changed, 7 insertions(+), 6 deletions(-) | ||
22 | |||
23 | diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c | ||
24 | index 1341a2e..c425ff1 100644 | ||
25 | --- a/arch/x86/platform/uv/tlb_uv.c | ||
26 | +++ b/arch/x86/platform/uv/tlb_uv.c | ||
27 | @@ -1617,14 +1617,14 @@ static int calculate_destination_timeout(void) | ||
28 | ts_ns = base * mult1 * mult2; | ||
29 | ret = ts_ns / 1000; | ||
30 | } else { | ||
31 | - /* 4 bits 0/1 for 10/80us, 3 bits of multiplier */ | ||
32 | - mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL); | ||
33 | + /* 4 bits 0/1 for 10/80us base, 3 bits of multiplier */ | ||
34 | + mmr_image = uv_read_local_mmr(UVH_LB_BAU_MISC_CONTROL); | ||
35 | mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT; | ||
36 | if (mmr_image & (1L << UV2_ACK_UNITS_SHFT)) | ||
37 | - mult1 = 80; | ||
38 | + base = 80; | ||
39 | else | ||
40 | - mult1 = 10; | ||
41 | - base = mmr_image & UV2_ACK_MASK; | ||
42 | + base = 10; | ||
43 | + mult1 = mmr_image & UV2_ACK_MASK; | ||
44 | ret = mult1 * base; | ||
45 | } | ||
46 | return ret; | ||
47 | @@ -1886,6 +1886,8 @@ static int __init uv_bau_init(void) | ||
48 | uv_base_pnode = uv_blade_to_pnode(uvhub); | ||
49 | } | ||
50 | |||
51 | + enable_timeouts(); | ||
52 | + | ||
53 | if (init_per_cpu(nuvhubs, uv_base_pnode)) { | ||
54 | nobau = 1; | ||
55 | return 0; | ||
56 | @@ -1896,7 +1898,6 @@ static int __init uv_bau_init(void) | ||
57 | if (uv_blade_nr_possible_cpus(uvhub)) | ||
58 | init_uvhub(uvhub, vector, uv_base_pnode); | ||
59 | |||
60 | - enable_timeouts(); | ||
61 | alloc_intr_gate(vector, uv_bau_message_intr1); | ||
62 | |||
63 | for_each_possible_blade(uvhub) { | ||
64 | -- | ||
65 | 1.7.9.5 | ||
66 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Work-around-BAU-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Work-around-BAU-bug.patch deleted file mode 100644 index 11d610cf..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0115-x86-UV2-Work-around-BAU-bug.patch +++ /dev/null | |||
@@ -1,570 +0,0 @@ | |||
1 | From 3ebb4a034dca1cd312f42c9ff1ff47c873f211b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cliff Wickman <cpw@sgi.com> | ||
3 | Date: Mon, 16 Jan 2012 15:19:47 -0600 | ||
4 | Subject: [PATCH 115/129] x86/UV2: Work around BAU bug | ||
5 | |||
6 | commit c5d35d399e685acccc85a675e8765c26b2a9813a upstream. | ||
7 | |||
8 | This patch implements a workaround for a UV2 hardware bug. | ||
9 | The bug is a non-atomic update of a memory-mapped register. When | ||
10 | hardware message delivery and software message acknowledge occur | ||
11 | simultaneously the pending message acknowledge for the arriving | ||
12 | message may be lost. This causes the sender's message status to | ||
13 | stay busy. | ||
14 | |||
15 | Part of the workaround is to not acknowledge a completed message | ||
16 | until it is verified that no other message is actually using the | ||
17 | resource that is mistakenly recorded in the completed message. | ||
18 | |||
19 | Part of the workaround is to test for long elapsed time in such | ||
20 | a busy condition, then handle it by using a spare sending | ||
21 | descriptor. The stay-busy condition is eventually timed out by | ||
22 | hardware, and then the original sending descriptor can be | ||
23 | re-used. Most of that logic change is in keeping track of the | ||
24 | current descriptor and the state of the spares. | ||
25 | |||
26 | The occurrences of the workaround are added to the BAU | ||
27 | statistics. | ||
28 | |||
29 | Signed-off-by: Cliff Wickman <cpw@sgi.com> | ||
30 | Link: http://lkml.kernel.org/r/20120116211947.GC5767@sgi.com | ||
31 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
33 | --- | ||
34 | arch/x86/include/asm/uv/uv_bau.h | 13 +- | ||
35 | arch/x86/platform/uv/tlb_uv.c | 274 +++++++++++++++++++++++++++++++++----- | ||
36 | 2 files changed, 254 insertions(+), 33 deletions(-) | ||
37 | |||
38 | diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h | ||
39 | index 4a46b27..1b82f7e 100644 | ||
40 | --- a/arch/x86/include/asm/uv/uv_bau.h | ||
41 | +++ b/arch/x86/include/asm/uv/uv_bau.h | ||
42 | @@ -167,6 +167,7 @@ | ||
43 | #define FLUSH_RETRY_TIMEOUT 2 | ||
44 | #define FLUSH_GIVEUP 3 | ||
45 | #define FLUSH_COMPLETE 4 | ||
46 | +#define FLUSH_RETRY_BUSYBUG 5 | ||
47 | |||
48 | /* | ||
49 | * tuning the action when the numalink network is extremely delayed | ||
50 | @@ -463,7 +464,6 @@ struct bau_pq_entry { | ||
51 | struct msg_desc { | ||
52 | struct bau_pq_entry *msg; | ||
53 | int msg_slot; | ||
54 | - int swack_slot; | ||
55 | struct bau_pq_entry *queue_first; | ||
56 | struct bau_pq_entry *queue_last; | ||
57 | }; | ||
58 | @@ -517,6 +517,9 @@ struct ptc_stats { | ||
59 | unsigned long s_retry_messages; /* retry broadcasts */ | ||
60 | unsigned long s_bau_reenabled; /* for bau enable/disable */ | ||
61 | unsigned long s_bau_disabled; /* for bau enable/disable */ | ||
62 | + unsigned long s_uv2_wars; /* uv2 workaround, perm. busy */ | ||
63 | + unsigned long s_uv2_wars_hw; /* uv2 workaround, hiwater */ | ||
64 | + unsigned long s_uv2_war_waits; /* uv2 workaround, long waits */ | ||
65 | /* destination statistics */ | ||
66 | unsigned long d_alltlb; /* times all tlb's on this | ||
67 | cpu were flushed */ | ||
68 | @@ -593,6 +596,8 @@ struct bau_control { | ||
69 | short cpus_in_socket; | ||
70 | short cpus_in_uvhub; | ||
71 | short partition_base_pnode; | ||
72 | + short using_desc; /* an index, like uvhub_cpu */ | ||
73 | + unsigned int inuse_map; | ||
74 | unsigned short message_number; | ||
75 | unsigned short uvhub_quiesce; | ||
76 | short socket_acknowledge_count[DEST_Q_SIZE]; | ||
77 | @@ -610,6 +615,7 @@ struct bau_control { | ||
78 | int cong_response_us; | ||
79 | int cong_reps; | ||
80 | int cong_period; | ||
81 | + unsigned long clocks_per_100_usec; | ||
82 | cycles_t period_time; | ||
83 | long period_requests; | ||
84 | struct hub_and_pnode *thp; | ||
85 | @@ -670,6 +676,11 @@ static inline void write_mmr_sw_ack(unsigned long mr) | ||
86 | uv_write_local_mmr(UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, mr); | ||
87 | } | ||
88 | |||
89 | +static inline void write_gmmr_sw_ack(int pnode, unsigned long mr) | ||
90 | +{ | ||
91 | + write_gmmr(pnode, UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS, mr); | ||
92 | +} | ||
93 | + | ||
94 | static inline unsigned long read_mmr_sw_ack(void) | ||
95 | { | ||
96 | return read_lmmr(UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE); | ||
97 | diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c | ||
98 | index c425ff1..9010ca7 100644 | ||
99 | --- a/arch/x86/platform/uv/tlb_uv.c | ||
100 | +++ b/arch/x86/platform/uv/tlb_uv.c | ||
101 | @@ -157,13 +157,14 @@ static int __init uvhub_to_first_apicid(int uvhub) | ||
102 | * clear of the Timeout bit (as well) will free the resource. No reply will | ||
103 | * be sent (the hardware will only do one reply per message). | ||
104 | */ | ||
105 | -static void reply_to_message(struct msg_desc *mdp, struct bau_control *bcp) | ||
106 | +static void reply_to_message(struct msg_desc *mdp, struct bau_control *bcp, | ||
107 | + int do_acknowledge) | ||
108 | { | ||
109 | unsigned long dw; | ||
110 | struct bau_pq_entry *msg; | ||
111 | |||
112 | msg = mdp->msg; | ||
113 | - if (!msg->canceled) { | ||
114 | + if (!msg->canceled && do_acknowledge) { | ||
115 | dw = (msg->swack_vec << UV_SW_ACK_NPENDING) | msg->swack_vec; | ||
116 | write_mmr_sw_ack(dw); | ||
117 | } | ||
118 | @@ -212,8 +213,8 @@ static void bau_process_retry_msg(struct msg_desc *mdp, | ||
119 | if (mmr & (msg_res << UV_SW_ACK_NPENDING)) { | ||
120 | unsigned long mr; | ||
121 | /* | ||
122 | - * is the resource timed out? | ||
123 | - * make everyone ignore the cancelled message. | ||
124 | + * Is the resource timed out? | ||
125 | + * Make everyone ignore the cancelled message. | ||
126 | */ | ||
127 | msg2->canceled = 1; | ||
128 | stat->d_canceled++; | ||
129 | @@ -231,8 +232,8 @@ static void bau_process_retry_msg(struct msg_desc *mdp, | ||
130 | * Do all the things a cpu should do for a TLB shootdown message. | ||
131 | * Other cpu's may come here at the same time for this message. | ||
132 | */ | ||
133 | -static void bau_process_message(struct msg_desc *mdp, | ||
134 | - struct bau_control *bcp) | ||
135 | +static void bau_process_message(struct msg_desc *mdp, struct bau_control *bcp, | ||
136 | + int do_acknowledge) | ||
137 | { | ||
138 | short socket_ack_count = 0; | ||
139 | short *sp; | ||
140 | @@ -284,8 +285,9 @@ static void bau_process_message(struct msg_desc *mdp, | ||
141 | if (msg_ack_count == bcp->cpus_in_uvhub) { | ||
142 | /* | ||
143 | * All cpus in uvhub saw it; reply | ||
144 | + * (unless we are in the UV2 workaround) | ||
145 | */ | ||
146 | - reply_to_message(mdp, bcp); | ||
147 | + reply_to_message(mdp, bcp, do_acknowledge); | ||
148 | } | ||
149 | } | ||
150 | |||
151 | @@ -491,27 +493,138 @@ static int uv1_wait_completion(struct bau_desc *bau_desc, | ||
152 | /* | ||
153 | * UV2 has an extra bit of status in the ACTIVATION_STATUS_2 register. | ||
154 | */ | ||
155 | -static unsigned long uv2_read_status(unsigned long offset, int rshft, int cpu) | ||
156 | +static unsigned long uv2_read_status(unsigned long offset, int rshft, int desc) | ||
157 | { | ||
158 | unsigned long descriptor_status; | ||
159 | unsigned long descriptor_status2; | ||
160 | |||
161 | descriptor_status = ((read_lmmr(offset) >> rshft) & UV_ACT_STATUS_MASK); | ||
162 | - descriptor_status2 = (read_mmr_uv2_status() >> cpu) & 0x1UL; | ||
163 | + descriptor_status2 = (read_mmr_uv2_status() >> desc) & 0x1UL; | ||
164 | descriptor_status = (descriptor_status << 1) | descriptor_status2; | ||
165 | return descriptor_status; | ||
166 | } | ||
167 | |||
168 | +/* | ||
169 | + * Return whether the status of the descriptor that is normally used for this | ||
170 | + * cpu (the one indexed by its hub-relative cpu number) is busy. | ||
171 | + * The status of the original 32 descriptors is always reflected in the 64 | ||
172 | + * bits of UVH_LB_BAU_SB_ACTIVATION_STATUS_0. | ||
173 | + * The bit provided by the activation_status_2 register is irrelevant to | ||
174 | + * the status if it is only being tested for busy or not busy. | ||
175 | + */ | ||
176 | +int normal_busy(struct bau_control *bcp) | ||
177 | +{ | ||
178 | + int cpu = bcp->uvhub_cpu; | ||
179 | + int mmr_offset; | ||
180 | + int right_shift; | ||
181 | + | ||
182 | + mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_0; | ||
183 | + right_shift = cpu * UV_ACT_STATUS_SIZE; | ||
184 | + return (((((read_lmmr(mmr_offset) >> right_shift) & | ||
185 | + UV_ACT_STATUS_MASK)) << 1) == UV2H_DESC_BUSY); | ||
186 | +} | ||
187 | + | ||
188 | +/* | ||
189 | + * Entered when a bau descriptor has gone into a permanent busy wait because | ||
190 | + * of a hardware bug. | ||
191 | + * Workaround the bug. | ||
192 | + */ | ||
193 | +int handle_uv2_busy(struct bau_control *bcp) | ||
194 | +{ | ||
195 | + int busy_one = bcp->using_desc; | ||
196 | + int normal = bcp->uvhub_cpu; | ||
197 | + int selected = -1; | ||
198 | + int i; | ||
199 | + unsigned long descriptor_status; | ||
200 | + unsigned long status; | ||
201 | + int mmr_offset; | ||
202 | + struct bau_desc *bau_desc_old; | ||
203 | + struct bau_desc *bau_desc_new; | ||
204 | + struct bau_control *hmaster = bcp->uvhub_master; | ||
205 | + struct ptc_stats *stat = bcp->statp; | ||
206 | + cycles_t ttm; | ||
207 | + | ||
208 | + stat->s_uv2_wars++; | ||
209 | + spin_lock(&hmaster->uvhub_lock); | ||
210 | + /* try for the original first */ | ||
211 | + if (busy_one != normal) { | ||
212 | + if (!normal_busy(bcp)) | ||
213 | + selected = normal; | ||
214 | + } | ||
215 | + if (selected < 0) { | ||
216 | + /* can't use the normal, select an alternate */ | ||
217 | + mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_1; | ||
218 | + descriptor_status = read_lmmr(mmr_offset); | ||
219 | + | ||
220 | + /* scan available descriptors 32-63 */ | ||
221 | + for (i = 0; i < UV_CPUS_PER_AS; i++) { | ||
222 | + if ((hmaster->inuse_map & (1 << i)) == 0) { | ||
223 | + status = ((descriptor_status >> | ||
224 | + (i * UV_ACT_STATUS_SIZE)) & | ||
225 | + UV_ACT_STATUS_MASK) << 1; | ||
226 | + if (status != UV2H_DESC_BUSY) { | ||
227 | + selected = i + UV_CPUS_PER_AS; | ||
228 | + break; | ||
229 | + } | ||
230 | + } | ||
231 | + } | ||
232 | + } | ||
233 | + | ||
234 | + if (busy_one != normal) | ||
235 | + /* mark the busy alternate as not in-use */ | ||
236 | + hmaster->inuse_map &= ~(1 << (busy_one - UV_CPUS_PER_AS)); | ||
237 | + | ||
238 | + if (selected >= 0) { | ||
239 | + /* switch to the selected descriptor */ | ||
240 | + if (selected != normal) { | ||
241 | + /* set the selected alternate as in-use */ | ||
242 | + hmaster->inuse_map |= | ||
243 | + (1 << (selected - UV_CPUS_PER_AS)); | ||
244 | + if (selected > stat->s_uv2_wars_hw) | ||
245 | + stat->s_uv2_wars_hw = selected; | ||
246 | + } | ||
247 | + bau_desc_old = bcp->descriptor_base; | ||
248 | + bau_desc_old += (ITEMS_PER_DESC * busy_one); | ||
249 | + bcp->using_desc = selected; | ||
250 | + bau_desc_new = bcp->descriptor_base; | ||
251 | + bau_desc_new += (ITEMS_PER_DESC * selected); | ||
252 | + *bau_desc_new = *bau_desc_old; | ||
253 | + } else { | ||
254 | + /* | ||
255 | + * All are busy. Wait for the normal one for this cpu to | ||
256 | + * free up. | ||
257 | + */ | ||
258 | + stat->s_uv2_war_waits++; | ||
259 | + spin_unlock(&hmaster->uvhub_lock); | ||
260 | + ttm = get_cycles(); | ||
261 | + do { | ||
262 | + cpu_relax(); | ||
263 | + } while (normal_busy(bcp)); | ||
264 | + spin_lock(&hmaster->uvhub_lock); | ||
265 | + /* switch to the original descriptor */ | ||
266 | + bcp->using_desc = normal; | ||
267 | + bau_desc_old = bcp->descriptor_base; | ||
268 | + bau_desc_old += (ITEMS_PER_DESC * bcp->using_desc); | ||
269 | + bcp->using_desc = (ITEMS_PER_DESC * normal); | ||
270 | + bau_desc_new = bcp->descriptor_base; | ||
271 | + bau_desc_new += (ITEMS_PER_DESC * normal); | ||
272 | + *bau_desc_new = *bau_desc_old; /* copy the entire descriptor */ | ||
273 | + } | ||
274 | + spin_unlock(&hmaster->uvhub_lock); | ||
275 | + return FLUSH_RETRY_BUSYBUG; | ||
276 | +} | ||
277 | + | ||
278 | static int uv2_wait_completion(struct bau_desc *bau_desc, | ||
279 | unsigned long mmr_offset, int right_shift, | ||
280 | struct bau_control *bcp, long try) | ||
281 | { | ||
282 | unsigned long descriptor_stat; | ||
283 | cycles_t ttm; | ||
284 | - int cpu = bcp->uvhub_cpu; | ||
285 | + int desc = bcp->using_desc; | ||
286 | + long busy_reps = 0; | ||
287 | struct ptc_stats *stat = bcp->statp; | ||
288 | |||
289 | - descriptor_stat = uv2_read_status(mmr_offset, right_shift, cpu); | ||
290 | + descriptor_stat = uv2_read_status(mmr_offset, right_shift, desc); | ||
291 | |||
292 | /* spin on the status MMR, waiting for it to go idle */ | ||
293 | while (descriptor_stat != UV2H_DESC_IDLE) { | ||
294 | @@ -542,12 +655,23 @@ static int uv2_wait_completion(struct bau_desc *bau_desc, | ||
295 | bcp->conseccompletes = 0; | ||
296 | return FLUSH_RETRY_TIMEOUT; | ||
297 | } else { | ||
298 | + busy_reps++; | ||
299 | + if (busy_reps > 1000000) { | ||
300 | + /* not to hammer on the clock */ | ||
301 | + busy_reps = 0; | ||
302 | + ttm = get_cycles(); | ||
303 | + if ((ttm - bcp->send_message) > | ||
304 | + (bcp->clocks_per_100_usec)) { | ||
305 | + return handle_uv2_busy(bcp); | ||
306 | + } | ||
307 | + } | ||
308 | /* | ||
309 | * descriptor_stat is still BUSY | ||
310 | */ | ||
311 | cpu_relax(); | ||
312 | } | ||
313 | - descriptor_stat = uv2_read_status(mmr_offset, right_shift, cpu); | ||
314 | + descriptor_stat = uv2_read_status(mmr_offset, right_shift, | ||
315 | + desc); | ||
316 | } | ||
317 | bcp->conseccompletes++; | ||
318 | return FLUSH_COMPLETE; | ||
319 | @@ -563,14 +687,14 @@ static int wait_completion(struct bau_desc *bau_desc, | ||
320 | { | ||
321 | int right_shift; | ||
322 | unsigned long mmr_offset; | ||
323 | - int cpu = bcp->uvhub_cpu; | ||
324 | + int desc = bcp->using_desc; | ||
325 | |||
326 | - if (cpu < UV_CPUS_PER_AS) { | ||
327 | + if (desc < UV_CPUS_PER_AS) { | ||
328 | mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_0; | ||
329 | - right_shift = cpu * UV_ACT_STATUS_SIZE; | ||
330 | + right_shift = desc * UV_ACT_STATUS_SIZE; | ||
331 | } else { | ||
332 | mmr_offset = UVH_LB_BAU_SB_ACTIVATION_STATUS_1; | ||
333 | - right_shift = ((cpu - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE); | ||
334 | + right_shift = ((desc - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE); | ||
335 | } | ||
336 | |||
337 | if (bcp->uvhub_version == 1) | ||
338 | @@ -752,8 +876,7 @@ static void handle_cmplt(int completion_status, struct bau_desc *bau_desc, | ||
339 | * Returns 1 if it gives up entirely and the original cpu mask is to be | ||
340 | * returned to the kernel. | ||
341 | */ | ||
342 | -int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
343 | - struct cpumask *flush_mask, struct bau_control *bcp) | ||
344 | +int uv_flush_send_and_wait(struct cpumask *flush_mask, struct bau_control *bcp) | ||
345 | { | ||
346 | int seq_number = 0; | ||
347 | int completion_stat = 0; | ||
348 | @@ -766,20 +889,24 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
349 | struct bau_control *hmaster = bcp->uvhub_master; | ||
350 | struct uv1_bau_msg_header *uv1_hdr = NULL; | ||
351 | struct uv2_bau_msg_header *uv2_hdr = NULL; | ||
352 | + struct bau_desc *bau_desc; | ||
353 | |||
354 | - if (bcp->uvhub_version == 1) { | ||
355 | - uv1 = 1; | ||
356 | + if (bcp->uvhub_version == 1) | ||
357 | uv1_throttle(hmaster, stat); | ||
358 | - uv1_hdr = &bau_desc->header.uv1_hdr; | ||
359 | - } else | ||
360 | - uv2_hdr = &bau_desc->header.uv2_hdr; | ||
361 | |||
362 | while (hmaster->uvhub_quiesce) | ||
363 | cpu_relax(); | ||
364 | |||
365 | time1 = get_cycles(); | ||
366 | do { | ||
367 | - if (try == 0) { | ||
368 | + bau_desc = bcp->descriptor_base; | ||
369 | + bau_desc += (ITEMS_PER_DESC * bcp->using_desc); | ||
370 | + if (bcp->uvhub_version == 1) { | ||
371 | + uv1 = 1; | ||
372 | + uv1_hdr = &bau_desc->header.uv1_hdr; | ||
373 | + } else | ||
374 | + uv2_hdr = &bau_desc->header.uv2_hdr; | ||
375 | + if ((try == 0) || (completion_stat == FLUSH_RETRY_BUSYBUG)) { | ||
376 | if (uv1) | ||
377 | uv1_hdr->msg_type = MSG_REGULAR; | ||
378 | else | ||
379 | @@ -797,13 +924,14 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
380 | uv1_hdr->sequence = seq_number; | ||
381 | else | ||
382 | uv2_hdr->sequence = seq_number; | ||
383 | - index = (1UL << AS_PUSH_SHIFT) | bcp->uvhub_cpu; | ||
384 | + index = (1UL << AS_PUSH_SHIFT) | bcp->using_desc; | ||
385 | bcp->send_message = get_cycles(); | ||
386 | |||
387 | write_mmr_activation(index); | ||
388 | |||
389 | try++; | ||
390 | completion_stat = wait_completion(bau_desc, bcp, try); | ||
391 | + /* UV2: wait_completion() may change the bcp->using_desc */ | ||
392 | |||
393 | handle_cmplt(completion_stat, bau_desc, bcp, hmaster, stat); | ||
394 | |||
395 | @@ -814,6 +942,7 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
396 | } | ||
397 | cpu_relax(); | ||
398 | } while ((completion_stat == FLUSH_RETRY_PLUGGED) || | ||
399 | + (completion_stat == FLUSH_RETRY_BUSYBUG) || | ||
400 | (completion_stat == FLUSH_RETRY_TIMEOUT)); | ||
401 | |||
402 | time2 = get_cycles(); | ||
403 | @@ -828,6 +957,7 @@ int uv_flush_send_and_wait(struct bau_desc *bau_desc, | ||
404 | record_send_stats(time1, time2, bcp, stat, completion_stat, try); | ||
405 | |||
406 | if (completion_stat == FLUSH_GIVEUP) | ||
407 | + /* FLUSH_GIVEUP will fall back to using IPI's for tlb flush */ | ||
408 | return 1; | ||
409 | return 0; | ||
410 | } | ||
411 | @@ -983,7 +1113,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | ||
412 | stat->s_ntargself++; | ||
413 | |||
414 | bau_desc = bcp->descriptor_base; | ||
415 | - bau_desc += (ITEMS_PER_DESC * bcp->uvhub_cpu); | ||
416 | + bau_desc += (ITEMS_PER_DESC * bcp->using_desc); | ||
417 | bau_uvhubs_clear(&bau_desc->distribution, UV_DISTRIBUTION_SIZE); | ||
418 | if (set_distrib_bits(flush_mask, bcp, bau_desc, &locals, &remotes)) | ||
419 | return NULL; | ||
420 | @@ -996,13 +1126,86 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask, | ||
421 | * uv_flush_send_and_wait returns 0 if all cpu's were messaged, | ||
422 | * or 1 if it gave up and the original cpumask should be returned. | ||
423 | */ | ||
424 | - if (!uv_flush_send_and_wait(bau_desc, flush_mask, bcp)) | ||
425 | + if (!uv_flush_send_and_wait(flush_mask, bcp)) | ||
426 | return NULL; | ||
427 | else | ||
428 | return cpumask; | ||
429 | } | ||
430 | |||
431 | /* | ||
432 | + * Search the message queue for any 'other' message with the same software | ||
433 | + * acknowledge resource bit vector. | ||
434 | + */ | ||
435 | +struct bau_pq_entry *find_another_by_swack(struct bau_pq_entry *msg, | ||
436 | + struct bau_control *bcp, unsigned char swack_vec) | ||
437 | +{ | ||
438 | + struct bau_pq_entry *msg_next = msg + 1; | ||
439 | + | ||
440 | + if (msg_next > bcp->queue_last) | ||
441 | + msg_next = bcp->queue_first; | ||
442 | + while ((msg_next->swack_vec != 0) && (msg_next != msg)) { | ||
443 | + if (msg_next->swack_vec == swack_vec) | ||
444 | + return msg_next; | ||
445 | + msg_next++; | ||
446 | + if (msg_next > bcp->queue_last) | ||
447 | + msg_next = bcp->queue_first; | ||
448 | + } | ||
449 | + return NULL; | ||
450 | +} | ||
451 | + | ||
452 | +/* | ||
453 | + * UV2 needs to work around a bug in which an arriving message has not | ||
454 | + * set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register. | ||
455 | + * Such a message must be ignored. | ||
456 | + */ | ||
457 | +void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp) | ||
458 | +{ | ||
459 | + unsigned long mmr_image; | ||
460 | + unsigned char swack_vec; | ||
461 | + struct bau_pq_entry *msg = mdp->msg; | ||
462 | + struct bau_pq_entry *other_msg; | ||
463 | + | ||
464 | + mmr_image = read_mmr_sw_ack(); | ||
465 | + swack_vec = msg->swack_vec; | ||
466 | + | ||
467 | + if ((swack_vec & mmr_image) == 0) { | ||
468 | + /* | ||
469 | + * This message was assigned a swack resource, but no | ||
470 | + * reserved acknowlegment is pending. | ||
471 | + * The bug has prevented this message from setting the MMR. | ||
472 | + * And no other message has used the same sw_ack resource. | ||
473 | + * Do the requested shootdown but do not reply to the msg. | ||
474 | + * (the 0 means make no acknowledge) | ||
475 | + */ | ||
476 | + bau_process_message(mdp, bcp, 0); | ||
477 | + return; | ||
478 | + } | ||
479 | + | ||
480 | + /* | ||
481 | + * Some message has set the MMR 'pending' bit; it might have been | ||
482 | + * another message. Look for that message. | ||
483 | + */ | ||
484 | + other_msg = find_another_by_swack(msg, bcp, msg->swack_vec); | ||
485 | + if (other_msg) { | ||
486 | + /* There is another. Do not ack the current one. */ | ||
487 | + bau_process_message(mdp, bcp, 0); | ||
488 | + /* | ||
489 | + * Let the natural processing of that message acknowledge | ||
490 | + * it. Don't get the processing of sw_ack's out of order. | ||
491 | + */ | ||
492 | + return; | ||
493 | + } | ||
494 | + | ||
495 | + /* | ||
496 | + * There is no other message using this sw_ack, so it is safe to | ||
497 | + * acknowledge it. | ||
498 | + */ | ||
499 | + bau_process_message(mdp, bcp, 1); | ||
500 | + | ||
501 | + return; | ||
502 | +} | ||
503 | + | ||
504 | +/* | ||
505 | * The BAU message interrupt comes here. (registered by set_intr_gate) | ||
506 | * See entry_64.S | ||
507 | * | ||
508 | @@ -1038,9 +1241,11 @@ void uv_bau_message_interrupt(struct pt_regs *regs) | ||
509 | count++; | ||
510 | |||
511 | msgdesc.msg_slot = msg - msgdesc.queue_first; | ||
512 | - msgdesc.swack_slot = ffs(msg->swack_vec) - 1; | ||
513 | msgdesc.msg = msg; | ||
514 | - bau_process_message(&msgdesc, bcp); | ||
515 | + if (bcp->uvhub_version == 2) | ||
516 | + process_uv2_message(&msgdesc, bcp); | ||
517 | + else | ||
518 | + bau_process_message(&msgdesc, bcp, 1); | ||
519 | |||
520 | msg++; | ||
521 | if (msg > msgdesc.queue_last) | ||
522 | @@ -1158,7 +1363,7 @@ static int ptc_seq_show(struct seq_file *file, void *data) | ||
523 | seq_printf(file, | ||
524 | "all one mult none retry canc nocan reset rcan "); | ||
525 | seq_printf(file, | ||
526 | - "disable enable\n"); | ||
527 | + "disable enable wars warshw warwaits\n"); | ||
528 | } | ||
529 | if (cpu < num_possible_cpus() && cpu_online(cpu)) { | ||
530 | stat = &per_cpu(ptcstats, cpu); | ||
531 | @@ -1189,8 +1394,10 @@ static int ptc_seq_show(struct seq_file *file, void *data) | ||
532 | stat->d_nomsg, stat->d_retries, stat->d_canceled, | ||
533 | stat->d_nocanceled, stat->d_resets, | ||
534 | stat->d_rcanceled); | ||
535 | - seq_printf(file, "%ld %ld\n", | ||
536 | - stat->s_bau_disabled, stat->s_bau_reenabled); | ||
537 | + seq_printf(file, "%ld %ld %ld %ld %ld\n", | ||
538 | + stat->s_bau_disabled, stat->s_bau_reenabled, | ||
539 | + stat->s_uv2_wars, stat->s_uv2_wars_hw, | ||
540 | + stat->s_uv2_war_waits); | ||
541 | } | ||
542 | return 0; | ||
543 | } | ||
544 | @@ -1564,6 +1771,7 @@ static void pq_init(int node, int pnode) | ||
545 | write_mmr_payload_first(pnode, pn_first); | ||
546 | write_mmr_payload_tail(pnode, first); | ||
547 | write_mmr_payload_last(pnode, last); | ||
548 | + write_gmmr_sw_ack(pnode, 0xffffUL); | ||
549 | |||
550 | /* in effect, all msg_type's are set to MSG_NOOP */ | ||
551 | memset(pqp, 0, sizeof(struct bau_pq_entry) * DEST_Q_SIZE); | ||
552 | @@ -1651,6 +1859,7 @@ static void __init init_per_cpu_tunables(void) | ||
553 | bcp->cong_response_us = congested_respns_us; | ||
554 | bcp->cong_reps = congested_reps; | ||
555 | bcp->cong_period = congested_period; | ||
556 | + bcp->clocks_per_100_usec = usec_2_cycles(100); | ||
557 | } | ||
558 | } | ||
559 | |||
560 | @@ -1771,6 +1980,7 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp, | ||
561 | } | ||
562 | bcp->uvhub_master = *hmasterp; | ||
563 | bcp->uvhub_cpu = uv_cpu_hub_info(cpu)->blade_processor_id; | ||
564 | + bcp->using_desc = bcp->uvhub_cpu; | ||
565 | if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) { | ||
566 | printk(KERN_EMERG "%d cpus per uvhub invalid\n", | ||
567 | bcp->uvhub_cpu); | ||
568 | -- | ||
569 | 1.7.9.5 | ||
570 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch deleted file mode 100644 index 33c20287..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0116-ath9k_hw-fix-interpretation-of-the-rx-KeyMiss-flag.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 36fed113f3b66718282151fa962f644e793520f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Felix Fietkau <nbd@openwrt.org> | ||
3 | Date: Sat, 14 Jan 2012 15:08:34 +0100 | ||
4 | Subject: [PATCH 116/129] ath9k_hw: fix interpretation of the rx KeyMiss flag | ||
5 | |||
6 | commit 7a532fe7131216a02c81a6c1b1f8632da1195a58 upstream. | ||
7 | |||
8 | Documentation states that the KeyMiss flag is only valid if RxFrameOK is | ||
9 | unset, however empirical evidence has shown that this is false. | ||
10 | When KeyMiss is set (and RxFrameOK is 1), the hardware passes a valid frame | ||
11 | which has not been decrypted. The driver then falsely marks the frame | ||
12 | as decrypted, and when using CCMP this corrupts the rx CCMP PN, leading | ||
13 | to connection hangs. | ||
14 | |||
15 | Signed-off-by: Felix Fietkau <nbd@openwrt.org> | ||
16 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
18 | --- | ||
19 | drivers/net/wireless/ath/ath9k/ar9003_mac.c | 5 +++-- | ||
20 | drivers/net/wireless/ath/ath9k/mac.c | 5 +++-- | ||
21 | 2 files changed, 6 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c | ||
24 | index ccde784..f5ae3c6 100644 | ||
25 | --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c | ||
26 | +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c | ||
27 | @@ -526,10 +526,11 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, | ||
28 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; | ||
29 | else if (rxsp->status11 & AR_MichaelErr) | ||
30 | rxs->rs_status |= ATH9K_RXERR_MIC; | ||
31 | - if (rxsp->status11 & AR_KeyMiss) | ||
32 | - rxs->rs_status |= ATH9K_RXERR_KEYMISS; | ||
33 | } | ||
34 | |||
35 | + if (rxsp->status11 & AR_KeyMiss) | ||
36 | + rxs->rs_status |= ATH9K_RXERR_KEYMISS; | ||
37 | + | ||
38 | return 0; | ||
39 | } | ||
40 | EXPORT_SYMBOL(ath9k_hw_process_rxdesc_edma); | ||
41 | diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c | ||
42 | index ecdb6fd..bbcb777 100644 | ||
43 | --- a/drivers/net/wireless/ath/ath9k/mac.c | ||
44 | +++ b/drivers/net/wireless/ath/ath9k/mac.c | ||
45 | @@ -621,10 +621,11 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, | ||
46 | rs->rs_status |= ATH9K_RXERR_DECRYPT; | ||
47 | else if (ads.ds_rxstatus8 & AR_MichaelErr) | ||
48 | rs->rs_status |= ATH9K_RXERR_MIC; | ||
49 | - if (ads.ds_rxstatus8 & AR_KeyMiss) | ||
50 | - rs->rs_status |= ATH9K_RXERR_KEYMISS; | ||
51 | } | ||
52 | |||
53 | + if (ads.ds_rxstatus8 & AR_KeyMiss) | ||
54 | + rs->rs_status |= ATH9K_RXERR_KEYMISS; | ||
55 | + | ||
56 | return 0; | ||
57 | } | ||
58 | EXPORT_SYMBOL(ath9k_hw_rxprocdesc); | ||
59 | -- | ||
60 | 1.7.9.5 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-rt2800pci-fix-spurious-interrupts-generation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-rt2800pci-fix-spurious-interrupts-generation.patch deleted file mode 100644 index 9fc97d72..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0117-rt2800pci-fix-spurious-interrupts-generation.patch +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | From a84e0b6f2dfb09db9a5cb66bb913f619d8973a62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stanislaw Gruszka <sgruszka@redhat.com> | ||
3 | Date: Fri, 13 Jan 2012 12:59:32 +0100 | ||
4 | Subject: [PATCH 117/129] rt2800pci: fix spurious interrupts generation | ||
5 | |||
6 | commit dfd00c4c8f3dfa1fd7cec45f83d98b2a49743dcd upstream. | ||
7 | |||
8 | Same devices can generate interrupt without properly setting bit in | ||
9 | INT_SOURCE_CSR register (spurious interrupt), what will cause IRQ line | ||
10 | will be disabled by interrupts controller driver. | ||
11 | |||
12 | We discovered that clearing INT_MASK_CSR stops such behaviour. We | ||
13 | previously first read that register, and then clear all know interrupt | ||
14 | sources bits and do not touch reserved bits. After this patch, we write | ||
15 | to all register content (I believe writing to reserved bits on that | ||
16 | register will not cause any problems, I tested that on my rt2800pci | ||
17 | device). | ||
18 | |||
19 | This fix very bad performance problem, practically making device | ||
20 | unusable (since worked without interrupts), reported in: | ||
21 | https://bugzilla.redhat.com/show_bug.cgi?id=658451 | ||
22 | |||
23 | We previously tried to workaround that issue in commit | ||
24 | 4ba7d9997869d25bd223dea7536fc1ce9fab3b3b "rt2800pci: handle spurious | ||
25 | interrupts", but it was reverted in commit | ||
26 | 82e5fc2a34fa9ffea38f00c4066b7e600a0ca5e6 | ||
27 | as thing, that will prevent to detect real spurious interrupts. | ||
28 | |||
29 | Reported-and-tested-by: Amir Hedayaty <hedayaty@gmail.com> | ||
30 | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> | ||
31 | Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> | ||
32 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
34 | --- | ||
35 | drivers/net/wireless/rt2x00/rt2800pci.c | 28 ++++++++-------------------- | ||
36 | 1 file changed, 8 insertions(+), 20 deletions(-) | ||
37 | |||
38 | diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c | ||
39 | index da48c8a..837b460 100644 | ||
40 | --- a/drivers/net/wireless/rt2x00/rt2800pci.c | ||
41 | +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | ||
42 | @@ -422,7 +422,6 @@ static int rt2800pci_init_queues(struct rt2x00_dev *rt2x00dev) | ||
43 | static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, | ||
44 | enum dev_state state) | ||
45 | { | ||
46 | - int mask = (state == STATE_RADIO_IRQ_ON); | ||
47 | u32 reg; | ||
48 | unsigned long flags; | ||
49 | |||
50 | @@ -436,25 +435,14 @@ static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev, | ||
51 | } | ||
52 | |||
53 | spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); | ||
54 | - rt2x00pci_register_read(rt2x00dev, INT_MASK_CSR, ®); | ||
55 | - rt2x00_set_field32(®, INT_MASK_CSR_RXDELAYINT, 0); | ||
56 | - rt2x00_set_field32(®, INT_MASK_CSR_TXDELAYINT, 0); | ||
57 | - rt2x00_set_field32(®, INT_MASK_CSR_RX_DONE, mask); | ||
58 | - rt2x00_set_field32(®, INT_MASK_CSR_AC0_DMA_DONE, 0); | ||
59 | - rt2x00_set_field32(®, INT_MASK_CSR_AC1_DMA_DONE, 0); | ||
60 | - rt2x00_set_field32(®, INT_MASK_CSR_AC2_DMA_DONE, 0); | ||
61 | - rt2x00_set_field32(®, INT_MASK_CSR_AC3_DMA_DONE, 0); | ||
62 | - rt2x00_set_field32(®, INT_MASK_CSR_HCCA_DMA_DONE, 0); | ||
63 | - rt2x00_set_field32(®, INT_MASK_CSR_MGMT_DMA_DONE, 0); | ||
64 | - rt2x00_set_field32(®, INT_MASK_CSR_MCU_COMMAND, 0); | ||
65 | - rt2x00_set_field32(®, INT_MASK_CSR_RXTX_COHERENT, 0); | ||
66 | - rt2x00_set_field32(®, INT_MASK_CSR_TBTT, mask); | ||
67 | - rt2x00_set_field32(®, INT_MASK_CSR_PRE_TBTT, mask); | ||
68 | - rt2x00_set_field32(®, INT_MASK_CSR_TX_FIFO_STATUS, mask); | ||
69 | - rt2x00_set_field32(®, INT_MASK_CSR_AUTO_WAKEUP, mask); | ||
70 | - rt2x00_set_field32(®, INT_MASK_CSR_GPTIMER, 0); | ||
71 | - rt2x00_set_field32(®, INT_MASK_CSR_RX_COHERENT, 0); | ||
72 | - rt2x00_set_field32(®, INT_MASK_CSR_TX_COHERENT, 0); | ||
73 | + reg = 0; | ||
74 | + if (state == STATE_RADIO_IRQ_ON) { | ||
75 | + rt2x00_set_field32(®, INT_MASK_CSR_RX_DONE, 1); | ||
76 | + rt2x00_set_field32(®, INT_MASK_CSR_TBTT, 1); | ||
77 | + rt2x00_set_field32(®, INT_MASK_CSR_PRE_TBTT, 1); | ||
78 | + rt2x00_set_field32(®, INT_MASK_CSR_TX_FIFO_STATUS, 1); | ||
79 | + rt2x00_set_field32(®, INT_MASK_CSR_AUTO_WAKEUP, 1); | ||
80 | + } | ||
81 | rt2x00pci_register_write(rt2x00dev, INT_MASK_CSR, reg); | ||
82 | spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); | ||
83 | |||
84 | -- | ||
85 | 1.7.9.5 | ||
86 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch deleted file mode 100644 index 6a0feaa8..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0118-xfs-fix-endian-conversion-issue-in-discard-code.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 1075b6106024e51af7a5108626091322d2e91710 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dave Chinner <dchinner@redhat.com> | ||
3 | Date: Wed, 18 Jan 2012 14:41:45 -0600 | ||
4 | Subject: [PATCH 118/129] xfs: fix endian conversion issue in discard code | ||
5 | |||
6 | commit b1c770c273a4787069306fc82aab245e9ac72e9d upstream | ||
7 | |||
8 | When finding the longest extent in an AG, we read the value directly | ||
9 | out of the AGF buffer without endian conversion. This will give an | ||
10 | incorrect length, resulting in FITRIM operations potentially not | ||
11 | trimming everything that it should. | ||
12 | |||
13 | Signed-off-by: Dave Chinner <dchinner@redhat.com> | ||
14 | Reviewed-by: Christoph Hellwig <hch@lst.de> | ||
15 | Signed-off-by: Ben Myers <bpm@sgi.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | fs/xfs/xfs_discard.c | 4 ++-- | ||
19 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c | ||
22 | index 8a24f0c..286a051 100644 | ||
23 | --- a/fs/xfs/xfs_discard.c | ||
24 | +++ b/fs/xfs/xfs_discard.c | ||
25 | @@ -68,7 +68,7 @@ xfs_trim_extents( | ||
26 | * Look up the longest btree in the AGF and start with it. | ||
27 | */ | ||
28 | error = xfs_alloc_lookup_le(cur, 0, | ||
29 | - XFS_BUF_TO_AGF(agbp)->agf_longest, &i); | ||
30 | + be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest), &i); | ||
31 | if (error) | ||
32 | goto out_del_cursor; | ||
33 | |||
34 | @@ -84,7 +84,7 @@ xfs_trim_extents( | ||
35 | if (error) | ||
36 | goto out_del_cursor; | ||
37 | XFS_WANT_CORRUPTED_GOTO(i == 1, out_del_cursor); | ||
38 | - ASSERT(flen <= XFS_BUF_TO_AGF(agbp)->agf_longest); | ||
39 | + ASSERT(flen <= be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest)); | ||
40 | |||
41 | /* | ||
42 | * Too small? Give up. | ||
43 | -- | ||
44 | 1.7.9.5 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-i2c-eg20t-modified-the-setting-of-transfer-rate.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-i2c-eg20t-modified-the-setting-of-transfer-rate.patch deleted file mode 100644 index 15391676..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0119-i2c-eg20t-modified-the-setting-of-transfer-rate.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From d73358012ed5ac74a1f51fa250d221be5e3ca304 Mon Sep 17 00:00:00 2001 | ||
2 | From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> | ||
3 | Date: Mon, 26 Sep 2011 16:16:23 +0900 | ||
4 | Subject: [PATCH 119/129] i2c-eg20t: modified the setting of transfer rate. | ||
5 | |||
6 | commit ff35e8b18984ad2a82cbd259fc07f0be4b34b1aa upstream. | ||
7 | |||
8 | This patch modified the setting value of | ||
9 | I2C Bus Transfer Rate Setting Counter regisrer. | ||
10 | |||
11 | Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com> | ||
12 | Signed-off-by: Ben Dooks <ben-linux@fluff.org> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
14 | --- | ||
15 | drivers/i2c/busses/i2c-eg20t.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c | ||
19 | index 18936ac..730215e 100644 | ||
20 | --- a/drivers/i2c/busses/i2c-eg20t.c | ||
21 | +++ b/drivers/i2c/busses/i2c-eg20t.c | ||
22 | @@ -243,7 +243,7 @@ static void pch_i2c_init(struct i2c_algo_pch_data *adap) | ||
23 | if (pch_clk > PCH_MAX_CLK) | ||
24 | pch_clk = 62500; | ||
25 | |||
26 | - pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / pch_i2c_speed * 8; | ||
27 | + pch_i2cbc = (pch_clk + (pch_i2c_speed * 4)) / (pch_i2c_speed * 8); | ||
28 | /* Set transfer speed in I2CBC */ | ||
29 | iowrite32(pch_i2cbc, p + PCH_I2CBC); | ||
30 | |||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-score-fix-off-by-one-index-into-syscall-table.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-score-fix-off-by-one-index-into-syscall-table.patch deleted file mode 100644 index 7926f229..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0120-score-fix-off-by-one-index-into-syscall-table.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 9391ba8a34c0947af9b6c756387fc8bf70959648 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Rosenberg <drosenberg@vsecurity.com> | ||
3 | Date: Fri, 20 Jan 2012 14:34:27 -0800 | ||
4 | Subject: [PATCH 120/129] score: fix off-by-one index into syscall table | ||
5 | |||
6 | commit c25a785d6647984505fa165b5cd84cfc9a95970b upstream. | ||
7 | |||
8 | If the provided system call number is equal to __NR_syscalls, the | ||
9 | current check will pass and a function pointer just after the system | ||
10 | call table may be called, since sys_call_table is an array with total | ||
11 | size __NR_syscalls. | ||
12 | |||
13 | Whether or not this is a security bug depends on what the compiler puts | ||
14 | immediately after the system call table. It's likely that this won't do | ||
15 | anything bad because there is an additional NULL check on the syscall | ||
16 | entry, but if there happens to be a non-NULL value immediately after the | ||
17 | system call table, this may result in local privilege escalation. | ||
18 | |||
19 | Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> | ||
20 | Cc: Chen Liqin <liqin.chen@sunplusct.com> | ||
21 | Cc: Lennox Wu <lennox.wu@gmail.com> | ||
22 | Cc: Eugene Teo <eugeneteo@kernel.sg> | ||
23 | Cc: Arnd Bergmann <arnd@arndb.de> | ||
24 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
25 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
27 | --- | ||
28 | arch/score/kernel/entry.S | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/arch/score/kernel/entry.S b/arch/score/kernel/entry.S | ||
32 | index 577abba..83bb960 100644 | ||
33 | --- a/arch/score/kernel/entry.S | ||
34 | +++ b/arch/score/kernel/entry.S | ||
35 | @@ -408,7 +408,7 @@ ENTRY(handle_sys) | ||
36 | sw r9, [r0, PT_EPC] | ||
37 | |||
38 | cmpi.c r27, __NR_syscalls # check syscall number | ||
39 | - bgtu illegal_syscall | ||
40 | + bgeu illegal_syscall | ||
41 | |||
42 | slli r8, r27, 2 # get syscall routine | ||
43 | la r11, sys_call_table | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-cifs-lower-default-wsize-when-unix-extensions-are-no.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-cifs-lower-default-wsize-when-unix-extensions-are-no.patch deleted file mode 100644 index f857485e..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0121-cifs-lower-default-wsize-when-unix-extensions-are-no.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From 95b45505920a18fb705ad35e9144aaf94ea01421 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jeff Layton <jlayton@redhat.com> | ||
3 | Date: Tue, 17 Jan 2012 16:08:51 -0500 | ||
4 | Subject: [PATCH 121/129] cifs: lower default wsize when unix extensions are | ||
5 | not used | ||
6 | |||
7 | commit ce91acb3acae26f4163c5a6f1f695d1a1e8d9009 upstream. | ||
8 | |||
9 | We've had some reports of servers (namely, the Solaris in-kernel CIFS | ||
10 | server) that don't deal properly with writes that are "too large" even | ||
11 | though they set CAP_LARGE_WRITE_ANDX. Change the default to better | ||
12 | mirror what windows clients do. | ||
13 | |||
14 | Cc: Pavel Shilovsky <piastry@etersoft.ru> | ||
15 | Reported-by: Nick Davis <phireph0x@yahoo.com> | ||
16 | Signed-off-by: Jeff Layton <jlayton@redhat.com> | ||
17 | Signed-off-by: Steve French <smfrench@gmail.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
19 | --- | ||
20 | fs/cifs/connect.c | 23 +++++++++++++++++++---- | ||
21 | 1 file changed, 19 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c | ||
24 | index f3670cf..63e4be4 100644 | ||
25 | --- a/fs/cifs/connect.c | ||
26 | +++ b/fs/cifs/connect.c | ||
27 | @@ -2914,18 +2914,33 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, | ||
28 | #define CIFS_DEFAULT_IOSIZE (1024 * 1024) | ||
29 | |||
30 | /* | ||
31 | - * Windows only supports a max of 60k reads. Default to that when posix | ||
32 | - * extensions aren't in force. | ||
33 | + * Windows only supports a max of 60kb reads and 65535 byte writes. Default to | ||
34 | + * those values when posix extensions aren't in force. In actuality here, we | ||
35 | + * use 65536 to allow for a write that is a multiple of 4k. Most servers seem | ||
36 | + * to be ok with the extra byte even though Windows doesn't send writes that | ||
37 | + * are that large. | ||
38 | + * | ||
39 | + * Citation: | ||
40 | + * | ||
41 | + * http://blogs.msdn.com/b/openspecification/archive/2009/04/10/smb-maximum-transmit-buffer-size-and-performance-tuning.aspx | ||
42 | */ | ||
43 | #define CIFS_DEFAULT_NON_POSIX_RSIZE (60 * 1024) | ||
44 | +#define CIFS_DEFAULT_NON_POSIX_WSIZE (65536) | ||
45 | |||
46 | static unsigned int | ||
47 | cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *pvolume_info) | ||
48 | { | ||
49 | __u64 unix_cap = le64_to_cpu(tcon->fsUnixInfo.Capability); | ||
50 | struct TCP_Server_Info *server = tcon->ses->server; | ||
51 | - unsigned int wsize = pvolume_info->wsize ? pvolume_info->wsize : | ||
52 | - CIFS_DEFAULT_IOSIZE; | ||
53 | + unsigned int wsize; | ||
54 | + | ||
55 | + /* start with specified wsize, or default */ | ||
56 | + if (pvolume_info->wsize) | ||
57 | + wsize = pvolume_info->wsize; | ||
58 | + else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) | ||
59 | + wsize = CIFS_DEFAULT_IOSIZE; | ||
60 | + else | ||
61 | + wsize = CIFS_DEFAULT_NON_POSIX_WSIZE; | ||
62 | |||
63 | /* can server support 24-bit write sizes? (via UNIX extensions) */ | ||
64 | if (!tcon->unix_ext || !(unix_cap & CIFS_UNIX_LARGE_WRITE_CAP)) | ||
65 | -- | ||
66 | 1.7.9.5 | ||
67 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-kprobes-initialize-before-using-a-hlist.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-kprobes-initialize-before-using-a-hlist.patch deleted file mode 100644 index ff829958..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0122-kprobes-initialize-before-using-a-hlist.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From b15b8b5f7a9cfc20c2e68ba4a6a402ff44bb6c4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Ananth N Mavinakayanahalli <ananth@in.ibm.com> | ||
3 | Date: Fri, 20 Jan 2012 14:34:04 -0800 | ||
4 | Subject: [PATCH 122/129] kprobes: initialize before using a hlist | ||
5 | |||
6 | commit d496aab567e7e52b3e974c9192a5de6e77dce32c upstream. | ||
7 | |||
8 | Commit ef53d9c5e ("kprobes: improve kretprobe scalability with hashed | ||
9 | locking") introduced a bug where we can potentially leak | ||
10 | kretprobe_instances since we initialize a hlist head after having used | ||
11 | it. | ||
12 | |||
13 | Initialize the hlist head before using it. | ||
14 | |||
15 | Reported by: Jim Keniston <jkenisto@us.ibm.com> | ||
16 | Acked-by: Jim Keniston <jkenisto@us.ibm.com> | ||
17 | Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> | ||
18 | Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | ||
19 | Cc: Srinivasa D S <srinivasa@in.ibm.com> | ||
20 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
21 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
23 | --- | ||
24 | kernel/kprobes.c | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/kernel/kprobes.c b/kernel/kprobes.c | ||
28 | index e5d8464..52fd049 100644 | ||
29 | --- a/kernel/kprobes.c | ||
30 | +++ b/kernel/kprobes.c | ||
31 | @@ -1077,6 +1077,7 @@ void __kprobes kprobe_flush_task(struct task_struct *tk) | ||
32 | /* Early boot. kretprobe_table_locks not yet initialized. */ | ||
33 | return; | ||
34 | |||
35 | + INIT_HLIST_HEAD(&empty_rp); | ||
36 | hash = hash_ptr(tk, KPROBE_HASH_BITS); | ||
37 | head = &kretprobe_inst_table[hash]; | ||
38 | kretprobe_table_lock(hash, &flags); | ||
39 | @@ -1085,7 +1086,6 @@ void __kprobes kprobe_flush_task(struct task_struct *tk) | ||
40 | recycle_rp_inst(ri, &empty_rp); | ||
41 | } | ||
42 | kretprobe_table_unlock(hash, &flags); | ||
43 | - INIT_HLIST_HEAD(&empty_rp); | ||
44 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | ||
45 | hlist_del(&ri->hlist); | ||
46 | kfree(ri); | ||
47 | -- | ||
48 | 1.7.9.5 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-proc-clear_refs-do-not-clear-reserved-pages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-proc-clear_refs-do-not-clear-reserved-pages.patch deleted file mode 100644 index 521c3d5d..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0123-proc-clear_refs-do-not-clear-reserved-pages.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 8077f2d3611dd0c75c64f018c7e01dc2a4948a27 Mon Sep 17 00:00:00 2001 | ||
2 | From: Will Deacon <will.deacon@arm.com> | ||
3 | Date: Fri, 20 Jan 2012 14:34:09 -0800 | ||
4 | Subject: [PATCH 123/129] proc: clear_refs: do not clear reserved pages | ||
5 | |||
6 | commit 85e72aa5384b1a614563ad63257ded0e91d1a620 upstream. | ||
7 | |||
8 | /proc/pid/clear_refs is used to clear the Referenced and YOUNG bits for | ||
9 | pages and corresponding page table entries of the task with PID pid, which | ||
10 | includes any special mappings inserted into the page tables in order to | ||
11 | provide things like vDSOs and user helper functions. | ||
12 | |||
13 | On ARM this causes a problem because the vectors page is mapped as a | ||
14 | global mapping and since ec706dab ("ARM: add a vma entry for the user | ||
15 | accessible vector page"), a VMA is also inserted into each task for this | ||
16 | page to aid unwinding through signals and syscall restarts. Since the | ||
17 | vectors page is required for handling faults, clearing the YOUNG bit (and | ||
18 | subsequently writing a faulting pte) means that we lose the vectors page | ||
19 | *globally* and cannot fault it back in. This results in a system deadlock | ||
20 | on the next exception. | ||
21 | |||
22 | To see this problem in action, just run: | ||
23 | |||
24 | $ echo 1 > /proc/self/clear_refs | ||
25 | |||
26 | on an ARM platform (as any user) and watch your system hang. I think this | ||
27 | has been the case since 2.6.37 | ||
28 | |||
29 | This patch avoids clearing the aforementioned bits for reserved pages, | ||
30 | therefore leaving the vectors page intact on ARM. Since reserved pages | ||
31 | are not candidates for swap, this change should not have any impact on the | ||
32 | usefulness of clear_refs. | ||
33 | |||
34 | Signed-off-by: Will Deacon <will.deacon@arm.com> | ||
35 | Reported-by: Moussa Ba <moussaba@micron.com> | ||
36 | Acked-by: Hugh Dickins <hughd@google.com> | ||
37 | Cc: David Rientjes <rientjes@google.com> | ||
38 | Cc: Russell King <rmk@arm.linux.org.uk> | ||
39 | Acked-by: Nicolas Pitre <nico@linaro.org> | ||
40 | Cc: Matt Mackall <mpm@selenic.com> | ||
41 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
42 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
43 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
44 | --- | ||
45 | fs/proc/task_mmu.c | 3 +++ | ||
46 | 1 file changed, 3 insertions(+) | ||
47 | |||
48 | diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c | ||
49 | index e418c5a..7dcd2a2 100644 | ||
50 | --- a/fs/proc/task_mmu.c | ||
51 | +++ b/fs/proc/task_mmu.c | ||
52 | @@ -518,6 +518,9 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, | ||
53 | if (!page) | ||
54 | continue; | ||
55 | |||
56 | + if (PageReserved(page)) | ||
57 | + continue; | ||
58 | + | ||
59 | /* Clear accessed and referenced bits. */ | ||
60 | ptep_test_and_clear_young(vma, addr, pte); | ||
61 | ClearPageReferenced(page); | ||
62 | -- | ||
63 | 1.7.9.5 | ||
64 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch deleted file mode 100644 index 1d4d2f88..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0124-mm-fix-NULL-ptr-dereference-in-__count_immobile_page.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | From e4131b26d39c1bf1f739fd09451ade0906252661 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michal Hocko <mhocko@suse.cz> | ||
3 | Date: Fri, 20 Jan 2012 14:33:55 -0800 | ||
4 | Subject: [PATCH 124/129] mm: fix NULL ptr dereference in | ||
5 | __count_immobile_pages | ||
6 | |||
7 | commit 687875fb7de4a95223af20ee024282fa9099f860 upstream. | ||
8 | |||
9 | Fix the following NULL ptr dereference caused by | ||
10 | |||
11 | cat /sys/devices/system/memory/memory0/removable | ||
12 | |||
13 | Pid: 13979, comm: sed Not tainted 3.0.13-0.5-default #1 IBM BladeCenter LS21 -[7971PAM]-/Server Blade | ||
14 | RIP: __count_immobile_pages+0x4/0x100 | ||
15 | Process sed (pid: 13979, threadinfo ffff880221c36000, task ffff88022e788480) | ||
16 | Call Trace: | ||
17 | is_pageblock_removable_nolock+0x34/0x40 | ||
18 | is_mem_section_removable+0x74/0xf0 | ||
19 | show_mem_removable+0x41/0x70 | ||
20 | sysfs_read_file+0xfe/0x1c0 | ||
21 | vfs_read+0xc7/0x130 | ||
22 | sys_read+0x53/0xa0 | ||
23 | system_call_fastpath+0x16/0x1b | ||
24 | |||
25 | We are crashing because we are trying to dereference NULL zone which | ||
26 | came from pfn=0 (struct page ffffea0000000000). According to the boot | ||
27 | log this page is marked reserved: | ||
28 | e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved) | ||
29 | |||
30 | and early_node_map confirms that: | ||
31 | early_node_map[3] active PFN ranges | ||
32 | 1: 0x00000010 -> 0x0000009c | ||
33 | 1: 0x00000100 -> 0x000bffa3 | ||
34 | 1: 0x00100000 -> 0x00240000 | ||
35 | |||
36 | The problem is that memory_present works in PAGE_SECTION_MASK aligned | ||
37 | blocks so the reserved range sneaks into the the section as well. This | ||
38 | also means that free_area_init_node will not take care of those reserved | ||
39 | pages and they stay uninitialized. | ||
40 | |||
41 | When we try to read the removable status we walk through all available | ||
42 | sections and hope that the zone is valid for all pages in the section. | ||
43 | But this is not true in this case as the zone and nid are not initialized. | ||
44 | |||
45 | We have only one node in this particular case and it is marked as node=1 | ||
46 | (rather than 0) and that made the problem visible because page_to_nid will | ||
47 | return 0 and there are no zones on the node. | ||
48 | |||
49 | Let's check that the zone is valid and that the given pfn falls into its | ||
50 | boundaries and mark the section not removable. This might cause some | ||
51 | false positives, probably, but we do not have any sane way to find out | ||
52 | whether the page is reserved by the platform or it is just not used for | ||
53 | whatever other reasons. | ||
54 | |||
55 | Signed-off-by: Michal Hocko <mhocko@suse.cz> | ||
56 | Acked-by: Mel Gorman <mgorman@suse.de> | ||
57 | Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | ||
58 | Cc: Andrea Arcangeli <aarcange@redhat.com> | ||
59 | Cc: David Rientjes <rientjes@google.com> | ||
60 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
61 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
62 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
63 | --- | ||
64 | mm/page_alloc.c | 11 +++++++++++ | ||
65 | 1 file changed, 11 insertions(+) | ||
66 | |||
67 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c | ||
68 | index 2b8ba3a..485be89 100644 | ||
69 | --- a/mm/page_alloc.c | ||
70 | +++ b/mm/page_alloc.c | ||
71 | @@ -5608,6 +5608,17 @@ __count_immobile_pages(struct zone *zone, struct page *page, int count) | ||
72 | bool is_pageblock_removable_nolock(struct page *page) | ||
73 | { | ||
74 | struct zone *zone = page_zone(page); | ||
75 | + unsigned long pfn = page_to_pfn(page); | ||
76 | + | ||
77 | + /* | ||
78 | + * We have to be careful here because we are iterating over memory | ||
79 | + * sections which are not zone aware so we might end up outside of | ||
80 | + * the zone but still within the section. | ||
81 | + */ | ||
82 | + if (!zone || zone->zone_start_pfn > pfn || | ||
83 | + zone->zone_start_pfn + zone->spanned_pages <= pfn) | ||
84 | + return false; | ||
85 | + | ||
86 | return __count_immobile_pages(zone, page, 0); | ||
87 | } | ||
88 | |||
89 | -- | ||
90 | 1.7.9.5 | ||
91 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-iwlagn-check-for-SMPS-mode.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-iwlagn-check-for-SMPS-mode.patch deleted file mode 100644 index b0cda033..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0125-iwlagn-check-for-SMPS-mode.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 70fd986c5b5171460831de5af79b0d62af90411f Mon Sep 17 00:00:00 2001 | ||
2 | From: Wey-Yi Guy <wey-yi.w.guy@intel.com> | ||
3 | Date: Thu, 10 Nov 2011 06:55:04 -0800 | ||
4 | Subject: [PATCH 125/129] iwlagn: check for SMPS mode | ||
5 | |||
6 | commit b2ccccdca46273c7b321ecf5041c362cd950da20 upstream. | ||
7 | |||
8 | Check and report WARN only when its invalid | ||
9 | |||
10 | Resolves: | ||
11 | https://bugzilla.kernel.org/show_bug.cgi?id=42621 | ||
12 | https://bugzilla.redhat.com/show_bug.cgi?id=766071 | ||
13 | |||
14 | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> | ||
15 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
17 | --- | ||
18 | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1 + | ||
19 | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 3 +++ | ||
20 | 2 files changed, 4 insertions(+) | ||
21 | |||
22 | diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | ||
23 | index 1a52ed2..6465983 100644 | ||
24 | --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | ||
25 | +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | ||
26 | @@ -827,6 +827,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | ||
27 | case IEEE80211_SMPS_STATIC: | ||
28 | case IEEE80211_SMPS_DYNAMIC: | ||
29 | return IWL_NUM_IDLE_CHAINS_SINGLE; | ||
30 | + case IEEE80211_SMPS_AUTOMATIC: | ||
31 | case IEEE80211_SMPS_OFF: | ||
32 | return active_cnt; | ||
33 | default: | ||
34 | diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | ||
35 | index 5c7c17c..d552fa3 100644 | ||
36 | --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | ||
37 | +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | ||
38 | @@ -559,6 +559,9 @@ int iwlagn_mac_config(struct ieee80211_hw *hw, u32 changed) | ||
39 | |||
40 | mutex_lock(&priv->shrd->mutex); | ||
41 | |||
42 | + if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status)) | ||
43 | + goto out; | ||
44 | + | ||
45 | if (unlikely(test_bit(STATUS_SCANNING, &priv->shrd->status))) { | ||
46 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); | ||
47 | goto out; | ||
48 | -- | ||
49 | 1.7.9.5 | ||
50 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch deleted file mode 100644 index b00ae5cf..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0126-iwlegacy-3945-fix-hw-passive-scan-on-radar-channels.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 2daa9185b2ac519603743cbc902f00633947e878 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stanislaw Gruszka <sgruszka@redhat.com> | ||
3 | Date: Fri, 23 Dec 2011 08:13:50 +0100 | ||
4 | Subject: [PATCH 126/129] iwlegacy: 3945: fix hw passive scan on radar | ||
5 | channels | ||
6 | |||
7 | commit 68acc4afb040d98ddfd2cae0de09e2f4e1ee127f upstream. | ||
8 | |||
9 | Patch fix firmware error on "iw dev wlan0 scan passive" for | ||
10 | hardware scanning (with disable_hw_scan=0 module parameter). | ||
11 | |||
12 | iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008. | ||
13 | iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9 | ||
14 | iwl3945 0000:03:00.0: Start IWL Error Log Dump: | ||
15 | iwl3945 0000:03:00.0: Status: 0x0002A2E4, count: 1 | ||
16 | iwl3945 0000:03:00.0: Desc Time asrtPC blink2 ilink1 nmiPC Line | ||
17 | iwl3945 0000:03:00.0: SYSASSERT (0x5) 0041263900 0x13756 0x0031C 0x00000 764 | ||
18 | iwl3945 0000:03:00.0: Error Reply type 0x000002FC cmd C_SCAN (0x80) seq 0x443E ser 0x00340000 | ||
19 | iwl3945 0000:03:00.0: Command C_SCAN failed: FW Error | ||
20 | iwl3945 0000:03:00.0: Can't stop Rx DMA. | ||
21 | |||
22 | We have disable ability to change passive scanning to active on | ||
23 | particular channel when traffic is detected on that channel. Otherwise | ||
24 | firmware will report error, when we try to do passive scan on radar | ||
25 | channels. | ||
26 | |||
27 | Reported-and-debugged-by: Pedro Francisco <pedrogfrancisco@gmail.com> | ||
28 | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> | ||
29 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
30 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
31 | --- | ||
32 | drivers/net/wireless/iwlegacy/iwl3945-base.c | 9 ++++----- | ||
33 | 1 file changed, 4 insertions(+), 5 deletions(-) | ||
34 | |||
35 | diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c | ||
36 | index b282d86..05f2ad1 100644 | ||
37 | --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c | ||
38 | +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | ||
39 | @@ -2656,14 +2656,13 @@ int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | ||
40 | IWL_WARN(priv, "Invalid scan band\n"); | ||
41 | return -EIO; | ||
42 | } | ||
43 | - | ||
44 | /* | ||
45 | - * If active scaning is requested but a certain channel | ||
46 | - * is marked passive, we can do active scanning if we | ||
47 | - * detect transmissions. | ||
48 | + * If active scaning is requested but a certain channel is marked | ||
49 | + * passive, we can do active scanning if we detect transmissions. For | ||
50 | + * passive only scanning disable switching to active on any channel. | ||
51 | */ | ||
52 | scan->good_CRC_th = is_active ? IWL_GOOD_CRC_TH_DEFAULT : | ||
53 | - IWL_GOOD_CRC_TH_DISABLED; | ||
54 | + IWL_GOOD_CRC_TH_NEVER; | ||
55 | |||
56 | len = iwl_legacy_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, | ||
57 | vif->addr, priv->scan_request->ie, | ||
58 | -- | ||
59 | 1.7.9.5 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-SHM_UNLOCK-fix-long-unpreemptible-section.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-SHM_UNLOCK-fix-long-unpreemptible-section.patch deleted file mode 100644 index dfab7529..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0127-SHM_UNLOCK-fix-long-unpreemptible-section.patch +++ /dev/null | |||
@@ -1,186 +0,0 @@ | |||
1 | From e74be920e142da39a0824238a5031649fbec2890 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hugh Dickins <hughd@google.com> | ||
3 | Date: Fri, 20 Jan 2012 14:34:19 -0800 | ||
4 | Subject: [PATCH 127/129] SHM_UNLOCK: fix long unpreemptible section | ||
5 | |||
6 | commit 85046579bde15e532983438f86b36856e358f417 upstream. | ||
7 | |||
8 | scan_mapping_unevictable_pages() is used to make SysV SHM_LOCKed pages | ||
9 | evictable again once the shared memory is unlocked. It does this with | ||
10 | pagevec_lookup()s across the whole object (which might occupy most of | ||
11 | memory), and takes 300ms to unlock 7GB here. A cond_resched() every | ||
12 | PAGEVEC_SIZE pages would be good. | ||
13 | |||
14 | However, KOSAKI-san points out that this is called under shmem.c's | ||
15 | info->lock, and it's also under shm.c's shm_lock(), both spinlocks. | ||
16 | There is no strong reason for that: we need to take these pages off the | ||
17 | unevictable list soonish, but those locks are not required for it. | ||
18 | |||
19 | So move the call to scan_mapping_unevictable_pages() from shmem.c's | ||
20 | unlock handling up to shm.c's unlock handling. Remove the recently | ||
21 | added barrier, not needed now we have spin_unlock() before the scan. | ||
22 | |||
23 | Use get_file(), with subsequent fput(), to make sure we have a reference | ||
24 | to mapping throughout scan_mapping_unevictable_pages(): that's something | ||
25 | that was previously guaranteed by the shm_lock(). | ||
26 | |||
27 | Remove shmctl's lru_add_drain_all(): we don't fault in pages at SHM_LOCK | ||
28 | time, and we lazily discover them to be Unevictable later, so it serves | ||
29 | no purpose for SHM_LOCK; and serves no purpose for SHM_UNLOCK, since | ||
30 | pages still on pagevec are not marked Unevictable. | ||
31 | |||
32 | The original code avoided redundant rescans by checking VM_LOCKED flag | ||
33 | at its level: now avoid them by checking shp's SHM_LOCKED. | ||
34 | |||
35 | The original code called scan_mapping_unevictable_pages() on a locked | ||
36 | area at shm_destroy() time: perhaps we once had accounting cross-checks | ||
37 | which required that, but not now, so skip the overhead and just let | ||
38 | inode eviction deal with them. | ||
39 | |||
40 | Put check_move_unevictable_page() and scan_mapping_unevictable_pages() | ||
41 | under CONFIG_SHMEM (with stub for the TINY case when ramfs is used), | ||
42 | more as comment than to save space; comment them used for SHM_UNLOCK. | ||
43 | |||
44 | Signed-off-by: Hugh Dickins <hughd@google.com> | ||
45 | Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | ||
46 | Cc: Minchan Kim <minchan.kim@gmail.com> | ||
47 | Cc: Rik van Riel <riel@redhat.com> | ||
48 | Cc: Shaohua Li <shaohua.li@intel.com> | ||
49 | Cc: Eric Dumazet <eric.dumazet@gmail.com> | ||
50 | Cc: Johannes Weiner <hannes@cmpxchg.org> | ||
51 | Cc: Michel Lespinasse <walken@google.com> | ||
52 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
53 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
54 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
55 | --- | ||
56 | ipc/shm.c | 37 ++++++++++++++++++++++--------------- | ||
57 | mm/shmem.c | 7 ------- | ||
58 | mm/vmscan.c | 12 +++++++++++- | ||
59 | 3 files changed, 33 insertions(+), 23 deletions(-) | ||
60 | |||
61 | diff --git a/ipc/shm.c b/ipc/shm.c | ||
62 | index 02ecf2c..854ab58 100644 | ||
63 | --- a/ipc/shm.c | ||
64 | +++ b/ipc/shm.c | ||
65 | @@ -870,9 +870,7 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) | ||
66 | case SHM_LOCK: | ||
67 | case SHM_UNLOCK: | ||
68 | { | ||
69 | - struct file *uninitialized_var(shm_file); | ||
70 | - | ||
71 | - lru_add_drain_all(); /* drain pagevecs to lru lists */ | ||
72 | + struct file *shm_file; | ||
73 | |||
74 | shp = shm_lock_check(ns, shmid); | ||
75 | if (IS_ERR(shp)) { | ||
76 | @@ -895,22 +893,31 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) | ||
77 | err = security_shm_shmctl(shp, cmd); | ||
78 | if (err) | ||
79 | goto out_unlock; | ||
80 | - | ||
81 | - if(cmd==SHM_LOCK) { | ||
82 | + | ||
83 | + shm_file = shp->shm_file; | ||
84 | + if (is_file_hugepages(shm_file)) | ||
85 | + goto out_unlock; | ||
86 | + | ||
87 | + if (cmd == SHM_LOCK) { | ||
88 | struct user_struct *user = current_user(); | ||
89 | - if (!is_file_hugepages(shp->shm_file)) { | ||
90 | - err = shmem_lock(shp->shm_file, 1, user); | ||
91 | - if (!err && !(shp->shm_perm.mode & SHM_LOCKED)){ | ||
92 | - shp->shm_perm.mode |= SHM_LOCKED; | ||
93 | - shp->mlock_user = user; | ||
94 | - } | ||
95 | + err = shmem_lock(shm_file, 1, user); | ||
96 | + if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) { | ||
97 | + shp->shm_perm.mode |= SHM_LOCKED; | ||
98 | + shp->mlock_user = user; | ||
99 | } | ||
100 | - } else if (!is_file_hugepages(shp->shm_file)) { | ||
101 | - shmem_lock(shp->shm_file, 0, shp->mlock_user); | ||
102 | - shp->shm_perm.mode &= ~SHM_LOCKED; | ||
103 | - shp->mlock_user = NULL; | ||
104 | + goto out_unlock; | ||
105 | } | ||
106 | + | ||
107 | + /* SHM_UNLOCK */ | ||
108 | + if (!(shp->shm_perm.mode & SHM_LOCKED)) | ||
109 | + goto out_unlock; | ||
110 | + shmem_lock(shm_file, 0, shp->mlock_user); | ||
111 | + shp->shm_perm.mode &= ~SHM_LOCKED; | ||
112 | + shp->mlock_user = NULL; | ||
113 | + get_file(shm_file); | ||
114 | shm_unlock(shp); | ||
115 | + scan_mapping_unevictable_pages(shm_file->f_mapping); | ||
116 | + fput(shm_file); | ||
117 | goto out; | ||
118 | } | ||
119 | case IPC_RMID: | ||
120 | diff --git a/mm/shmem.c b/mm/shmem.c | ||
121 | index d6722506..cc6d40b2 100644 | ||
122 | --- a/mm/shmem.c | ||
123 | +++ b/mm/shmem.c | ||
124 | @@ -1068,13 +1068,6 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user) | ||
125 | user_shm_unlock(inode->i_size, user); | ||
126 | info->flags &= ~VM_LOCKED; | ||
127 | mapping_clear_unevictable(file->f_mapping); | ||
128 | - /* | ||
129 | - * Ensure that a racing putback_lru_page() can see | ||
130 | - * the pages of this mapping are evictable when we | ||
131 | - * skip them due to !PageLRU during the scan. | ||
132 | - */ | ||
133 | - smp_mb__after_clear_bit(); | ||
134 | - scan_mapping_unevictable_pages(file->f_mapping); | ||
135 | } | ||
136 | retval = 0; | ||
137 | |||
138 | diff --git a/mm/vmscan.c b/mm/vmscan.c | ||
139 | index f54a05b..824676a 100644 | ||
140 | --- a/mm/vmscan.c | ||
141 | +++ b/mm/vmscan.c | ||
142 | @@ -3353,6 +3353,7 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) | ||
143 | return 1; | ||
144 | } | ||
145 | |||
146 | +#ifdef CONFIG_SHMEM | ||
147 | /** | ||
148 | * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list | ||
149 | * @page: page to check evictability and move to appropriate lru list | ||
150 | @@ -3363,6 +3364,8 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) | ||
151 | * | ||
152 | * Restrictions: zone->lru_lock must be held, page must be on LRU and must | ||
153 | * have PageUnevictable set. | ||
154 | + * | ||
155 | + * This function is only used for SysV IPC SHM_UNLOCK. | ||
156 | */ | ||
157 | static void check_move_unevictable_page(struct page *page, struct zone *zone) | ||
158 | { | ||
159 | @@ -3396,6 +3399,8 @@ retry: | ||
160 | * | ||
161 | * Scan all pages in mapping. Check unevictable pages for | ||
162 | * evictability and move them to the appropriate zone lru list. | ||
163 | + * | ||
164 | + * This function is only used for SysV IPC SHM_UNLOCK. | ||
165 | */ | ||
166 | void scan_mapping_unevictable_pages(struct address_space *mapping) | ||
167 | { | ||
168 | @@ -3441,9 +3446,14 @@ void scan_mapping_unevictable_pages(struct address_space *mapping) | ||
169 | pagevec_release(&pvec); | ||
170 | |||
171 | count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned); | ||
172 | + cond_resched(); | ||
173 | } | ||
174 | - | ||
175 | } | ||
176 | +#else | ||
177 | +void scan_mapping_unevictable_pages(struct address_space *mapping) | ||
178 | +{ | ||
179 | +} | ||
180 | +#endif /* CONFIG_SHMEM */ | ||
181 | |||
182 | static void warn_scan_unevictable_pages(void) | ||
183 | { | ||
184 | -- | ||
185 | 1.7.9.5 | ||
186 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch deleted file mode 100644 index 70d0feea..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0128-SHM_UNLOCK-fix-Unevictable-pages-stranded-after-swap.patch +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | From 67890984571f0de5f3d975ef1d67643d89d92174 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hugh Dickins <hughd@google.com> | ||
3 | Date: Fri, 20 Jan 2012 14:34:21 -0800 | ||
4 | Subject: [PATCH 128/129] SHM_UNLOCK: fix Unevictable pages stranded after | ||
5 | swap | ||
6 | |||
7 | commit 245132643e1cfcd145bbc86a716c1818371fcb93 upstream. | ||
8 | |||
9 | Commit cc39c6a9bbde ("mm: account skipped entries to avoid looping in | ||
10 | find_get_pages") correctly fixed an infinite loop; but left a problem | ||
11 | that find_get_pages() on shmem would return 0 (appearing to callers to | ||
12 | mean end of tree) when it meets a run of nr_pages swap entries. | ||
13 | |||
14 | The only uses of find_get_pages() on shmem are via pagevec_lookup(), | ||
15 | called from invalidate_mapping_pages(), and from shmctl SHM_UNLOCK's | ||
16 | scan_mapping_unevictable_pages(). The first is already commented, and | ||
17 | not worth worrying about; but the second can leave pages on the | ||
18 | Unevictable list after an unusual sequence of swapping and locking. | ||
19 | |||
20 | Fix that by using shmem_find_get_pages_and_swap() (then ignoring the | ||
21 | swap) instead of pagevec_lookup(). | ||
22 | |||
23 | But I don't want to contaminate vmscan.c with shmem internals, nor | ||
24 | shmem.c with LRU locking. So move scan_mapping_unevictable_pages() into | ||
25 | shmem.c, renaming it shmem_unlock_mapping(); and rename | ||
26 | check_move_unevictable_page() to check_move_unevictable_pages(), looping | ||
27 | down an array of pages, oftentimes under the same lock. | ||
28 | |||
29 | Leave out the "rotate unevictable list" block: that's a leftover from | ||
30 | when this was used for /proc/sys/vm/scan_unevictable_pages, whose flawed | ||
31 | handling involved looking at pages at tail of LRU. | ||
32 | |||
33 | Was there significance to the sequence first ClearPageUnevictable, then | ||
34 | test page_evictable, then SetPageUnevictable here? I think not, we're | ||
35 | under LRU lock, and have no barriers between those. | ||
36 | |||
37 | Signed-off-by: Hugh Dickins <hughd@google.com> | ||
38 | Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | ||
39 | Cc: Minchan Kim <minchan.kim@gmail.com> | ||
40 | Cc: Rik van Riel <riel@redhat.com> | ||
41 | Cc: Shaohua Li <shaohua.li@intel.com> | ||
42 | Cc: Eric Dumazet <eric.dumazet@gmail.com> | ||
43 | Cc: Johannes Weiner <hannes@cmpxchg.org> | ||
44 | Cc: Michel Lespinasse <walken@google.com> | ||
45 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
46 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
47 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
48 | --- | ||
49 | include/linux/shmem_fs.h | 1 + | ||
50 | include/linux/swap.h | 2 +- | ||
51 | ipc/shm.c | 2 +- | ||
52 | mm/shmem.c | 46 +++++++++++++++-- | ||
53 | mm/vmscan.c | 122 ++++++++++++++-------------------------------- | ||
54 | 5 files changed, 81 insertions(+), 92 deletions(-) | ||
55 | |||
56 | diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h | ||
57 | index 9291ac3..6f10c9c 100644 | ||
58 | --- a/include/linux/shmem_fs.h | ||
59 | +++ b/include/linux/shmem_fs.h | ||
60 | @@ -48,6 +48,7 @@ extern struct file *shmem_file_setup(const char *name, | ||
61 | loff_t size, unsigned long flags); | ||
62 | extern int shmem_zero_setup(struct vm_area_struct *); | ||
63 | extern int shmem_lock(struct file *file, int lock, struct user_struct *user); | ||
64 | +extern void shmem_unlock_mapping(struct address_space *mapping); | ||
65 | extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, | ||
66 | pgoff_t index, gfp_t gfp_mask); | ||
67 | extern void shmem_truncate_range(struct inode *inode, loff_t start, loff_t end); | ||
68 | diff --git a/include/linux/swap.h b/include/linux/swap.h | ||
69 | index 1e22e12..67b3fa3 100644 | ||
70 | --- a/include/linux/swap.h | ||
71 | +++ b/include/linux/swap.h | ||
72 | @@ -272,7 +272,7 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | ||
73 | #endif | ||
74 | |||
75 | extern int page_evictable(struct page *page, struct vm_area_struct *vma); | ||
76 | -extern void scan_mapping_unevictable_pages(struct address_space *); | ||
77 | +extern void check_move_unevictable_pages(struct page **, int nr_pages); | ||
78 | |||
79 | extern unsigned long scan_unevictable_pages; | ||
80 | extern int scan_unevictable_handler(struct ctl_table *, int, | ||
81 | diff --git a/ipc/shm.c b/ipc/shm.c | ||
82 | index 854ab58..b76be5b 100644 | ||
83 | --- a/ipc/shm.c | ||
84 | +++ b/ipc/shm.c | ||
85 | @@ -916,7 +916,7 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) | ||
86 | shp->mlock_user = NULL; | ||
87 | get_file(shm_file); | ||
88 | shm_unlock(shp); | ||
89 | - scan_mapping_unevictable_pages(shm_file->f_mapping); | ||
90 | + shmem_unlock_mapping(shm_file->f_mapping); | ||
91 | fput(shm_file); | ||
92 | goto out; | ||
93 | } | ||
94 | diff --git a/mm/shmem.c b/mm/shmem.c | ||
95 | index cc6d40b2..6c253f7 100644 | ||
96 | --- a/mm/shmem.c | ||
97 | +++ b/mm/shmem.c | ||
98 | @@ -379,7 +379,7 @@ static int shmem_free_swap(struct address_space *mapping, | ||
99 | /* | ||
100 | * Pagevec may contain swap entries, so shuffle up pages before releasing. | ||
101 | */ | ||
102 | -static void shmem_pagevec_release(struct pagevec *pvec) | ||
103 | +static void shmem_deswap_pagevec(struct pagevec *pvec) | ||
104 | { | ||
105 | int i, j; | ||
106 | |||
107 | @@ -389,7 +389,36 @@ static void shmem_pagevec_release(struct pagevec *pvec) | ||
108 | pvec->pages[j++] = page; | ||
109 | } | ||
110 | pvec->nr = j; | ||
111 | - pagevec_release(pvec); | ||
112 | +} | ||
113 | + | ||
114 | +/* | ||
115 | + * SysV IPC SHM_UNLOCK restore Unevictable pages to their evictable lists. | ||
116 | + */ | ||
117 | +void shmem_unlock_mapping(struct address_space *mapping) | ||
118 | +{ | ||
119 | + struct pagevec pvec; | ||
120 | + pgoff_t indices[PAGEVEC_SIZE]; | ||
121 | + pgoff_t index = 0; | ||
122 | + | ||
123 | + pagevec_init(&pvec, 0); | ||
124 | + /* | ||
125 | + * Minor point, but we might as well stop if someone else SHM_LOCKs it. | ||
126 | + */ | ||
127 | + while (!mapping_unevictable(mapping)) { | ||
128 | + /* | ||
129 | + * Avoid pagevec_lookup(): find_get_pages() returns 0 as if it | ||
130 | + * has finished, if it hits a row of PAGEVEC_SIZE swap entries. | ||
131 | + */ | ||
132 | + pvec.nr = shmem_find_get_pages_and_swap(mapping, index, | ||
133 | + PAGEVEC_SIZE, pvec.pages, indices); | ||
134 | + if (!pvec.nr) | ||
135 | + break; | ||
136 | + index = indices[pvec.nr - 1] + 1; | ||
137 | + shmem_deswap_pagevec(&pvec); | ||
138 | + check_move_unevictable_pages(pvec.pages, pvec.nr); | ||
139 | + pagevec_release(&pvec); | ||
140 | + cond_resched(); | ||
141 | + } | ||
142 | } | ||
143 | |||
144 | /* | ||
145 | @@ -440,7 +469,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend) | ||
146 | } | ||
147 | unlock_page(page); | ||
148 | } | ||
149 | - shmem_pagevec_release(&pvec); | ||
150 | + shmem_deswap_pagevec(&pvec); | ||
151 | + pagevec_release(&pvec); | ||
152 | mem_cgroup_uncharge_end(); | ||
153 | cond_resched(); | ||
154 | index++; | ||
155 | @@ -470,7 +500,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend) | ||
156 | continue; | ||
157 | } | ||
158 | if (index == start && indices[0] > end) { | ||
159 | - shmem_pagevec_release(&pvec); | ||
160 | + shmem_deswap_pagevec(&pvec); | ||
161 | + pagevec_release(&pvec); | ||
162 | break; | ||
163 | } | ||
164 | mem_cgroup_uncharge_start(); | ||
165 | @@ -494,7 +525,8 @@ void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend) | ||
166 | } | ||
167 | unlock_page(page); | ||
168 | } | ||
169 | - shmem_pagevec_release(&pvec); | ||
170 | + shmem_deswap_pagevec(&pvec); | ||
171 | + pagevec_release(&pvec); | ||
172 | mem_cgroup_uncharge_end(); | ||
173 | index++; | ||
174 | } | ||
175 | @@ -2439,6 +2471,10 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user) | ||
176 | return 0; | ||
177 | } | ||
178 | |||
179 | +void shmem_unlock_mapping(struct address_space *mapping) | ||
180 | +{ | ||
181 | +} | ||
182 | + | ||
183 | void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend) | ||
184 | { | ||
185 | truncate_inode_pages_range(inode->i_mapping, lstart, lend); | ||
186 | diff --git a/mm/vmscan.c b/mm/vmscan.c | ||
187 | index 824676a..cb33d9c 100644 | ||
188 | --- a/mm/vmscan.c | ||
189 | +++ b/mm/vmscan.c | ||
190 | @@ -636,7 +636,7 @@ redo: | ||
191 | * When racing with an mlock or AS_UNEVICTABLE clearing | ||
192 | * (page is unlocked) make sure that if the other thread | ||
193 | * does not observe our setting of PG_lru and fails | ||
194 | - * isolation/check_move_unevictable_page, | ||
195 | + * isolation/check_move_unevictable_pages, | ||
196 | * we see PG_mlocked/AS_UNEVICTABLE cleared below and move | ||
197 | * the page back to the evictable list. | ||
198 | * | ||
199 | @@ -3355,104 +3355,56 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) | ||
200 | |||
201 | #ifdef CONFIG_SHMEM | ||
202 | /** | ||
203 | - * check_move_unevictable_page - check page for evictability and move to appropriate zone lru list | ||
204 | - * @page: page to check evictability and move to appropriate lru list | ||
205 | - * @zone: zone page is in | ||
206 | + * check_move_unevictable_pages - check pages for evictability and move to appropriate zone lru list | ||
207 | + * @pages: array of pages to check | ||
208 | + * @nr_pages: number of pages to check | ||
209 | * | ||
210 | - * Checks a page for evictability and moves the page to the appropriate | ||
211 | - * zone lru list. | ||
212 | - * | ||
213 | - * Restrictions: zone->lru_lock must be held, page must be on LRU and must | ||
214 | - * have PageUnevictable set. | ||
215 | + * Checks pages for evictability and moves them to the appropriate lru list. | ||
216 | * | ||
217 | * This function is only used for SysV IPC SHM_UNLOCK. | ||
218 | */ | ||
219 | -static void check_move_unevictable_page(struct page *page, struct zone *zone) | ||
220 | +void check_move_unevictable_pages(struct page **pages, int nr_pages) | ||
221 | { | ||
222 | - VM_BUG_ON(PageActive(page)); | ||
223 | + struct zone *zone = NULL; | ||
224 | + int pgscanned = 0; | ||
225 | + int pgrescued = 0; | ||
226 | + int i; | ||
227 | |||
228 | -retry: | ||
229 | - ClearPageUnevictable(page); | ||
230 | - if (page_evictable(page, NULL)) { | ||
231 | - enum lru_list l = page_lru_base_type(page); | ||
232 | + for (i = 0; i < nr_pages; i++) { | ||
233 | + struct page *page = pages[i]; | ||
234 | + struct zone *pagezone; | ||
235 | |||
236 | - __dec_zone_state(zone, NR_UNEVICTABLE); | ||
237 | - list_move(&page->lru, &zone->lru[l].list); | ||
238 | - mem_cgroup_move_lists(page, LRU_UNEVICTABLE, l); | ||
239 | - __inc_zone_state(zone, NR_INACTIVE_ANON + l); | ||
240 | - __count_vm_event(UNEVICTABLE_PGRESCUED); | ||
241 | - } else { | ||
242 | - /* | ||
243 | - * rotate unevictable list | ||
244 | - */ | ||
245 | - SetPageUnevictable(page); | ||
246 | - list_move(&page->lru, &zone->lru[LRU_UNEVICTABLE].list); | ||
247 | - mem_cgroup_rotate_lru_list(page, LRU_UNEVICTABLE); | ||
248 | - if (page_evictable(page, NULL)) | ||
249 | - goto retry; | ||
250 | - } | ||
251 | -} | ||
252 | - | ||
253 | -/** | ||
254 | - * scan_mapping_unevictable_pages - scan an address space for evictable pages | ||
255 | - * @mapping: struct address_space to scan for evictable pages | ||
256 | - * | ||
257 | - * Scan all pages in mapping. Check unevictable pages for | ||
258 | - * evictability and move them to the appropriate zone lru list. | ||
259 | - * | ||
260 | - * This function is only used for SysV IPC SHM_UNLOCK. | ||
261 | - */ | ||
262 | -void scan_mapping_unevictable_pages(struct address_space *mapping) | ||
263 | -{ | ||
264 | - pgoff_t next = 0; | ||
265 | - pgoff_t end = (i_size_read(mapping->host) + PAGE_CACHE_SIZE - 1) >> | ||
266 | - PAGE_CACHE_SHIFT; | ||
267 | - struct zone *zone; | ||
268 | - struct pagevec pvec; | ||
269 | + pgscanned++; | ||
270 | + pagezone = page_zone(page); | ||
271 | + if (pagezone != zone) { | ||
272 | + if (zone) | ||
273 | + spin_unlock_irq(&zone->lru_lock); | ||
274 | + zone = pagezone; | ||
275 | + spin_lock_irq(&zone->lru_lock); | ||
276 | + } | ||
277 | |||
278 | - if (mapping->nrpages == 0) | ||
279 | - return; | ||
280 | + if (!PageLRU(page) || !PageUnevictable(page)) | ||
281 | + continue; | ||
282 | |||
283 | - pagevec_init(&pvec, 0); | ||
284 | - while (next < end && | ||
285 | - pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { | ||
286 | - int i; | ||
287 | - int pg_scanned = 0; | ||
288 | - | ||
289 | - zone = NULL; | ||
290 | - | ||
291 | - for (i = 0; i < pagevec_count(&pvec); i++) { | ||
292 | - struct page *page = pvec.pages[i]; | ||
293 | - pgoff_t page_index = page->index; | ||
294 | - struct zone *pagezone = page_zone(page); | ||
295 | - | ||
296 | - pg_scanned++; | ||
297 | - if (page_index > next) | ||
298 | - next = page_index; | ||
299 | - next++; | ||
300 | - | ||
301 | - if (pagezone != zone) { | ||
302 | - if (zone) | ||
303 | - spin_unlock_irq(&zone->lru_lock); | ||
304 | - zone = pagezone; | ||
305 | - spin_lock_irq(&zone->lru_lock); | ||
306 | - } | ||
307 | + if (page_evictable(page, NULL)) { | ||
308 | + enum lru_list lru = page_lru_base_type(page); | ||
309 | |||
310 | - if (PageLRU(page) && PageUnevictable(page)) | ||
311 | - check_move_unevictable_page(page, zone); | ||
312 | + VM_BUG_ON(PageActive(page)); | ||
313 | + ClearPageUnevictable(page); | ||
314 | + __dec_zone_state(zone, NR_UNEVICTABLE); | ||
315 | + list_move(&page->lru, &zone->lru[lru].list); | ||
316 | + mem_cgroup_move_lists(page, LRU_UNEVICTABLE, lru); | ||
317 | + __inc_zone_state(zone, NR_INACTIVE_ANON + lru); | ||
318 | + pgrescued++; | ||
319 | } | ||
320 | - if (zone) | ||
321 | - spin_unlock_irq(&zone->lru_lock); | ||
322 | - pagevec_release(&pvec); | ||
323 | + } | ||
324 | |||
325 | - count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned); | ||
326 | - cond_resched(); | ||
327 | + if (zone) { | ||
328 | + __count_vm_events(UNEVICTABLE_PGRESCUED, pgrescued); | ||
329 | + __count_vm_events(UNEVICTABLE_PGSCANNED, pgscanned); | ||
330 | + spin_unlock_irq(&zone->lru_lock); | ||
331 | } | ||
332 | } | ||
333 | -#else | ||
334 | -void scan_mapping_unevictable_pages(struct address_space *mapping) | ||
335 | -{ | ||
336 | -} | ||
337 | #endif /* CONFIG_SHMEM */ | ||
338 | |||
339 | static void warn_scan_unevictable_pages(void) | ||
340 | -- | ||
341 | 1.7.9.5 | ||
342 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-Linux-3.2.2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-Linux-3.2.2.patch deleted file mode 100644 index 191a68f4..00000000 --- a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0129-Linux-3.2.2.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | From 9c4bad0da47e7a8597bf0135088e482b1a970ba7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Greg Kroah-Hartman <gregkh@suse.de> | ||
3 | Date: Wed, 25 Jan 2012 16:39:32 -0800 | ||
4 | Subject: [PATCH 129/129] Linux 3.2.2 | ||
5 | |||
6 | --- | ||
7 | Makefile | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/Makefile b/Makefile | ||
11 | index c5edffa..2f684da 100644 | ||
12 | --- a/Makefile | ||
13 | +++ b/Makefile | ||
14 | @@ -1,6 +1,6 @@ | ||
15 | VERSION = 3 | ||
16 | PATCHLEVEL = 2 | ||
17 | -SUBLEVEL = 1 | ||
18 | +SUBLEVEL = 2 | ||
19 | EXTRAVERSION = | ||
20 | NAME = Saber-toothed Squirrel | ||
21 | |||
22 | -- | ||
23 | 1.7.9.5 | ||
24 | |||