Results 1 to 4 of 4
Hi,
im new on writing device driver in kernelspace.
So i started with writung a small scull driver.
The problem is, that a write call blocks sthe system.
I do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-18-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 3
read call blocks
Hi,
im new on writing device driver in kernelspace.
So i started with writung a small scull driver.
The problem is, that a write call blocks sthe system.
I do not know why.
Here the function.
ssize_t FS_write(struct file * filp, const char * buf, size_t count, loff_t * f_pos)
{
if(down_interruptible(&dev->sem))
{
return -1;
}
// Tha array is big enough
copy_from_user(data_array,buf,count);
*f_pos+=count;
up(&dev->sem)
return count;
}
I dont know what why the driver hangs
I call
"Hallo" > /dev/mydriver
i then i can see that the init is done well.
After it, the kernel hangs.
Tank you for help.Last edited by user20000; 01-18-2012 at 07:14 PM.
- 01-18-2012 #2Just Joined!
- Join Date
- Jan 2012
- Posts
- 3
Okay, sorry i have it now
The Read call was is well done.
It hangs on a secial call of the open of my driver.
I have implemented some personalities and there had beeen a buck while
chanching the file operations structure.
Thanks
- 01-19-2012 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,236
Sometimes the best help is none...
Glad you sorted it out.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-19-2012 #4Just Joined!
- Join Date
- Dec 2011
- Posts
- 33
Welldone......



Reply With Quote
