Porting an existing driver for device on USB-Adapter - which kind of driver should I use? RRS feed

  • Question

  • Hello,

    I was asked to "port" an existing PC card driver for operation via USB-Adapter. I'm very new to driver developement, so please forgive anything that sounds strange to you. I already started studying the documentations, but it is very difficult to find the right way in this huge hive of documents. Please also excuse me for that long text, but I fear I have to explain in more detail what I attempt (or have to) to do..

    The existing driver, as far as I could see, is a KMDF driver that manges a PC card located at the PCMCIA bus, all after all the PC card appears as a volume (e.g. in Windows explorer). I currently have no details about the internal driver stack, device manager shows this:

    PC card (our driver) -> Cardbus Adapter -> PCI bus -> ...

    IMO it should be possible to "port" this driver to operate with the PC card USB adapter, which (once again from view of device manager) looks like this:

    Storage device (handled by disk.sys, upper filter partmgr.sys) -> USB Mass storage device -> USB/PCCard Adapter -> USB Root Hub -> ...

    I know the IOCTLS that can be passed to the "USB/PC Card adapter", by meaning of I could use IoBuildIoControlRequest for read/write operations. You can see that the PC card connected to that USB/PC card adapter is not identified here (as it did on PCMCIA) - this might me a problem because my driver cannot just replace one of the drivers mentoind above - i have to check during Initialization (DriverEntry) if the PC card is supported and the put the driver in place if so. Otherwise my driver should not intercept without putting the device in a non-working state in order to give other drivers (if installed) a chance to make their job...

    I think I have to adopt the driver to work as upper filter driver for the "USB/PC card adapter", but I'm very unsure on that. So my current questions are:

    • Where does the request passed to our existing driver (PCMCIA basis) come from - are thre addional drivers above it?
    • What kind of driver my driver should be to support the USB adapter?
    • Where I have to place the driver in the driver stack (below, upper or replacing which of the devices above)?

    I hope you can help me to get into that. I do not expect a complete solution or exact description what to do, some shoves in the right correction may help me to go on. Thanks in advance,

    with best regards,
    Willi K.

    Friday, November 28, 2014 1:21 PM