I am implementing a char device driver that should be use few special control using IOCTL. In the device driver I have created an ioctl function: int my_ioctl(struct inode *inode, struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
I have added the function to the top structure and register the device. Within the function I have switch-case the ioctl_num. The device is register correctly and the open and write functions work as expected but IOCTL doesn't. When I call IOCTL from user space with parameter 0 the my_ioctl function called with ioctl_num = 0 but when I use any other values the my_ioctl kernel function is not being called.
I have tried in a laptop with Ubuntu and works properly(intel architecture). However, in the T2080RDB(powerPc architecture) does not work. It showed up the next message:
Ioctl error: _DEV_GET_Variable1, erroneo
Any idea about what is going on? Same program run properly in a laptop with x86 and does not in PPC in T2080RDB.