EmbLogic's Blog

Module code to show how to perform read operation in multiple quantums.

RCS file: readf.c,v
Working file: readf.c
head: 1.14
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 14;    selected revisions: 14
description:
chardev_read() function reside here which is responsible for performing the read operation.
—————————-
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
=============================================================================
RCS file: decleration.h,v
Working file: decleration.h
head: 1.10
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 10;    selected revisions: 10
description:
All the variable declerations are done inside this header file.
—————————-
revision 1.10
date: 2014/03/04 01:27:07;  author: root;  state: Exp;  lines: +1 -0
Gave prototype for chardev_read() function.
—————————-
revision 1.9
date: 2014/02/28 21:40:24;  author: root;  state: Exp;  lines: +1 -0
Gave prototype for chardev_write() function .
—————————-
revision 1.8
date: 2014/02/28 20:28:24;  author: root;  state: Exp;  lines: +1 -0
Gave prototype for chardev_release() function.
—————————-
revision 1.7
date: 2014/02/28 18:48:17;  author: root;  state: Exp;  lines: +2 -0
Gave prototype of chardev_open() function.
—————————-
revision 1.6
date: 2014/02/28 17:05:32;  author: root;  state: Exp;  lines: +1 -0
A variable of type dev_t is declared that is used to store the updated device number obtained from mkdev.
—————————-
revision 1.5
date: 2014/02/28 16:59:40;  author: root;  state: Exp;  lines: +3 -0
Two variables are declared inside this file that will hold the information about major and minor numbers.
—————————-
revision 1.4
date: 2014/02/28 16:39:07;  author: root;  state: Exp;  lines: +4 -0
Variables quantum_size,qset_size,data_size and device_size are declared that will get initialized by the macros defined in header.h.
—————————-
revision 1.3
date: 2014/02/28 15:30:46;  author: root;  state: Exp;  lines: +1 -0
A variable of type Sculldev is declared in this file.
—————————-
revision 1.2
date: 2014/02/27 20:06:26;  author: root;  state: Exp;  lines: +1 -0
A variable of type int is declared representing the number of devices.
—————————-
revision 1.1
date: 2014/02/27 19:30:54;  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>