Question about SCSI Miniport Driver

Hi, all

I have been working on writing a SCSI miniport driver for a Fibre
Channel card. I have referred to the DDK aha154x.sys example and the DDK
documentation on SCSI Miniport drivers. Though, the driver is not fully
implemented, I am able to get it installed, and let windows do some SCSI
Inquiry, Read Capacity and Read calls. The card has a PCI interface, it
operates in a bus master mode and the driver is supposed to support pnp
mode. The card has two Fibre Channel port but right now I initialize
only one of the channels. I have yet to implement WMI support.

However, the problem that I face is that the Device Manager GUI which
shows that it is copying the driver file from the installation folder to
systems32\drivers folder never goes away. Even though the file is copied
the GUI is still visible. During this installation process the various
inquiries which Windows sends to the driver leads to the detection of
four SCSI drives, which appear in the Device Manager, but when it tries
to install disk.sys, again I see the same thing where the GUI never goes
away. The bang sign which appears for the device goes away during the
installation. The other related observation is that I am unable to
reboot the PC and have to power it down.

At this point I am not sure whether I have an installation issue or a
device configuration issue. Up till now, the only time I have seen the
GUI go away is if I cause the driver to crash or if the driver returns
an error from HwScsiFindAdapter routine. I am unable to say with
certainty that it is a configuration problem, because I am able to use
the device to detect the drives and report it to windows.

I would be grateful if someone could provide some advice on what I
should be looking at to make some head way on this issue or direct me
towards any documentation which I should probably read up. Thanks in
advance for you explanations.

Thanks,

Amit

Are you completing all the SRBs from your driver? There is a possibility
that some request given to your driver was never completed, the system may
retry this few times unsuccessfully and then may be sending a bus reset. You
may want to set a breakpoint or debug prints in your bus reset handler.

Regards,
Mandar

From: “Amit Nadgar”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Question about SCSI Miniport Driver
>Date: Mon, 9 Oct 2006 20:25:17 -0700
>
>Hi, all
>
>
>
>I have been working on writing a SCSI miniport driver for a Fibre
>Channel card. I have referred to the DDK aha154x.sys example and the DDK
>documentation on SCSI Miniport drivers. Though, the driver is not fully
>implemented, I am able to get it installed, and let windows do some SCSI
>Inquiry, Read Capacity and Read calls. The card has a PCI interface, it
>operates in a bus master mode and the driver is supposed to support pnp
>mode. The card has two Fibre Channel port but right now I initialize
>only one of the channels. I have yet to implement WMI support.
>
>
>
>However, the problem that I face is that the Device Manager GUI which
>shows that it is copying the driver file from the installation folder to
>systems32\drivers folder never goes away. Even though the file is copied
>the GUI is still visible. During this installation process the various
>inquiries which Windows sends to the driver leads to the detection of
>four SCSI drives, which appear in the Device Manager, but when it tries
>to install disk.sys, again I see the same thing where the GUI never goes
>away. The bang sign which appears for the device goes away during the
>installation. The other related observation is that I am unable to
>reboot the PC and have to power it down.
>
>
>
>At this point I am not sure whether I have an installation issue or a
>device configuration issue. Up till now, the only time I have seen the
>GUI go away is if I cause the driver to crash or if the driver returns
>an error from HwScsiFindAdapter routine. I am unable to say with
>certainty that it is a configuration problem, because I am able to use
>the device to detect the drives and report it to windows.
>
>
>
>I would be grateful if someone could provide some advice on what I
>should be looking at to make some head way on this issue or direct me
>towards any documentation which I should probably read up. Thanks in
>advance for you explanations.
>
>
>
>Thanks,
>
>Amit
>
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

I guess you did not complete SRBs correctly. Maybe you can check your handler of INQUIRY.

It sounds like you are hanging PNP in your driver, or at least slowing
it down to an effective hang. You need to use a debugger to analyze what
is going on. Try !pnpevent from windbg. Also you should implement some
sort of run time (debug print) tracing in your driver so that you can
figure out what your driver has done and is up to when you get to your
problem.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Amit Nadgar
Sent: Monday, October 09, 2006 11:25 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Question about SCSI Miniport Driver

