Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1448583

[char-misc-next 06/12] mei: prepare read cb for fixed address clients on the receive path only.

From Tomas Winkler <tomas.winkler@intel.com>
Newsgroups linux.kernel
Subject [char-misc-next 06/12] mei: prepare read cb for fixed address clients on the receive path only.
Date 2016-07-22 15:10 +0200
Message-ID <rXIng-6hr-5@gated-at.bofh.it> (permalink)
References <rXIdz-5YC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Alexander Usyskin <alexander.usyskin@intel.com>

The read callbacks for the fixed address clients, that don't have flow
control are built now on the receive path. In order to have a single
allocation place we remove the allocation from the read request.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/client.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 2a09db86e50e..05cacc3e718f 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1459,17 +1459,15 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp)
 		return  -ENOTTY;
 	}
 
+	if (mei_cl_is_fixed_address(cl))
+		return 0;
+
 	/* always allocate at least client max message */
 	length = max_t(size_t, length, mei_cl_mtu(cl));
 	cb = mei_cl_alloc_cb(cl, length, MEI_FOP_READ, fp);
 	if (!cb)
 		return -ENOMEM;
 
-	if (mei_cl_is_fixed_address(cl)) {
-		list_add_tail(&cb->list, &cl->rd_pending);
-		return 0;
-	}
-
 	rets = pm_runtime_get(dev->dev);
 	if (rets < 0 && rets != -EINPROGRESS) {
 		pm_runtime_put_noidle(dev->dev);
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[char-misc-next 00/12] mei: rx enhancements Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 02/12] mei: add file pointer to the host client structure Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 09/12] mei: add wrapper for queuing control commands. Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 04/12] mei: amthif: drop mei_clear_lists function Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 05/12] mei: drop redundant krealloc and checks in irq read Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 11/12] mei: amthif: drop mei_amthif_read Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 01/12] mei: move read cb to complete queue if not connected Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 08/12] mei: use consistent naming for TX control flow credits Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 07/12] mei: rx flow control counter Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 12/12] mei: drop unused file transaction states Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 10/12] mei: enqueue consecutive reads Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:00 +0200
  [char-misc-next 06/12] mei: prepare read cb for fixed address clients on the receive path only. Tomas Winkler <tomas.winkler@intel.com> - 2016-07-22 15:10 +0200
  RE: [char-misc-next 00/12] mei: rx enhancements "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-07-25 01:00 +0200
    Re: [char-misc-next 00/12] mei: rx enhancements Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-25 01:30 +0200

csiph-web