Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Upgrading a Driver

  • Aric Blumer
    Aric Blumer

    I have a driver I used for 2.4.x kernels.  I need to upgrade it to the 2.6.x kernels, and I noticed that the CardServices() function is gone.  I just want to verify if this is that case.  Has the single CardServices() function been replaced with individual function calls?


    (Sorry if this has been asked a million times, but I didn't find it in the archives with a search.)

    • David Hinds
      David Hinds

      Yes, the PCMCIA driver API has changed for 2.6; unfortunately there is no documentation for the changes.

      -- Dave

      • Aric Blumer
        Aric Blumer

        I finally had to get this done, and here's what I did in case others find it useful.

        First, the registering of the driver changed from a function call that supplies the {at,de}tach routines, to a structure that references these functions passed to pcmcia_register_driver(). This is how other layers work in 2.6.x, so no surprises there.

        Then, all the old CardServices(XXX,...) calls were changed to something like pcmcia_xxx(...) calls.  Figuring out what xxx should be based on XXX is not hard.  Just look at the cs.h file for the prototypes.

        And that pretty much sums up the changes.  I think the only other change was that the CS_EVENT_RESET_COMPLETE has gone away, but I wasn't using it anyway.