Exposing multiple logical devs per physical dev to ATAPORT

Discussion in 'Windows Vista Drivers' started by Judy Brock, Aug 30, 2008.

  1. Judy Brock

    Judy Brock Guest

    I need to present a single physical device as two logical devices
    (one non-disk ATAPI dev and one ATA disk dev) to VISTA ataport.sys

    I plan on faking 2 devs on a single channel (not going to expose 2
    virtual "channels" w/ 1 dev on each since they will actually map to a
    single underlying set of hw resources that requires synchronized
    access but Ataport has no provision for inter-channel synchronization)

    My controller has a proprietary interface. I plan on reporting it as
    Native Mode ATA controller since I can't have 2 devs on a single port
    (ie "channel") on a SATA controller w/out Port Multiplier (don't want
    to have tofake port multiplier!).

    My controller I/F supports overlapped cmds (between devs) and queued
    cmds (multiple concurrent cmds per dev).


    1) If I set NumberOfOverlappedRequests in the
    up to MAX_REQS concurrent reqs to do with what I want or do I also
    need to set NumberofOverlappedRequests (in the IDE_DEVICE_STRUCTURE)
    on a per dev basis?

    2) How is fairness between the 2 reported devs managed? I'm
    guessing Ataport will send a given IRB to the miniport as long as a)
    the MAX per-channel threshold has not been reached and b) the MAX per-
    device (for the dev the IRB is addressed to) has not been reached.

    If so, seems it's the miniport's responsibility to manage fairness/
    avoid dev starvation by either a) evenly dividing the total actual
    queue depth of the physical dev between the 2 logical devs in the per-
    dev NumberOfOverlappedRequests reported values...or by using
    AtaPortDeviceBusy/AtaPortDeviceReady judiciously to allow the under-
    serviced device to receive some IRBS if they are available. Is this a
    reasonable conclusion?

    3) Do I also need to report support for ATA Overlap Feature Set and
    Queued Feature Set (not to be confused w/SATA NCQ) on the fake ATA dev
    to convince ATAPORT? Little support for ATA legacy cmd queuing in
    industry I think so not sure if ATAPORT would care about this ...

    4). Will ATAPORT make any adverse assumptions about my HW capabilities
    because it isn't SATA (and thus doesn't support various SATA advanced
    features) in performance/power management/PnP/etc area(s)? I know this
    is a vague question but my concern here is whether there may be any
    unfavorable caveats related to how ATAPORT behaves w/respect to (P)
    ATA vs SATA above and beyond whatever is strictly required by
    underlying technical differences.

    5) If I return "type unknown" (0x1f) in SCSI inquiry data on behalf
    of fake non-disk dev, will ATAPORT be willing to create a PDO on
    behalf of that peripheral device type as long as the peripheral
    qualifier is 0 (ie, indicates "A peripheral device having the
    specified peripheral device type
    is connected to this logical unit.")?

    6) this issue is unrelated to multiple logical devs per physical
    I need to propogation some private data on a per IO request
    basis down to the miniport for the non-disk dev. To accomplish this,
    I thought I would report support for 16 byte command packets (in
    Atapi Identify Packet Device data) and then just use some of those
    bytes for my private data instead of an actual "CDB". Is it safe to
    assume ATAPORT will not try to interpret the CDB and will just copy
    the 16 bytes into IRB and send me an IRB_FUNCTION_ATAPI?

    If any of the issues above are blockers, maybe I need to switch to
    STORPORT model (faking logical devs is common & decoupled from
    transport/capability issues). Already have the ATAPORT miniport
    written so would like to avoid this if possible...

    thanks in advance for any help/info
    Judy Brock, Aug 30, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.