]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mei: use uuid, me_addr tuple addressing also for flow control credits
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 7 Dec 2014 14:40:14 +0000 (16:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2015 13:04:10 +0000 (05:04 -0800)
Add uuid, me_addr addressing also for flow control credits.
The only exception in cases for single buffer clients for which
the host address in flow credits response is always 0

To in order to deal with add/remove race between fw and driver clients
addressing we need to use [uuid, me_addr] tuple to address the clients

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.c

index 1382d551d7ed676f2c0eeb0d417382c1ca9fac33..3be18b7951e5fd43dc4014ed7f3fc97e994f3c0d 100644 (file)
@@ -704,7 +704,7 @@ int mei_cl_flow_ctrl_creds(struct mei_cl *cl)
        if (cl->mei_flow_ctrl_creds > 0)
                return 1;
 
-       me_cl = mei_me_cl_by_id(dev, cl->me_client_id);
+       me_cl = mei_me_cl_by_uuid_id(dev, &cl->cl_uuid, cl->me_client_id);
        if (!me_cl) {
                cl_err(dev, cl, "no such me client %d\n", cl->me_client_id);
                return -ENOENT;
@@ -738,7 +738,7 @@ int mei_cl_flow_ctrl_reduce(struct mei_cl *cl)
 
        dev = cl->dev;
 
-       me_cl = mei_me_cl_by_id(dev, cl->me_client_id);
+       me_cl = mei_me_cl_by_uuid_id(dev, &cl->cl_uuid, cl->me_client_id);
        if (!me_cl) {
                cl_err(dev, cl, "no such me client %d\n", cl->me_client_id);
                return -ENOENT;