Hi, all

I have been working on writing a SCSI miniport driver for a Fibre
Channel card. I have referred to the DDK aha154x.sys example and the DDK
documentation on SCSI Miniport drivers. Though, the driver is not fully
implemented, I am able to get it installed, and let windows do some SCSI
Inquiry, Read Capacity and Read calls. The card has a PCI interface, it
operates in a bus master mode and the driver is supposed to support pnp
mode. The card has two Fibre Channel port but right now I initialize
only one of the channels. I have yet to implement WMI support.

However, the problem that I face is that the Device Manager GUI which
shows that it is copying the driver file from the installation folder to
systems32\drivers folder never goes away. Even though the file is copied
the GUI is still visible. During this installation process the various
inquiries which Windows sends to the driver leads to the detection of
four SCSI drives, which appear in the Device Manager, but when it tries
to install disk.sys, again I see the same thing where the GUI never goes
away. The bang sign which appears for the device goes away during the
installation. The other related observation is that I am unable to
reboot the PC and have to power it down.

At this point I am not sure whether I have an installation issue or a
device configuration issue. Up till now, the only time I have seen the
GUI go away is if I cause the driver to crash or if the driver returns
an error from HwScsiFindAdapter routine. I am unable to say with
certainty that it is a configuration problem, because I am able to use
the device to detect the drives and report it to windows.

I would be grateful if someone could provide some advice on what I
should be looking at to make some head way on this issue or direct me
towards any documentation which I should probably read up. Thanks in
advance for you explanations.

Thanks,

Amit


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi Mandar, Mark & Ray,
I will go through my SRB completions and check the SCSI responses for
the commands. Thanks for your help.
-Amit

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mandar Barve
Sent: Monday, October 09, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Question about SCSI Miniport Driver

Are you completing all the SRBs from your driver? There is a possibility

that some request given to your driver was never completed, the system
may
retry this few times unsuccessfully and then may be sending a bus reset.
You
may want to set a breakpoint or debug prints in your bus reset handler.

Regards,
Mandar

From: “Amit Nadgar”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Question about SCSI Miniport Driver
>Date: Mon, 9 Oct 2006 20:25:17 -0700
>
>Hi, all
>
>
>
>I have been working on writing a SCSI miniport driver for a Fibre
>Channel card. I have referred to the DDK aha154x.sys example and the
DDK
>documentation on SCSI Miniport drivers. Though, the driver is not fully
>implemented, I am able to get it installed, and let windows do some
SCSI
>Inquiry, Read Capacity and Read calls. The card has a PCI interface, it
>operates in a bus master mode and the driver is supposed to support pnp
>mode. The card has two Fibre Channel port but right now I initialize
>only one of the channels. I have yet to implement WMI support.
>
>
>
>However, the problem that I face is that the Device Manager GUI which
>shows that it is copying the driver file from the installation folder
to
>systems32\drivers folder never goes away. Even though the file is
copied
>the GUI is still visible. During this installation process the various
>inquiries which Windows sends to the driver leads to the detection of
>four SCSI drives, which appear in the Device Manager, but when it tries
>to install disk.sys, again I see the same thing where the GUI never
goes
>away. The bang sign which appears for the device goes away during the
>installation. The other related observation is that I am unable to
>reboot the PC and have to power it down.
>
>
>
>At this point I am not sure whether I have an installation issue or a
>device configuration issue. Up till now, the only time I have seen the
>GUI go away is if I cause the driver to crash or if the driver returns
>an error from HwScsiFindAdapter routine. I am unable to say with
>certainty that it is a configuration problem, because I am able to use
>the device to detect the drives and report it to windows.
>
>
>
>I would be grateful if someone could provide some advice on what I
>should be looking at to make some head way on this issue or direct me
>towards any documentation which I should probably read up. Thanks in
>advance for you explanations.
>
>
>
>Thanks,
>
>Amit
>
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer