diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2011-12-21 11:43:06 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:07:31 +0200 |
commit | 2226b173a9085faf3da513181c7e177cc7c66db1 (patch) | |
tree | 054194c980642e65ce0411378a0aa4ed0a5778ab | |
parent | 2495f3141b952fe084675acc7c24d41dfcd2d184 (diff) |
caif-shmcore: in tx check for buffer full conditioncaif
There are 6 buffers and each buffer can be filled with 10 messages. The
size of each buffer is 8k. In shm tx work function, 10 messages are written
to the buffer, if the buffer gets filled during writing these 10 messages
stop writing to buffer and use the next buffer.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 375088
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I146d41e4e415c8ff96c605b4c20546ff7501442a
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43350
Reviewed-by: Durga Prasada Rao BATHINA <durgaprasadarao.b@stericsson.com>
Reviewed-by: QABUILD
Reviewed-by: Sjur BRENDELAND <sjur.brandeland@stericsson.com>
-rw-r--r-- | drivers/net/caif/caif_shmcore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/caif/caif_shmcore.c b/drivers/net/caif/caif_shmcore.c index 2cdae3fc158..fc55bf65f1c 100644 --- a/drivers/net/caif/caif_shmcore.c +++ b/drivers/net/caif/caif_shmcore.c @@ -522,7 +522,8 @@ static void shm_tx_work_func(struct work_struct *tx_work) pbuf->frames++; pbuf->frm_ofs += frmlen + (frmlen % 32); - } while (pbuf->frames < SHM_MAX_FRMS_PER_BUF); + } while (pbuf->frames < SHM_MAX_FRMS_PER_BUF && + pbuf->frm_ofs < pbuf->len); /* Assign buffer as full. */ list_add_tail(&pbuf->list, &pshm_drv->tx_full_list); |