Sample block device driver linux kernel 3.X

Book referred : Linux Device Drivers

Linux Device Driver has everything you need to know about writing drivers. But since it is written with respect to linux kernel 2.6.X I am posting some alternate APIs for old deprecated APIs.

old –> new

elv_next_request() –> blk_fetch_request()

if (! blk_fs_request(req) –> if (req->cmd_type != REQ_TYPE_FS)

end_request(req, 0); –> __blk_end_request_all(req, 0);

end_request(req, 1); –> __blk_end_request_all(req, 0);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: