EmbLogic's Blog

Module code to show how to perform read operation in multiple qset arrays.

RCS file: readf.c,v
Working file: readf.c
head: 1.18
branch:
locks: strict
root: 1.18
access list:
symbolic names:
keyword substitution: kv
total revisions: 18;    selected revisions: 18
description:
chardev_read() function reside here which is responsible for performing the read operation.
—————————-
revision 1.18    locked by: root;
date: 2014/03/05 08:19:18;  author: root;  state: Exp;  lines: +1 -1
Modified the return value of the chardev_read() function to nocsr.This return value becomes the return type of the read() system call in the application.

Status : Read operation in multiple qset arrays is implemented successfully.
—————————-
revision 1.17
date: 2014/03/05 08:13:05;  author: root;  state: Exp;  lines: +1 -1
Changed quantum_size to qset_size inside the loop.
Checking……..
—————————-
revision 1.16
date: 2014/03/05 08:10:38;  author: root;  state: Exp;  lines: +13 -3
Declared a variable j to keep track on how many quantums read operation is already performed.When it is equal to the number of quantums then break.
Also a condition is included in which the variable i is set to 0 and lscullqset is updated when the i equals qset_size.
—————————-
revision 1.15
date: 2014/03/05 08:06:46;  author: root;  state: Exp;  lines: +2 -1
Declared a local pointer variable to point to a structure of type struct Scullqset.
Extending the code further so that read can be performed in multiple qset arrays.
—————————-
revision 1.14
date: 2014/03/04 22:36:51;  author: root;  state: Exp;  lines: +3 -2
Status : Read operation from multiple quantums is implemented successfully.

All logical errors are fixed.
To calculate the number of characters to read size argument is used instead of the data_size to ensure that always the size number of bytes.
—————————-
revision 1.13
date: 2014/03/04 22:29:49;  author: root;  state: Exp;  lines: +1 -0
Logical mistake,the number of characters successfully read was not updated.
Fixed the bug.
Checking…………
—————————-
revision 1.12
date: 2014/03/04 22:15:25;  author: root;  state: Exp;  lines: +21 -3
Implemented the logic for copy_to_user() function for the multiple quantums.
After reading the entire data from quantums,it is stored inside rbuff pointer.
Checking……
—————————-
revision 1.11
date: 2014/03/04 21:02:53;  author: root;  state: Exp;  lines: +8 -1
Calculated the required number of quantums based on the data size.
After calculating the number of quantums the number of quantums are printed.
—————————-
revision 1.10
date: 2014/03/04 20:57:26;  author: root;  state: Exp;  lines: +1 -1
Bug fixed.
Issue : Incorrect spelling of noqsa.
—————————-
revision 1.9
date: 2014/03/04 20:54:34;  author: root;  state: Exp;  lines: +8 -0
Added the logic to find out the number of qset arrays that are required using the data_size.
After calculating the number of qset arrays are printed.
—————————-
revision 1.8
date: 2014/03/04 20:49:58;  author: root;  state: Exp;  lines: +16 -2
Logic to find the number of scullqset required is added.The total number of scullqsets will depend on the data_size.
After calculating the number of scullqsets required,the number of scullqsets are printed using printk() statements.
—————————-
revision 1.7
date: 2014/03/04 20:15:29;  author: root;  state: Exp;  lines: +2 -0
Another variable is added using extern called data_size which actually stores how much data is written to the quantums.
—————————-
revision 1.6
date: 2014/03/04 20:14:01;  author: root;  state: Exp;  lines: +4 -0
Three variables are added namely:quantum_size , qset_size and device_size using extern.
—————————-
revision 1.5
date: 2014/03/04 20:11:21;  author: root;  state: Exp;  lines: +8 -0
Declared two variables i and noq.The variable is used to run the loop and the variable noq is used to store the number of quantums.
Calculating the number of quantums….
—————————-
revision 1.4
date: 2014/03/04 20:08:36;  author: root;  state: Exp;  lines: +2 -0
Declared a pointer to a structure of type struct Sculldev,inside which the filep->private_data is stored.
—————————-
revision 1.3
date: 2014/03/04 20:04:39;  author: root;  state: Exp;  lines: +8 -1
Gave two printk() statements to mark the beginning and end of the chardev_read() function.
—————————-
revision 1.2
date: 2014/03/04 20:02:14;  author: root;  state: Exp;  lines: +8 -0
The prototype of the chardev_read() function is added here using extern.
Defining the body of the chardev_read() function…..
—————————-
revision 1.1
date: 2014/03/04 19:30:01;  author: root;  state: Exp;
Initial revision
=============================================================================

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>