diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18')
56 files changed, 3516 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch new file mode 100644 index 00000000..444cb567 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0001-regulator-Fix-the-logic-to-ensure-new-voltage-settin.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 94383ff64ebeaa09055462cb48260eb2831235ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Axel Lin <axel.lin@gmail.com> | ||
3 | Date: Wed, 11 Apr 2012 20:53:58 +0800 | ||
4 | Subject: [PATCH 01/56] regulator: Fix the logic to ensure new voltage setting | ||
5 | in valid range | ||
6 | |||
7 | commit f55205f4d4a8823a11bb8b37ef2ecbd78fb09463 upstream. | ||
8 | |||
9 | I think this is a typo. | ||
10 | To ensure new voltage setting won't greater than desc->max, | ||
11 | the equation should be desc->min + desc->step * new_val <= desc->max. | ||
12 | |||
13 | Signed-off-by: Axel Lin <axel.lin@gmail.com> | ||
14 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/regulator/max8997.c | 2 +- | ||
18 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c | ||
21 | index 6176129..8cba82d 100644 | ||
22 | --- a/drivers/regulator/max8997.c | ||
23 | +++ b/drivers/regulator/max8997.c | ||
24 | @@ -689,7 +689,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, | ||
25 | } | ||
26 | |||
27 | new_val++; | ||
28 | - } while (desc->min + desc->step + new_val <= desc->max); | ||
29 | + } while (desc->min + desc->step * new_val <= desc->max); | ||
30 | |||
31 | new_idx = tmp_idx; | ||
32 | new_val = tmp_val; | ||
33 | -- | ||
34 | 1.7.7.6 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch new file mode 100644 index 00000000..eb9eb3c7 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0002-ARM-OMAP-Revert-ARM-OMAP-ctrl-Fix-CONTROL_DSIPHY-reg.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From c0d0663f26ba8ed987704a454a360b1a5997e1d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Archit Taneja <archit@ti.com> | ||
3 | Date: Thu, 19 Apr 2012 17:39:16 +0530 | ||
4 | Subject: [PATCH 02/56] ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY | ||
5 | register fields" | ||
6 | |||
7 | commit 08ca7444f589bedf9ad5d82883e5d0754852d73b upstream. | ||
8 | |||
9 | This reverts commit 46f8c3c7e95c0d30d95911e7975ddc4f93b3e237. | ||
10 | |||
11 | The commit above swapped the DSI1_PPID and DSI2_PPID register fields in | ||
12 | CONTROL_DSIPHY to be in sync with the newer public OMAP TRMs(after version V). | ||
13 | |||
14 | With this commit, contention errors were reported on DSI lanes some OMAP4 SDPs. | ||
15 | After probing the DSI lanes on OMAP4 SDP, it was seen that setting bits in the | ||
16 | DSI2_PPID field was pulling up voltage on DSI1 lanes, and DSI1_PPID field was | ||
17 | pulling up voltage on DSI2 lanes. | ||
18 | |||
19 | This proves that the current version of OMAP4 TRM is incorrect, swap the | ||
20 | position of register fields according to the older TRM versions as they were | ||
21 | correct. | ||
22 | |||
23 | Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> | ||
24 | Signed-off-by: Archit Taneja <archit@ti.com> | ||
25 | Signed-off-by: Tony Lindgren <tony@atomide.com> | ||
26 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
27 | --- | ||
28 | .../include/mach/ctrl_module_pad_core_44xx.h | 8 ++++---- | ||
29 | 1 files changed, 4 insertions(+), 4 deletions(-) | ||
30 | |||
31 | diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | ||
32 | index 1e2d332..c88420d 100644 | ||
33 | --- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | ||
34 | +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | ||
35 | @@ -941,10 +941,10 @@ | ||
36 | #define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) | ||
37 | #define OMAP4_DSI1_LANEENABLE_SHIFT 24 | ||
38 | #define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) | ||
39 | -#define OMAP4_DSI2_PIPD_SHIFT 19 | ||
40 | -#define OMAP4_DSI2_PIPD_MASK (0x1f << 19) | ||
41 | -#define OMAP4_DSI1_PIPD_SHIFT 14 | ||
42 | -#define OMAP4_DSI1_PIPD_MASK (0x1f << 14) | ||
43 | +#define OMAP4_DSI1_PIPD_SHIFT 19 | ||
44 | +#define OMAP4_DSI1_PIPD_MASK (0x1f << 19) | ||
45 | +#define OMAP4_DSI2_PIPD_SHIFT 14 | ||
46 | +#define OMAP4_DSI2_PIPD_MASK (0x1f << 14) | ||
47 | |||
48 | /* CONTROL_MCBSPLP */ | ||
49 | #define OMAP4_ALBCTRLRX_FSX_SHIFT 31 | ||
50 | -- | ||
51 | 1.7.7.6 | ||
52 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch new file mode 100644 index 00000000..3e8bed3a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0003-ALSA-echoaudio-Remove-incorrect-part-of-assertion.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From d88c1668a535d2abb3d201b8a521e46eff3f5e0e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hills <mark@pogo.org.uk> | ||
3 | Date: Mon, 30 Apr 2012 19:39:22 +0100 | ||
4 | Subject: [PATCH 03/56] ALSA: echoaudio: Remove incorrect part of assertion | ||
5 | |||
6 | commit c914f55f7cdfafe9d7d5b248751902c7ab57691e upstream. | ||
7 | |||
8 | This assertion seems to imply that chip->dsp_code_to_load is a pointer. | ||
9 | It's actually an integer handle on the actual firmware, and 0 has no | ||
10 | special meaning. | ||
11 | |||
12 | The assertion prevents initialisation of a Darla20 card, but would also | ||
13 | affect other models. It seems it was introduced in commit dd7b254d. | ||
14 | |||
15 | ALSA sound/pci/echoaudio/echoaudio.c:2061 Echoaudio driver starting... | ||
16 | ALSA sound/pci/echoaudio/echoaudio.c:1969 chip=ebe4e000 | ||
17 | ALSA sound/pci/echoaudio/echoaudio.c:2007 pci=ed568000 irq=19 subdev=0010 Init hardware... | ||
18 | ALSA sound/pci/echoaudio/darla20_dsp.c:36 init_hw() - Darla20 | ||
19 | ------------[ cut here ]------------ | ||
20 | WARNING: at sound/pci/echoaudio/echoaudio_dsp.c:478 init_hw+0x1d1/0x86c [snd_darla20]() | ||
21 | Hardware name: Dell DM051 | ||
22 | BUG? (!chip->dsp_code_to_load || !chip->comm_page) | ||
23 | |||
24 | Signed-off-by: Mark Hills <mark@pogo.org.uk> | ||
25 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
26 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
27 | --- | ||
28 | sound/pci/echoaudio/echoaudio_dsp.c | 2 +- | ||
29 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
30 | |||
31 | diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c | ||
32 | index 64417a7..d8c670c 100644 | ||
33 | --- a/sound/pci/echoaudio/echoaudio_dsp.c | ||
34 | +++ b/sound/pci/echoaudio/echoaudio_dsp.c | ||
35 | @@ -475,7 +475,7 @@ static int load_firmware(struct echoaudio *chip) | ||
36 | const struct firmware *fw; | ||
37 | int box_type, err; | ||
38 | |||
39 | - if (snd_BUG_ON(!chip->dsp_code_to_load || !chip->comm_page)) | ||
40 | + if (snd_BUG_ON(!chip->comm_page)) | ||
41 | return -EPERM; | ||
42 | |||
43 | /* See if the ASIC is present and working - only if the DSP is already loaded */ | ||
44 | -- | ||
45 | 1.7.7.6 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch new file mode 100644 index 00000000..da89cfa8 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0004-ARM-orion5x-Fix-GPIO-enable-bits-for-MPP9.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 900f27b9d47023edb709aad271b5d7516bb7c990 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Sun, 8 Apr 2012 05:18:53 +0100 | ||
4 | Subject: [PATCH 04/56] ARM: orion5x: Fix GPIO enable bits for MPP9 | ||
5 | |||
6 | commit 48d99f47a81a66bdd61a348c7fe8df5a7afdf5f3 upstream. | ||
7 | |||
8 | Commit 554cdaefd1cf7bb54b209c4e68c7cec87ce442a9 ('ARM: orion5x: Refactor | ||
9 | mpp code to use common orion platform mpp.') seems to have accidentally | ||
10 | inverted the GPIO valid bits for MPP9 (only). For the mv2120 platform | ||
11 | which uses MPP9 as a GPIO LED device, this results in the error: | ||
12 | |||
13 | [ 12.711476] leds-gpio: probe of leds-gpio failed with error -22 | ||
14 | |||
15 | Reported-by: Henry von Tresckow <hvontres@gmail.com> | ||
16 | References: http://bugs.debian.org/667446 | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | Tested-by: Hans Henry von Tresckow <hvontres@gmail.com> | ||
19 | Signed-off-by: Jason Cooper <jason@lakedaemon.net> | ||
20 | --- | ||
21 | arch/arm/mach-orion5x/mpp.h | 4 ++-- | ||
22 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/arch/arm/mach-orion5x/mpp.h b/arch/arm/mach-orion5x/mpp.h | ||
25 | index eac6897..db70e79 100644 | ||
26 | --- a/arch/arm/mach-orion5x/mpp.h | ||
27 | +++ b/arch/arm/mach-orion5x/mpp.h | ||
28 | @@ -65,8 +65,8 @@ | ||
29 | #define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1) | ||
30 | |||
31 | #define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) | ||
32 | -#define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) | ||
33 | -#define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) | ||
34 | +#define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) | ||
35 | +#define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1) | ||
36 | |||
37 | #define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1) | ||
38 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1) | ||
39 | -- | ||
40 | 1.7.7.6 | ||
41 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch new file mode 100644 index 00000000..9cdf2a77 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0005-ALSA-HDA-Lessen-CPU-usage-when-waiting-for-chip-to-r.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 3c3471703a78272a055d786ba1474384494bb7fc Mon Sep 17 00:00:00 2001 | ||
2 | From: David Henningsson <david.henningsson@canonical.com> | ||
3 | Date: Fri, 4 May 2012 11:05:55 +0200 | ||
4 | Subject: [PATCH 05/56] ALSA: HDA: Lessen CPU usage when waiting for chip to | ||
5 | respond | ||
6 | |||
7 | commit 32cf4023e689ad5b3a81a749d8cc99d7f184cb99 upstream. | ||
8 | |||
9 | When an IRQ for some reason gets lost, we wait up to a second using | ||
10 | udelay, which is CPU intensive. This patch improves the situation by | ||
11 | waiting about 30 ms in the CPU intensive mode, then stepping down to | ||
12 | using msleep(2) instead. In essence, we trade some granularity in | ||
13 | exchange for less CPU consumption when the waiting time is a bit longer. | ||
14 | |||
15 | As a result, PulseAudio should no longer be killed by the kernel | ||
16 | for taking up to much RT-prio CPU time. At least not for *this* reason. | ||
17 | |||
18 | Signed-off-by: David Henningsson <david.henningsson@canonical.com> | ||
19 | Tested-by: Arun Raghavan <arun.raghavan@collabora.co.uk> | ||
20 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
21 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | --- | ||
23 | sound/pci/hda/hda_intel.c | 6 ++++-- | ||
24 | 1 files changed, 4 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c | ||
27 | index 192e6c0..53345bc 100644 | ||
28 | --- a/sound/pci/hda/hda_intel.c | ||
29 | +++ b/sound/pci/hda/hda_intel.c | ||
30 | @@ -769,11 +769,13 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | ||
31 | { | ||
32 | struct azx *chip = bus->private_data; | ||
33 | unsigned long timeout; | ||
34 | + unsigned long loopcounter; | ||
35 | int do_poll = 0; | ||
36 | |||
37 | again: | ||
38 | timeout = jiffies + msecs_to_jiffies(1000); | ||
39 | - for (;;) { | ||
40 | + | ||
41 | + for (loopcounter = 0;; loopcounter++) { | ||
42 | if (chip->polling_mode || do_poll) { | ||
43 | spin_lock_irq(&chip->reg_lock); | ||
44 | azx_update_rirb(chip); | ||
45 | @@ -789,7 +791,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | ||
46 | } | ||
47 | if (time_after(jiffies, timeout)) | ||
48 | break; | ||
49 | - if (bus->needs_damn_long_delay) | ||
50 | + if (bus->needs_damn_long_delay || loopcounter > 3000) | ||
51 | msleep(2); /* temporary workaround */ | ||
52 | else { | ||
53 | udelay(10); | ||
54 | -- | ||
55 | 1.7.7.6 | ||
56 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch new file mode 100644 index 00000000..26c5bd45 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0006-percpu-pcpu_embed_first_chunk-should-free-unused-par.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From c49984f9b2cba3ae4eb6ac7056e45cde17629a20 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tejun Heo <tj@kernel.org> | ||
3 | Date: Fri, 27 Apr 2012 08:42:53 -0700 | ||
4 | Subject: [PATCH 06/56] percpu: pcpu_embed_first_chunk() should free unused | ||
5 | parts after all allocs are complete | ||
6 | |||
7 | commit 42b64281453249dac52861f9b97d18552a7ec62b upstream. | ||
8 | |||
9 | pcpu_embed_first_chunk() allocates memory for each node, copies percpu | ||
10 | data and frees unused portions of it before proceeding to the next | ||
11 | group. This assumes that allocations for different nodes doesn't | ||
12 | overlap; however, depending on memory topology, the bootmem allocator | ||
13 | may end up allocating memory from a different node than the requested | ||
14 | one which may overlap with the portion freed from one of the previous | ||
15 | percpu areas. This leads to percpu groups for different nodes | ||
16 | overlapping which is a serious bug. | ||
17 | |||
18 | This patch separates out copy & partial free from the allocation loop | ||
19 | such that all allocations are complete before partial frees happen. | ||
20 | |||
21 | This also fixes overlapping frees which could happen on allocation | ||
22 | failure path - out_free_areas path frees whole groups but the groups | ||
23 | could have portions freed at that point. | ||
24 | |||
25 | Signed-off-by: Tejun Heo <tj@kernel.org> | ||
26 | Reported-by: "Pavel V. Panteleev" <pp_84@mail.ru> | ||
27 | Tested-by: "Pavel V. Panteleev" <pp_84@mail.ru> | ||
28 | LKML-Reference: <E1SNhwY-0007ui-V7.pp_84-mail-ru@f220.mail.ru> | ||
29 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
30 | --- | ||
31 | mm/percpu.c | 10 ++++++++++ | ||
32 | 1 files changed, 10 insertions(+), 0 deletions(-) | ||
33 | |||
34 | diff --git a/mm/percpu.c b/mm/percpu.c | ||
35 | index 716eb4a..5c29750 100644 | ||
36 | --- a/mm/percpu.c | ||
37 | +++ b/mm/percpu.c | ||
38 | @@ -1642,6 +1642,16 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, | ||
39 | areas[group] = ptr; | ||
40 | |||
41 | base = min(ptr, base); | ||
42 | + } | ||
43 | + | ||
44 | + /* | ||
45 | + * Copy data and free unused parts. This should happen after all | ||
46 | + * allocations are complete; otherwise, we may end up with | ||
47 | + * overlapping groups. | ||
48 | + */ | ||
49 | + for (group = 0; group < ai->nr_groups; group++) { | ||
50 | + struct pcpu_group_info *gi = &ai->groups[group]; | ||
51 | + void *ptr = areas[group]; | ||
52 | |||
53 | for (i = 0; i < gi->nr_units; i++, ptr += ai->unit_size) { | ||
54 | if (gi->cpu_map[i] == NR_CPUS) { | ||
55 | -- | ||
56 | 1.7.7.6 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch new file mode 100644 index 00000000..c7f28af9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0007-hugetlb-prevent-BUG_ON-in-hugetlb_fault-hugetlb_cow.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 264ef98284920c3c4b7139ce642f41f9b253bc24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Metcalf <cmetcalf@tilera.com> | ||
3 | Date: Thu, 10 May 2012 13:01:44 -0700 | ||
4 | Subject: [PATCH 07/56] hugetlb: prevent BUG_ON in hugetlb_fault() -> | ||
5 | hugetlb_cow() | ||
6 | |||
7 | commit 4998a6c0edce7fae9c0a5463f6ec3fa585258ee7 upstream. | ||
8 | |||
9 | Commit 66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()") | ||
10 | added code to avoid a race condition by elevating the page refcount in | ||
11 | hugetlb_fault() while calling hugetlb_cow(). | ||
12 | |||
13 | However, one code path in hugetlb_cow() includes an assertion that the | ||
14 | page count is 1, whereas it may now also have the value 2 in this path. | ||
15 | |||
16 | The consensus is that this BUG_ON has served its purpose, so rather than | ||
17 | extending it to cover both cases, we just remove it. | ||
18 | |||
19 | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> | ||
20 | Acked-by: Mel Gorman <mel@csn.ul.ie> | ||
21 | Acked-by: Hillf Danton <dhillf@gmail.com> | ||
22 | Acked-by: Hugh Dickins <hughd@google.com> | ||
23 | Cc: Michal Hocko <mhocko@suse.cz> | ||
24 | Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | ||
25 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
26 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
27 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
28 | --- | ||
29 | mm/hugetlb.c | 1 - | ||
30 | 1 files changed, 0 insertions(+), 1 deletions(-) | ||
31 | |||
32 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c | ||
33 | index bd936ed..7120c2e 100644 | ||
34 | --- a/mm/hugetlb.c | ||
35 | +++ b/mm/hugetlb.c | ||
36 | @@ -2405,7 +2405,6 @@ retry_avoidcopy: | ||
37 | if (outside_reserve) { | ||
38 | BUG_ON(huge_pte_none(pte)); | ||
39 | if (unmap_ref_private(mm, vma, old_page, address)) { | ||
40 | - BUG_ON(page_count(old_page) != 1); | ||
41 | BUG_ON(huge_pte_none(pte)); | ||
42 | spin_lock(&mm->page_table_lock); | ||
43 | goto retry_avoidcopy; | ||
44 | -- | ||
45 | 1.7.7.6 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch new file mode 100644 index 00000000..6810b965 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0008-namespaces-pid_ns-fix-leakage-on-fork-failure.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 524ae74866597ebc0894b12ce456d8a53f80f533 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Galbraith <efault@gmx.de> | ||
3 | Date: Thu, 10 May 2012 13:01:45 -0700 | ||
4 | Subject: [PATCH 08/56] namespaces, pid_ns: fix leakage on fork() failure | ||
5 | |||
6 | commit 5e2bf0142231194d36fdc9596b36a261ed2b9fe7 upstream. | ||
7 | |||
8 | Fork() failure post namespace creation for a child cloned with | ||
9 | CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted | ||
10 | during creation, but not unmounted during cleanup. Call | ||
11 | pid_ns_release_proc() during cleanup. | ||
12 | |||
13 | Signed-off-by: Mike Galbraith <efault@gmx.de> | ||
14 | Acked-by: Oleg Nesterov <oleg@redhat.com> | ||
15 | Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com> | ||
16 | Cc: Pavel Emelyanov <xemul@parallels.com> | ||
17 | Cc: Cyrill Gorcunov <gorcunov@openvz.org> | ||
18 | Cc: Louis Rilling <louis.rilling@kerlabs.com> | ||
19 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
20 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
21 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | --- | ||
23 | kernel/fork.c | 3 +++ | ||
24 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
25 | |||
26 | diff --git a/kernel/fork.c b/kernel/fork.c | ||
27 | index 0acf42c0..26f1ab0 100644 | ||
28 | --- a/kernel/fork.c | ||
29 | +++ b/kernel/fork.c | ||
30 | @@ -47,6 +47,7 @@ | ||
31 | #include <linux/audit.h> | ||
32 | #include <linux/memcontrol.h> | ||
33 | #include <linux/ftrace.h> | ||
34 | +#include <linux/proc_fs.h> | ||
35 | #include <linux/profile.h> | ||
36 | #include <linux/rmap.h> | ||
37 | #include <linux/ksm.h> | ||
38 | @@ -1387,6 +1388,8 @@ bad_fork_cleanup_io: | ||
39 | if (p->io_context) | ||
40 | exit_io_context(p); | ||
41 | bad_fork_cleanup_namespaces: | ||
42 | + if (unlikely(clone_flags & CLONE_NEWPID)) | ||
43 | + pid_ns_release_proc(p->nsproxy->pid_ns); | ||
44 | exit_task_namespaces(p); | ||
45 | bad_fork_cleanup_mm: | ||
46 | if (p->mm) | ||
47 | -- | ||
48 | 1.7.7.6 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch new file mode 100644 index 00000000..c6208ebc --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0009-mm-nobootmem-fix-sign-extend-problem-in-__free_pages.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 06ae235e974156cc9304c169f89bba4d6ea4f6e4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Russ Anderson <rja@sgi.com> | ||
3 | Date: Thu, 10 May 2012 13:01:46 -0700 | ||
4 | Subject: [PATCH 09/56] mm: nobootmem: fix sign extend problem in | ||
5 | __free_pages_memory() | ||
6 | |||
7 | commit 6bc2e853c6b46a6041980d58200ad9b0a73a60ff upstream. | ||
8 | |||
9 | Systems with 8 TBytes of memory or greater can hit a problem where only | ||
10 | the the first 8 TB of memory shows up. This is due to "int i" being | ||
11 | smaller than "unsigned long start_aligned", causing the high bits to be | ||
12 | dropped. | ||
13 | |||
14 | The fix is to change `i' to unsigned long to match start_aligned | ||
15 | and end_aligned. | ||
16 | |||
17 | Thanks to Jack Steiner for assistance tracking this down. | ||
18 | |||
19 | Signed-off-by: Russ Anderson <rja@sgi.com> | ||
20 | Cc: Jack Steiner <steiner@sgi.com> | ||
21 | Cc: Johannes Weiner <hannes@cmpxchg.org> | ||
22 | Cc: Tejun Heo <tj@kernel.org> | ||
23 | Cc: David S. Miller <davem@davemloft.net> | ||
24 | Cc: Yinghai Lu <yinghai@kernel.org> | ||
25 | Cc: Gavin Shan <shangw@linux.vnet.ibm.com> | ||
26 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
29 | --- | ||
30 | mm/nobootmem.c | 3 +-- | ||
31 | 1 files changed, 1 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/mm/nobootmem.c b/mm/nobootmem.c | ||
34 | index 7fa41b4..07c08c4 100644 | ||
35 | --- a/mm/nobootmem.c | ||
36 | +++ b/mm/nobootmem.c | ||
37 | @@ -83,8 +83,7 @@ void __init free_bootmem_late(unsigned long addr, unsigned long size) | ||
38 | |||
39 | static void __init __free_pages_memory(unsigned long start, unsigned long end) | ||
40 | { | ||
41 | - int i; | ||
42 | - unsigned long start_aligned, end_aligned; | ||
43 | + unsigned long i, start_aligned, end_aligned; | ||
44 | int order = ilog2(BITS_PER_LONG); | ||
45 | |||
46 | start_aligned = (start + (BITS_PER_LONG - 1)) & ~(BITS_PER_LONG - 1); | ||
47 | -- | ||
48 | 1.7.7.6 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch new file mode 100644 index 00000000..c08dcb32 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0010-asix-Fix-tx-transfer-padding-for-full-speed-USB.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From ccd532b836540eb1f0e1d9eee4a87b8403d729c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ingo van Lil <inguin@gmx.de> | ||
3 | Date: Mon, 23 Apr 2012 22:05:38 +0000 | ||
4 | Subject: [PATCH 10/56] asix: Fix tx transfer padding for full-speed USB | ||
5 | |||
6 | [ Upstream commit 2a5809499e35b53a6044fd34e72b242688b7a862 ] | ||
7 | |||
8 | The asix.c USB Ethernet driver avoids ending a tx transfer with a zero- | ||
9 | length packet by appending a four-byte padding to transfers whose length | ||
10 | is a multiple of maxpacket. However, the hard-coded 512 byte maxpacket | ||
11 | length is valid for high-speed USB only; full-speed USB uses 64 byte | ||
12 | packets. | ||
13 | |||
14 | Signed-off-by: Ingo van Lil <inguin@gmx.de> | ||
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/net/usb/asix.c | 4 ++-- | ||
19 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c | ||
22 | index fda4be2..a9abee8 100644 | ||
23 | --- a/drivers/net/usb/asix.c | ||
24 | +++ b/drivers/net/usb/asix.c | ||
25 | @@ -403,7 +403,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | ||
26 | u32 packet_len; | ||
27 | u32 padbytes = 0xffff0000; | ||
28 | |||
29 | - padlen = ((skb->len + 4) % 512) ? 0 : 4; | ||
30 | + padlen = ((skb->len + 4) & (dev->maxpacket - 1)) ? 0 : 4; | ||
31 | |||
32 | if ((!skb_cloned(skb)) && | ||
33 | ((headroom + tailroom) >= (4 + padlen))) { | ||
34 | @@ -425,7 +425,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | ||
35 | cpu_to_le32s(&packet_len); | ||
36 | skb_copy_to_linear_data(skb, &packet_len, sizeof(packet_len)); | ||
37 | |||
38 | - if ((skb->len % 512) == 0) { | ||
39 | + if (padlen) { | ||
40 | cpu_to_le32s(&padbytes); | ||
41 | memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes)); | ||
42 | skb_put(skb, sizeof(padbytes)); | ||
43 | -- | ||
44 | 1.7.7.6 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch new file mode 100644 index 00000000..d57c44c9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0011-netem-fix-possible-skb-leak.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From abb480a271308924f4174413f6d6969ecaaba892 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <edumazet@google.com> | ||
3 | Date: Sun, 29 Apr 2012 09:08:22 +0000 | ||
4 | Subject: [PATCH 11/56] netem: fix possible skb leak | ||
5 | |||
6 | [ Upstream commit 116a0fc31c6c9b8fc821be5a96e5bf0b43260131 ] | ||
7 | |||
8 | skb_checksum_help(skb) can return an error, we must free skb in this | ||
9 | case. qdisc_drop(skb, sch) can also be feeded with a NULL skb (if | ||
10 | skb_unshare() failed), so lets use this generic helper. | ||
11 | |||
12 | Signed-off-by: Eric Dumazet <edumazet@google.com> | ||
13 | Cc: Stephen Hemminger <shemminger@osdl.org> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | net/sched/sch_netem.c | 6 ++---- | ||
18 | 1 files changed, 2 insertions(+), 4 deletions(-) | ||
19 | |||
20 | diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c | ||
21 | index 7801b15..a489d8b 100644 | ||
22 | --- a/net/sched/sch_netem.c | ||
23 | +++ b/net/sched/sch_netem.c | ||
24 | @@ -351,10 +351,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | ||
25 | if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { | ||
26 | if (!(skb = skb_unshare(skb, GFP_ATOMIC)) || | ||
27 | (skb->ip_summed == CHECKSUM_PARTIAL && | ||
28 | - skb_checksum_help(skb))) { | ||
29 | - sch->qstats.drops++; | ||
30 | - return NET_XMIT_DROP; | ||
31 | - } | ||
32 | + skb_checksum_help(skb))) | ||
33 | + return qdisc_drop(skb, sch); | ||
34 | |||
35 | skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8); | ||
36 | } | ||
37 | -- | ||
38 | 1.7.7.6 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch new file mode 100644 index 00000000..0c1ea209 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0012-net-In-unregister_netdevice_notifier-unregister-the-.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From d2b1ac073ca1e2caabafe219d0d1f04f4a2d1467 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Eric W. Biederman" <ebiederm@xmission.com> | ||
3 | Date: Fri, 6 Apr 2012 15:33:35 +0000 | ||
4 | Subject: [PATCH 12/56] net: In unregister_netdevice_notifier unregister the | ||
5 | netdevices. | ||
6 | |||
7 | [ Upstream commit 7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f ] | ||
8 | |||
9 | We already synthesize events in register_netdevice_notifier and synthesizing | ||
10 | events in unregister_netdevice_notifier allows to us remove the need for | ||
11 | special case cleanup code. | ||
12 | |||
13 | This change should be safe as it adds no new cases for existing callers | ||
14 | of unregiser_netdevice_notifier to handle. | ||
15 | |||
16 | Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> | ||
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
18 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
19 | --- | ||
20 | net/core/dev.c | 20 ++++++++++++++++++++ | ||
21 | 1 files changed, 20 insertions(+), 0 deletions(-) | ||
22 | |||
23 | diff --git a/net/core/dev.c b/net/core/dev.c | ||
24 | index cd5050e..61a7baa 100644 | ||
25 | --- a/net/core/dev.c | ||
26 | +++ b/net/core/dev.c | ||
27 | @@ -1421,14 +1421,34 @@ EXPORT_SYMBOL(register_netdevice_notifier); | ||
28 | * register_netdevice_notifier(). The notifier is unlinked into the | ||
29 | * kernel structures and may then be reused. A negative errno code | ||
30 | * is returned on a failure. | ||
31 | + * | ||
32 | + * After unregistering unregister and down device events are synthesized | ||
33 | + * for all devices on the device list to the removed notifier to remove | ||
34 | + * the need for special case cleanup code. | ||
35 | */ | ||
36 | |||
37 | int unregister_netdevice_notifier(struct notifier_block *nb) | ||
38 | { | ||
39 | + struct net_device *dev; | ||
40 | + struct net *net; | ||
41 | int err; | ||
42 | |||
43 | rtnl_lock(); | ||
44 | err = raw_notifier_chain_unregister(&netdev_chain, nb); | ||
45 | + if (err) | ||
46 | + goto unlock; | ||
47 | + | ||
48 | + for_each_net(net) { | ||
49 | + for_each_netdev(net, dev) { | ||
50 | + if (dev->flags & IFF_UP) { | ||
51 | + nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); | ||
52 | + nb->notifier_call(nb, NETDEV_DOWN, dev); | ||
53 | + } | ||
54 | + nb->notifier_call(nb, NETDEV_UNREGISTER, dev); | ||
55 | + nb->notifier_call(nb, NETDEV_UNREGISTER_BATCH, dev); | ||
56 | + } | ||
57 | + } | ||
58 | +unlock: | ||
59 | rtnl_unlock(); | ||
60 | return err; | ||
61 | } | ||
62 | -- | ||
63 | 1.7.7.6 | ||
64 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch new file mode 100644 index 00000000..199864f5 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0013-net-l2tp-unlock-socket-lock-before-returning-from-l2.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 1b3ded810906676f03b6eab986308b1cf5e6b135 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sasha Levin <levinsasha928@gmail.com> | ||
3 | Date: Wed, 2 May 2012 03:58:43 +0000 | ||
4 | Subject: [PATCH 13/56] net: l2tp: unlock socket lock before returning from | ||
5 | l2tp_ip_sendmsg | ||
6 | |||
7 | [ Upstream commit 84768edbb2721637620b2d84501bb0d5aed603f1 ] | ||
8 | |||
9 | l2tp_ip_sendmsg could return without releasing socket lock, making it all the | ||
10 | way to userspace, and generating the following warning: | ||
11 | |||
12 | [ 130.891594] ================================================ | ||
13 | [ 130.894569] [ BUG: lock held when returning to user space! ] | ||
14 | [ 130.897257] 3.4.0-rc5-next-20120501-sasha #104 Tainted: G W | ||
15 | [ 130.900336] ------------------------------------------------ | ||
16 | [ 130.902996] trinity/8384 is leaving the kernel with locks still held! | ||
17 | [ 130.906106] 1 lock held by trinity/8384: | ||
18 | [ 130.907924] #0: (sk_lock-AF_INET){+.+.+.}, at: [<ffffffff82b9503f>] l2tp_ip_sendmsg+0x2f/0x550 | ||
19 | |||
20 | Introduced by commit 2f16270 ("l2tp: Fix locking in l2tp_ip.c"). | ||
21 | |||
22 | Signed-off-by: Sasha Levin <levinsasha928@gmail.com> | ||
23 | Acked-by: Eric Dumazet <edumazet@google.com> | ||
24 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
25 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
26 | --- | ||
27 | net/l2tp/l2tp_ip.c | 3 ++- | ||
28 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c | ||
31 | index 55670ec..2a2a3e7 100644 | ||
32 | --- a/net/l2tp/l2tp_ip.c | ||
33 | +++ b/net/l2tp/l2tp_ip.c | ||
34 | @@ -441,8 +441,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m | ||
35 | |||
36 | daddr = lip->l2tp_addr.s_addr; | ||
37 | } else { | ||
38 | + rc = -EDESTADDRREQ; | ||
39 | if (sk->sk_state != TCP_ESTABLISHED) | ||
40 | - return -EDESTADDRREQ; | ||
41 | + goto out; | ||
42 | |||
43 | daddr = inet->inet_daddr; | ||
44 | connected = 1; | ||
45 | -- | ||
46 | 1.7.7.6 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch new file mode 100644 index 00000000..55d6ef9c --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0014-sky2-propogate-rx-hash-when-packet-is-copied.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 040442d719f91dcb002eaa1efaffbebd2fd44328 Mon Sep 17 00:00:00 2001 | ||
2 | From: stephen hemminger <shemminger@vyatta.com> | ||
3 | Date: Mon, 30 Apr 2012 05:49:45 +0000 | ||
4 | Subject: [PATCH 14/56] sky2: propogate rx hash when packet is copied | ||
5 | |||
6 | [ Upstream commit 3f42941b5d1d13542b1a755a9e4f633aa72e4d3e ] | ||
7 | |||
8 | When a small packet is received, the driver copies it to a new skb to allow | ||
9 | reusing the full size Rx buffer. The copy was propogating the checksum offload | ||
10 | but not the receive hash information. The bug is impact was mostly harmless | ||
11 | and therefore not observed until reviewing this area of code. | ||
12 | |||
13 | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/net/ethernet/marvell/sky2.c | 3 +++ | ||
18 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c | ||
21 | index 7eb8a00..e1f4b65 100644 | ||
22 | --- a/drivers/net/ethernet/marvell/sky2.c | ||
23 | +++ b/drivers/net/ethernet/marvell/sky2.c | ||
24 | @@ -2475,8 +2475,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, | ||
25 | skb_copy_from_linear_data(re->skb, skb->data, length); | ||
26 | skb->ip_summed = re->skb->ip_summed; | ||
27 | skb->csum = re->skb->csum; | ||
28 | + skb->rxhash = re->skb->rxhash; | ||
29 | + | ||
30 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, | ||
31 | length, PCI_DMA_FROMDEVICE); | ||
32 | + re->skb->rxhash = 0; | ||
33 | re->skb->ip_summed = CHECKSUM_NONE; | ||
34 | skb_put(skb, length); | ||
35 | } | ||
36 | -- | ||
37 | 1.7.7.6 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch new file mode 100644 index 00000000..ba0888dc --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0015-sky2-fix-receive-length-error-in-mixed-non-VLAN-VLAN.patch | |||
@@ -0,0 +1,136 @@ | |||
1 | From 27f7b26b133f97629f82ce156d481a32a881472b Mon Sep 17 00:00:00 2001 | ||
2 | From: stephen hemminger <shemminger@vyatta.com> | ||
3 | Date: Mon, 30 Apr 2012 06:47:37 +0000 | ||
4 | Subject: [PATCH 15/56] sky2: fix receive length error in mixed non-VLAN/VLAN | ||
5 | traffic | ||
6 | |||
7 | [ Upstream commit e072b3fad5f3915102c94628b4971f52ff99dd05 ] | ||
8 | |||
9 | Bug: The VLAN bit of the MAC RX Status Word is unreliable in several older | ||
10 | supported chips. Sometimes the VLAN bit is not set for valid VLAN packets | ||
11 | and also sometimes the VLAN bit is set for non-VLAN packets that came after | ||
12 | a VLAN packet. This results in a receive length error when VLAN hardware | ||
13 | tagging is enabled. | ||
14 | |||
15 | Fix: Variation on original fix proposed by Mirko. | ||
16 | The VLAN information is decoded in the status loop, and can be | ||
17 | applied to the received SKB there. This eliminates the need for the | ||
18 | separate tag field in the interface data structure. The tag has to | ||
19 | be copied and cleared if packet is copied. This version checked out | ||
20 | with vlan and normal traffic. | ||
21 | |||
22 | Note: vlan_tx_tag_present should be renamed vlan_tag_present, but that | ||
23 | is outside scope of this. | ||
24 | |||
25 | Reported-by: Mirko Lindner <mlindner@marvell.com> | ||
26 | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> | ||
27 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
28 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
29 | --- | ||
30 | drivers/net/ethernet/marvell/sky2.c | 28 +++++++++++++++++----------- | ||
31 | drivers/net/ethernet/marvell/sky2.h | 1 - | ||
32 | 2 files changed, 17 insertions(+), 12 deletions(-) | ||
33 | |||
34 | diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c | ||
35 | index e1f4b65..65c51ff 100644 | ||
36 | --- a/drivers/net/ethernet/marvell/sky2.c | ||
37 | +++ b/drivers/net/ethernet/marvell/sky2.c | ||
38 | @@ -2476,9 +2476,11 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2, | ||
39 | skb->ip_summed = re->skb->ip_summed; | ||
40 | skb->csum = re->skb->csum; | ||
41 | skb->rxhash = re->skb->rxhash; | ||
42 | + skb->vlan_tci = re->skb->vlan_tci; | ||
43 | |||
44 | pci_dma_sync_single_for_device(sky2->hw->pdev, re->data_addr, | ||
45 | length, PCI_DMA_FROMDEVICE); | ||
46 | + re->skb->vlan_tci = 0; | ||
47 | re->skb->rxhash = 0; | ||
48 | re->skb->ip_summed = CHECKSUM_NONE; | ||
49 | skb_put(skb, length); | ||
50 | @@ -2564,9 +2566,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | ||
51 | struct sk_buff *skb = NULL; | ||
52 | u16 count = (status & GMR_FS_LEN) >> 16; | ||
53 | |||
54 | - if (status & GMR_FS_VLAN) | ||
55 | - count -= VLAN_HLEN; /* Account for vlan tag */ | ||
56 | - | ||
57 | netif_printk(sky2, rx_status, KERN_DEBUG, dev, | ||
58 | "rx slot %u status 0x%x len %d\n", | ||
59 | sky2->rx_next, status, length); | ||
60 | @@ -2574,6 +2573,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | ||
61 | sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; | ||
62 | prefetch(sky2->rx_ring + sky2->rx_next); | ||
63 | |||
64 | + if (vlan_tx_tag_present(re->skb)) | ||
65 | + count -= VLAN_HLEN; /* Account for vlan tag */ | ||
66 | + | ||
67 | /* This chip has hardware problems that generates bogus status. | ||
68 | * So do only marginal checking and expect higher level protocols | ||
69 | * to handle crap frames. | ||
70 | @@ -2631,11 +2633,8 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) | ||
71 | } | ||
72 | |||
73 | static inline void sky2_skb_rx(const struct sky2_port *sky2, | ||
74 | - u32 status, struct sk_buff *skb) | ||
75 | + struct sk_buff *skb) | ||
76 | { | ||
77 | - if (status & GMR_FS_VLAN) | ||
78 | - __vlan_hwaccel_put_tag(skb, be16_to_cpu(sky2->rx_tag)); | ||
79 | - | ||
80 | if (skb->ip_summed == CHECKSUM_NONE) | ||
81 | netif_receive_skb(skb); | ||
82 | else | ||
83 | @@ -2689,6 +2688,14 @@ static void sky2_rx_checksum(struct sky2_port *sky2, u32 status) | ||
84 | } | ||
85 | } | ||
86 | |||
87 | +static void sky2_rx_tag(struct sky2_port *sky2, u16 length) | ||
88 | +{ | ||
89 | + struct sk_buff *skb; | ||
90 | + | ||
91 | + skb = sky2->rx_ring[sky2->rx_next].skb; | ||
92 | + __vlan_hwaccel_put_tag(skb, be16_to_cpu(length)); | ||
93 | +} | ||
94 | + | ||
95 | static void sky2_rx_hash(struct sky2_port *sky2, u32 status) | ||
96 | { | ||
97 | struct sk_buff *skb; | ||
98 | @@ -2747,8 +2754,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) | ||
99 | } | ||
100 | |||
101 | skb->protocol = eth_type_trans(skb, dev); | ||
102 | - | ||
103 | - sky2_skb_rx(sky2, status, skb); | ||
104 | + sky2_skb_rx(sky2, skb); | ||
105 | |||
106 | /* Stop after net poll weight */ | ||
107 | if (++work_done >= to_do) | ||
108 | @@ -2756,11 +2762,11 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) | ||
109 | break; | ||
110 | |||
111 | case OP_RXVLAN: | ||
112 | - sky2->rx_tag = length; | ||
113 | + sky2_rx_tag(sky2, length); | ||
114 | break; | ||
115 | |||
116 | case OP_RXCHKSVLAN: | ||
117 | - sky2->rx_tag = length; | ||
118 | + sky2_rx_tag(sky2, length); | ||
119 | /* fall through */ | ||
120 | case OP_RXCHKS: | ||
121 | if (likely(dev->features & NETIF_F_RXCSUM)) | ||
122 | diff --git a/drivers/net/ethernet/marvell/sky2.h b/drivers/net/ethernet/marvell/sky2.h | ||
123 | index ff6f58b..3c896ce 100644 | ||
124 | --- a/drivers/net/ethernet/marvell/sky2.h | ||
125 | +++ b/drivers/net/ethernet/marvell/sky2.h | ||
126 | @@ -2241,7 +2241,6 @@ struct sky2_port { | ||
127 | u16 rx_pending; | ||
128 | u16 rx_data_size; | ||
129 | u16 rx_nfrags; | ||
130 | - u16 rx_tag; | ||
131 | |||
132 | struct { | ||
133 | unsigned long last; | ||
134 | -- | ||
135 | 1.7.7.6 | ||
136 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch new file mode 100644 index 00000000..f750148b --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0016-sungem-Fix-WakeOnLan.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 4fb3cd4329db7cba66335fe4d74f5234030cf1a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gerard Lledo <gerard.lledo@gmail.com> | ||
3 | Date: Sat, 28 Apr 2012 08:52:37 +0000 | ||
4 | Subject: [PATCH 16/56] sungem: Fix WakeOnLan | ||
5 | |||
6 | [ Upstream commit 5a8887d39e1ba5ee2d4ccb94b14d6f2dce5ddfca ] | ||
7 | |||
8 | WakeOnLan was broken in this driver because gp->asleep_wol is a 1-bit | ||
9 | bitfield and it was being assigned WAKE_MAGIC, which is (1 << 5). | ||
10 | gp->asleep_wol remains 0 and the machine never wakes up. Fixed by casting | ||
11 | gp->wake_on_lan to bool. Tested on an iBook G4. | ||
12 | |||
13 | Signed-off-by: Gerard Lledo <gerard.lledo@gmail.com> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/net/ethernet/sun/sungem.c | 2 +- | ||
18 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c | ||
21 | index ceab215..c508d6a 100644 | ||
22 | --- a/drivers/net/ethernet/sun/sungem.c | ||
23 | +++ b/drivers/net/ethernet/sun/sungem.c | ||
24 | @@ -2340,7 +2340,7 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state) | ||
25 | netif_device_detach(dev); | ||
26 | |||
27 | /* Switch off chip, remember WOL setting */ | ||
28 | - gp->asleep_wol = gp->wake_on_lan; | ||
29 | + gp->asleep_wol = !!gp->wake_on_lan; | ||
30 | gem_do_stop(dev, gp->asleep_wol); | ||
31 | |||
32 | /* Unlock the network stack */ | ||
33 | -- | ||
34 | 1.7.7.6 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch new file mode 100644 index 00000000..1fbe741a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0017-tg3-Avoid-panic-from-reserved-statblk-field-access.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From ec9a6575908fa9558b613ace25ec0a9f5e1795ec Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Carlson <mcarlson@broadcom.com> | ||
3 | Date: Tue, 24 Apr 2012 13:37:01 +0000 | ||
4 | Subject: [PATCH 17/56] tg3: Avoid panic from reserved statblk field access | ||
5 | |||
6 | [ Upstream commit f891ea1634ce41f5f47ae40d8594809f4cd2ca66 ] | ||
7 | |||
8 | When RSS is enabled, interrupt vector 0 does not receive any rx traffic. | ||
9 | The rx producer index fields for vector 0's status block should be | ||
10 | considered reserved in this case. This patch changes the code to | ||
11 | respect these reserved fields, which avoids a kernel panic when these | ||
12 | fields take on non-zero values. | ||
13 | |||
14 | Signed-off-by: Matt Carlson <mcarlson@broadcom.com> | ||
15 | Signed-off-by: Michael Chan <mchan@broadcom.com> | ||
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | drivers/net/ethernet/broadcom/tg3.c | 18 ++++++++++++++++-- | ||
20 | 1 files changed, 16 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c | ||
23 | index 3d55883..2dcac28 100644 | ||
24 | --- a/drivers/net/ethernet/broadcom/tg3.c | ||
25 | +++ b/drivers/net/ethernet/broadcom/tg3.c | ||
26 | @@ -879,8 +879,13 @@ static inline unsigned int tg3_has_work(struct tg3_napi *tnapi) | ||
27 | if (sblk->status & SD_STATUS_LINK_CHG) | ||
28 | work_exists = 1; | ||
29 | } | ||
30 | - /* check for RX/TX work to do */ | ||
31 | - if (sblk->idx[0].tx_consumer != tnapi->tx_cons || | ||
32 | + | ||
33 | + /* check for TX work to do */ | ||
34 | + if (sblk->idx[0].tx_consumer != tnapi->tx_cons) | ||
35 | + work_exists = 1; | ||
36 | + | ||
37 | + /* check for RX work to do */ | ||
38 | + if (tnapi->rx_rcb_prod_idx && | ||
39 | *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr) | ||
40 | work_exists = 1; | ||
41 | |||
42 | @@ -5895,6 +5900,9 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget) | ||
43 | return work_done; | ||
44 | } | ||
45 | |||
46 | + if (!tnapi->rx_rcb_prod_idx) | ||
47 | + return work_done; | ||
48 | + | ||
49 | /* run RX thread, within the bounds set by NAPI. | ||
50 | * All RX "locking" is done by ensuring outside | ||
51 | * code synchronizes with tg3->napi.poll() | ||
52 | @@ -7448,6 +7456,12 @@ static int tg3_alloc_consistent(struct tg3 *tp) | ||
53 | */ | ||
54 | switch (i) { | ||
55 | default: | ||
56 | + if (tg3_flag(tp, ENABLE_RSS)) { | ||
57 | + tnapi->rx_rcb_prod_idx = NULL; | ||
58 | + break; | ||
59 | + } | ||
60 | + /* Fall through */ | ||
61 | + case 1: | ||
62 | tnapi->rx_rcb_prod_idx = &sblk->idx[0].rx_producer; | ||
63 | break; | ||
64 | case 2: | ||
65 | -- | ||
66 | 1.7.7.6 | ||
67 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch new file mode 100644 index 00000000..7e2818da --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0018-tcp-fix-infinite-cwnd-in-tcp_complete_cwr.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 6b142c33b94fd1c35b6a19be0982ae408ce8d162 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yuchung Cheng <ycheng@google.com> | ||
3 | Date: Mon, 30 Apr 2012 06:00:18 +0000 | ||
4 | Subject: [PATCH 18/56] tcp: fix infinite cwnd in tcp_complete_cwr() | ||
5 | |||
6 | [ Upstream commit 1cebce36d660c83bd1353e41f3e66abd4686f215 ] | ||
7 | |||
8 | When the cwnd reduction is done, ssthresh may be infinite | ||
9 | if TCP enters CWR via ECN or F-RTO. If cwnd is not undone, i.e., | ||
10 | undo_marker is set, tcp_complete_cwr() falsely set cwnd to the | ||
11 | infinite ssthresh value. The correct operation is to keep cwnd | ||
12 | intact because it has been updated in ECN or F-RTO. | ||
13 | |||
14 | Signed-off-by: Yuchung Cheng <ycheng@google.com> | ||
15 | Acked-by: Neal Cardwell <ncardwell@google.com> | ||
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | net/ipv4/tcp_input.c | 9 ++++++--- | ||
20 | 1 files changed, 6 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
23 | index daedc07..db07c9e 100644 | ||
24 | --- a/net/ipv4/tcp_input.c | ||
25 | +++ b/net/ipv4/tcp_input.c | ||
26 | @@ -2868,11 +2868,14 @@ static inline void tcp_complete_cwr(struct sock *sk) | ||
27 | |||
28 | /* Do not moderate cwnd if it's already undone in cwr or recovery. */ | ||
29 | if (tp->undo_marker) { | ||
30 | - if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) | ||
31 | + if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR) { | ||
32 | tp->snd_cwnd = min(tp->snd_cwnd, tp->snd_ssthresh); | ||
33 | - else /* PRR */ | ||
34 | + tp->snd_cwnd_stamp = tcp_time_stamp; | ||
35 | + } else if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH) { | ||
36 | + /* PRR algorithm. */ | ||
37 | tp->snd_cwnd = tp->snd_ssthresh; | ||
38 | - tp->snd_cwnd_stamp = tcp_time_stamp; | ||
39 | + tp->snd_cwnd_stamp = tcp_time_stamp; | ||
40 | + } | ||
41 | } | ||
42 | tcp_ca_event(sk, CA_EVENT_COMPLETE_CWR); | ||
43 | } | ||
44 | -- | ||
45 | 1.7.7.6 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch new file mode 100644 index 00000000..e0e1dda9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0019-tcp-change-tcp_adv_win_scale-and-tcp_rmem-2.patch | |||
@@ -0,0 +1,124 @@ | |||
1 | From 98d841428279a8060b46cf13a1463ebbeca65b4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <edumazet@google.com> | ||
3 | Date: Wed, 2 May 2012 02:28:41 +0000 | ||
4 | Subject: [PATCH 19/56] tcp: change tcp_adv_win_scale and tcp_rmem[2] | ||
5 | |||
6 | [ Upstream commit b49960a05e32121d29316cfdf653894b88ac9190 ] | ||
7 | |||
8 | tcp_adv_win_scale default value is 2, meaning we expect a good citizen | ||
9 | skb to have skb->len / skb->truesize ratio of 75% (3/4) | ||
10 | |||
11 | In 2.6 kernels we (mis)accounted for typical MSS=1460 frame : | ||
12 | 1536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392. | ||
13 | So these skbs were considered as not bloated. | ||
14 | |||
15 | With recent truesize fixes, a typical MSS=1460 frame truesize is now the | ||
16 | more precise : | ||
17 | 2048 + 256 = 2304. But 2304 * 3/4 = 1728. | ||
18 | So these skb are not good citizen anymore, because 1460 < 1728 | ||
19 | |||
20 | (GRO can escape this problem because it build skbs with a too low | ||
21 | truesize.) | ||
22 | |||
23 | This also means tcp advertises a too optimistic window for a given | ||
24 | allocated rcvspace : When receiving frames, sk_rmem_alloc can hit | ||
25 | sk_rcvbuf limit and we call tcp_prune_queue()/tcp_collapse() too often, | ||
26 | especially when application is slow to drain its receive queue or in | ||
27 | case of losses (netperf is fast, scp is slow). This is a major latency | ||
28 | source. | ||
29 | |||
30 | We should adjust the len/truesize ratio to 50% instead of 75% | ||
31 | |||
32 | This patch : | ||
33 | |||
34 | 1) changes tcp_adv_win_scale default to 1 instead of 2 | ||
35 | |||
36 | 2) increase tcp_rmem[2] limit from 4MB to 6MB to take into account | ||
37 | better truesize tracking and to allow autotuning tcp receive window to | ||
38 | reach same value than before. Note that same amount of kernel memory is | ||
39 | consumed compared to 2.6 kernels. | ||
40 | |||
41 | Signed-off-by: Eric Dumazet <edumazet@google.com> | ||
42 | Cc: Neal Cardwell <ncardwell@google.com> | ||
43 | Cc: Tom Herbert <therbert@google.com> | ||
44 | Cc: Yuchung Cheng <ycheng@google.com> | ||
45 | Acked-by: Neal Cardwell <ncardwell@google.com> | ||
46 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
47 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
48 | --- | ||
49 | Documentation/networking/ip-sysctl.txt | 4 ++-- | ||
50 | net/ipv4/tcp.c | 9 +++++---- | ||
51 | net/ipv4/tcp_input.c | 2 +- | ||
52 | 3 files changed, 8 insertions(+), 7 deletions(-) | ||
53 | |||
54 | diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt | ||
55 | index 589f2da..a4399f5 100644 | ||
56 | --- a/Documentation/networking/ip-sysctl.txt | ||
57 | +++ b/Documentation/networking/ip-sysctl.txt | ||
58 | @@ -137,7 +137,7 @@ tcp_adv_win_scale - INTEGER | ||
59 | (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), | ||
60 | if it is <= 0. | ||
61 | Possible values are [-31, 31], inclusive. | ||
62 | - Default: 2 | ||
63 | + Default: 1 | ||
64 | |||
65 | tcp_allowed_congestion_control - STRING | ||
66 | Show/set the congestion control choices available to non-privileged | ||
67 | @@ -397,7 +397,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max | ||
68 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables | ||
69 | automatic tuning of that socket's receive buffer size, in which | ||
70 | case this value is ignored. | ||
71 | - Default: between 87380B and 4MB, depending on RAM size. | ||
72 | + Default: between 87380B and 6MB, depending on RAM size. | ||
73 | |||
74 | tcp_sack - BOOLEAN | ||
75 | Enable select acknowledgments (SACKS). | ||
76 | diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c | ||
77 | index 7904db4..8f826b1 100644 | ||
78 | --- a/net/ipv4/tcp.c | ||
79 | +++ b/net/ipv4/tcp.c | ||
80 | @@ -3216,7 +3216,7 @@ void __init tcp_init(void) | ||
81 | { | ||
82 | struct sk_buff *skb = NULL; | ||
83 | unsigned long limit; | ||
84 | - int i, max_share, cnt; | ||
85 | + int i, max_rshare, max_wshare, cnt; | ||
86 | unsigned long jiffy = jiffies; | ||
87 | |||
88 | BUILD_BUG_ON(sizeof(struct tcp_skb_cb) > sizeof(skb->cb)); | ||
89 | @@ -3280,15 +3280,16 @@ void __init tcp_init(void) | ||
90 | |||
91 | /* Set per-socket limits to no more than 1/128 the pressure threshold */ | ||
92 | limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7); | ||
93 | - max_share = min(4UL*1024*1024, limit); | ||
94 | + max_wshare = min(4UL*1024*1024, limit); | ||
95 | + max_rshare = min(6UL*1024*1024, limit); | ||
96 | |||
97 | sysctl_tcp_wmem[0] = SK_MEM_QUANTUM; | ||
98 | sysctl_tcp_wmem[1] = 16*1024; | ||
99 | - sysctl_tcp_wmem[2] = max(64*1024, max_share); | ||
100 | + sysctl_tcp_wmem[2] = max(64*1024, max_wshare); | ||
101 | |||
102 | sysctl_tcp_rmem[0] = SK_MEM_QUANTUM; | ||
103 | sysctl_tcp_rmem[1] = 87380; | ||
104 | - sysctl_tcp_rmem[2] = max(87380, max_share); | ||
105 | + sysctl_tcp_rmem[2] = max(87380, max_rshare); | ||
106 | |||
107 | printk(KERN_INFO "TCP: Hash tables configured " | ||
108 | "(established %u bind %u)\n", | ||
109 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
110 | index db07c9e..9726927 100644 | ||
111 | --- a/net/ipv4/tcp_input.c | ||
112 | +++ b/net/ipv4/tcp_input.c | ||
113 | @@ -83,7 +83,7 @@ int sysctl_tcp_ecn __read_mostly = 2; | ||
114 | EXPORT_SYMBOL(sysctl_tcp_ecn); | ||
115 | int sysctl_tcp_dsack __read_mostly = 1; | ||
116 | int sysctl_tcp_app_win __read_mostly = 31; | ||
117 | -int sysctl_tcp_adv_win_scale __read_mostly = 2; | ||
118 | +int sysctl_tcp_adv_win_scale __read_mostly = 1; | ||
119 | EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); | ||
120 | |||
121 | int sysctl_tcp_stdurg __read_mostly; | ||
122 | -- | ||
123 | 1.7.7.6 | ||
124 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch new file mode 100644 index 00000000..92501a20 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0020-brcm80211-smac-pass-missing-argument-to-brcms_b_mute.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 9edfb7d2fb5250828aabc9ad47708b56184fa010 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Nieder <jrnieder@gmail.com> | ||
3 | Date: Fri, 11 May 2012 19:35:33 -0500 | ||
4 | Subject: [PATCH 20/56] brcm80211: smac: pass missing argument to | ||
5 | 'brcms_b_mute' | ||
6 | |||
7 | [Not needed upstream --- this bug is specific to 3.2.y.] | ||
8 | |||
9 | Commit c6c44893c864, which removes the flag argument from brcms_b_mute, | ||
10 | is not part of 3.2.y, and we forgot to adjust a new call accordingly | ||
11 | when applying commit badc4f07622f ("brcm80211: smac: resume transmit | ||
12 | fifo upon receiving frames"). | ||
13 | |||
14 | drivers/net/wireless/brcm80211/brcmsmac/main.c: In function 'brcms_c_recvctl': | ||
15 | drivers/net/wireless/brcm80211/brcmsmac/main.c:7882:4: error: too few arguments to function 'brcms_b_mute' | ||
16 | drivers/net/wireless/brcm80211/brcmsmac/main.c:2538:13: note: declared here | ||
17 | |||
18 | Earlier build tests missed this because they didn't include this driver | ||
19 | due to 'depends on BCMA=n'. | ||
20 | |||
21 | Reported-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> | ||
23 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
24 | --- | ||
25 | drivers/net/wireless/brcm80211/brcmsmac/main.c | 2 +- | ||
26 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c | ||
29 | index f98becc..833cbef 100644 | ||
30 | --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c | ||
31 | +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | ||
32 | @@ -7879,7 +7879,7 @@ brcms_c_recvctl(struct brcms_c_info *wlc, struct d11rxhdr *rxh, | ||
33 | if (wlc->hw->suspended_fifos) { | ||
34 | hdr = (struct ieee80211_hdr *)p->data; | ||
35 | if (ieee80211_is_beacon(hdr->frame_control)) | ||
36 | - brcms_b_mute(wlc->hw, false); | ||
37 | + brcms_b_mute(wlc->hw, false, 0); | ||
38 | } | ||
39 | |||
40 | memcpy(IEEE80211_SKB_RXCB(p), &rx_status, sizeof(rx_status)); | ||
41 | -- | ||
42 | 1.7.7.6 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch new file mode 100644 index 00000000..5b7769fb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0021-phy-icplus-fix-Auto-Power-Saving-in-ip101a_config_in.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 78381ca9729f5c7508cc74701d29cc325f37c5b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Srinivas Kandagatla <srinivas.kandagatla@st.com> | ||
3 | Date: Mon, 2 Apr 2012 00:02:09 +0000 | ||
4 | Subject: [PATCH 21/56] phy:icplus:fix Auto Power Saving in | ||
5 | ip101a_config_init. | ||
6 | |||
7 | [ Upstream commit b3300146aa8efc5d3937fd33f3cfdc580a3843bc ] | ||
8 | |||
9 | This patch fixes Auto Power Saving configuration in ip101a_config_init | ||
10 | which was broken as there is no phy register write followed after | ||
11 | setting IP101A_APS_ON flag. | ||
12 | |||
13 | This patch also fixes the return value of ip101a_config_init. | ||
14 | |||
15 | Without this patch ip101a_config_init returns 2 which is not an error | ||
16 | accroding to IS_ERR and the mac driver will continue accessing 2 as | ||
17 | valid pointer to phy_dev resulting in memory fault. | ||
18 | |||
19 | Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> | ||
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
21 | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> | ||
22 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
23 | --- | ||
24 | drivers/net/phy/icplus.c | 3 ++- | ||
25 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c | ||
28 | index c81f136..b142300 100644 | ||
29 | --- a/drivers/net/phy/icplus.c | ||
30 | +++ b/drivers/net/phy/icplus.c | ||
31 | @@ -150,7 +150,8 @@ static int ip101a_config_init(struct phy_device *phydev) | ||
32 | /* Enable Auto Power Saving mode */ | ||
33 | c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); | ||
34 | c |= IP101A_APS_ON; | ||
35 | - return c; | ||
36 | + | ||
37 | + return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); | ||
38 | } | ||
39 | |||
40 | static int ip175c_read_status(struct phy_device *phydev) | ||
41 | -- | ||
42 | 1.7.7.6 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch new file mode 100644 index 00000000..edc0c916 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0022-NFSv4-Revalidate-uid-gid-after-open.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 28797e10f3879232042e0f636e6650a2b35912f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Nieder <jrnieder@gmail.com> | ||
3 | Date: Fri, 11 May 2012 04:20:20 -0500 | ||
4 | Subject: [PATCH 22/56] NFSv4: Revalidate uid/gid after open | ||
5 | |||
6 | This is a shorter (and more appropriate for stable kernels) analog to | ||
7 | the following upstream commit: | ||
8 | |||
9 | commit 6926afd1925a54a13684ebe05987868890665e2b | ||
10 | Author: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
11 | Date: Sat Jan 7 13:22:46 2012 -0500 | ||
12 | |||
13 | NFSv4: Save the owner/group name string when doing open | ||
14 | |||
15 | ...so that we can do the uid/gid mapping outside the asynchronous RPC | ||
16 | context. | ||
17 | This fixes a bug in the current NFSv4 atomic open code where the client | ||
18 | isn't able to determine what the true uid/gid fields of the file are, | ||
19 | (because the asynchronous nature of the OPEN call denies it the ability | ||
20 | to do an upcall) and so fills them with default values, marking the | ||
21 | inode as needing revalidation. | ||
22 | Unfortunately, in some cases, the VFS will do some additional sanity | ||
23 | checks on the file, and may override the server's decision to allow | ||
24 | the open because it sees the wrong owner/group fields. | ||
25 | |||
26 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
27 | |||
28 | Without this patch, logging into two different machines with home | ||
29 | directories mounted over NFS4 and then running "vim" and typing ":q" | ||
30 | in each reliably produces the following error on the second machine: | ||
31 | |||
32 | E137: Viminfo file is not writable: /users/system/rtheys/.viminfo | ||
33 | |||
34 | This regression was introduced by 80e52aced138 ("NFSv4: Don't do | ||
35 | idmapper upcalls for asynchronous RPC calls", merged during the 2.6.32 | ||
36 | cycle) --- after the OPEN call, .viminfo has the default values for | ||
37 | st_uid and st_gid (0xfffffffe) cached because we do not want to let | ||
38 | rpciod wait for an idmapper upcall to fill them in. | ||
39 | |||
40 | The fix used in mainline is to save the owner and group as strings and | ||
41 | perform the upcall in _nfs4_proc_open outside the rpciod context, | ||
42 | which takes about 600 lines. For stable, we can do something similar | ||
43 | with a one-liner: make open check for the stale fields and make a | ||
44 | (synchronous) GETATTR call to fill them when needed. | ||
45 | |||
46 | Trond dictated the patch, I typed it in, and Rik tested it. | ||
47 | |||
48 | Addresses http://bugs.debian.org/659111 and | ||
49 | https://bugzilla.redhat.com/789298 | ||
50 | |||
51 | Reported-by: Rik Theys <Rik.Theys@esat.kuleuven.be> | ||
52 | Explained-by: David Flyn <davidf@rd.bbc.co.uk> | ||
53 | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> | ||
54 | Tested-by: Rik Theys <Rik.Theys@esat.kuleuven.be> | ||
55 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
56 | --- | ||
57 | fs/nfs/nfs4proc.c | 1 + | ||
58 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
59 | |||
60 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | ||
61 | index 51f6a40..bab7c58 100644 | ||
62 | --- a/fs/nfs/nfs4proc.c | ||
63 | +++ b/fs/nfs/nfs4proc.c | ||
64 | @@ -1802,6 +1802,7 @@ static int _nfs4_do_open(struct inode *dir, struct dentry *dentry, fmode_t fmode | ||
65 | nfs_setattr_update_inode(state->inode, sattr); | ||
66 | nfs_post_op_update_inode(state->inode, opendata->o_res.f_attr); | ||
67 | } | ||
68 | + nfs_revalidate_inode(server, state->inode); | ||
69 | nfs4_opendata_put(opendata); | ||
70 | nfs4_put_state_owner(sp); | ||
71 | *res = state; | ||
72 | -- | ||
73 | 1.7.7.6 | ||
74 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch new file mode 100644 index 00000000..66d06014 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0023-target-Drop-incorrect-se_lun_acl-release-for-dynamic.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From ca92b5c1f22073e079dae19162698441a231e36f Mon Sep 17 00:00:00 2001 | ||
2 | From: Nicholas Bellinger <nab@linux-iscsi.org> | ||
3 | Date: Thu, 10 May 2012 22:05:49 -0700 | ||
4 | Subject: [PATCH 23/56] target: Drop incorrect se_lun_acl release for dynamic | ||
5 | -> explict ACL conversion | ||
6 | |||
7 | commit cfebf8f42f47327fa54cf05c19b98f4bd5236a26 upstream. | ||
8 | |||
9 | This patch removes some potentially problematic legacy code within | ||
10 | core_clear_initiator_node_from_tpg() that was originally intended to | ||
11 | release left over se_lun_acl setup during dynamic NodeACL+MappedLUN | ||
12 | generate when running with TPG demo-mode operation. | ||
13 | |||
14 | Since we now only ever expect to allocate and release se_lun_acl from | ||
15 | within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and | ||
16 | target_fabric_drop_mappedlun() context respectively, this code for | ||
17 | demo-mode release is incorrect and needs to be removed. | ||
18 | |||
19 | Cc: Christoph Hellwig <hch@lst.de> | ||
20 | Cc: Andy Grover <agrover@redhat.com> | ||
21 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
22 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
23 | --- | ||
24 | drivers/target/target_core_tpg.c | 22 ---------------------- | ||
25 | 1 files changed, 0 insertions(+), 22 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c | ||
28 | index 8ddd133..d91fe44 100644 | ||
29 | --- a/drivers/target/target_core_tpg.c | ||
30 | +++ b/drivers/target/target_core_tpg.c | ||
31 | @@ -63,7 +63,6 @@ static void core_clear_initiator_node_from_tpg( | ||
32 | int i; | ||
33 | struct se_dev_entry *deve; | ||
34 | struct se_lun *lun; | ||
35 | - struct se_lun_acl *acl, *acl_tmp; | ||
36 | |||
37 | spin_lock_irq(&nacl->device_list_lock); | ||
38 | for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { | ||
39 | @@ -84,28 +83,7 @@ static void core_clear_initiator_node_from_tpg( | ||
40 | core_update_device_list_for_node(lun, NULL, deve->mapped_lun, | ||
41 | TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); | ||
42 | |||
43 | - spin_lock(&lun->lun_acl_lock); | ||
44 | - list_for_each_entry_safe(acl, acl_tmp, | ||
45 | - &lun->lun_acl_list, lacl_list) { | ||
46 | - if (!strcmp(acl->initiatorname, nacl->initiatorname) && | ||
47 | - (acl->mapped_lun == deve->mapped_lun)) | ||
48 | - break; | ||
49 | - } | ||
50 | - | ||
51 | - if (!acl) { | ||
52 | - pr_err("Unable to locate struct se_lun_acl for %s," | ||
53 | - " mapped_lun: %u\n", nacl->initiatorname, | ||
54 | - deve->mapped_lun); | ||
55 | - spin_unlock(&lun->lun_acl_lock); | ||
56 | - spin_lock_irq(&nacl->device_list_lock); | ||
57 | - continue; | ||
58 | - } | ||
59 | - | ||
60 | - list_del(&acl->lacl_list); | ||
61 | - spin_unlock(&lun->lun_acl_lock); | ||
62 | - | ||
63 | spin_lock_irq(&nacl->device_list_lock); | ||
64 | - kfree(acl); | ||
65 | } | ||
66 | spin_unlock_irq(&nacl->device_list_lock); | ||
67 | } | ||
68 | -- | ||
69 | 1.7.7.6 | ||
70 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch new file mode 100644 index 00000000..09a02df7 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0024-marvell-cam-fix-an-ARM-build-error.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 10b936ceae2bf61d07542014bf9140f302810892 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Corbet <corbet@lwn.net> | ||
3 | Date: Fri, 20 Apr 2012 12:22:50 -0300 | ||
4 | Subject: [PATCH 24/56] marvell-cam: fix an ARM build error | ||
5 | |||
6 | commit 9967232f1be5bab10c7b7a8dcf51ff5c3c1a6d77 upstream. | ||
7 | |||
8 | One of the OLPC changes lost a little in its translation to mainline, | ||
9 | leading to build errors on the ARM architecture. Remove the offending | ||
10 | line, and all will be well. | ||
11 | |||
12 | Reported-by: Mathieu Poirier <mathieu.poirier@linaro.org> | ||
13 | Signed-off-by: Jonathan Corbet <corbet@lwn.net> | ||
14 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/media/video/marvell-ccic/mmp-driver.c | 1 - | ||
18 | 1 files changed, 0 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/video/marvell-ccic/mmp-driver.c | ||
21 | index fb0b124..a6b7657 100644 | ||
22 | --- a/drivers/media/video/marvell-ccic/mmp-driver.c | ||
23 | +++ b/drivers/media/video/marvell-ccic/mmp-driver.c | ||
24 | @@ -175,7 +175,6 @@ static int mmpcam_probe(struct platform_device *pdev) | ||
25 | INIT_LIST_HEAD(&cam->devlist); | ||
26 | |||
27 | mcam = &cam->mcam; | ||
28 | - mcam->platform = MHP_Armada610; | ||
29 | mcam->plat_power_up = mmpcam_power_up; | ||
30 | mcam->plat_power_down = mmpcam_power_down; | ||
31 | mcam->dev = &pdev->dev; | ||
32 | -- | ||
33 | 1.7.7.6 | ||
34 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch new file mode 100644 index 00000000..501e7d8a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0025-rc-Postpone-ISR-registration.patch | |||
@@ -0,0 +1,325 @@ | |||
1 | From 51e9e3cdf5aa99d1bda7d03d213cc4dc0766c7ed Mon Sep 17 00:00:00 2001 | ||
2 | From: Luis Henriques <luis.henriques@canonical.com> | ||
3 | Date: Sat, 21 Apr 2012 12:25:21 -0300 | ||
4 | Subject: [PATCH 25/56] rc: Postpone ISR registration | ||
5 | |||
6 | commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 upstream. | ||
7 | |||
8 | An early registration of an ISR was causing a crash to several users (for | ||
9 | example, with the ite-cir driver: http://bugs.launchpad.net/bugs/972723). | ||
10 | The reason was that IRQs were being triggered before a driver | ||
11 | initialisation was completed. | ||
12 | |||
13 | This patch fixes this by moving the invocation to request_irq() and to | ||
14 | request_region() to a later stage on the driver probe function. | ||
15 | |||
16 | Signed-off-by: Luis Henriques <luis.henriques@canonical.com> | ||
17 | Acked-by: Jarod Wilson <jarod@redhat.com> | ||
18 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
20 | --- | ||
21 | drivers/media/rc/ene_ir.c | 32 ++++++++-------- | ||
22 | drivers/media/rc/fintek-cir.c | 20 +++++----- | ||
23 | drivers/media/rc/ite-cir.c | 20 +++++----- | ||
24 | drivers/media/rc/nuvoton-cir.c | 36 +++++++++--------- | ||
25 | drivers/media/rc/winbond-cir.c | 78 ++++++++++++++++++++-------------------- | ||
26 | 5 files changed, 93 insertions(+), 93 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c | ||
29 | index 860c112..bef5296 100644 | ||
30 | --- a/drivers/media/rc/ene_ir.c | ||
31 | +++ b/drivers/media/rc/ene_ir.c | ||
32 | @@ -1018,22 +1018,6 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) | ||
33 | |||
34 | spin_lock_init(&dev->hw_lock); | ||
35 | |||
36 | - /* claim the resources */ | ||
37 | - error = -EBUSY; | ||
38 | - dev->hw_io = pnp_port_start(pnp_dev, 0); | ||
39 | - if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { | ||
40 | - dev->hw_io = -1; | ||
41 | - dev->irq = -1; | ||
42 | - goto error; | ||
43 | - } | ||
44 | - | ||
45 | - dev->irq = pnp_irq(pnp_dev, 0); | ||
46 | - if (request_irq(dev->irq, ene_isr, | ||
47 | - IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) { | ||
48 | - dev->irq = -1; | ||
49 | - goto error; | ||
50 | - } | ||
51 | - | ||
52 | pnp_set_drvdata(pnp_dev, dev); | ||
53 | dev->pnp_dev = pnp_dev; | ||
54 | |||
55 | @@ -1086,6 +1070,22 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id) | ||
56 | device_set_wakeup_capable(&pnp_dev->dev, true); | ||
57 | device_set_wakeup_enable(&pnp_dev->dev, true); | ||
58 | |||
59 | + /* claim the resources */ | ||
60 | + error = -EBUSY; | ||
61 | + dev->hw_io = pnp_port_start(pnp_dev, 0); | ||
62 | + if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) { | ||
63 | + dev->hw_io = -1; | ||
64 | + dev->irq = -1; | ||
65 | + goto error; | ||
66 | + } | ||
67 | + | ||
68 | + dev->irq = pnp_irq(pnp_dev, 0); | ||
69 | + if (request_irq(dev->irq, ene_isr, | ||
70 | + IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) { | ||
71 | + dev->irq = -1; | ||
72 | + goto error; | ||
73 | + } | ||
74 | + | ||
75 | error = rc_register_device(rdev); | ||
76 | if (error < 0) | ||
77 | goto error; | ||
78 | diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c | ||
79 | index 7f7079b..4218f73 100644 | ||
80 | --- a/drivers/media/rc/fintek-cir.c | ||
81 | +++ b/drivers/media/rc/fintek-cir.c | ||
82 | @@ -504,16 +504,6 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id | ||
83 | |||
84 | spin_lock_init(&fintek->fintek_lock); | ||
85 | |||
86 | - ret = -EBUSY; | ||
87 | - /* now claim resources */ | ||
88 | - if (!request_region(fintek->cir_addr, | ||
89 | - fintek->cir_port_len, FINTEK_DRIVER_NAME)) | ||
90 | - goto failure; | ||
91 | - | ||
92 | - if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED, | ||
93 | - FINTEK_DRIVER_NAME, (void *)fintek)) | ||
94 | - goto failure; | ||
95 | - | ||
96 | pnp_set_drvdata(pdev, fintek); | ||
97 | fintek->pdev = pdev; | ||
98 | |||
99 | @@ -548,6 +538,16 @@ static int fintek_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id | ||
100 | /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */ | ||
101 | rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD); | ||
102 | |||
103 | + ret = -EBUSY; | ||
104 | + /* now claim resources */ | ||
105 | + if (!request_region(fintek->cir_addr, | ||
106 | + fintek->cir_port_len, FINTEK_DRIVER_NAME)) | ||
107 | + goto failure; | ||
108 | + | ||
109 | + if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED, | ||
110 | + FINTEK_DRIVER_NAME, (void *)fintek)) | ||
111 | + goto failure; | ||
112 | + | ||
113 | ret = rc_register_device(rdev); | ||
114 | if (ret) | ||
115 | goto failure; | ||
116 | diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c | ||
117 | index 682009d..0e49c99 100644 | ||
118 | --- a/drivers/media/rc/ite-cir.c | ||
119 | +++ b/drivers/media/rc/ite-cir.c | ||
120 | @@ -1515,16 +1515,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | ||
121 | /* initialize raw event */ | ||
122 | init_ir_raw_event(&itdev->rawir); | ||
123 | |||
124 | - ret = -EBUSY; | ||
125 | - /* now claim resources */ | ||
126 | - if (!request_region(itdev->cir_addr, | ||
127 | - dev_desc->io_region_size, ITE_DRIVER_NAME)) | ||
128 | - goto failure; | ||
129 | - | ||
130 | - if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, | ||
131 | - ITE_DRIVER_NAME, (void *)itdev)) | ||
132 | - goto failure; | ||
133 | - | ||
134 | /* set driver data into the pnp device */ | ||
135 | pnp_set_drvdata(pdev, itdev); | ||
136 | itdev->pdev = pdev; | ||
137 | @@ -1600,6 +1590,16 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id | ||
138 | rdev->driver_name = ITE_DRIVER_NAME; | ||
139 | rdev->map_name = RC_MAP_RC6_MCE; | ||
140 | |||
141 | + ret = -EBUSY; | ||
142 | + /* now claim resources */ | ||
143 | + if (!request_region(itdev->cir_addr, | ||
144 | + dev_desc->io_region_size, ITE_DRIVER_NAME)) | ||
145 | + goto failure; | ||
146 | + | ||
147 | + if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, | ||
148 | + ITE_DRIVER_NAME, (void *)itdev)) | ||
149 | + goto failure; | ||
150 | + | ||
151 | ret = rc_register_device(rdev); | ||
152 | if (ret) | ||
153 | goto failure; | ||
154 | diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c | ||
155 | index 144f3f5..8b2c071 100644 | ||
156 | --- a/drivers/media/rc/nuvoton-cir.c | ||
157 | +++ b/drivers/media/rc/nuvoton-cir.c | ||
158 | @@ -1021,24 +1021,6 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) | ||
159 | spin_lock_init(&nvt->nvt_lock); | ||
160 | spin_lock_init(&nvt->tx.lock); | ||
161 | |||
162 | - ret = -EBUSY; | ||
163 | - /* now claim resources */ | ||
164 | - if (!request_region(nvt->cir_addr, | ||
165 | - CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) | ||
166 | - goto failure; | ||
167 | - | ||
168 | - if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED, | ||
169 | - NVT_DRIVER_NAME, (void *)nvt)) | ||
170 | - goto failure; | ||
171 | - | ||
172 | - if (!request_region(nvt->cir_wake_addr, | ||
173 | - CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) | ||
174 | - goto failure; | ||
175 | - | ||
176 | - if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED, | ||
177 | - NVT_DRIVER_NAME, (void *)nvt)) | ||
178 | - goto failure; | ||
179 | - | ||
180 | pnp_set_drvdata(pdev, nvt); | ||
181 | nvt->pdev = pdev; | ||
182 | |||
183 | @@ -1085,6 +1067,24 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) | ||
184 | rdev->tx_resolution = XYZ; | ||
185 | #endif | ||
186 | |||
187 | + ret = -EBUSY; | ||
188 | + /* now claim resources */ | ||
189 | + if (!request_region(nvt->cir_addr, | ||
190 | + CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) | ||
191 | + goto failure; | ||
192 | + | ||
193 | + if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED, | ||
194 | + NVT_DRIVER_NAME, (void *)nvt)) | ||
195 | + goto failure; | ||
196 | + | ||
197 | + if (!request_region(nvt->cir_wake_addr, | ||
198 | + CIR_IOREG_LENGTH, NVT_DRIVER_NAME)) | ||
199 | + goto failure; | ||
200 | + | ||
201 | + if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED, | ||
202 | + NVT_DRIVER_NAME, (void *)nvt)) | ||
203 | + goto failure; | ||
204 | + | ||
205 | ret = rc_register_device(rdev); | ||
206 | if (ret) | ||
207 | goto failure; | ||
208 | diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c | ||
209 | index a7e7d6f..4591770 100644 | ||
210 | --- a/drivers/media/rc/winbond-cir.c | ||
211 | +++ b/drivers/media/rc/winbond-cir.c | ||
212 | @@ -991,39 +991,10 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) | ||
213 | "(w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n", | ||
214 | data->wbase, data->ebase, data->sbase, data->irq); | ||
215 | |||
216 | - if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) { | ||
217 | - dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
218 | - data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1); | ||
219 | - err = -EBUSY; | ||
220 | - goto exit_free_data; | ||
221 | - } | ||
222 | - | ||
223 | - if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) { | ||
224 | - dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
225 | - data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1); | ||
226 | - err = -EBUSY; | ||
227 | - goto exit_release_wbase; | ||
228 | - } | ||
229 | - | ||
230 | - if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) { | ||
231 | - dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
232 | - data->sbase, data->sbase + SP_IOMEM_LEN - 1); | ||
233 | - err = -EBUSY; | ||
234 | - goto exit_release_ebase; | ||
235 | - } | ||
236 | - | ||
237 | - err = request_irq(data->irq, wbcir_irq_handler, | ||
238 | - IRQF_DISABLED, DRVNAME, device); | ||
239 | - if (err) { | ||
240 | - dev_err(dev, "Failed to claim IRQ %u\n", data->irq); | ||
241 | - err = -EBUSY; | ||
242 | - goto exit_release_sbase; | ||
243 | - } | ||
244 | - | ||
245 | led_trigger_register_simple("cir-tx", &data->txtrigger); | ||
246 | if (!data->txtrigger) { | ||
247 | err = -ENOMEM; | ||
248 | - goto exit_free_irq; | ||
249 | + goto exit_free_data; | ||
250 | } | ||
251 | |||
252 | led_trigger_register_simple("cir-rx", &data->rxtrigger); | ||
253 | @@ -1062,9 +1033,38 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) | ||
254 | data->dev->priv = data; | ||
255 | data->dev->dev.parent = &device->dev; | ||
256 | |||
257 | + if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) { | ||
258 | + dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
259 | + data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1); | ||
260 | + err = -EBUSY; | ||
261 | + goto exit_free_rc; | ||
262 | + } | ||
263 | + | ||
264 | + if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) { | ||
265 | + dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
266 | + data->ebase, data->ebase + EHFUNC_IOMEM_LEN - 1); | ||
267 | + err = -EBUSY; | ||
268 | + goto exit_release_wbase; | ||
269 | + } | ||
270 | + | ||
271 | + if (!request_region(data->sbase, SP_IOMEM_LEN, DRVNAME)) { | ||
272 | + dev_err(dev, "Region 0x%lx-0x%lx already in use!\n", | ||
273 | + data->sbase, data->sbase + SP_IOMEM_LEN - 1); | ||
274 | + err = -EBUSY; | ||
275 | + goto exit_release_ebase; | ||
276 | + } | ||
277 | + | ||
278 | + err = request_irq(data->irq, wbcir_irq_handler, | ||
279 | + IRQF_DISABLED, DRVNAME, device); | ||
280 | + if (err) { | ||
281 | + dev_err(dev, "Failed to claim IRQ %u\n", data->irq); | ||
282 | + err = -EBUSY; | ||
283 | + goto exit_release_sbase; | ||
284 | + } | ||
285 | + | ||
286 | err = rc_register_device(data->dev); | ||
287 | if (err) | ||
288 | - goto exit_free_rc; | ||
289 | + goto exit_free_irq; | ||
290 | |||
291 | device_init_wakeup(&device->dev, 1); | ||
292 | |||
293 | @@ -1072,14 +1072,6 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) | ||
294 | |||
295 | return 0; | ||
296 | |||
297 | -exit_free_rc: | ||
298 | - rc_free_device(data->dev); | ||
299 | -exit_unregister_led: | ||
300 | - led_classdev_unregister(&data->led); | ||
301 | -exit_unregister_rxtrigger: | ||
302 | - led_trigger_unregister_simple(data->rxtrigger); | ||
303 | -exit_unregister_txtrigger: | ||
304 | - led_trigger_unregister_simple(data->txtrigger); | ||
305 | exit_free_irq: | ||
306 | free_irq(data->irq, device); | ||
307 | exit_release_sbase: | ||
308 | @@ -1088,6 +1080,14 @@ exit_release_ebase: | ||
309 | release_region(data->ebase, EHFUNC_IOMEM_LEN); | ||
310 | exit_release_wbase: | ||
311 | release_region(data->wbase, WAKEUP_IOMEM_LEN); | ||
312 | +exit_free_rc: | ||
313 | + rc_free_device(data->dev); | ||
314 | +exit_unregister_led: | ||
315 | + led_classdev_unregister(&data->led); | ||
316 | +exit_unregister_rxtrigger: | ||
317 | + led_trigger_unregister_simple(data->rxtrigger); | ||
318 | +exit_unregister_txtrigger: | ||
319 | + led_trigger_unregister_simple(data->txtrigger); | ||
320 | exit_free_data: | ||
321 | kfree(data); | ||
322 | pnp_set_drvdata(device, NULL); | ||
323 | -- | ||
324 | 1.7.7.6 | ||
325 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch new file mode 100644 index 00000000..718254ab --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0026-cdc_ether-Ignore-bogus-union-descriptor-for-RNDIS-de.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From 701699958f6f1770bf758ebac587fd85e73e8c76 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no> | ||
3 | Date: Thu, 26 Apr 2012 02:35:10 +0000 | ||
4 | Subject: [PATCH 26/56] cdc_ether: Ignore bogus union descriptor for RNDIS | ||
5 | devices | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | commit 6eddcb4c82883451aec3be1240f17793370fa62f upstream. | ||
11 | |||
12 | Some RNDIS devices include a bogus CDC Union descriptor pointing | ||
13 | to non-existing interfaces. The RNDIS code is already prepared | ||
14 | to handle devices without a CDC Union descriptor by hardwiring | ||
15 | the driver to use interfaces 0 and 1, which is correct for the | ||
16 | devices with the bogus descriptor as well. So we can reuse the | ||
17 | existing workaround. | ||
18 | |||
19 | Cc: Markus Kolb <linux-201011@tower-net.de> | ||
20 | Cc: Iker Salmón San Millán <shaola@esdebian.org> | ||
21 | Cc: Jonathan Nieder <jrnieder@gmail.com> | ||
22 | Cc: Oliver Neukum <oliver@neukum.org> | ||
23 | Cc: 655387@bugs.debian.org | ||
24 | Signed-off-by: Bjørn Mork <bjorn@mork.no> | ||
25 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
26 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
27 | --- | ||
28 | drivers/net/usb/cdc_ether.c | 14 ++++++++++++-- | ||
29 | 1 files changed, 12 insertions(+), 2 deletions(-) | ||
30 | |||
31 | diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c | ||
32 | index 4fd4144..eac4886 100644 | ||
33 | --- a/drivers/net/usb/cdc_ether.c | ||
34 | +++ b/drivers/net/usb/cdc_ether.c | ||
35 | @@ -83,6 +83,7 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | ||
36 | struct cdc_state *info = (void *) &dev->data; | ||
37 | int status; | ||
38 | int rndis; | ||
39 | + bool android_rndis_quirk = false; | ||
40 | struct usb_driver *driver = driver_of(intf); | ||
41 | struct usb_cdc_mdlm_desc *desc = NULL; | ||
42 | struct usb_cdc_mdlm_detail_desc *detail = NULL; | ||
43 | @@ -195,6 +196,11 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | ||
44 | info->control, | ||
45 | info->u->bSlaveInterface0, | ||
46 | info->data); | ||
47 | + /* fall back to hard-wiring for RNDIS */ | ||
48 | + if (rndis) { | ||
49 | + android_rndis_quirk = true; | ||
50 | + goto next_desc; | ||
51 | + } | ||
52 | goto bad_desc; | ||
53 | } | ||
54 | if (info->control != intf) { | ||
55 | @@ -271,11 +277,15 @@ next_desc: | ||
56 | /* Microsoft ActiveSync based and some regular RNDIS devices lack the | ||
57 | * CDC descriptors, so we'll hard-wire the interfaces and not check | ||
58 | * for descriptors. | ||
59 | + * | ||
60 | + * Some Android RNDIS devices have a CDC Union descriptor pointing | ||
61 | + * to non-existing interfaces. Ignore that and attempt the same | ||
62 | + * hard-wired 0 and 1 interfaces. | ||
63 | */ | ||
64 | - if (rndis && !info->u) { | ||
65 | + if (rndis && (!info->u || android_rndis_quirk)) { | ||
66 | info->control = usb_ifnum_to_if(dev->udev, 0); | ||
67 | info->data = usb_ifnum_to_if(dev->udev, 1); | ||
68 | - if (!info->control || !info->data) { | ||
69 | + if (!info->control || !info->data || info->control != intf) { | ||
70 | dev_dbg(&intf->dev, | ||
71 | "rndis: master #0/%p slave #1/%p\n", | ||
72 | info->control, | ||
73 | -- | ||
74 | 1.7.7.6 | ||
75 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch new file mode 100644 index 00000000..4f321553 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0027-jffs2-Fix-lock-acquisition-order-bug-in-gc-path.patch | |||
@@ -0,0 +1,103 @@ | |||
1 | From f1c7fc81d6b170d79df0dc657040e42ece3b1953 Mon Sep 17 00:00:00 2001 | ||
2 | From: Josh Cartwright <joshc@linux.com> | ||
3 | Date: Thu, 29 Mar 2012 19:34:53 -0400 | ||
4 | Subject: [PATCH 27/56] jffs2: Fix lock acquisition order bug in gc path | ||
5 | |||
6 | commit 226bb7df3d22bcf4a1c0fe8206c80cc427498eae upstream. | ||
7 | |||
8 | The locking policy is such that the erase_complete_block spinlock is | ||
9 | nested within the alloc_sem mutex. This fixes a case in which the | ||
10 | acquisition order was erroneously reversed. This issue was caught by | ||
11 | the following lockdep splat: | ||
12 | |||
13 | ======================================================= | ||
14 | [ INFO: possible circular locking dependency detected ] | ||
15 | 3.0.5 #1 | ||
16 | ------------------------------------------------------- | ||
17 | jffs2_gcd_mtd6/299 is trying to acquire lock: | ||
18 | (&c->alloc_sem){+.+.+.}, at: [<c01f7714>] jffs2_garbage_collect_pass+0x314/0x890 | ||
19 | |||
20 | but task is already holding lock: | ||
21 | (&(&c->erase_completion_lock)->rlock){+.+...}, at: [<c01f7708>] jffs2_garbage_collect_pass+0x308/0x890 | ||
22 | |||
23 | which lock already depends on the new lock. | ||
24 | |||
25 | the existing dependency chain (in reverse order) is: | ||
26 | |||
27 | -> #1 (&(&c->erase_completion_lock)->rlock){+.+...}: | ||
28 | [<c008bec4>] validate_chain+0xe6c/0x10bc | ||
29 | [<c008c660>] __lock_acquire+0x54c/0xba4 | ||
30 | [<c008d240>] lock_acquire+0xa4/0x114 | ||
31 | [<c046780c>] _raw_spin_lock+0x3c/0x4c | ||
32 | [<c01f744c>] jffs2_garbage_collect_pass+0x4c/0x890 | ||
33 | [<c01f937c>] jffs2_garbage_collect_thread+0x1b4/0x1cc | ||
34 | [<c0071a68>] kthread+0x98/0xa0 | ||
35 | [<c000f264>] kernel_thread_exit+0x0/0x8 | ||
36 | |||
37 | -> #0 (&c->alloc_sem){+.+.+.}: | ||
38 | [<c008ad2c>] print_circular_bug+0x70/0x2c4 | ||
39 | [<c008c08c>] validate_chain+0x1034/0x10bc | ||
40 | [<c008c660>] __lock_acquire+0x54c/0xba4 | ||
41 | [<c008d240>] lock_acquire+0xa4/0x114 | ||
42 | [<c0466628>] mutex_lock_nested+0x74/0x33c | ||
43 | [<c01f7714>] jffs2_garbage_collect_pass+0x314/0x890 | ||
44 | [<c01f937c>] jffs2_garbage_collect_thread+0x1b4/0x1cc | ||
45 | [<c0071a68>] kthread+0x98/0xa0 | ||
46 | [<c000f264>] kernel_thread_exit+0x0/0x8 | ||
47 | |||
48 | other info that might help us debug this: | ||
49 | |||
50 | Possible unsafe locking scenario: | ||
51 | |||
52 | CPU0 CPU1 | ||
53 | ---- ---- | ||
54 | lock(&(&c->erase_completion_lock)->rlock); | ||
55 | lock(&c->alloc_sem); | ||
56 | lock(&(&c->erase_completion_lock)->rlock); | ||
57 | lock(&c->alloc_sem); | ||
58 | |||
59 | *** DEADLOCK *** | ||
60 | |||
61 | 1 lock held by jffs2_gcd_mtd6/299: | ||
62 | #0: (&(&c->erase_completion_lock)->rlock){+.+...}, at: [<c01f7708>] jffs2_garbage_collect_pass+0x308/0x890 | ||
63 | |||
64 | stack backtrace: | ||
65 | [<c00155dc>] (unwind_backtrace+0x0/0x100) from [<c0463dc0>] (dump_stack+0x20/0x24) | ||
66 | [<c0463dc0>] (dump_stack+0x20/0x24) from [<c008ae84>] (print_circular_bug+0x1c8/0x2c4) | ||
67 | [<c008ae84>] (print_circular_bug+0x1c8/0x2c4) from [<c008c08c>] (validate_chain+0x1034/0x10bc) | ||
68 | [<c008c08c>] (validate_chain+0x1034/0x10bc) from [<c008c660>] (__lock_acquire+0x54c/0xba4) | ||
69 | [<c008c660>] (__lock_acquire+0x54c/0xba4) from [<c008d240>] (lock_acquire+0xa4/0x114) | ||
70 | [<c008d240>] (lock_acquire+0xa4/0x114) from [<c0466628>] (mutex_lock_nested+0x74/0x33c) | ||
71 | [<c0466628>] (mutex_lock_nested+0x74/0x33c) from [<c01f7714>] (jffs2_garbage_collect_pass+0x314/0x890) | ||
72 | [<c01f7714>] (jffs2_garbage_collect_pass+0x314/0x890) from [<c01f937c>] (jffs2_garbage_collect_thread+0x1b4/0x1cc) | ||
73 | [<c01f937c>] (jffs2_garbage_collect_thread+0x1b4/0x1cc) from [<c0071a68>] (kthread+0x98/0xa0) | ||
74 | [<c0071a68>] (kthread+0x98/0xa0) from [<c000f264>] (kernel_thread_exit+0x0/0x8) | ||
75 | |||
76 | This was introduce in '81cfc9f jffs2: Fix serious write stall due to erase'. | ||
77 | |||
78 | Signed-off-by: Josh Cartwright <joshc@linux.com> | ||
79 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
80 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
81 | [bwh: Backported to 3.2: adjust context] | ||
82 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
83 | --- | ||
84 | fs/jffs2/gc.c | 2 +- | ||
85 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
86 | |||
87 | diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c | ||
88 | index 31dce61..4bbd521 100644 | ||
89 | --- a/fs/jffs2/gc.c | ||
90 | +++ b/fs/jffs2/gc.c | ||
91 | @@ -225,8 +225,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c) | ||
92 | return 0; | ||
93 | |||
94 | D1(printk(KERN_DEBUG "No progress from erasing blocks; doing GC anyway\n")); | ||
95 | - spin_lock(&c->erase_completion_lock); | ||
96 | mutex_lock(&c->alloc_sem); | ||
97 | + spin_lock(&c->erase_completion_lock); | ||
98 | } | ||
99 | |||
100 | /* First, work out which block we're garbage-collecting */ | ||
101 | -- | ||
102 | 1.7.7.6 | ||
103 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch new file mode 100644 index 00000000..df322fd6 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0028-s5p-fimc-Fix-locking-in-subdev-set_crop-op.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From fdde7964742c3802205c7fa50677abfe7b462bfd Mon Sep 17 00:00:00 2001 | ||
2 | From: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
3 | Date: Sat, 21 Apr 2012 18:46:30 -0300 | ||
4 | Subject: [PATCH 28/56] s5p-fimc: Fix locking in subdev set_crop op | ||
5 | |||
6 | commit e985dbf7d93e2a3e114b4525413e50f83613e0cb upstream. | ||
7 | |||
8 | When setting TRY crop on the sub-device the mutex was erroneously acquired | ||
9 | rather than released on exit path. This bug is present in kernels starting | ||
10 | from v3.2. | ||
11 | |||
12 | Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
13 | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> | ||
14 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/media/video/s5p-fimc/fimc-capture.c | 2 +- | ||
18 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c | ||
21 | index 2cc3b91..327a81f 100644 | ||
22 | --- a/drivers/media/video/s5p-fimc/fimc-capture.c | ||
23 | +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | ||
24 | @@ -1304,7 +1304,7 @@ static int fimc_subdev_set_crop(struct v4l2_subdev *sd, | ||
25 | fimc_capture_try_crop(ctx, r, crop->pad); | ||
26 | |||
27 | if (crop->which == V4L2_SUBDEV_FORMAT_TRY) { | ||
28 | - mutex_lock(&fimc->lock); | ||
29 | + mutex_unlock(&fimc->lock); | ||
30 | *v4l2_subdev_get_try_crop(fh, crop->pad) = *r; | ||
31 | return 0; | ||
32 | } | ||
33 | -- | ||
34 | 1.7.7.6 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch new file mode 100644 index 00000000..cbbc4f14 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 6cbf63344c48a119864df9c5873d0407a32d9872 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Snitzer <snitzer@redhat.com> | ||
3 | Date: Sat, 12 May 2012 01:43:21 +0100 | ||
4 | Subject: [PATCH 29/56] dm mpath: check if scsi_dh module already loaded | ||
5 | before trying to load | ||
6 | |||
7 | commit 510193a2d3d2e03ae53b95c0ae4f33cdff02cbf8 upstream. | ||
8 | |||
9 | If the requested scsi_dh module is already loaded then skip | ||
10 | request_module(). | ||
11 | |||
12 | Multipath table loads can hang in an unnecessary __request_module. | ||
13 | |||
14 | Reported-by: Ben Marzinski <bmarzins@redhat.com> | ||
15 | Signed-off-by: Mike Snitzer <snitzer@redhat.com> | ||
16 | Signed-off-by: Alasdair G Kergon <agk@redhat.com> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | drivers/md/dm-mpath.c | 4 ++-- | ||
20 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c | ||
23 | index 801d92d..a417f94 100644 | ||
24 | --- a/drivers/md/dm-mpath.c | ||
25 | +++ b/drivers/md/dm-mpath.c | ||
26 | @@ -698,8 +698,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m) | ||
27 | return 0; | ||
28 | |||
29 | m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); | ||
30 | - request_module("scsi_dh_%s", m->hw_handler_name); | ||
31 | - if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { | ||
32 | + if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name), | ||
33 | + "scsi_dh_%s", m->hw_handler_name)) { | ||
34 | ti->error = "unknown hardware handler type"; | ||
35 | ret = -EINVAL; | ||
36 | goto fail; | ||
37 | -- | ||
38 | 1.7.7.6 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch new file mode 100644 index 00000000..a684875a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0030-sparc64-Do-not-clobber-g2-in-xcall_fetch_glob_regs.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 03ddf7fce874ca8243c81666ca3cc742f195781b Mon Sep 17 00:00:00 2001 | ||
2 | From: "David S. Miller" <davem@davemloft.net> | ||
3 | Date: Thu, 10 May 2012 11:00:46 -0700 | ||
4 | Subject: [PATCH 30/56] sparc64: Do not clobber %g2 in | ||
5 | xcall_fetch_glob_regs(). | ||
6 | |||
7 | [ Upstream commit a5a737e090e25981e99d69f01400e3a80356581c ] | ||
8 | |||
9 | %g2 is meant to hold the CPUID number throughout this routine, since | ||
10 | at the very beginning, and at the very end, we use %g2 to calculate | ||
11 | indexes into per-cpu arrays. | ||
12 | |||
13 | However we erroneously clobber it in order to hold the %cwp register | ||
14 | value mid-stream. | ||
15 | |||
16 | Fix this code to use %g3 for the %cwp read and related calulcations | ||
17 | instead. | ||
18 | |||
19 | Reported-by: Meelis Roos <mroos@linux.ee> | ||
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
21 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | --- | ||
23 | arch/sparc/kernel/central.c | 2 +- | ||
24 | arch/sparc/mm/ultra.S | 6 +++--- | ||
25 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c | ||
28 | index 38d48a5..9708851 100644 | ||
29 | --- a/arch/sparc/kernel/central.c | ||
30 | +++ b/arch/sparc/kernel/central.c | ||
31 | @@ -269,4 +269,4 @@ static int __init sunfire_init(void) | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | -subsys_initcall(sunfire_init); | ||
36 | +fs_initcall(sunfire_init); | ||
37 | diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S | ||
38 | index b57a594..874162a 100644 | ||
39 | --- a/arch/sparc/mm/ultra.S | ||
40 | +++ b/arch/sparc/mm/ultra.S | ||
41 | @@ -495,11 +495,11 @@ xcall_fetch_glob_regs: | ||
42 | stx %o7, [%g1 + GR_SNAP_O7] | ||
43 | stx %i7, [%g1 + GR_SNAP_I7] | ||
44 | /* Don't try this at home kids... */ | ||
45 | - rdpr %cwp, %g2 | ||
46 | - sub %g2, 1, %g7 | ||
47 | + rdpr %cwp, %g3 | ||
48 | + sub %g3, 1, %g7 | ||
49 | wrpr %g7, %cwp | ||
50 | mov %i7, %g7 | ||
51 | - wrpr %g2, %cwp | ||
52 | + wrpr %g3, %cwp | ||
53 | stx %g7, [%g1 + GR_SNAP_RPC] | ||
54 | sethi %hi(trap_block), %g7 | ||
55 | or %g7, %lo(trap_block), %g7 | ||
56 | -- | ||
57 | 1.7.7.6 | ||
58 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch new file mode 100644 index 00000000..bc85a028 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0031-gpio-Add-missing-spin_lock_init-in-gpio-ml-ioh-drive.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 37f2f887df9f3c8428bd1776a5c0ca1d302b3ea1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Axel Lin <axel.lin@gmail.com> | ||
3 | Date: Wed, 1 Feb 2012 10:50:05 +0800 | ||
4 | Subject: [PATCH 31/56] gpio: Add missing spin_lock_init in gpio-ml-ioh driver | ||
5 | |||
6 | commit 7e3a70fb7bccada029c188c89bfbf3c0a63c1500 upstream. | ||
7 | |||
8 | This bug was introduced by commit 54be5663 | ||
9 | "gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct | ||
10 | ioh_gpio but never init the spinlock. | ||
11 | |||
12 | Signed-off-by: Axel Lin <axel.lin@gmail.com> | ||
13 | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ||
14 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
15 | --- | ||
16 | drivers/gpio/gpio-ml-ioh.c | 1 + | ||
17 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c | ||
20 | index 461958f..271fd49 100644 | ||
21 | --- a/drivers/gpio/gpio-ml-ioh.c | ||
22 | +++ b/drivers/gpio/gpio-ml-ioh.c | ||
23 | @@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, | ||
24 | chip->reg = chip->base; | ||
25 | chip->ch = i; | ||
26 | mutex_init(&chip->lock); | ||
27 | + spin_lock_init(&chip->spinlock); | ||
28 | ioh_gpio_setup(chip, num_ports[i]); | ||
29 | ret = gpiochip_add(&chip->gpio); | ||
30 | if (ret) { | ||
31 | -- | ||
32 | 1.7.7.6 | ||
33 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch new file mode 100644 index 00000000..e46fe625 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0032-spi-topcliff-pch-Modify-pci-bus-number-dynamically-t.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From e985aa700788ca6b938d4505cbe1dbdd88a3dbfd Mon Sep 17 00:00:00 2001 | ||
2 | From: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
3 | Date: Fri, 9 Dec 2011 13:11:42 +0900 | ||
4 | Subject: [PATCH 32/56] spi-topcliff-pch: Modify pci-bus number dynamically to | ||
5 | get DMA device info | ||
6 | |||
7 | commit ee2ece5261a639b89f194d141444b03b4c923179 upstream. | ||
8 | |||
9 | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
10 | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ||
11 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
12 | --- | ||
13 | drivers/spi/spi-topcliff-pch.c | 3 ++- | ||
14 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c | ||
17 | index 54b9d2e..3238ec8 100644 | ||
18 | --- a/drivers/spi/spi-topcliff-pch.c | ||
19 | +++ b/drivers/spi/spi-topcliff-pch.c | ||
20 | @@ -924,7 +924,8 @@ static void pch_spi_request_dma(struct pch_spi_data *data, int bpw) | ||
21 | dma_cap_set(DMA_SLAVE, mask); | ||
22 | |||
23 | /* Get DMA's dev information */ | ||
24 | - dma_dev = pci_get_bus_and_slot(2, PCI_DEVFN(12, 0)); | ||
25 | + dma_dev = pci_get_bus_and_slot(data->board_dat->pdev->bus->number, | ||
26 | + PCI_DEVFN(12, 0)); | ||
27 | |||
28 | /* Set Tx DMA */ | ||
29 | param = &dma->param_tx; | ||
30 | -- | ||
31 | 1.7.7.6 | ||
32 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch new file mode 100644 index 00000000..f11f8c14 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0033-spi-topcliff-pch-Fix-issue-for-transmitting-over-4KB.patch | |||
@@ -0,0 +1,187 @@ | |||
1 | From fcd3dfee85be4b4bdde47eecba12490ede6218d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
3 | Date: Fri, 9 Dec 2011 13:13:27 +0900 | ||
4 | Subject: [PATCH 33/56] spi-topcliff-pch: Fix issue for transmitting over | ||
5 | 4KByte | ||
6 | |||
7 | commit 7d05b3e868ee0f9231baf40cb77be3df5dd1f18c upstream. | ||
8 | |||
9 | Currently, when spi-topcliff-pch receives transmit request over 4KByte, | ||
10 | this driver can't process correctly. This driver needs to divide the data | ||
11 | into 4Kbyte unit. | ||
12 | This patch fixes the issue. | ||
13 | |||
14 | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
15 | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/spi/spi-topcliff-pch.c | 66 +++++++++++++++++++++++++++++++++------- | ||
19 | 1 files changed, 55 insertions(+), 11 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c | ||
22 | index 3238ec8..1e60827 100644 | ||
23 | --- a/drivers/spi/spi-topcliff-pch.c | ||
24 | +++ b/drivers/spi/spi-topcliff-pch.c | ||
25 | @@ -196,6 +196,7 @@ struct pch_spi_data { | ||
26 | struct pch_spi_dma_ctrl dma; | ||
27 | int use_dma; | ||
28 | u8 irq_reg_sts; | ||
29 | + int save_total_len; | ||
30 | }; | ||
31 | |||
32 | /** | ||
33 | @@ -823,11 +824,13 @@ static void pch_spi_copy_rx_data_for_dma(struct pch_spi_data *data, int bpw) | ||
34 | rx_dma_buf = data->dma.rx_buf_virt; | ||
35 | for (j = 0; j < data->bpw_len; j++) | ||
36 | *rx_buf++ = *rx_dma_buf++ & 0xFF; | ||
37 | + data->cur_trans->rx_buf = rx_buf; | ||
38 | } else { | ||
39 | rx_sbuf = data->cur_trans->rx_buf; | ||
40 | rx_dma_sbuf = data->dma.rx_buf_virt; | ||
41 | for (j = 0; j < data->bpw_len; j++) | ||
42 | *rx_sbuf++ = *rx_dma_sbuf++; | ||
43 | + data->cur_trans->rx_buf = rx_sbuf; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | @@ -853,6 +856,9 @@ static int pch_spi_start_transfer(struct pch_spi_data *data) | ||
48 | rtn = wait_event_interruptible_timeout(data->wait, | ||
49 | data->transfer_complete, | ||
50 | msecs_to_jiffies(2 * HZ)); | ||
51 | + if (!rtn) | ||
52 | + dev_err(&data->master->dev, | ||
53 | + "%s wait-event timeout\n", __func__); | ||
54 | |||
55 | dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent, | ||
56 | DMA_FROM_DEVICE); | ||
57 | @@ -989,6 +995,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | ||
58 | int i; | ||
59 | int size; | ||
60 | int rem; | ||
61 | + int head; | ||
62 | unsigned long flags; | ||
63 | struct pch_spi_dma_ctrl *dma; | ||
64 | |||
65 | @@ -1017,6 +1024,11 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | ||
66 | } | ||
67 | data->bpw_len = data->cur_trans->len / (*bpw / 8); | ||
68 | |||
69 | + if (data->bpw_len > PCH_BUF_SIZE) { | ||
70 | + data->bpw_len = PCH_BUF_SIZE; | ||
71 | + data->cur_trans->len -= PCH_BUF_SIZE; | ||
72 | + } | ||
73 | + | ||
74 | /* copy Tx Data */ | ||
75 | if (data->cur_trans->tx_buf != NULL) { | ||
76 | if (*bpw == 8) { | ||
77 | @@ -1031,10 +1043,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | ||
78 | *tx_dma_sbuf++ = *tx_sbuf++; | ||
79 | } | ||
80 | } | ||
81 | + | ||
82 | + /* Calculate Rx parameter for DMA transmitting */ | ||
83 | if (data->bpw_len > PCH_DMA_TRANS_SIZE) { | ||
84 | - num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; | ||
85 | + if (data->bpw_len % PCH_DMA_TRANS_SIZE) { | ||
86 | + num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; | ||
87 | + rem = data->bpw_len % PCH_DMA_TRANS_SIZE; | ||
88 | + } else { | ||
89 | + num = data->bpw_len / PCH_DMA_TRANS_SIZE; | ||
90 | + rem = PCH_DMA_TRANS_SIZE; | ||
91 | + } | ||
92 | size = PCH_DMA_TRANS_SIZE; | ||
93 | - rem = data->bpw_len % PCH_DMA_TRANS_SIZE; | ||
94 | } else { | ||
95 | num = 1; | ||
96 | size = data->bpw_len; | ||
97 | @@ -1094,15 +1113,23 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | ||
98 | dma->nent = num; | ||
99 | dma->desc_rx = desc_rx; | ||
100 | |||
101 | - /* TX */ | ||
102 | - if (data->bpw_len > PCH_DMA_TRANS_SIZE) { | ||
103 | - num = data->bpw_len / PCH_DMA_TRANS_SIZE; | ||
104 | + /* Calculate Tx parameter for DMA transmitting */ | ||
105 | + if (data->bpw_len > PCH_MAX_FIFO_DEPTH) { | ||
106 | + head = PCH_MAX_FIFO_DEPTH - PCH_DMA_TRANS_SIZE; | ||
107 | + if (data->bpw_len % PCH_DMA_TRANS_SIZE > 4) { | ||
108 | + num = data->bpw_len / PCH_DMA_TRANS_SIZE + 1; | ||
109 | + rem = data->bpw_len % PCH_DMA_TRANS_SIZE - head; | ||
110 | + } else { | ||
111 | + num = data->bpw_len / PCH_DMA_TRANS_SIZE; | ||
112 | + rem = data->bpw_len % PCH_DMA_TRANS_SIZE + | ||
113 | + PCH_DMA_TRANS_SIZE - head; | ||
114 | + } | ||
115 | size = PCH_DMA_TRANS_SIZE; | ||
116 | - rem = 16; | ||
117 | } else { | ||
118 | num = 1; | ||
119 | size = data->bpw_len; | ||
120 | rem = data->bpw_len; | ||
121 | + head = 0; | ||
122 | } | ||
123 | |||
124 | dma->sg_tx_p = kzalloc(sizeof(struct scatterlist)*num, GFP_ATOMIC); | ||
125 | @@ -1112,11 +1139,17 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw) | ||
126 | for (i = 0; i < num; i++, sg++) { | ||
127 | if (i == 0) { | ||
128 | sg->offset = 0; | ||
129 | + sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size + head, | ||
130 | + sg->offset); | ||
131 | + sg_dma_len(sg) = size + head; | ||
132 | + } else if (i == (num - 1)) { | ||
133 | + sg->offset = head + size * i; | ||
134 | + sg->offset = sg->offset * (*bpw / 8); | ||
135 | sg_set_page(sg, virt_to_page(dma->tx_buf_virt), rem, | ||
136 | sg->offset); | ||
137 | sg_dma_len(sg) = rem; | ||
138 | } else { | ||
139 | - sg->offset = rem + size * (i - 1); | ||
140 | + sg->offset = head + size * i; | ||
141 | sg->offset = sg->offset * (*bpw / 8); | ||
142 | sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size, | ||
143 | sg->offset); | ||
144 | @@ -1204,6 +1237,7 @@ static void pch_spi_process_messages(struct work_struct *pwork) | ||
145 | data->current_msg->spi->bits_per_word); | ||
146 | pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL); | ||
147 | do { | ||
148 | + int cnt; | ||
149 | /* If we are already processing a message get the next | ||
150 | transfer structure from the message otherwise retrieve | ||
151 | the 1st transfer request from the message. */ | ||
152 | @@ -1223,11 +1257,20 @@ static void pch_spi_process_messages(struct work_struct *pwork) | ||
153 | } | ||
154 | spin_unlock(&data->lock); | ||
155 | |||
156 | + if (!data->cur_trans->len) | ||
157 | + goto out; | ||
158 | + cnt = (data->cur_trans->len - 1) / PCH_BUF_SIZE + 1; | ||
159 | + data->save_total_len = data->cur_trans->len; | ||
160 | if (data->use_dma) { | ||
161 | - pch_spi_handle_dma(data, &bpw); | ||
162 | - if (!pch_spi_start_transfer(data)) | ||
163 | - goto out; | ||
164 | - pch_spi_copy_rx_data_for_dma(data, bpw); | ||
165 | + int i; | ||
166 | + char *save_rx_buf = data->cur_trans->rx_buf; | ||
167 | + for (i = 0; i < cnt; i ++) { | ||
168 | + pch_spi_handle_dma(data, &bpw); | ||
169 | + if (!pch_spi_start_transfer(data)) | ||
170 | + goto out; | ||
171 | + pch_spi_copy_rx_data_for_dma(data, bpw); | ||
172 | + } | ||
173 | + data->cur_trans->rx_buf = save_rx_buf; | ||
174 | } else { | ||
175 | pch_spi_set_tx(data, &bpw); | ||
176 | pch_spi_set_ir(data); | ||
177 | @@ -1238,6 +1281,7 @@ static void pch_spi_process_messages(struct work_struct *pwork) | ||
178 | data->pkt_tx_buff = NULL; | ||
179 | } | ||
180 | /* increment message count */ | ||
181 | + data->cur_trans->len = data->save_total_len; | ||
182 | data->current_msg->actual_length += data->cur_trans->len; | ||
183 | |||
184 | dev_dbg(&data->master->dev, | ||
185 | -- | ||
186 | 1.7.7.6 | ||
187 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch new file mode 100644 index 00000000..c9d0ab75 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0034-spi-topcliff-pch-supports-a-spi-mode-setup-and-bit-o.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 3e43ac1c2f64e955c74f598621363028d87a93c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
3 | Date: Fri, 9 Dec 2011 13:13:28 +0900 | ||
4 | Subject: [PATCH 34/56] spi-topcliff-pch: supports a spi mode setup and bit | ||
5 | order setup by IO control | ||
6 | |||
7 | commit f258b44e22e07f5e98ac2260c70acff5784791b6 upstream. | ||
8 | |||
9 | This patch supports a spi mode setup and bit order setup by IO control. | ||
10 | spi mode: mode 0 to mode 3 | ||
11 | bit order: LSB first, MSB first | ||
12 | |||
13 | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
14 | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ||
15 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
16 | --- | ||
17 | drivers/spi/spi-topcliff-pch.c | 1 + | ||
18 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c | ||
21 | index 1e60827..0c4efed 100644 | ||
22 | --- a/drivers/spi/spi-topcliff-pch.c | ||
23 | +++ b/drivers/spi/spi-topcliff-pch.c | ||
24 | @@ -1434,6 +1434,7 @@ static int __devinit pch_spi_pd_probe(struct platform_device *plat_dev) | ||
25 | master->num_chipselect = PCH_MAX_CS; | ||
26 | master->setup = pch_spi_setup; | ||
27 | master->transfer = pch_spi_transfer; | ||
28 | + master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; | ||
29 | |||
30 | data->board_dat = board_dat; | ||
31 | data->plat_dev = plat_dev; | ||
32 | -- | ||
33 | 1.7.7.6 | ||
34 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch new file mode 100644 index 00000000..5370de52 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0035-spi-topcliff-pch-add-recovery-processing-in-case-wai.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 0c6c9c1d69fbdd6a1f54668a2c9f8f306c702728 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
3 | Date: Fri, 9 Dec 2011 13:13:29 +0900 | ||
4 | Subject: [PATCH 35/56] spi-topcliff-pch: add recovery processing in case | ||
5 | wait-event timeout | ||
6 | |||
7 | commit 0f57e168aa109775430c76cc663fb64909813d84 upstream. | ||
8 | |||
9 | Currently, pch_spi_start_transfer failure is not anticipated. | ||
10 | This patch adds the processing. | ||
11 | |||
12 | Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com> | ||
13 | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ||
14 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
15 | --- | ||
16 | drivers/spi/spi-topcliff-pch.c | 10 +++++++++- | ||
17 | 1 files changed, 9 insertions(+), 1 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c | ||
20 | index 0c4efed..1590dbd 100644 | ||
21 | --- a/drivers/spi/spi-topcliff-pch.c | ||
22 | +++ b/drivers/spi/spi-topcliff-pch.c | ||
23 | @@ -1266,8 +1266,16 @@ static void pch_spi_process_messages(struct work_struct *pwork) | ||
24 | char *save_rx_buf = data->cur_trans->rx_buf; | ||
25 | for (i = 0; i < cnt; i ++) { | ||
26 | pch_spi_handle_dma(data, &bpw); | ||
27 | - if (!pch_spi_start_transfer(data)) | ||
28 | + if (!pch_spi_start_transfer(data)) { | ||
29 | + data->transfer_complete = true; | ||
30 | + data->current_msg->status = -EIO; | ||
31 | + data->current_msg->complete | ||
32 | + (data->current_msg->context); | ||
33 | + data->bcurrent_msg_processing = false; | ||
34 | + data->current_msg = NULL; | ||
35 | + data->cur_trans = NULL; | ||
36 | goto out; | ||
37 | + } | ||
38 | pch_spi_copy_rx_data_for_dma(data, bpw); | ||
39 | } | ||
40 | data->cur_trans->rx_buf = save_rx_buf; | ||
41 | -- | ||
42 | 1.7.7.6 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch new file mode 100644 index 00000000..ffdd9961 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0036-ext4-avoid-deadlock-on-sync-mounted-FS-w-o-journal.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From ee9d8cc0c47d0095d5d27b81b7459fa534c56a67 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Sandeen <sandeen@redhat.com> | ||
3 | Date: Mon, 20 Feb 2012 23:06:18 -0500 | ||
4 | Subject: [PATCH 36/56] ext4: avoid deadlock on sync-mounted FS w/o journal | ||
5 | |||
6 | commit c1bb05a657fb3d8c6179a4ef7980261fae4521d7 upstream. | ||
7 | |||
8 | Processes hang forever on a sync-mounted ext2 file system that | ||
9 | is mounted with the ext4 module (default in Fedora 16). | ||
10 | |||
11 | I can reproduce this reliably by mounting an ext2 partition with | ||
12 | "-o sync" and opening a new file an that partition with vim. vim | ||
13 | will hang in "D" state forever. The same happens on ext4 without | ||
14 | a journal. | ||
15 | |||
16 | I am attaching a small patch here that solves this issue for me. | ||
17 | In the sync mounted case without a journal, | ||
18 | ext4_handle_dirty_metadata() may call sync_dirty_buffer(), which | ||
19 | can't be called with buffer lock held. | ||
20 | |||
21 | Also move mb_cache_entry_release inside lock to avoid race | ||
22 | fixed previously by 8a2bfdcb ext[34]: EA block reference count racing fix | ||
23 | Note too that ext2 fixed this same problem in 2006 with | ||
24 | b2f49033 [PATCH] fix deadlock in ext2 | ||
25 | |||
26 | Signed-off-by: Martin.Wilck@ts.fujitsu.com | ||
27 | [sandeen@redhat.com: move mb_cache_entry_release before unlock, edit commit msg] | ||
28 | Signed-off-by: Eric Sandeen <sandeen@redhat.com> | ||
29 | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ||
30 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
31 | --- | ||
32 | fs/ext4/xattr.c | 7 ++++--- | ||
33 | 1 files changed, 4 insertions(+), 3 deletions(-) | ||
34 | |||
35 | diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c | ||
36 | index 93a00d8..4410ae7 100644 | ||
37 | --- a/fs/ext4/xattr.c | ||
38 | +++ b/fs/ext4/xattr.c | ||
39 | @@ -487,18 +487,19 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode, | ||
40 | ext4_free_blocks(handle, inode, bh, 0, 1, | ||
41 | EXT4_FREE_BLOCKS_METADATA | | ||
42 | EXT4_FREE_BLOCKS_FORGET); | ||
43 | + unlock_buffer(bh); | ||
44 | } else { | ||
45 | le32_add_cpu(&BHDR(bh)->h_refcount, -1); | ||
46 | + if (ce) | ||
47 | + mb_cache_entry_release(ce); | ||
48 | + unlock_buffer(bh); | ||
49 | error = ext4_handle_dirty_metadata(handle, inode, bh); | ||
50 | if (IS_SYNC(inode)) | ||
51 | ext4_handle_sync(handle); | ||
52 | dquot_free_block(inode, 1); | ||
53 | ea_bdebug(bh, "refcount now=%d; releasing", | ||
54 | le32_to_cpu(BHDR(bh)->h_refcount)); | ||
55 | - if (ce) | ||
56 | - mb_cache_entry_release(ce); | ||
57 | } | ||
58 | - unlock_buffer(bh); | ||
59 | out: | ||
60 | ext4_std_error(inode->i_sb, error); | ||
61 | return; | ||
62 | -- | ||
63 | 1.7.7.6 | ||
64 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch new file mode 100644 index 00000000..fa24f4d7 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0037-ia64-Add-accept4-syscall.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 0ab7c7f97658245faa8a63b0e4870f5459f53e6e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?=C3=89meric=20Maschino?= <emeric.maschino@gmail.com> | ||
3 | Date: Mon, 9 Jan 2012 12:55:10 -0800 | ||
4 | Subject: [PATCH 37/56] ia64: Add accept4() syscall | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | commit 65cc21b4523e94d5640542a818748cd3be8cd6b4 upstream. | ||
10 | |||
11 | While debugging udev > 170 failure on Debian Wheezy | ||
12 | (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648325), it appears | ||
13 | that the issue was in fact due to missing accept4() in ia64. | ||
14 | |||
15 | This patch simply adds accept4() to ia64. | ||
16 | |||
17 | Signed-off-by: Émeric Maschino <emeric.maschino@gmail.com> | ||
18 | Signed-off-by: Tony Luck <tony.luck@intel.com> | ||
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
20 | --- | ||
21 | arch/ia64/include/asm/unistd.h | 3 ++- | ||
22 | arch/ia64/kernel/entry.S | 1 + | ||
23 | 2 files changed, 3 insertions(+), 1 deletions(-) | ||
24 | |||
25 | diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h | ||
26 | index 7617248..7a3bd25 100644 | ||
27 | --- a/arch/ia64/include/asm/unistd.h | ||
28 | +++ b/arch/ia64/include/asm/unistd.h | ||
29 | @@ -323,11 +323,12 @@ | ||
30 | #define __NR_sendmmsg 1331 | ||
31 | #define __NR_process_vm_readv 1332 | ||
32 | #define __NR_process_vm_writev 1333 | ||
33 | +#define __NR_accept4 1334 | ||
34 | |||
35 | #ifdef __KERNEL__ | ||
36 | |||
37 | |||
38 | -#define NR_syscalls 310 /* length of syscall table */ | ||
39 | +#define NR_syscalls 311 /* length of syscall table */ | ||
40 | |||
41 | /* | ||
42 | * The following defines stop scripts/checksyscalls.sh from complaining about | ||
43 | diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S | ||
44 | index 5b31d46..1ccbe12 100644 | ||
45 | --- a/arch/ia64/kernel/entry.S | ||
46 | +++ b/arch/ia64/kernel/entry.S | ||
47 | @@ -1779,6 +1779,7 @@ sys_call_table: | ||
48 | data8 sys_sendmmsg | ||
49 | data8 sys_process_vm_readv | ||
50 | data8 sys_process_vm_writev | ||
51 | + data8 sys_accept4 | ||
52 | |||
53 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | ||
54 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | ||
55 | -- | ||
56 | 1.7.7.6 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch new file mode 100644 index 00000000..09f5e5b0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0038-brcm80211-smac-fix-endless-retry-of-A-MPDU-transmiss.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 258bf060571803e3260270a579344d4a69eafe98 Mon Sep 17 00:00:00 2001 | ||
2 | From: Arend van Spriel <arend@broadcom.com> | ||
3 | Date: Thu, 9 Feb 2012 21:08:58 +0100 | ||
4 | Subject: [PATCH 38/56] brcm80211: smac: fix endless retry of A-MPDU | ||
5 | transmissions | ||
6 | |||
7 | commit 5e379203c7788b7af01150bfadbc74d2797a2ef4 upstream. | ||
8 | |||
9 | The A-MPDU code checked against a retry limit, but it was using | ||
10 | the wrong variable to do so. This patch fixes this to assure | ||
11 | proper retry mechanism. | ||
12 | |||
13 | This problem had a side-effect causing the mac80211 flush callback | ||
14 | to remain waiting forever as well. That side effect has been fixed | ||
15 | by commit by Stanislaw Gruszka: | ||
16 | |||
17 | commit f96b08a7e6f69c0f0a576554df3df5b1b519c479 | ||
18 | Date: Tue Jan 17 12:38:50 2012 +0100 | ||
19 | |||
20 | brcmsmac: fix tx queue flush infinite loop | ||
21 | |||
22 | Reference: | ||
23 | https://bugzilla.kernel.org/show_bug.cgi?id=42576 | ||
24 | |||
25 | Cc: Stanislaw Gruszka <sgruszka@redhat.com> | ||
26 | Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> | ||
27 | Reviewed-by: Alwin Beukers <alwin@broadcom.com> | ||
28 | Signed-off-by: Arend van Spriel <arend@broadcom.com> | ||
29 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
30 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
31 | --- | ||
32 | drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 +----- | ||
33 | 1 files changed, 1 insertions(+), 5 deletions(-) | ||
34 | |||
35 | diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | ||
36 | index 7f27dbd..0515862 100644 | ||
37 | --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | ||
38 | +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | ||
39 | @@ -1053,17 +1053,13 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, | ||
40 | } | ||
41 | /* either retransmit or send bar if ack not recd */ | ||
42 | if (!ack_recd) { | ||
43 | - struct ieee80211_tx_rate *txrate = | ||
44 | - tx_info->status.rates; | ||
45 | - if (retry && (txrate[0].count < (int)retry_limit)) { | ||
46 | + if (retry && (ini->txretry[index] < (int)retry_limit)) { | ||
47 | ini->txretry[index]++; | ||
48 | ini->tx_in_transit--; | ||
49 | /* | ||
50 | * Use high prededence for retransmit to | ||
51 | * give some punch | ||
52 | */ | ||
53 | - /* brcms_c_txq_enq(wlc, scb, p, | ||
54 | - * BRCMS_PRIO_TO_PREC(tid)); */ | ||
55 | brcms_c_txq_enq(wlc, scb, p, | ||
56 | BRCMS_PRIO_TO_HI_PREC(tid)); | ||
57 | } else { | ||
58 | -- | ||
59 | 1.7.7.6 | ||
60 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch new file mode 100644 index 00000000..9c2fe73f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0039-ARM-7417-1-vfp-ensure-preemption-is-disabled-when-en.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 51fdc0c99703cfde72be81bef9c7e38ac5c023a0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Will Deacon <will.deacon@arm.com> | ||
3 | Date: Fri, 11 May 2012 17:42:37 +0100 | ||
4 | Subject: [PATCH 39/56] ARM: 7417/1: vfp: ensure preemption is disabled when | ||
5 | enabling VFP access | ||
6 | |||
7 | commit 998de4acb2ba188d20768d1065658377a2e7d29b upstream. | ||
8 | |||
9 | The vfp_enable function enables access to the VFP co-processor register | ||
10 | space (cp10 and cp11) on the current CPU and must be called with | ||
11 | preemption disabled. Unfortunately, the vfp_init late initcall does not | ||
12 | disable preemption and can lead to an oops during boot if thread | ||
13 | migration occurs at the wrong time and we end up attempting to access | ||
14 | the FPSID on a CPU with VFP access disabled. | ||
15 | |||
16 | This patch fixes the initcall to call vfp_enable from a non-preemptible | ||
17 | context on each CPU and adds a BUG_ON(preemptible) to ensure that any | ||
18 | similar problems are easily spotted in the future. | ||
19 | |||
20 | Reported-by: Hyungwoo Yang <hwoo.yang@gmail.com> | ||
21 | Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com> | ||
22 | Signed-off-by: Will Deacon <will.deacon@arm.com> | ||
23 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
24 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
25 | --- | ||
26 | arch/arm/vfp/vfpmodule.c | 10 ++++++---- | ||
27 | 1 files changed, 6 insertions(+), 4 deletions(-) | ||
28 | |||
29 | diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c | ||
30 | index 8f3ccdd..8ea07e4 100644 | ||
31 | --- a/arch/arm/vfp/vfpmodule.c | ||
32 | +++ b/arch/arm/vfp/vfpmodule.c | ||
33 | @@ -11,6 +11,7 @@ | ||
34 | #include <linux/types.h> | ||
35 | #include <linux/cpu.h> | ||
36 | #include <linux/cpu_pm.h> | ||
37 | +#include <linux/hardirq.h> | ||
38 | #include <linux/kernel.h> | ||
39 | #include <linux/notifier.h> | ||
40 | #include <linux/signal.h> | ||
41 | @@ -428,7 +429,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs) | ||
42 | |||
43 | static void vfp_enable(void *unused) | ||
44 | { | ||
45 | - u32 access = get_copro_access(); | ||
46 | + u32 access; | ||
47 | + | ||
48 | + BUG_ON(preemptible()); | ||
49 | + access = get_copro_access(); | ||
50 | |||
51 | /* | ||
52 | * Enable full access to VFP (cp10 and cp11) | ||
53 | @@ -556,7 +560,7 @@ static int __init vfp_init(void) | ||
54 | unsigned int cpu_arch = cpu_architecture(); | ||
55 | |||
56 | if (cpu_arch >= CPU_ARCH_ARMv6) | ||
57 | - vfp_enable(NULL); | ||
58 | + on_each_cpu(vfp_enable, NULL, 1); | ||
59 | |||
60 | /* | ||
61 | * First check that there is a VFP that we can use. | ||
62 | @@ -577,8 +581,6 @@ static int __init vfp_init(void) | ||
63 | } else { | ||
64 | hotcpu_notifier(vfp_hotplug, 0); | ||
65 | |||
66 | - smp_call_function(vfp_enable, NULL, 1); | ||
67 | - | ||
68 | VFP_arch = (vfpsid & FPSID_ARCH_MASK) >> FPSID_ARCH_BIT; /* Extract the architecture version */ | ||
69 | printk("implementor %02x architecture %d part %02x variant %x rev %x\n", | ||
70 | (vfpsid & FPSID_IMPLEMENTER_MASK) >> FPSID_IMPLEMENTER_BIT, | ||
71 | -- | ||
72 | 1.7.7.6 | ||
73 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch new file mode 100644 index 00000000..cf2db916 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0040-target-Fix-SPC-2-RELEASE-bug-for-multi-session-iSCSI.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From b081b9481296d51cdb05548b8f67888a240a675f Mon Sep 17 00:00:00 2001 | ||
2 | From: Bernhard Kohl <Riedel-und-Kohl@t-online.de> | ||
3 | Date: Sun, 13 May 2012 23:39:37 +0200 | ||
4 | Subject: [PATCH 40/56] target: Fix SPC-2 RELEASE bug for multi-session iSCSI | ||
5 | client setups | ||
6 | |||
7 | commit edc318d9fea6854df752ec8c645b960b0d5a1d23 upstream. | ||
8 | |||
9 | This patch addresses a bug in a special case for target core SPC-2 RELEASE | ||
10 | logic where the same physical client (eg: iSCSI InitiatorName) with | ||
11 | differing iSCSI session identifiers (ISID) is allowed to incorrectly release | ||
12 | the same client's SPC-2 reservation from the non reservation holding path. | ||
13 | |||
14 | Note this bug is specific to iscsi-target w/ SPC-2 reservations, and | ||
15 | with the default enforce_pr_isids=1 device attr setting in target-core | ||
16 | controls if a InitiatorName + different ISID reservations are handled | ||
17 | the same as a single iSCSI client entity. | ||
18 | |||
19 | Signed-off-by: Bernhard Kohl <bernhard.kohl@gmx.net> | ||
20 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
21 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | --- | ||
23 | drivers/target/target_core_pr.c | 3 +++ | ||
24 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c | ||
27 | index 6cf6ff4..b75bc92 100644 | ||
28 | --- a/drivers/target/target_core_pr.c | ||
29 | +++ b/drivers/target/target_core_pr.c | ||
30 | @@ -223,6 +223,9 @@ int target_scsi2_reservation_release(struct se_task *task) | ||
31 | if (dev->dev_reserved_node_acl != sess->se_node_acl) | ||
32 | goto out_unlock; | ||
33 | |||
34 | + if (dev->dev_res_bin_isid != sess->sess_bin_isid) | ||
35 | + goto out_unlock; | ||
36 | + | ||
37 | dev->dev_reserved_node_acl = NULL; | ||
38 | dev->dev_flags &= ~DF_SPC2_RESERVATIONS; | ||
39 | if (dev->dev_flags & DF_SPC2_RESERVATIONS_WITH_ISID) { | ||
40 | -- | ||
41 | 1.7.7.6 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch new file mode 100644 index 00000000..8176064f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0041-crypto-mv_cesa-requires-on-CRYPTO_HASH-to-build.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From d5f0e3adeaf18edfac8b3c7d8f867fe92923a4ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Clouter <alex@digriz.org.uk> | ||
3 | Date: Sat, 12 May 2012 09:45:08 +0100 | ||
4 | Subject: [PATCH 41/56] crypto: mv_cesa requires on CRYPTO_HASH to build | ||
5 | |||
6 | commit 1ebfefcf37a6e308266a8d786e8cfea0a454058c upstream. | ||
7 | |||
8 | Without CRYPTO_HASH being selected, mv_cesa has a lot of hooks | ||
9 | into undefined exports. | ||
10 | ---- | ||
11 | MODPOST 81 modules | ||
12 | Kernel: arch/arm/boot/Image is ready | ||
13 | AS arch/arm/boot/compressed/head.o | ||
14 | GZIP arch/arm/boot/compressed/piggy.gzip | ||
15 | CC arch/arm/boot/compressed/misc.o | ||
16 | CC arch/arm/boot/compressed/decompress.o | ||
17 | ERROR: "crypto_ahash_type" [drivers/crypto/mv_cesa.ko] undefined! | ||
18 | ERROR: "crypto_shash_final" [drivers/crypto/mv_cesa.ko] undefined! | ||
19 | ERROR: "crypto_register_ahash" [drivers/crypto/mv_cesa.ko] undefined! | ||
20 | ERROR: "crypto_unregister_ahash" [drivers/crypto/mv_cesa.ko] undefined! | ||
21 | ERROR: "crypto_shash_update" [drivers/crypto/mv_cesa.ko] undefined! | ||
22 | ERROR: "crypto_shash_digest" [drivers/crypto/mv_cesa.ko] undefined! | ||
23 | ERROR: "crypto_shash_setkey" [drivers/crypto/mv_cesa.ko] undefined! | ||
24 | ERROR: "crypto_alloc_shash" [drivers/crypto/mv_cesa.ko] undefined! | ||
25 | make[1]: *** [__modpost] Error 1 | ||
26 | make: *** [modules] Error 2 | ||
27 | make: *** Waiting for unfinished jobs.... | ||
28 | ---- | ||
29 | |||
30 | Signed-off-by: Alexander Clouter <alex@digriz.org.uk> | ||
31 | Signed-off-by: Jason Cooper <jason@lakedaemon.net> | ||
32 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
33 | --- | ||
34 | drivers/crypto/Kconfig | 1 + | ||
35 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
36 | |||
37 | diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig | ||
38 | index 6d16b4b..7e3002b 100644 | ||
39 | --- a/drivers/crypto/Kconfig | ||
40 | +++ b/drivers/crypto/Kconfig | ||
41 | @@ -173,6 +173,7 @@ config CRYPTO_DEV_MV_CESA | ||
42 | select CRYPTO_ALGAPI | ||
43 | select CRYPTO_AES | ||
44 | select CRYPTO_BLKCIPHER2 | ||
45 | + select CRYPTO_HASH | ||
46 | help | ||
47 | This driver allows you to utilize the Cryptographic Engines and | ||
48 | Security Accelerator (CESA) which can be found on the Marvell Orion | ||
49 | -- | ||
50 | 1.7.7.6 | ||
51 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch new file mode 100644 index 00000000..21705fd4 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0042-ALSA-hda-idt-Fix-power-map-for-speaker-pins-with-som.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From e7a10d7bb94e2d5618757447f0ac108d8951b4a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Tue, 15 May 2012 08:07:31 +0200 | ||
4 | Subject: [PATCH 42/56] ALSA: hda/idt - Fix power-map for speaker-pins with | ||
5 | some HP laptops | ||
6 | |||
7 | commit b0791dda813c179e539b0fc1ecd3f5f30f2571e2 upstream. | ||
8 | |||
9 | BIOS on some HP laptops don't set the speaker-pins as fixed but expose | ||
10 | as jacks, and this confuses the driver as if these pins are | ||
11 | jack-detectable. As a result, the machine doesn't get sounds from | ||
12 | speakers because the driver prepares the power-map update via jack | ||
13 | unsol events which never come up in reality. The bug was introduced | ||
14 | in some time in 3.2 for enabling the power-mapping feature. | ||
15 | |||
16 | This patch fixes the problem by replacing the check of the persistent | ||
17 | power-map bits with a proper is_jack_detectable() call. | ||
18 | |||
19 | Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240 | ||
20 | |||
21 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
22 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
23 | --- | ||
24 | sound/pci/hda/patch_sigmatel.c | 6 +++--- | ||
25 | 1 files changed, 3 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c | ||
28 | index ed67698..7b7a516 100644 | ||
29 | --- a/sound/pci/hda/patch_sigmatel.c | ||
30 | +++ b/sound/pci/hda/patch_sigmatel.c | ||
31 | @@ -4484,9 +4484,9 @@ static int stac92xx_init(struct hda_codec *codec) | ||
32 | def_conf = get_defcfg_connect(def_conf); | ||
33 | /* skip any ports that don't have jacks since presence | ||
34 | * detection is useless */ | ||
35 | - if (def_conf != AC_JACK_PORT_COMPLEX) { | ||
36 | - if (def_conf != AC_JACK_PORT_NONE) | ||
37 | - stac_toggle_power_map(codec, nid, 1); | ||
38 | + if (def_conf != AC_JACK_PORT_NONE && | ||
39 | + !is_jack_detectable(codec, nid)) { | ||
40 | + stac_toggle_power_map(codec, nid, 1); | ||
41 | continue; | ||
42 | } | ||
43 | if (enable_pin_detect(codec, nid, STAC_PWR_EVENT)) { | ||
44 | -- | ||
45 | 1.7.7.6 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch new file mode 100644 index 00000000..505ca3f4 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0043-ASoC-wm8994-Fix-AIF2ADC-power-down.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From ffbe8f6bb9d1b143aa8d3e37c4c237219b71544d Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
3 | Date: Tue, 15 May 2012 18:13:00 +0100 | ||
4 | Subject: [PATCH 43/56] ASoC: wm8994: Fix AIF2ADC power down | ||
5 | |||
6 | commit c7f5f2389377b66028bc129890aa653deafe8d39 upstream. | ||
7 | |||
8 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
9 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
10 | --- | ||
11 | sound/soc/codecs/wm8994.c | 2 +- | ||
12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c | ||
15 | index 7806301..3e7aa22 100644 | ||
16 | --- a/sound/soc/codecs/wm8994.c | ||
17 | +++ b/sound/soc/codecs/wm8994.c | ||
18 | @@ -1027,7 +1027,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w, | ||
19 | snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
20 | WM8994_AIF2DACL_ENA | | ||
21 | WM8994_AIF2DACR_ENA, 0); | ||
22 | - snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5, | ||
23 | + snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_4, | ||
24 | WM8994_AIF2ADCL_ENA | | ||
25 | WM8994_AIF2ADCR_ENA, 0); | ||
26 | |||
27 | -- | ||
28 | 1.7.7.6 | ||
29 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch new file mode 100644 index 00000000..080b001e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0044-usbnet-fix-skb-traversing-races-during-unlink-v2.patch | |||
@@ -0,0 +1,222 @@ | |||
1 | From 5dc6e8a33ae9998d96530b6e6778654685d02b86 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Lei <tom.leiming@gmail.com> | ||
3 | Date: Thu, 26 Apr 2012 11:33:46 +0800 | ||
4 | Subject: [PATCH 44/56] usbnet: fix skb traversing races during unlink(v2) | ||
5 | |||
6 | commit 5b6e9bcdeb65634b4ad604eb4536404bbfc62cfa upstream. | ||
7 | |||
8 | Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid | ||
9 | recursive locking in usbnet_stop()) fixes the recursive locking | ||
10 | problem by releasing the skb queue lock before unlink, but may | ||
11 | cause skb traversing races: | ||
12 | - after URB is unlinked and the queue lock is released, | ||
13 | the refered skb and skb->next may be moved to done queue, | ||
14 | even be released | ||
15 | - in skb_queue_walk_safe, the next skb is still obtained | ||
16 | by next pointer of the last skb | ||
17 | - so maybe trigger oops or other problems | ||
18 | |||
19 | This patch extends the usage of entry->state to describe 'start_unlink' | ||
20 | state, so always holding the queue(rx/tx) lock to change the state if | ||
21 | the referd skb is in rx or tx queue because we need to know if the | ||
22 | refered urb has been started unlinking in unlink_urbs. | ||
23 | |||
24 | The other part of this patch is based on Huajun's patch: | ||
25 | always traverse from head of the tx/rx queue to get skb which is | ||
26 | to be unlinked but not been started unlinking. | ||
27 | |||
28 | Signed-off-by: Huajun Li <huajun.li.lee@gmail.com> | ||
29 | Signed-off-by: Ming Lei <tom.leiming@gmail.com> | ||
30 | Cc: Oliver Neukum <oneukum@suse.de> | ||
31 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
32 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
33 | --- | ||
34 | drivers/net/usb/usbnet.c | 54 +++++++++++++++++++++++++++++++------------- | ||
35 | include/linux/usb/usbnet.h | 3 +- | ||
36 | 2 files changed, 40 insertions(+), 17 deletions(-) | ||
37 | |||
38 | diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c | ||
39 | index 750e330..b873b5d 100644 | ||
40 | --- a/drivers/net/usb/usbnet.c | ||
41 | +++ b/drivers/net/usb/usbnet.c | ||
42 | @@ -281,17 +281,32 @@ int usbnet_change_mtu (struct net_device *net, int new_mtu) | ||
43 | } | ||
44 | EXPORT_SYMBOL_GPL(usbnet_change_mtu); | ||
45 | |||
46 | +/* The caller must hold list->lock */ | ||
47 | +static void __usbnet_queue_skb(struct sk_buff_head *list, | ||
48 | + struct sk_buff *newsk, enum skb_state state) | ||
49 | +{ | ||
50 | + struct skb_data *entry = (struct skb_data *) newsk->cb; | ||
51 | + | ||
52 | + __skb_queue_tail(list, newsk); | ||
53 | + entry->state = state; | ||
54 | +} | ||
55 | + | ||
56 | /*-------------------------------------------------------------------------*/ | ||
57 | |||
58 | /* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from | ||
59 | * completion callbacks. 2.5 should have fixed those bugs... | ||
60 | */ | ||
61 | |||
62 | -static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_head *list) | ||
63 | +static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb, | ||
64 | + struct sk_buff_head *list, enum skb_state state) | ||
65 | { | ||
66 | unsigned long flags; | ||
67 | + enum skb_state old_state; | ||
68 | + struct skb_data *entry = (struct skb_data *) skb->cb; | ||
69 | |||
70 | spin_lock_irqsave(&list->lock, flags); | ||
71 | + old_state = entry->state; | ||
72 | + entry->state = state; | ||
73 | __skb_unlink(skb, list); | ||
74 | spin_unlock(&list->lock); | ||
75 | spin_lock(&dev->done.lock); | ||
76 | @@ -299,6 +314,7 @@ static void defer_bh(struct usbnet *dev, struct sk_buff *skb, struct sk_buff_hea | ||
77 | if (dev->done.qlen == 1) | ||
78 | tasklet_schedule(&dev->bh); | ||
79 | spin_unlock_irqrestore(&dev->done.lock, flags); | ||
80 | + return old_state; | ||
81 | } | ||
82 | |||
83 | /* some work can't be done in tasklets, so we use keventd | ||
84 | @@ -339,7 +355,6 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) | ||
85 | entry = (struct skb_data *) skb->cb; | ||
86 | entry->urb = urb; | ||
87 | entry->dev = dev; | ||
88 | - entry->state = rx_start; | ||
89 | entry->length = 0; | ||
90 | |||
91 | usb_fill_bulk_urb (urb, dev->udev, dev->in, | ||
92 | @@ -371,7 +386,7 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) | ||
93 | tasklet_schedule (&dev->bh); | ||
94 | break; | ||
95 | case 0: | ||
96 | - __skb_queue_tail (&dev->rxq, skb); | ||
97 | + __usbnet_queue_skb(&dev->rxq, skb, rx_start); | ||
98 | } | ||
99 | } else { | ||
100 | netif_dbg(dev, ifdown, dev->net, "rx: stopped\n"); | ||
101 | @@ -422,16 +437,17 @@ static void rx_complete (struct urb *urb) | ||
102 | struct skb_data *entry = (struct skb_data *) skb->cb; | ||
103 | struct usbnet *dev = entry->dev; | ||
104 | int urb_status = urb->status; | ||
105 | + enum skb_state state; | ||
106 | |||
107 | skb_put (skb, urb->actual_length); | ||
108 | - entry->state = rx_done; | ||
109 | + state = rx_done; | ||
110 | entry->urb = NULL; | ||
111 | |||
112 | switch (urb_status) { | ||
113 | /* success */ | ||
114 | case 0: | ||
115 | if (skb->len < dev->net->hard_header_len) { | ||
116 | - entry->state = rx_cleanup; | ||
117 | + state = rx_cleanup; | ||
118 | dev->net->stats.rx_errors++; | ||
119 | dev->net->stats.rx_length_errors++; | ||
120 | netif_dbg(dev, rx_err, dev->net, | ||
121 | @@ -470,7 +486,7 @@ static void rx_complete (struct urb *urb) | ||
122 | "rx throttle %d\n", urb_status); | ||
123 | } | ||
124 | block: | ||
125 | - entry->state = rx_cleanup; | ||
126 | + state = rx_cleanup; | ||
127 | entry->urb = urb; | ||
128 | urb = NULL; | ||
129 | break; | ||
130 | @@ -481,17 +497,18 @@ block: | ||
131 | // FALLTHROUGH | ||
132 | |||
133 | default: | ||
134 | - entry->state = rx_cleanup; | ||
135 | + state = rx_cleanup; | ||
136 | dev->net->stats.rx_errors++; | ||
137 | netif_dbg(dev, rx_err, dev->net, "rx status %d\n", urb_status); | ||
138 | break; | ||
139 | } | ||
140 | |||
141 | - defer_bh(dev, skb, &dev->rxq); | ||
142 | + state = defer_bh(dev, skb, &dev->rxq, state); | ||
143 | |||
144 | if (urb) { | ||
145 | if (netif_running (dev->net) && | ||
146 | - !test_bit (EVENT_RX_HALT, &dev->flags)) { | ||
147 | + !test_bit (EVENT_RX_HALT, &dev->flags) && | ||
148 | + state != unlink_start) { | ||
149 | rx_submit (dev, urb, GFP_ATOMIC); | ||
150 | return; | ||
151 | } | ||
152 | @@ -577,16 +594,23 @@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_rxq); | ||
153 | static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q) | ||
154 | { | ||
155 | unsigned long flags; | ||
156 | - struct sk_buff *skb, *skbnext; | ||
157 | + struct sk_buff *skb; | ||
158 | int count = 0; | ||
159 | |||
160 | spin_lock_irqsave (&q->lock, flags); | ||
161 | - skb_queue_walk_safe(q, skb, skbnext) { | ||
162 | + while (!skb_queue_empty(q)) { | ||
163 | struct skb_data *entry; | ||
164 | struct urb *urb; | ||
165 | int retval; | ||
166 | |||
167 | - entry = (struct skb_data *) skb->cb; | ||
168 | + skb_queue_walk(q, skb) { | ||
169 | + entry = (struct skb_data *) skb->cb; | ||
170 | + if (entry->state != unlink_start) | ||
171 | + goto found; | ||
172 | + } | ||
173 | + break; | ||
174 | +found: | ||
175 | + entry->state = unlink_start; | ||
176 | urb = entry->urb; | ||
177 | |||
178 | /* | ||
179 | @@ -1037,8 +1061,7 @@ static void tx_complete (struct urb *urb) | ||
180 | } | ||
181 | |||
182 | usb_autopm_put_interface_async(dev->intf); | ||
183 | - entry->state = tx_done; | ||
184 | - defer_bh(dev, skb, &dev->txq); | ||
185 | + (void) defer_bh(dev, skb, &dev->txq, tx_done); | ||
186 | } | ||
187 | |||
188 | /*-------------------------------------------------------------------------*/ | ||
189 | @@ -1094,7 +1117,6 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, | ||
190 | entry = (struct skb_data *) skb->cb; | ||
191 | entry->urb = urb; | ||
192 | entry->dev = dev; | ||
193 | - entry->state = tx_start; | ||
194 | entry->length = length; | ||
195 | |||
196 | usb_fill_bulk_urb (urb, dev->udev, dev->out, | ||
197 | @@ -1153,7 +1175,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, | ||
198 | break; | ||
199 | case 0: | ||
200 | net->trans_start = jiffies; | ||
201 | - __skb_queue_tail (&dev->txq, skb); | ||
202 | + __usbnet_queue_skb(&dev->txq, skb, tx_start); | ||
203 | if (dev->txq.qlen >= TX_QLEN (dev)) | ||
204 | netif_stop_queue (net); | ||
205 | } | ||
206 | diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h | ||
207 | index 605b0aa..76f4396 100644 | ||
208 | --- a/include/linux/usb/usbnet.h | ||
209 | +++ b/include/linux/usb/usbnet.h | ||
210 | @@ -191,7 +191,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *); | ||
211 | enum skb_state { | ||
212 | illegal = 0, | ||
213 | tx_start, tx_done, | ||
214 | - rx_start, rx_done, rx_cleanup | ||
215 | + rx_start, rx_done, rx_cleanup, | ||
216 | + unlink_start | ||
217 | }; | ||
218 | |||
219 | struct skb_data { /* skb->cb is one of these */ | ||
220 | -- | ||
221 | 1.7.7.6 | ||
222 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch new file mode 100644 index 00000000..2310ee58 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0045-cdc_ether-add-Novatel-USB551L-device-IDs-for-FLAG_WW.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 3a586ee50e3f8a380125a8ce332de9f4c0ef727e Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Williams <dcbw@redhat.com> | ||
3 | Date: Mon, 7 May 2012 04:24:51 +0000 | ||
4 | Subject: [PATCH 45/56] cdc_ether: add Novatel USB551L device IDs for | ||
5 | FLAG_WWAN | ||
6 | |||
7 | commit 4e6304b8420aba5311ba21fd68dab2924ae4d91a upstream. | ||
8 | |||
9 | Needs to be tagged with FLAG_WWAN, which since it has generic | ||
10 | descriptors, won't happen if we don't override the generic | ||
11 | driver info. | ||
12 | |||
13 | Cc: Oliver Neukum <oliver@neukum.org> | ||
14 | Signed-off-by: Dan Williams <dcbw@redhat.com> | ||
15 | Acked-by: Oliver Neukum <oliver@neukum.org> | ||
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | drivers/net/usb/cdc_ether.c | 16 ++++++++++++++++ | ||
20 | 1 files changed, 16 insertions(+), 0 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c | ||
23 | index eac4886..2ba40cf 100644 | ||
24 | --- a/drivers/net/usb/cdc_ether.c | ||
25 | +++ b/drivers/net/usb/cdc_ether.c | ||
26 | @@ -482,6 +482,7 @@ static const struct driver_info wwan_info = { | ||
27 | /*-------------------------------------------------------------------------*/ | ||
28 | |||
29 | #define HUAWEI_VENDOR_ID 0x12D1 | ||
30 | +#define NOVATEL_VENDOR_ID 0x1410 | ||
31 | |||
32 | static const struct usb_device_id products [] = { | ||
33 | /* | ||
34 | @@ -599,6 +600,21 @@ static const struct usb_device_id products [] = { | ||
35 | * because of bugs/quirks in a given product (like Zaurus, above). | ||
36 | */ | ||
37 | { | ||
38 | + /* Novatel USB551L */ | ||
39 | + /* This match must come *before* the generic CDC-ETHER match so that | ||
40 | + * we get FLAG_WWAN set on the device, since it's descriptors are | ||
41 | + * generic CDC-ETHER. | ||
42 | + */ | ||
43 | + .match_flags = USB_DEVICE_ID_MATCH_VENDOR | ||
44 | + | USB_DEVICE_ID_MATCH_PRODUCT | ||
45 | + | USB_DEVICE_ID_MATCH_INT_INFO, | ||
46 | + .idVendor = NOVATEL_VENDOR_ID, | ||
47 | + .idProduct = 0xB001, | ||
48 | + .bInterfaceClass = USB_CLASS_COMM, | ||
49 | + .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, | ||
50 | + .bInterfaceProtocol = USB_CDC_PROTO_NONE, | ||
51 | + .driver_info = (unsigned long)&wwan_info, | ||
52 | +}, { | ||
53 | USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ETHERNET, | ||
54 | USB_CDC_PROTO_NONE), | ||
55 | .driver_info = (unsigned long) &cdc_info, | ||
56 | -- | ||
57 | 1.7.7.6 | ||
58 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch new file mode 100644 index 00000000..59cacc99 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0046-ARM-prevent-VM_GROWSDOWN-mmaps-extending-below-FIRST.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From bb7f36d5a6a8621f37a79996cfbf0f0318862fcd Mon Sep 17 00:00:00 2001 | ||
2 | From: Russell King <rmk+kernel@arm.linux.org.uk> | ||
3 | Date: Wed, 16 May 2012 15:19:20 +0100 | ||
4 | Subject: [PATCH 46/56] ARM: prevent VM_GROWSDOWN mmaps extending below | ||
5 | FIRST_USER_ADDRESS | ||
6 | |||
7 | commit 9b61a4d1b2064dbd0c9e61754305ac852170509f upstream. | ||
8 | |||
9 | Reported-by: Al Viro <viro@zeniv.linux.org.uk> | ||
10 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
11 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
12 | --- | ||
13 | arch/arm/mm/fault.c | 4 +++- | ||
14 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
15 | |||
16 | diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c | ||
17 | index aa33949..4b0bc37 100644 | ||
18 | --- a/arch/arm/mm/fault.c | ||
19 | +++ b/arch/arm/mm/fault.c | ||
20 | @@ -267,7 +267,9 @@ good_area: | ||
21 | return fault; | ||
22 | |||
23 | check_stack: | ||
24 | - if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) | ||
25 | + /* Don't allow expansion below FIRST_USER_ADDRESS */ | ||
26 | + if (vma->vm_flags & VM_GROWSDOWN && | ||
27 | + addr >= FIRST_USER_ADDRESS && !expand_stack(vma, addr)) | ||
28 | goto good_area; | ||
29 | out: | ||
30 | return fault; | ||
31 | -- | ||
32 | 1.7.7.6 | ||
33 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch new file mode 100644 index 00000000..2b95a674 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0047-arch-tile-apply-commit-74fca9da0-to-the-compat-signa.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 4fb637e8e8bd6149d99d92389a104494bb234540 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris Metcalf <cmetcalf@tilera.com> | ||
3 | Date: Wed, 16 May 2012 14:54:20 -0400 | ||
4 | Subject: [PATCH 47/56] arch/tile: apply commit 74fca9da0 to the compat signal | ||
5 | handling as well | ||
6 | |||
7 | commit a134d228298c6aa9007205c6b81cae0cac0acb5d upstream. | ||
8 | |||
9 | This passes siginfo and mcontext to tilegx32 signal handlers that | ||
10 | don't have SA_SIGINFO set just as we have been doing for tilegx64. | ||
11 | |||
12 | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> | ||
13 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
14 | --- | ||
15 | arch/tile/kernel/compat_signal.c | 12 +++++------- | ||
16 | 1 files changed, 5 insertions(+), 7 deletions(-) | ||
17 | |||
18 | diff --git a/arch/tile/kernel/compat_signal.c b/arch/tile/kernel/compat_signal.c | ||
19 | index a7869ad..41459d8 100644 | ||
20 | --- a/arch/tile/kernel/compat_signal.c | ||
21 | +++ b/arch/tile/kernel/compat_signal.c | ||
22 | @@ -406,19 +406,17 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | ||
23 | * Set up registers for signal handler. | ||
24 | * Registers that we don't modify keep the value they had from | ||
25 | * user-space at the time we took the signal. | ||
26 | + * We always pass siginfo and mcontext, regardless of SA_SIGINFO, | ||
27 | + * since some things rely on this (e.g. glibc's debug/segfault.c). | ||
28 | */ | ||
29 | regs->pc = ptr_to_compat_reg(ka->sa.sa_handler); | ||
30 | regs->ex1 = PL_ICS_EX1(USER_PL, 1); /* set crit sec in handler */ | ||
31 | regs->sp = ptr_to_compat_reg(frame); | ||
32 | regs->lr = restorer; | ||
33 | regs->regs[0] = (unsigned long) usig; | ||
34 | - | ||
35 | - if (ka->sa.sa_flags & SA_SIGINFO) { | ||
36 | - /* Need extra arguments, so mark to restore caller-saves. */ | ||
37 | - regs->regs[1] = ptr_to_compat_reg(&frame->info); | ||
38 | - regs->regs[2] = ptr_to_compat_reg(&frame->uc); | ||
39 | - regs->flags |= PT_FLAGS_CALLER_SAVES; | ||
40 | - } | ||
41 | + regs->regs[1] = ptr_to_compat_reg(&frame->info); | ||
42 | + regs->regs[2] = ptr_to_compat_reg(&frame->uc); | ||
43 | + regs->flags |= PT_FLAGS_CALLER_SAVES; | ||
44 | |||
45 | /* | ||
46 | * Notify any tracer that was single-stepping it. | ||
47 | -- | ||
48 | 1.7.7.6 | ||
49 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch new file mode 100644 index 00000000..8daf07a9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0048-MD-Add-del_timer_sync-to-mddev_suspend-fix-nasty-pan.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From efbb3ae65b6bd81ebb5b7487fdfc4d65812b0825 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jonathan Brassow <jbrassow@redhat.com> | ||
3 | Date: Wed, 16 May 2012 04:06:14 -0500 | ||
4 | Subject: [PATCH 48/56] MD: Add del_timer_sync to mddev_suspend (fix nasty | ||
5 | panic) | ||
6 | |||
7 | commit 0d9f4f135eb6dea06bdcb7065b1e4ff78274a5e9 upstream. | ||
8 | |||
9 | Use del_timer_sync to remove timer before mddev_suspend finishes. | ||
10 | |||
11 | We don't want a timer going off after an mddev_suspend is called. This is | ||
12 | especially true with device-mapper, since it can call the destructor function | ||
13 | immediately following a suspend. This results in the removal (kfree) of the | ||
14 | structures upon which the timer depends - resulting in a very ugly panic. | ||
15 | Therefore, we add a del_timer_sync to mddev_suspend to prevent this. | ||
16 | |||
17 | Signed-off-by: NeilBrown <neilb@suse.de> | ||
18 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
19 | --- | ||
20 | drivers/md/md.c | 2 ++ | ||
21 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/md/md.c b/drivers/md/md.c | ||
24 | index 065ab4f..adcd850 100644 | ||
25 | --- a/drivers/md/md.c | ||
26 | +++ b/drivers/md/md.c | ||
27 | @@ -392,6 +392,8 @@ void mddev_suspend(struct mddev *mddev) | ||
28 | synchronize_rcu(); | ||
29 | wait_event(mddev->sb_wait, atomic_read(&mddev->active_io) == 0); | ||
30 | mddev->pers->quiesce(mddev, 1); | ||
31 | + | ||
32 | + del_timer_sync(&mddev->safemode_timer); | ||
33 | } | ||
34 | EXPORT_SYMBOL_GPL(mddev_suspend); | ||
35 | |||
36 | -- | ||
37 | 1.7.7.6 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch new file mode 100644 index 00000000..9422e65f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0049-target-Fix-bug-in-handling-of-FILEIO-block_device-re.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From 08671b3fdc83c369484ee2b4e9bfab6b0a6ee48d Mon Sep 17 00:00:00 2001 | ||
2 | From: Nicholas Bellinger <nab@linux-iscsi.org> | ||
3 | Date: Wed, 16 May 2012 16:05:26 -0700 | ||
4 | Subject: [PATCH 49/56] target: Fix bug in handling of FILEIO + block_device | ||
5 | resize ops | ||
6 | |||
7 | commit cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58 upstream. | ||
8 | |||
9 | This patch fixes a bug in the handling of FILEIO w/ underlying block_device | ||
10 | resize operations where the original fd_dev->fd_dev_size was incorrectly being | ||
11 | used in fd_get_blocks() for READ_CAPACITY response payloads. | ||
12 | |||
13 | This patch avoids using fd_dev->fd_dev_size for FILEIO devices with | ||
14 | an underlying block_device, and instead changes fd_get_blocks() to | ||
15 | get the sector count directly from i_size_read() as recommended by hch. | ||
16 | |||
17 | Reported-by: Christoph Hellwig <hch@lst.de> | ||
18 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
20 | --- | ||
21 | drivers/target/target_core_file.c | 22 ++++++++++++++++------ | ||
22 | 1 files changed, 16 insertions(+), 6 deletions(-) | ||
23 | |||
24 | diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c | ||
25 | index b4864fb..cad8b92 100644 | ||
26 | --- a/drivers/target/target_core_file.c | ||
27 | +++ b/drivers/target/target_core_file.c | ||
28 | @@ -170,6 +170,7 @@ static struct se_device *fd_create_virtdevice( | ||
29 | inode = file->f_mapping->host; | ||
30 | if (S_ISBLK(inode->i_mode)) { | ||
31 | struct request_queue *q; | ||
32 | + unsigned long long dev_size; | ||
33 | /* | ||
34 | * Setup the local scope queue_limits from struct request_queue->limits | ||
35 | * to pass into transport_add_device_to_core_hba() as struct se_dev_limits. | ||
36 | @@ -184,13 +185,12 @@ static struct se_device *fd_create_virtdevice( | ||
37 | * one (1) logical sector from underlying struct block_device | ||
38 | */ | ||
39 | fd_dev->fd_block_size = bdev_logical_block_size(inode->i_bdev); | ||
40 | - fd_dev->fd_dev_size = (i_size_read(file->f_mapping->host) - | ||
41 | + dev_size = (i_size_read(file->f_mapping->host) - | ||
42 | fd_dev->fd_block_size); | ||
43 | |||
44 | pr_debug("FILEIO: Using size: %llu bytes from struct" | ||
45 | " block_device blocks: %llu logical_block_size: %d\n", | ||
46 | - fd_dev->fd_dev_size, | ||
47 | - div_u64(fd_dev->fd_dev_size, fd_dev->fd_block_size), | ||
48 | + dev_size, div_u64(dev_size, fd_dev->fd_block_size), | ||
49 | fd_dev->fd_block_size); | ||
50 | } else { | ||
51 | if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) { | ||
52 | @@ -606,10 +606,20 @@ static u32 fd_get_device_type(struct se_device *dev) | ||
53 | static sector_t fd_get_blocks(struct se_device *dev) | ||
54 | { | ||
55 | struct fd_dev *fd_dev = dev->dev_ptr; | ||
56 | - unsigned long long blocks_long = div_u64(fd_dev->fd_dev_size, | ||
57 | - dev->se_sub_dev->se_dev_attrib.block_size); | ||
58 | + struct file *f = fd_dev->fd_file; | ||
59 | + struct inode *i = f->f_mapping->host; | ||
60 | + unsigned long long dev_size; | ||
61 | + /* | ||
62 | + * When using a file that references an underlying struct block_device, | ||
63 | + * ensure dev_size is always based on the current inode size in order | ||
64 | + * to handle underlying block_device resize operations. | ||
65 | + */ | ||
66 | + if (S_ISBLK(i->i_mode)) | ||
67 | + dev_size = (i_size_read(i) - fd_dev->fd_block_size); | ||
68 | + else | ||
69 | + dev_size = fd_dev->fd_dev_size; | ||
70 | |||
71 | - return blocks_long; | ||
72 | + return div_u64(dev_size, dev->se_sub_dev->se_dev_attrib.block_size); | ||
73 | } | ||
74 | |||
75 | static struct se_subsystem_api fileio_template = { | ||
76 | -- | ||
77 | 1.7.7.6 | ||
78 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch new file mode 100644 index 00000000..1e3a68b3 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0050-tcp-do_tcp_sendpages-must-try-to-push-data-out-on-oo.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From 8c6c5b3fb938b8af747c79cfe8c5cb39db72202a Mon Sep 17 00:00:00 2001 | ||
2 | From: Willy Tarreau <w@1wt.eu> | ||
3 | Date: Thu, 17 May 2012 11:14:14 +0000 | ||
4 | Subject: [PATCH 50/56] tcp: do_tcp_sendpages() must try to push data out on | ||
5 | oom conditions | ||
6 | |||
7 | commit bad115cfe5b509043b684d3a007ab54b80090aa1 upstream. | ||
8 | |||
9 | Since recent changes on TCP splicing (starting with commits 2f533844 | ||
10 | "tcp: allow splice() to build full TSO packets" and 35f9c09f "tcp: | ||
11 | tcp_sendpages() should call tcp_push() once"), I started seeing | ||
12 | massive stalls when forwarding traffic between two sockets using | ||
13 | splice() when pipe buffers were larger than socket buffers. | ||
14 | |||
15 | Latest changes (net: netdev_alloc_skb() use build_skb()) made the | ||
16 | problem even more apparent. | ||
17 | |||
18 | The reason seems to be that if do_tcp_sendpages() fails on out of memory | ||
19 | condition without being able to send at least one byte, tcp_push() is not | ||
20 | called and the buffers cannot be flushed. | ||
21 | |||
22 | After applying the attached patch, I cannot reproduce the stalls at all | ||
23 | and the data rate it perfectly stable and steady under any condition | ||
24 | which previously caused the problem to be permanent. | ||
25 | |||
26 | The issue seems to have been there since before the kernel migrated to | ||
27 | git, which makes me think that the stalls I occasionally experienced | ||
28 | with tux during stress-tests years ago were probably related to the | ||
29 | same issue. | ||
30 | |||
31 | This issue was first encountered on 3.0.31 and 3.2.17, so please backport | ||
32 | to -stable. | ||
33 | |||
34 | Signed-off-by: Willy Tarreau <w@1wt.eu> | ||
35 | Acked-by: Eric Dumazet <edumazet@google.com> | ||
36 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
37 | --- | ||
38 | net/ipv4/tcp.c | 3 +-- | ||
39 | 1 files changed, 1 insertions(+), 2 deletions(-) | ||
40 | |||
41 | diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c | ||
42 | index 8f826b1..11ba922 100644 | ||
43 | --- a/net/ipv4/tcp.c | ||
44 | +++ b/net/ipv4/tcp.c | ||
45 | @@ -851,8 +851,7 @@ new_segment: | ||
46 | wait_for_sndbuf: | ||
47 | set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); | ||
48 | wait_for_memory: | ||
49 | - if (copied) | ||
50 | - tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); | ||
51 | + tcp_push(sk, flags & ~MSG_MORE, mss_now, TCP_NAGLE_PUSH); | ||
52 | |||
53 | if ((err = sk_stream_wait_memory(sk, &timeo)) != 0) | ||
54 | goto do_error; | ||
55 | -- | ||
56 | 1.7.7.6 | ||
57 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch new file mode 100644 index 00000000..1a3cdf4a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0051-e1000-Prevent-reset-task-killing-itself.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 4cad7c8fe708e7795f298240e246cec993a7e74b Mon Sep 17 00:00:00 2001 | ||
2 | From: Tushar Dave <tushar.n.dave@intel.com> | ||
3 | Date: Thu, 17 May 2012 01:04:50 +0000 | ||
4 | Subject: [PATCH 51/56] e1000: Prevent reset task killing itself. | ||
5 | |||
6 | commit 8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 upstream. | ||
7 | |||
8 | Killing reset task while adapter is resetting causes deadlock. | ||
9 | Only kill reset task if adapter is not resetting. | ||
10 | Ref bug #43132 on bugzilla.kernel.org | ||
11 | |||
12 | Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> | ||
13 | Tested-by: Aaron Brown <aaron.f.brown@intel.com> | ||
14 | Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> | ||
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/net/ethernet/intel/e1000/e1000_main.c | 6 +++++- | ||
19 | 1 files changed, 5 insertions(+), 1 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
22 | index cf480b5..de00805 100644 | ||
23 | --- a/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
24 | +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | ||
25 | @@ -494,7 +494,11 @@ out: | ||
26 | static void e1000_down_and_stop(struct e1000_adapter *adapter) | ||
27 | { | ||
28 | set_bit(__E1000_DOWN, &adapter->flags); | ||
29 | - cancel_work_sync(&adapter->reset_task); | ||
30 | + | ||
31 | + /* Only kill reset task if adapter is not resetting */ | ||
32 | + if (!test_bit(__E1000_RESETTING, &adapter->flags)) | ||
33 | + cancel_work_sync(&adapter->reset_task); | ||
34 | + | ||
35 | cancel_delayed_work_sync(&adapter->watchdog_task); | ||
36 | cancel_delayed_work_sync(&adapter->phy_info_task); | ||
37 | cancel_delayed_work_sync(&adapter->fifo_stall_task); | ||
38 | -- | ||
39 | 1.7.7.6 | ||
40 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch new file mode 100644 index 00000000..297eb07e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0052-mtd-map.h-fix-arm-cross-build-failure.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From e3478e0a8885a446eed02cd159394c0ea74ecfd0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
3 | Date: Fri, 30 Dec 2011 18:28:01 +0200 | ||
4 | Subject: [PATCH 52/56] mtd: map.h: fix arm cross-build failure | ||
5 | |||
6 | commit 4a42243886b87cd28a39b192161767c2af851a55 upstream. | ||
7 | |||
8 | This patch fixes the following build failure: | ||
9 | In file included from include/linux/mtd/qinfo.h:4:0, | ||
10 | from include/linux/mtd/pfow.h:7, | ||
11 | from drivers/mtd/lpddr/lpddr_cmds.c:27: | ||
12 | include/linux/mtd/map.h: In function 'inline_map_read': | ||
13 | include/linux/mtd/map.h:409:3: error: implicit declaration of function 'BUILD_BUG_ON' [-Werror=implicit-function-declaration] | ||
14 | |||
15 | Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | ||
16 | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | include/linux/mtd/map.h | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h | ||
23 | index a9e6ba4..daad4e6 100644 | ||
24 | --- a/include/linux/mtd/map.h | ||
25 | +++ b/include/linux/mtd/map.h | ||
26 | @@ -26,7 +26,7 @@ | ||
27 | #include <linux/list.h> | ||
28 | #include <linux/string.h> | ||
29 | #include <linux/bug.h> | ||
30 | - | ||
31 | +#include <linux/kernel.h> | ||
32 | |||
33 | #include <asm/unaligned.h> | ||
34 | #include <asm/system.h> | ||
35 | -- | ||
36 | 1.7.7.6 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch new file mode 100644 index 00000000..5a0b0d70 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0053-stmmac-Fix-compilation-error-in-mmc_core.c.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 19ccd03475be60d00e4ac87f05020c31201ae29d Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Roese <sr@denx.de> | ||
3 | Date: Tue, 10 Jan 2012 01:47:40 +0000 | ||
4 | Subject: [PATCH 53/56] stmmac: Fix compilation error in mmc_core.c | ||
5 | |||
6 | commit 1dd8117e3320fb42ec40ef2ace982871572d34ed upstream. | ||
7 | |||
8 | Fix this error: | ||
9 | |||
10 | CC drivers/net/ethernet/stmicro/stmmac/mmc_core.o | ||
11 | drivers/net/ethernet/stmicro/stmmac/mmc_core.c: In function 'dwmac_mmc_ctrl': | ||
12 | drivers/net/ethernet/stmicro/stmmac/mmc_core.c:143:2: error: implicit | ||
13 | declaration of function 'pr_debug' [-Werror=implicit-function-declaration] | ||
14 | |||
15 | Signed-off-by: Stefan Roese <sr@denx.de> | ||
16 | Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
17 | Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
18 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
19 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
20 | --- | ||
21 | drivers/net/ethernet/stmicro/stmmac/mmc_core.c | 1 + | ||
22 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
23 | |||
24 | diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c | ||
25 | index 41e6b33..c07cfe9 100644 | ||
26 | --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c | ||
27 | +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c | ||
28 | @@ -22,6 +22,7 @@ | ||
29 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
30 | *******************************************************************************/ | ||
31 | |||
32 | +#include <linux/kernel.h> | ||
33 | #include <linux/io.h> | ||
34 | #include "mmc.h" | ||
35 | |||
36 | -- | ||
37 | 1.7.7.6 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch new file mode 100644 index 00000000..3d38f55f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0054-pktgen-fix-crash-at-module-unload.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 0db05d78c77595936a7494aa049850169c49b861 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Wed, 9 May 2012 13:29:51 +0000 | ||
4 | Subject: [PATCH 54/56] pktgen: fix crash at module unload | ||
5 | |||
6 | commit c57b54684060c8aced64a5b78ff69ff289af97b9 upstream. | ||
7 | |||
8 | commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister | ||
9 | the netdevices.) makes pktgen crashing at module unload. | ||
10 | |||
11 | [ 296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267 | ||
12 | [ 296.820719] lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1 | ||
13 | [ 296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254 | ||
14 | [ 296.821079] Call Trace: | ||
15 | [ 296.821211] [<ffffffff8168a715>] spin_dump+0x8a/0x8f | ||
16 | [ 296.821345] [<ffffffff8168a73b>] spin_bug+0x21/0x26 | ||
17 | [ 296.821507] [<ffffffff812b4741>] do_raw_spin_lock+0x131/0x140 | ||
18 | [ 296.821648] [<ffffffff8169188e>] _raw_spin_lock+0x1e/0x20 | ||
19 | [ 296.821786] [<ffffffffa00cc0fd>] __pktgen_NN_threads+0x4d/0x140 [pktgen] | ||
20 | [ 296.821928] [<ffffffffa00ccf8d>] pktgen_device_event+0x10d/0x1e0 [pktgen] | ||
21 | [ 296.822073] [<ffffffff8154ed4f>] unregister_netdevice_notifier+0x7f/0x100 | ||
22 | [ 296.822216] [<ffffffffa00d2a0b>] pg_cleanup+0x48/0x73 [pktgen] | ||
23 | [ 296.822357] [<ffffffff8109528e>] sys_delete_module+0x17e/0x2a0 | ||
24 | [ 296.822502] [<ffffffff81699652>] system_call_fastpath+0x16/0x1b | ||
25 | |||
26 | Hold the pktgen_thread_lock while splicing pktgen_threads, and test | ||
27 | pktgen_exiting in pktgen_device_event() to make unload faster. | ||
28 | |||
29 | Signed-off-by: Eric Dumazet <edumazet@google.com> | ||
30 | Cc: Eric W. Biederman <ebiederm@xmission.com> | ||
31 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
32 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
33 | --- | ||
34 | net/core/pktgen.c | 10 ++++++++-- | ||
35 | 1 files changed, 8 insertions(+), 2 deletions(-) | ||
36 | |||
37 | diff --git a/net/core/pktgen.c b/net/core/pktgen.c | ||
38 | index 0001c24..657e5f9 100644 | ||
39 | --- a/net/core/pktgen.c | ||
40 | +++ b/net/core/pktgen.c | ||
41 | @@ -1932,7 +1932,7 @@ static int pktgen_device_event(struct notifier_block *unused, | ||
42 | { | ||
43 | struct net_device *dev = ptr; | ||
44 | |||
45 | - if (!net_eq(dev_net(dev), &init_net)) | ||
46 | + if (!net_eq(dev_net(dev), &init_net) || pktgen_exiting) | ||
47 | return NOTIFY_DONE; | ||
48 | |||
49 | /* It is OK that we do not hold the group lock right now, | ||
50 | @@ -3758,12 +3758,18 @@ static void __exit pg_cleanup(void) | ||
51 | { | ||
52 | struct pktgen_thread *t; | ||
53 | struct list_head *q, *n; | ||
54 | + struct list_head list; | ||
55 | |||
56 | /* Stop all interfaces & threads */ | ||
57 | pktgen_exiting = true; | ||
58 | |||
59 | - list_for_each_safe(q, n, &pktgen_threads) { | ||
60 | + mutex_lock(&pktgen_thread_lock); | ||
61 | + list_splice(&list, &pktgen_threads); | ||
62 | + mutex_unlock(&pktgen_thread_lock); | ||
63 | + | ||
64 | + list_for_each_safe(q, n, &list) { | ||
65 | t = list_entry(q, struct pktgen_thread, th_list); | ||
66 | + list_del(&t->th_list); | ||
67 | kthread_stop(t->tsk); | ||
68 | kfree(t); | ||
69 | } | ||
70 | -- | ||
71 | 1.7.7.6 | ||
72 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch new file mode 100644 index 00000000..1f86f355 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0055-pktgen-fix-module-unload-for-good.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 20b87e11f8ebb8b1fa74b668770c7f2b301b40b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <edumazet@google.com> | ||
3 | Date: Thu, 17 May 2012 23:52:26 +0000 | ||
4 | Subject: [PATCH 55/56] pktgen: fix module unload for good | ||
5 | |||
6 | commit d4b1133558e0d417342d5d2c49e4c35b428ff20d upstream. | ||
7 | |||
8 | commit c57b5468406 (pktgen: fix crash at module unload) did a very poor | ||
9 | job with list primitives. | ||
10 | |||
11 | 1) list_splice() arguments were in the wrong order | ||
12 | |||
13 | 2) list_splice(list, head) has undefined behavior if head is not | ||
14 | initialized. | ||
15 | |||
16 | 3) We should use the list_splice_init() variant to clear pktgen_threads | ||
17 | list. | ||
18 | |||
19 | Signed-off-by: Eric Dumazet <edumazet@google.com> | ||
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
21 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
22 | --- | ||
23 | net/core/pktgen.c | 4 ++-- | ||
24 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/net/core/pktgen.c b/net/core/pktgen.c | ||
27 | index 657e5f9..df878de 100644 | ||
28 | --- a/net/core/pktgen.c | ||
29 | +++ b/net/core/pktgen.c | ||
30 | @@ -3758,13 +3758,13 @@ static void __exit pg_cleanup(void) | ||
31 | { | ||
32 | struct pktgen_thread *t; | ||
33 | struct list_head *q, *n; | ||
34 | - struct list_head list; | ||
35 | + LIST_HEAD(list); | ||
36 | |||
37 | /* Stop all interfaces & threads */ | ||
38 | pktgen_exiting = true; | ||
39 | |||
40 | mutex_lock(&pktgen_thread_lock); | ||
41 | - list_splice(&list, &pktgen_threads); | ||
42 | + list_splice_init(&pktgen_threads, &list); | ||
43 | mutex_unlock(&pktgen_thread_lock); | ||
44 | |||
45 | list_for_each_safe(q, n, &list) { | ||
46 | -- | ||
47 | 1.7.7.6 | ||
48 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch new file mode 100644 index 00000000..a8809ed1 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0056-Linux-3.2.18.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From c04a2fde6b61eb063267b611c43371e61d0cabc3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Sun, 20 May 2012 22:56:54 +0100 | ||
4 | Subject: [PATCH 56/56] Linux 3.2.18 | ||
5 | |||
6 | --- | ||
7 | Makefile | 2 +- | ||
8 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/Makefile b/Makefile | ||
11 | index 4c4efa3..add68f1 100644 | ||
12 | --- a/Makefile | ||
13 | +++ b/Makefile | ||
14 | @@ -1,6 +1,6 @@ | ||
15 | VERSION = 3 | ||
16 | PATCHLEVEL = 2 | ||
17 | -SUBLEVEL = 17 | ||
18 | +SUBLEVEL = 18 | ||
19 | EXTRAVERSION = | ||
20 | NAME = Saber-toothed Squirrel | ||
21 | |||
22 | -- | ||
23 | 1.7.7.6 | ||
24 | |||