SCSI device names

I’m writing a SCSI miniport driver, named fx100.

The basic goal right now is to create device names, such as
\Device\fx100_0, _1, etc for each card in the system, starting with unit 0
and incrementing consistently.

My observation, using WinObj, is that there is a “subtree” of devices,
\Device\scsi\ which includes a “fx1001” device. This is actually the
target of \Device\ScsiPort2 (0 & 1 are Ide\IdePort0 & 1).

Now for my questions based on the above…

  1. Does anyone know where and when the \Device\scsi\ entries are created?
    I assume it’s by SCSIPORT but I need to know if the entry exists before
    hwScsiFindAdapter is called. (hopefully but probably not…) If not, how
    about hwScsiInitialize? Of course I could check for myself but would
    rather see a definite answer.

  2. Are the entries always created in consistent order? In other words,
    will the first unit be “fx1001”, second “fx1002”, and so on? (which leads
    me to #3)

  3. Why is it starting the numbering at 1 instead of 0? Is that normal for
    SCSIPORT? (I wouldn’t be surprised)

Thanks for your help
Jason


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Now for my questions based on the above…

  1. Does anyone know where and when the \Device\scsi\ entries are created?
    I assume it’s by SCSIPORT but I need to know if the entry exists before
    hwScsiFindAdapter is called.

Must be so, at least for PnP adapters. The entry is created from AddDevice path of SCSIPORT.
HwFindAdapter is called from the MN_START_DEVICE path after returning from the lower device on the stack.

  1. Are the entries always created in consistent order? In other words,
    will the first unit be “fx1001”, second “fx1002”, and so on? (which leads
    me to #3)

  2. Why is it starting the numbering at 1 instead of 0? Is that normal for
    SCSIPORT? (I wouldn’t be surprised)

They use InterlockedIncrement on some variable to invent these numbers.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks for the help.

I did forget to mention I’m not writing it as a PnP driver since I will be
backporting to NT4 (currently developing for Win2k). If you know the
behavior regarding the \Device\scsi\ entries and hwScsiFindAdapter for
non-PnP drivers, let me know.

Jason

On 01/02/02, ““Maxim S. Shatskih” ” wrote:
> > Now for my questions based on the above…
> > 1) Does anyone know where and when the \Device\scsi\ entries are created?
> > I assume it’s by SCSIPORT but I need to know if the entry exists before
> > hwScsiFindAdapter is called.
>
> Must be so, at least for PnP adapters. The entry is created from AddDevice path of SCSIPORT.
> HwFindAdapter is called from the MN_START_DEVICE path after returning from the lower device on the stack.
>
> > 2) Are the entries always created in consistent order? In other words,
> > will the first unit be “fx1001”, second “fx1002”, and so on? (which leads
> > me to #3)
> >
> > 3) Why is it starting the numbering at 1 instead of 0? Is that normal for
> > SCSIPORT? (I wouldn’t be surprised)
>
> They use InterlockedIncrement on some variable to invent these numbers.
>
> Max
>
>
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For NT4 SCSIPORT, the order is the same.
First - device object is created as \Device\ScsiPort%d, then - HwScsiFindAdapter is called.

Note that there is no \Device\Scsi\xxx paths in NT4.

Max

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, January 02, 2002 4:47 PM
Subject: [ntdev] Re: SCSI device names

> Thanks for the help.
>
> I did forget to mention I’m not writing it as a PnP driver since I will be
> backporting to NT4 (currently developing for Win2k). If you know the
> behavior regarding the \Device\scsi\ entries and hwScsiFindAdapter for
> non-PnP drivers, let me know.
>
> Jason
>
> On 01/02/02, ““Maxim S. Shatskih” ” wrote:
> > > Now for my questions based on the above…
> > > 1) Does anyone know where and when the \Device\scsi\ entries are created?
> > > I assume it’s by SCSIPORT but I need to know if the entry exists before
> > > hwScsiFindAdapter is called.
> >
> > Must be so, at least for PnP adapters. The entry is created from AddDevice path of SCSIPORT.
> > HwFindAdapter is called from the MN_START_DEVICE path after returning from the lower device on the stack.
> >
> > > 2) Are the entries always created in consistent order? In other words,
> > > will the first unit be “fx1001”, second “fx1002”, and so on? (which leads
> > > me to #3)
> > >
> > > 3) Why is it starting the numbering at 1 instead of 0? Is that normal for
> > > SCSIPORT? (I wouldn’t be surprised)
> >
> > They use InterlockedIncrement on some variable to invent these numbers.
> >
> > Max
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com