From 9d8dfacbf499dcae05fb26bb73849650e8898cc7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 22 Mar 2012 11:26:20 -0700 Subject: [PATCH] 3.3-stable patches added patches: staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch staging-zcache-avoid-ab-ba-deadlock-condition.patch usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch usb-option-add-zte-mf820d.patch usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch usb-option-make-interface-blacklist-work-again.patch --- queue-3.3/series | 7 ++ ...egister-notifier-from-atomic-context.patch | 81 +++++++++++++++++++ ...hy-binding-in-octeon-ethernet-driver.patch | 35 ++++++++ ...cache-avoid-ab-ba-deadlock-condition.patch | 64 +++++++++++++++ ...ediatek-mt6276m-modem-app-interfaces.patch | 42 ++++++++++ queue-3.3/usb-option-add-zte-mf820d.patch | 35 ++++++++ ...gle-cc864-dual-and-de910-dual-modems.patch | 41 ++++++++++ ...-make-interface-blacklist-work-again.patch | 35 ++++++++ 8 files changed, 340 insertions(+) create mode 100644 queue-3.3/series create mode 100644 queue-3.3/staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch create mode 100644 queue-3.3/staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch create mode 100644 queue-3.3/staging-zcache-avoid-ab-ba-deadlock-condition.patch create mode 100644 queue-3.3/usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch create mode 100644 queue-3.3/usb-option-add-zte-mf820d.patch create mode 100644 queue-3.3/usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch create mode 100644 queue-3.3/usb-option-make-interface-blacklist-work-again.patch diff --git a/queue-3.3/series b/queue-3.3/series new file mode 100644 index 00000000000..a6d76938589 --- /dev/null +++ b/queue-3.3/series @@ -0,0 +1,7 @@ +usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch +usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch +usb-option-make-interface-blacklist-work-again.patch +usb-option-add-zte-mf820d.patch +staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch +staging-zcache-avoid-ab-ba-deadlock-condition.patch +staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch diff --git a/queue-3.3/staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch b/queue-3.3/staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch new file mode 100644 index 00000000000..dfa24749c8b --- /dev/null +++ b/queue-3.3/staging-android-lowmemorykiller-don-t-unregister-notifier-from-atomic-context.patch @@ -0,0 +1,81 @@ +From 1eda5166c7640092f512138be6899d050c3d62ed Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Wed, 7 Mar 2012 17:54:00 +0400 +Subject: staging: android/lowmemorykiller: Don't unregister notifier from atomic context + +From: "Paul E. McKenney" + +commit 1eda5166c7640092f512138be6899d050c3d62ed upstream. + +The lowmemorykiller registers an atomic notifier for notfication of when +the task is freed. From this atomic notifier callback, it removes the +atomic notifier via task_free_unregister(). This is incorrect because +atomic_notifier_chain_unregister() calls syncronize_rcu(), which can +sleep, which shouldn't be done from an atomic notifier. + +Fix this by registering the notifier during init, and only unregister it +if the lowmemorykiller is unloaded. + +Rebased to -next by Paul E. McKenney. +Rebased to -next again by Anton Vorontsov. + +Signed-off-by: Rabin Vincent +Signed-off-by: Christian Bejram +Signed-off-by: Paul E. McKenney +Reported-by: John Stultz +Signed-off-by: Anton Vorontsov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/android/lowmemorykiller.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/staging/android/lowmemorykiller.c ++++ b/drivers/staging/android/lowmemorykiller.c +@@ -73,10 +73,10 @@ static int + task_notify_func(struct notifier_block *self, unsigned long val, void *data) + { + struct task_struct *task = data; +- if (task == lowmem_deathpending) { ++ ++ if (task == lowmem_deathpending) + lowmem_deathpending = NULL; +- task_handoff_unregister(&task_nb); +- } ++ + return NOTIFY_OK; + } + +@@ -174,14 +174,12 @@ static int lowmem_shrink(struct shrinker + selected->pid, selected->comm, + selected_oom_adj, selected_tasksize); + /* +- * If CONFIG_PROFILING is off, then task_handoff_register() +- * is a nop. In that case we don't want to stall the killer +- * by setting lowmem_deathpending. ++ * If CONFIG_PROFILING is off, then we don't want to stall ++ * the killer by setting lowmem_deathpending. + */ + #ifdef CONFIG_PROFILING + lowmem_deathpending = selected; + lowmem_deathpending_timeout = jiffies + HZ; +- task_handoff_register(&task_nb); + #endif + force_sig(SIGKILL, selected); + rem -= selected_tasksize; +@@ -199,6 +197,7 @@ static struct shrinker lowmem_shrinker = + + static int __init lowmem_init(void) + { ++ task_handoff_register(&task_nb); + register_shrinker(&lowmem_shrinker); + return 0; + } +@@ -206,6 +205,7 @@ static int __init lowmem_init(void) + static void __exit lowmem_exit(void) + { + unregister_shrinker(&lowmem_shrinker); ++ task_handoff_unregister(&task_nb); + } + + module_param_named(cost, lowmem_shrinker.seeks, int, S_IRUGO | S_IWUSR); diff --git a/queue-3.3/staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch b/queue-3.3/staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch new file mode 100644 index 00000000000..e0958821ba2 --- /dev/null +++ b/queue-3.3/staging-octeon-fix-phy-binding-in-octeon-ethernet-driver.patch @@ -0,0 +1,35 @@ +From b5c19ca8014aa5151712274d5e70c3666a8918c1 Mon Sep 17 00:00:00 2001 +From: David Daney +Date: Thu, 23 Feb 2012 11:19:31 -0800 +Subject: staging/octeon: Fix PHY binding in octeon-ethernet driver. + +From: David Daney + +commit b5c19ca8014aa5151712274d5e70c3666a8918c1 upstream. + +Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the +names used to refer to MDIO buses. The ethernet driver must be +changed to match, so that the PHY drivers can be attached. + +Signed-off-by: David Daney +Acked-by: Florian Fainelli +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/octeon/ethernet-mdio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/octeon/ethernet-mdio.c ++++ b/drivers/staging/octeon/ethernet-mdio.c +@@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_ + + int phy_addr = cvmx_helper_board_get_mii_address(priv->port); + if (phy_addr != -1) { +- char phy_id[20]; ++ char phy_id[MII_BUS_ID_SIZE + 3]; + +- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr); ++ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", phy_addr); + + priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0, + PHY_INTERFACE_MODE_GMII); diff --git a/queue-3.3/staging-zcache-avoid-ab-ba-deadlock-condition.patch b/queue-3.3/staging-zcache-avoid-ab-ba-deadlock-condition.patch new file mode 100644 index 00000000000..8b68256a53d --- /dev/null +++ b/queue-3.3/staging-zcache-avoid-ab-ba-deadlock-condition.patch @@ -0,0 +1,64 @@ +From cfbc6a92212e74b07aa76c9e2f20c542e36077fb Mon Sep 17 00:00:00 2001 +From: Andrea Righi +Date: Mon, 20 Feb 2012 13:11:49 +0100 +Subject: staging: zcache: avoid AB-BA deadlock condition + +From: Andrea Righi + +commit cfbc6a92212e74b07aa76c9e2f20c542e36077fb upstream. + +Commit 9256a47 fixed a deadlock condition, being sure that the buddy +list spinlock is always taken before the page spinlock. + +However in zbud_free_and_delist() locking order is the opposite +(page lock -> list lock). + +Possible unsafe locking scenario (reported by lockdep): + + CPU0 CPU1 + ---- ---- + lock(&(&zbpg->lock)->rlock); + lock(zbud_budlists_spinlock); + lock(&(&zbpg->lock)->rlock); + lock(zbud_budlists_spinlock); + +Fix by grabbing the locks in opposite order in zbud_free_and_delist(). + +Signed-off-by: Andrea Righi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/staging/zcache/zcache-main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/staging/zcache/zcache-main.c ++++ b/drivers/staging/zcache/zcache-main.c +@@ -299,10 +299,12 @@ static void zbud_free_and_delist(struct + struct zbud_page *zbpg = + container_of(zh, struct zbud_page, buddy[budnum]); + ++ spin_lock(&zbud_budlists_spinlock); + spin_lock(&zbpg->lock); + if (list_empty(&zbpg->bud_list)) { + /* ignore zombie page... see zbud_evict_pages() */ + spin_unlock(&zbpg->lock); ++ spin_unlock(&zbud_budlists_spinlock); + return; + } + size = zbud_free(zh); +@@ -310,7 +312,6 @@ static void zbud_free_and_delist(struct + zh_other = &zbpg->buddy[(budnum == 0) ? 1 : 0]; + if (zh_other->size == 0) { /* was unbuddied: unlist and free */ + chunks = zbud_size_to_chunks(size) ; +- spin_lock(&zbud_budlists_spinlock); + BUG_ON(list_empty(&zbud_unbuddied[chunks].list)); + list_del_init(&zbpg->bud_list); + zbud_unbuddied[chunks].count--; +@@ -318,7 +319,6 @@ static void zbud_free_and_delist(struct + zbud_free_raw_page(zbpg); + } else { /* was buddied: move remaining buddy to unbuddied list */ + chunks = zbud_size_to_chunks(zh_other->size) ; +- spin_lock(&zbud_budlists_spinlock); + list_del_init(&zbpg->bud_list); + zcache_zbud_buddied_count--; + list_add_tail(&zbpg->bud_list, &zbud_unbuddied[chunks].list); diff --git a/queue-3.3/usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch b/queue-3.3/usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch new file mode 100644 index 00000000000..fd30341049b --- /dev/null +++ b/queue-3.3/usb-option-add-mediatek-mt6276m-modem-app-interfaces.patch @@ -0,0 +1,42 @@ +From 0d8520a1d7f43328bc7085d4244d93c595064157 Mon Sep 17 00:00:00 2001 +From: Meng Zhang +Date: Mon, 27 Feb 2012 08:24:19 +0100 +Subject: USB: option: Add MediaTek MT6276M modem&app interfaces + +From: Meng Zhang + +commit 0d8520a1d7f43328bc7085d4244d93c595064157 upstream. + +Add MEDIATEK products to Option driver + +Signed-off-by: Meng Zhang +Signed-off-by: Matthias Urlichs +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -484,6 +484,9 @@ static void option_instat_callback(struc + #define LG_VENDOR_ID 0x1004 + #define LG_PRODUCT_L02C 0x618f + ++/* MediaTek products */ ++#define MEDIATEK_VENDOR_ID 0x0e8d ++ + /* some devices interfaces need special handling due to a number of reasons */ + enum option_blacklist_reason { + OPTION_BLACKLIST_NONE = 0, +@@ -1198,6 +1201,10 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) }, + { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */ ++ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x00, 0x00) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a1, 0xff, 0x02, 0x01) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x00, 0x00) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x00a2, 0xff, 0x02, 0x01) }, /* MediaTek MT6276M modem & app port */ + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/queue-3.3/usb-option-add-zte-mf820d.patch b/queue-3.3/usb-option-add-zte-mf820d.patch new file mode 100644 index 00000000000..7004c239c90 --- /dev/null +++ b/queue-3.3/usb-option-add-zte-mf820d.patch @@ -0,0 +1,35 @@ +From 5889d3d4209c1050b4a3c96c41faf6c0976a4acf Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Fri, 16 Mar 2012 15:41:26 +0100 +Subject: USB: option: add ZTE MF820D +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bjørn Mork + +commit 5889d3d4209c1050b4a3c96c41faf6c0976a4acf upstream. + +This device presents a total of 5 interfaces with ff/ff/ff +class/subclass/protocol. The last one of these is verified +to be a QMI/wwan combined interface which should be handled +by the qmi_wwan driver, so we blacklist it here. + +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -901,6 +901,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff), ++ .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, diff --git a/queue-3.3/usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch b/queue-3.3/usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch new file mode 100644 index 00000000000..a1f2615812d --- /dev/null +++ b/queue-3.3/usb-option-driver-adding-support-for-telit-cc864-single-cc864-dual-and-de910-dual-modems.patch @@ -0,0 +1,41 @@ +From 7204cf584836c24b4b06e4ad4a8e6bb8ea84908e Mon Sep 17 00:00:00 2001 +From: Daniele Palmas +Date: Wed, 29 Feb 2012 15:32:05 +0100 +Subject: USB: option driver: adding support for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL modems + +From: Daniele Palmas + +commit 7204cf584836c24b4b06e4ad4a8e6bb8ea84908e upstream. + +Adding PID for Telit CC864-SINGLE, CC864-DUAL and DE910-DUAL +modems + +Signed-off-by: Daniele Palmas +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -307,6 +307,9 @@ static void option_instat_callback(struc + #define TELIT_VENDOR_ID 0x1bc7 + #define TELIT_PRODUCT_UC864E 0x1003 + #define TELIT_PRODUCT_UC864G 0x1004 ++#define TELIT_PRODUCT_CC864_DUAL 0x1005 ++#define TELIT_PRODUCT_CC864_SINGLE 0x1006 ++#define TELIT_PRODUCT_DE910_DUAL 0x1010 + + /* ZTE PRODUCTS */ + #define ZTE_VENDOR_ID 0x19d2 +@@ -771,6 +774,9 @@ static const struct usb_device_id option + { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) }, ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) }, ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, ++ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, diff --git a/queue-3.3/usb-option-make-interface-blacklist-work-again.patch b/queue-3.3/usb-option-make-interface-blacklist-work-again.patch new file mode 100644 index 00000000000..9e509498d31 --- /dev/null +++ b/queue-3.3/usb-option-make-interface-blacklist-work-again.patch @@ -0,0 +1,35 @@ +From 963940cf472d76eca2d36296e461202cc6997352 Mon Sep 17 00:00:00 2001 +From: Bjørn Mork +Date: Fri, 16 Mar 2012 12:56:44 +0100 +Subject: USB: option: make interface blacklist work again +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Bjørn Mork + +commit 963940cf472d76eca2d36296e461202cc6997352 upstream. + +commit 0d905fd "USB: option: convert Huawei K3765, K4505, K4605 +reservered interface to blacklist" accidentally ANDed two +blacklist tests by leaving out a return. This was not noticed +because the two consecutive bracketless if statements made it +syntactically correct. + +Signed-off-by: Bjørn Mork +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/option.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1373,6 +1373,7 @@ static int option_probe(struct usb_seria + serial->interface->cur_altsetting->desc.bInterfaceNumber, + OPTION_BLACKLIST_RESERVED_IF, + (const struct option_blacklist_info *) id->driver_info)) ++ return -ENODEV; + + /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */ + if (serial->dev->descriptor.idVendor == SAMSUNG_VENDOR_ID && -- 2.47.3