No FDO for SCSI miniport driver

I have two SCSI miniport drivers running on XP that I send an
IOCTL_SCSI_MINIPORT to:

… IoGetDeviceObjectPointer(“\Device\Scsiport3”,…,&DevObj)
Irp = IoBuildDeviceIoControlRequest(
IOCTL_SCSI_MINIPORT, …
IoCallDriver(DevObj, Irp);

The older (NT4) miniport recieves the IOCTL.
The newer driver, which has some plug and play support, gets a
“STATUS_NO_SUCH_DEVICE”. I traced this in windbg, and concluded that
Scsiport rejects this IOCTL because there is no FDO.

The DDK says “The SCSI port driver creates PDOs for target devices and the
FDO for the miniport driver”.

I can’t seem to find any documentation that explains why one driver create
the FDO for the driver and the other doesn’t, or what I would need to do to
cause the FDO to be created by Scsiport.

Any pointers or explanations would be helpful.

Hi Dave,

This is more or less a bug(feature) in the post NT4 (pnp) versions of
scsiport. If you need to control your miniport when there are no physical
targets present you have to poof up a virtual target for control purposes. I
hear that this gets fixed in some to be released version of scsiport.

=====================
Mark Roddy

-----Original Message-----
From: Dave Harvey [mailto:xxxxx@syssoftsol.com]
Sent: Wednesday, May 19, 2004 11:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] No FDO for SCSI miniport driver

I have two SCSI miniport drivers running on XP that I send an
IOCTL_SCSI_MINIPORT to:

… IoGetDeviceObjectPointer(“\Device\Scsiport3”,…,&DevObj)
Irp = IoBuildDeviceIoControlRequest(
IOCTL_SCSI_MINIPORT, …
IoCallDriver(DevObj, Irp);

The older (NT4) miniport recieves the IOCTL.
The newer driver, which has some plug and play support, gets
a “STATUS_NO_SUCH_DEVICE”. I traced this in windbg, and
concluded that Scsiport rejects this IOCTL because there is no FDO.

The DDK says “The SCSI port driver creates PDOs for target
devices and the FDO for the miniport driver”.

I can’t seem to find any documentation that explains why one
driver create the FDO for the driver and the other doesn’t,
or what I would need to do to cause the FDO to be created by Scsiport.

Any pointers or explanations would be helpful.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
xxxxx@lists.osr.com

Thanks Mark,

I already have one virtual target that has been claimed by another driver.
This means that I must create another virtual target. Does the existence of
this unclaimed virtual target mean that the mechanism the other driver was
using would work or to I have to change that driver to claim the new virtual
target?

-DH

“Roddy, Mark” wrote in message news:xxxxx@ntdev…
> Hi Dave,
>
>
> This is more or less a bug(feature) in the post NT4 (pnp) versions of
> scsiport. If you need to control your miniport when there are no physical
> targets present you have to poof up a virtual target for control purposes.
I
> hear that this gets fixed in some to be released version of scsiport.
>
>
> =====================
> Mark Roddy
>
>
> > -----Original Message-----
> > From: Dave Harvey [mailto:xxxxx@syssoftsol.com]
> > Sent: Wednesday, May 19, 2004 11:48 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] No FDO for SCSI miniport driver
> >
> > I have two SCSI miniport drivers running on XP that I send an
> > IOCTL_SCSI_MINIPORT to:
> >
> > … IoGetDeviceObjectPointer(“\Device\Scsiport3”,…,&DevObj)
> > Irp = IoBuildDeviceIoControlRequest(
> > IOCTL_SCSI_MINIPORT, …
> > IoCallDriver(DevObj, Irp);
> >
> > The older (NT4) miniport recieves the IOCTL.
> > The newer driver, which has some plug and play support, gets
> > a “STATUS_NO_SUCH_DEVICE”. I traced this in windbg, and
> > concluded that Scsiport rejects this IOCTL because there is no FDO.
> >
> > The DDK says “The SCSI port driver creates PDOs for target
> > devices and the FDO for the miniport driver”.
> >
> > I can’t seem to find any documentation that explains why one
> > driver create the FDO for the driver and the other doesn’t,
> > or what I would need to do to cause the FDO to be created by Scsiport.
> >
> > Any pointers or explanations would be helpful.
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@stratus.com To unsubscribe send a blank email to
> > xxxxx@lists.osr.com
> >
>

Dave,

Actually W2K3 supports Lu-less ioctls. See CreateInitiatorLU in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/storage/hh/
storage/02mnport_8tgn.asp

Specifically you can set a registry flag and suddenly your ioctls ought to
just work, plus or minus a few system crashes debugging it :slight_smile:

I didn’t think that claimed/unclaimed had anything to do with it. I thought
the restriction (ignoring the w2k3 feature) was ‘had to have a lun’.

=====================
Mark Roddy

-----Original Message-----
From: Dave Harvey [mailto:xxxxx@syssoftsol.com]
Sent: Wednesday, May 19, 2004 1:01 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] No FDO for SCSI miniport driver

