Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, Saga mode on. I've been busy writing a USB driver for an unsupported magnetic card reader. I started with the usb skeleton driver, and have got the driver ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    2

    Problem accessing kernel driver using devfs


    Hi all,

    Saga mode on.

    I've been busy writing a USB driver for an unsupported magnetic card reader.

    I started with the usb skeleton driver, and have got the driver working just how I wanted on my ubuntu development machine running the 2.6.17 kernel. I have a small test application that utilises the driver, and have proved that this operates correctly.

    The problem comes in when I try to get the driver working on our target device, which is using debian, kernel 2.4.26. The kernel has previously been recompiled in-house (not by me) to remove unneccessary components.

    I have reapplied the required USB driver changes to the usb skeleton driver that comes with the 2.4 kernel, and the device is probed successfully, but the call to devfs_register always fails (returns NULL). Additionally, attempts to open the device file in the test user-space application fail. (no such device).

    I have since recompiled the 2.4 kernel with devfs enabled (turned on the following three options:
    CONFIG_DEVFS_FS=y
    CONFIG_DEVFS_MOUNT=y
    CONFIG_DEVFS_DEBUG=y

    But the registration still fails. I'm 99.9% certain that my recompiled kernel is being run, based on the dates and sizes of the vmlinuz and map files.

    I've tried putting printfs and info(""); statements in the base.c file of the devfs source, but I can't compile this file with these changes. (I don't know enough about all this yet to figure out what I'm missing. the printk statements are not producing any output when devfs_register is called)

    I've also dug up some information about devfsd, but it's not clear that this is required to get devfs working (I'm confused about this!)
    http://www.atnf.csiro.au/people/rgoo...ocs/devfs.html

    I briefly tried running devfsd, but it made no difference to the problem I'm experiencing.

    Any help would be appreciated. Sorry about the long post, I'm just tring to capture all the information I have.

    Alex.

  2. #2
    Just Joined!
    Join Date
    May 2007
    Posts
    1
    hello Alex - maybe I can help make such driver work. If the driver is "open source", can you please post URL here where to retrieve it, or send me private message with the URL.
    -- Peter

  3. #3
    Just Joined!
    Join Date
    Apr 2007
    Posts
    2
    Peter,

    Thanks for the offer. I decided to move the interface to using the /proc filesystem, and this works well.

    Sometimes the best way to solve a problem is to rewrite the problem

    Alex.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •