ioctl call fails with unknown command - Embedded

This is a discussion on ioctl call fails with unknown command - Embedded ; hi, when trying to do ioctl call to my driver, i keep getting an error message: unknown command fd(3). it seems that the ioctl call is not invoking my driver ioctal method because the debug message inside my ioctl method ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: ioctl call fails with unknown command

  1. ioctl call fails with unknown command

    hi, when trying to do ioctl call to my driver, i keep getting an error
    message: unknown command fd(3). it seems that the ioctl

    call is not invoking my driver ioctal method because the debug message
    inside my ioctl method never get printed out.
    although this may seems like i am using incorrect file descriptor,
    since my ioctl method is not even being called, i know i am

    using the correct file descriptor because my 'read' method gets
    invoked fine.
    And using the same code and driver, i was able to get it to work on a
    486 target machine but it doesn't seem to work with this

    particular linux version.

    how can i debug this code? where in the kernel code can i begin to
    trace to see what is happening? which file/function gets

    called when ioctl function is fisrt called?
    (i don't have a debugger and i am not able to gdb the code so i need
    to resort to printing out debug messages in the source

    code.)

    thank you in advance.

  2. Re: ioctl call fails with unknown command

    It has been two years. Have you find out the cause.
    I ran in the exactly same problem on a Debian/PowerPC combination.
    The ko module works and does printk
    the caller issue ioctl and just get Unknown cmd as bellow:

    [ 2807.798960] dx83xx DXT_IOCINFO:80647801
    [ 2807.799291] dx83xx DXT_IOCINFO:80647801
    [ 2807.799861] dx83xx: dxt module init
    [ 2807.802846] dx83xx: dx83xx_open c00000003b98b000
    [ 2807.802867] ioctl32(pcie:2554): Unknown cmd fd(3) cmd(80647801){t:'x';sz:100} arg(1068b084) on /dev/dxt0
    [ 2807.802874] dx83xx: dx83xx_release
    [ 2910.414437] dx83xx: dx83xx_open c00000003b98b000
    [ 2910.414461] ioctl32(pcie:2578): Unknown cmd fd(3) cmd(80647801){t:'x';sz:100} arg(1058d084) on /dev/dxt0
    [ 2910.414468] dx83xx: dx83xx_release

    I have see mod from lsmod, created two nodes at /dev/ and they are opened.
    However modprobe -l -r -a {name} returns nothing

+ Reply to Thread