Thanks Mark,

I already have one virtual target that has been claimed by
another driver.
This means that I must create another virtual target. Does
the existence of this unclaimed virtual target mean that the
mechanism the other driver was using would work or to I have
to change that driver to claim the new virtual target?

-DH

“Roddy, Mark” wrote in message
> news:xxxxx@ntdev…
> > Hi Dave,
> >
> >
> > This is more or less a bug(feature) in the post NT4 (pnp)
> versions of
> > scsiport. If you need to control your miniport when there are no
> > physical targets present you have to poof up a virtual
> target for control purposes.
> I
> > hear that this gets fixed in some to be released version of
> scsiport.
> >
> >
> > =====================
> > Mark Roddy
> >
> >
> > > -----Original Message-----
> > > From: Dave Harvey [mailto:xxxxx@syssoftsol.com]
> > > Sent: Wednesday, May 19, 2004 11:48 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: [ntdev] No FDO for SCSI miniport driver
> > >
> > > I have two SCSI miniport drivers running on XP that I send an
> > > IOCTL_SCSI_MINIPORT to:
> > >
> > > … IoGetDeviceObjectPointer(“\Device\Scsiport3”,…,&DevObj)
> > > Irp = IoBuildDeviceIoControlRequest(
> > > IOCTL_SCSI_MINIPORT, …
> > > IoCallDriver(DevObj, Irp);
> > >
> > > The older (NT4) miniport recieves the IOCTL.
> > > The newer driver, which has some plug and play support, gets a
> > > “STATUS_NO_SUCH_DEVICE”. I traced this in windbg, and concluded
> > > that Scsiport rejects this IOCTL because there is no FDO.
> > >
> > > The DDK says “The SCSI port driver creates PDOs for
> target devices
> > > and the FDO for the miniport driver”.
> > >
> > > I can’t seem to find any documentation that explains why
> one driver
> > > create the FDO for the driver and the other doesn’t, or
> what I would
> > > need to do to cause the FDO to be created by Scsiport.
> > >
> > > Any pointers or explanations would be helpful.
> > >
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as:
> > > xxxxx@stratus.com To unsubscribe send a blank email to
> > > xxxxx@lists.osr.com
> > >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@stratus.com To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

You cannot send IOCTL_SCSI_MINIPORT to the adapter FDO if the adapter has
no LUNs on it. This is a well-known thing.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Dave Harvey”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 19, 2004 7:48 PM
Subject: [ntdev] No FDO for SCSI miniport driver

> I have two SCSI miniport drivers running on XP that I send an
> IOCTL_SCSI_MINIPORT to:
>
> … IoGetDeviceObjectPointer(“\Device\Scsiport3”,…,&DevObj)
> Irp = IoBuildDeviceIoControlRequest(
> IOCTL_SCSI_MINIPORT, …
> IoCallDriver(DevObj, Irp);
>
> The older (NT4) miniport recieves the IOCTL.
> The newer driver, which has some plug and play support, gets a
> “STATUS_NO_SUCH_DEVICE”. I traced this in windbg, and concluded that
> Scsiport rejects this IOCTL because there is no FDO.
>
> The DDK says “The SCSI port driver creates PDOs for target devices and the
> FDO for the miniport driver”.
>
> I can’t seem to find any documentation that explains why one driver create
> the FDO for the driver and the other doesn’t, or what I would need to do to
> cause the FDO to be created by Scsiport.
>
> Any pointers or explanations would be helpful.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com