Re: add_disk() make my driver's initialisation, thus kernel stall.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe I had misunderstood your meaning. 
You are meaning I have assign 0 to my device major number? 
The major variable is reassigned by the kernel in blkplay_init function.

This post solve the problem.

Now, I can compile it, insmod it. But it’s give me a permission error when I open the device.

On Mar 21, 2016, at 10:55 AM, Valdis.Kletnieks@xxxxxx wrote:

On Mon, 21 Mar 2016 09:53:47 +0800, 张云 said:
The code is just for learning block driver

THe kernel doesn't know that.  You call a routine with the wrong
parameters, it will not work properly.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux