diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9')
73 files changed, 6105 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0001-Security-tomoyo-add-.gitignore-file.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0001-Security-tomoyo-add-.gitignore-file.patch new file mode 100644 index 00000000..aba9a7ce --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0001-Security-tomoyo-add-.gitignore-file.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From ae9aea55d123e1091f239833f832de071ff00f22 Mon Sep 17 00:00:00 2001 | ||
2 | From: Greg Kroah-Hartman <gregkh@suse.de> | ||
3 | Date: Fri, 9 Dec 2011 11:23:46 -0800 | ||
4 | Subject: [PATCH 01/73] Security: tomoyo: add .gitignore file | ||
5 | |||
6 | commit 735e93c70434614bffac4a914ca1da72e37d43c0 upstream. | ||
7 | |||
8 | This adds the .gitignore file for the autogenerated TOMOYO files to keep | ||
9 | git from complaining after building things. | ||
10 | |||
11 | Cc: Kentaro Takeda <takedakn@nttdata.co.jp> | ||
12 | Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | ||
13 | Cc: James Morris <jmorris@namei.org> | ||
14 | Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | ||
15 | Signed-off-by: James Morris <jmorris@namei.org> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | security/tomoyo/.gitignore | 2 ++ | ||
19 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
20 | create mode 100644 security/tomoyo/.gitignore | ||
21 | |||
22 | diff --git a/security/tomoyo/.gitignore b/security/tomoyo/.gitignore | ||
23 | new file mode 100644 | ||
24 | index 0000000..5caf1a6 | ||
25 | --- /dev/null | ||
26 | +++ b/security/tomoyo/.gitignore | ||
27 | @@ -0,0 +1,2 @@ | ||
28 | +builtin-policy.h | ||
29 | +policy/ | ||
30 | -- | ||
31 | 1.7.7.4 | ||
32 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0002-powerpc-perf-power_pmu_start-restores-incorrect-valu.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0002-powerpc-perf-power_pmu_start-restores-incorrect-valu.patch new file mode 100644 index 00000000..653f93c0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0002-powerpc-perf-power_pmu_start-restores-incorrect-valu.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 90f91ae1598200e5f650c5ddb1d7165398cf7f5a Mon Sep 17 00:00:00 2001 | ||
2 | From: Anton Blanchard <anton@samba.org> | ||
3 | Date: Wed, 15 Feb 2012 18:48:22 +0000 | ||
4 | Subject: [PATCH 02/73] powerpc/perf: power_pmu_start restores incorrect | ||
5 | values, breaking frequency events | ||
6 | |||
7 | commit 9a45a9407c69d068500923480884661e2b9cc421 upstream. | ||
8 | |||
9 | perf on POWER stopped working after commit e050e3f0a71b (perf: Fix | ||
10 | broken interrupt rate throttling). That patch exposed a bug in | ||
11 | the POWER perf_events code. | ||
12 | |||
13 | Since the PMCs count upwards and take an exception when the top bit | ||
14 | is set, we want to write 0x80000000 - left in power_pmu_start. We were | ||
15 | instead programming in left which effectively disables the counter | ||
16 | until we eventually hit 0x80000000. This could take seconds or longer. | ||
17 | |||
18 | With the patch applied I get the expected number of samples: | ||
19 | |||
20 | SAMPLE events: 9948 | ||
21 | |||
22 | Signed-off-by: Anton Blanchard <anton@samba.org> | ||
23 | Acked-by: Paul Mackerras <paulus@samba.org> | ||
24 | Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> | ||
25 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
26 | --- | ||
27 | arch/powerpc/kernel/perf_event.c | 8 +++++++- | ||
28 | 1 files changed, 7 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c | ||
31 | index 10a140f..64483fd 100644 | ||
32 | --- a/arch/powerpc/kernel/perf_event.c | ||
33 | +++ b/arch/powerpc/kernel/perf_event.c | ||
34 | @@ -865,6 +865,7 @@ static void power_pmu_start(struct perf_event *event, int ef_flags) | ||
35 | { | ||
36 | unsigned long flags; | ||
37 | s64 left; | ||
38 | + unsigned long val; | ||
39 | |||
40 | if (!event->hw.idx || !event->hw.sample_period) | ||
41 | return; | ||
42 | @@ -880,7 +881,12 @@ static void power_pmu_start(struct perf_event *event, int ef_flags) | ||
43 | |||
44 | event->hw.state = 0; | ||
45 | left = local64_read(&event->hw.period_left); | ||
46 | - write_pmc(event->hw.idx, left); | ||
47 | + | ||
48 | + val = 0; | ||
49 | + if (left < 0x80000000L) | ||
50 | + val = 0x80000000L - left; | ||
51 | + | ||
52 | + write_pmc(event->hw.idx, val); | ||
53 | |||
54 | perf_event_update_userpage(event); | ||
55 | perf_pmu_enable(event->pmu); | ||
56 | -- | ||
57 | 1.7.7.4 | ||
58 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0003-ARM-at91-USB-AT91-gadget-registration-for-module.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0003-ARM-at91-USB-AT91-gadget-registration-for-module.patch new file mode 100644 index 00000000..cafbf0e3 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0003-ARM-at91-USB-AT91-gadget-registration-for-module.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From 4f89dcb180bf8f614410c8fd9cb2ab1d951155b1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nicolas Ferre <nicolas.ferre@atmel.com> | ||
3 | Date: Fri, 27 Jan 2012 11:14:44 +0100 | ||
4 | Subject: [PATCH 03/73] ARM: at91: USB AT91 gadget registration for module | ||
5 | |||
6 | commit e8c9dc93e27d891636defbc269f182a83e6abba8 upstream. | ||
7 | |||
8 | Registration of at91_udc as a module will enable SoC | ||
9 | related code. | ||
10 | |||
11 | Fix following an idea from Karel Znamenacek. | ||
12 | |||
13 | Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> | ||
14 | Acked-by: Karel Znamenacek <karel@ryston.cz> | ||
15 | Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | arch/arm/mach-at91/at91rm9200_devices.c | 2 +- | ||
19 | arch/arm/mach-at91/at91sam9260_devices.c | 2 +- | ||
20 | arch/arm/mach-at91/at91sam9261_devices.c | 2 +- | ||
21 | arch/arm/mach-at91/at91sam9263_devices.c | 2 +- | ||
22 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
23 | |||
24 | diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c | ||
25 | index ad93068..143eebb 100644 | ||
26 | --- a/arch/arm/mach-at91/at91rm9200_devices.c | ||
27 | +++ b/arch/arm/mach-at91/at91rm9200_devices.c | ||
28 | @@ -83,7 +83,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
29 | * USB Device (Gadget) | ||
30 | * -------------------------------------------------------------------- */ | ||
31 | |||
32 | -#ifdef CONFIG_USB_AT91 | ||
33 | +#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) | ||
34 | static struct at91_udc_data udc_data; | ||
35 | |||
36 | static struct resource udc_resources[] = { | ||
37 | diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c | ||
38 | index 629fa97..2590988 100644 | ||
39 | --- a/arch/arm/mach-at91/at91sam9260_devices.c | ||
40 | +++ b/arch/arm/mach-at91/at91sam9260_devices.c | ||
41 | @@ -84,7 +84,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
42 | * USB Device (Gadget) | ||
43 | * -------------------------------------------------------------------- */ | ||
44 | |||
45 | -#ifdef CONFIG_USB_AT91 | ||
46 | +#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) | ||
47 | static struct at91_udc_data udc_data; | ||
48 | |||
49 | static struct resource udc_resources[] = { | ||
50 | diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c | ||
51 | index a178b58..daf3e66 100644 | ||
52 | --- a/arch/arm/mach-at91/at91sam9261_devices.c | ||
53 | +++ b/arch/arm/mach-at91/at91sam9261_devices.c | ||
54 | @@ -87,7 +87,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
55 | * USB Device (Gadget) | ||
56 | * -------------------------------------------------------------------- */ | ||
57 | |||
58 | -#ifdef CONFIG_USB_AT91 | ||
59 | +#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) | ||
60 | static struct at91_udc_data udc_data; | ||
61 | |||
62 | static struct resource udc_resources[] = { | ||
63 | diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c | ||
64 | index d5fbac9..32a7e43 100644 | ||
65 | --- a/arch/arm/mach-at91/at91sam9263_devices.c | ||
66 | +++ b/arch/arm/mach-at91/at91sam9263_devices.c | ||
67 | @@ -92,7 +92,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {} | ||
68 | * USB Device (Gadget) | ||
69 | * -------------------------------------------------------------------- */ | ||
70 | |||
71 | -#ifdef CONFIG_USB_AT91 | ||
72 | +#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE) | ||
73 | static struct at91_udc_data udc_data; | ||
74 | |||
75 | static struct resource udc_resources[] = { | ||
76 | -- | ||
77 | 1.7.7.4 | ||
78 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0004-drm-radeon-kms-fix-MSI-re-arm-on-rv370.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0004-drm-radeon-kms-fix-MSI-re-arm-on-rv370.patch new file mode 100644 index 00000000..05d41bdb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0004-drm-radeon-kms-fix-MSI-re-arm-on-rv370.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 74d54f57ce5ae36b8e74cab2a349edb614f1b5cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Deucher <alexander.deucher@amd.com> | ||
3 | Date: Mon, 13 Feb 2012 16:36:34 -0500 | ||
4 | Subject: [PATCH 04/73] drm/radeon/kms: fix MSI re-arm on rv370+ | ||
5 | |||
6 | commit b7f5b7dec3d539a84734f2bcb7e53fbb1532a40b upstream. | ||
7 | |||
8 | MSI_REARM_EN register is a write only trigger register. | ||
9 | There is no need RMW when re-arming. | ||
10 | |||
11 | May fix: | ||
12 | https://bugs.freedesktop.org/show_bug.cgi?id=41668 | ||
13 | |||
14 | Signed-off-by: Alex Deucher <alexander.deucher@amd.com> | ||
15 | Signed-off-by: Dave Airlie <airlied@redhat.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/gpu/drm/radeon/r100.c | 4 +--- | ||
19 | drivers/gpu/drm/radeon/rs600.c | 4 +--- | ||
20 | 2 files changed, 2 insertions(+), 6 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c | ||
23 | index 31b0d1a..fad7cd1 100644 | ||
24 | --- a/drivers/gpu/drm/radeon/r100.c | ||
25 | +++ b/drivers/gpu/drm/radeon/r100.c | ||
26 | @@ -789,9 +789,7 @@ int r100_irq_process(struct radeon_device *rdev) | ||
27 | WREG32(RADEON_AIC_CNTL, msi_rearm | RS400_MSI_REARM); | ||
28 | break; | ||
29 | default: | ||
30 | - msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN; | ||
31 | - WREG32(RADEON_MSI_REARM_EN, msi_rearm); | ||
32 | - WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN); | ||
33 | + WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN); | ||
34 | break; | ||
35 | } | ||
36 | } | ||
37 | diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c | ||
38 | index c259e21..ee898e9 100644 | ||
39 | --- a/drivers/gpu/drm/radeon/rs600.c | ||
40 | +++ b/drivers/gpu/drm/radeon/rs600.c | ||
41 | @@ -693,9 +693,7 @@ int rs600_irq_process(struct radeon_device *rdev) | ||
42 | WREG32(RADEON_BUS_CNTL, msi_rearm | RS600_MSI_REARM); | ||
43 | break; | ||
44 | default: | ||
45 | - msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN; | ||
46 | - WREG32(RADEON_MSI_REARM_EN, msi_rearm); | ||
47 | - WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN); | ||
48 | + WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN); | ||
49 | break; | ||
50 | } | ||
51 | } | ||
52 | -- | ||
53 | 1.7.7.4 | ||
54 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0005-PCI-workaround-hard-wired-bus-number-V2.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0005-PCI-workaround-hard-wired-bus-number-V2.patch new file mode 100644 index 00000000..188dc1b5 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0005-PCI-workaround-hard-wired-bus-number-V2.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 608951f12d572bd36c95a5629a9c5bb7b6cf244c Mon Sep 17 00:00:00 2001 | ||
2 | From: Yinghai Lu <yinghai.lu@oracle.com> | ||
3 | Date: Mon, 30 Jan 2012 12:25:24 +0100 | ||
4 | Subject: [PATCH 05/73] PCI: workaround hard-wired bus number V2 | ||
5 | |||
6 | commit 71f6bd4a23130cd2f4b036010c5790b1295290b9 upstream. | ||
7 | |||
8 | Fixes PCI device detection on IBM xSeries IBM 3850 M2 / x3950 M2 | ||
9 | when using ACPI resources (_CRS). | ||
10 | This is default, a manual workaround (without this patch) | ||
11 | would be pci=nocrs boot param. | ||
12 | |||
13 | V2: Add dev_warn if the workaround is hit. This should reveal | ||
14 | how common such setups are (via google) and point to possible | ||
15 | problems if things are still not working as expected. | ||
16 | -> Suggested by Jan Beulich. | ||
17 | |||
18 | Tested-by: garyhade@us.ibm.com | ||
19 | Signed-off-by: Yinghai Lu <yinghai.lu@oracle.com> | ||
20 | Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
22 | --- | ||
23 | drivers/pci/probe.c | 5 +++++ | ||
24 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c | ||
27 | index 04e74f4..dfee1b3 100644 | ||
28 | --- a/drivers/pci/probe.c | ||
29 | +++ b/drivers/pci/probe.c | ||
30 | @@ -651,6 +651,11 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | ||
31 | dev_dbg(&dev->dev, "scanning [bus %02x-%02x] behind bridge, pass %d\n", | ||
32 | secondary, subordinate, pass); | ||
33 | |||
34 | + if (!primary && (primary != bus->number) && secondary && subordinate) { | ||
35 | + dev_warn(&dev->dev, "Primary bus is hard wired to 0\n"); | ||
36 | + primary = bus->number; | ||
37 | + } | ||
38 | + | ||
39 | /* Check if setup is sensible at all */ | ||
40 | if (!pass && | ||
41 | (primary != bus->number || secondary <= bus->number)) { | ||
42 | -- | ||
43 | 1.7.7.4 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0006-mac80211-Fix-a-rwlock-bad-magic-bug.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0006-mac80211-Fix-a-rwlock-bad-magic-bug.patch new file mode 100644 index 00000000..71ef771d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0006-mac80211-Fix-a-rwlock-bad-magic-bug.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | From c5ffed9245d22034d5b9d5f910c6217fdb00a469 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | ||
3 | Date: Thu, 9 Feb 2012 19:59:43 +0530 | ||
4 | Subject: [PATCH 06/73] mac80211: Fix a rwlock bad magic bug | ||
5 | |||
6 | commit b57e6b560fc2a2742910ac5ca0eb2c46e45aeac2 upstream. | ||
7 | |||
8 | read_lock(&tpt_trig->trig.leddev_list_lock) is accessed via the path | ||
9 | ieee80211_open (->) ieee80211_do_open (->) ieee80211_mod_tpt_led_trig | ||
10 | (->) ieee80211_start_tpt_led_trig (->) tpt_trig_timer before initializing | ||
11 | it. | ||
12 | the intilization of this read/write lock happens via the path | ||
13 | ieee80211_led_init (->) led_trigger_register, but we are doing | ||
14 | 'ieee80211_led_init' after 'ieeee80211_if_add' where we | ||
15 | register netdev_ops. | ||
16 | so we access leddev_list_lock before initializing it and causes the | ||
17 | following bug in chrome laptops with AR928X cards with the following | ||
18 | script | ||
19 | |||
20 | while true | ||
21 | do | ||
22 | sudo modprobe -v ath9k | ||
23 | sleep 3 | ||
24 | sudo modprobe -r ath9k | ||
25 | sleep 3 | ||
26 | done | ||
27 | |||
28 | BUG: rwlock bad magic on CPU#1, wpa_supplicant/358, f5b9eccc | ||
29 | Pid: 358, comm: wpa_supplicant Not tainted 3.0.13 #1 | ||
30 | Call Trace: | ||
31 | |||
32 | [<8137b9df>] rwlock_bug+0x3d/0x47 | ||
33 | [<81179830>] do_raw_read_lock+0x19/0x29 | ||
34 | [<8137f063>] _raw_read_lock+0xd/0xf | ||
35 | [<f9081957>] tpt_trig_timer+0xc3/0x145 [mac80211] | ||
36 | [<f9081f3a>] ieee80211_mod_tpt_led_trig+0x152/0x174 [mac80211] | ||
37 | [<f9076a3f>] ieee80211_do_open+0x11e/0x42e [mac80211] | ||
38 | [<f9075390>] ? ieee80211_check_concurrent_iface+0x26/0x13c [mac80211] | ||
39 | [<f9076d97>] ieee80211_open+0x48/0x4c [mac80211] | ||
40 | [<812dbed8>] __dev_open+0x82/0xab | ||
41 | [<812dc0c9>] __dev_change_flags+0x9c/0x113 | ||
42 | [<812dc1ae>] dev_change_flags+0x18/0x44 | ||
43 | [<8132144f>] devinet_ioctl+0x243/0x51a | ||
44 | [<81321ba9>] inet_ioctl+0x93/0xac | ||
45 | [<812cc951>] sock_ioctl+0x1c6/0x1ea | ||
46 | [<812cc78b>] ? might_fault+0x20/0x20 | ||
47 | [<810b1ebb>] do_vfs_ioctl+0x46e/0x4a2 | ||
48 | [<810a6ebb>] ? fget_light+0x2f/0x70 | ||
49 | [<812ce549>] ? sys_recvmsg+0x3e/0x48 | ||
50 | [<810b1f35>] sys_ioctl+0x46/0x69 | ||
51 | [<8137fa77>] sysenter_do_call+0x12/0x2 | ||
52 | |||
53 | Cc: Gary Morain <gmorain@google.com> | ||
54 | Cc: Paul Stewart <pstew@google.com> | ||
55 | Cc: Abhijit Pradhan <abhijit@qca.qualcomm.com> | ||
56 | Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | ||
57 | Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> | ||
58 | Acked-by: Johannes Berg <johannes.berg@intel.com> | ||
59 | Tested-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | ||
60 | Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | ||
61 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
62 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
63 | --- | ||
64 | net/mac80211/main.c | 4 ++-- | ||
65 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
66 | |||
67 | diff --git a/net/mac80211/main.c b/net/mac80211/main.c | ||
68 | index a7536fd..7d9b21d 100644 | ||
69 | --- a/net/mac80211/main.c | ||
70 | +++ b/net/mac80211/main.c | ||
71 | @@ -885,6 +885,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | ||
72 | wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", | ||
73 | result); | ||
74 | |||
75 | + ieee80211_led_init(local); | ||
76 | + | ||
77 | rtnl_lock(); | ||
78 | |||
79 | result = ieee80211_init_rate_ctrl_alg(local, | ||
80 | @@ -906,8 +908,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | ||
81 | |||
82 | rtnl_unlock(); | ||
83 | |||
84 | - ieee80211_led_init(local); | ||
85 | - | ||
86 | local->network_latency_notifier.notifier_call = | ||
87 | ieee80211_max_network_latency; | ||
88 | result = pm_qos_add_notifier(PM_QOS_NETWORK_LATENCY, | ||
89 | -- | ||
90 | 1.7.7.4 | ||
91 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0007-ipheth-Add-iPhone-4S.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0007-ipheth-Add-iPhone-4S.patch new file mode 100644 index 00000000..18143ec6 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0007-ipheth-Add-iPhone-4S.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 35c224c3c96801e94357ab4ea7158a5557a04c15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tim Gardner <tim.gardner@canonical.com> | ||
3 | Date: Wed, 15 Feb 2012 07:50:15 +0000 | ||
4 | Subject: [PATCH 07/73] ipheth: Add iPhone 4S | ||
5 | |||
6 | commit 72ba009b8a159e995e40d3b4e5d7d265acead983 upstream. | ||
7 | |||
8 | BugLink: http://bugs.launchpad.net/bugs/900802 | ||
9 | |||
10 | Signed-off-by: Till Kamppeter <till.kamppeter@gmail.com> | ||
11 | Signed-off-by: Tim Gardner <tim.gardner@canonical.com> | ||
12 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
14 | --- | ||
15 | drivers/net/usb/ipheth.c | 5 +++++ | ||
16 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c | ||
19 | index 13c1f04..ad96164 100644 | ||
20 | --- a/drivers/net/usb/ipheth.c | ||
21 | +++ b/drivers/net/usb/ipheth.c | ||
22 | @@ -60,6 +60,7 @@ | ||
23 | #define USB_PRODUCT_IPHONE_3GS 0x1294 | ||
24 | #define USB_PRODUCT_IPHONE_4 0x1297 | ||
25 | #define USB_PRODUCT_IPHONE_4_VZW 0x129c | ||
26 | +#define USB_PRODUCT_IPHONE_4S 0x12a0 | ||
27 | |||
28 | #define IPHETH_USBINTF_CLASS 255 | ||
29 | #define IPHETH_USBINTF_SUBCLASS 253 | ||
30 | @@ -103,6 +104,10 @@ static struct usb_device_id ipheth_table[] = { | ||
31 | USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4_VZW, | ||
32 | IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, | ||
33 | IPHETH_USBINTF_PROTO) }, | ||
34 | + { USB_DEVICE_AND_INTERFACE_INFO( | ||
35 | + USB_VENDOR_APPLE, USB_PRODUCT_IPHONE_4S, | ||
36 | + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, | ||
37 | + IPHETH_USBINTF_PROTO) }, | ||
38 | { } | ||
39 | }; | ||
40 | MODULE_DEVICE_TABLE(usb, ipheth_table); | ||
41 | -- | ||
42 | 1.7.7.4 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0008-regmap-Fix-cache-defaults-initialization-from-raw-ca.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0008-regmap-Fix-cache-defaults-initialization-from-raw-ca.patch new file mode 100644 index 00000000..d9b07d8f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0008-regmap-Fix-cache-defaults-initialization-from-raw-ca.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 2a66303d51a096182e881319aef517e4847de32b Mon Sep 17 00:00:00 2001 | ||
2 | From: Lars-Peter Clausen <lars@metafoo.de> | ||
3 | Date: Wed, 15 Feb 2012 10:23:25 +0100 | ||
4 | Subject: [PATCH 08/73] regmap: Fix cache defaults initialization from raw | ||
5 | cache defaults | ||
6 | |||
7 | commit 61cddc57dc14a5dffa0921d9a24fd68edbb374ac upstream. | ||
8 | |||
9 | Currently registers with a value of 0 are ignored when initializing the register | ||
10 | defaults from raw defaults. This worked in the past, because registers without a | ||
11 | explicit default were assumed to have a default value of 0. This was changed in | ||
12 | commit b03622a8 ("regmap: Ensure rbtree syncs registers set to zero properly"). | ||
13 | As a result registers, which have a raw default value of 0 are now assumed to | ||
14 | have no default. This again can result in unnecessary writes when syncing the | ||
15 | cache. It will also result in unnecessary reads for e.g. the first update | ||
16 | operation. In the case where readback is not possible this will even let the | ||
17 | update operation fail, if the register has not been written to before. | ||
18 | |||
19 | So this patch removes the check. Instead it adds a check to ignore raw defaults | ||
20 | for registers which are volatile, since those registers are not cached. | ||
21 | |||
22 | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> | ||
23 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | --- | ||
26 | drivers/base/regmap/regcache.c | 4 ++-- | ||
27 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c | ||
30 | index 666f6f5..64004b0 100644 | ||
31 | --- a/drivers/base/regmap/regcache.c | ||
32 | +++ b/drivers/base/regmap/regcache.c | ||
33 | @@ -54,7 +54,7 @@ static int regcache_hw_init(struct regmap *map) | ||
34 | for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) { | ||
35 | val = regcache_get_val(map->reg_defaults_raw, | ||
36 | i, map->cache_word_size); | ||
37 | - if (!val) | ||
38 | + if (regmap_volatile(map, i)) | ||
39 | continue; | ||
40 | count++; | ||
41 | } | ||
42 | @@ -69,7 +69,7 @@ static int regcache_hw_init(struct regmap *map) | ||
43 | for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) { | ||
44 | val = regcache_get_val(map->reg_defaults_raw, | ||
45 | i, map->cache_word_size); | ||
46 | - if (!val) | ||
47 | + if (regmap_volatile(map, i)) | ||
48 | continue; | ||
49 | map->reg_defaults[j].reg = i; | ||
50 | map->reg_defaults[j].def = val; | ||
51 | -- | ||
52 | 1.7.7.4 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch new file mode 100644 index 00000000..fc0e8152 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 6b6cd603f9bde174d9cf18060264204587d4a9fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Tyler Hicks <tyhicks@canonical.com> | ||
3 | Date: Tue, 7 Feb 2012 17:55:40 -0600 | ||
4 | Subject: [PATCH 09/73] eCryptfs: Copy up lower inode attrs after setting | ||
5 | lower xattr | ||
6 | |||
7 | commit 545d680938be1e86a6c5250701ce9abaf360c495 upstream. | ||
8 | |||
9 | After passing through a ->setxattr() call, eCryptfs needs to copy the | ||
10 | inode attributes from the lower inode to the eCryptfs inode, as they | ||
11 | may have changed in the lower filesystem's ->setxattr() path. | ||
12 | |||
13 | One example is if an extended attribute containing a POSIX Access | ||
14 | Control List is being set. The new ACL may cause the lower filesystem to | ||
15 | modify the mode of the lower inode and the eCryptfs inode would need to | ||
16 | be updated to reflect the new mode. | ||
17 | |||
18 | https://launchpad.net/bugs/926292 | ||
19 | |||
20 | Signed-off-by: Tyler Hicks <tyhicks@canonical.com> | ||
21 | Reported-by: Sebastien Bacher <seb128@ubuntu.com> | ||
22 | Cc: John Johansen <john.johansen@canonical.com> | ||
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
24 | --- | ||
25 | fs/ecryptfs/inode.c | 2 ++ | ||
26 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
27 | |||
28 | diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c | ||
29 | index d2039ca..af11098 100644 | ||
30 | --- a/fs/ecryptfs/inode.c | ||
31 | +++ b/fs/ecryptfs/inode.c | ||
32 | @@ -1104,6 +1104,8 @@ ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, | ||
33 | } | ||
34 | |||
35 | rc = vfs_setxattr(lower_dentry, name, value, size, flags); | ||
36 | + if (!rc) | ||
37 | + fsstack_copy_attr_all(dentry->d_inode, lower_dentry->d_inode); | ||
38 | out: | ||
39 | return rc; | ||
40 | } | ||
41 | -- | ||
42 | 1.7.7.4 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch new file mode 100644 index 00000000..080ca0d4 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From cadd96ffcc3e4c6db78a08d0ea95fec1ddaecf18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
3 | Date: Fri, 17 Feb 2012 10:29:23 +0100 | ||
4 | Subject: [PATCH 10/73] S390: correct ktime to tod clock comparator conversion | ||
5 | |||
6 | commit cf1eb40f8f5ea12c9e569e7282161fc7f194fd62 upstream. | ||
7 | |||
8 | The conversion of the ktime to a value suitable for the clock comparator | ||
9 | does not take changes to wall_to_monotonic into account. In fact the | ||
10 | conversion just needs the boot clock (sched_clock_base_cc) and the | ||
11 | total_sleep_time. | ||
12 | |||
13 | This is applicable to 3.2+ kernels. | ||
14 | |||
15 | Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | arch/s390/kernel/time.c | 7 +++++-- | ||
19 | 1 files changed, 5 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c | ||
22 | index ebbfab3..e03c555 100644 | ||
23 | --- a/arch/s390/kernel/time.c | ||
24 | +++ b/arch/s390/kernel/time.c | ||
25 | @@ -113,11 +113,14 @@ static void fixup_clock_comparator(unsigned long long delta) | ||
26 | static int s390_next_ktime(ktime_t expires, | ||
27 | struct clock_event_device *evt) | ||
28 | { | ||
29 | + struct timespec ts; | ||
30 | u64 nsecs; | ||
31 | |||
32 | - nsecs = ktime_to_ns(ktime_sub(expires, ktime_get_monotonic_offset())); | ||
33 | + ts.tv_sec = ts.tv_nsec = 0; | ||
34 | + monotonic_to_bootbased(&ts); | ||
35 | + nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires)); | ||
36 | do_div(nsecs, 125); | ||
37 | - S390_lowcore.clock_comparator = TOD_UNIX_EPOCH + (nsecs << 9); | ||
38 | + S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9); | ||
39 | set_clock_comparator(S390_lowcore.clock_comparator); | ||
40 | return 0; | ||
41 | } | ||
42 | -- | ||
43 | 1.7.7.4 | ||
44 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0011-vfs-fix-d_inode_lookup-dentry-ref-leak.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0011-vfs-fix-d_inode_lookup-dentry-ref-leak.patch new file mode 100644 index 00000000..16032350 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0011-vfs-fix-d_inode_lookup-dentry-ref-leak.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 3c40e5e0828215d90ab4374405019cd5d170615b Mon Sep 17 00:00:00 2001 | ||
2 | From: Miklos Szeredi <mszeredi@suse.cz> | ||
3 | Date: Fri, 3 Feb 2012 14:25:18 +0100 | ||
4 | Subject: [PATCH 11/73] vfs: fix d_inode_lookup() dentry ref leak | ||
5 | |||
6 | commit e188dc02d3a9c911be56eca5aa114fe7e9822d53 upstream. | ||
7 | |||
8 | d_inode_lookup() leaks a dentry reference on IS_DEADDIR(). | ||
9 | |||
10 | Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> | ||
11 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
13 | --- | ||
14 | fs/namei.c | 4 +++- | ||
15 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
16 | |||
17 | diff --git a/fs/namei.c b/fs/namei.c | ||
18 | index 5008f01..744e942 100644 | ||
19 | --- a/fs/namei.c | ||
20 | +++ b/fs/namei.c | ||
21 | @@ -1094,8 +1094,10 @@ static struct dentry *d_inode_lookup(struct dentry *parent, struct dentry *dentr | ||
22 | struct dentry *old; | ||
23 | |||
24 | /* Don't create child dentry for a dead directory. */ | ||
25 | - if (unlikely(IS_DEADDIR(inode))) | ||
26 | + if (unlikely(IS_DEADDIR(inode))) { | ||
27 | + dput(dentry); | ||
28 | return ERR_PTR(-ENOENT); | ||
29 | + } | ||
30 | |||
31 | old = inode->i_op->lookup(inode, dentry, nd); | ||
32 | if (unlikely(old)) { | ||
33 | -- | ||
34 | 1.7.7.4 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0012-ARM-7326-2-PL330-fix-null-pointer-dereference-in-pl3.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0012-ARM-7326-2-PL330-fix-null-pointer-dereference-in-pl3.patch new file mode 100644 index 00000000..74fe49b2 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0012-ARM-7326-2-PL330-fix-null-pointer-dereference-in-pl3.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 32818d15fe50ef5465fc635252ca4c2c1bcf1673 Mon Sep 17 00:00:00 2001 | ||
2 | From: Javi Merino <javi.merino@arm.com> | ||
3 | Date: Wed, 15 Feb 2012 17:36:39 +0100 | ||
4 | Subject: [PATCH 12/73] ARM: 7326/2: PL330: fix null pointer dereference in | ||
5 | pl330_chan_ctrl() | ||
6 | |||
7 | commit 46e33c606af8e0caeeca374103189663d877c0d6 upstream. | ||
8 | |||
9 | This fixes the thrd->req_running field being accessed before thrd | ||
10 | is checked for null. The error was introduced in | ||
11 | |||
12 | abb959f: ARM: 7237/1: PL330: Fix driver freeze | ||
13 | |||
14 | Reference: <1326458191-23492-1-git-send-email-mans.rullgard@linaro.org> | ||
15 | |||
16 | Signed-off-by: Mans Rullgard <mans.rullgard@linaro.org> | ||
17 | Acked-by: Javi Merino <javi.merino@arm.com> | ||
18 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
20 | --- | ||
21 | arch/arm/common/pl330.c | 3 ++- | ||
22 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
23 | |||
24 | diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c | ||
25 | index 8d8df74..67abef5 100644 | ||
26 | --- a/arch/arm/common/pl330.c | ||
27 | +++ b/arch/arm/common/pl330.c | ||
28 | @@ -1496,12 +1496,13 @@ int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | ||
29 | struct pl330_thread *thrd = ch_id; | ||
30 | struct pl330_dmac *pl330; | ||
31 | unsigned long flags; | ||
32 | - int ret = 0, active = thrd->req_running; | ||
33 | + int ret = 0, active; | ||
34 | |||
35 | if (!thrd || thrd->free || thrd->dmac->state == DYING) | ||
36 | return -EINVAL; | ||
37 | |||
38 | pl330 = thrd->dmac; | ||
39 | + active = thrd->req_running; | ||
40 | |||
41 | spin_lock_irqsave(&pl330->lock, flags); | ||
42 | |||
43 | -- | ||
44 | 1.7.7.4 | ||
45 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch new file mode 100644 index 00000000..5ffcdc7d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 2a8e5e8a2df18812c60720fa0534c29c9f1c17b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Wed, 22 Feb 2012 17:02:38 +0100 | ||
4 | Subject: [PATCH 13/73] ALSA: hda - Fix redundant jack creations for cx5051 | ||
5 | |||
6 | [Note that since the patch isn't applicable (and unnecessary) to | ||
7 | 3.3-rc, there is no corresponding upstream fix.] | ||
8 | |||
9 | The cx5051 parser calls snd_hda_input_jack_add() in the init callback | ||
10 | to create and initialize the jack detection instances. Since the init | ||
11 | callback is called at each time when the device gets woken up after | ||
12 | suspend or power-saving mode, the duplicated instances are accumulated | ||
13 | at each call. This ends up with the kernel warnings with the too | ||
14 | large array size. | ||
15 | |||
16 | The fix is simply to move the calls of snd_hda_input_jack_add() into | ||
17 | the parser section instead of the init callback. | ||
18 | |||
19 | The fix is needed only up to 3.2 kernel, since the HD-audio jack layer | ||
20 | was redesigned in the 3.3 kernel. | ||
21 | |||
22 | Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
23 | Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
24 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
25 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
26 | --- | ||
27 | sound/pci/hda/patch_conexant.c | 11 ++++++++++- | ||
28 | 1 files changed, 10 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c | ||
31 | index 7072251..08bad5b 100644 | ||
32 | --- a/sound/pci/hda/patch_conexant.c | ||
33 | +++ b/sound/pci/hda/patch_conexant.c | ||
34 | @@ -1899,6 +1899,10 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid, | ||
35 | snd_hda_codec_write(codec, nid, 0, | ||
36 | AC_VERB_SET_UNSOLICITED_ENABLE, | ||
37 | AC_USRSP_EN | event); | ||
38 | +} | ||
39 | + | ||
40 | +static void cxt5051_init_mic_jack(struct hda_codec *codec, hda_nid_t nid) | ||
41 | +{ | ||
42 | snd_hda_input_jack_add(codec, nid, SND_JACK_MICROPHONE, NULL); | ||
43 | snd_hda_input_jack_report(codec, nid); | ||
44 | } | ||
45 | @@ -1916,7 +1920,6 @@ static int cxt5051_init(struct hda_codec *codec) | ||
46 | struct conexant_spec *spec = codec->spec; | ||
47 | |||
48 | conexant_init(codec); | ||
49 | - conexant_init_jacks(codec); | ||
50 | |||
51 | if (spec->auto_mic & AUTO_MIC_PORTB) | ||
52 | cxt5051_init_mic_port(codec, 0x17, CXT5051_PORTB_EVENT); | ||
53 | @@ -2037,6 +2040,12 @@ static int patch_cxt5051(struct hda_codec *codec) | ||
54 | if (spec->beep_amp) | ||
55 | snd_hda_attach_beep_device(codec, spec->beep_amp); | ||
56 | |||
57 | + conexant_init_jacks(codec); | ||
58 | + if (spec->auto_mic & AUTO_MIC_PORTB) | ||
59 | + cxt5051_init_mic_jack(codec, 0x17); | ||
60 | + if (spec->auto_mic & AUTO_MIC_PORTC) | ||
61 | + cxt5051_init_mic_jack(codec, 0x18); | ||
62 | + | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | -- | ||
67 | 1.7.7.4 | ||
68 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0014-mmc-core-check-for-zero-length-ioctl-data.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0014-mmc-core-check-for-zero-length-ioctl-data.patch new file mode 100644 index 00000000..1e0fdb71 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0014-mmc-core-check-for-zero-length-ioctl-data.patch | |||
@@ -0,0 +1,137 @@ | |||
1 | From f3d763847f78da07fb82f6d9e8242875cf6995d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Johan Rudholm <johan.rudholm@stericsson.com> | ||
3 | Date: Wed, 23 Nov 2011 09:05:58 +0100 | ||
4 | Subject: [PATCH 14/73] mmc: core: check for zero length ioctl data | ||
5 | |||
6 | commit 4d6144de8ba263eb3691a737c547e5b2fdc45287 upstream. | ||
7 | |||
8 | If the read or write buffer size associated with the command sent | ||
9 | through the mmc_blk_ioctl is zero, do not prepare data buffer. | ||
10 | |||
11 | This enables a ioctl(2) call to for instance send a MMC_SWITCH to set | ||
12 | a byte in the ext_csd. | ||
13 | |||
14 | Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> | ||
15 | Signed-off-by: Chris Ball <cjb@laptop.org> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/mmc/card/block.c | 82 +++++++++++++++++++++++++--------------------- | ||
19 | 1 files changed, 45 insertions(+), 37 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c | ||
22 | index 1e0e27c..e15e47d 100644 | ||
23 | --- a/drivers/mmc/card/block.c | ||
24 | +++ b/drivers/mmc/card/block.c | ||
25 | @@ -266,6 +266,9 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user( | ||
26 | goto idata_err; | ||
27 | } | ||
28 | |||
29 | + if (!idata->buf_bytes) | ||
30 | + return idata; | ||
31 | + | ||
32 | idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL); | ||
33 | if (!idata->buf) { | ||
34 | err = -ENOMEM; | ||
35 | @@ -312,25 +315,6 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, | ||
36 | if (IS_ERR(idata)) | ||
37 | return PTR_ERR(idata); | ||
38 | |||
39 | - cmd.opcode = idata->ic.opcode; | ||
40 | - cmd.arg = idata->ic.arg; | ||
41 | - cmd.flags = idata->ic.flags; | ||
42 | - | ||
43 | - data.sg = &sg; | ||
44 | - data.sg_len = 1; | ||
45 | - data.blksz = idata->ic.blksz; | ||
46 | - data.blocks = idata->ic.blocks; | ||
47 | - | ||
48 | - sg_init_one(data.sg, idata->buf, idata->buf_bytes); | ||
49 | - | ||
50 | - if (idata->ic.write_flag) | ||
51 | - data.flags = MMC_DATA_WRITE; | ||
52 | - else | ||
53 | - data.flags = MMC_DATA_READ; | ||
54 | - | ||
55 | - mrq.cmd = &cmd; | ||
56 | - mrq.data = &data; | ||
57 | - | ||
58 | md = mmc_blk_get(bdev->bd_disk); | ||
59 | if (!md) { | ||
60 | err = -EINVAL; | ||
61 | @@ -343,6 +327,48 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, | ||
62 | goto cmd_done; | ||
63 | } | ||
64 | |||
65 | + cmd.opcode = idata->ic.opcode; | ||
66 | + cmd.arg = idata->ic.arg; | ||
67 | + cmd.flags = idata->ic.flags; | ||
68 | + | ||
69 | + if (idata->buf_bytes) { | ||
70 | + data.sg = &sg; | ||
71 | + data.sg_len = 1; | ||
72 | + data.blksz = idata->ic.blksz; | ||
73 | + data.blocks = idata->ic.blocks; | ||
74 | + | ||
75 | + sg_init_one(data.sg, idata->buf, idata->buf_bytes); | ||
76 | + | ||
77 | + if (idata->ic.write_flag) | ||
78 | + data.flags = MMC_DATA_WRITE; | ||
79 | + else | ||
80 | + data.flags = MMC_DATA_READ; | ||
81 | + | ||
82 | + /* data.flags must already be set before doing this. */ | ||
83 | + mmc_set_data_timeout(&data, card); | ||
84 | + | ||
85 | + /* Allow overriding the timeout_ns for empirical tuning. */ | ||
86 | + if (idata->ic.data_timeout_ns) | ||
87 | + data.timeout_ns = idata->ic.data_timeout_ns; | ||
88 | + | ||
89 | + if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { | ||
90 | + /* | ||
91 | + * Pretend this is a data transfer and rely on the | ||
92 | + * host driver to compute timeout. When all host | ||
93 | + * drivers support cmd.cmd_timeout for R1B, this | ||
94 | + * can be changed to: | ||
95 | + * | ||
96 | + * mrq.data = NULL; | ||
97 | + * cmd.cmd_timeout = idata->ic.cmd_timeout_ms; | ||
98 | + */ | ||
99 | + data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000; | ||
100 | + } | ||
101 | + | ||
102 | + mrq.data = &data; | ||
103 | + } | ||
104 | + | ||
105 | + mrq.cmd = &cmd; | ||
106 | + | ||
107 | mmc_claim_host(card->host); | ||
108 | |||
109 | if (idata->ic.is_acmd) { | ||
110 | @@ -351,24 +377,6 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, | ||
111 | goto cmd_rel_host; | ||
112 | } | ||
113 | |||
114 | - /* data.flags must already be set before doing this. */ | ||
115 | - mmc_set_data_timeout(&data, card); | ||
116 | - /* Allow overriding the timeout_ns for empirical tuning. */ | ||
117 | - if (idata->ic.data_timeout_ns) | ||
118 | - data.timeout_ns = idata->ic.data_timeout_ns; | ||
119 | - | ||
120 | - if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) { | ||
121 | - /* | ||
122 | - * Pretend this is a data transfer and rely on the host driver | ||
123 | - * to compute timeout. When all host drivers support | ||
124 | - * cmd.cmd_timeout for R1B, this can be changed to: | ||
125 | - * | ||
126 | - * mrq.data = NULL; | ||
127 | - * cmd.cmd_timeout = idata->ic.cmd_timeout_ms; | ||
128 | - */ | ||
129 | - data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000; | ||
130 | - } | ||
131 | - | ||
132 | mmc_wait_for_req(card->host, &mrq); | ||
133 | |||
134 | if (cmd.error) { | ||
135 | -- | ||
136 | 1.7.7.4 | ||
137 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0015-NFSv4-Fix-an-Oops-in-the-NFSv4-getacl-code.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0015-NFSv4-Fix-an-Oops-in-the-NFSv4-getacl-code.patch new file mode 100644 index 00000000..e205000e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0015-NFSv4-Fix-an-Oops-in-the-NFSv4-getacl-code.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From 4a818b4288d5a897b0e928dd0cd1e1e29501159f Mon Sep 17 00:00:00 2001 | ||
2 | From: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
3 | Date: Fri, 3 Feb 2012 18:30:53 -0500 | ||
4 | Subject: [PATCH 15/73] NFSv4: Fix an Oops in the NFSv4 getacl code | ||
5 | |||
6 | commit 331818f1c468a24e581aedcbe52af799366a9dfe upstream. | ||
7 | |||
8 | Commit bf118a342f10dafe44b14451a1392c3254629a1f (NFSv4: include bitmap | ||
9 | in nfsv4 get acl data) introduces the 'acl_scratch' page for the case | ||
10 | where we may need to decode multi-page data. However it fails to take | ||
11 | into account the fact that the variable may be NULL (for the case where | ||
12 | we're not doing multi-page decode), and it also attaches it to the | ||
13 | encoding xdr_stream rather than the decoding one. | ||
14 | |||
15 | The immediate result is an Oops in nfs4_xdr_enc_getacl due to the | ||
16 | call to page_address() with a NULL page pointer. | ||
17 | |||
18 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
19 | Cc: Andy Adamson <andros@netapp.com> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
21 | --- | ||
22 | fs/nfs/nfs4proc.c | 8 ++++---- | ||
23 | fs/nfs/nfs4xdr.c | 5 ++++- | ||
24 | include/linux/nfs_xdr.h | 2 +- | ||
25 | 3 files changed, 9 insertions(+), 6 deletions(-) | ||
26 | |||
27 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | ||
28 | index 055d702..2ee398a 100644 | ||
29 | --- a/fs/nfs/nfs4proc.c | ||
30 | +++ b/fs/nfs/nfs4proc.c | ||
31 | @@ -3568,8 +3568,8 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu | ||
32 | } | ||
33 | if (npages > 1) { | ||
34 | /* for decoding across pages */ | ||
35 | - args.acl_scratch = alloc_page(GFP_KERNEL); | ||
36 | - if (!args.acl_scratch) | ||
37 | + res.acl_scratch = alloc_page(GFP_KERNEL); | ||
38 | + if (!res.acl_scratch) | ||
39 | goto out_free; | ||
40 | } | ||
41 | args.acl_len = npages * PAGE_SIZE; | ||
42 | @@ -3605,8 +3605,8 @@ out_free: | ||
43 | for (i = 0; i < npages; i++) | ||
44 | if (pages[i]) | ||
45 | __free_page(pages[i]); | ||
46 | - if (args.acl_scratch) | ||
47 | - __free_page(args.acl_scratch); | ||
48 | + if (res.acl_scratch) | ||
49 | + __free_page(res.acl_scratch); | ||
50 | return ret; | ||
51 | } | ||
52 | |||
53 | diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c | ||
54 | index dcaf693..68adab4 100644 | ||
55 | --- a/fs/nfs/nfs4xdr.c | ||
56 | +++ b/fs/nfs/nfs4xdr.c | ||
57 | @@ -2522,7 +2522,6 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, | ||
58 | |||
59 | xdr_inline_pages(&req->rq_rcv_buf, replen << 2, | ||
60 | args->acl_pages, args->acl_pgbase, args->acl_len); | ||
61 | - xdr_set_scratch_buffer(xdr, page_address(args->acl_scratch), PAGE_SIZE); | ||
62 | |||
63 | encode_nops(&hdr); | ||
64 | } | ||
65 | @@ -6034,6 +6033,10 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | ||
66 | struct compound_hdr hdr; | ||
67 | int status; | ||
68 | |||
69 | + if (res->acl_scratch != NULL) { | ||
70 | + void *p = page_address(res->acl_scratch); | ||
71 | + xdr_set_scratch_buffer(xdr, p, PAGE_SIZE); | ||
72 | + } | ||
73 | status = decode_compound_hdr(xdr, &hdr); | ||
74 | if (status) | ||
75 | goto out; | ||
76 | diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h | ||
77 | index 6c898af..41116ab 100644 | ||
78 | --- a/include/linux/nfs_xdr.h | ||
79 | +++ b/include/linux/nfs_xdr.h | ||
80 | @@ -602,7 +602,6 @@ struct nfs_getaclargs { | ||
81 | size_t acl_len; | ||
82 | unsigned int acl_pgbase; | ||
83 | struct page ** acl_pages; | ||
84 | - struct page * acl_scratch; | ||
85 | struct nfs4_sequence_args seq_args; | ||
86 | }; | ||
87 | |||
88 | @@ -612,6 +611,7 @@ struct nfs_getaclres { | ||
89 | size_t acl_len; | ||
90 | size_t acl_data_offset; | ||
91 | int acl_flags; | ||
92 | + struct page * acl_scratch; | ||
93 | struct nfs4_sequence_res seq_res; | ||
94 | }; | ||
95 | |||
96 | -- | ||
97 | 1.7.7.4 | ||
98 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0016-NFSv4-Ensure-we-throw-out-bad-delegation-stateids-on.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0016-NFSv4-Ensure-we-throw-out-bad-delegation-stateids-on.patch new file mode 100644 index 00000000..a40f9105 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0016-NFSv4-Ensure-we-throw-out-bad-delegation-stateids-on.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 0cea513e395f2a2d4dd650eeae8a1c08a7425296 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
3 | Date: Thu, 9 Feb 2012 15:31:36 -0500 | ||
4 | Subject: [PATCH 16/73] NFSv4: Ensure we throw out bad delegation stateids on | ||
5 | NFS4ERR_BAD_STATEID | ||
6 | |||
7 | commit b9f9a03150969e4bd9967c20bce67c4de769058f upstream. | ||
8 | |||
9 | To ensure that we don't just reuse the bad delegation when we attempt to | ||
10 | recover the nfs4_state that received the bad stateid error. | ||
11 | |||
12 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
14 | --- | ||
15 | fs/nfs/nfs4state.c | 2 ++ | ||
16 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
17 | |||
18 | diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c | ||
19 | index 6a7107a..a58eed7 100644 | ||
20 | --- a/fs/nfs/nfs4state.c | ||
21 | +++ b/fs/nfs/nfs4state.c | ||
22 | @@ -1071,6 +1071,8 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4 | ||
23 | { | ||
24 | struct nfs_client *clp = server->nfs_client; | ||
25 | |||
26 | + if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags)) | ||
27 | + nfs_async_inode_return_delegation(state->inode, &state->stateid); | ||
28 | nfs4_state_mark_reclaim_nograce(clp, state); | ||
29 | nfs4_schedule_state_manager(clp); | ||
30 | } | ||
31 | -- | ||
32 | 1.7.7.4 | ||
33 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0017-NFSv4-fix-server_scope-memory-leak.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0017-NFSv4-fix-server_scope-memory-leak.patch new file mode 100644 index 00000000..7edf14cd --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0017-NFSv4-fix-server_scope-memory-leak.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 8ed3fe820fe9cf267d39d86cb76e4064cdf82da3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Weston Andros Adamson <dros@netapp.com> | ||
3 | Date: Thu, 16 Feb 2012 11:17:05 -0500 | ||
4 | Subject: [PATCH 17/73] NFSv4: fix server_scope memory leak | ||
5 | |||
6 | commit abe9a6d57b4544ac208401f9c0a4262814db2be4 upstream. | ||
7 | |||
8 | server_scope would never be freed if nfs4_check_cl_exchange_flags() returned | ||
9 | non-zero | ||
10 | |||
11 | Signed-off-by: Weston Andros Adamson <dros@netapp.com> | ||
12 | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
14 | --- | ||
15 | fs/nfs/nfs4proc.c | 15 +++++++++------ | ||
16 | 1 files changed, 9 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c | ||
19 | index 2ee398a..e527030 100644 | ||
20 | --- a/fs/nfs/nfs4proc.c | ||
21 | +++ b/fs/nfs/nfs4proc.c | ||
22 | @@ -4876,8 +4876,10 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) | ||
23 | clp->cl_rpcclient->cl_auth->au_flavor); | ||
24 | |||
25 | res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL); | ||
26 | - if (unlikely(!res.server_scope)) | ||
27 | - return -ENOMEM; | ||
28 | + if (unlikely(!res.server_scope)) { | ||
29 | + status = -ENOMEM; | ||
30 | + goto out; | ||
31 | + } | ||
32 | |||
33 | status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); | ||
34 | if (!status) | ||
35 | @@ -4894,12 +4896,13 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) | ||
36 | clp->server_scope = NULL; | ||
37 | } | ||
38 | |||
39 | - if (!clp->server_scope) | ||
40 | + if (!clp->server_scope) { | ||
41 | clp->server_scope = res.server_scope; | ||
42 | - else | ||
43 | - kfree(res.server_scope); | ||
44 | + goto out; | ||
45 | + } | ||
46 | } | ||
47 | - | ||
48 | + kfree(res.server_scope); | ||
49 | +out: | ||
50 | dprintk("<-- %s status= %d\n", __func__, status); | ||
51 | return status; | ||
52 | } | ||
53 | -- | ||
54 | 1.7.7.4 | ||
55 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0018-ARM-7321-1-cache-v7-Disable-preemption-when-reading-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0018-ARM-7321-1-cache-v7-Disable-preemption-when-reading-.patch new file mode 100644 index 00000000..e8d52aa0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0018-ARM-7321-1-cache-v7-Disable-preemption-when-reading-.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 1bbe8912e024ae0502c208159364de706ad5d999 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stephen Boyd <sboyd@codeaurora.org> | ||
3 | Date: Tue, 7 Feb 2012 19:42:07 +0100 | ||
4 | Subject: [PATCH 18/73] ARM: 7321/1: cache-v7: Disable preemption when reading | ||
5 | CCSIDR | ||
6 | |||
7 | commit b46c0f74657d1fe1c1b0c1452631cc38a9e6987f upstream. | ||
8 | |||
9 | armv7's flush_cache_all() flushes caches via set/way. To | ||
10 | determine the cache attributes (line size, number of sets, | ||
11 | etc.) the assembly first writes the CSSELR register to select a | ||
12 | cache level and then reads the CCSIDR register. The CSSELR register | ||
13 | is banked per-cpu and is used to determine which cache level CCSIDR | ||
14 | reads. If the task is migrated between when the CSSELR is written and | ||
15 | the CCSIDR is read the CCSIDR value may be for an unexpected cache | ||
16 | level (for example L1 instead of L2) and incorrect cache flushing | ||
17 | could occur. | ||
18 | |||
19 | Disable interrupts across the write and read so that the correct | ||
20 | cache attributes are read and used for the cache flushing | ||
21 | routine. We disable interrupts instead of disabling preemption | ||
22 | because the critical section is only 3 instructions and we want | ||
23 | to call v7_dcache_flush_all from __v7_setup which doesn't have a | ||
24 | full kernel stack with a struct thread_info. | ||
25 | |||
26 | This fixes a problem we see in scm_call() when flush_cache_all() | ||
27 | is called from preemptible context and sometimes the L2 cache is | ||
28 | not properly flushed out. | ||
29 | |||
30 | Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> | ||
31 | Acked-by: Catalin Marinas <catalin.marinas@arm.com> | ||
32 | Reviewed-by: Nicolas Pitre <nico@linaro.org> | ||
33 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
34 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
35 | --- | ||
36 | arch/arm/mm/cache-v7.S | 6 ++++++ | ||
37 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
38 | |||
39 | diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S | ||
40 | index 07c4bc8..7a24d39 100644 | ||
41 | --- a/arch/arm/mm/cache-v7.S | ||
42 | +++ b/arch/arm/mm/cache-v7.S | ||
43 | @@ -54,9 +54,15 @@ loop1: | ||
44 | and r1, r1, #7 @ mask of the bits for current cache only | ||
45 | cmp r1, #2 @ see what cache we have at this level | ||
46 | blt skip @ skip if no cache, or just i-cache | ||
47 | +#ifdef CONFIG_PREEMPT | ||
48 | + save_and_disable_irqs r9 @ make cssr&csidr read atomic | ||
49 | +#endif | ||
50 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | ||
51 | isb @ isb to sych the new cssr&csidr | ||
52 | mrc p15, 1, r1, c0, c0, 0 @ read the new csidr | ||
53 | +#ifdef CONFIG_PREEMPT | ||
54 | + restore_irqs_notrace r9 | ||
55 | +#endif | ||
56 | and r2, r1, #7 @ extract the length of the cache lines | ||
57 | add r2, r2, #4 @ add 4 (line length offset) | ||
58 | ldr r4, =0x3ff | ||
59 | -- | ||
60 | 1.7.7.4 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0019-ARM-7325-1-fix-v7-boot-with-lockdep-enabled.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0019-ARM-7325-1-fix-v7-boot-with-lockdep-enabled.patch new file mode 100644 index 00000000..8e5b0fbf --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0019-ARM-7325-1-fix-v7-boot-with-lockdep-enabled.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From ceb484992b356b7f9b499cf56b8ba8da8289aa74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rabin Vincent <rabin@rab.in> | ||
3 | Date: Wed, 15 Feb 2012 16:01:42 +0100 | ||
4 | Subject: [PATCH 19/73] ARM: 7325/1: fix v7 boot with lockdep enabled | ||
5 | |||
6 | commit 8e43a905dd574f54c5715d978318290ceafbe275 upstream. | ||
7 | |||
8 | Bootup with lockdep enabled has been broken on v7 since b46c0f74657d | ||
9 | ("ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR"). | ||
10 | |||
11 | This is because v7_setup (which is called very early during boot) calls | ||
12 | v7_flush_dcache_all, and the save_and_disable_irqs added by that patch | ||
13 | ends up attempting to call into lockdep C code (trace_hardirqs_off()) | ||
14 | when we are in no position to execute it (no stack, MMU off). | ||
15 | |||
16 | Fix this by using a notrace variant of save_and_disable_irqs. The code | ||
17 | already uses the notrace variant of restore_irqs. | ||
18 | |||
19 | Reviewed-by: Nicolas Pitre <nico@linaro.org> | ||
20 | Acked-by: Stephen Boyd <sboyd@codeaurora.org> | ||
21 | Cc: Catalin Marinas <catalin.marinas@arm.com> | ||
22 | Signed-off-by: Rabin Vincent <rabin@rab.in> | ||
23 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | --- | ||
26 | arch/arm/include/asm/assembler.h | 5 +++++ | ||
27 | arch/arm/mm/cache-v7.S | 2 +- | ||
28 | 2 files changed, 6 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h | ||
31 | index 29035e8..7bb8bf9 100644 | ||
32 | --- a/arch/arm/include/asm/assembler.h | ||
33 | +++ b/arch/arm/include/asm/assembler.h | ||
34 | @@ -137,6 +137,11 @@ | ||
35 | disable_irq | ||
36 | .endm | ||
37 | |||
38 | + .macro save_and_disable_irqs_notrace, oldcpsr | ||
39 | + mrs \oldcpsr, cpsr | ||
40 | + disable_irq_notrace | ||
41 | + .endm | ||
42 | + | ||
43 | /* | ||
44 | * Restore interrupt state previously stored in a register. We don't | ||
45 | * guarantee that this will preserve the flags. | ||
46 | diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S | ||
47 | index 7a24d39..a655d3d 100644 | ||
48 | --- a/arch/arm/mm/cache-v7.S | ||
49 | +++ b/arch/arm/mm/cache-v7.S | ||
50 | @@ -55,7 +55,7 @@ loop1: | ||
51 | cmp r1, #2 @ see what cache we have at this level | ||
52 | blt skip @ skip if no cache, or just i-cache | ||
53 | #ifdef CONFIG_PREEMPT | ||
54 | - save_and_disable_irqs r9 @ make cssr&csidr read atomic | ||
55 | + save_and_disable_irqs_notrace r9 @ make cssr&csidr read atomic | ||
56 | #endif | ||
57 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | ||
58 | isb @ isb to sych the new cssr&csidr | ||
59 | -- | ||
60 | 1.7.7.4 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0020-3c59x-shorten-timer-period-for-slave-devices.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0020-3c59x-shorten-timer-period-for-slave-devices.patch new file mode 100644 index 00000000..57ee5c2b --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0020-3c59x-shorten-timer-period-for-slave-devices.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 96dd4ee6793dd443256eda40dd38fa3e84a02c89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Tue, 14 Feb 2012 10:27:09 +0000 | ||
4 | Subject: [PATCH 20/73] 3c59x: shorten timer period for slave devices | ||
5 | |||
6 | [ Upstream commit 3013dc0cceb9baaf25d5624034eeaa259bf99004 ] | ||
7 | |||
8 | Jean Delvare reported bonding on top of 3c59x adapters was not detecting | ||
9 | network cable removal fast enough. | ||
10 | |||
11 | 3c59x indeed uses a 60 seconds timer to check link status if carrier is | ||
12 | on, and 5 seconds if carrier is off. | ||
13 | |||
14 | This patch reduces timer period to 5 seconds if device is a bonding | ||
15 | slave. | ||
16 | |||
17 | Reported-by: Jean Delvare <jdelvare@suse.de> | ||
18 | Acked-by: Jean Delvare <jdelvare@suse.de> | ||
19 | Acked-by: Steffen Klassert <steffen.klassert@secunet.com> | ||
20 | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
21 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
23 | --- | ||
24 | drivers/net/ethernet/3com/3c59x.c | 2 +- | ||
25 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
26 | |||
27 | diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c | ||
28 | index b42c06b..e0c5529 100644 | ||
29 | --- a/drivers/net/ethernet/3com/3c59x.c | ||
30 | +++ b/drivers/net/ethernet/3com/3c59x.c | ||
31 | @@ -1842,7 +1842,7 @@ vortex_timer(unsigned long data) | ||
32 | ok = 1; | ||
33 | } | ||
34 | |||
35 | - if (!netif_carrier_ok(dev)) | ||
36 | + if (dev->flags & IFF_SLAVE || !netif_carrier_ok(dev)) | ||
37 | next_tick = 5*HZ; | ||
38 | |||
39 | if (vp->medialock) | ||
40 | -- | ||
41 | 1.7.7.4 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0021-net-Don-t-proxy-arp-respond-if-iif-rt-dst.dev-if-pri.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0021-net-Don-t-proxy-arp-respond-if-iif-rt-dst.dev-if-pri.patch new file mode 100644 index 00000000..d8f0bd36 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0021-net-Don-t-proxy-arp-respond-if-iif-rt-dst.dev-if-pri.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 1b22d2ddf4f62bc4f600f9b4c5d9d6ad65dcca14 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Graf <tgraf@suug.ch> | ||
3 | Date: Fri, 10 Feb 2012 04:07:11 +0000 | ||
4 | Subject: [PATCH 21/73] net: Don't proxy arp respond if iif == rt->dst.dev if | ||
5 | private VLAN is disabled | ||
6 | |||
7 | [ Upstream commit 70620c46ac2b45c24b0f22002fdf5ddd1f7daf81 ] | ||
8 | |||
9 | Commit 653241 (net: RFC3069, private VLAN proxy arp support) changed | ||
10 | the behavior of arp proxy to send arp replies back out on the interface | ||
11 | the request came in even if the private VLAN feature is disabled. | ||
12 | |||
13 | Previously we checked rt->dst.dev != skb->dev for in scenarios, when | ||
14 | proxy arp is enabled on for the netdevice and also when individual proxy | ||
15 | neighbour entries have been added. | ||
16 | |||
17 | This patch adds the check back for the pneigh_lookup() scenario. | ||
18 | |||
19 | Signed-off-by: Thomas Graf <tgraf@suug.ch> | ||
20 | Acked-by: Jesper Dangaard Brouer <hawk@comx.dk> | ||
21 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
23 | --- | ||
24 | net/ipv4/arp.c | 3 ++- | ||
25 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
26 | |||
27 | diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c | ||
28 | index 96a164a..59a7041 100644 | ||
29 | --- a/net/ipv4/arp.c | ||
30 | +++ b/net/ipv4/arp.c | ||
31 | @@ -867,7 +867,8 @@ static int arp_process(struct sk_buff *skb) | ||
32 | if (addr_type == RTN_UNICAST && | ||
33 | (arp_fwd_proxy(in_dev, dev, rt) || | ||
34 | arp_fwd_pvlan(in_dev, dev, rt, sip, tip) || | ||
35 | - pneigh_lookup(&arp_tbl, net, &tip, dev, 0))) { | ||
36 | + (rt->dst.dev != dev && | ||
37 | + pneigh_lookup(&arp_tbl, net, &tip, dev, 0)))) { | ||
38 | n = neigh_event_ns(&arp_tbl, sha, &sip, dev); | ||
39 | if (n) | ||
40 | neigh_release(n); | ||
41 | -- | ||
42 | 1.7.7.4 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0022-netpoll-netpoll_poll_dev-should-access-dev-flags.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0022-netpoll-netpoll_poll_dev-should-access-dev-flags.patch new file mode 100644 index 00000000..e0047b45 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0022-netpoll-netpoll_poll_dev-should-access-dev-flags.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 39994fb222e62650dc945af466f15f0696f9db7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Tue, 14 Feb 2012 10:11:59 +0000 | ||
4 | Subject: [PATCH 22/73] netpoll: netpoll_poll_dev() should access dev->flags | ||
5 | |||
6 | [ Upstream commit 58e05f357a039a94aa36475f8c110256f693a239 ] | ||
7 | |||
8 | commit 5a698af53f (bond: service netpoll arp queue on master device) | ||
9 | tested IFF_SLAVE flag against dev->priv_flags instead of dev->flags | ||
10 | |||
11 | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
12 | Cc: WANG Cong <amwang@redhat.com> | ||
13 | Acked-by: Neil Horman <nhorman@tuxdriver.com> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | net/core/netpoll.c | 2 +- | ||
18 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/net/core/netpoll.c b/net/core/netpoll.c | ||
21 | index 5d4d896..ab0633f 100644 | ||
22 | --- a/net/core/netpoll.c | ||
23 | +++ b/net/core/netpoll.c | ||
24 | @@ -194,7 +194,7 @@ static void netpoll_poll_dev(struct net_device *dev) | ||
25 | |||
26 | poll_napi(dev); | ||
27 | |||
28 | - if (dev->priv_flags & IFF_SLAVE) { | ||
29 | + if (dev->flags & IFF_SLAVE) { | ||
30 | if (dev->npinfo) { | ||
31 | struct net_device *bond_dev = dev->master; | ||
32 | struct sk_buff *skb; | ||
33 | -- | ||
34 | 1.7.7.4 | ||
35 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0023-net_sched-Bug-in-netem-reordering.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0023-net_sched-Bug-in-netem-reordering.patch new file mode 100644 index 00000000..93a991dc --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0023-net_sched-Bug-in-netem-reordering.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From a1845875b3f78fa493087da218c90d09b0294271 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hagen Paul Pfeifer <hagen@jauu.net> | ||
3 | Date: Wed, 4 Jan 2012 17:35:26 +0000 | ||
4 | Subject: [PATCH 23/73] net_sched: Bug in netem reordering | ||
5 | |||
6 | [ Upstream commit eb10192447370f19a215a8c2749332afa1199d46 ] | ||
7 | |||
8 | Not now, but it looks you are correct. q->qdisc is NULL until another | ||
9 | additional qdisc is attached (beside tfifo). See 50612537e9ab2969312. | ||
10 | The following patch should work. | ||
11 | |||
12 | From: Hagen Paul Pfeifer <hagen@jauu.net> | ||
13 | |||
14 | netem: catch NULL pointer by updating the real qdisc statistic | ||
15 | |||
16 | Reported-by: Vijay Subramanian <subramanian.vijay@gmail.com> | ||
17 | Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> | ||
18 | Acked-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
21 | --- | ||
22 | net/sched/sch_netem.c | 4 ++-- | ||
23 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c | ||
26 | index a4ab207..fd34012 100644 | ||
27 | --- a/net/sched/sch_netem.c | ||
28 | +++ b/net/sched/sch_netem.c | ||
29 | @@ -383,8 +383,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | ||
30 | q->counter = 0; | ||
31 | |||
32 | __skb_queue_head(&q->qdisc->q, skb); | ||
33 | - q->qdisc->qstats.backlog += qdisc_pkt_len(skb); | ||
34 | - q->qdisc->qstats.requeues++; | ||
35 | + sch->qstats.backlog += qdisc_pkt_len(skb); | ||
36 | + sch->qstats.requeues++; | ||
37 | ret = NET_XMIT_SUCCESS; | ||
38 | } | ||
39 | |||
40 | -- | ||
41 | 1.7.7.4 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0024-veth-Enforce-minimum-size-of-VETH_INFO_PEER.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0024-veth-Enforce-minimum-size-of-VETH_INFO_PEER.patch new file mode 100644 index 00000000..dbab8e62 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0024-veth-Enforce-minimum-size-of-VETH_INFO_PEER.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From b21abc775d2095a517f74f6df989569e3131e9c7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hagen Paul Pfeifer <hagen@jauu.net> | ||
3 | Date: Wed, 15 Feb 2012 04:09:46 +0000 | ||
4 | Subject: [PATCH 24/73] veth: Enforce minimum size of VETH_INFO_PEER | ||
5 | |||
6 | [ Upstream commit 237114384ab22c174ec4641e809f8e6cbcfce774 ] | ||
7 | |||
8 | VETH_INFO_PEER carries struct ifinfomsg plus optional IFLA | ||
9 | attributes. A minimal size of sizeof(struct ifinfomsg) must be | ||
10 | enforced or we may risk accessing that struct beyond the limits | ||
11 | of the netlink message. | ||
12 | |||
13 | Signed-off-by: Thomas Graf <tgraf@suug.ch> | ||
14 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | drivers/net/veth.c | 4 +++- | ||
18 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/net/veth.c b/drivers/net/veth.c | ||
21 | index ef883e9..b907398 100644 | ||
22 | --- a/drivers/net/veth.c | ||
23 | +++ b/drivers/net/veth.c | ||
24 | @@ -423,7 +423,9 @@ static void veth_dellink(struct net_device *dev, struct list_head *head) | ||
25 | unregister_netdevice_queue(peer, head); | ||
26 | } | ||
27 | |||
28 | -static const struct nla_policy veth_policy[VETH_INFO_MAX + 1]; | ||
29 | +static const struct nla_policy veth_policy[VETH_INFO_MAX + 1] = { | ||
30 | + [VETH_INFO_PEER] = { .len = sizeof(struct ifinfomsg) }, | ||
31 | +}; | ||
32 | |||
33 | static struct rtnl_link_ops veth_link_ops = { | ||
34 | .kind = DRV_NAME, | ||
35 | -- | ||
36 | 1.7.7.4 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0025-via-velocity-S3-resume-fix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0025-via-velocity-S3-resume-fix.patch new file mode 100644 index 00000000..d486aaf8 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0025-via-velocity-S3-resume-fix.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From d14d408060c6a2d35c115f8bbded2faa41d21de7 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Lv <DavidLv@viatech.com.cn> | ||
3 | Date: Sat, 4 Feb 2012 23:22:26 +0000 | ||
4 | Subject: [PATCH 25/73] via-velocity: S3 resume fix. | ||
5 | |||
6 | [ Upstream commit b530b1930bbd9d005345133f0ff0c556d2a52b19 ] | ||
7 | |||
8 | Initially diagnosed on Ubuntu 11.04 with kernel 2.6.38. | ||
9 | |||
10 | velocity_close is not called during a suspend / resume cycle in this | ||
11 | driver and it has no business playing directly with power states. | ||
12 | |||
13 | Signed-off-by: David Lv <DavidLv@viatech.com.cn> | ||
14 | Acked-by: Francois Romieu <romieu@fr.zoreil.com> | ||
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/net/ethernet/via/via-velocity.c | 3 --- | ||
19 | 1 files changed, 0 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c | ||
22 | index 4535d7c..e015a57 100644 | ||
23 | --- a/drivers/net/ethernet/via/via-velocity.c | ||
24 | +++ b/drivers/net/ethernet/via/via-velocity.c | ||
25 | @@ -2489,9 +2489,6 @@ static int velocity_close(struct net_device *dev) | ||
26 | if (dev->irq != 0) | ||
27 | free_irq(dev->irq, dev); | ||
28 | |||
29 | - /* Power down the chip */ | ||
30 | - pci_set_power_state(vptr->pdev, PCI_D3hot); | ||
31 | - | ||
32 | velocity_free_rings(vptr); | ||
33 | |||
34 | vptr->flags &= (~VELOCITY_FLAGS_OPENED); | ||
35 | -- | ||
36 | 1.7.7.4 | ||
37 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0026-ipv4-reset-flowi-parameters-on-route-connect.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0026-ipv4-reset-flowi-parameters-on-route-connect.patch new file mode 100644 index 00000000..9d576768 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0026-ipv4-reset-flowi-parameters-on-route-connect.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | From f4df037cf3ca933c941a0f87a9c9ec542c88031c Mon Sep 17 00:00:00 2001 | ||
2 | From: Julian Anastasov <ja@ssi.bg> | ||
3 | Date: Sat, 4 Feb 2012 13:04:46 +0000 | ||
4 | Subject: [PATCH 26/73] ipv4: reset flowi parameters on route connect | ||
5 | |||
6 | [ Upstream commit e6b45241c57a83197e5de9166b3b0d32ac562609 ] | ||
7 | |||
8 | Eric Dumazet found that commit 813b3b5db83 | ||
9 | (ipv4: Use caller's on-stack flowi as-is in output | ||
10 | route lookups.) that comes in 3.0 added a regression. | ||
11 | The problem appears to be that resulting flowi4_oif is | ||
12 | used incorrectly as input parameter to some routing lookups. | ||
13 | The result is that when connecting to local port without | ||
14 | listener if the IP address that is used is not on a loopback | ||
15 | interface we incorrectly assign RTN_UNICAST to the output | ||
16 | route because no route is matched by oif=lo. The RST packet | ||
17 | can not be sent immediately by tcp_v4_send_reset because | ||
18 | it expects RTN_LOCAL. | ||
19 | |||
20 | So, change ip_route_connect and ip_route_newports to | ||
21 | update the flowi4 fields that are input parameters because | ||
22 | we do not want unnecessary binding to oif. | ||
23 | |||
24 | To make it clear what are the input parameters that | ||
25 | can be modified during lookup and to show which fields of | ||
26 | floiw4 are reused add a new function to update the flowi4 | ||
27 | structure: flowi4_update_output. | ||
28 | |||
29 | Thanks to Yurij M. Plotnikov for providing a bug report including a | ||
30 | program to reproduce the problem. | ||
31 | |||
32 | Thanks to Eric Dumazet for tracking the problem down to | ||
33 | tcp_v4_send_reset and providing initial fix. | ||
34 | |||
35 | Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru> | ||
36 | Signed-off-by: Julian Anastasov <ja@ssi.bg> | ||
37 | Acked-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
38 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
39 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
40 | --- | ||
41 | include/net/flow.h | 10 ++++++++++ | ||
42 | include/net/route.h | 4 ++++ | ||
43 | 2 files changed, 14 insertions(+), 0 deletions(-) | ||
44 | |||
45 | diff --git a/include/net/flow.h b/include/net/flow.h | ||
46 | index 57f15a7..2a7eefd 100644 | ||
47 | --- a/include/net/flow.h | ||
48 | +++ b/include/net/flow.h | ||
49 | @@ -90,6 +90,16 @@ static inline void flowi4_init_output(struct flowi4 *fl4, int oif, | ||
50 | fl4->fl4_dport = dport; | ||
51 | fl4->fl4_sport = sport; | ||
52 | } | ||
53 | + | ||
54 | +/* Reset some input parameters after previous lookup */ | ||
55 | +static inline void flowi4_update_output(struct flowi4 *fl4, int oif, __u8 tos, | ||
56 | + __be32 daddr, __be32 saddr) | ||
57 | +{ | ||
58 | + fl4->flowi4_oif = oif; | ||
59 | + fl4->flowi4_tos = tos; | ||
60 | + fl4->daddr = daddr; | ||
61 | + fl4->saddr = saddr; | ||
62 | +} | ||
63 | |||
64 | |||
65 | struct flowi6 { | ||
66 | diff --git a/include/net/route.h b/include/net/route.h | ||
67 | index 91855d1..b1c0d5b 100644 | ||
68 | --- a/include/net/route.h | ||
69 | +++ b/include/net/route.h | ||
70 | @@ -270,6 +270,7 @@ static inline struct rtable *ip_route_connect(struct flowi4 *fl4, | ||
71 | if (IS_ERR(rt)) | ||
72 | return rt; | ||
73 | ip_rt_put(rt); | ||
74 | + flowi4_update_output(fl4, oif, tos, fl4->daddr, fl4->saddr); | ||
75 | } | ||
76 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); | ||
77 | return ip_route_output_flow(net, fl4, sk); | ||
78 | @@ -284,6 +285,9 @@ static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable | ||
79 | fl4->fl4_dport = dport; | ||
80 | fl4->fl4_sport = sport; | ||
81 | ip_rt_put(rt); | ||
82 | + flowi4_update_output(fl4, sk->sk_bound_dev_if, | ||
83 | + RT_CONN_FLAGS(sk), fl4->daddr, | ||
84 | + fl4->saddr); | ||
85 | security_sk_classify_flow(sk, flowi4_to_flowi(fl4)); | ||
86 | return ip_route_output_flow(sock_net(sk), fl4, sk); | ||
87 | } | ||
88 | -- | ||
89 | 1.7.7.4 | ||
90 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0027-tcp_v4_send_reset-binding-oif-to-iif-in-no-sock-case.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0027-tcp_v4_send_reset-binding-oif-to-iif-in-no-sock-case.patch new file mode 100644 index 00000000..52ef35eb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0027-tcp_v4_send_reset-binding-oif-to-iif-in-no-sock-case.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 017d762758b89e117b10c21a8490b16e93cf487b Mon Sep 17 00:00:00 2001 | ||
2 | From: Shawn Lu <shawn.lu@ericsson.com> | ||
3 | Date: Sat, 4 Feb 2012 12:38:09 +0000 | ||
4 | Subject: [PATCH 27/73] tcp_v4_send_reset: binding oif to iif in no sock case | ||
5 | |||
6 | [ Upstream commit e2446eaab5585555a38ea0df4e01ff313dbb4ac9 ] | ||
7 | |||
8 | Binding RST packet outgoing interface to incoming interface | ||
9 | for tcp v4 when there is no socket associate with it. | ||
10 | when sk is not NULL, using sk->sk_bound_dev_if instead. | ||
11 | (suggested by Eric Dumazet). | ||
12 | |||
13 | This has few benefits: | ||
14 | 1. tcp_v6_send_reset already did that. | ||
15 | 2. This helps tcp connect with SO_BINDTODEVICE set. When | ||
16 | connection is lost, we still able to sending out RST using | ||
17 | same interface. | ||
18 | 3. we are sending reply, it is most likely to be succeed | ||
19 | if iif is used | ||
20 | |||
21 | Signed-off-by: Shawn Lu <shawn.lu@ericsson.com> | ||
22 | Acked-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
23 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | --- | ||
26 | net/ipv4/tcp_ipv4.c | 5 +++++ | ||
27 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
28 | |||
29 | diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c | ||
30 | index c89e354..eb90aa8 100644 | ||
31 | --- a/net/ipv4/tcp_ipv4.c | ||
32 | +++ b/net/ipv4/tcp_ipv4.c | ||
33 | @@ -650,6 +650,11 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb) | ||
34 | arg.iov[0].iov_len, IPPROTO_TCP, 0); | ||
35 | arg.csumoffset = offsetof(struct tcphdr, check) / 2; | ||
36 | arg.flags = (sk && inet_sk(sk)->transparent) ? IP_REPLY_ARG_NOSRCCHECK : 0; | ||
37 | + /* When socket is gone, all binding information is lost. | ||
38 | + * routing might fail in this case. using iif for oif to | ||
39 | + * make sure we can deliver it | ||
40 | + */ | ||
41 | + arg.bound_dev_if = sk ? sk->sk_bound_dev_if : inet_iif(skb); | ||
42 | |||
43 | net = dev_net(skb_dst(skb)->dev); | ||
44 | arg.tos = ip_hdr(skb)->tos; | ||
45 | -- | ||
46 | 1.7.7.4 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0028-ipv4-Fix-wrong-order-of-ip_rt_get_source-and-update-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0028-ipv4-Fix-wrong-order-of-ip_rt_get_source-and-update-.patch new file mode 100644 index 00000000..a9e0a6a9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0028-ipv4-Fix-wrong-order-of-ip_rt_get_source-and-update-.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 763fe579c154a7bcff5f40788b3b32ada3a1f8db Mon Sep 17 00:00:00 2001 | ||
2 | From: Li Wei <lw@cn.fujitsu.com> | ||
3 | Date: Thu, 9 Feb 2012 21:15:25 +0000 | ||
4 | Subject: [PATCH 28/73] ipv4: Fix wrong order of ip_rt_get_source() and update | ||
5 | iph->daddr. | ||
6 | |||
7 | [ Upstream commit 5dc7883f2a7c25f8df40d7479687153558cd531b ] | ||
8 | |||
9 | This patch fix a bug which introduced by commit ac8a4810 (ipv4: Save | ||
10 | nexthop address of LSRR/SSRR option to IPCB.).In that patch, we saved | ||
11 | the nexthop of SRR in ip_option->nexthop and update iph->daddr until | ||
12 | we get to ip_forward_options(), but we need to update it before | ||
13 | ip_rt_get_source(), otherwise we may get a wrong src. | ||
14 | |||
15 | Signed-off-by: Li Wei <lw@cn.fujitsu.com> | ||
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
18 | --- | ||
19 | net/ipv4/ip_options.c | 2 +- | ||
20 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c | ||
23 | index 1e60f76..42dd1a9 100644 | ||
24 | --- a/net/ipv4/ip_options.c | ||
25 | +++ b/net/ipv4/ip_options.c | ||
26 | @@ -573,8 +573,8 @@ void ip_forward_options(struct sk_buff *skb) | ||
27 | } | ||
28 | if (srrptr + 3 <= srrspace) { | ||
29 | opt->is_changed = 1; | ||
30 | - ip_rt_get_source(&optptr[srrptr-1], skb, rt); | ||
31 | ip_hdr(skb)->daddr = opt->nexthop; | ||
32 | + ip_rt_get_source(&optptr[srrptr-1], skb, rt); | ||
33 | optptr[2] = srrptr+4; | ||
34 | } else if (net_ratelimit()) | ||
35 | printk(KERN_CRIT "ip_forward(): Argh! Destination lost!\n"); | ||
36 | -- | ||
37 | 1.7.7.4 | ||
38 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0029-net-Make-qdisc_skb_cb-upper-size-bound-explicit.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0029-net-Make-qdisc_skb_cb-upper-size-bound-explicit.patch new file mode 100644 index 00000000..651c2a00 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0029-net-Make-qdisc_skb_cb-upper-size-bound-explicit.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | From 79246cb05913bd4262514210136d087c1beb6d3b Mon Sep 17 00:00:00 2001 | ||
2 | From: "David S. Miller" <davem@davemloft.net> | ||
3 | Date: Mon, 6 Feb 2012 15:14:37 -0500 | ||
4 | Subject: [PATCH 29/73] net: Make qdisc_skb_cb upper size bound explicit. | ||
5 | |||
6 | [ Upstream commit 16bda13d90c8d5da243e2cfa1677e62ecce26860 ] | ||
7 | |||
8 | Just like skb->cb[], so that qdisc_skb_cb can be encapsulated inside | ||
9 | of other data structures. | ||
10 | |||
11 | This is intended to be used by IPoIB so that it can remember | ||
12 | addressing information stored at hard_header_ops->create() time that | ||
13 | it can fetch when the packet gets to the transmit routine. | ||
14 | |||
15 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | include/net/sch_generic.h | 9 ++++++++- | ||
19 | net/sched/sch_choke.c | 3 +-- | ||
20 | net/sched/sch_netem.c | 3 +-- | ||
21 | net/sched/sch_sfb.c | 3 +-- | ||
22 | 4 files changed, 11 insertions(+), 7 deletions(-) | ||
23 | |||
24 | diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h | ||
25 | index f6bb08b..55ce96b 100644 | ||
26 | --- a/include/net/sch_generic.h | ||
27 | +++ b/include/net/sch_generic.h | ||
28 | @@ -220,9 +220,16 @@ struct tcf_proto { | ||
29 | |||
30 | struct qdisc_skb_cb { | ||
31 | unsigned int pkt_len; | ||
32 | - long data[]; | ||
33 | + unsigned char data[24]; | ||
34 | }; | ||
35 | |||
36 | +static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) | ||
37 | +{ | ||
38 | + struct qdisc_skb_cb *qcb; | ||
39 | + BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); | ||
40 | + BUILD_BUG_ON(sizeof(qcb->data) < sz); | ||
41 | +} | ||
42 | + | ||
43 | static inline int qdisc_qlen(const struct Qdisc *q) | ||
44 | { | ||
45 | return q->q.qlen; | ||
46 | diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c | ||
47 | index 3422b25..081ffb9 100644 | ||
48 | --- a/net/sched/sch_choke.c | ||
49 | +++ b/net/sched/sch_choke.c | ||
50 | @@ -225,8 +225,7 @@ struct choke_skb_cb { | ||
51 | |||
52 | static inline struct choke_skb_cb *choke_skb_cb(const struct sk_buff *skb) | ||
53 | { | ||
54 | - BUILD_BUG_ON(sizeof(skb->cb) < | ||
55 | - sizeof(struct qdisc_skb_cb) + sizeof(struct choke_skb_cb)); | ||
56 | + qdisc_cb_private_validate(skb, sizeof(struct choke_skb_cb)); | ||
57 | return (struct choke_skb_cb *)qdisc_skb_cb(skb)->data; | ||
58 | } | ||
59 | |||
60 | diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c | ||
61 | index fd34012..7801b15 100644 | ||
62 | --- a/net/sched/sch_netem.c | ||
63 | +++ b/net/sched/sch_netem.c | ||
64 | @@ -118,8 +118,7 @@ struct netem_skb_cb { | ||
65 | |||
66 | static inline struct netem_skb_cb *netem_skb_cb(struct sk_buff *skb) | ||
67 | { | ||
68 | - BUILD_BUG_ON(sizeof(skb->cb) < | ||
69 | - sizeof(struct qdisc_skb_cb) + sizeof(struct netem_skb_cb)); | ||
70 | + qdisc_cb_private_validate(skb, sizeof(struct netem_skb_cb)); | ||
71 | return (struct netem_skb_cb *)qdisc_skb_cb(skb)->data; | ||
72 | } | ||
73 | |||
74 | diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c | ||
75 | index e83c272..17859ea 100644 | ||
76 | --- a/net/sched/sch_sfb.c | ||
77 | +++ b/net/sched/sch_sfb.c | ||
78 | @@ -93,8 +93,7 @@ struct sfb_skb_cb { | ||
79 | |||
80 | static inline struct sfb_skb_cb *sfb_skb_cb(const struct sk_buff *skb) | ||
81 | { | ||
82 | - BUILD_BUG_ON(sizeof(skb->cb) < | ||
83 | - sizeof(struct qdisc_skb_cb) + sizeof(struct sfb_skb_cb)); | ||
84 | + qdisc_cb_private_validate(skb, sizeof(struct sfb_skb_cb)); | ||
85 | return (struct sfb_skb_cb *)qdisc_skb_cb(skb)->data; | ||
86 | } | ||
87 | |||
88 | -- | ||
89 | 1.7.7.4 | ||
90 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0030-IPoIB-Stop-lying-about-hard_header_len-and-use-skb-c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0030-IPoIB-Stop-lying-about-hard_header_len-and-use-skb-c.patch new file mode 100644 index 00000000..8e881016 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0030-IPoIB-Stop-lying-about-hard_header_len-and-use-skb-c.patch | |||
@@ -0,0 +1,213 @@ | |||
1 | From afd87adacb5de00768b2e54f0bd851278f2e6179 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roland Dreier <roland@purestorage.com> | ||
3 | Date: Tue, 7 Feb 2012 14:51:21 +0000 | ||
4 | Subject: [PATCH 30/73] IPoIB: Stop lying about hard_header_len and use | ||
5 | skb->cb to stash LL addresses | ||
6 | |||
7 | [ Upstream commit 936d7de3d736e0737542641269436f4b5968e9ef ] | ||
8 | |||
9 | Commit a0417fa3a18a ("net: Make qdisc_skb_cb upper size bound | ||
10 | explicit.") made it possible for a netdev driver to use skb->cb | ||
11 | between its header_ops.create method and its .ndo_start_xmit | ||
12 | method. Use this in ipoib_hard_header() to stash away the LL address | ||
13 | (GID + QPN), instead of the "ipoib_pseudoheader" hack. This allows | ||
14 | IPoIB to stop lying about its hard_header_len, which will let us fix | ||
15 | the L2 check for GRO. | ||
16 | |||
17 | Signed-off-by: Roland Dreier <roland@purestorage.com> | ||
18 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
20 | --- | ||
21 | drivers/infiniband/ulp/ipoib/ipoib.h | 6 ++- | ||
22 | drivers/infiniband/ulp/ipoib/ipoib_main.c | 55 ++++++++--------------- | ||
23 | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 9 +--- | ||
24 | 3 files changed, 24 insertions(+), 46 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h | ||
27 | index b3cc1e0..86df632 100644 | ||
28 | --- a/drivers/infiniband/ulp/ipoib/ipoib.h | ||
29 | +++ b/drivers/infiniband/ulp/ipoib/ipoib.h | ||
30 | @@ -44,6 +44,7 @@ | ||
31 | #include <linux/mutex.h> | ||
32 | |||
33 | #include <net/neighbour.h> | ||
34 | +#include <net/sch_generic.h> | ||
35 | |||
36 | #include <linux/atomic.h> | ||
37 | |||
38 | @@ -117,8 +118,9 @@ struct ipoib_header { | ||
39 | u16 reserved; | ||
40 | }; | ||
41 | |||
42 | -struct ipoib_pseudoheader { | ||
43 | - u8 hwaddr[INFINIBAND_ALEN]; | ||
44 | +struct ipoib_cb { | ||
45 | + struct qdisc_skb_cb qdisc_cb; | ||
46 | + u8 hwaddr[INFINIBAND_ALEN]; | ||
47 | }; | ||
48 | |||
49 | /* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */ | ||
50 | diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c | ||
51 | index 83695b4..fe2fdbb 100644 | ||
52 | --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c | ||
53 | +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | ||
54 | @@ -658,7 +658,7 @@ static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) | ||
55 | } | ||
56 | |||
57 | static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, | ||
58 | - struct ipoib_pseudoheader *phdr) | ||
59 | + struct ipoib_cb *cb) | ||
60 | { | ||
61 | struct ipoib_dev_priv *priv = netdev_priv(dev); | ||
62 | struct ipoib_path *path; | ||
63 | @@ -666,17 +666,15 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, | ||
64 | |||
65 | spin_lock_irqsave(&priv->lock, flags); | ||
66 | |||
67 | - path = __path_find(dev, phdr->hwaddr + 4); | ||
68 | + path = __path_find(dev, cb->hwaddr + 4); | ||
69 | if (!path || !path->valid) { | ||
70 | int new_path = 0; | ||
71 | |||
72 | if (!path) { | ||
73 | - path = path_rec_create(dev, phdr->hwaddr + 4); | ||
74 | + path = path_rec_create(dev, cb->hwaddr + 4); | ||
75 | new_path = 1; | ||
76 | } | ||
77 | if (path) { | ||
78 | - /* put pseudoheader back on for next time */ | ||
79 | - skb_push(skb, sizeof *phdr); | ||
80 | __skb_queue_tail(&path->queue, skb); | ||
81 | |||
82 | if (!path->query && path_rec_start(dev, path)) { | ||
83 | @@ -700,12 +698,10 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev, | ||
84 | be16_to_cpu(path->pathrec.dlid)); | ||
85 | |||
86 | spin_unlock_irqrestore(&priv->lock, flags); | ||
87 | - ipoib_send(dev, skb, path->ah, IPOIB_QPN(phdr->hwaddr)); | ||
88 | + ipoib_send(dev, skb, path->ah, IPOIB_QPN(cb->hwaddr)); | ||
89 | return; | ||
90 | } else if ((path->query || !path_rec_start(dev, path)) && | ||
91 | skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) { | ||
92 | - /* put pseudoheader back on for next time */ | ||
93 | - skb_push(skb, sizeof *phdr); | ||
94 | __skb_queue_tail(&path->queue, skb); | ||
95 | } else { | ||
96 | ++dev->stats.tx_dropped; | ||
97 | @@ -774,16 +770,14 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
98 | dev_kfree_skb_any(skb); | ||
99 | } | ||
100 | } else { | ||
101 | - struct ipoib_pseudoheader *phdr = | ||
102 | - (struct ipoib_pseudoheader *) skb->data; | ||
103 | - skb_pull(skb, sizeof *phdr); | ||
104 | + struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb; | ||
105 | |||
106 | - if (phdr->hwaddr[4] == 0xff) { | ||
107 | + if (cb->hwaddr[4] == 0xff) { | ||
108 | /* Add in the P_Key for multicast*/ | ||
109 | - phdr->hwaddr[8] = (priv->pkey >> 8) & 0xff; | ||
110 | - phdr->hwaddr[9] = priv->pkey & 0xff; | ||
111 | + cb->hwaddr[8] = (priv->pkey >> 8) & 0xff; | ||
112 | + cb->hwaddr[9] = priv->pkey & 0xff; | ||
113 | |||
114 | - ipoib_mcast_send(dev, phdr->hwaddr + 4, skb); | ||
115 | + ipoib_mcast_send(dev, cb->hwaddr + 4, skb); | ||
116 | } else { | ||
117 | /* unicast GID -- should be ARP or RARP reply */ | ||
118 | |||
119 | @@ -792,14 +786,14 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
120 | ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n", | ||
121 | skb_dst(skb) ? "neigh" : "dst", | ||
122 | be16_to_cpup((__be16 *) skb->data), | ||
123 | - IPOIB_QPN(phdr->hwaddr), | ||
124 | - phdr->hwaddr + 4); | ||
125 | + IPOIB_QPN(cb->hwaddr), | ||
126 | + cb->hwaddr + 4); | ||
127 | dev_kfree_skb_any(skb); | ||
128 | ++dev->stats.tx_dropped; | ||
129 | goto unlock; | ||
130 | } | ||
131 | |||
132 | - unicast_arp_send(skb, dev, phdr); | ||
133 | + unicast_arp_send(skb, dev, cb); | ||
134 | } | ||
135 | } | ||
136 | unlock: | ||
137 | @@ -825,8 +819,6 @@ static int ipoib_hard_header(struct sk_buff *skb, | ||
138 | const void *daddr, const void *saddr, unsigned len) | ||
139 | { | ||
140 | struct ipoib_header *header; | ||
141 | - struct dst_entry *dst; | ||
142 | - struct neighbour *n; | ||
143 | |||
144 | header = (struct ipoib_header *) skb_push(skb, sizeof *header); | ||
145 | |||
146 | @@ -834,18 +826,13 @@ static int ipoib_hard_header(struct sk_buff *skb, | ||
147 | header->reserved = 0; | ||
148 | |||
149 | /* | ||
150 | - * If we don't have a neighbour structure, stuff the | ||
151 | - * destination address onto the front of the skb so we can | ||
152 | - * figure out where to send the packet later. | ||
153 | + * If we don't have a dst_entry structure, stuff the | ||
154 | + * destination address into skb->cb so we can figure out where | ||
155 | + * to send the packet later. | ||
156 | */ | ||
157 | - dst = skb_dst(skb); | ||
158 | - n = NULL; | ||
159 | - if (dst) | ||
160 | - n = dst_get_neighbour_raw(dst); | ||
161 | - if ((!dst || !n) && daddr) { | ||
162 | - struct ipoib_pseudoheader *phdr = | ||
163 | - (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); | ||
164 | - memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN); | ||
165 | + if (!skb_dst(skb)) { | ||
166 | + struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb; | ||
167 | + memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN); | ||
168 | } | ||
169 | |||
170 | return 0; | ||
171 | @@ -1021,11 +1008,7 @@ static void ipoib_setup(struct net_device *dev) | ||
172 | |||
173 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; | ||
174 | |||
175 | - /* | ||
176 | - * We add in INFINIBAND_ALEN to allow for the destination | ||
177 | - * address "pseudoheader" for skbs without neighbour struct. | ||
178 | - */ | ||
179 | - dev->hard_header_len = IPOIB_ENCAP_LEN + INFINIBAND_ALEN; | ||
180 | + dev->hard_header_len = IPOIB_ENCAP_LEN; | ||
181 | dev->addr_len = INFINIBAND_ALEN; | ||
182 | dev->type = ARPHRD_INFINIBAND; | ||
183 | dev->tx_queue_len = ipoib_sendq_size * 2; | ||
184 | diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | ||
185 | index 873bff9..e5069b4 100644 | ||
186 | --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | ||
187 | +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | ||
188 | @@ -262,21 +262,14 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | ||
189 | netif_tx_lock_bh(dev); | ||
190 | while (!skb_queue_empty(&mcast->pkt_queue)) { | ||
191 | struct sk_buff *skb = skb_dequeue(&mcast->pkt_queue); | ||
192 | - struct dst_entry *dst = skb_dst(skb); | ||
193 | - struct neighbour *n = NULL; | ||
194 | |||
195 | netif_tx_unlock_bh(dev); | ||
196 | |||
197 | skb->dev = dev; | ||
198 | - if (dst) | ||
199 | - n = dst_get_neighbour_raw(dst); | ||
200 | - if (!dst || !n) { | ||
201 | - /* put pseudoheader back on for next time */ | ||
202 | - skb_push(skb, sizeof (struct ipoib_pseudoheader)); | ||
203 | - } | ||
204 | |||
205 | if (dev_queue_xmit(skb)) | ||
206 | ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n"); | ||
207 | + | ||
208 | netif_tx_lock_bh(dev); | ||
209 | } | ||
210 | netif_tx_unlock_bh(dev); | ||
211 | -- | ||
212 | 1.7.7.4 | ||
213 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0031-gro-more-generic-L2-header-check.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0031-gro-more-generic-L2-header-check.patch new file mode 100644 index 00000000..7314b141 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0031-gro-more-generic-L2-header-check.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 156f251f74fc547065adc2aef8955f70f3237a71 Mon Sep 17 00:00:00 2001 | ||
2 | From: Eric Dumazet <eric.dumazet@gmail.com> | ||
3 | Date: Wed, 8 Feb 2012 08:51:50 +0000 | ||
4 | Subject: [PATCH 31/73] gro: more generic L2 header check | ||
5 | |||
6 | [ Upstream commit 5ca3b72c5da47d95b83857b768def6172fbc080a ] | ||
7 | |||
8 | Shlomo Pongratz reported GRO L2 header check was suited for Ethernet | ||
9 | only, and failed on IB/ipoib traffic. | ||
10 | |||
11 | He provided a patch faking a zeroed header to let GRO aggregates frames. | ||
12 | |||
13 | Roland Dreier, Herbert Xu, and others suggested we change GRO L2 header | ||
14 | check to be more generic, ie not assuming L2 header is 14 bytes, but | ||
15 | taking into account hard_header_len. | ||
16 | |||
17 | __napi_gro_receive() has special handling for the common case (Ethernet) | ||
18 | to avoid a memcmp() call and use an inline optimized function instead. | ||
19 | |||
20 | Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
21 | Reported-by: Shlomo Pongratz <shlomop@mellanox.com> | ||
22 | Cc: Roland Dreier <roland@kernel.org> | ||
23 | Cc: Or Gerlitz <ogerlitz@mellanox.com> | ||
24 | Cc: Herbert Xu <herbert@gondor.apana.org.au> | ||
25 | Tested-by: Sean Hefty <sean.hefty@intel.com> | ||
26 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
28 | --- | ||
29 | net/core/dev.c | 10 ++++++++-- | ||
30 | 1 files changed, 8 insertions(+), 2 deletions(-) | ||
31 | |||
32 | diff --git a/net/core/dev.c b/net/core/dev.c | ||
33 | index 5a13edf..c56cacf 100644 | ||
34 | --- a/net/core/dev.c | ||
35 | +++ b/net/core/dev.c | ||
36 | @@ -3565,14 +3565,20 @@ static inline gro_result_t | ||
37 | __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) | ||
38 | { | ||
39 | struct sk_buff *p; | ||
40 | + unsigned int maclen = skb->dev->hard_header_len; | ||
41 | |||
42 | for (p = napi->gro_list; p; p = p->next) { | ||
43 | unsigned long diffs; | ||
44 | |||
45 | diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev; | ||
46 | diffs |= p->vlan_tci ^ skb->vlan_tci; | ||
47 | - diffs |= compare_ether_header(skb_mac_header(p), | ||
48 | - skb_gro_mac_header(skb)); | ||
49 | + if (maclen == ETH_HLEN) | ||
50 | + diffs |= compare_ether_header(skb_mac_header(p), | ||
51 | + skb_gro_mac_header(skb)); | ||
52 | + else if (!diffs) | ||
53 | + diffs = memcmp(skb_mac_header(p), | ||
54 | + skb_gro_mac_header(skb), | ||
55 | + maclen); | ||
56 | NAPI_GRO_CB(p)->same_flow = !diffs; | ||
57 | NAPI_GRO_CB(p)->flush = 0; | ||
58 | } | ||
59 | -- | ||
60 | 1.7.7.4 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0032-tcp-allow-tcp_sacktag_one-to-tag-ranges-not-aligned-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0032-tcp-allow-tcp_sacktag_one-to-tag-ranges-not-aligned-.patch new file mode 100644 index 00000000..5e48952a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0032-tcp-allow-tcp_sacktag_one-to-tag-ranges-not-aligned-.patch | |||
@@ -0,0 +1,119 @@ | |||
1 | From aaa9bcd96008a3d7879c3a679625c7ff61b6360b Mon Sep 17 00:00:00 2001 | ||
2 | From: Neal Cardwell <ncardwell@google.com> | ||
3 | Date: Sun, 12 Feb 2012 18:37:09 +0000 | ||
4 | Subject: [PATCH 32/73] tcp: allow tcp_sacktag_one() to tag ranges not aligned | ||
5 | with skbs | ||
6 | |||
7 | [ Upstream commit cc9a672ee522d4805495b98680f4a3db5d0a0af9 ] | ||
8 | |||
9 | This commit allows callers of tcp_sacktag_one() to pass in sequence | ||
10 | ranges that do not align with skb boundaries, as tcp_shifted_skb() | ||
11 | needs to do in an upcoming fix in this patch series. | ||
12 | |||
13 | In fact, now tcp_sacktag_one() does not need to depend on an input skb | ||
14 | at all, which makes its semantics and dependencies more clear. | ||
15 | |||
16 | Signed-off-by: Neal Cardwell <ncardwell@google.com> | ||
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
19 | --- | ||
20 | net/ipv4/tcp_input.c | 36 ++++++++++++++++++++++-------------- | ||
21 | 1 files changed, 22 insertions(+), 14 deletions(-) | ||
22 | |||
23 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
24 | index 52b5c2d..41440f1 100644 | ||
25 | --- a/net/ipv4/tcp_input.c | ||
26 | +++ b/net/ipv4/tcp_input.c | ||
27 | @@ -1310,25 +1310,26 @@ static int tcp_match_skb_to_sack(struct sock *sk, struct sk_buff *skb, | ||
28 | return in_sack; | ||
29 | } | ||
30 | |||
31 | -static u8 tcp_sacktag_one(const struct sk_buff *skb, struct sock *sk, | ||
32 | - struct tcp_sacktag_state *state, | ||
33 | +/* Mark the given newly-SACKed range as such, adjusting counters and hints. */ | ||
34 | +static u8 tcp_sacktag_one(struct sock *sk, | ||
35 | + struct tcp_sacktag_state *state, u8 sacked, | ||
36 | + u32 start_seq, u32 end_seq, | ||
37 | int dup_sack, int pcount) | ||
38 | { | ||
39 | struct tcp_sock *tp = tcp_sk(sk); | ||
40 | - u8 sacked = TCP_SKB_CB(skb)->sacked; | ||
41 | int fack_count = state->fack_count; | ||
42 | |||
43 | /* Account D-SACK for retransmitted packet. */ | ||
44 | if (dup_sack && (sacked & TCPCB_RETRANS)) { | ||
45 | if (tp->undo_marker && tp->undo_retrans && | ||
46 | - after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker)) | ||
47 | + after(end_seq, tp->undo_marker)) | ||
48 | tp->undo_retrans--; | ||
49 | if (sacked & TCPCB_SACKED_ACKED) | ||
50 | state->reord = min(fack_count, state->reord); | ||
51 | } | ||
52 | |||
53 | /* Nothing to do; acked frame is about to be dropped (was ACKed). */ | ||
54 | - if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) | ||
55 | + if (!after(end_seq, tp->snd_una)) | ||
56 | return sacked; | ||
57 | |||
58 | if (!(sacked & TCPCB_SACKED_ACKED)) { | ||
59 | @@ -1347,13 +1348,13 @@ static u8 tcp_sacktag_one(const struct sk_buff *skb, struct sock *sk, | ||
60 | /* New sack for not retransmitted frame, | ||
61 | * which was in hole. It is reordering. | ||
62 | */ | ||
63 | - if (before(TCP_SKB_CB(skb)->seq, | ||
64 | + if (before(start_seq, | ||
65 | tcp_highest_sack_seq(tp))) | ||
66 | state->reord = min(fack_count, | ||
67 | state->reord); | ||
68 | |||
69 | /* SACK enhanced F-RTO (RFC4138; Appendix B) */ | ||
70 | - if (!after(TCP_SKB_CB(skb)->end_seq, tp->frto_highmark)) | ||
71 | + if (!after(end_seq, tp->frto_highmark)) | ||
72 | state->flag |= FLAG_ONLY_ORIG_SACKED; | ||
73 | } | ||
74 | |||
75 | @@ -1371,8 +1372,7 @@ static u8 tcp_sacktag_one(const struct sk_buff *skb, struct sock *sk, | ||
76 | |||
77 | /* Lost marker hint past SACKed? Tweak RFC3517 cnt */ | ||
78 | if (!tcp_is_fack(tp) && (tp->lost_skb_hint != NULL) && | ||
79 | - before(TCP_SKB_CB(skb)->seq, | ||
80 | - TCP_SKB_CB(tp->lost_skb_hint)->seq)) | ||
81 | + before(start_seq, TCP_SKB_CB(tp->lost_skb_hint)->seq)) | ||
82 | tp->lost_cnt_hint += pcount; | ||
83 | |||
84 | if (fack_count > tp->fackets_out) | ||
85 | @@ -1428,7 +1428,11 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | ||
86 | } | ||
87 | |||
88 | /* We discard results */ | ||
89 | - tcp_sacktag_one(skb, sk, state, dup_sack, pcount); | ||
90 | + tcp_sacktag_one(sk, state, | ||
91 | + TCP_SKB_CB(skb)->sacked, | ||
92 | + TCP_SKB_CB(skb)->seq, | ||
93 | + TCP_SKB_CB(skb)->end_seq, | ||
94 | + dup_sack, pcount); | ||
95 | |||
96 | /* Difference in this won't matter, both ACKed by the same cumul. ACK */ | ||
97 | TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); | ||
98 | @@ -1667,10 +1671,14 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk, | ||
99 | break; | ||
100 | |||
101 | if (in_sack) { | ||
102 | - TCP_SKB_CB(skb)->sacked = tcp_sacktag_one(skb, sk, | ||
103 | - state, | ||
104 | - dup_sack, | ||
105 | - tcp_skb_pcount(skb)); | ||
106 | + TCP_SKB_CB(skb)->sacked = | ||
107 | + tcp_sacktag_one(sk, | ||
108 | + state, | ||
109 | + TCP_SKB_CB(skb)->sacked, | ||
110 | + TCP_SKB_CB(skb)->seq, | ||
111 | + TCP_SKB_CB(skb)->end_seq, | ||
112 | + dup_sack, | ||
113 | + tcp_skb_pcount(skb)); | ||
114 | |||
115 | if (!before(TCP_SKB_CB(skb)->seq, | ||
116 | tcp_highest_sack_seq(tp))) | ||
117 | -- | ||
118 | 1.7.7.4 | ||
119 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0033-tcp-fix-range-tcp_shifted_skb-passes-to-tcp_sacktag_.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0033-tcp-fix-range-tcp_shifted_skb-passes-to-tcp_sacktag_.patch new file mode 100644 index 00000000..8793f225 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0033-tcp-fix-range-tcp_shifted_skb-passes-to-tcp_sacktag_.patch | |||
@@ -0,0 +1,77 @@ | |||
1 | From 85a90ef604578b9825d3b7e9d1e3a103357bb668 Mon Sep 17 00:00:00 2001 | ||
2 | From: Neal Cardwell <ncardwell@google.com> | ||
3 | Date: Sun, 12 Feb 2012 18:37:10 +0000 | ||
4 | Subject: [PATCH 33/73] tcp: fix range tcp_shifted_skb() passes to | ||
5 | tcp_sacktag_one() | ||
6 | |||
7 | [ Upstream commit daef52bab1fd26e24e8e9578f8fb33ba1d0cb412 ] | ||
8 | |||
9 | Fix the newly-SACKed range to be the range of newly-shifted bytes. | ||
10 | |||
11 | Previously - since 832d11c5cd076abc0aa1eaf7be96c81d1a59ce41 - | ||
12 | tcp_shifted_skb() incorrectly called tcp_sacktag_one() with the start | ||
13 | and end sequence numbers of the skb it passes in set to the range just | ||
14 | beyond the range that is newly-SACKed. | ||
15 | |||
16 | This commit also removes a special-case adjustment to lost_cnt_hint in | ||
17 | tcp_shifted_skb() since the pre-existing adjustment of lost_cnt_hint | ||
18 | in tcp_sacktag_one() now properly handles this things now that the | ||
19 | correct start sequence number is passed in. | ||
20 | |||
21 | Signed-off-by: Neal Cardwell <ncardwell@google.com> | ||
22 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
23 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
24 | --- | ||
25 | net/ipv4/tcp_input.c | 19 ++++++++++--------- | ||
26 | 1 files changed, 10 insertions(+), 9 deletions(-) | ||
27 | |||
28 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
29 | index 41440f1..b16fbf3 100644 | ||
30 | --- a/net/ipv4/tcp_input.c | ||
31 | +++ b/net/ipv4/tcp_input.c | ||
32 | @@ -1391,6 +1391,9 @@ static u8 tcp_sacktag_one(struct sock *sk, | ||
33 | return sacked; | ||
34 | } | ||
35 | |||
36 | +/* Shift newly-SACKed bytes from this skb to the immediately previous | ||
37 | + * already-SACKed sk_buff. Mark the newly-SACKed bytes as such. | ||
38 | + */ | ||
39 | static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | ||
40 | struct tcp_sacktag_state *state, | ||
41 | unsigned int pcount, int shifted, int mss, | ||
42 | @@ -1398,12 +1401,11 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | ||
43 | { | ||
44 | struct tcp_sock *tp = tcp_sk(sk); | ||
45 | struct sk_buff *prev = tcp_write_queue_prev(sk, skb); | ||
46 | + u32 start_seq = TCP_SKB_CB(skb)->seq; /* start of newly-SACKed */ | ||
47 | + u32 end_seq = start_seq + shifted; /* end of newly-SACKed */ | ||
48 | |||
49 | BUG_ON(!pcount); | ||
50 | |||
51 | - if (skb == tp->lost_skb_hint) | ||
52 | - tp->lost_cnt_hint += pcount; | ||
53 | - | ||
54 | TCP_SKB_CB(prev)->end_seq += shifted; | ||
55 | TCP_SKB_CB(skb)->seq += shifted; | ||
56 | |||
57 | @@ -1427,12 +1429,11 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | ||
58 | skb_shinfo(skb)->gso_type = 0; | ||
59 | } | ||
60 | |||
61 | - /* We discard results */ | ||
62 | - tcp_sacktag_one(sk, state, | ||
63 | - TCP_SKB_CB(skb)->sacked, | ||
64 | - TCP_SKB_CB(skb)->seq, | ||
65 | - TCP_SKB_CB(skb)->end_seq, | ||
66 | - dup_sack, pcount); | ||
67 | + /* Adjust counters and hints for the newly sacked sequence range but | ||
68 | + * discard the return value since prev is already marked. | ||
69 | + */ | ||
70 | + tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked, | ||
71 | + start_seq, end_seq, dup_sack, pcount); | ||
72 | |||
73 | /* Difference in this won't matter, both ACKed by the same cumul. ACK */ | ||
74 | TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS); | ||
75 | -- | ||
76 | 1.7.7.4 | ||
77 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0034-tcp-fix-tcp_shifted_skb-adjustment-of-lost_cnt_hint-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0034-tcp-fix-tcp_shifted_skb-adjustment-of-lost_cnt_hint-.patch new file mode 100644 index 00000000..12a891cb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0034-tcp-fix-tcp_shifted_skb-adjustment-of-lost_cnt_hint-.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From c90fa02e73e931f959428385077213180f5c69eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Neal Cardwell <ncardwell@google.com> | ||
3 | Date: Mon, 13 Feb 2012 20:22:08 +0000 | ||
4 | Subject: [PATCH 34/73] tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint | ||
5 | for FACK | ||
6 | |||
7 | [ Upstream commit 0af2a0d0576205dda778d25c6c344fc6508fc81d ] | ||
8 | |||
9 | This commit ensures that lost_cnt_hint is correctly updated in | ||
10 | tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment | ||
11 | in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders | ||
12 | need their own adjustment. | ||
13 | |||
14 | This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f - | ||
15 | except now that the sequence range passed into tcp_sacktag_one() is | ||
16 | correct we need only have a special case adjustment for FACK. | ||
17 | |||
18 | Signed-off-by: Neal Cardwell <ncardwell@google.com> | ||
19 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
21 | --- | ||
22 | net/ipv4/tcp_input.c | 4 ++++ | ||
23 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
24 | |||
25 | diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c | ||
26 | index b16fbf3..53113b9 100644 | ||
27 | --- a/net/ipv4/tcp_input.c | ||
28 | +++ b/net/ipv4/tcp_input.c | ||
29 | @@ -1406,6 +1406,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | ||
30 | |||
31 | BUG_ON(!pcount); | ||
32 | |||
33 | + /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ | ||
34 | + if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) | ||
35 | + tp->lost_cnt_hint += pcount; | ||
36 | + | ||
37 | TCP_SKB_CB(prev)->end_seq += shifted; | ||
38 | TCP_SKB_CB(skb)->seq += shifted; | ||
39 | |||
40 | -- | ||
41 | 1.7.7.4 | ||
42 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0035-USB-Added-Kamstrup-VID-PIDs-to-cp210x-serial-driver.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0035-USB-Added-Kamstrup-VID-PIDs-to-cp210x-serial-driver.patch new file mode 100644 index 00000000..30e69cf0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0035-USB-Added-Kamstrup-VID-PIDs-to-cp210x-serial-driver.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 4a2448683921f6bb770e934ff6ab78a6e2dc78cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruno Thomsen <bruno.thomsen@gmail.com> | ||
3 | Date: Tue, 21 Feb 2012 23:41:37 +0100 | ||
4 | Subject: [PATCH 35/73] USB: Added Kamstrup VID/PIDs to cp210x serial driver. | ||
5 | |||
6 | commit c6c1e4491dc8d1ed2509fa6aacffa7f34614fc38 upstream. | ||
7 | |||
8 | Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com> | ||
9 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
10 | --- | ||
11 | drivers/usb/serial/cp210x.c | 2 ++ | ||
12 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
13 | |||
14 | diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c | ||
15 | index a515237..33d25d4 100644 | ||
16 | --- a/drivers/usb/serial/cp210x.c | ||
17 | +++ b/drivers/usb/serial/cp210x.c | ||
18 | @@ -136,6 +136,8 @@ static const struct usb_device_id id_table[] = { | ||
19 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ | ||
20 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ | ||
21 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ | ||
22 | + { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ | ||
23 | + { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ | ||
24 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | ||
25 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | ||
26 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | ||
27 | -- | ||
28 | 1.7.7.4 | ||
29 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0036-USB-option-cleanup-zte-3g-dongle-s-pid-in-option.c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0036-USB-option-cleanup-zte-3g-dongle-s-pid-in-option.c.patch new file mode 100644 index 00000000..3c3862b0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0036-USB-option-cleanup-zte-3g-dongle-s-pid-in-option.c.patch | |||
@@ -0,0 +1,246 @@ | |||
1 | From 4cc383ba35be70d24fb7d43dd67f15f6ec3c7ebc Mon Sep 17 00:00:00 2001 | ||
2 | From: Rui li <li.rui27@zte.com.cn> | ||
3 | Date: Tue, 14 Feb 2012 10:35:01 +0800 | ||
4 | Subject: [PATCH 36/73] USB: option: cleanup zte 3g-dongle's pid in option.c | ||
5 | |||
6 | commit b9e44fe5ecda4158c22bc1ea4bffa378a4f83f65 upstream. | ||
7 | |||
8 | 1. Remove all old mass-storage ids's pid: | ||
9 | 0x0026,0x0053,0x0098,0x0099,0x0149,0x0150,0x0160; | ||
10 | 2. As the pid from 0x1401 to 0x1510 which have not surely assigned to | ||
11 | use for serial-port or mass-storage port,so i think it should be | ||
12 | removed now, and will re-add after it have assigned in future; | ||
13 | 3. sort the pid to WCDMA and CDMA. | ||
14 | |||
15 | Signed-off-by: Rui li <li.rui27@zte.com.cn> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/usb/serial/option.c | 143 ++++--------------------------------------- | ||
19 | 1 files changed, 13 insertions(+), 130 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c | ||
22 | index 338d082..68fa8c7 100644 | ||
23 | --- a/drivers/usb/serial/option.c | ||
24 | +++ b/drivers/usb/serial/option.c | ||
25 | @@ -788,7 +788,6 @@ static const struct usb_device_id option_ids[] = { | ||
26 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), | ||
27 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | ||
28 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, | ||
29 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, | ||
30 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, | ||
31 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, | ||
32 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), | ||
33 | @@ -803,7 +802,6 @@ static const struct usb_device_id option_ids[] = { | ||
34 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, | ||
35 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), | ||
36 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | ||
37 | - /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ | ||
38 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, | ||
39 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, | ||
40 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, | ||
41 | @@ -828,7 +826,6 @@ static const struct usb_device_id option_ids[] = { | ||
42 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, | ||
43 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), | ||
44 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | ||
45 | - /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ | ||
46 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, | ||
47 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), | ||
48 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | ||
49 | @@ -836,7 +833,6 @@ static const struct usb_device_id option_ids[] = { | ||
50 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, | ||
51 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), | ||
52 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | ||
53 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
54 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, | ||
55 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, | ||
56 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), | ||
57 | @@ -846,7 +842,6 @@ static const struct usb_device_id option_ids[] = { | ||
58 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, | ||
59 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, | ||
60 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, | ||
61 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
62 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, | ||
63 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, | ||
64 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, | ||
65 | @@ -865,8 +860,6 @@ static const struct usb_device_id option_ids[] = { | ||
66 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, | ||
67 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, | ||
68 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, | ||
69 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0098, 0xff, 0xff, 0xff) }, | ||
70 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0099, 0xff, 0xff, 0xff) }, | ||
71 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), | ||
72 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | ||
73 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, | ||
74 | @@ -887,28 +880,18 @@ static const struct usb_device_id option_ids[] = { | ||
75 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, | ||
76 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, | ||
77 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, | ||
78 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0146, 0xff, 0xff, 0xff) }, | ||
79 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, | ||
80 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, | ||
81 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0149, 0xff, 0xff, 0xff) }, | ||
82 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0150, 0xff, 0xff, 0xff) }, | ||
83 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, | ||
84 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, | ||
85 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, | ||
86 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, | ||
87 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, | ||
88 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, | ||
89 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, | ||
90 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, | ||
91 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, | ||
92 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, | ||
93 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, | ||
94 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, | ||
95 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, | ||
96 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, | ||
97 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
98 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
99 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
100 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, | ||
101 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, | ||
102 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, | ||
103 | @@ -1083,127 +1066,27 @@ static const struct usb_device_id option_ids[] = { | ||
104 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, | ||
105 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, | ||
106 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, | ||
107 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff) }, | ||
108 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff) }, | ||
109 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1403, 0xff, 0xff, 0xff) }, | ||
110 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1404, 0xff, 0xff, 0xff) }, | ||
111 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1405, 0xff, 0xff, 0xff) }, | ||
112 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1406, 0xff, 0xff, 0xff) }, | ||
113 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1407, 0xff, 0xff, 0xff) }, | ||
114 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1408, 0xff, 0xff, 0xff) }, | ||
115 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1409, 0xff, 0xff, 0xff) }, | ||
116 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1410, 0xff, 0xff, 0xff) }, | ||
117 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1411, 0xff, 0xff, 0xff) }, | ||
118 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1412, 0xff, 0xff, 0xff) }, | ||
119 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1413, 0xff, 0xff, 0xff) }, | ||
120 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1414, 0xff, 0xff, 0xff) }, | ||
121 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1415, 0xff, 0xff, 0xff) }, | ||
122 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1416, 0xff, 0xff, 0xff) }, | ||
123 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1417, 0xff, 0xff, 0xff) }, | ||
124 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1418, 0xff, 0xff, 0xff) }, | ||
125 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1419, 0xff, 0xff, 0xff) }, | ||
126 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1420, 0xff, 0xff, 0xff) }, | ||
127 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1421, 0xff, 0xff, 0xff) }, | ||
128 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1422, 0xff, 0xff, 0xff) }, | ||
129 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1423, 0xff, 0xff, 0xff) }, | ||
130 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff) }, | ||
131 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff) }, | ||
132 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff) }, | ||
133 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1427, 0xff, 0xff, 0xff) }, | ||
134 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff) }, | ||
135 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1429, 0xff, 0xff, 0xff) }, | ||
136 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1430, 0xff, 0xff, 0xff) }, | ||
137 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1431, 0xff, 0xff, 0xff) }, | ||
138 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1432, 0xff, 0xff, 0xff) }, | ||
139 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1433, 0xff, 0xff, 0xff) }, | ||
140 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1434, 0xff, 0xff, 0xff) }, | ||
141 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1435, 0xff, 0xff, 0xff) }, | ||
142 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1436, 0xff, 0xff, 0xff) }, | ||
143 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1437, 0xff, 0xff, 0xff) }, | ||
144 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1438, 0xff, 0xff, 0xff) }, | ||
145 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1439, 0xff, 0xff, 0xff) }, | ||
146 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1440, 0xff, 0xff, 0xff) }, | ||
147 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1441, 0xff, 0xff, 0xff) }, | ||
148 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1442, 0xff, 0xff, 0xff) }, | ||
149 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1443, 0xff, 0xff, 0xff) }, | ||
150 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1444, 0xff, 0xff, 0xff) }, | ||
151 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1445, 0xff, 0xff, 0xff) }, | ||
152 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1446, 0xff, 0xff, 0xff) }, | ||
153 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1447, 0xff, 0xff, 0xff) }, | ||
154 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1448, 0xff, 0xff, 0xff) }, | ||
155 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1449, 0xff, 0xff, 0xff) }, | ||
156 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1450, 0xff, 0xff, 0xff) }, | ||
157 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1451, 0xff, 0xff, 0xff) }, | ||
158 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1452, 0xff, 0xff, 0xff) }, | ||
159 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1453, 0xff, 0xff, 0xff) }, | ||
160 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1454, 0xff, 0xff, 0xff) }, | ||
161 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1455, 0xff, 0xff, 0xff) }, | ||
162 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1456, 0xff, 0xff, 0xff) }, | ||
163 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1457, 0xff, 0xff, 0xff) }, | ||
164 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1458, 0xff, 0xff, 0xff) }, | ||
165 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1459, 0xff, 0xff, 0xff) }, | ||
166 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1460, 0xff, 0xff, 0xff) }, | ||
167 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1461, 0xff, 0xff, 0xff) }, | ||
168 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1462, 0xff, 0xff, 0xff) }, | ||
169 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1463, 0xff, 0xff, 0xff) }, | ||
170 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1464, 0xff, 0xff, 0xff) }, | ||
171 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1465, 0xff, 0xff, 0xff) }, | ||
172 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1466, 0xff, 0xff, 0xff) }, | ||
173 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1467, 0xff, 0xff, 0xff) }, | ||
174 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1468, 0xff, 0xff, 0xff) }, | ||
175 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1469, 0xff, 0xff, 0xff) }, | ||
176 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1470, 0xff, 0xff, 0xff) }, | ||
177 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1471, 0xff, 0xff, 0xff) }, | ||
178 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1472, 0xff, 0xff, 0xff) }, | ||
179 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1473, 0xff, 0xff, 0xff) }, | ||
180 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1474, 0xff, 0xff, 0xff) }, | ||
181 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1475, 0xff, 0xff, 0xff) }, | ||
182 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1476, 0xff, 0xff, 0xff) }, | ||
183 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1477, 0xff, 0xff, 0xff) }, | ||
184 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1478, 0xff, 0xff, 0xff) }, | ||
185 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1479, 0xff, 0xff, 0xff) }, | ||
186 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1480, 0xff, 0xff, 0xff) }, | ||
187 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0xff, 0xff) }, | ||
188 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1482, 0xff, 0xff, 0xff) }, | ||
189 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1483, 0xff, 0xff, 0xff) }, | ||
190 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1484, 0xff, 0xff, 0xff) }, | ||
191 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1485, 0xff, 0xff, 0xff) }, | ||
192 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1486, 0xff, 0xff, 0xff) }, | ||
193 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1487, 0xff, 0xff, 0xff) }, | ||
194 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1488, 0xff, 0xff, 0xff) }, | ||
195 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1489, 0xff, 0xff, 0xff) }, | ||
196 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1490, 0xff, 0xff, 0xff) }, | ||
197 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1491, 0xff, 0xff, 0xff) }, | ||
198 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1492, 0xff, 0xff, 0xff) }, | ||
199 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1493, 0xff, 0xff, 0xff) }, | ||
200 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1494, 0xff, 0xff, 0xff) }, | ||
201 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1495, 0xff, 0xff, 0xff) }, | ||
202 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1496, 0xff, 0xff, 0xff) }, | ||
203 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1497, 0xff, 0xff, 0xff) }, | ||
204 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1498, 0xff, 0xff, 0xff) }, | ||
205 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1499, 0xff, 0xff, 0xff) }, | ||
206 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1500, 0xff, 0xff, 0xff) }, | ||
207 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1501, 0xff, 0xff, 0xff) }, | ||
208 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1502, 0xff, 0xff, 0xff) }, | ||
209 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1503, 0xff, 0xff, 0xff) }, | ||
210 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1504, 0xff, 0xff, 0xff) }, | ||
211 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1505, 0xff, 0xff, 0xff) }, | ||
212 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1506, 0xff, 0xff, 0xff) }, | ||
213 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1507, 0xff, 0xff, 0xff) }, | ||
214 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1508, 0xff, 0xff, 0xff) }, | ||
215 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1509, 0xff, 0xff, 0xff) }, | ||
216 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1510, 0xff, 0xff, 0xff) }, | ||
217 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | ||
218 | + 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | ||
219 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | ||
220 | + | ||
221 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ | ||
222 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, | ||
223 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
224 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, | ||
225 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
226 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, | ||
227 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, | ||
228 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, | ||
229 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff) }, | ||
230 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, | ||
231 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | ||
232 | - 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | ||
233 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | ||
234 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, | ||
235 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, | ||
236 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, | ||
237 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
238 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
239 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
240 | + | ||
241 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | ||
242 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | ||
243 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | ||
244 | -- | ||
245 | 1.7.7.4 | ||
246 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0037-USB-Serial-ti_usb_3410_5052-Add-Abbot-Diabetes-Care-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0037-USB-Serial-ti_usb_3410_5052-Add-Abbot-Diabetes-Care-.patch new file mode 100644 index 00000000..cb9491de --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0037-USB-Serial-ti_usb_3410_5052-Add-Abbot-Diabetes-Care-.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From f891ac47c26ed3a7efcf4bd641590e54869cd37e Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Lunn <andrew@lunn.ch> | ||
3 | Date: Mon, 20 Feb 2012 09:31:57 +0100 | ||
4 | Subject: [PATCH 37/73] USB: Serial: ti_usb_3410_5052: Add Abbot Diabetes Care | ||
5 | cable id | ||
6 | |||
7 | commit 7fd25702ba616d9ba56e2a625472f29e5aff25ee upstream. | ||
8 | |||
9 | This USB-serial cable with mini stereo jack enumerates as: | ||
10 | Bus 001 Device 004: ID 1a61:3410 Abbott Diabetes Care | ||
11 | |||
12 | It is a TI3410 inside. | ||
13 | |||
14 | Signed-off-by: Andrew Lunn <andrew@lunn.ch> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | drivers/usb/serial/ti_usb_3410_5052.c | 6 ++++-- | ||
18 | drivers/usb/serial/ti_usb_3410_5052.h | 4 ++++ | ||
19 | 2 files changed, 8 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c | ||
22 | index ea84456..21c82b0 100644 | ||
23 | --- a/drivers/usb/serial/ti_usb_3410_5052.c | ||
24 | +++ b/drivers/usb/serial/ti_usb_3410_5052.c | ||
25 | @@ -165,7 +165,7 @@ static unsigned int product_5052_count; | ||
26 | /* the array dimension is the number of default entries plus */ | ||
27 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ | ||
28 | /* null entry */ | ||
29 | -static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | ||
30 | +static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = { | ||
31 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | ||
32 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | ||
33 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | ||
34 | @@ -179,6 +179,7 @@ static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | ||
35 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | ||
36 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | ||
37 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | ||
38 | + { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
39 | }; | ||
40 | |||
41 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | ||
42 | @@ -188,7 +189,7 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | ||
43 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, | ||
44 | }; | ||
45 | |||
46 | -static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = { | ||
47 | +static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = { | ||
48 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | ||
49 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | ||
50 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | ||
51 | @@ -206,6 +207,7 @@ static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] | ||
52 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | ||
53 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | ||
54 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | ||
55 | + { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
56 | { } | ||
57 | }; | ||
58 | |||
59 | diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h | ||
60 | index 2aac195..f140f1b 100644 | ||
61 | --- a/drivers/usb/serial/ti_usb_3410_5052.h | ||
62 | +++ b/drivers/usb/serial/ti_usb_3410_5052.h | ||
63 | @@ -49,6 +49,10 @@ | ||
64 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 | ||
65 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 | ||
66 | |||
67 | +/* Abbott Diabetics vendor and product ids */ | ||
68 | +#define ABBOTT_VENDOR_ID 0x1a61 | ||
69 | +#define ABBOTT_PRODUCT_ID 0x3410 | ||
70 | + | ||
71 | /* Commands */ | ||
72 | #define TI_GET_VERSION 0x01 | ||
73 | #define TI_GET_PORT_STATUS 0x02 | ||
74 | -- | ||
75 | 1.7.7.4 | ||
76 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0038-USB-Remove-duplicate-USB-3.0-hub-feature-defines.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0038-USB-Remove-duplicate-USB-3.0-hub-feature-defines.patch new file mode 100644 index 00000000..cbdabc2f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0038-USB-Remove-duplicate-USB-3.0-hub-feature-defines.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From d8c3ee4541529fe177c8afac31b890a7c2adecfd Mon Sep 17 00:00:00 2001 | ||
2 | From: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
3 | Date: Thu, 5 Jan 2012 16:28:54 -0800 | ||
4 | Subject: [PATCH 38/73] USB: Remove duplicate USB 3.0 hub feature #defines. | ||
5 | |||
6 | commit d9f5343e35d9138432657202afa8e3ddb2ade360 upstream. | ||
7 | |||
8 | Somehow we ended up with duplicate hub feature #defines in ch11.h. | ||
9 | Tatyana Brokhman first created the USB 3.0 hub feature macros in 2.6.38 | ||
10 | with commit 0eadcc09203349b11ca477ec367079b23d32ab91 "usb: USB3.0 ch11 | ||
11 | definitions". In 2.6.39, I modified a patch from John Youn that added | ||
12 | similar macros in a different place in the same file, and committed | ||
13 | dbe79bbe9dcb22cb3651c46f18943477141ca452 "USB 3.0 Hub Changes". | ||
14 | |||
15 | Some of the #defines used different names for the same values. Others | ||
16 | used exactly the same names with the same values, like these gems: | ||
17 | |||
18 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
19 | ... | ||
20 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
21 | |||
22 | According to my very geeky husband (who looked it up in the C99 spec), | ||
23 | it is allowed to have object-like macros with duplicate names as long as | ||
24 | the replacement list is exactly the same. However, he recalled that | ||
25 | some compilers will give warnings when they find duplicate macros. It's | ||
26 | probably best to remove the duplicates in the stable tree, so that the | ||
27 | code compiles for everyone. | ||
28 | |||
29 | The macros are now fixed to move the feature requests that are specific | ||
30 | to USB 3.0 hubs into a new section (out of the USB 2.0 hub feature | ||
31 | section), and use the most common macro name. | ||
32 | |||
33 | This patch should be backported to 2.6.39. | ||
34 | |||
35 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
36 | Cc: Tatyana Brokhman <tlinder@codeaurora.org> | ||
37 | Cc: John Youn <johnyoun@synopsys.com> | ||
38 | Cc: Jamey Sharp <jamey@minilop.net> | ||
39 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
40 | --- | ||
41 | include/linux/usb/ch11.h | 10 ++-------- | ||
42 | 1 files changed, 2 insertions(+), 8 deletions(-) | ||
43 | |||
44 | diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h | ||
45 | index 4ebaf08..1eb735b 100644 | ||
46 | --- a/include/linux/usb/ch11.h | ||
47 | +++ b/include/linux/usb/ch11.h | ||
48 | @@ -62,12 +62,6 @@ | ||
49 | #define USB_PORT_FEAT_TEST 21 | ||
50 | #define USB_PORT_FEAT_INDICATOR 22 | ||
51 | #define USB_PORT_FEAT_C_PORT_L1 23 | ||
52 | -#define USB_PORT_FEAT_C_PORT_LINK_STATE 25 | ||
53 | -#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 | ||
54 | -#define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27 | ||
55 | -#define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
56 | -#define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
57 | -#define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
58 | |||
59 | /* | ||
60 | * Port feature selectors added by USB 3.0 spec. | ||
61 | @@ -76,8 +70,8 @@ | ||
62 | #define USB_PORT_FEAT_LINK_STATE 5 | ||
63 | #define USB_PORT_FEAT_U1_TIMEOUT 23 | ||
64 | #define USB_PORT_FEAT_U2_TIMEOUT 24 | ||
65 | -#define USB_PORT_FEAT_C_LINK_STATE 25 | ||
66 | -#define USB_PORT_FEAT_C_CONFIG_ERR 26 | ||
67 | +#define USB_PORT_FEAT_C_PORT_LINK_STATE 25 | ||
68 | +#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 | ||
69 | #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 | ||
70 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
71 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
72 | -- | ||
73 | 1.7.7.4 | ||
74 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0039-USB-Fix-handoff-when-BIOS-disables-host-PCI-device.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0039-USB-Fix-handoff-when-BIOS-disables-host-PCI-device.patch new file mode 100644 index 00000000..f8484578 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0039-USB-Fix-handoff-when-BIOS-disables-host-PCI-device.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 6dc2acf66f46c7aee7ae6617612fcf32fc6b0de5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
3 | Date: Tue, 7 Feb 2012 15:11:46 -0800 | ||
4 | Subject: [PATCH 39/73] USB: Fix handoff when BIOS disables host PCI device. | ||
5 | |||
6 | commit cab928ee1f221c9cc48d6615070fefe2e444384a upstream. | ||
7 | |||
8 | On some systems with an Intel Panther Point xHCI host controller, the | ||
9 | BIOS disables the xHCI PCI device during boot, and switches the xHCI | ||
10 | ports over to EHCI. This allows the BIOS to access USB devices without | ||
11 | having xHCI support. | ||
12 | |||
13 | The downside is that the xHCI BIOS handoff mechanism will fail because | ||
14 | memory mapped I/O is not enabled for the disabled PCI device. | ||
15 | Jesse Barnes says this is expected behavior. The PCI core will enable | ||
16 | BARs before quirks run, but it will leave it in an undefined state, and | ||
17 | it may not have memory mapped I/O enabled. | ||
18 | |||
19 | Make the generic USB quirk handler call pci_enable_device() to re-enable | ||
20 | MMIO, and call pci_disable_device() once the host-specific BIOS handoff | ||
21 | is finished. This will balance the ref counts in the PCI core. When | ||
22 | the PCI probe function is called, usb_hcd_pci_probe() will call | ||
23 | pci_enable_device() again. | ||
24 | |||
25 | This should be back ported to kernels as old as 2.6.31. That was the | ||
26 | first kernel with xHCI support, and no one has complained about BIOS | ||
27 | handoffs failing due to memory mapped I/O being disabled on other hosts | ||
28 | (EHCI, UHCI, or OHCI). | ||
29 | |||
30 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
31 | Acked-by: Oliver Neukum <oneukum@suse.de> | ||
32 | Cc: Jesse Barnes <jbarnes@virtuousgeek.org> | ||
33 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
34 | --- | ||
35 | drivers/usb/host/pci-quirks.c | 11 +++++++++++ | ||
36 | 1 files changed, 11 insertions(+), 0 deletions(-) | ||
37 | |||
38 | diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c | ||
39 | index ac53a66..7732d69 100644 | ||
40 | --- a/drivers/usb/host/pci-quirks.c | ||
41 | +++ b/drivers/usb/host/pci-quirks.c | ||
42 | @@ -872,7 +872,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | ||
43 | */ | ||
44 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ | ||
45 | return; | ||
46 | + if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && | ||
47 | + pdev->class != PCI_CLASS_SERIAL_USB_OHCI && | ||
48 | + pdev->class != PCI_CLASS_SERIAL_USB_EHCI && | ||
49 | + pdev->class != PCI_CLASS_SERIAL_USB_XHCI) | ||
50 | + return; | ||
51 | |||
52 | + if (pci_enable_device(pdev) < 0) { | ||
53 | + dev_warn(&pdev->dev, "Can't enable PCI device, " | ||
54 | + "BIOS handoff failed.\n"); | ||
55 | + return; | ||
56 | + } | ||
57 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) | ||
58 | quirk_usb_handoff_uhci(pdev); | ||
59 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) | ||
60 | @@ -881,5 +891,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | ||
61 | quirk_usb_disable_ehci(pdev); | ||
62 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) | ||
63 | quirk_usb_handoff_xhci(pdev); | ||
64 | + pci_disable_device(pdev); | ||
65 | } | ||
66 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); | ||
67 | -- | ||
68 | 1.7.7.4 | ||
69 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0040-xhci-Fix-oops-caused-by-more-USB2-ports-than-USB3-po.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0040-xhci-Fix-oops-caused-by-more-USB2-ports-than-USB3-po.patch new file mode 100644 index 00000000..a6470edc --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0040-xhci-Fix-oops-caused-by-more-USB2-ports-than-USB3-po.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 60e1345a34208c8024e01dc7481e090737720d90 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
3 | Date: Thu, 9 Feb 2012 14:43:44 -0800 | ||
4 | Subject: [PATCH 40/73] xhci: Fix oops caused by more USB2 ports than USB3 | ||
5 | ports. | ||
6 | |||
7 | commit 3278a55a1aebe2bbd47fbb5196209e5326a88b56 upstream. | ||
8 | |||
9 | The code to set the device removable bits in the USB 2.0 roothub | ||
10 | descriptor was accidentally looking at the USB 3.0 port registers | ||
11 | instead of the USB 2.0 registers. This can cause an oops if there are | ||
12 | more USB 2.0 registers than USB 3.0 registers. | ||
13 | |||
14 | This should be backported to kernels as old as 2.6.39, that contain the | ||
15 | commit 4bbb0ace9a3de8392527e3c87926309d541d3b00 "xhci: Return a USB 3.0 | ||
16 | hub descriptor for USB3 roothub." | ||
17 | |||
18 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
20 | --- | ||
21 | drivers/usb/host/xhci-hub.c | 2 +- | ||
22 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
23 | |||
24 | diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c | ||
25 | index 430e88f..a8b2980 100644 | ||
26 | --- a/drivers/usb/host/xhci-hub.c | ||
27 | +++ b/drivers/usb/host/xhci-hub.c | ||
28 | @@ -95,7 +95,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | ||
29 | */ | ||
30 | memset(port_removable, 0, sizeof(port_removable)); | ||
31 | for (i = 0; i < ports; i++) { | ||
32 | - portsc = xhci_readl(xhci, xhci->usb3_ports[i]); | ||
33 | + portsc = xhci_readl(xhci, xhci->usb2_ports[i]); | ||
34 | /* If a device is removable, PORTSC reports a 0, same as in the | ||
35 | * hub descriptor DeviceRemovable bits. | ||
36 | */ | ||
37 | -- | ||
38 | 1.7.7.4 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0041-xhci-Fix-encoding-for-HS-bulk-control-NAK-rate.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0041-xhci-Fix-encoding-for-HS-bulk-control-NAK-rate.patch new file mode 100644 index 00000000..79b724db --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0041-xhci-Fix-encoding-for-HS-bulk-control-NAK-rate.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From 0eec53088be92edf907c345ff96d94059d89f124 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
3 | Date: Mon, 13 Feb 2012 14:42:11 -0800 | ||
4 | Subject: [PATCH 41/73] xhci: Fix encoding for HS bulk/control NAK rate. | ||
5 | |||
6 | commit 340a3504fd39dad753ba908fb6f894ee81fc3ae2 upstream. | ||
7 | |||
8 | The xHCI 0.96 spec says that HS bulk and control endpoint NAK rate must | ||
9 | be encoded as an exponent of two number of microframes. The endpoint | ||
10 | descriptor has the NAK rate encoded in number of microframes. We were | ||
11 | just copying the value from the endpoint descriptor into the endpoint | ||
12 | context interval field, which was not correct. This lead to the VIA | ||
13 | host rejecting the add of a bulk OUT endpoint from any USB 2.0 mass | ||
14 | storage device. | ||
15 | |||
16 | The fix is to use the correct encoding. Refactor the code to convert | ||
17 | number of frames to an exponential number of microframes, and make sure | ||
18 | we convert the number of microframes in HS bulk and control endpoints to | ||
19 | an exponent. | ||
20 | |||
21 | This should be back ported to kernels as old as 2.6.31, that contain the | ||
22 | commit dfa49c4ad120a784ef1ff0717168aa79f55a483a "USB: xhci - fix math | ||
23 | in xhci_get_endpoint_interval" | ||
24 | |||
25 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
26 | Tested-by: Felipe Contreras <felipe.contreras@gmail.com> | ||
27 | Suggested-by: Andiry Xu <andiry.xu@amd.com> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
29 | --- | ||
30 | drivers/usb/host/xhci-mem.c | 32 ++++++++++++++++++++++++-------- | ||
31 | 1 files changed, 24 insertions(+), 8 deletions(-) | ||
32 | |||
33 | diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c | ||
34 | index 0e4b25f..c69cf54 100644 | ||
35 | --- a/drivers/usb/host/xhci-mem.c | ||
36 | +++ b/drivers/usb/host/xhci-mem.c | ||
37 | @@ -1140,26 +1140,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, | ||
38 | } | ||
39 | |||
40 | /* | ||
41 | - * Convert bInterval expressed in frames (in 1-255 range) to exponent of | ||
42 | + * Convert bInterval expressed in microframes (in 1-255 range) to exponent of | ||
43 | * microframes, rounded down to nearest power of 2. | ||
44 | */ | ||
45 | -static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
46 | - struct usb_host_endpoint *ep) | ||
47 | +static unsigned int xhci_microframes_to_exponent(struct usb_device *udev, | ||
48 | + struct usb_host_endpoint *ep, unsigned int desc_interval, | ||
49 | + unsigned int min_exponent, unsigned int max_exponent) | ||
50 | { | ||
51 | unsigned int interval; | ||
52 | |||
53 | - interval = fls(8 * ep->desc.bInterval) - 1; | ||
54 | - interval = clamp_val(interval, 3, 10); | ||
55 | - if ((1 << interval) != 8 * ep->desc.bInterval) | ||
56 | + interval = fls(desc_interval) - 1; | ||
57 | + interval = clamp_val(interval, min_exponent, max_exponent); | ||
58 | + if ((1 << interval) != desc_interval) | ||
59 | dev_warn(&udev->dev, | ||
60 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", | ||
61 | ep->desc.bEndpointAddress, | ||
62 | 1 << interval, | ||
63 | - 8 * ep->desc.bInterval); | ||
64 | + desc_interval); | ||
65 | |||
66 | return interval; | ||
67 | } | ||
68 | |||
69 | +static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, | ||
70 | + struct usb_host_endpoint *ep) | ||
71 | +{ | ||
72 | + return xhci_microframes_to_exponent(udev, ep, | ||
73 | + ep->desc.bInterval, 0, 15); | ||
74 | +} | ||
75 | + | ||
76 | + | ||
77 | +static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
78 | + struct usb_host_endpoint *ep) | ||
79 | +{ | ||
80 | + return xhci_microframes_to_exponent(udev, ep, | ||
81 | + ep->desc.bInterval * 8, 3, 10); | ||
82 | +} | ||
83 | + | ||
84 | /* Return the polling or NAK interval. | ||
85 | * | ||
86 | * The polling interval is expressed in "microframes". If xHCI's Interval field | ||
87 | @@ -1178,7 +1194,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | ||
88 | /* Max NAK rate */ | ||
89 | if (usb_endpoint_xfer_control(&ep->desc) || | ||
90 | usb_endpoint_xfer_bulk(&ep->desc)) { | ||
91 | - interval = ep->desc.bInterval; | ||
92 | + interval = xhci_parse_microframe_interval(udev, ep); | ||
93 | break; | ||
94 | } | ||
95 | /* Fall through - SS and HS isoc/int have same decoding */ | ||
96 | -- | ||
97 | 1.7.7.4 | ||
98 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0042-USB-Don-t-fail-USB3-probe-on-missing-legacy-PCI-IRQ.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0042-USB-Don-t-fail-USB3-probe-on-missing-legacy-PCI-IRQ.patch new file mode 100644 index 00000000..5f63bf74 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0042-USB-Don-t-fail-USB3-probe-on-missing-legacy-PCI-IRQ.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From 4d5845033ef313d6d1008ac5dafe69dbab23cc11 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
3 | Date: Mon, 13 Feb 2012 16:25:57 -0800 | ||
4 | Subject: [PATCH 42/73] USB: Don't fail USB3 probe on missing legacy PCI IRQ. | ||
5 | |||
6 | commit 68d07f64b8a11a852d48d1b05b724c3e20c0d94b upstream. | ||
7 | |||
8 | Intel has a PCI USB xhci host controller on a new platform. It doesn't | ||
9 | have a line IRQ definition in BIOS. The Linux driver refuses to | ||
10 | initialize this controller, but Windows works well because it only depends | ||
11 | on MSI. | ||
12 | |||
13 | Actually, Linux also can work for MSI. This patch avoids the line IRQ | ||
14 | checking for USB3 HCDs in usb core PCI probe. It allows the xHCI driver | ||
15 | to try to enable MSI or MSI-X first. It will fail the probe if MSI | ||
16 | enabling failed and there's no legacy PCI IRQ. | ||
17 | |||
18 | This patch should be backported to kernels as old as 2.6.32. | ||
19 | |||
20 | Signed-off-by: Alex Shi <alex.shi@intel.com> | ||
21 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
23 | --- | ||
24 | drivers/usb/core/hcd-pci.c | 5 ++++- | ||
25 | drivers/usb/core/hcd.c | 6 ++++-- | ||
26 | drivers/usb/host/xhci.c | 5 +++++ | ||
27 | 3 files changed, 13 insertions(+), 3 deletions(-) | ||
28 | |||
29 | diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c | ||
30 | index a004db3..61d08dd 100644 | ||
31 | --- a/drivers/usb/core/hcd-pci.c | ||
32 | +++ b/drivers/usb/core/hcd-pci.c | ||
33 | @@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | ||
34 | return -ENODEV; | ||
35 | dev->current_state = PCI_D0; | ||
36 | |||
37 | - if (!dev->irq) { | ||
38 | + /* The xHCI driver supports MSI and MSI-X, | ||
39 | + * so don't fail if the BIOS doesn't provide a legacy IRQ. | ||
40 | + */ | ||
41 | + if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { | ||
42 | dev_err(&dev->dev, | ||
43 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", | ||
44 | pci_name(dev)); | ||
45 | diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c | ||
46 | index 179e364..8cb9304 100644 | ||
47 | --- a/drivers/usb/core/hcd.c | ||
48 | +++ b/drivers/usb/core/hcd.c | ||
49 | @@ -2465,8 +2465,10 @@ int usb_add_hcd(struct usb_hcd *hcd, | ||
50 | && device_can_wakeup(&hcd->self.root_hub->dev)) | ||
51 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); | ||
52 | |||
53 | - /* enable irqs just before we start the controller */ | ||
54 | - if (usb_hcd_is_primary_hcd(hcd)) { | ||
55 | + /* enable irqs just before we start the controller, | ||
56 | + * if the BIOS provides legacy PCI irqs. | ||
57 | + */ | ||
58 | + if (usb_hcd_is_primary_hcd(hcd) && irqnum) { | ||
59 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); | ||
60 | if (retval) | ||
61 | goto err_request_irq; | ||
62 | diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c | ||
63 | index b33f059..034f554 100644 | ||
64 | --- a/drivers/usb/host/xhci.c | ||
65 | +++ b/drivers/usb/host/xhci.c | ||
66 | @@ -352,6 +352,11 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | ||
67 | /* hcd->irq is -1, we have MSI */ | ||
68 | return 0; | ||
69 | |||
70 | + if (!pdev->irq) { | ||
71 | + xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); | ||
72 | + return -EINVAL; | ||
73 | + } | ||
74 | + | ||
75 | /* fall back to legacy interrupt*/ | ||
76 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, | ||
77 | hcd->irq_descr, hcd); | ||
78 | -- | ||
79 | 1.7.7.4 | ||
80 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0043-USB-Set-hub-depth-after-USB3-hub-reset.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0043-USB-Set-hub-depth-after-USB3-hub-reset.patch new file mode 100644 index 00000000..debbbc5e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0043-USB-Set-hub-depth-after-USB3-hub-reset.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 1a624979096199f383fc7785a509d1e38b608986 Mon Sep 17 00:00:00 2001 | ||
2 | From: Elric Fu <elricfu1@gmail.com> | ||
3 | Date: Sat, 18 Feb 2012 13:32:27 +0800 | ||
4 | Subject: [PATCH 43/73] USB: Set hub depth after USB3 hub reset | ||
5 | |||
6 | commit a45aa3b30583e7d54e7cf4fbcd0aa699348a6e5c upstream. | ||
7 | |||
8 | The superspeed device attached to a USB 3.0 hub(such as VIA's) | ||
9 | doesn't respond the address device command after resume. The | ||
10 | root cause is the superspeed hub will miss the Hub Depth value | ||
11 | that is used as an offset into the route string to locate the | ||
12 | bits it uses to determine the downstream port number after | ||
13 | reset, and all packets can't be routed to the device attached | ||
14 | to the superspeed hub. | ||
15 | |||
16 | Hub driver sends a Set Hub Depth request to the superspeed hub | ||
17 | except for USB 3.0 root hub when the hub is initialized and | ||
18 | doesn't send the request again after reset due to the resume | ||
19 | process. So moving the code that sends the Set Hub Depth request | ||
20 | to the superspeed hub from hub_configure() to hub_activate() | ||
21 | is to cover those situations include initialization and reset. | ||
22 | |||
23 | The patch should be backported to kernels as old as 2.6.39. | ||
24 | |||
25 | Signed-off-by: Elric Fu <elricfu1@gmail.com> | ||
26 | Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
27 | Acked-by: Alan Stern <stern@rowland.harvard.edu> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
29 | --- | ||
30 | drivers/usb/core/hub.c | 30 +++++++++++++++++------------- | ||
31 | 1 files changed, 17 insertions(+), 13 deletions(-) | ||
32 | |||
33 | diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c | ||
34 | index 7978146..bc06a8f 100644 | ||
35 | --- a/drivers/usb/core/hub.c | ||
36 | +++ b/drivers/usb/core/hub.c | ||
37 | @@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | ||
38 | if (type == HUB_INIT3) | ||
39 | goto init3; | ||
40 | |||
41 | - /* After a resume, port power should still be on. | ||
42 | + /* The superspeed hub except for root hub has to use Hub Depth | ||
43 | + * value as an offset into the route string to locate the bits | ||
44 | + * it uses to determine the downstream port number. So hub driver | ||
45 | + * should send a set hub depth request to superspeed hub after | ||
46 | + * the superspeed hub is set configuration in initialization or | ||
47 | + * reset procedure. | ||
48 | + * | ||
49 | + * After a resume, port power should still be on. | ||
50 | * For any other type of activation, turn it on. | ||
51 | */ | ||
52 | if (type != HUB_RESUME) { | ||
53 | + if (hdev->parent && hub_is_superspeed(hdev)) { | ||
54 | + ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
55 | + HUB_SET_DEPTH, USB_RT_HUB, | ||
56 | + hdev->level - 1, 0, NULL, 0, | ||
57 | + USB_CTRL_SET_TIMEOUT); | ||
58 | + if (ret < 0) | ||
59 | + dev_err(hub->intfdev, | ||
60 | + "set hub depth failed\n"); | ||
61 | + } | ||
62 | |||
63 | /* Speed up system boot by using a delayed_work for the | ||
64 | * hub's initial power-up delays. This is pretty awkward | ||
65 | @@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub, | ||
66 | goto fail; | ||
67 | } | ||
68 | |||
69 | - if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { | ||
70 | - ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
71 | - HUB_SET_DEPTH, USB_RT_HUB, | ||
72 | - hdev->level - 1, 0, NULL, 0, | ||
73 | - USB_CTRL_SET_TIMEOUT); | ||
74 | - | ||
75 | - if (ret < 0) { | ||
76 | - message = "can't set hub depth"; | ||
77 | - goto fail; | ||
78 | - } | ||
79 | - } | ||
80 | - | ||
81 | /* Request the entire hub descriptor. | ||
82 | * hub->descriptor can handle USB_MAXCHILDREN ports, | ||
83 | * but the hub can/will return fewer bytes here. | ||
84 | -- | ||
85 | 1.7.7.4 | ||
86 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0044-usb-storage-fix-freezing-of-the-scanning-thread.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0044-usb-storage-fix-freezing-of-the-scanning-thread.patch new file mode 100644 index 00000000..731d030f --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0044-usb-storage-fix-freezing-of-the-scanning-thread.patch | |||
@@ -0,0 +1,213 @@ | |||
1 | From 2ab9cc5409e9871927ef2799b41af3288cf7114c Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Stern <stern@rowland.harvard.edu> | ||
3 | Date: Tue, 21 Feb 2012 13:16:32 -0500 | ||
4 | Subject: [PATCH 44/73] usb-storage: fix freezing of the scanning thread | ||
5 | |||
6 | commit bb94a406682770a35305daaa241ccdb7cab399de upstream. | ||
7 | |||
8 | This patch (as1521b) fixes the interaction between usb-storage's | ||
9 | scanning thread and the freezer. The current implementation has a | ||
10 | race: If the device is unplugged shortly after being plugged in and | ||
11 | just as a system sleep begins, the scanning thread may get frozen | ||
12 | before the khubd task. Khubd won't be able to freeze until the | ||
13 | disconnect processing is complete, and the disconnect processing can't | ||
14 | proceed until the scanning thread finishes, so the sleep transition | ||
15 | will fail. | ||
16 | |||
17 | The implementation in the 3.2 kernel suffers from an additional | ||
18 | problem. There the scanning thread calls set_freezable_with_signal(), | ||
19 | and the signals sent by the freezer will mess up the thread's I/O | ||
20 | delays, which are all interruptible. | ||
21 | |||
22 | The solution to both problems is the same: Replace the kernel thread | ||
23 | used for scanning with a delayed-work routine on the system freezable | ||
24 | work queue. Freezable work queues have the nice property that you can | ||
25 | cancel a work item even while the work queue is frozen, and no signals | ||
26 | are needed. | ||
27 | |||
28 | The 3.2 version of this patch solves the problem in Bugzilla #42730. | ||
29 | |||
30 | Signed-off-by: Alan Stern <stern@rowland.harvard.edu> | ||
31 | Acked-by: Seth Forshee <seth.forshee@canonical.com> | ||
32 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
33 | --- | ||
34 | drivers/usb/storage/usb.c | 89 ++++++++++++++++----------------------------- | ||
35 | drivers/usb/storage/usb.h | 7 ++-- | ||
36 | 2 files changed, 35 insertions(+), 61 deletions(-) | ||
37 | |||
38 | diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c | ||
39 | index 9e069ef..db51ba1 100644 | ||
40 | --- a/drivers/usb/storage/usb.c | ||
41 | +++ b/drivers/usb/storage/usb.c | ||
42 | @@ -788,15 +788,19 @@ static void quiesce_and_remove_host(struct us_data *us) | ||
43 | struct Scsi_Host *host = us_to_host(us); | ||
44 | |||
45 | /* If the device is really gone, cut short reset delays */ | ||
46 | - if (us->pusb_dev->state == USB_STATE_NOTATTACHED) | ||
47 | + if (us->pusb_dev->state == USB_STATE_NOTATTACHED) { | ||
48 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); | ||
49 | + wake_up(&us->delay_wait); | ||
50 | + } | ||
51 | |||
52 | - /* Prevent SCSI-scanning (if it hasn't started yet) | ||
53 | - * and wait for the SCSI-scanning thread to stop. | ||
54 | + /* Prevent SCSI scanning (if it hasn't started yet) | ||
55 | + * or wait for the SCSI-scanning routine to stop. | ||
56 | */ | ||
57 | - set_bit(US_FLIDX_DONT_SCAN, &us->dflags); | ||
58 | - wake_up(&us->delay_wait); | ||
59 | - wait_for_completion(&us->scanning_done); | ||
60 | + cancel_delayed_work_sync(&us->scan_dwork); | ||
61 | + | ||
62 | + /* Balance autopm calls if scanning was cancelled */ | ||
63 | + if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) | ||
64 | + usb_autopm_put_interface_no_suspend(us->pusb_intf); | ||
65 | |||
66 | /* Removing the host will perform an orderly shutdown: caches | ||
67 | * synchronized, disks spun down, etc. | ||
68 | @@ -823,52 +827,28 @@ static void release_everything(struct us_data *us) | ||
69 | scsi_host_put(us_to_host(us)); | ||
70 | } | ||
71 | |||
72 | -/* Thread to carry out delayed SCSI-device scanning */ | ||
73 | -static int usb_stor_scan_thread(void * __us) | ||
74 | +/* Delayed-work routine to carry out SCSI-device scanning */ | ||
75 | +static void usb_stor_scan_dwork(struct work_struct *work) | ||
76 | { | ||
77 | - struct us_data *us = (struct us_data *)__us; | ||
78 | + struct us_data *us = container_of(work, struct us_data, | ||
79 | + scan_dwork.work); | ||
80 | struct device *dev = &us->pusb_intf->dev; | ||
81 | |||
82 | - dev_dbg(dev, "device found\n"); | ||
83 | + dev_dbg(dev, "starting scan\n"); | ||
84 | |||
85 | - set_freezable_with_signal(); | ||
86 | - /* | ||
87 | - * Wait for the timeout to expire or for a disconnect | ||
88 | - * | ||
89 | - * We can't freeze in this thread or we risk causing khubd to | ||
90 | - * fail to freeze, but we can't be non-freezable either. Nor can | ||
91 | - * khubd freeze while waiting for scanning to complete as it may | ||
92 | - * hold the device lock, causing a hang when suspending devices. | ||
93 | - * So we request a fake signal when freezing and use | ||
94 | - * interruptible sleep to kick us out of our wait early when | ||
95 | - * freezing happens. | ||
96 | - */ | ||
97 | - if (delay_use > 0) { | ||
98 | - dev_dbg(dev, "waiting for device to settle " | ||
99 | - "before scanning\n"); | ||
100 | - wait_event_interruptible_timeout(us->delay_wait, | ||
101 | - test_bit(US_FLIDX_DONT_SCAN, &us->dflags), | ||
102 | - delay_use * HZ); | ||
103 | + /* For bulk-only devices, determine the max LUN value */ | ||
104 | + if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) { | ||
105 | + mutex_lock(&us->dev_mutex); | ||
106 | + us->max_lun = usb_stor_Bulk_max_lun(us); | ||
107 | + mutex_unlock(&us->dev_mutex); | ||
108 | } | ||
109 | + scsi_scan_host(us_to_host(us)); | ||
110 | + dev_dbg(dev, "scan complete\n"); | ||
111 | |||
112 | - /* If the device is still connected, perform the scanning */ | ||
113 | - if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { | ||
114 | - | ||
115 | - /* For bulk-only devices, determine the max LUN value */ | ||
116 | - if (us->protocol == USB_PR_BULK && | ||
117 | - !(us->fflags & US_FL_SINGLE_LUN)) { | ||
118 | - mutex_lock(&us->dev_mutex); | ||
119 | - us->max_lun = usb_stor_Bulk_max_lun(us); | ||
120 | - mutex_unlock(&us->dev_mutex); | ||
121 | - } | ||
122 | - scsi_scan_host(us_to_host(us)); | ||
123 | - dev_dbg(dev, "scan complete\n"); | ||
124 | - | ||
125 | - /* Should we unbind if no devices were detected? */ | ||
126 | - } | ||
127 | + /* Should we unbind if no devices were detected? */ | ||
128 | |||
129 | usb_autopm_put_interface(us->pusb_intf); | ||
130 | - complete_and_exit(&us->scanning_done, 0); | ||
131 | + clear_bit(US_FLIDX_SCAN_PENDING, &us->dflags); | ||
132 | } | ||
133 | |||
134 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) | ||
135 | @@ -915,7 +895,7 @@ int usb_stor_probe1(struct us_data **pus, | ||
136 | init_completion(&us->cmnd_ready); | ||
137 | init_completion(&(us->notify)); | ||
138 | init_waitqueue_head(&us->delay_wait); | ||
139 | - init_completion(&us->scanning_done); | ||
140 | + INIT_DELAYED_WORK(&us->scan_dwork, usb_stor_scan_dwork); | ||
141 | |||
142 | /* Associate the us_data structure with the USB device */ | ||
143 | result = associate_dev(us, intf); | ||
144 | @@ -946,7 +926,6 @@ EXPORT_SYMBOL_GPL(usb_stor_probe1); | ||
145 | /* Second part of general USB mass-storage probing */ | ||
146 | int usb_stor_probe2(struct us_data *us) | ||
147 | { | ||
148 | - struct task_struct *th; | ||
149 | int result; | ||
150 | struct device *dev = &us->pusb_intf->dev; | ||
151 | |||
152 | @@ -987,20 +966,14 @@ int usb_stor_probe2(struct us_data *us) | ||
153 | goto BadDevice; | ||
154 | } | ||
155 | |||
156 | - /* Start up the thread for delayed SCSI-device scanning */ | ||
157 | - th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); | ||
158 | - if (IS_ERR(th)) { | ||
159 | - dev_warn(dev, | ||
160 | - "Unable to start the device-scanning thread\n"); | ||
161 | - complete(&us->scanning_done); | ||
162 | - quiesce_and_remove_host(us); | ||
163 | - result = PTR_ERR(th); | ||
164 | - goto BadDevice; | ||
165 | - } | ||
166 | - | ||
167 | + /* Submit the delayed_work for SCSI-device scanning */ | ||
168 | usb_autopm_get_interface_no_resume(us->pusb_intf); | ||
169 | - wake_up_process(th); | ||
170 | + set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); | ||
171 | |||
172 | + if (delay_use > 0) | ||
173 | + dev_dbg(dev, "waiting for device to settle before scanning\n"); | ||
174 | + queue_delayed_work(system_freezable_wq, &us->scan_dwork, | ||
175 | + delay_use * HZ); | ||
176 | return 0; | ||
177 | |||
178 | /* We come here if there are any problems */ | ||
179 | diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h | ||
180 | index 7b0f211..75f70f0 100644 | ||
181 | --- a/drivers/usb/storage/usb.h | ||
182 | +++ b/drivers/usb/storage/usb.h | ||
183 | @@ -47,6 +47,7 @@ | ||
184 | #include <linux/blkdev.h> | ||
185 | #include <linux/completion.h> | ||
186 | #include <linux/mutex.h> | ||
187 | +#include <linux/workqueue.h> | ||
188 | #include <scsi/scsi_host.h> | ||
189 | |||
190 | struct us_data; | ||
191 | @@ -72,7 +73,7 @@ struct us_unusual_dev { | ||
192 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ | ||
193 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ | ||
194 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ | ||
195 | -#define US_FLIDX_DONT_SCAN 6 /* don't scan (disconnect) */ | ||
196 | +#define US_FLIDX_SCAN_PENDING 6 /* scanning not yet done */ | ||
197 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ | ||
198 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ | ||
199 | |||
200 | @@ -147,8 +148,8 @@ struct us_data { | ||
201 | /* mutual exclusion and synchronization structures */ | ||
202 | struct completion cmnd_ready; /* to sleep thread on */ | ||
203 | struct completion notify; /* thread begin/end */ | ||
204 | - wait_queue_head_t delay_wait; /* wait during scan, reset */ | ||
205 | - struct completion scanning_done; /* wait for scan thread */ | ||
206 | + wait_queue_head_t delay_wait; /* wait during reset */ | ||
207 | + struct delayed_work scan_dwork; /* for async scanning */ | ||
208 | |||
209 | /* subdriver information */ | ||
210 | void *extra; /* Any extra data */ | ||
211 | -- | ||
212 | 1.7.7.4 | ||
213 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0045-target-Allow-control-CDBs-with-data-1-page.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0045-target-Allow-control-CDBs-with-data-1-page.patch new file mode 100644 index 00000000..c1367b96 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0045-target-Allow-control-CDBs-with-data-1-page.patch | |||
@@ -0,0 +1,513 @@ | |||
1 | From d2227f84ba0e97906153ac83db13213fb2e3938d Mon Sep 17 00:00:00 2001 | ||
2 | From: Andy Grover <agrover@redhat.com> | ||
3 | Date: Mon, 16 Jan 2012 16:57:08 -0800 | ||
4 | Subject: [PATCH 45/73] target: Allow control CDBs with data > 1 page | ||
5 | |||
6 | commit 4949314c7283ea4f9ade182ca599583b89f7edd6 upstream. | ||
7 | |||
8 | We need to handle >1 page control cdbs, so extend the code to do a vmap | ||
9 | if bigger than 1 page. It seems like kmap() is still preferable if just | ||
10 | a page, fewer TLB shootdowns(?), so keep using that when possible. | ||
11 | |||
12 | Rename function pair for their new scope. | ||
13 | |||
14 | Signed-off-by: Andy Grover <agrover@redhat.com> | ||
15 | Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/target/target_core_alua.c | 8 +++--- | ||
19 | drivers/target/target_core_cdb.c | 28 ++++++++++---------- | ||
20 | drivers/target/target_core_device.c | 4 +- | ||
21 | drivers/target/target_core_pr.c | 38 +++++++++++++------------- | ||
22 | drivers/target/target_core_pscsi.c | 4 +- | ||
23 | drivers/target/target_core_transport.c | 45 ++++++++++++++++++++++++-------- | ||
24 | include/target/target_core_base.h | 1 + | ||
25 | include/target/target_core_transport.h | 4 +- | ||
26 | 8 files changed, 78 insertions(+), 54 deletions(-) | ||
27 | |||
28 | diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c | ||
29 | index 1dcbef4..1d24512 100644 | ||
30 | --- a/drivers/target/target_core_alua.c | ||
31 | +++ b/drivers/target/target_core_alua.c | ||
32 | @@ -79,7 +79,7 @@ int target_emulate_report_target_port_groups(struct se_task *task) | ||
33 | return -EINVAL; | ||
34 | } | ||
35 | |||
36 | - buf = transport_kmap_first_data_page(cmd); | ||
37 | + buf = transport_kmap_data_sg(cmd); | ||
38 | |||
39 | spin_lock(&su_dev->t10_alua.tg_pt_gps_lock); | ||
40 | list_for_each_entry(tg_pt_gp, &su_dev->t10_alua.tg_pt_gps_list, | ||
41 | @@ -164,7 +164,7 @@ int target_emulate_report_target_port_groups(struct se_task *task) | ||
42 | buf[2] = ((rd_len >> 8) & 0xff); | ||
43 | buf[3] = (rd_len & 0xff); | ||
44 | |||
45 | - transport_kunmap_first_data_page(cmd); | ||
46 | + transport_kunmap_data_sg(cmd); | ||
47 | |||
48 | task->task_scsi_status = GOOD; | ||
49 | transport_complete_task(task, 1); | ||
50 | @@ -195,7 +195,7 @@ int target_emulate_set_target_port_groups(struct se_task *task) | ||
51 | cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; | ||
52 | return -EINVAL; | ||
53 | } | ||
54 | - buf = transport_kmap_first_data_page(cmd); | ||
55 | + buf = transport_kmap_data_sg(cmd); | ||
56 | |||
57 | /* | ||
58 | * Determine if explict ALUA via SET_TARGET_PORT_GROUPS is allowed | ||
59 | @@ -352,7 +352,7 @@ int target_emulate_set_target_port_groups(struct se_task *task) | ||
60 | } | ||
61 | |||
62 | out: | ||
63 | - transport_kunmap_first_data_page(cmd); | ||
64 | + transport_kunmap_data_sg(cmd); | ||
65 | task->task_scsi_status = GOOD; | ||
66 | transport_complete_task(task, 1); | ||
67 | return 0; | ||
68 | diff --git a/drivers/target/target_core_cdb.c b/drivers/target/target_core_cdb.c | ||
69 | index 251e48f..8facd33 100644 | ||
70 | --- a/drivers/target/target_core_cdb.c | ||
71 | +++ b/drivers/target/target_core_cdb.c | ||
72 | @@ -82,7 +82,7 @@ target_emulate_inquiry_std(struct se_cmd *cmd) | ||
73 | return -EINVAL; | ||
74 | } | ||
75 | |||
76 | - buf = transport_kmap_first_data_page(cmd); | ||
77 | + buf = transport_kmap_data_sg(cmd); | ||
78 | |||
79 | if (dev == tpg->tpg_virt_lun0.lun_se_dev) { | ||
80 | buf[0] = 0x3f; /* Not connected */ | ||
81 | @@ -135,7 +135,7 @@ target_emulate_inquiry_std(struct se_cmd *cmd) | ||
82 | buf[4] = 31; /* Set additional length to 31 */ | ||
83 | |||
84 | out: | ||
85 | - transport_kunmap_first_data_page(cmd); | ||
86 | + transport_kunmap_data_sg(cmd); | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | @@ -726,7 +726,7 @@ int target_emulate_inquiry(struct se_task *task) | ||
91 | return -EINVAL; | ||
92 | } | ||
93 | |||
94 | - buf = transport_kmap_first_data_page(cmd); | ||
95 | + buf = transport_kmap_data_sg(cmd); | ||
96 | |||
97 | buf[0] = dev->transport->get_device_type(dev); | ||
98 | |||
99 | @@ -743,7 +743,7 @@ int target_emulate_inquiry(struct se_task *task) | ||
100 | ret = -EINVAL; | ||
101 | |||
102 | out_unmap: | ||
103 | - transport_kunmap_first_data_page(cmd); | ||
104 | + transport_kunmap_data_sg(cmd); | ||
105 | out: | ||
106 | if (!ret) { | ||
107 | task->task_scsi_status = GOOD; | ||
108 | @@ -765,7 +765,7 @@ int target_emulate_readcapacity(struct se_task *task) | ||
109 | else | ||
110 | blocks = (u32)blocks_long; | ||
111 | |||
112 | - buf = transport_kmap_first_data_page(cmd); | ||
113 | + buf = transport_kmap_data_sg(cmd); | ||
114 | |||
115 | buf[0] = (blocks >> 24) & 0xff; | ||
116 | buf[1] = (blocks >> 16) & 0xff; | ||
117 | @@ -781,7 +781,7 @@ int target_emulate_readcapacity(struct se_task *task) | ||
118 | if (dev->se_sub_dev->se_dev_attrib.emulate_tpu || dev->se_sub_dev->se_dev_attrib.emulate_tpws) | ||
119 | put_unaligned_be32(0xFFFFFFFF, &buf[0]); | ||
120 | |||
121 | - transport_kunmap_first_data_page(cmd); | ||
122 | + transport_kunmap_data_sg(cmd); | ||
123 | |||
124 | task->task_scsi_status = GOOD; | ||
125 | transport_complete_task(task, 1); | ||
126 | @@ -795,7 +795,7 @@ int target_emulate_readcapacity_16(struct se_task *task) | ||
127 | unsigned char *buf; | ||
128 | unsigned long long blocks = dev->transport->get_blocks(dev); | ||
129 | |||
130 | - buf = transport_kmap_first_data_page(cmd); | ||
131 | + buf = transport_kmap_data_sg(cmd); | ||
132 | |||
133 | buf[0] = (blocks >> 56) & 0xff; | ||
134 | buf[1] = (blocks >> 48) & 0xff; | ||
135 | @@ -816,7 +816,7 @@ int target_emulate_readcapacity_16(struct se_task *task) | ||
136 | if (dev->se_sub_dev->se_dev_attrib.emulate_tpu || dev->se_sub_dev->se_dev_attrib.emulate_tpws) | ||
137 | buf[14] = 0x80; | ||
138 | |||
139 | - transport_kunmap_first_data_page(cmd); | ||
140 | + transport_kunmap_data_sg(cmd); | ||
141 | |||
142 | task->task_scsi_status = GOOD; | ||
143 | transport_complete_task(task, 1); | ||
144 | @@ -1029,9 +1029,9 @@ int target_emulate_modesense(struct se_task *task) | ||
145 | offset = cmd->data_length; | ||
146 | } | ||
147 | |||
148 | - rbuf = transport_kmap_first_data_page(cmd); | ||
149 | + rbuf = transport_kmap_data_sg(cmd); | ||
150 | memcpy(rbuf, buf, offset); | ||
151 | - transport_kunmap_first_data_page(cmd); | ||
152 | + transport_kunmap_data_sg(cmd); | ||
153 | |||
154 | task->task_scsi_status = GOOD; | ||
155 | transport_complete_task(task, 1); | ||
156 | @@ -1053,7 +1053,7 @@ int target_emulate_request_sense(struct se_task *task) | ||
157 | return -ENOSYS; | ||
158 | } | ||
159 | |||
160 | - buf = transport_kmap_first_data_page(cmd); | ||
161 | + buf = transport_kmap_data_sg(cmd); | ||
162 | |||
163 | if (!core_scsi3_ua_clear_for_request_sense(cmd, &ua_asc, &ua_ascq)) { | ||
164 | /* | ||
165 | @@ -1099,7 +1099,7 @@ int target_emulate_request_sense(struct se_task *task) | ||
166 | } | ||
167 | |||
168 | end: | ||
169 | - transport_kunmap_first_data_page(cmd); | ||
170 | + transport_kunmap_data_sg(cmd); | ||
171 | task->task_scsi_status = GOOD; | ||
172 | transport_complete_task(task, 1); | ||
173 | return 0; | ||
174 | @@ -1133,7 +1133,7 @@ int target_emulate_unmap(struct se_task *task) | ||
175 | dl = get_unaligned_be16(&cdb[0]); | ||
176 | bd_dl = get_unaligned_be16(&cdb[2]); | ||
177 | |||
178 | - buf = transport_kmap_first_data_page(cmd); | ||
179 | + buf = transport_kmap_data_sg(cmd); | ||
180 | |||
181 | ptr = &buf[offset]; | ||
182 | pr_debug("UNMAP: Sub: %s Using dl: %hu bd_dl: %hu size: %hu" | ||
183 | @@ -1157,7 +1157,7 @@ int target_emulate_unmap(struct se_task *task) | ||
184 | } | ||
185 | |||
186 | err: | ||
187 | - transport_kunmap_first_data_page(cmd); | ||
188 | + transport_kunmap_data_sg(cmd); | ||
189 | if (!ret) { | ||
190 | task->task_scsi_status = GOOD; | ||
191 | transport_complete_task(task, 1); | ||
192 | diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c | ||
193 | index 9b86394..19f8aca 100644 | ||
194 | --- a/drivers/target/target_core_device.c | ||
195 | +++ b/drivers/target/target_core_device.c | ||
196 | @@ -658,7 +658,7 @@ int target_report_luns(struct se_task *se_task) | ||
197 | unsigned char *buf; | ||
198 | u32 cdb_offset = 0, lun_count = 0, offset = 8, i; | ||
199 | |||
200 | - buf = transport_kmap_first_data_page(se_cmd); | ||
201 | + buf = (unsigned char *) transport_kmap_data_sg(se_cmd); | ||
202 | |||
203 | /* | ||
204 | * If no struct se_session pointer is present, this struct se_cmd is | ||
205 | @@ -696,7 +696,7 @@ int target_report_luns(struct se_task *se_task) | ||
206 | * See SPC3 r07, page 159. | ||
207 | */ | ||
208 | done: | ||
209 | - transport_kunmap_first_data_page(se_cmd); | ||
210 | + transport_kunmap_data_sg(se_cmd); | ||
211 | lun_count *= 8; | ||
212 | buf[0] = ((lun_count >> 24) & 0xff); | ||
213 | buf[1] = ((lun_count >> 16) & 0xff); | ||
214 | diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c | ||
215 | index 9119d92..778c1a6 100644 | ||
216 | --- a/drivers/target/target_core_pr.c | ||
217 | +++ b/drivers/target/target_core_pr.c | ||
218 | @@ -1538,7 +1538,7 @@ static int core_scsi3_decode_spec_i_port( | ||
219 | tidh_new->dest_local_nexus = 1; | ||
220 | list_add_tail(&tidh_new->dest_list, &tid_dest_list); | ||
221 | |||
222 | - buf = transport_kmap_first_data_page(cmd); | ||
223 | + buf = transport_kmap_data_sg(cmd); | ||
224 | /* | ||
225 | * For a PERSISTENT RESERVE OUT specify initiator ports payload, | ||
226 | * first extract TransportID Parameter Data Length, and make sure | ||
227 | @@ -1789,7 +1789,7 @@ static int core_scsi3_decode_spec_i_port( | ||
228 | |||
229 | } | ||
230 | |||
231 | - transport_kunmap_first_data_page(cmd); | ||
232 | + transport_kunmap_data_sg(cmd); | ||
233 | |||
234 | /* | ||
235 | * Go ahead and create a registrations from tid_dest_list for the | ||
236 | @@ -1837,7 +1837,7 @@ static int core_scsi3_decode_spec_i_port( | ||
237 | |||
238 | return 0; | ||
239 | out: | ||
240 | - transport_kunmap_first_data_page(cmd); | ||
241 | + transport_kunmap_data_sg(cmd); | ||
242 | /* | ||
243 | * For the failure case, release everything from tid_dest_list | ||
244 | * including *dest_pr_reg and the configfs dependances.. | ||
245 | @@ -3429,14 +3429,14 @@ static int core_scsi3_emulate_pro_register_and_move( | ||
246 | * will be moved to for the TransportID containing SCSI initiator WWN | ||
247 | * information. | ||
248 | */ | ||
249 | - buf = transport_kmap_first_data_page(cmd); | ||
250 | + buf = transport_kmap_data_sg(cmd); | ||
251 | rtpi = (buf[18] & 0xff) << 8; | ||
252 | rtpi |= buf[19] & 0xff; | ||
253 | tid_len = (buf[20] & 0xff) << 24; | ||
254 | tid_len |= (buf[21] & 0xff) << 16; | ||
255 | tid_len |= (buf[22] & 0xff) << 8; | ||
256 | tid_len |= buf[23] & 0xff; | ||
257 | - transport_kunmap_first_data_page(cmd); | ||
258 | + transport_kunmap_data_sg(cmd); | ||
259 | buf = NULL; | ||
260 | |||
261 | if ((tid_len + 24) != cmd->data_length) { | ||
262 | @@ -3488,7 +3488,7 @@ static int core_scsi3_emulate_pro_register_and_move( | ||
263 | return -EINVAL; | ||
264 | } | ||
265 | |||
266 | - buf = transport_kmap_first_data_page(cmd); | ||
267 | + buf = transport_kmap_data_sg(cmd); | ||
268 | proto_ident = (buf[24] & 0x0f); | ||
269 | #if 0 | ||
270 | pr_debug("SPC-3 PR REGISTER_AND_MOVE: Extracted Protocol Identifier:" | ||
271 | @@ -3522,7 +3522,7 @@ static int core_scsi3_emulate_pro_register_and_move( | ||
272 | goto out; | ||
273 | } | ||
274 | |||
275 | - transport_kunmap_first_data_page(cmd); | ||
276 | + transport_kunmap_data_sg(cmd); | ||
277 | buf = NULL; | ||
278 | |||
279 | pr_debug("SPC-3 PR [%s] Extracted initiator %s identifier: %s" | ||
280 | @@ -3787,13 +3787,13 @@ after_iport_check: | ||
281 | " REGISTER_AND_MOVE\n"); | ||
282 | } | ||
283 | |||
284 | - transport_kunmap_first_data_page(cmd); | ||
285 | + transport_kunmap_data_sg(cmd); | ||
286 | |||
287 | core_scsi3_put_pr_reg(dest_pr_reg); | ||
288 | return 0; | ||
289 | out: | ||
290 | if (buf) | ||
291 | - transport_kunmap_first_data_page(cmd); | ||
292 | + transport_kunmap_data_sg(cmd); | ||
293 | if (dest_se_deve) | ||
294 | core_scsi3_lunacl_undepend_item(dest_se_deve); | ||
295 | if (dest_node_acl) | ||
296 | @@ -3867,7 +3867,7 @@ int target_scsi3_emulate_pr_out(struct se_task *task) | ||
297 | scope = (cdb[2] & 0xf0); | ||
298 | type = (cdb[2] & 0x0f); | ||
299 | |||
300 | - buf = transport_kmap_first_data_page(cmd); | ||
301 | + buf = transport_kmap_data_sg(cmd); | ||
302 | /* | ||
303 | * From PERSISTENT_RESERVE_OUT parameter list (payload) | ||
304 | */ | ||
305 | @@ -3885,7 +3885,7 @@ int target_scsi3_emulate_pr_out(struct se_task *task) | ||
306 | aptpl = (buf[17] & 0x01); | ||
307 | unreg = (buf[17] & 0x02); | ||
308 | } | ||
309 | - transport_kunmap_first_data_page(cmd); | ||
310 | + transport_kunmap_data_sg(cmd); | ||
311 | buf = NULL; | ||
312 | |||
313 | /* | ||
314 | @@ -3985,7 +3985,7 @@ static int core_scsi3_pri_read_keys(struct se_cmd *cmd) | ||
315 | return -EINVAL; | ||
316 | } | ||
317 | |||
318 | - buf = transport_kmap_first_data_page(cmd); | ||
319 | + buf = transport_kmap_data_sg(cmd); | ||
320 | buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); | ||
321 | buf[1] = ((su_dev->t10_pr.pr_generation >> 16) & 0xff); | ||
322 | buf[2] = ((su_dev->t10_pr.pr_generation >> 8) & 0xff); | ||
323 | @@ -4019,7 +4019,7 @@ static int core_scsi3_pri_read_keys(struct se_cmd *cmd) | ||
324 | buf[6] = ((add_len >> 8) & 0xff); | ||
325 | buf[7] = (add_len & 0xff); | ||
326 | |||
327 | - transport_kunmap_first_data_page(cmd); | ||
328 | + transport_kunmap_data_sg(cmd); | ||
329 | |||
330 | return 0; | ||
331 | } | ||
332 | @@ -4045,7 +4045,7 @@ static int core_scsi3_pri_read_reservation(struct se_cmd *cmd) | ||
333 | return -EINVAL; | ||
334 | } | ||
335 | |||
336 | - buf = transport_kmap_first_data_page(cmd); | ||
337 | + buf = transport_kmap_data_sg(cmd); | ||
338 | buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); | ||
339 | buf[1] = ((su_dev->t10_pr.pr_generation >> 16) & 0xff); | ||
340 | buf[2] = ((su_dev->t10_pr.pr_generation >> 8) & 0xff); | ||
341 | @@ -4104,7 +4104,7 @@ static int core_scsi3_pri_read_reservation(struct se_cmd *cmd) | ||
342 | |||
343 | err: | ||
344 | spin_unlock(&se_dev->dev_reservation_lock); | ||
345 | - transport_kunmap_first_data_page(cmd); | ||
346 | + transport_kunmap_data_sg(cmd); | ||
347 | |||
348 | return 0; | ||
349 | } | ||
350 | @@ -4128,7 +4128,7 @@ static int core_scsi3_pri_report_capabilities(struct se_cmd *cmd) | ||
351 | return -EINVAL; | ||
352 | } | ||
353 | |||
354 | - buf = transport_kmap_first_data_page(cmd); | ||
355 | + buf = transport_kmap_data_sg(cmd); | ||
356 | |||
357 | buf[0] = ((add_len << 8) & 0xff); | ||
358 | buf[1] = (add_len & 0xff); | ||
359 | @@ -4160,7 +4160,7 @@ static int core_scsi3_pri_report_capabilities(struct se_cmd *cmd) | ||
360 | buf[4] |= 0x02; /* PR_TYPE_WRITE_EXCLUSIVE */ | ||
361 | buf[5] |= 0x01; /* PR_TYPE_EXCLUSIVE_ACCESS_ALLREG */ | ||
362 | |||
363 | - transport_kunmap_first_data_page(cmd); | ||
364 | + transport_kunmap_data_sg(cmd); | ||
365 | |||
366 | return 0; | ||
367 | } | ||
368 | @@ -4190,7 +4190,7 @@ static int core_scsi3_pri_read_full_status(struct se_cmd *cmd) | ||
369 | return -EINVAL; | ||
370 | } | ||
371 | |||
372 | - buf = transport_kmap_first_data_page(cmd); | ||
373 | + buf = transport_kmap_data_sg(cmd); | ||
374 | |||
375 | buf[0] = ((su_dev->t10_pr.pr_generation >> 24) & 0xff); | ||
376 | buf[1] = ((su_dev->t10_pr.pr_generation >> 16) & 0xff); | ||
377 | @@ -4311,7 +4311,7 @@ static int core_scsi3_pri_read_full_status(struct se_cmd *cmd) | ||
378 | buf[6] = ((add_len >> 8) & 0xff); | ||
379 | buf[7] = (add_len & 0xff); | ||
380 | |||
381 | - transport_kunmap_first_data_page(cmd); | ||
382 | + transport_kunmap_data_sg(cmd); | ||
383 | |||
384 | return 0; | ||
385 | } | ||
386 | diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c | ||
387 | index 8b15e56..5c12137 100644 | ||
388 | --- a/drivers/target/target_core_pscsi.c | ||
389 | +++ b/drivers/target/target_core_pscsi.c | ||
390 | @@ -695,7 +695,7 @@ static int pscsi_transport_complete(struct se_task *task) | ||
391 | |||
392 | if (task->task_se_cmd->se_deve->lun_flags & | ||
393 | TRANSPORT_LUNFLAGS_READ_ONLY) { | ||
394 | - unsigned char *buf = transport_kmap_first_data_page(task->task_se_cmd); | ||
395 | + unsigned char *buf = transport_kmap_data_sg(task->task_se_cmd); | ||
396 | |||
397 | if (cdb[0] == MODE_SENSE_10) { | ||
398 | if (!(buf[3] & 0x80)) | ||
399 | @@ -705,7 +705,7 @@ static int pscsi_transport_complete(struct se_task *task) | ||
400 | buf[2] |= 0x80; | ||
401 | } | ||
402 | |||
403 | - transport_kunmap_first_data_page(task->task_se_cmd); | ||
404 | + transport_kunmap_data_sg(task->task_se_cmd); | ||
405 | } | ||
406 | } | ||
407 | after_mode_sense: | ||
408 | diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c | ||
409 | index 861628e..e4ddb93 100644 | ||
410 | --- a/drivers/target/target_core_transport.c | ||
411 | +++ b/drivers/target/target_core_transport.c | ||
412 | @@ -3053,11 +3053,6 @@ static int transport_generic_cmd_sequencer( | ||
413 | (cmd->se_cmd_flags & SCF_SCSI_DATA_SG_IO_CDB))) | ||
414 | goto out_unsupported_cdb; | ||
415 | |||
416 | - /* Let's limit control cdbs to a page, for simplicity's sake. */ | ||
417 | - if ((cmd->se_cmd_flags & SCF_SCSI_CONTROL_SG_IO_CDB) && | ||
418 | - size > PAGE_SIZE) | ||
419 | - goto out_invalid_cdb_field; | ||
420 | - | ||
421 | transport_set_supported_SAM_opcode(cmd); | ||
422 | return ret; | ||
423 | |||
424 | @@ -3435,9 +3430,11 @@ int transport_generic_map_mem_to_cmd( | ||
425 | } | ||
426 | EXPORT_SYMBOL(transport_generic_map_mem_to_cmd); | ||
427 | |||
428 | -void *transport_kmap_first_data_page(struct se_cmd *cmd) | ||
429 | +void *transport_kmap_data_sg(struct se_cmd *cmd) | ||
430 | { | ||
431 | struct scatterlist *sg = cmd->t_data_sg; | ||
432 | + struct page **pages; | ||
433 | + int i; | ||
434 | |||
435 | BUG_ON(!sg); | ||
436 | /* | ||
437 | @@ -3445,15 +3442,41 @@ void *transport_kmap_first_data_page(struct se_cmd *cmd) | ||
438 | * tcm_loop who may be using a contig buffer from the SCSI midlayer for | ||
439 | * control CDBs passed as SGLs via transport_generic_map_mem_to_cmd() | ||
440 | */ | ||
441 | - return kmap(sg_page(sg)) + sg->offset; | ||
442 | + if (!cmd->t_data_nents) | ||
443 | + return NULL; | ||
444 | + else if (cmd->t_data_nents == 1) | ||
445 | + return kmap(sg_page(sg)) + sg->offset; | ||
446 | + | ||
447 | + /* >1 page. use vmap */ | ||
448 | + pages = kmalloc(sizeof(*pages) * cmd->t_data_nents, GFP_KERNEL); | ||
449 | + if (!pages) | ||
450 | + return NULL; | ||
451 | + | ||
452 | + /* convert sg[] to pages[] */ | ||
453 | + for_each_sg(cmd->t_data_sg, sg, cmd->t_data_nents, i) { | ||
454 | + pages[i] = sg_page(sg); | ||
455 | + } | ||
456 | + | ||
457 | + cmd->t_data_vmap = vmap(pages, cmd->t_data_nents, VM_MAP, PAGE_KERNEL); | ||
458 | + kfree(pages); | ||
459 | + if (!cmd->t_data_vmap) | ||
460 | + return NULL; | ||
461 | + | ||
462 | + return cmd->t_data_vmap + cmd->t_data_sg[0].offset; | ||
463 | } | ||
464 | -EXPORT_SYMBOL(transport_kmap_first_data_page); | ||
465 | +EXPORT_SYMBOL(transport_kmap_data_sg); | ||
466 | |||
467 | -void transport_kunmap_first_data_page(struct se_cmd *cmd) | ||
468 | +void transport_kunmap_data_sg(struct se_cmd *cmd) | ||
469 | { | ||
470 | - kunmap(sg_page(cmd->t_data_sg)); | ||
471 | + if (!cmd->t_data_nents) | ||
472 | + return; | ||
473 | + else if (cmd->t_data_nents == 1) | ||
474 | + kunmap(sg_page(cmd->t_data_sg)); | ||
475 | + | ||
476 | + vunmap(cmd->t_data_vmap); | ||
477 | + cmd->t_data_vmap = NULL; | ||
478 | } | ||
479 | -EXPORT_SYMBOL(transport_kunmap_first_data_page); | ||
480 | +EXPORT_SYMBOL(transport_kunmap_data_sg); | ||
481 | |||
482 | static int | ||
483 | transport_generic_get_mem(struct se_cmd *cmd) | ||
484 | diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h | ||
485 | index a79886c..94bbec3 100644 | ||
486 | --- a/include/target/target_core_base.h | ||
487 | +++ b/include/target/target_core_base.h | ||
488 | @@ -486,6 +486,7 @@ struct se_cmd { | ||
489 | |||
490 | struct scatterlist *t_data_sg; | ||
491 | unsigned int t_data_nents; | ||
492 | + void *t_data_vmap; | ||
493 | struct scatterlist *t_bidi_data_sg; | ||
494 | unsigned int t_bidi_data_nents; | ||
495 | |||
496 | diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h | ||
497 | index dac4f2d..72751e8 100644 | ||
498 | --- a/include/target/target_core_transport.h | ||
499 | +++ b/include/target/target_core_transport.h | ||
500 | @@ -129,8 +129,8 @@ extern void transport_init_se_cmd(struct se_cmd *, | ||
501 | struct target_core_fabric_ops *, | ||
502 | struct se_session *, u32, int, int, | ||
503 | unsigned char *); | ||
504 | -void *transport_kmap_first_data_page(struct se_cmd *cmd); | ||
505 | -void transport_kunmap_first_data_page(struct se_cmd *cmd); | ||
506 | +void *transport_kmap_data_sg(struct se_cmd *); | ||
507 | +void transport_kunmap_data_sg(struct se_cmd *); | ||
508 | extern int transport_generic_allocate_tasks(struct se_cmd *, unsigned char *); | ||
509 | extern int transport_handle_cdb_direct(struct se_cmd *); | ||
510 | extern int transport_generic_handle_cdb_map(struct se_cmd *); | ||
511 | -- | ||
512 | 1.7.7.4 | ||
513 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0046-ASoC-wm8962-Fix-sidetone-enumeration-texts.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0046-ASoC-wm8962-Fix-sidetone-enumeration-texts.patch new file mode 100644 index 00000000..c0096a2e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0046-ASoC-wm8962-Fix-sidetone-enumeration-texts.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 8fb548906ee57c17c6a770007075b92b1a9d89b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
3 | Date: Mon, 13 Feb 2012 22:00:47 -0800 | ||
4 | Subject: [PATCH 46/73] ASoC: wm8962: Fix sidetone enumeration texts | ||
5 | |||
6 | commit 31794bc37bf2db84f085da52b72bfba65739b2d2 upstream. | ||
7 | |||
8 | The sidetone enumeration texts have left and right swapped. | ||
9 | |||
10 | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
11 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
12 | --- | ||
13 | sound/soc/codecs/wm8962.c | 2 +- | ||
14 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
15 | |||
16 | diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c | ||
17 | index d795294..07dd7eb 100644 | ||
18 | --- a/sound/soc/codecs/wm8962.c | ||
19 | +++ b/sound/soc/codecs/wm8962.c | ||
20 | @@ -2559,7 +2559,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w, | ||
21 | return 0; | ||
22 | } | ||
23 | |||
24 | -static const char *st_text[] = { "None", "Right", "Left" }; | ||
25 | +static const char *st_text[] = { "None", "Left", "Right" }; | ||
26 | |||
27 | static const struct soc_enum str_enum = | ||
28 | SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); | ||
29 | -- | ||
30 | 1.7.7.4 | ||
31 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0047-ALSA-hda-realtek-Fix-overflow-of-vol-sw-check-bitmap.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0047-ALSA-hda-realtek-Fix-overflow-of-vol-sw-check-bitmap.patch new file mode 100644 index 00000000..1c122649 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0047-ALSA-hda-realtek-Fix-overflow-of-vol-sw-check-bitmap.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 0da0c63e05b5f7de8298753d79304cd137351590 Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Thu, 16 Feb 2012 16:38:07 +0100 | ||
4 | Subject: [PATCH 47/73] ALSA: hda/realtek - Fix overflow of vol/sw check | ||
5 | bitmap | ||
6 | |||
7 | commit c14c95f62ecb8710af14ae0d48e01991b70bb6f4 upstream. | ||
8 | |||
9 | The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix | ||
10 | missing volume controls with ALC260] is too narrow for some codecs, | ||
11 | which may have more NIDs than 0x20, thus it may overflow the bitmap | ||
12 | array on them. | ||
13 | |||
14 | Just double the number to cover all and also add a sanity-check code | ||
15 | to be safer. | ||
16 | |||
17 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
19 | --- | ||
20 | sound/pci/hda/patch_realtek.c | 11 ++++++++--- | ||
21 | 1 files changed, 8 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | ||
24 | index 9c197d4..ceda0ac 100644 | ||
25 | --- a/sound/pci/hda/patch_realtek.c | ||
26 | +++ b/sound/pci/hda/patch_realtek.c | ||
27 | @@ -79,6 +79,8 @@ enum { | ||
28 | ALC_AUTOMUTE_MIXER, /* mute/unmute mixer widget AMP */ | ||
29 | }; | ||
30 | |||
31 | +#define MAX_VOL_NIDS 0x40 | ||
32 | + | ||
33 | struct alc_spec { | ||
34 | /* codec parameterization */ | ||
35 | const struct snd_kcontrol_new *mixers[5]; /* mixer arrays */ | ||
36 | @@ -117,8 +119,8 @@ struct alc_spec { | ||
37 | const hda_nid_t *capsrc_nids; | ||
38 | hda_nid_t dig_in_nid; /* digital-in NID; optional */ | ||
39 | hda_nid_t mixer_nid; /* analog-mixer NID */ | ||
40 | - DECLARE_BITMAP(vol_ctls, 0x20 << 1); | ||
41 | - DECLARE_BITMAP(sw_ctls, 0x20 << 1); | ||
42 | + DECLARE_BITMAP(vol_ctls, MAX_VOL_NIDS << 1); | ||
43 | + DECLARE_BITMAP(sw_ctls, MAX_VOL_NIDS << 1); | ||
44 | |||
45 | /* capture setup for dynamic dual-adc switch */ | ||
46 | hda_nid_t cur_adc; | ||
47 | @@ -3068,7 +3070,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) | ||
48 | static inline unsigned int get_ctl_pos(unsigned int data) | ||
49 | { | ||
50 | hda_nid_t nid = get_amp_nid_(data); | ||
51 | - unsigned int dir = get_amp_direction_(data); | ||
52 | + unsigned int dir; | ||
53 | + if (snd_BUG_ON(nid >= MAX_VOL_NIDS)) | ||
54 | + return 0; | ||
55 | + dir = get_amp_direction_(data); | ||
56 | return (nid << 1) | dir; | ||
57 | } | ||
58 | |||
59 | -- | ||
60 | 1.7.7.4 | ||
61 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0048-ALSA-hda-realtek-Fix-surround-output-regression-on-A.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0048-ALSA-hda-realtek-Fix-surround-output-regression-on-A.patch new file mode 100644 index 00000000..b30fe7a9 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0048-ALSA-hda-realtek-Fix-surround-output-regression-on-A.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 8f421627d178f1346bb68c9e7b32b2bd5844ce1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Takashi Iwai <tiwai@suse.de> | ||
3 | Date: Fri, 17 Feb 2012 10:12:38 +0100 | ||
4 | Subject: [PATCH 48/73] ALSA: hda/realtek - Fix surround output regression on | ||
5 | Acer Aspire 5935 | ||
6 | |||
7 | commit ef8d60fb79614a86a82720dc2402631dbcafb315 upstream. | ||
8 | |||
9 | The previous fix for the speaker on Acer Aspire 59135 introduced | ||
10 | another problem for surround outputs. It changed the connections on | ||
11 | the line-in/mic pins for limiting the routes, but it left the modified | ||
12 | connections. Thus wrong connection indices were written when set to | ||
13 | 4ch or 6ch mode. | ||
14 | |||
15 | This patch fixes it by restoring the right connections just after | ||
16 | parsing the tree but before the initialization. | ||
17 | |||
18 | Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740 | ||
19 | |||
20 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
22 | --- | ||
23 | sound/pci/hda/patch_realtek.c | 8 ++++++++ | ||
24 | 1 files changed, 8 insertions(+), 0 deletions(-) | ||
25 | |||
26 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | ||
27 | index ceda0ac..c4c8d78 100644 | ||
28 | --- a/sound/pci/hda/patch_realtek.c | ||
29 | +++ b/sound/pci/hda/patch_realtek.c | ||
30 | @@ -4229,12 +4229,20 @@ static void alc889_fixup_dac_route(struct hda_codec *codec, | ||
31 | const struct alc_fixup *fix, int action) | ||
32 | { | ||
33 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { | ||
34 | + /* fake the connections during parsing the tree */ | ||
35 | hda_nid_t conn1[2] = { 0x0c, 0x0d }; | ||
36 | hda_nid_t conn2[2] = { 0x0e, 0x0f }; | ||
37 | snd_hda_override_conn_list(codec, 0x14, 2, conn1); | ||
38 | snd_hda_override_conn_list(codec, 0x15, 2, conn1); | ||
39 | snd_hda_override_conn_list(codec, 0x18, 2, conn2); | ||
40 | snd_hda_override_conn_list(codec, 0x1a, 2, conn2); | ||
41 | + } else if (action == ALC_FIXUP_ACT_PROBE) { | ||
42 | + /* restore the connections */ | ||
43 | + hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; | ||
44 | + snd_hda_override_conn_list(codec, 0x14, 5, conn); | ||
45 | + snd_hda_override_conn_list(codec, 0x15, 5, conn); | ||
46 | + snd_hda_override_conn_list(codec, 0x18, 5, conn); | ||
47 | + snd_hda_override_conn_list(codec, 0x1a, 5, conn); | ||
48 | } | ||
49 | } | ||
50 | |||
51 | -- | ||
52 | 1.7.7.4 | ||
53 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0049-NOMMU-Lock-i_mmap_mutex-for-access-to-the-VMA-prio-l.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0049-NOMMU-Lock-i_mmap_mutex-for-access-to-the-VMA-prio-l.patch new file mode 100644 index 00000000..b8b70032 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0049-NOMMU-Lock-i_mmap_mutex-for-access-to-the-VMA-prio-l.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From 8f6c3d1a5873d9190bd6259357900ddebc308626 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Howells <dhowells@redhat.com> | ||
3 | Date: Thu, 23 Feb 2012 13:50:35 +0000 | ||
4 | Subject: [PATCH 49/73] NOMMU: Lock i_mmap_mutex for access to the VMA prio | ||
5 | list | ||
6 | |||
7 | commit 918e556ec214ed2f584e4cac56d7b29e4bb6bf27 upstream. | ||
8 | |||
9 | Lock i_mmap_mutex for access to the VMA prio list to prevent concurrent | ||
10 | access. Currently, certain parts of the mmap handling are protected by | ||
11 | the region mutex, but not all. | ||
12 | |||
13 | Reported-by: Al Viro <viro@zeniv.linux.org.uk> | ||
14 | Signed-off-by: David Howells <dhowells@redhat.com> | ||
15 | Acked-by: Al Viro <viro@zeniv.linux.org.uk> | ||
16 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
18 | --- | ||
19 | mm/nommu.c | 7 +++++++ | ||
20 | 1 files changed, 7 insertions(+), 0 deletions(-) | ||
21 | |||
22 | diff --git a/mm/nommu.c b/mm/nommu.c | ||
23 | index b982290..ee7e57e 100644 | ||
24 | --- a/mm/nommu.c | ||
25 | +++ b/mm/nommu.c | ||
26 | @@ -696,9 +696,11 @@ static void add_vma_to_mm(struct mm_struct *mm, struct vm_area_struct *vma) | ||
27 | if (vma->vm_file) { | ||
28 | mapping = vma->vm_file->f_mapping; | ||
29 | |||
30 | + mutex_lock(&mapping->i_mmap_mutex); | ||
31 | flush_dcache_mmap_lock(mapping); | ||
32 | vma_prio_tree_insert(vma, &mapping->i_mmap); | ||
33 | flush_dcache_mmap_unlock(mapping); | ||
34 | + mutex_unlock(&mapping->i_mmap_mutex); | ||
35 | } | ||
36 | |||
37 | /* add the VMA to the tree */ | ||
38 | @@ -760,9 +762,11 @@ static void delete_vma_from_mm(struct vm_area_struct *vma) | ||
39 | if (vma->vm_file) { | ||
40 | mapping = vma->vm_file->f_mapping; | ||
41 | |||
42 | + mutex_lock(&mapping->i_mmap_mutex); | ||
43 | flush_dcache_mmap_lock(mapping); | ||
44 | vma_prio_tree_remove(vma, &mapping->i_mmap); | ||
45 | flush_dcache_mmap_unlock(mapping); | ||
46 | + mutex_unlock(&mapping->i_mmap_mutex); | ||
47 | } | ||
48 | |||
49 | /* remove from the MM's tree and list */ | ||
50 | @@ -2052,6 +2056,7 @@ int nommu_shrink_inode_mappings(struct inode *inode, size_t size, | ||
51 | high = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
52 | |||
53 | down_write(&nommu_region_sem); | ||
54 | + mutex_lock(&inode->i_mapping->i_mmap_mutex); | ||
55 | |||
56 | /* search for VMAs that fall within the dead zone */ | ||
57 | vma_prio_tree_foreach(vma, &iter, &inode->i_mapping->i_mmap, | ||
58 | @@ -2059,6 +2064,7 @@ int nommu_shrink_inode_mappings(struct inode *inode, size_t size, | ||
59 | /* found one - only interested if it's shared out of the page | ||
60 | * cache */ | ||
61 | if (vma->vm_flags & VM_SHARED) { | ||
62 | + mutex_unlock(&inode->i_mapping->i_mmap_mutex); | ||
63 | up_write(&nommu_region_sem); | ||
64 | return -ETXTBSY; /* not quite true, but near enough */ | ||
65 | } | ||
66 | @@ -2086,6 +2092,7 @@ int nommu_shrink_inode_mappings(struct inode *inode, size_t size, | ||
67 | } | ||
68 | } | ||
69 | |||
70 | + mutex_unlock(&inode->i_mapping->i_mmap_mutex); | ||
71 | up_write(&nommu_region_sem); | ||
72 | return 0; | ||
73 | } | ||
74 | -- | ||
75 | 1.7.7.4 | ||
76 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0050-hwmon-max6639-Fix-FAN_FROM_REG-calculation.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0050-hwmon-max6639-Fix-FAN_FROM_REG-calculation.patch new file mode 100644 index 00000000..d83fb349 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0050-hwmon-max6639-Fix-FAN_FROM_REG-calculation.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 8003623db5dfe0819e0fb83863392d6465569d60 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris D Schimp <silverchris@gmail.com> | ||
3 | Date: Mon, 20 Feb 2012 16:59:24 -0500 | ||
4 | Subject: [PATCH 50/73] hwmon: (max6639) Fix FAN_FROM_REG calculation | ||
5 | |||
6 | commit b63d97a36edb1aecf8c13e5f5783feff4d64c24b upstream. | ||
7 | |||
8 | RPM calculation from tachometer value does not depend on PPR. | ||
9 | Also, do not report negative RPM values. | ||
10 | |||
11 | Signed-off-by: Chris D Schimp <silverchris@gmail.com> | ||
12 | [guenter.roeck@ericsson.com: do not report negative RPM values] | ||
13 | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> | ||
14 | Acked-by: Roland Stigge <stigge@antcom.de> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | drivers/hwmon/max6639.c | 6 +++--- | ||
18 | 1 files changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c | ||
21 | index f20d997..1b844db 100644 | ||
22 | --- a/drivers/hwmon/max6639.c | ||
23 | +++ b/drivers/hwmon/max6639.c | ||
24 | @@ -72,8 +72,8 @@ static unsigned short normal_i2c[] = { 0x2c, 0x2e, 0x2f, I2C_CLIENT_END }; | ||
25 | |||
26 | static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 }; | ||
27 | |||
28 | -#define FAN_FROM_REG(val, div, rpm_range) ((val) == 0 ? -1 : \ | ||
29 | - (val) == 255 ? 0 : (rpm_ranges[rpm_range] * 30) / ((div + 1) * (val))) | ||
30 | +#define FAN_FROM_REG(val, rpm_range) ((val) == 0 || (val) == 255 ? \ | ||
31 | + 0 : (rpm_ranges[rpm_range] * 30) / (val)) | ||
32 | #define TEMP_LIMIT_TO_REG(val) SENSORS_LIMIT((val) / 1000, 0, 255) | ||
33 | |||
34 | /* | ||
35 | @@ -333,7 +333,7 @@ static ssize_t show_fan_input(struct device *dev, | ||
36 | return PTR_ERR(data); | ||
37 | |||
38 | return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], | ||
39 | - data->ppr, data->rpm_range)); | ||
40 | + data->rpm_range)); | ||
41 | } | ||
42 | |||
43 | static ssize_t show_alarm(struct device *dev, | ||
44 | -- | ||
45 | 1.7.7.4 | ||
46 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0051-hwmon-max6639-Fix-PPR-register-initialization-to-set.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0051-hwmon-max6639-Fix-PPR-register-initialization-to-set.patch new file mode 100644 index 00000000..effff923 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0051-hwmon-max6639-Fix-PPR-register-initialization-to-set.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From b7b3a0104a6e22b03733289ec2665e2acf19170c Mon Sep 17 00:00:00 2001 | ||
2 | From: Chris D Schimp <silverchris@gmail.com> | ||
3 | Date: Mon, 20 Feb 2012 17:44:59 -0500 | ||
4 | Subject: [PATCH 51/73] hwmon: (max6639) Fix PPR register initialization to | ||
5 | set both channels | ||
6 | |||
7 | commit 2f2da1ac0ba5b6cc6e1957c4da5ff20e67d8442b upstream. | ||
8 | |||
9 | Initialize PPR register for both channels, and set correct PPR register bits. | ||
10 | Also remove unnecessary variable initializations. | ||
11 | |||
12 | Signed-off-by: Chris D Schimp <silverchris@gmail.com> | ||
13 | [guenter.roeck@ericsson.com: Merged two patches into one] | ||
14 | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> | ||
15 | Acked-by: Roland Stigge <stigge@antcom.de> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/hwmon/max6639.c | 16 +++++++++------- | ||
19 | 1 files changed, 9 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c | ||
22 | index 1b844db..8c3df04 100644 | ||
23 | --- a/drivers/hwmon/max6639.c | ||
24 | +++ b/drivers/hwmon/max6639.c | ||
25 | @@ -429,9 +429,9 @@ static int max6639_init_client(struct i2c_client *client) | ||
26 | struct max6639_data *data = i2c_get_clientdata(client); | ||
27 | struct max6639_platform_data *max6639_info = | ||
28 | client->dev.platform_data; | ||
29 | - int i = 0; | ||
30 | + int i; | ||
31 | int rpm_range = 1; /* default: 4000 RPM */ | ||
32 | - int err = 0; | ||
33 | + int err; | ||
34 | |||
35 | /* Reset chip to default values, see below for GCONFIG setup */ | ||
36 | err = i2c_smbus_write_byte_data(client, MAX6639_REG_GCONFIG, | ||
37 | @@ -446,11 +446,6 @@ static int max6639_init_client(struct i2c_client *client) | ||
38 | else | ||
39 | data->ppr = 2; | ||
40 | data->ppr -= 1; | ||
41 | - err = i2c_smbus_write_byte_data(client, | ||
42 | - MAX6639_REG_FAN_PPR(i), | ||
43 | - data->ppr << 5); | ||
44 | - if (err) | ||
45 | - goto exit; | ||
46 | |||
47 | if (max6639_info) | ||
48 | rpm_range = rpm_range_to_reg(max6639_info->rpm_range); | ||
49 | @@ -458,6 +453,13 @@ static int max6639_init_client(struct i2c_client *client) | ||
50 | |||
51 | for (i = 0; i < 2; i++) { | ||
52 | |||
53 | + /* Set Fan pulse per revolution */ | ||
54 | + err = i2c_smbus_write_byte_data(client, | ||
55 | + MAX6639_REG_FAN_PPR(i), | ||
56 | + data->ppr << 6); | ||
57 | + if (err) | ||
58 | + goto exit; | ||
59 | + | ||
60 | /* Fans config PWM, RPM */ | ||
61 | err = i2c_smbus_write_byte_data(client, | ||
62 | MAX6639_REG_FAN_CONFIG1(i), | ||
63 | -- | ||
64 | 1.7.7.4 | ||
65 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0052-hwmon-ads1015-Fix-file-leak-in-probe-function.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0052-hwmon-ads1015-Fix-file-leak-in-probe-function.patch new file mode 100644 index 00000000..9d8c30d0 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0052-hwmon-ads1015-Fix-file-leak-in-probe-function.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 4651f6ab6be87e326d7ed3820be6cedfca323e51 Mon Sep 17 00:00:00 2001 | ||
2 | From: Guenter Roeck <guenter.roeck@ericsson.com> | ||
3 | Date: Wed, 22 Feb 2012 08:13:52 -0800 | ||
4 | Subject: [PATCH 52/73] hwmon: (ads1015) Fix file leak in probe function | ||
5 | |||
6 | commit 363434b5dc352464ac7601547891e5fc9105f124 upstream. | ||
7 | |||
8 | An error while creating sysfs attribute files in the driver's probe function | ||
9 | results in an error abort, but already created files are not removed. This patch | ||
10 | fixes the problem. | ||
11 | |||
12 | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> | ||
13 | Cc: Dirk Eibach <eibach@gdsys.de> | ||
14 | Acked-by: Jean Delvare <khali@linux-fr.org> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | drivers/hwmon/ads1015.c | 3 +-- | ||
18 | 1 files changed, 1 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c | ||
21 | index eedca3c..dd87ae9 100644 | ||
22 | --- a/drivers/hwmon/ads1015.c | ||
23 | +++ b/drivers/hwmon/ads1015.c | ||
24 | @@ -271,7 +271,7 @@ static int ads1015_probe(struct i2c_client *client, | ||
25 | continue; | ||
26 | err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); | ||
27 | if (err) | ||
28 | - goto exit_free; | ||
29 | + goto exit_remove; | ||
30 | } | ||
31 | |||
32 | data->hwmon_dev = hwmon_device_register(&client->dev); | ||
33 | @@ -285,7 +285,6 @@ static int ads1015_probe(struct i2c_client *client, | ||
34 | exit_remove: | ||
35 | for (k = 0; k < ADS1015_CHANNELS; ++k) | ||
36 | device_remove_file(&client->dev, &ads1015_in[k].dev_attr); | ||
37 | -exit_free: | ||
38 | kfree(data); | ||
39 | exit: | ||
40 | return err; | ||
41 | -- | ||
42 | 1.7.7.4 | ||
43 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0053-ARM-omap-fix-oops-in-drivers-video-omap2-dss-dpi.c.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0053-ARM-omap-fix-oops-in-drivers-video-omap2-dss-dpi.c.patch new file mode 100644 index 00000000..2366787d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0053-ARM-omap-fix-oops-in-drivers-video-omap2-dss-dpi.c.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | From 527cba8ab2a3c44aab030065446ebc8dbaa26f9c Mon Sep 17 00:00:00 2001 | ||
2 | From: Russell King <rmk+kernel@arm.linux.org.uk> | ||
3 | Date: Tue, 7 Feb 2012 09:44:55 +0000 | ||
4 | Subject: [PATCH 53/73] ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c | ||
5 | |||
6 | commit 40410715715178ec196314dd0c19150c06901f80 upstream. | ||
7 | |||
8 | When a PMIC is not found, this driver is unable to obtain its | ||
9 | 'vdds_dsi_reg' regulator. Even through its initialization function | ||
10 | fails, other code still calls its enable function, which fails to | ||
11 | check whether it has this regulator before asking for it to be enabled. | ||
12 | |||
13 | This fixes the oops, however a better fix would be to sort out the | ||
14 | upper layers to prevent them calling into a module which failed to | ||
15 | initialize. | ||
16 | |||
17 | Unable to handle kernel NULL pointer dereference at virtual address 00000038 | ||
18 | pgd = c0004000 | ||
19 | [00000038] *pgd=00000000 | ||
20 | Internal error: Oops: 5 [#1] PREEMPT | ||
21 | Modules linked in: | ||
22 | CPU: 0 Not tainted (3.3.0-rc2+ #228) | ||
23 | PC is at regulator_enable+0x10/0x70 | ||
24 | LR is at omapdss_dpi_display_enable+0x54/0x15c | ||
25 | pc : [<c01b9a08>] lr : [<c01af994>] psr: 60000013 | ||
26 | sp : c181fd90 ip : c181fdb0 fp : c181fdac | ||
27 | r10: c042eff0 r9 : 00000060 r8 : c044a164 | ||
28 | r7 : c042c0e4 r6 : c042bd60 r5 : 00000000 r4 : c042bd60 | ||
29 | r3 : c084de48 r2 : c181e000 r1 : c042bd60 r0 : 00000000 | ||
30 | Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel | ||
31 | Control: 10c5387d Table: 80004019 DAC: 00000015 | ||
32 | Process swapper (pid: 1, stack limit = 0xc181e2e8) | ||
33 | Stack: (0xc181fd90 to 0xc1820000) | ||
34 | fd80: c001754c c042bd60 00000000 c042bd60 | ||
35 | fda0: c181fdcc c181fdb0 c01af994 c01b9a04 c0016104 c042bd60 c042bd60 c044a338 | ||
36 | fdc0: c181fdec c181fdd0 c01b5ed0 c01af94c c042bd60 c042bd60 c1aa8000 c1aa8a0c | ||
37 | fde0: c181fe04 c181fdf0 c01b5f54 c01b5ea8 c02fc18c c042bd60 c181fe3c c181fe08 | ||
38 | fe00: c01b2a18 c01b5f48 c01aed14 c02fc160 c01df8ec 00000002 c042bd60 00000003 | ||
39 | fe20: c042bd60 c1aa8000 c1aa8a0c c042eff8 c181fe84 c181fe40 c01b3874 c01b29fc | ||
40 | fe40: c042eff8 00000000 c042f000 c0449db8 c044ed78 00000000 c181fe74 c042eff8 | ||
41 | fe60: c042eff8 c0449db8 c0449db8 c044ed78 00000000 00000000 c181fe94 c181fe88 | ||
42 | fe80: c01e452c c01b35e8 c181feb4 c181fe98 c01e2fdc c01e4518 c042eff8 c0449db8 | ||
43 | fea0: c0449db8 c181fef0 c181fecc c181feb8 c01e3104 c01e2f48 c042eff8 c042f02c | ||
44 | fec0: c181feec c181fed0 c01e3190 c01e30c0 c01e311c 00000000 c01e311c c0449db8 | ||
45 | fee0: c181ff14 c181fef0 c01e1998 c01e3128 c18330a8 c1892290 c04165e8 c0449db8 | ||
46 | ff00: c0449db8 c1ab60c0 c181ff24 c181ff18 c01e2e28 c01e194c c181ff54 c181ff28 | ||
47 | ff20: c01e2218 c01e2e14 c039afed c181ff38 c04165e8 c041660c c0449db8 00000013 | ||
48 | ff40: 00000000 c03ffdb8 c181ff7c c181ff58 c01e384c c01e217c c181ff7c c04165e8 | ||
49 | ff60: c041660c c003a37c 00000013 00000000 c181ff8c c181ff80 c01e488c c01e3790 | ||
50 | ff80: c181ff9c c181ff90 c03ffdcc c01e484c c181ffdc c181ffa0 c0008798 c03ffdc4 | ||
51 | ffa0: c181ffc4 c181ffb0 c0056440 c0187810 c003a37c c04165e8 c041660c c003a37c | ||
52 | ffc0: 00000013 00000000 00000000 00000000 c181fff4 c181ffe0 c03ea284 c0008708 | ||
53 | ffe0: 00000000 c03ea208 00000000 c181fff8 c003a37c c03ea214 1073cec0 01f7ee08 | ||
54 | Backtrace: | ||
55 | [<c01b99f8>] (regulator_enable+0x0/0x70) from [<c01af994>] (omapdss_dpi_display_enable+0x54/0x15c) | ||
56 | r6:c042bd60 r5:00000000 r4:c042bd60 | ||
57 | [<c01af940>] (omapdss_dpi_display_enable+0x0/0x15c) from [<c01b5ed0>] (generic_dpi_panel_power_on+0x34/0x78) | ||
58 | r6:c044a338 r5:c042bd60 r4:c042bd60 | ||
59 | [<c01b5e9c>] (generic_dpi_panel_power_on+0x0/0x78) from [<c01b5f54>] (generic_dpi_panel_enable+0x18/0x28) | ||
60 | r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:c042bd60 | ||
61 | [<c01b5f3c>] (generic_dpi_panel_enable+0x0/0x28) from [<c01b2a18>] (omapfb_init_display+0x28/0x150) | ||
62 | r4:c042bd60 | ||
63 | [<c01b29f0>] (omapfb_init_display+0x0/0x150) from [<c01b3874>] (omapfb_probe+0x298/0x318) | ||
64 | r8:c042eff8 r7:c1aa8a0c r6:c1aa8000 r5:c042bd60 r4:00000003 | ||
65 | [<c01b35dc>] (omapfb_probe+0x0/0x318) from [<c01e452c>] (platform_drv_probe+0x20/0x24) | ||
66 | [<c01e450c>] (platform_drv_probe+0x0/0x24) from [<c01e2fdc>] (really_probe+0xa0/0x178) | ||
67 | [<c01e2f3c>] (really_probe+0x0/0x178) from [<c01e3104>] (driver_probe_device+0x50/0x68) | ||
68 | r7:c181fef0 r6:c0449db8 r5:c0449db8 r4:c042eff8 | ||
69 | [<c01e30b4>] (driver_probe_device+0x0/0x68) from [<c01e3190>] (__driver_attach+0x74/0x98) | ||
70 | r5:c042f02c r4:c042eff8 | ||
71 | [<c01e311c>] (__driver_attach+0x0/0x98) from [<c01e1998>] (bus_for_each_dev+0x58/0x98) | ||
72 | r6:c0449db8 r5:c01e311c r4:00000000 | ||
73 | [<c01e1940>] (bus_for_each_dev+0x0/0x98) from [<c01e2e28>] (driver_attach+0x20/0x28) | ||
74 | r7:c1ab60c0 r6:c0449db8 r5:c0449db8 r4:c04165e8 | ||
75 | [<c01e2e08>] (driver_attach+0x0/0x28) from [<c01e2218>] (bus_add_driver+0xa8/0x22c) | ||
76 | [<c01e2170>] (bus_add_driver+0x0/0x22c) from [<c01e384c>] (driver_register+0xc8/0x154) | ||
77 | [<c01e3784>] (driver_register+0x0/0x154) from [<c01e488c>] (platform_driver_register+0x4c/0x60) | ||
78 | r8:00000000 r7:00000013 r6:c003a37c r5:c041660c r4:c04165e8 | ||
79 | [<c01e4840>] (platform_driver_register+0x0/0x60) from [<c03ffdcc>] (omapfb_init+0x14/0x34) | ||
80 | [<c03ffdb8>] (omapfb_init+0x0/0x34) from [<c0008798>] (do_one_initcall+0x9c/0x164) | ||
81 | [<c00086fc>] (do_one_initcall+0x0/0x164) from [<c03ea284>] (kernel_init+0x7c/0x120) | ||
82 | [<c03ea208>] (kernel_init+0x0/0x120) from [<c003a37c>] (do_exit+0x0/0x2d8) | ||
83 | r5:c03ea208 r4:00000000 | ||
84 | Code: e1a0c00d e92dd870 e24cb004 e24dd004 (e5906038) | ||
85 | ---[ end trace 9e2474c2e193b223 ]--- | ||
86 | |||
87 | Acked-by: Tony Lindgren <tony@atomide.com> | ||
88 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
89 | Cc: Igor Grinberg <grinberg@compulab.co.il> | ||
90 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
91 | --- | ||
92 | drivers/video/omap2/dss/dpi.c | 5 +++++ | ||
93 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
94 | |||
95 | diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c | ||
96 | index 976ac23..c04205c 100644 | ||
97 | --- a/drivers/video/omap2/dss/dpi.c | ||
98 | +++ b/drivers/video/omap2/dss/dpi.c | ||
99 | @@ -180,6 +180,11 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev) | ||
100 | { | ||
101 | int r; | ||
102 | |||
103 | + if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) { | ||
104 | + DSSERR("no VDSS_DSI regulator\n"); | ||
105 | + return -ENODEV; | ||
106 | + } | ||
107 | + | ||
108 | if (dssdev->manager == NULL) { | ||
109 | DSSERR("failed to enable display: no manager\n"); | ||
110 | return -ENODEV; | ||
111 | -- | ||
112 | 1.7.7.4 | ||
113 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0054-ARM-omap-fix-oops-in-arch-arm-mach-omap2-vp.c-when-p.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0054-ARM-omap-fix-oops-in-arch-arm-mach-omap2-vp.c-when-p.patch new file mode 100644 index 00000000..6d70b402 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0054-ARM-omap-fix-oops-in-arch-arm-mach-omap2-vp.c-when-p.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From 758e4d3da5bc2a30a7618cb8f1710e096dac0e53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Russell King <rmk+kernel@arm.linux.org.uk> | ||
3 | Date: Tue, 7 Feb 2012 09:42:11 +0000 | ||
4 | Subject: [PATCH 54/73] ARM: omap: fix oops in arch/arm/mach-omap2/vp.c when | ||
5 | pmic is not found | ||
6 | |||
7 | commit d980e0f8d858c6963d676013e976ff00ab7acb2b upstream. | ||
8 | |||
9 | When the PMIC is not found, voltdm->pmic will be NULL. vp.c's | ||
10 | initialization function tries to dereferences this, which causes an | ||
11 | oops: | ||
12 | |||
13 | Unable to handle kernel NULL pointer dereference at virtual address 00000000 | ||
14 | pgd = c0004000 | ||
15 | [00000000] *pgd=00000000 | ||
16 | Internal error: Oops: 5 [#1] PREEMPT | ||
17 | Modules linked in: | ||
18 | CPU: 0 Not tainted (3.3.0-rc2+ #204) | ||
19 | PC is at omap_vp_init+0x5c/0x15c | ||
20 | LR is at omap_vp_init+0x58/0x15c | ||
21 | pc : [<c03db880>] lr : [<c03db87c>] psr: 60000013 | ||
22 | sp : c181ff30 ip : c181ff68 fp : c181ff64 | ||
23 | r10: c0407808 r9 : c040786c r8 : c0407814 | ||
24 | r7 : c0026868 r6 : c00264fc r5 : c040ad6c r4 : 00000000 | ||
25 | r3 : 00000040 r2 : 000032c8 r1 : 0000fa00 r0 : 000032c8 | ||
26 | Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel | ||
27 | Control: 10c5387d Table: 80004019 DAC: 00000015 | ||
28 | Process swapper (pid: 1, stack limit = 0xc181e2e8) | ||
29 | Stack: (0xc181ff30 to 0xc1820000) | ||
30 | ff20: c0381d00 c02e9c6d c0383582 c040786c | ||
31 | ff40: c040ad6c c00264fc c0026868 c0407814 00000000 c03d9de4 c181ff8c c181ff68 | ||
32 | ff60: c03db448 c03db830 c02e982c c03fdfb8 c03fe004 c0039988 00000013 00000000 | ||
33 | ff80: c181ff9c c181ff90 c03d9df8 c03db390 c181ffdc c181ffa0 c0008798 c03d9df0 | ||
34 | ffa0: c181ffc4 c181ffb0 c0055a44 c0187050 c0039988 c03fdfb8 c03fe004 c0039988 | ||
35 | ffc0: 00000013 00000000 00000000 00000000 c181fff4 c181ffe0 c03d1284 c0008708 | ||
36 | ffe0: 00000000 c03d1208 00000000 c181fff8 c0039988 c03d1214 1077ce40 01f7ee08 | ||
37 | Backtrace: | ||
38 | [<c03db824>] (omap_vp_init+0x0/0x15c) from [<c03db448>] (omap_voltage_late_init+0xc4/0xfc) | ||
39 | [<c03db384>] (omap_voltage_late_init+0x0/0xfc) from [<c03d9df8>] (omap2_common_pm_late_init+0x14/0x54) | ||
40 | r8:00000000 r7:00000013 r6:c0039988 r5:c03fe004 r4:c03fdfb8 | ||
41 | [<c03d9de4>] (omap2_common_pm_late_init+0x0/0x54) from [<c0008798>] (do_one_initcall+0x9c/0x164) | ||
42 | [<c00086fc>] (do_one_initcall+0x0/0x164) from [<c03d1284>] (kernel_init+0x7c/0x120) | ||
43 | [<c03d1208>] (kernel_init+0x0/0x120) from [<c0039988>] (do_exit+0x0/0x2cc) | ||
44 | r5:c03d1208 r4:00000000 | ||
45 | Code: e5ca300b e5900034 ebf69027 e5994024 (e5941000) | ||
46 | ---[ end trace aed617dddaf32c3d ]--- | ||
47 | Kernel panic - not syncing: Attempted to kill init! | ||
48 | |||
49 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
50 | Cc: Igor Grinberg <grinberg@compulab.co.il> | ||
51 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
52 | --- | ||
53 | arch/arm/mach-omap2/vp.c | 5 +++++ | ||
54 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
55 | |||
56 | diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c | ||
57 | index 66bd700..3b52027 100644 | ||
58 | --- a/arch/arm/mach-omap2/vp.c | ||
59 | +++ b/arch/arm/mach-omap2/vp.c | ||
60 | @@ -41,6 +41,11 @@ void __init omap_vp_init(struct voltagedomain *voltdm) | ||
61 | u32 val, sys_clk_rate, timeout, waittime; | ||
62 | u32 vddmin, vddmax, vstepmin, vstepmax; | ||
63 | |||
64 | + if (!voltdm->pmic || !voltdm->pmic->uv_to_vsel) { | ||
65 | + pr_err("%s: No PMIC info for vdd_%s\n", __func__, voltdm->name); | ||
66 | + return; | ||
67 | + } | ||
68 | + | ||
69 | if (!voltdm->read || !voltdm->write) { | ||
70 | pr_err("%s: No read/write API for accessing vdd_%s regs\n", | ||
71 | __func__, voltdm->name); | ||
72 | -- | ||
73 | 1.7.7.4 | ||
74 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0055-x86-amd-Fix-L1i-and-L2-cache-sharing-information-for.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0055-x86-amd-Fix-L1i-and-L2-cache-sharing-information-for.patch new file mode 100644 index 00000000..4a6f533d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0055-x86-amd-Fix-L1i-and-L2-cache-sharing-information-for.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | From 03fedc5c56706c1bd0528a2dfab590f3b7cd9d1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Herrmann <andreas.herrmann3@amd.com> | ||
3 | Date: Wed, 8 Feb 2012 20:52:29 +0100 | ||
4 | Subject: [PATCH 55/73] x86/amd: Fix L1i and L2 cache sharing information for | ||
5 | AMD family 15h processors | ||
6 | |||
7 | commit 32c3233885eb10ac9cb9410f2f8cd64b8df2b2a1 upstream. | ||
8 | |||
9 | For L1 instruction cache and L2 cache the shared CPU information | ||
10 | is wrong. On current AMD family 15h CPUs those caches are shared | ||
11 | between both cores of a compute unit. | ||
12 | |||
13 | This fixes https://bugzilla.kernel.org/show_bug.cgi?id=42607 | ||
14 | |||
15 | Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> | ||
16 | Cc: Petkov Borislav <Borislav.Petkov@amd.com> | ||
17 | Cc: Dave Jones <davej@redhat.com> | ||
18 | Link: http://lkml.kernel.org/r/20120208195229.GA17523@alberich.amd.com | ||
19 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
21 | --- | ||
22 | arch/x86/kernel/cpu/intel_cacheinfo.c | 44 +++++++++++++++++++++++++++------ | ||
23 | 1 files changed, 36 insertions(+), 8 deletions(-) | ||
24 | |||
25 | diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c | ||
26 | index a3b0811..0e89635 100644 | ||
27 | --- a/arch/x86/kernel/cpu/intel_cacheinfo.c | ||
28 | +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | ||
29 | @@ -326,8 +326,7 @@ static void __cpuinit amd_calc_l3_indices(struct amd_northbridge *nb) | ||
30 | l3->indices = (max(max3(sc0, sc1, sc2), sc3) << 10) - 1; | ||
31 | } | ||
32 | |||
33 | -static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, | ||
34 | - int index) | ||
35 | +static void __cpuinit amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) | ||
36 | { | ||
37 | int node; | ||
38 | |||
39 | @@ -725,14 +724,16 @@ static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); | ||
40 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) | ||
41 | |||
42 | #ifdef CONFIG_SMP | ||
43 | -static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | ||
44 | + | ||
45 | +static int __cpuinit cache_shared_amd_cpu_map_setup(unsigned int cpu, int index) | ||
46 | { | ||
47 | - struct _cpuid4_info *this_leaf, *sibling_leaf; | ||
48 | - unsigned long num_threads_sharing; | ||
49 | - int index_msb, i, sibling; | ||
50 | + struct _cpuid4_info *this_leaf; | ||
51 | + int ret, i, sibling; | ||
52 | struct cpuinfo_x86 *c = &cpu_data(cpu); | ||
53 | |||
54 | - if ((index == 3) && (c->x86_vendor == X86_VENDOR_AMD)) { | ||
55 | + ret = 0; | ||
56 | + if (index == 3) { | ||
57 | + ret = 1; | ||
58 | for_each_cpu(i, cpu_llc_shared_mask(cpu)) { | ||
59 | if (!per_cpu(ici_cpuid4_info, i)) | ||
60 | continue; | ||
61 | @@ -743,8 +744,35 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | ||
62 | set_bit(sibling, this_leaf->shared_cpu_map); | ||
63 | } | ||
64 | } | ||
65 | - return; | ||
66 | + } else if ((c->x86 == 0x15) && ((index == 1) || (index == 2))) { | ||
67 | + ret = 1; | ||
68 | + for_each_cpu(i, cpu_sibling_mask(cpu)) { | ||
69 | + if (!per_cpu(ici_cpuid4_info, i)) | ||
70 | + continue; | ||
71 | + this_leaf = CPUID4_INFO_IDX(i, index); | ||
72 | + for_each_cpu(sibling, cpu_sibling_mask(cpu)) { | ||
73 | + if (!cpu_online(sibling)) | ||
74 | + continue; | ||
75 | + set_bit(sibling, this_leaf->shared_cpu_map); | ||
76 | + } | ||
77 | + } | ||
78 | } | ||
79 | + | ||
80 | + return ret; | ||
81 | +} | ||
82 | + | ||
83 | +static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | ||
84 | +{ | ||
85 | + struct _cpuid4_info *this_leaf, *sibling_leaf; | ||
86 | + unsigned long num_threads_sharing; | ||
87 | + int index_msb, i; | ||
88 | + struct cpuinfo_x86 *c = &cpu_data(cpu); | ||
89 | + | ||
90 | + if (c->x86_vendor == X86_VENDOR_AMD) { | ||
91 | + if (cache_shared_amd_cpu_map_setup(cpu, index)) | ||
92 | + return; | ||
93 | + } | ||
94 | + | ||
95 | this_leaf = CPUID4_INFO_IDX(cpu, index); | ||
96 | num_threads_sharing = 1 + this_leaf->base.eax.split.num_threads_sharing; | ||
97 | |||
98 | -- | ||
99 | 1.7.7.4 | ||
100 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0056-ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0056-ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control.patch new file mode 100644 index 00000000..eb8d50a2 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0056-ath9k-stop-on-rates-with-idx-1-in-ath9k-rate-control.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 72633f08ad74b93530b8e038041c450492a00ed5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pavel Roskin <proski@gnu.org> | ||
3 | Date: Sat, 11 Feb 2012 10:01:53 -0500 | ||
4 | Subject: [PATCH 56/73] ath9k: stop on rates with idx -1 in ath9k rate | ||
5 | control's .tx_status | ||
6 | |||
7 | commit 2504a6423b9ab4c36df78227055995644de19edb upstream. | ||
8 | |||
9 | Rate control algorithms are supposed to stop processing when they | ||
10 | encounter a rate with the index -1. Checking for rate->count not being | ||
11 | zero is not enough. | ||
12 | |||
13 | Allowing a rate with negative index leads to memory corruption in | ||
14 | ath_debug_stat_rc(). | ||
15 | |||
16 | One consequence of the bug is discussed at | ||
17 | https://bugzilla.redhat.com/show_bug.cgi?id=768639 | ||
18 | |||
19 | Signed-off-by: Pavel Roskin <proski@gnu.org> | ||
20 | Signed-off-by: John W. Linville <linville@tuxdriver.com> | ||
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
22 | --- | ||
23 | drivers/net/wireless/ath/ath9k/rc.c | 2 +- | ||
24 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
25 | |||
26 | diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c | ||
27 | index 528d5f3..64af11f 100644 | ||
28 | --- a/drivers/net/wireless/ath/ath9k/rc.c | ||
29 | +++ b/drivers/net/wireless/ath/ath9k/rc.c | ||
30 | @@ -1347,7 +1347,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | ||
31 | fc = hdr->frame_control; | ||
32 | for (i = 0; i < sc->hw->max_rates; i++) { | ||
33 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; | ||
34 | - if (!rate->count) | ||
35 | + if (rate->idx < 0 || !rate->count) | ||
36 | break; | ||
37 | |||
38 | final_ts_idx = i; | ||
39 | -- | ||
40 | 1.7.7.4 | ||
41 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0057-genirq-Unmask-oneshot-irqs-when-thread-was-not-woken.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0057-genirq-Unmask-oneshot-irqs-when-thread-was-not-woken.patch new file mode 100644 index 00000000..247270a1 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0057-genirq-Unmask-oneshot-irqs-when-thread-was-not-woken.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From aa0eb3474beae8f6d9dcc2311dc02bea50cfd7b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Gleixner <tglx@linutronix.de> | ||
3 | Date: Tue, 7 Feb 2012 17:58:03 +0100 | ||
4 | Subject: [PATCH 57/73] genirq: Unmask oneshot irqs when thread was not woken | ||
5 | |||
6 | commit ac5637611150281f398bb7a47e3fcb69a09e7803 upstream. | ||
7 | |||
8 | When the primary handler of an interrupt which is marked IRQ_ONESHOT | ||
9 | returns IRQ_HANDLED or IRQ_NONE, then the interrupt thread is not | ||
10 | woken and the unmask logic of the interrupt line is never | ||
11 | invoked. This keeps the interrupt masked forever. | ||
12 | |||
13 | This was not noticed as most IRQ_ONESHOT users wake the thread | ||
14 | unconditionally (usually because they cannot access the underlying | ||
15 | device from hard interrupt context). Though this behaviour was nowhere | ||
16 | documented and not necessarily intentional. Some drivers can avoid the | ||
17 | thread wakeup in certain cases and run into the situation where the | ||
18 | interrupt line s kept masked. | ||
19 | |||
20 | Handle it gracefully. | ||
21 | |||
22 | Reported-and-tested-by: Lothar Wassmann <lw@karo-electronics.de> | ||
23 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | --- | ||
26 | kernel/irq/chip.c | 25 +++++++++++++++++++++++-- | ||
27 | 1 files changed, 23 insertions(+), 2 deletions(-) | ||
28 | |||
29 | diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c | ||
30 | index f7c543a..b742edc 100644 | ||
31 | --- a/kernel/irq/chip.c | ||
32 | +++ b/kernel/irq/chip.c | ||
33 | @@ -330,6 +330,24 @@ out_unlock: | ||
34 | } | ||
35 | EXPORT_SYMBOL_GPL(handle_simple_irq); | ||
36 | |||
37 | +/* | ||
38 | + * Called unconditionally from handle_level_irq() and only for oneshot | ||
39 | + * interrupts from handle_fasteoi_irq() | ||
40 | + */ | ||
41 | +static void cond_unmask_irq(struct irq_desc *desc) | ||
42 | +{ | ||
43 | + /* | ||
44 | + * We need to unmask in the following cases: | ||
45 | + * - Standard level irq (IRQF_ONESHOT is not set) | ||
46 | + * - Oneshot irq which did not wake the thread (caused by a | ||
47 | + * spurious interrupt or a primary handler handling it | ||
48 | + * completely). | ||
49 | + */ | ||
50 | + if (!irqd_irq_disabled(&desc->irq_data) && | ||
51 | + irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) | ||
52 | + unmask_irq(desc); | ||
53 | +} | ||
54 | + | ||
55 | /** | ||
56 | * handle_level_irq - Level type irq handler | ||
57 | * @irq: the interrupt number | ||
58 | @@ -362,8 +380,8 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | ||
59 | |||
60 | handle_irq_event(desc); | ||
61 | |||
62 | - if (!irqd_irq_disabled(&desc->irq_data) && !(desc->istate & IRQS_ONESHOT)) | ||
63 | - unmask_irq(desc); | ||
64 | + cond_unmask_irq(desc); | ||
65 | + | ||
66 | out_unlock: | ||
67 | raw_spin_unlock(&desc->lock); | ||
68 | } | ||
69 | @@ -417,6 +435,9 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) | ||
70 | preflow_handler(desc); | ||
71 | handle_irq_event(desc); | ||
72 | |||
73 | + if (desc->istate & IRQS_ONESHOT) | ||
74 | + cond_unmask_irq(desc); | ||
75 | + | ||
76 | out_eoi: | ||
77 | desc->irq_data.chip->irq_eoi(&desc->irq_data); | ||
78 | out_unlock: | ||
79 | -- | ||
80 | 1.7.7.4 | ||
81 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0058-genirq-Handle-pending-irqs-in-irq_startup.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0058-genirq-Handle-pending-irqs-in-irq_startup.patch new file mode 100644 index 00000000..4569e02a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0058-genirq-Handle-pending-irqs-in-irq_startup.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | From 37ef0e621b065f2d9e1c37ff42a37d6bd74bf039 Mon Sep 17 00:00:00 2001 | ||
2 | From: Thomas Gleixner <tglx@linutronix.de> | ||
3 | Date: Wed, 8 Feb 2012 11:57:52 +0100 | ||
4 | Subject: [PATCH 58/73] genirq: Handle pending irqs in irq_startup() | ||
5 | |||
6 | commit b4bc724e82e80478cba5fe9825b62e71ddf78757 upstream. | ||
7 | |||
8 | An interrupt might be pending when irq_startup() is called, but the | ||
9 | startup code does not invoke the resend logic. In some cases this | ||
10 | prevents the device from issuing another interrupt which renders the | ||
11 | device non functional. | ||
12 | |||
13 | Call the resend function in irq_startup() to keep things going. | ||
14 | |||
15 | Reported-and-tested-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
16 | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
18 | --- | ||
19 | kernel/irq/autoprobe.c | 4 ++-- | ||
20 | kernel/irq/chip.c | 17 ++++++++++------- | ||
21 | kernel/irq/internals.h | 2 +- | ||
22 | kernel/irq/manage.c | 2 +- | ||
23 | 4 files changed, 14 insertions(+), 11 deletions(-) | ||
24 | |||
25 | diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c | ||
26 | index 342d8f4..0119b9d 100644 | ||
27 | --- a/kernel/irq/autoprobe.c | ||
28 | +++ b/kernel/irq/autoprobe.c | ||
29 | @@ -53,7 +53,7 @@ unsigned long probe_irq_on(void) | ||
30 | if (desc->irq_data.chip->irq_set_type) | ||
31 | desc->irq_data.chip->irq_set_type(&desc->irq_data, | ||
32 | IRQ_TYPE_PROBE); | ||
33 | - irq_startup(desc); | ||
34 | + irq_startup(desc, false); | ||
35 | } | ||
36 | raw_spin_unlock_irq(&desc->lock); | ||
37 | } | ||
38 | @@ -70,7 +70,7 @@ unsigned long probe_irq_on(void) | ||
39 | raw_spin_lock_irq(&desc->lock); | ||
40 | if (!desc->action && irq_settings_can_probe(desc)) { | ||
41 | desc->istate |= IRQS_AUTODETECT | IRQS_WAITING; | ||
42 | - if (irq_startup(desc)) | ||
43 | + if (irq_startup(desc, false)) | ||
44 | desc->istate |= IRQS_PENDING; | ||
45 | } | ||
46 | raw_spin_unlock_irq(&desc->lock); | ||
47 | diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c | ||
48 | index b742edc..fb7db75 100644 | ||
49 | --- a/kernel/irq/chip.c | ||
50 | +++ b/kernel/irq/chip.c | ||
51 | @@ -157,19 +157,22 @@ static void irq_state_set_masked(struct irq_desc *desc) | ||
52 | irqd_set(&desc->irq_data, IRQD_IRQ_MASKED); | ||
53 | } | ||
54 | |||
55 | -int irq_startup(struct irq_desc *desc) | ||
56 | +int irq_startup(struct irq_desc *desc, bool resend) | ||
57 | { | ||
58 | + int ret = 0; | ||
59 | + | ||
60 | irq_state_clr_disabled(desc); | ||
61 | desc->depth = 0; | ||
62 | |||
63 | if (desc->irq_data.chip->irq_startup) { | ||
64 | - int ret = desc->irq_data.chip->irq_startup(&desc->irq_data); | ||
65 | + ret = desc->irq_data.chip->irq_startup(&desc->irq_data); | ||
66 | irq_state_clr_masked(desc); | ||
67 | - return ret; | ||
68 | + } else { | ||
69 | + irq_enable(desc); | ||
70 | } | ||
71 | - | ||
72 | - irq_enable(desc); | ||
73 | - return 0; | ||
74 | + if (resend) | ||
75 | + check_irq_resend(desc, desc->irq_data.irq); | ||
76 | + return ret; | ||
77 | } | ||
78 | |||
79 | void irq_shutdown(struct irq_desc *desc) | ||
80 | @@ -646,7 +649,7 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
81 | irq_settings_set_noprobe(desc); | ||
82 | irq_settings_set_norequest(desc); | ||
83 | irq_settings_set_nothread(desc); | ||
84 | - irq_startup(desc); | ||
85 | + irq_startup(desc, true); | ||
86 | } | ||
87 | out: | ||
88 | irq_put_desc_busunlock(desc, flags); | ||
89 | diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h | ||
90 | index a73dd6c..e1a8b64 100644 | ||
91 | --- a/kernel/irq/internals.h | ||
92 | +++ b/kernel/irq/internals.h | ||
93 | @@ -67,7 +67,7 @@ extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, | ||
94 | extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp); | ||
95 | extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); | ||
96 | |||
97 | -extern int irq_startup(struct irq_desc *desc); | ||
98 | +extern int irq_startup(struct irq_desc *desc, bool resend); | ||
99 | extern void irq_shutdown(struct irq_desc *desc); | ||
100 | extern void irq_enable(struct irq_desc *desc); | ||
101 | extern void irq_disable(struct irq_desc *desc); | ||
102 | diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c | ||
103 | index 1da999f..cf2d7ae 100644 | ||
104 | --- a/kernel/irq/manage.c | ||
105 | +++ b/kernel/irq/manage.c | ||
106 | @@ -1027,7 +1027,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | ||
107 | desc->istate |= IRQS_ONESHOT; | ||
108 | |||
109 | if (irq_settings_can_autoenable(desc)) | ||
110 | - irq_startup(desc); | ||
111 | + irq_startup(desc, true); | ||
112 | else | ||
113 | /* Undo nested disables: */ | ||
114 | desc->depth = 1; | ||
115 | -- | ||
116 | 1.7.7.4 | ||
117 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0059-scsi_scan-Fix-Poison-overwritten-warning-caused-by-u.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0059-scsi_scan-Fix-Poison-overwritten-warning-caused-by-u.patch new file mode 100644 index 00000000..1f9fcd1d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0059-scsi_scan-Fix-Poison-overwritten-warning-caused-by-u.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | From 0234f0569820c617e90b0ced54a345705cee031b Mon Sep 17 00:00:00 2001 | ||
2 | From: Huajun Li <huajun.li.lee@gmail.com> | ||
3 | Date: Sun, 12 Feb 2012 19:59:14 +0800 | ||
4 | Subject: [PATCH 59/73] scsi_scan: Fix 'Poison overwritten' warning caused by | ||
5 | using freed 'shost' | ||
6 | |||
7 | commit 267a6ad4aefaafbde607804c60945bcf97f91c1b upstream. | ||
8 | |||
9 | In do_scan_async(), calling scsi_autopm_put_host(shost) may reference | ||
10 | freed shost, and cause Posison overwitten warning. | ||
11 | Yes, this case can happen, for example, an USB is disconnected just | ||
12 | when do_scan_async() thread starts to run, then scsi_host_put() called | ||
13 | in scsi_finish_async_scan() will lead to shost be freed(because the | ||
14 | refcount of shost->shost_gendev decreases to 1 after USB disconnects), | ||
15 | at this point, if references shost again, system will show following | ||
16 | warning msg. | ||
17 | |||
18 | To make scsi_autopm_put_host(shost) always reference a valid shost, | ||
19 | put it just before scsi_host_put() in function | ||
20 | scsi_finish_async_scan(). | ||
21 | |||
22 | [ 299.281565] ============================================================================= | ||
23 | [ 299.281634] BUG kmalloc-4096 (Tainted: G I ): Poison overwritten | ||
24 | [ 299.281682] ----------------------------------------------------------------------------- | ||
25 | [ 299.281684] | ||
26 | [ 299.281752] INFO: 0xffff880056c305d0-0xffff880056c305d0. First byte | ||
27 | 0x6a instead of 0x6b | ||
28 | [ 299.281816] INFO: Allocated in scsi_host_alloc+0x4a/0x490 age=1688 | ||
29 | cpu=1 pid=2004 | ||
30 | [ 299.281870] __slab_alloc+0x617/0x6c1 | ||
31 | [ 299.281901] __kmalloc+0x28c/0x2e0 | ||
32 | [ 299.281931] scsi_host_alloc+0x4a/0x490 | ||
33 | [ 299.281966] usb_stor_probe1+0x5b/0xc40 [usb_storage] | ||
34 | [ 299.282010] storage_probe+0xa4/0xe0 [usb_storage] | ||
35 | [ 299.282062] usb_probe_interface+0x172/0x330 [usbcore] | ||
36 | [ 299.282105] driver_probe_device+0x257/0x3b0 | ||
37 | [ 299.282138] __driver_attach+0x103/0x110 | ||
38 | [ 299.282171] bus_for_each_dev+0x8e/0xe0 | ||
39 | [ 299.282201] driver_attach+0x26/0x30 | ||
40 | [ 299.282230] bus_add_driver+0x1c4/0x430 | ||
41 | [ 299.282260] driver_register+0xb6/0x230 | ||
42 | [ 299.282298] usb_register_driver+0xe5/0x270 [usbcore] | ||
43 | [ 299.282337] 0xffffffffa04ab03d | ||
44 | [ 299.282364] do_one_initcall+0x47/0x230 | ||
45 | [ 299.282396] sys_init_module+0xa0f/0x1fe0 | ||
46 | [ 299.282429] INFO: Freed in scsi_host_dev_release+0x18a/0x1d0 age=85 | ||
47 | cpu=0 pid=2008 | ||
48 | [ 299.282482] __slab_free+0x3c/0x2a1 | ||
49 | [ 299.282510] kfree+0x296/0x310 | ||
50 | [ 299.282536] scsi_host_dev_release+0x18a/0x1d0 | ||
51 | [ 299.282574] device_release+0x74/0x100 | ||
52 | [ 299.282606] kobject_release+0xc7/0x2a0 | ||
53 | [ 299.282637] kobject_put+0x54/0xa0 | ||
54 | [ 299.282668] put_device+0x27/0x40 | ||
55 | [ 299.282694] scsi_host_put+0x1d/0x30 | ||
56 | [ 299.282723] do_scan_async+0x1fc/0x2b0 | ||
57 | [ 299.282753] kthread+0xdf/0xf0 | ||
58 | [ 299.282782] kernel_thread_helper+0x4/0x10 | ||
59 | [ 299.282817] INFO: Slab 0xffffea00015b0c00 objects=7 used=7 fp=0x | ||
60 | (null) flags=0x100000000004080 | ||
61 | [ 299.282882] INFO: Object 0xffff880056c30000 @offset=0 fp=0x (null) | ||
62 | [ 299.282884] | ||
63 | ... | ||
64 | |||
65 | Signed-off-by: Huajun Li <huajun.li.lee@gmail.com> | ||
66 | Acked-by: Alan Stern <stern@rowland.harvard.edu> | ||
67 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ||
68 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
69 | --- | ||
70 | drivers/scsi/scsi_scan.c | 4 ++-- | ||
71 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
72 | |||
73 | diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c | ||
74 | index b3c6d95..6e7ea4a 100644 | ||
75 | --- a/drivers/scsi/scsi_scan.c | ||
76 | +++ b/drivers/scsi/scsi_scan.c | ||
77 | @@ -1815,6 +1815,7 @@ static void scsi_finish_async_scan(struct async_scan_data *data) | ||
78 | } | ||
79 | spin_unlock(&async_scan_lock); | ||
80 | |||
81 | + scsi_autopm_put_host(shost); | ||
82 | scsi_host_put(shost); | ||
83 | kfree(data); | ||
84 | } | ||
85 | @@ -1841,7 +1842,6 @@ static int do_scan_async(void *_data) | ||
86 | |||
87 | do_scsi_scan_host(shost); | ||
88 | scsi_finish_async_scan(data); | ||
89 | - scsi_autopm_put_host(shost); | ||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | @@ -1869,7 +1869,7 @@ void scsi_scan_host(struct Scsi_Host *shost) | ||
94 | p = kthread_run(do_scan_async, data, "scsi_scan_%d", shost->host_no); | ||
95 | if (IS_ERR(p)) | ||
96 | do_scan_async(data); | ||
97 | - /* scsi_autopm_put_host(shost) is called in do_scan_async() */ | ||
98 | + /* scsi_autopm_put_host(shost) is called in scsi_finish_async_scan() */ | ||
99 | } | ||
100 | EXPORT_SYMBOL(scsi_scan_host); | ||
101 | |||
102 | -- | ||
103 | 1.7.7.4 | ||
104 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0060-scsi_pm-Fix-bug-in-the-SCSI-power-management-handler.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0060-scsi_pm-Fix-bug-in-the-SCSI-power-management-handler.patch new file mode 100644 index 00000000..9eb67f65 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0060-scsi_pm-Fix-bug-in-the-SCSI-power-management-handler.patch | |||
@@ -0,0 +1,106 @@ | |||
1 | From 8c1c1c37c29906c94fb030261e1687c8197cc2af Mon Sep 17 00:00:00 2001 | ||
2 | From: Alan Stern <stern@rowland.harvard.edu> | ||
3 | Date: Fri, 17 Feb 2012 16:25:08 -0500 | ||
4 | Subject: [PATCH 60/73] scsi_pm: Fix bug in the SCSI power management handler | ||
5 | |||
6 | commit fea6d607e154cf96ab22254ccb48addfd43d4cb5 upstream. | ||
7 | |||
8 | This patch (as1520) fixes a bug in the SCSI layer's power management | ||
9 | implementation. | ||
10 | |||
11 | LUN scanning can be carried out asynchronously in do_scan_async(), and | ||
12 | sd uses an asynchronous thread for the time-consuming parts of disk | ||
13 | probing in sd_probe_async(). Currently nothing coordinates these | ||
14 | async threads with system sleep transitions; they can and do attempt | ||
15 | to continue scanning/probing SCSI devices even after the host adapter | ||
16 | has been suspended. As one might expect, the outcome is not ideal. | ||
17 | |||
18 | This is what the "prepare" stage of system suspend was created for. | ||
19 | After the prepare callback has been called for a host, target, or | ||
20 | device, drivers are not allowed to register any children underneath | ||
21 | them. Currently the SCSI prepare callback is not implemented; this | ||
22 | patch rectifies that omission. | ||
23 | |||
24 | For SCSI hosts, the prepare routine calls scsi_complete_async_scans() | ||
25 | to wait until async scanning is finished. It might be slightly more | ||
26 | efficient to wait only until the host in question has been scanned, | ||
27 | but there's currently no way to do that. Besides, during a sleep | ||
28 | transition we will ultimately have to wait until all the host scanning | ||
29 | has finished anyway. | ||
30 | |||
31 | For SCSI devices, the prepare routine calls async_synchronize_full() | ||
32 | to wait until sd probing is finished. The routine does nothing for | ||
33 | SCSI targets, because asynchronous target scanning is done only as | ||
34 | part of host scanning. | ||
35 | |||
36 | Signed-off-by: Alan Stern <stern@rowland.harvard.edu> | ||
37 | Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ||
38 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
39 | --- | ||
40 | drivers/scsi/scsi_pm.c | 16 ++++++++++++++++ | ||
41 | drivers/scsi/scsi_priv.h | 1 + | ||
42 | 2 files changed, 17 insertions(+), 0 deletions(-) | ||
43 | |||
44 | diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c | ||
45 | index d329f8b..2aeaf5c 100644 | ||
46 | --- a/drivers/scsi/scsi_pm.c | ||
47 | +++ b/drivers/scsi/scsi_pm.c | ||
48 | @@ -7,6 +7,7 @@ | ||
49 | |||
50 | #include <linux/pm_runtime.h> | ||
51 | #include <linux/export.h> | ||
52 | +#include <linux/async.h> | ||
53 | |||
54 | #include <scsi/scsi.h> | ||
55 | #include <scsi/scsi_device.h> | ||
56 | @@ -69,6 +70,19 @@ static int scsi_bus_resume_common(struct device *dev) | ||
57 | return err; | ||
58 | } | ||
59 | |||
60 | +static int scsi_bus_prepare(struct device *dev) | ||
61 | +{ | ||
62 | + if (scsi_is_sdev_device(dev)) { | ||
63 | + /* sd probing uses async_schedule. Wait until it finishes. */ | ||
64 | + async_synchronize_full(); | ||
65 | + | ||
66 | + } else if (scsi_is_host_device(dev)) { | ||
67 | + /* Wait until async scanning is finished */ | ||
68 | + scsi_complete_async_scans(); | ||
69 | + } | ||
70 | + return 0; | ||
71 | +} | ||
72 | + | ||
73 | static int scsi_bus_suspend(struct device *dev) | ||
74 | { | ||
75 | return scsi_bus_suspend_common(dev, PMSG_SUSPEND); | ||
76 | @@ -87,6 +101,7 @@ static int scsi_bus_poweroff(struct device *dev) | ||
77 | #else /* CONFIG_PM_SLEEP */ | ||
78 | |||
79 | #define scsi_bus_resume_common NULL | ||
80 | +#define scsi_bus_prepare NULL | ||
81 | #define scsi_bus_suspend NULL | ||
82 | #define scsi_bus_freeze NULL | ||
83 | #define scsi_bus_poweroff NULL | ||
84 | @@ -195,6 +210,7 @@ void scsi_autopm_put_host(struct Scsi_Host *shost) | ||
85 | #endif /* CONFIG_PM_RUNTIME */ | ||
86 | |||
87 | const struct dev_pm_ops scsi_bus_pm_ops = { | ||
88 | + .prepare = scsi_bus_prepare, | ||
89 | .suspend = scsi_bus_suspend, | ||
90 | .resume = scsi_bus_resume_common, | ||
91 | .freeze = scsi_bus_freeze, | ||
92 | diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h | ||
93 | index 2a58895..5b475d0 100644 | ||
94 | --- a/drivers/scsi/scsi_priv.h | ||
95 | +++ b/drivers/scsi/scsi_priv.h | ||
96 | @@ -110,6 +110,7 @@ extern void scsi_exit_procfs(void); | ||
97 | #endif /* CONFIG_PROC_FS */ | ||
98 | |||
99 | /* scsi_scan.c */ | ||
100 | +extern int scsi_complete_async_scans(void); | ||
101 | extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, | ||
102 | unsigned int, unsigned int, int); | ||
103 | extern void scsi_forget_host(struct Scsi_Host *); | ||
104 | -- | ||
105 | 1.7.7.4 | ||
106 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0061-ipvs-fix-matching-of-fwmark-templates-during-schedul.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0061-ipvs-fix-matching-of-fwmark-templates-during-schedul.patch new file mode 100644 index 00000000..ed64dbc2 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0061-ipvs-fix-matching-of-fwmark-templates-during-schedul.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 9b83c78d644ae794f0ec3cf7a4722c613b947913 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simon Horman <horms@verge.net.au> | ||
3 | Date: Fri, 27 Jan 2012 10:45:27 +0900 | ||
4 | Subject: [PATCH 61/73] ipvs: fix matching of fwmark templates during | ||
5 | scheduling | ||
6 | |||
7 | commit e0aac52e17a3db68fe2ceae281780a70fc69957f upstream. | ||
8 | |||
9 | Commit f11017ec2d1859c661f4e2b12c4a8d250e1f47cf (2.6.37) | ||
10 | moved the fwmark variable in subcontext that is invalidated before | ||
11 | reaching the ip_vs_ct_in_get call. As vaddr is provided as pointer | ||
12 | in the param structure make sure the fwmark variable is in | ||
13 | same context. As the fwmark templates can not be matched, | ||
14 | more and more template connections are created and the | ||
15 | controlled connections can not go to single real server. | ||
16 | |||
17 | Signed-off-by: Julian Anastasov <ja@ssi.bg> | ||
18 | Signed-off-by: Simon Horman <horms@verge.net.au> | ||
19 | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> | ||
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
21 | --- | ||
22 | net/netfilter/ipvs/ip_vs_core.c | 2 +- | ||
23 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
24 | |||
25 | diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c | ||
26 | index 093cc32..6dc7d7d 100644 | ||
27 | --- a/net/netfilter/ipvs/ip_vs_core.c | ||
28 | +++ b/net/netfilter/ipvs/ip_vs_core.c | ||
29 | @@ -232,6 +232,7 @@ ip_vs_sched_persist(struct ip_vs_service *svc, | ||
30 | __be16 dport = 0; /* destination port to forward */ | ||
31 | unsigned int flags; | ||
32 | struct ip_vs_conn_param param; | ||
33 | + const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) }; | ||
34 | union nf_inet_addr snet; /* source network of the client, | ||
35 | after masking */ | ||
36 | |||
37 | @@ -267,7 +268,6 @@ ip_vs_sched_persist(struct ip_vs_service *svc, | ||
38 | { | ||
39 | int protocol = iph.protocol; | ||
40 | const union nf_inet_addr *vaddr = &iph.daddr; | ||
41 | - const union nf_inet_addr fwmark = { .ip = htonl(svc->fwmark) }; | ||
42 | __be16 vport = 0; | ||
43 | |||
44 | if (dst_port == svc->port) { | ||
45 | -- | ||
46 | 1.7.7.4 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-jme-Fix-FIFO-flush-issue.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-jme-Fix-FIFO-flush-issue.patch new file mode 100644 index 00000000..6efc1c28 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-jme-Fix-FIFO-flush-issue.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From 5fbc730462e4c65e83bc343c4d3f97292b867ff7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Guo-Fu Tseng <cooldavid@cooldavid.org> | ||
3 | Date: Wed, 22 Feb 2012 08:58:10 +0000 | ||
4 | Subject: [PATCH 62/73] jme: Fix FIFO flush issue | ||
5 | |||
6 | commit ba9adbe67e288823ac1deb7f11576ab5653f833e upstream. | ||
7 | |||
8 | Set the RX FIFO flush watermark lower. | ||
9 | According to Federico and JMicron's reply, | ||
10 | setting it to 16QW would be stable on most platforms. | ||
11 | Otherwise, user might experience packet drop issue. | ||
12 | |||
13 | Reported-by: Federico Quagliata <federico@quagliata.org> | ||
14 | Fixed-by: Federico Quagliata <federico@quagliata.org> | ||
15 | Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org> | ||
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
18 | --- | ||
19 | drivers/net/ethernet/jme.c | 10 +--------- | ||
20 | drivers/net/ethernet/jme.h | 2 +- | ||
21 | 2 files changed, 2 insertions(+), 10 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c | ||
24 | index 76b8457..ab784e0 100644 | ||
25 | --- a/drivers/net/ethernet/jme.c | ||
26 | +++ b/drivers/net/ethernet/jme.c | ||
27 | @@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu) | ||
28 | ((new_mtu) < IPV6_MIN_MTU)) | ||
29 | return -EINVAL; | ||
30 | |||
31 | - if (new_mtu > 4000) { | ||
32 | - jme->reg_rxcs &= ~RXCS_FIFOTHNP; | ||
33 | - jme->reg_rxcs |= RXCS_FIFOTHNP_64QW; | ||
34 | - jme_restart_rx_engine(jme); | ||
35 | - } else { | ||
36 | - jme->reg_rxcs &= ~RXCS_FIFOTHNP; | ||
37 | - jme->reg_rxcs |= RXCS_FIFOTHNP_128QW; | ||
38 | - jme_restart_rx_engine(jme); | ||
39 | - } | ||
40 | |||
41 | netdev->mtu = new_mtu; | ||
42 | netdev_update_features(netdev); | ||
43 | |||
44 | + jme_restart_rx_engine(jme); | ||
45 | jme_reset_link(jme); | ||
46 | |||
47 | return 0; | ||
48 | diff --git a/drivers/net/ethernet/jme.h b/drivers/net/ethernet/jme.h | ||
49 | index 4304072..3efc897 100644 | ||
50 | --- a/drivers/net/ethernet/jme.h | ||
51 | +++ b/drivers/net/ethernet/jme.h | ||
52 | @@ -730,7 +730,7 @@ enum jme_rxcs_values { | ||
53 | RXCS_RETRYCNT_60 = 0x00000F00, | ||
54 | |||
55 | RXCS_DEFAULT = RXCS_FIFOTHTP_128T | | ||
56 | - RXCS_FIFOTHNP_128QW | | ||
57 | + RXCS_FIFOTHNP_16QW | | ||
58 | RXCS_DMAREQSZ_128B | | ||
59 | RXCS_RETRYGAP_256ns | | ||
60 | RXCS_RETRYCNT_32, | ||
61 | -- | ||
62 | 1.7.7.4 | ||
63 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0063-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0063-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch new file mode 100644 index 00000000..15ff4503 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0063-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From df9a5f8f94f3276aaa8c960a46f6838f7fdab974 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christian Riesch <christian.riesch@omicron.at> | ||
3 | Date: Thu, 23 Feb 2012 01:14:17 +0000 | ||
4 | Subject: [PATCH 63/73] davinci_emac: Do not free all rx dma descriptors | ||
5 | during init | ||
6 | |||
7 | commit 5d69703263d588dbb03f4e57091afd8942d96e6d upstream. | ||
8 | |||
9 | This patch fixes a regression that was introduced by | ||
10 | |||
11 | commit 0a5f38467765ee15478db90d81e40c269c8dda20 | ||
12 | davinci_emac: Add Carrier Link OK check in Davinci RX Handler | ||
13 | |||
14 | Said commit adds a check whether the carrier link is ok. If the link is | ||
15 | not ok, the skb is freed and no new dma descriptor added to the rx dma | ||
16 | channel. This causes trouble during initialization when the carrier | ||
17 | status has not yet been updated. If a lot of packets are received while | ||
18 | netif_carrier_ok returns false, all dma descriptors are freed and the | ||
19 | rx dma transfer is stopped. | ||
20 | |||
21 | The bug occurs when the board is connected to a network with lots of | ||
22 | traffic and the ifconfig down/up is done, e.g., when reconfiguring | ||
23 | the interface with DHCP. | ||
24 | |||
25 | The bug can be reproduced by flood pinging the davinci board while doing | ||
26 | ifconfig eth0 down | ||
27 | ifconfig eth0 up | ||
28 | on the board. | ||
29 | |||
30 | After that, the rx path stops working and the overrun value reported | ||
31 | by ifconfig is counting up. | ||
32 | |||
33 | This patch reverts commit 0a5f38467765ee15478db90d81e40c269c8dda20 | ||
34 | and instead issues warnings only if cpdma_chan_submit returns -ENOMEM. | ||
35 | |||
36 | Signed-off-by: Christian Riesch <christian.riesch@omicron.at> | ||
37 | Cc: Cyril Chemparathy <cyril@ti.com> | ||
38 | Cc: Sascha Hauer <s.hauer@pengutronix.de> | ||
39 | Tested-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> | ||
40 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
41 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
42 | --- | ||
43 | drivers/net/ethernet/ti/davinci_emac.c | 6 ++++-- | ||
44 | 1 files changed, 4 insertions(+), 2 deletions(-) | ||
45 | |||
46 | diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c | ||
47 | index 815c797..22f2788 100644 | ||
48 | --- a/drivers/net/ethernet/ti/davinci_emac.c | ||
49 | +++ b/drivers/net/ethernet/ti/davinci_emac.c | ||
50 | @@ -1007,7 +1007,7 @@ static void emac_rx_handler(void *token, int len, int status) | ||
51 | int ret; | ||
52 | |||
53 | /* free and bail if we are shutting down */ | ||
54 | - if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) { | ||
55 | + if (unlikely(!netif_running(ndev))) { | ||
56 | dev_kfree_skb_any(skb); | ||
57 | return; | ||
58 | } | ||
59 | @@ -1036,7 +1036,9 @@ static void emac_rx_handler(void *token, int len, int status) | ||
60 | recycle: | ||
61 | ret = cpdma_chan_submit(priv->rxchan, skb, skb->data, | ||
62 | skb_tailroom(skb), GFP_KERNEL); | ||
63 | - if (WARN_ON(ret < 0)) | ||
64 | + | ||
65 | + WARN_ON(ret == -ENOMEM); | ||
66 | + if (unlikely(ret < 0)) | ||
67 | dev_kfree_skb_any(skb); | ||
68 | } | ||
69 | |||
70 | -- | ||
71 | 1.7.7.4 | ||
72 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0064-builddeb-Don-t-create-files-in-tmp-with-predictable-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0064-builddeb-Don-t-create-files-in-tmp-with-predictable-.patch new file mode 100644 index 00000000..93fd429e --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0064-builddeb-Don-t-create-files-in-tmp-with-predictable-.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From c3d65b135f856651b2fa8606a7799a9f33d8f113 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ben Hutchings <ben@decadent.org.uk> | ||
3 | Date: Wed, 15 Feb 2012 14:17:29 +0000 | ||
4 | Subject: [PATCH 64/73] builddeb: Don't create files in /tmp with predictable | ||
5 | names | ||
6 | |||
7 | commit 6c635224602d760c1208ada337562f40d8ae93a5 upstream. | ||
8 | |||
9 | The current use of /tmp for file lists is insecure. Put them under | ||
10 | $objtree/debian instead. | ||
11 | |||
12 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
13 | Acked-by: maximilian attems <max@stro.at> | ||
14 | Signed-off-by: Michal Marek <mmarek@suse.cz> | ||
15 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
16 | --- | ||
17 | scripts/package/builddeb | 12 ++++++------ | ||
18 | 1 files changed, 6 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/scripts/package/builddeb b/scripts/package/builddeb | ||
21 | index f6cbc3d..3c6c0b1 100644 | ||
22 | --- a/scripts/package/builddeb | ||
23 | +++ b/scripts/package/builddeb | ||
24 | @@ -238,14 +238,14 @@ EOF | ||
25 | fi | ||
26 | |||
27 | # Build header package | ||
28 | -(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$) | ||
29 | -(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> /tmp/files$$) | ||
30 | -(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) | ||
31 | +(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") | ||
32 | +(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") | ||
33 | +(cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") | ||
34 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version | ||
35 | mkdir -p "$destdir" | ||
36 | -(cd $srctree; tar -c -f - -T /tmp/files$$) | (cd $destdir; tar -xf -) | ||
37 | -(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) | ||
38 | -rm -f /tmp/files$$ /tmp/objfiles$$ | ||
39 | +(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) | ||
40 | +(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) | ||
41 | +rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" | ||
42 | arch=$(dpkg --print-architecture) | ||
43 | |||
44 | cat <<EOF >> debian/control | ||
45 | -- | ||
46 | 1.7.7.4 | ||
47 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0065-can-sja1000-fix-isr-hang-when-hw-is-unplugged-under-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0065-can-sja1000-fix-isr-hang-when-hw-is-unplugged-under-.patch new file mode 100644 index 00000000..49156d35 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0065-can-sja1000-fix-isr-hang-when-hw-is-unplugged-under-.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 9bda01cc81b40639565e63223d7c5413bb15b99a Mon Sep 17 00:00:00 2001 | ||
2 | From: Oliver Hartkopp <socketcan@hartkopp.net> | ||
3 | Date: Wed, 15 Feb 2012 17:51:56 +0100 | ||
4 | Subject: [PATCH 65/73] can: sja1000: fix isr hang when hw is unplugged under | ||
5 | load | ||
6 | |||
7 | commit a7762b10c12a70c5dbf2253142764b728ac88c3a upstream. | ||
8 | |||
9 | In the case of hotplug enabled devices (PCMCIA/PCIeC) the removal of the | ||
10 | hardware can cause an infinite loop in the common sja1000 isr. | ||
11 | |||
12 | Use the already retrieved status register to indicate a possible hardware | ||
13 | removal and double check by reading the mode register in sja1000_is_absent. | ||
14 | |||
15 | Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net> | ||
16 | Acked-by: Wolfgang Grandegger <wg@grandegger.com> | ||
17 | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
19 | --- | ||
20 | drivers/net/can/sja1000/sja1000.c | 13 ++++++++++++- | ||
21 | 1 files changed, 12 insertions(+), 1 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c | ||
24 | index 04a3f1b..192b0d1 100644 | ||
25 | --- a/drivers/net/can/sja1000/sja1000.c | ||
26 | +++ b/drivers/net/can/sja1000/sja1000.c | ||
27 | @@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val) | ||
28 | spin_unlock_irqrestore(&priv->cmdreg_lock, flags); | ||
29 | } | ||
30 | |||
31 | +static int sja1000_is_absent(struct sja1000_priv *priv) | ||
32 | +{ | ||
33 | + return (priv->read_reg(priv, REG_MOD) == 0xFF); | ||
34 | +} | ||
35 | + | ||
36 | static int sja1000_probe_chip(struct net_device *dev) | ||
37 | { | ||
38 | struct sja1000_priv *priv = netdev_priv(dev); | ||
39 | |||
40 | - if (priv->reg_base && (priv->read_reg(priv, 0) == 0xFF)) { | ||
41 | + if (priv->reg_base && sja1000_is_absent(priv)) { | ||
42 | printk(KERN_INFO "%s: probing @0x%lX failed\n", | ||
43 | DRV_NAME, dev->base_addr); | ||
44 | return 0; | ||
45 | @@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | ||
46 | while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) { | ||
47 | n++; | ||
48 | status = priv->read_reg(priv, REG_SR); | ||
49 | + /* check for absent controller due to hw unplug */ | ||
50 | + if (status == 0xFF && sja1000_is_absent(priv)) | ||
51 | + return IRQ_NONE; | ||
52 | |||
53 | if (isrc & IRQ_WUI) | ||
54 | dev_warn(dev->dev.parent, "wakeup interrupt\n"); | ||
55 | @@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id) | ||
56 | while (status & SR_RBS) { | ||
57 | sja1000_rx(dev); | ||
58 | status = priv->read_reg(priv, REG_SR); | ||
59 | + /* check for absent controller */ | ||
60 | + if (status == 0xFF && sja1000_is_absent(priv)) | ||
61 | + return IRQ_NONE; | ||
62 | } | ||
63 | } | ||
64 | if (isrc & (IRQ_DOI | IRQ_EI | IRQ_BEI | IRQ_EPI | IRQ_ALI)) { | ||
65 | -- | ||
66 | 1.7.7.4 | ||
67 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0066-hdpvr-fix-race-conditon-during-start-of-streaming.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0066-hdpvr-fix-race-conditon-during-start-of-streaming.patch new file mode 100644 index 00000000..142e5c3d --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0066-hdpvr-fix-race-conditon-during-start-of-streaming.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 81fa1b30877282eb79de420b7e29d09737ab86eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Janne Grunau <j@jannau.net> | ||
3 | Date: Thu, 2 Feb 2012 13:35:21 -0300 | ||
4 | Subject: [PATCH 66/73] hdpvr: fix race conditon during start of streaming | ||
5 | |||
6 | commit afa159538af61f1a65d48927f4e949fe514fb4fc upstream. | ||
7 | |||
8 | status has to be set to STREAMING before the streaming worker is | ||
9 | queued. hdpvr_transmit_buffers() will exit immediately otherwise. | ||
10 | |||
11 | Reported-by: Joerg Desch <vvd.joede@googlemail.com> | ||
12 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
14 | --- | ||
15 | drivers/media/video/hdpvr/hdpvr-video.c | 3 ++- | ||
16 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c | ||
19 | index 087f7c0..41fd57b 100644 | ||
20 | --- a/drivers/media/video/hdpvr/hdpvr-video.c | ||
21 | +++ b/drivers/media/video/hdpvr/hdpvr-video.c | ||
22 | @@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev) | ||
23 | |||
24 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); | ||
25 | |||
26 | + dev->status = STATUS_STREAMING; | ||
27 | + | ||
28 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); | ||
29 | queue_work(dev->workqueue, &dev->worker); | ||
30 | |||
31 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, | ||
32 | "streaming started\n"); | ||
33 | - dev->status = STATUS_STREAMING; | ||
34 | |||
35 | return 0; | ||
36 | } | ||
37 | -- | ||
38 | 1.7.7.4 | ||
39 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0067-imon-don-t-wedge-hardware-after-early-callbacks.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0067-imon-don-t-wedge-hardware-after-early-callbacks.patch new file mode 100644 index 00000000..5c568cdb --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0067-imon-don-t-wedge-hardware-after-early-callbacks.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | From 7171d39d2187d3a59f8a2452bce6691755c0b153 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jarod Wilson <jarod@redhat.com> | ||
3 | Date: Thu, 26 Jan 2012 12:04:11 -0300 | ||
4 | Subject: [PATCH 67/73] imon: don't wedge hardware after early callbacks | ||
5 | |||
6 | commit 8791d63af0cf113725ae4cb8cba9492814c59a93 upstream. | ||
7 | |||
8 | This patch is just a minor update to one titled "imon: Input from ffdc | ||
9 | device type ignored" from Corinna Vinschen. An earlier patch to prevent | ||
10 | an oops when we got early callbacks also has the nasty side-effect of | ||
11 | wedging imon hardware, as we don't acknowledge the urb. Rework the check | ||
12 | slightly here to bypass processing the packet, as the driver isn't yet | ||
13 | fully initialized, but still acknowlege the urb and submit a new rx_urb. | ||
14 | Do this for both interfaces -- irrelevant for ffdc hardware, but | ||
15 | relevant for newer hardware, though newer hardware doesn't spew the | ||
16 | constant stream of data as soon as the hardware is initialized like the | ||
17 | older ffdc devices, so they'd be less likely to trigger this anyway... | ||
18 | |||
19 | Tested with both an ffdc device and an 0042 device. | ||
20 | |||
21 | Reported-by: Corinna Vinschen <vinschen@redhat.com> | ||
22 | Signed-off-by: Jarod Wilson <jarod@redhat.com> | ||
23 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
24 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
25 | --- | ||
26 | drivers/media/rc/imon.c | 26 ++++++++++++++++++++++---- | ||
27 | 1 files changed, 22 insertions(+), 4 deletions(-) | ||
28 | |||
29 | diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c | ||
30 | index 6ed9646..3f175eb 100644 | ||
31 | --- a/drivers/media/rc/imon.c | ||
32 | +++ b/drivers/media/rc/imon.c | ||
33 | @@ -47,7 +47,7 @@ | ||
34 | #define MOD_AUTHOR "Jarod Wilson <jarod@wilsonet.com>" | ||
35 | #define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" | ||
36 | #define MOD_NAME "imon" | ||
37 | -#define MOD_VERSION "0.9.3" | ||
38 | +#define MOD_VERSION "0.9.4" | ||
39 | |||
40 | #define DISPLAY_MINOR_BASE 144 | ||
41 | #define DEVICE_NAME "lcd%d" | ||
42 | @@ -1658,9 +1658,17 @@ static void usb_rx_callback_intf0(struct urb *urb) | ||
43 | return; | ||
44 | |||
45 | ictx = (struct imon_context *)urb->context; | ||
46 | - if (!ictx || !ictx->dev_present_intf0) | ||
47 | + if (!ictx) | ||
48 | return; | ||
49 | |||
50 | + /* | ||
51 | + * if we get a callback before we're done configuring the hardware, we | ||
52 | + * can't yet process the data, as there's nowhere to send it, but we | ||
53 | + * still need to submit a new rx URB to avoid wedging the hardware | ||
54 | + */ | ||
55 | + if (!ictx->dev_present_intf0) | ||
56 | + goto out; | ||
57 | + | ||
58 | switch (urb->status) { | ||
59 | case -ENOENT: /* usbcore unlink successful! */ | ||
60 | return; | ||
61 | @@ -1678,6 +1686,7 @@ static void usb_rx_callback_intf0(struct urb *urb) | ||
62 | break; | ||
63 | } | ||
64 | |||
65 | +out: | ||
66 | usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); | ||
67 | } | ||
68 | |||
69 | @@ -1690,9 +1699,17 @@ static void usb_rx_callback_intf1(struct urb *urb) | ||
70 | return; | ||
71 | |||
72 | ictx = (struct imon_context *)urb->context; | ||
73 | - if (!ictx || !ictx->dev_present_intf1) | ||
74 | + if (!ictx) | ||
75 | return; | ||
76 | |||
77 | + /* | ||
78 | + * if we get a callback before we're done configuring the hardware, we | ||
79 | + * can't yet process the data, as there's nowhere to send it, but we | ||
80 | + * still need to submit a new rx URB to avoid wedging the hardware | ||
81 | + */ | ||
82 | + if (!ictx->dev_present_intf1) | ||
83 | + goto out; | ||
84 | + | ||
85 | switch (urb->status) { | ||
86 | case -ENOENT: /* usbcore unlink successful! */ | ||
87 | return; | ||
88 | @@ -1710,6 +1727,7 @@ static void usb_rx_callback_intf1(struct urb *urb) | ||
89 | break; | ||
90 | } | ||
91 | |||
92 | +out: | ||
93 | usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); | ||
94 | } | ||
95 | |||
96 | @@ -2242,7 +2260,7 @@ find_endpoint_failed: | ||
97 | mutex_unlock(&ictx->lock); | ||
98 | usb_free_urb(rx_urb); | ||
99 | rx_urb_alloc_failed: | ||
100 | - dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); | ||
101 | + dev_err(ictx->dev, "unable to initialize intf1, err %d\n", ret); | ||
102 | |||
103 | return NULL; | ||
104 | } | ||
105 | -- | ||
106 | 1.7.7.4 | ||
107 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0068-hwmon-f75375s-Fix-register-write-order-when-setting-.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0068-hwmon-f75375s-Fix-register-write-order-when-setting-.patch new file mode 100644 index 00000000..ca1f37f3 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0068-hwmon-f75375s-Fix-register-write-order-when-setting-.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From a93a91746fe70854f5301c526d1eec16312bebc3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nikolaus Schulz <schulz@macnetix.de> | ||
3 | Date: Wed, 22 Feb 2012 23:18:44 +0100 | ||
4 | Subject: [PATCH 68/73] hwmon: (f75375s) Fix register write order when setting | ||
5 | fans to full speed | ||
6 | |||
7 | commit c1c1a3d012fe5e82a9a025fb4b5a4f8ee67a53f6 upstream. | ||
8 | |||
9 | By hwmon sysfs interface convention, setting pwm_enable to zero sets a fan | ||
10 | to full speed. In the f75375s driver, this need be done by enabling | ||
11 | manual fan control, plus duty mode for the F875387 chip, and then setting | ||
12 | the maximum duty cycle. Fix a bug where the two necessary register writes | ||
13 | were swapped, effectively discarding the setting to full-speed. | ||
14 | |||
15 | Signed-off-by: Nikolaus Schulz <mail@microschulz.de> | ||
16 | Cc: Riku Voipio <riku.voipio@iki.fi> | ||
17 | Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> | ||
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
19 | --- | ||
20 | drivers/hwmon/f75375s.c | 5 +++-- | ||
21 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c | ||
24 | index e4ab491..040a820 100644 | ||
25 | --- a/drivers/hwmon/f75375s.c | ||
26 | +++ b/drivers/hwmon/f75375s.c | ||
27 | @@ -304,8 +304,6 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | ||
28 | case 0: /* Full speed */ | ||
29 | fanmode |= (3 << FAN_CTRL_MODE(nr)); | ||
30 | data->pwm[nr] = 255; | ||
31 | - f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
32 | - data->pwm[nr]); | ||
33 | break; | ||
34 | case 1: /* PWM */ | ||
35 | fanmode |= (3 << FAN_CTRL_MODE(nr)); | ||
36 | @@ -318,6 +316,9 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val) | ||
37 | } | ||
38 | f75375_write8(client, F75375_REG_FAN_TIMER, fanmode); | ||
39 | data->pwm_enable[nr] = val; | ||
40 | + if (val == 0) | ||
41 | + f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), | ||
42 | + data->pwm[nr]); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | -- | ||
47 | 1.7.7.4 | ||
48 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0069-epoll-introduce-POLLFREE-to-flush-signalfd_wqh-befor.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0069-epoll-introduce-POLLFREE-to-flush-signalfd_wqh-befor.patch new file mode 100644 index 00000000..ae8e8dfe --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0069-epoll-introduce-POLLFREE-to-flush-signalfd_wqh-befor.patch | |||
@@ -0,0 +1,164 @@ | |||
1 | From 7741374fa2e5b7fa48f674bdbac6e1d5edf55c5a Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleg Nesterov <oleg@redhat.com> | ||
3 | Date: Fri, 24 Feb 2012 20:07:11 +0100 | ||
4 | Subject: [PATCH 69/73] epoll: introduce POLLFREE to flush ->signalfd_wqh | ||
5 | before kfree() | ||
6 | |||
7 | commit d80e731ecab420ddcb79ee9d0ac427acbc187b4b upstream. | ||
8 | |||
9 | This patch is intentionally incomplete to simplify the review. | ||
10 | It ignores ep_unregister_pollwait() which plays with the same wqh. | ||
11 | See the next change. | ||
12 | |||
13 | epoll assumes that the EPOLL_CTL_ADD'ed file controls everything | ||
14 | f_op->poll() needs. In particular it assumes that the wait queue | ||
15 | can't go away until eventpoll_release(). This is not true in case | ||
16 | of signalfd, the task which does EPOLL_CTL_ADD uses its ->sighand | ||
17 | which is not connected to the file. | ||
18 | |||
19 | This patch adds the special event, POLLFREE, currently only for | ||
20 | epoll. It expects that init_poll_funcptr()'ed hook should do the | ||
21 | necessary cleanup. Perhaps it should be defined as EPOLLFREE in | ||
22 | eventpoll. | ||
23 | |||
24 | __cleanup_sighand() is changed to do wake_up_poll(POLLFREE) if | ||
25 | ->signalfd_wqh is not empty, we add the new signalfd_cleanup() | ||
26 | helper. | ||
27 | |||
28 | ep_poll_callback(POLLFREE) simply does list_del_init(task_list). | ||
29 | This make this poll entry inconsistent, but we don't care. If you | ||
30 | share epoll fd which contains our sigfd with another process you | ||
31 | should blame yourself. signalfd is "really special". I simply do | ||
32 | not know how we can define the "right" semantics if it used with | ||
33 | epoll. | ||
34 | |||
35 | The main problem is, epoll calls signalfd_poll() once to establish | ||
36 | the connection with the wait queue, after that signalfd_poll(NULL) | ||
37 | returns the different/inconsistent results depending on who does | ||
38 | EPOLL_CTL_MOD/signalfd_read/etc. IOW: apart from sigmask, signalfd | ||
39 | has nothing to do with the file, it works with the current thread. | ||
40 | |||
41 | In short: this patch is the hack which tries to fix the symptoms. | ||
42 | It also assumes that nobody can take tasklist_lock under epoll | ||
43 | locks, this seems to be true. | ||
44 | |||
45 | Note: | ||
46 | |||
47 | - we do not have wake_up_all_poll() but wake_up_poll() | ||
48 | is fine, poll/epoll doesn't use WQ_FLAG_EXCLUSIVE. | ||
49 | |||
50 | - signalfd_cleanup() uses POLLHUP along with POLLFREE, | ||
51 | we need a couple of simple changes in eventpoll.c to | ||
52 | make sure it can't be "lost". | ||
53 | |||
54 | Reported-by: Maxime Bizon <mbizon@freebox.fr> | ||
55 | Signed-off-by: Oleg Nesterov <oleg@redhat.com> | ||
56 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
57 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
58 | --- | ||
59 | fs/eventpoll.c | 4 ++++ | ||
60 | fs/signalfd.c | 11 +++++++++++ | ||
61 | include/asm-generic/poll.h | 2 ++ | ||
62 | include/linux/signalfd.h | 5 ++++- | ||
63 | kernel/fork.c | 5 ++++- | ||
64 | 5 files changed, 25 insertions(+), 2 deletions(-) | ||
65 | |||
66 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c | ||
67 | index 828e750..ede66ad 100644 | ||
68 | --- a/fs/eventpoll.c | ||
69 | +++ b/fs/eventpoll.c | ||
70 | @@ -827,6 +827,10 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *k | ||
71 | struct epitem *epi = ep_item_from_wait(wait); | ||
72 | struct eventpoll *ep = epi->ep; | ||
73 | |||
74 | + /* the caller holds eppoll_entry->whead->lock */ | ||
75 | + if ((unsigned long)key & POLLFREE) | ||
76 | + list_del_init(&wait->task_list); | ||
77 | + | ||
78 | spin_lock_irqsave(&ep->lock, flags); | ||
79 | |||
80 | /* | ||
81 | diff --git a/fs/signalfd.c b/fs/signalfd.c | ||
82 | index 492465b..79c1eea 100644 | ||
83 | --- a/fs/signalfd.c | ||
84 | +++ b/fs/signalfd.c | ||
85 | @@ -30,6 +30,17 @@ | ||
86 | #include <linux/signalfd.h> | ||
87 | #include <linux/syscalls.h> | ||
88 | |||
89 | +void signalfd_cleanup(struct sighand_struct *sighand) | ||
90 | +{ | ||
91 | + wait_queue_head_t *wqh = &sighand->signalfd_wqh; | ||
92 | + | ||
93 | + if (likely(!waitqueue_active(wqh))) | ||
94 | + return; | ||
95 | + | ||
96 | + /* wait_queue_t->func(POLLFREE) should do remove_wait_queue() */ | ||
97 | + wake_up_poll(wqh, POLLHUP | POLLFREE); | ||
98 | +} | ||
99 | + | ||
100 | struct signalfd_ctx { | ||
101 | sigset_t sigmask; | ||
102 | }; | ||
103 | diff --git a/include/asm-generic/poll.h b/include/asm-generic/poll.h | ||
104 | index 44bce83..9ce7f44 100644 | ||
105 | --- a/include/asm-generic/poll.h | ||
106 | +++ b/include/asm-generic/poll.h | ||
107 | @@ -28,6 +28,8 @@ | ||
108 | #define POLLRDHUP 0x2000 | ||
109 | #endif | ||
110 | |||
111 | +#define POLLFREE 0x4000 /* currently only for epoll */ | ||
112 | + | ||
113 | struct pollfd { | ||
114 | int fd; | ||
115 | short events; | ||
116 | diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h | ||
117 | index 3ff4961..247399b 100644 | ||
118 | --- a/include/linux/signalfd.h | ||
119 | +++ b/include/linux/signalfd.h | ||
120 | @@ -61,13 +61,16 @@ static inline void signalfd_notify(struct task_struct *tsk, int sig) | ||
121 | wake_up(&tsk->sighand->signalfd_wqh); | ||
122 | } | ||
123 | |||
124 | +extern void signalfd_cleanup(struct sighand_struct *sighand); | ||
125 | + | ||
126 | #else /* CONFIG_SIGNALFD */ | ||
127 | |||
128 | static inline void signalfd_notify(struct task_struct *tsk, int sig) { } | ||
129 | |||
130 | +static inline void signalfd_cleanup(struct sighand_struct *sighand) { } | ||
131 | + | ||
132 | #endif /* CONFIG_SIGNALFD */ | ||
133 | |||
134 | #endif /* __KERNEL__ */ | ||
135 | |||
136 | #endif /* _LINUX_SIGNALFD_H */ | ||
137 | - | ||
138 | diff --git a/kernel/fork.c b/kernel/fork.c | ||
139 | index da4a6a1..0acf42c0 100644 | ||
140 | --- a/kernel/fork.c | ||
141 | +++ b/kernel/fork.c | ||
142 | @@ -66,6 +66,7 @@ | ||
143 | #include <linux/user-return-notifier.h> | ||
144 | #include <linux/oom.h> | ||
145 | #include <linux/khugepaged.h> | ||
146 | +#include <linux/signalfd.h> | ||
147 | |||
148 | #include <asm/pgtable.h> | ||
149 | #include <asm/pgalloc.h> | ||
150 | @@ -910,8 +911,10 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk) | ||
151 | |||
152 | void __cleanup_sighand(struct sighand_struct *sighand) | ||
153 | { | ||
154 | - if (atomic_dec_and_test(&sighand->count)) | ||
155 | + if (atomic_dec_and_test(&sighand->count)) { | ||
156 | + signalfd_cleanup(sighand); | ||
157 | kmem_cache_free(sighand_cachep, sighand); | ||
158 | + } | ||
159 | } | ||
160 | |||
161 | |||
162 | -- | ||
163 | 1.7.7.4 | ||
164 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0070-epoll-ep_unregister_pollwait-can-use-the-freed-pwq-w.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0070-epoll-ep_unregister_pollwait-can-use-the-freed-pwq-w.patch new file mode 100644 index 00000000..f847fc28 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0070-epoll-ep_unregister_pollwait-can-use-the-freed-pwq-w.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From e6aa5c0ba6e2383b2952a9f340e58a990bf15111 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleg Nesterov <oleg@redhat.com> | ||
3 | Date: Fri, 24 Feb 2012 20:07:29 +0100 | ||
4 | Subject: [PATCH 70/73] epoll: ep_unregister_pollwait() can use the freed | ||
5 | pwq->whead | ||
6 | |||
7 | commit 971316f0503a5c50633d07b83b6db2f15a3a5b00 upstream. | ||
8 | |||
9 | signalfd_cleanup() ensures that ->signalfd_wqh is not used, but | ||
10 | this is not enough. eppoll_entry->whead still points to the memory | ||
11 | we are going to free, ep_unregister_pollwait()->remove_wait_queue() | ||
12 | is obviously unsafe. | ||
13 | |||
14 | Change ep_poll_callback(POLLFREE) to set eppoll_entry->whead = NULL, | ||
15 | change ep_unregister_pollwait() to check pwq->whead != NULL under | ||
16 | rcu_read_lock() before remove_wait_queue(). We add the new helper, | ||
17 | ep_remove_wait_queue(), for this. | ||
18 | |||
19 | This works because sighand_cachep is SLAB_DESTROY_BY_RCU and because | ||
20 | ->signalfd_wqh is initialized in sighand_ctor(), not in copy_sighand. | ||
21 | ep_unregister_pollwait()->remove_wait_queue() can play with already | ||
22 | freed and potentially reused ->sighand, but this is fine. This memory | ||
23 | must have the valid ->signalfd_wqh until rcu_read_unlock(). | ||
24 | |||
25 | Reported-by: Maxime Bizon <mbizon@freebox.fr> | ||
26 | Signed-off-by: Oleg Nesterov <oleg@redhat.com> | ||
27 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
29 | --- | ||
30 | fs/eventpoll.c | 30 +++++++++++++++++++++++++++--- | ||
31 | fs/signalfd.c | 6 +++++- | ||
32 | 2 files changed, 32 insertions(+), 4 deletions(-) | ||
33 | |||
34 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c | ||
35 | index ede66ad..12a772b 100644 | ||
36 | --- a/fs/eventpoll.c | ||
37 | +++ b/fs/eventpoll.c | ||
38 | @@ -299,6 +299,11 @@ static inline int ep_is_linked(struct list_head *p) | ||
39 | return !list_empty(p); | ||
40 | } | ||
41 | |||
42 | +static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_t *p) | ||
43 | +{ | ||
44 | + return container_of(p, struct eppoll_entry, wait); | ||
45 | +} | ||
46 | + | ||
47 | /* Get the "struct epitem" from a wait queue pointer */ | ||
48 | static inline struct epitem *ep_item_from_wait(wait_queue_t *p) | ||
49 | { | ||
50 | @@ -446,6 +451,18 @@ static void ep_poll_safewake(wait_queue_head_t *wq) | ||
51 | put_cpu(); | ||
52 | } | ||
53 | |||
54 | +static void ep_remove_wait_queue(struct eppoll_entry *pwq) | ||
55 | +{ | ||
56 | + wait_queue_head_t *whead; | ||
57 | + | ||
58 | + rcu_read_lock(); | ||
59 | + /* If it is cleared by POLLFREE, it should be rcu-safe */ | ||
60 | + whead = rcu_dereference(pwq->whead); | ||
61 | + if (whead) | ||
62 | + remove_wait_queue(whead, &pwq->wait); | ||
63 | + rcu_read_unlock(); | ||
64 | +} | ||
65 | + | ||
66 | /* | ||
67 | * This function unregisters poll callbacks from the associated file | ||
68 | * descriptor. Must be called with "mtx" held (or "epmutex" if called from | ||
69 | @@ -460,7 +477,7 @@ static void ep_unregister_pollwait(struct eventpoll *ep, struct epitem *epi) | ||
70 | pwq = list_first_entry(lsthead, struct eppoll_entry, llink); | ||
71 | |||
72 | list_del(&pwq->llink); | ||
73 | - remove_wait_queue(pwq->whead, &pwq->wait); | ||
74 | + ep_remove_wait_queue(pwq); | ||
75 | kmem_cache_free(pwq_cache, pwq); | ||
76 | } | ||
77 | } | ||
78 | @@ -827,9 +844,16 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *k | ||
79 | struct epitem *epi = ep_item_from_wait(wait); | ||
80 | struct eventpoll *ep = epi->ep; | ||
81 | |||
82 | - /* the caller holds eppoll_entry->whead->lock */ | ||
83 | - if ((unsigned long)key & POLLFREE) | ||
84 | + if ((unsigned long)key & POLLFREE) { | ||
85 | + ep_pwq_from_wait(wait)->whead = NULL; | ||
86 | + /* | ||
87 | + * whead = NULL above can race with ep_remove_wait_queue() | ||
88 | + * which can do another remove_wait_queue() after us, so we | ||
89 | + * can't use __remove_wait_queue(). whead->lock is held by | ||
90 | + * the caller. | ||
91 | + */ | ||
92 | list_del_init(&wait->task_list); | ||
93 | + } | ||
94 | |||
95 | spin_lock_irqsave(&ep->lock, flags); | ||
96 | |||
97 | diff --git a/fs/signalfd.c b/fs/signalfd.c | ||
98 | index 79c1eea..7ae2a57 100644 | ||
99 | --- a/fs/signalfd.c | ||
100 | +++ b/fs/signalfd.c | ||
101 | @@ -33,7 +33,11 @@ | ||
102 | void signalfd_cleanup(struct sighand_struct *sighand) | ||
103 | { | ||
104 | wait_queue_head_t *wqh = &sighand->signalfd_wqh; | ||
105 | - | ||
106 | + /* | ||
107 | + * The lockless check can race with remove_wait_queue() in progress, | ||
108 | + * but in this case its caller should run under rcu_read_lock() and | ||
109 | + * sighand_cachep is SLAB_DESTROY_BY_RCU, we can safely return. | ||
110 | + */ | ||
111 | if (likely(!waitqueue_active(wqh))) | ||
112 | return; | ||
113 | |||
114 | -- | ||
115 | 1.7.7.4 | ||
116 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0071-epoll-limit-paths.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0071-epoll-limit-paths.patch new file mode 100644 index 00000000..b6b53bad --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0071-epoll-limit-paths.patch | |||
@@ -0,0 +1,475 @@ | |||
1 | From 203aa5260edca2ab1872ad8b08386d874f7132f3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Baron <jbaron@redhat.com> | ||
3 | Date: Thu, 12 Jan 2012 17:17:43 -0800 | ||
4 | Subject: [PATCH 71/73] epoll: limit paths | ||
5 | |||
6 | commit 28d82dc1c4edbc352129f97f4ca22624d1fe61de upstream. | ||
7 | |||
8 | The current epoll code can be tickled to run basically indefinitely in | ||
9 | both loop detection path check (on ep_insert()), and in the wakeup paths. | ||
10 | The programs that tickle this behavior set up deeply linked networks of | ||
11 | epoll file descriptors that cause the epoll algorithms to traverse them | ||
12 | indefinitely. A couple of these sample programs have been previously | ||
13 | posted in this thread: https://lkml.org/lkml/2011/2/25/297. | ||
14 | |||
15 | To fix the loop detection path check algorithms, I simply keep track of | ||
16 | the epoll nodes that have been already visited. Thus, the loop detection | ||
17 | becomes proportional to the number of epoll file descriptor and links. | ||
18 | This dramatically decreases the run-time of the loop check algorithm. In | ||
19 | one diabolical case I tried it reduced the run-time from 15 mintues (all | ||
20 | in kernel time) to .3 seconds. | ||
21 | |||
22 | Fixing the wakeup paths could be done at wakeup time in a similar manner | ||
23 | by keeping track of nodes that have already been visited, but the | ||
24 | complexity is harder, since there can be multiple wakeups on different | ||
25 | cpus...Thus, I've opted to limit the number of possible wakeup paths when | ||
26 | the paths are created. | ||
27 | |||
28 | This is accomplished, by noting that the end file descriptor points that | ||
29 | are found during the loop detection pass (from the newly added link), are | ||
30 | actually the sources for wakeup events. I keep a list of these file | ||
31 | descriptors and limit the number and length of these paths that emanate | ||
32 | from these 'source file descriptors'. In the current implemetation I | ||
33 | allow 1000 paths of length 1, 500 of length 2, 100 of length 3, 50 of | ||
34 | length 4 and 10 of length 5. Note that it is sufficient to check the | ||
35 | 'source file descriptors' reachable from the newly added link, since no | ||
36 | other 'source file descriptors' will have newly added links. This allows | ||
37 | us to check only the wakeup paths that may have gotten too long, and not | ||
38 | re-check all possible wakeup paths on the system. | ||
39 | |||
40 | In terms of the path limit selection, I think its first worth noting that | ||
41 | the most common case for epoll, is probably the model where you have 1 | ||
42 | epoll file descriptor that is monitoring n number of 'source file | ||
43 | descriptors'. In this case, each 'source file descriptor' has a 1 path of | ||
44 | length 1. Thus, I believe that the limits I'm proposing are quite | ||
45 | reasonable and in fact may be too generous. Thus, I'm hoping that the | ||
46 | proposed limits will not prevent any workloads that currently work to | ||
47 | fail. | ||
48 | |||
49 | In terms of locking, I have extended the use of the 'epmutex' to all | ||
50 | epoll_ctl add and remove operations. Currently its only used in a subset | ||
51 | of the add paths. I need to hold the epmutex, so that we can correctly | ||
52 | traverse a coherent graph, to check the number of paths. I believe that | ||
53 | this additional locking is probably ok, since its in the setup/teardown | ||
54 | paths, and doesn't affect the running paths, but it certainly is going to | ||
55 | add some extra overhead. Also, worth noting is that the epmuex was | ||
56 | recently added to the ep_ctl add operations in the initial path loop | ||
57 | detection code using the argument that it was not on a critical path. | ||
58 | |||
59 | Another thing to note here, is the length of epoll chains that is allowed. | ||
60 | Currently, eventpoll.c defines: | ||
61 | |||
62 | /* Maximum number of nesting allowed inside epoll sets */ | ||
63 | #define EP_MAX_NESTS 4 | ||
64 | |||
65 | This basically means that I am limited to a graph depth of 5 (EP_MAX_NESTS | ||
66 | + 1). However, this limit is currently only enforced during the loop | ||
67 | check detection code, and only when the epoll file descriptors are added | ||
68 | in a certain order. Thus, this limit is currently easily bypassed. The | ||
69 | newly added check for wakeup paths, stricly limits the wakeup paths to a | ||
70 | length of 5, regardless of the order in which ep's are linked together. | ||
71 | Thus, a side-effect of the new code is a more consistent enforcement of | ||
72 | the graph depth. | ||
73 | |||
74 | Thus far, I've tested this, using the sample programs previously | ||
75 | mentioned, which now either return quickly or return -EINVAL. I've also | ||
76 | testing using the piptest.c epoll tester, which showed no difference in | ||
77 | performance. I've also created a number of different epoll networks and | ||
78 | tested that they behave as expectded. | ||
79 | |||
80 | I believe this solves the original diabolical test cases, while still | ||
81 | preserving the sane epoll nesting. | ||
82 | |||
83 | Signed-off-by: Jason Baron <jbaron@redhat.com> | ||
84 | Cc: Nelson Elhage <nelhage@ksplice.com> | ||
85 | Cc: Davide Libenzi <davidel@xmailserver.org> | ||
86 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
87 | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ||
88 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
89 | --- | ||
90 | fs/eventpoll.c | 234 ++++++++++++++++++++++++++++++++++++++++----- | ||
91 | include/linux/eventpoll.h | 1 + | ||
92 | include/linux/fs.h | 1 + | ||
93 | 3 files changed, 211 insertions(+), 25 deletions(-) | ||
94 | |||
95 | diff --git a/fs/eventpoll.c b/fs/eventpoll.c | ||
96 | index 12a772b..ea54cde 100644 | ||
97 | --- a/fs/eventpoll.c | ||
98 | +++ b/fs/eventpoll.c | ||
99 | @@ -197,6 +197,12 @@ struct eventpoll { | ||
100 | |||
101 | /* The user that created the eventpoll descriptor */ | ||
102 | struct user_struct *user; | ||
103 | + | ||
104 | + struct file *file; | ||
105 | + | ||
106 | + /* used to optimize loop detection check */ | ||
107 | + int visited; | ||
108 | + struct list_head visited_list_link; | ||
109 | }; | ||
110 | |||
111 | /* Wait structure used by the poll hooks */ | ||
112 | @@ -255,6 +261,15 @@ static struct kmem_cache *epi_cache __read_mostly; | ||
113 | /* Slab cache used to allocate "struct eppoll_entry" */ | ||
114 | static struct kmem_cache *pwq_cache __read_mostly; | ||
115 | |||
116 | +/* Visited nodes during ep_loop_check(), so we can unset them when we finish */ | ||
117 | +static LIST_HEAD(visited_list); | ||
118 | + | ||
119 | +/* | ||
120 | + * List of files with newly added links, where we may need to limit the number | ||
121 | + * of emanating paths. Protected by the epmutex. | ||
122 | + */ | ||
123 | +static LIST_HEAD(tfile_check_list); | ||
124 | + | ||
125 | #ifdef CONFIG_SYSCTL | ||
126 | |||
127 | #include <linux/sysctl.h> | ||
128 | @@ -276,6 +291,12 @@ ctl_table epoll_table[] = { | ||
129 | }; | ||
130 | #endif /* CONFIG_SYSCTL */ | ||
131 | |||
132 | +static const struct file_operations eventpoll_fops; | ||
133 | + | ||
134 | +static inline int is_file_epoll(struct file *f) | ||
135 | +{ | ||
136 | + return f->f_op == &eventpoll_fops; | ||
137 | +} | ||
138 | |||
139 | /* Setup the structure that is used as key for the RB tree */ | ||
140 | static inline void ep_set_ffd(struct epoll_filefd *ffd, | ||
141 | @@ -728,12 +749,6 @@ static const struct file_operations eventpoll_fops = { | ||
142 | .llseek = noop_llseek, | ||
143 | }; | ||
144 | |||
145 | -/* Fast test to see if the file is an eventpoll file */ | ||
146 | -static inline int is_file_epoll(struct file *f) | ||
147 | -{ | ||
148 | - return f->f_op == &eventpoll_fops; | ||
149 | -} | ||
150 | - | ||
151 | /* | ||
152 | * This is called from eventpoll_release() to unlink files from the eventpoll | ||
153 | * interface. We need to have this facility to cleanup correctly files that are | ||
154 | @@ -954,6 +969,99 @@ static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi) | ||
155 | rb_insert_color(&epi->rbn, &ep->rbr); | ||
156 | } | ||
157 | |||
158 | + | ||
159 | + | ||
160 | +#define PATH_ARR_SIZE 5 | ||
161 | +/* | ||
162 | + * These are the number paths of length 1 to 5, that we are allowing to emanate | ||
163 | + * from a single file of interest. For example, we allow 1000 paths of length | ||
164 | + * 1, to emanate from each file of interest. This essentially represents the | ||
165 | + * potential wakeup paths, which need to be limited in order to avoid massive | ||
166 | + * uncontrolled wakeup storms. The common use case should be a single ep which | ||
167 | + * is connected to n file sources. In this case each file source has 1 path | ||
168 | + * of length 1. Thus, the numbers below should be more than sufficient. These | ||
169 | + * path limits are enforced during an EPOLL_CTL_ADD operation, since a modify | ||
170 | + * and delete can't add additional paths. Protected by the epmutex. | ||
171 | + */ | ||
172 | +static const int path_limits[PATH_ARR_SIZE] = { 1000, 500, 100, 50, 10 }; | ||
173 | +static int path_count[PATH_ARR_SIZE]; | ||
174 | + | ||
175 | +static int path_count_inc(int nests) | ||
176 | +{ | ||
177 | + if (++path_count[nests] > path_limits[nests]) | ||
178 | + return -1; | ||
179 | + return 0; | ||
180 | +} | ||
181 | + | ||
182 | +static void path_count_init(void) | ||
183 | +{ | ||
184 | + int i; | ||
185 | + | ||
186 | + for (i = 0; i < PATH_ARR_SIZE; i++) | ||
187 | + path_count[i] = 0; | ||
188 | +} | ||
189 | + | ||
190 | +static int reverse_path_check_proc(void *priv, void *cookie, int call_nests) | ||
191 | +{ | ||
192 | + int error = 0; | ||
193 | + struct file *file = priv; | ||
194 | + struct file *child_file; | ||
195 | + struct epitem *epi; | ||
196 | + | ||
197 | + list_for_each_entry(epi, &file->f_ep_links, fllink) { | ||
198 | + child_file = epi->ep->file; | ||
199 | + if (is_file_epoll(child_file)) { | ||
200 | + if (list_empty(&child_file->f_ep_links)) { | ||
201 | + if (path_count_inc(call_nests)) { | ||
202 | + error = -1; | ||
203 | + break; | ||
204 | + } | ||
205 | + } else { | ||
206 | + error = ep_call_nested(&poll_loop_ncalls, | ||
207 | + EP_MAX_NESTS, | ||
208 | + reverse_path_check_proc, | ||
209 | + child_file, child_file, | ||
210 | + current); | ||
211 | + } | ||
212 | + if (error != 0) | ||
213 | + break; | ||
214 | + } else { | ||
215 | + printk(KERN_ERR "reverse_path_check_proc: " | ||
216 | + "file is not an ep!\n"); | ||
217 | + } | ||
218 | + } | ||
219 | + return error; | ||
220 | +} | ||
221 | + | ||
222 | +/** | ||
223 | + * reverse_path_check - The tfile_check_list is list of file *, which have | ||
224 | + * links that are proposed to be newly added. We need to | ||
225 | + * make sure that those added links don't add too many | ||
226 | + * paths such that we will spend all our time waking up | ||
227 | + * eventpoll objects. | ||
228 | + * | ||
229 | + * Returns: Returns zero if the proposed links don't create too many paths, | ||
230 | + * -1 otherwise. | ||
231 | + */ | ||
232 | +static int reverse_path_check(void) | ||
233 | +{ | ||
234 | + int length = 0; | ||
235 | + int error = 0; | ||
236 | + struct file *current_file; | ||
237 | + | ||
238 | + /* let's call this for all tfiles */ | ||
239 | + list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) { | ||
240 | + length++; | ||
241 | + path_count_init(); | ||
242 | + error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, | ||
243 | + reverse_path_check_proc, current_file, | ||
244 | + current_file, current); | ||
245 | + if (error) | ||
246 | + break; | ||
247 | + } | ||
248 | + return error; | ||
249 | +} | ||
250 | + | ||
251 | /* | ||
252 | * Must be called with "mtx" held. | ||
253 | */ | ||
254 | @@ -1015,6 +1123,11 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event, | ||
255 | */ | ||
256 | ep_rbtree_insert(ep, epi); | ||
257 | |||
258 | + /* now check if we've created too many backpaths */ | ||
259 | + error = -EINVAL; | ||
260 | + if (reverse_path_check()) | ||
261 | + goto error_remove_epi; | ||
262 | + | ||
263 | /* We have to drop the new item inside our item list to keep track of it */ | ||
264 | spin_lock_irqsave(&ep->lock, flags); | ||
265 | |||
266 | @@ -1039,6 +1152,14 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event, | ||
267 | |||
268 | return 0; | ||
269 | |||
270 | +error_remove_epi: | ||
271 | + spin_lock(&tfile->f_lock); | ||
272 | + if (ep_is_linked(&epi->fllink)) | ||
273 | + list_del_init(&epi->fllink); | ||
274 | + spin_unlock(&tfile->f_lock); | ||
275 | + | ||
276 | + rb_erase(&epi->rbn, &ep->rbr); | ||
277 | + | ||
278 | error_unregister: | ||
279 | ep_unregister_pollwait(ep, epi); | ||
280 | |||
281 | @@ -1303,18 +1424,36 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests) | ||
282 | int error = 0; | ||
283 | struct file *file = priv; | ||
284 | struct eventpoll *ep = file->private_data; | ||
285 | + struct eventpoll *ep_tovisit; | ||
286 | struct rb_node *rbp; | ||
287 | struct epitem *epi; | ||
288 | |||
289 | mutex_lock_nested(&ep->mtx, call_nests + 1); | ||
290 | + ep->visited = 1; | ||
291 | + list_add(&ep->visited_list_link, &visited_list); | ||
292 | for (rbp = rb_first(&ep->rbr); rbp; rbp = rb_next(rbp)) { | ||
293 | epi = rb_entry(rbp, struct epitem, rbn); | ||
294 | if (unlikely(is_file_epoll(epi->ffd.file))) { | ||
295 | + ep_tovisit = epi->ffd.file->private_data; | ||
296 | + if (ep_tovisit->visited) | ||
297 | + continue; | ||
298 | error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, | ||
299 | - ep_loop_check_proc, epi->ffd.file, | ||
300 | - epi->ffd.file->private_data, current); | ||
301 | + ep_loop_check_proc, epi->ffd.file, | ||
302 | + ep_tovisit, current); | ||
303 | if (error != 0) | ||
304 | break; | ||
305 | + } else { | ||
306 | + /* | ||
307 | + * If we've reached a file that is not associated with | ||
308 | + * an ep, then we need to check if the newly added | ||
309 | + * links are going to add too many wakeup paths. We do | ||
310 | + * this by adding it to the tfile_check_list, if it's | ||
311 | + * not already there, and calling reverse_path_check() | ||
312 | + * during ep_insert(). | ||
313 | + */ | ||
314 | + if (list_empty(&epi->ffd.file->f_tfile_llink)) | ||
315 | + list_add(&epi->ffd.file->f_tfile_llink, | ||
316 | + &tfile_check_list); | ||
317 | } | ||
318 | } | ||
319 | mutex_unlock(&ep->mtx); | ||
320 | @@ -1335,8 +1474,31 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests) | ||
321 | */ | ||
322 | static int ep_loop_check(struct eventpoll *ep, struct file *file) | ||
323 | { | ||
324 | - return ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, | ||
325 | + int ret; | ||
326 | + struct eventpoll *ep_cur, *ep_next; | ||
327 | + | ||
328 | + ret = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS, | ||
329 | ep_loop_check_proc, file, ep, current); | ||
330 | + /* clear visited list */ | ||
331 | + list_for_each_entry_safe(ep_cur, ep_next, &visited_list, | ||
332 | + visited_list_link) { | ||
333 | + ep_cur->visited = 0; | ||
334 | + list_del(&ep_cur->visited_list_link); | ||
335 | + } | ||
336 | + return ret; | ||
337 | +} | ||
338 | + | ||
339 | +static void clear_tfile_check_list(void) | ||
340 | +{ | ||
341 | + struct file *file; | ||
342 | + | ||
343 | + /* first clear the tfile_check_list */ | ||
344 | + while (!list_empty(&tfile_check_list)) { | ||
345 | + file = list_first_entry(&tfile_check_list, struct file, | ||
346 | + f_tfile_llink); | ||
347 | + list_del_init(&file->f_tfile_llink); | ||
348 | + } | ||
349 | + INIT_LIST_HEAD(&tfile_check_list); | ||
350 | } | ||
351 | |||
352 | /* | ||
353 | @@ -1344,8 +1506,9 @@ static int ep_loop_check(struct eventpoll *ep, struct file *file) | ||
354 | */ | ||
355 | SYSCALL_DEFINE1(epoll_create1, int, flags) | ||
356 | { | ||
357 | - int error; | ||
358 | + int error, fd; | ||
359 | struct eventpoll *ep = NULL; | ||
360 | + struct file *file; | ||
361 | |||
362 | /* Check the EPOLL_* constant for consistency. */ | ||
363 | BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC); | ||
364 | @@ -1362,11 +1525,25 @@ SYSCALL_DEFINE1(epoll_create1, int, flags) | ||
365 | * Creates all the items needed to setup an eventpoll file. That is, | ||
366 | * a file structure and a free file descriptor. | ||
367 | */ | ||
368 | - error = anon_inode_getfd("[eventpoll]", &eventpoll_fops, ep, | ||
369 | + fd = get_unused_fd_flags(O_RDWR | (flags & O_CLOEXEC)); | ||
370 | + if (fd < 0) { | ||
371 | + error = fd; | ||
372 | + goto out_free_ep; | ||
373 | + } | ||
374 | + file = anon_inode_getfile("[eventpoll]", &eventpoll_fops, ep, | ||
375 | O_RDWR | (flags & O_CLOEXEC)); | ||
376 | - if (error < 0) | ||
377 | - ep_free(ep); | ||
378 | - | ||
379 | + if (IS_ERR(file)) { | ||
380 | + error = PTR_ERR(file); | ||
381 | + goto out_free_fd; | ||
382 | + } | ||
383 | + fd_install(fd, file); | ||
384 | + ep->file = file; | ||
385 | + return fd; | ||
386 | + | ||
387 | +out_free_fd: | ||
388 | + put_unused_fd(fd); | ||
389 | +out_free_ep: | ||
390 | + ep_free(ep); | ||
391 | return error; | ||
392 | } | ||
393 | |||
394 | @@ -1432,21 +1609,27 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, | ||
395 | /* | ||
396 | * When we insert an epoll file descriptor, inside another epoll file | ||
397 | * descriptor, there is the change of creating closed loops, which are | ||
398 | - * better be handled here, than in more critical paths. | ||
399 | + * better be handled here, than in more critical paths. While we are | ||
400 | + * checking for loops we also determine the list of files reachable | ||
401 | + * and hang them on the tfile_check_list, so we can check that we | ||
402 | + * haven't created too many possible wakeup paths. | ||
403 | * | ||
404 | - * We hold epmutex across the loop check and the insert in this case, in | ||
405 | - * order to prevent two separate inserts from racing and each doing the | ||
406 | - * insert "at the same time" such that ep_loop_check passes on both | ||
407 | - * before either one does the insert, thereby creating a cycle. | ||
408 | + * We need to hold the epmutex across both ep_insert and ep_remove | ||
409 | + * b/c we want to make sure we are looking at a coherent view of | ||
410 | + * epoll network. | ||
411 | */ | ||
412 | - if (unlikely(is_file_epoll(tfile) && op == EPOLL_CTL_ADD)) { | ||
413 | + if (op == EPOLL_CTL_ADD || op == EPOLL_CTL_DEL) { | ||
414 | mutex_lock(&epmutex); | ||
415 | did_lock_epmutex = 1; | ||
416 | - error = -ELOOP; | ||
417 | - if (ep_loop_check(ep, tfile) != 0) | ||
418 | - goto error_tgt_fput; | ||
419 | } | ||
420 | - | ||
421 | + if (op == EPOLL_CTL_ADD) { | ||
422 | + if (is_file_epoll(tfile)) { | ||
423 | + error = -ELOOP; | ||
424 | + if (ep_loop_check(ep, tfile) != 0) | ||
425 | + goto error_tgt_fput; | ||
426 | + } else | ||
427 | + list_add(&tfile->f_tfile_llink, &tfile_check_list); | ||
428 | + } | ||
429 | |||
430 | mutex_lock_nested(&ep->mtx, 0); | ||
431 | |||
432 | @@ -1465,6 +1648,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, | ||
433 | error = ep_insert(ep, &epds, tfile, fd); | ||
434 | } else | ||
435 | error = -EEXIST; | ||
436 | + clear_tfile_check_list(); | ||
437 | break; | ||
438 | case EPOLL_CTL_DEL: | ||
439 | if (epi) | ||
440 | @@ -1483,7 +1667,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, | ||
441 | mutex_unlock(&ep->mtx); | ||
442 | |||
443 | error_tgt_fput: | ||
444 | - if (unlikely(did_lock_epmutex)) | ||
445 | + if (did_lock_epmutex) | ||
446 | mutex_unlock(&epmutex); | ||
447 | |||
448 | fput(tfile); | ||
449 | diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h | ||
450 | index f362733..657ab55 100644 | ||
451 | --- a/include/linux/eventpoll.h | ||
452 | +++ b/include/linux/eventpoll.h | ||
453 | @@ -61,6 +61,7 @@ struct file; | ||
454 | static inline void eventpoll_init_file(struct file *file) | ||
455 | { | ||
456 | INIT_LIST_HEAD(&file->f_ep_links); | ||
457 | + INIT_LIST_HEAD(&file->f_tfile_llink); | ||
458 | } | ||
459 | |||
460 | |||
461 | diff --git a/include/linux/fs.h b/include/linux/fs.h | ||
462 | index e0bc4ff..10b2288 100644 | ||
463 | --- a/include/linux/fs.h | ||
464 | +++ b/include/linux/fs.h | ||
465 | @@ -1001,6 +1001,7 @@ struct file { | ||
466 | #ifdef CONFIG_EPOLL | ||
467 | /* Used by fs/eventpoll.c to link all the hooks to this file */ | ||
468 | struct list_head f_ep_links; | ||
469 | + struct list_head f_tfile_llink; | ||
470 | #endif /* #ifdef CONFIG_EPOLL */ | ||
471 | struct address_space *f_mapping; | ||
472 | #ifdef CONFIG_DEBUG_WRITECOUNT | ||
473 | -- | ||
474 | 1.7.7.4 | ||
475 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0072-cdrom-use-copy_to_user-without-the-underscores.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0072-cdrom-use-copy_to_user-without-the-underscores.patch new file mode 100644 index 00000000..b5eb4025 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0072-cdrom-use-copy_to_user-without-the-underscores.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From c1dd346c39c2a7d3ca7b9670e9504ae19d4e927a Mon Sep 17 00:00:00 2001 | ||
2 | From: Dan Carpenter <dan.carpenter@oracle.com> | ||
3 | Date: Mon, 6 Feb 2012 10:20:45 +0100 | ||
4 | Subject: [PATCH 72/73] cdrom: use copy_to_user() without the underscores | ||
5 | |||
6 | commit 822bfa51ce44f2c63c300fdb76dc99c4d5a5ca9f upstream. | ||
7 | |||
8 | "nframes" comes from the user and "nframes * CD_FRAMESIZE_RAW" can wrap | ||
9 | on 32 bit systems. That would have been ok if we used the same wrapped | ||
10 | value for the copy, but we use a shifted value. We should just use the | ||
11 | checked version of copy_to_user() because it's not going to make a | ||
12 | difference to the speed. | ||
13 | |||
14 | Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> | ||
15 | Signed-off-by: Jens Axboe <axboe@kernel.dk> | ||
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
17 | --- | ||
18 | drivers/cdrom/cdrom.c | 8 +------- | ||
19 | 1 files changed, 1 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c | ||
22 | index cedb231..2678b6f 100644 | ||
23 | --- a/drivers/cdrom/cdrom.c | ||
24 | +++ b/drivers/cdrom/cdrom.c | ||
25 | @@ -2120,11 +2120,6 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf, | ||
26 | if (!nr) | ||
27 | return -ENOMEM; | ||
28 | |||
29 | - if (!access_ok(VERIFY_WRITE, ubuf, nframes * CD_FRAMESIZE_RAW)) { | ||
30 | - ret = -EFAULT; | ||
31 | - goto out; | ||
32 | - } | ||
33 | - | ||
34 | cgc.data_direction = CGC_DATA_READ; | ||
35 | while (nframes > 0) { | ||
36 | if (nr > nframes) | ||
37 | @@ -2133,7 +2128,7 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf, | ||
38 | ret = cdrom_read_block(cdi, &cgc, lba, nr, 1, CD_FRAMESIZE_RAW); | ||
39 | if (ret) | ||
40 | break; | ||
41 | - if (__copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) { | ||
42 | + if (copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) { | ||
43 | ret = -EFAULT; | ||
44 | break; | ||
45 | } | ||
46 | @@ -2141,7 +2136,6 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf, | ||
47 | nframes -= nr; | ||
48 | lba += nr; | ||
49 | } | ||
50 | -out: | ||
51 | kfree(cgc.buffer); | ||
52 | return ret; | ||
53 | } | ||
54 | -- | ||
55 | 1.7.7.4 | ||
56 | |||
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0073-Linux-3.2.9.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0073-Linux-3.2.9.patch new file mode 100644 index 00000000..a22af089 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0073-Linux-3.2.9.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 44fb3170ae46f8de964a4bb5b0504e865a6dd7da Mon Sep 17 00:00:00 2001 | ||
2 | From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
3 | Date: Wed, 29 Feb 2012 16:32:49 -0800 | ||
4 | Subject: [PATCH 73/73] Linux 3.2.9 | ||
5 | |||
6 | --- | ||
7 | Makefile | 2 +- | ||
8 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/Makefile b/Makefile | ||
11 | index 7df8a84..5f1739b 100644 | ||
12 | --- a/Makefile | ||
13 | +++ b/Makefile | ||
14 | @@ -1,6 +1,6 @@ | ||
15 | VERSION = 3 | ||
16 | PATCHLEVEL = 2 | ||
17 | -SUBLEVEL = 8 | ||
18 | +SUBLEVEL = 9 | ||
19 | EXTRAVERSION = | ||
20 | NAME = Saber-toothed Squirrel | ||
21 | |||
22 | -- | ||
23 | 1.7.7.4 | ||
24 | |||