summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
commitbb39b8d99aae1f7eb13a97bd874838da91080de6 (patch)
tree3046f53937c0bc5dc13e2b2ab7b688a1932199bf /target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch
parentc6c0d09f85c211560a1405441925681cfa25e8b1 (diff)
downloadmtk-20170518-bb39b8d99aae1f7eb13a97bd874838da91080de6.zip
mtk-20170518-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.gz
mtk-20170518-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.bz2
brcm2708: update against latest rpi-3.10.y branch
Update our copies of the brcm2708 patches to the latest rpi-3.10-y rebased against linux-3.10.y stable (3.10.32). This should hopefully make it easier for us in the future to leverage the raspberry/rpi-* branches. Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 39770
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch b/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch
new file mode 100644
index 0000000..fa8e79c
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch
@@ -0,0 +1,89 @@
+From 6d8dc87966b488c93a365657588690137de13ed1 Mon Sep 17 00:00:00 2001
+From: Vincent Sanders <vincent.sanders@collabora.co.uk>
+Date: Mon, 30 Sep 2013 17:04:55 +0100
+Subject: [PATCH 109/174] vchiq: fix the shim message release
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+---
+ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 47 +++++++++++++---------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+--- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c
++++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c
+@@ -545,47 +545,58 @@ static VCHIQ_STATUS_T shim_callback(VCHI
+ SHIM_SERVICE_T *service =
+ (SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle);
+
++ if (!service->callback)
++ goto release;
++
+ switch (reason) {
+ case VCHIQ_MESSAGE_AVAILABLE:
+ vchiu_queue_push(&service->queue, header);
+
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_MSG_AVAILABLE, NULL);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_MSG_AVAILABLE, NULL);
++
++ goto done;
+ break;
++
+ case VCHIQ_BULK_TRANSMIT_DONE:
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_BULK_SENT, bulk_user);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_BULK_SENT, bulk_user);
+ break;
++
+ case VCHIQ_BULK_RECEIVE_DONE:
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_BULK_RECEIVED, bulk_user);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_BULK_RECEIVED, bulk_user);
+ break;
++
+ case VCHIQ_SERVICE_CLOSED:
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_SERVICE_CLOSED, NULL);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_SERVICE_CLOSED, NULL);
+ break;
++
+ case VCHIQ_SERVICE_OPENED:
+ /* No equivalent VCHI reason */
+ break;
++
+ case VCHIQ_BULK_TRANSMIT_ABORTED:
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_BULK_TRANSMIT_ABORTED, bulk_user);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_BULK_TRANSMIT_ABORTED,
++ bulk_user);
+ break;
++
+ case VCHIQ_BULK_RECEIVE_ABORTED:
+- if (service->callback)
+- service->callback(service->callback_param,
+- VCHI_CALLBACK_BULK_RECEIVE_ABORTED, bulk_user);
++ service->callback(service->callback_param,
++ VCHI_CALLBACK_BULK_RECEIVE_ABORTED,
++ bulk_user);
+ break;
++
+ default:
+ WARN(1, "not supported\n");
+ break;
+ }
+
++release:
++ vchiq_release_message(service->handle, header);
++done:
+ return VCHIQ_SUCCESS;
+ }
+