Discussion:
stop adaptor routine in storport miniport
(too old to reply)
hitesh
2010-08-19 08:26:25 UTC
Permalink
hi all,
i am wrintin a storport miniport driver.
it successfully loads and works fine. but if try to stop it from
device manager (right click on device in device manager and click on
disable ) it hangs.
i am getting control in adaptor control for stop adaptor and query
request.
can anybody tell me what i need to take care to successfully stop the
device?
thanks,
Hitesh
eagersh
2010-08-20 16:30:58 UTC
Permalink
On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
> hi all,
> i am wrintin a storport miniport driver.
> it successfully loads and works fine. but if try to stop it from
> device manager (right click on device in device manager and click on
> disable ) it hangs.
> i am getting control in adaptor control for stop adaptor and query
> request.
> can anybody tell me what i need to take care to successfully stop the
> device?
> thanks,
> Hitesh

What kind request did you get first in your AdapterControl routine?
You should first get ScsiQuerySupportedControlTypes and specify
supported types. After that you should get ScsiStopAdapter.
Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
\StorportMiniports.

Igor Sharovar
hitesh
2010-08-23 06:31:43 UTC
Permalink
On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
> On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > hi all,
> > i am wrintin a storport miniport driver.
> > it successfully loads and works fine. but if try to stop it from
> > device manager (right click on device in device manager and click on
> > disable ) it hangs.
> > i am getting control in adaptor control for stop adaptor and query
> > request.
> > can anybody tell me what i need to take care to successfully stop the
> > device?
> > thanks,
> > Hitesh
>
> What kind request did you get first in your AdapterControl routine?
> You should first get ScsiQuerySupportedControlTypes and specify
> supported types. After that you should get  ScsiStopAdapter.
> Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> \StorportMiniports.
>
> Igor Sharovar

hi igor,
thanks for the reply,
but here situation is different,
first i am getting the request for stopadaptor and then query ?
is it normal or something i am missing,
~hitesh
eagersh
2010-08-23 18:05:31 UTC
Permalink
On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
> On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
>
>
> > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > hi all,
> > > i am wrintin a storport miniport driver.
> > > it successfully loads and works fine. but if try to stop it from
> > > device manager (right click on device in device manager and click on
> > > disable ) it hangs.
> > > i am getting control in adaptor control for stop adaptor and query
> > > request.
> > > can anybody tell me what i need to take care to successfully stop the
> > > device?
> > > thanks,
> > > Hitesh
>
> > What kind request did you get first in your AdapterControl routine?
> > You should first get ScsiQuerySupportedControlTypes and specify
> > supported types. After that you should get  ScsiStopAdapter.
> > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > \StorportMiniports.
>
> > Igor Sharovar
>
> hi igor,
> thanks for the reply,
> but here situation is different,
> first i am getting the request for stopadaptor and then query ?
> is it normal or something i am missing,
> ~hitesh

You should get first ScsiQuerySupportedControlTypes and latter
ScsiStopAdapter.
I don't really understand how you could get ScsiStopAdapter first
because ScsiQuerySupportedControlTypes defines supported types.

Igor Sharovar
hitesh
2010-08-26 02:51:58 UTC
Permalink
On Aug 23, 11:05 pm, eagersh <***@gmail.com> wrote:
> On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
>
>
>
>
>
> > On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
> > > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > > hi all,
> > > > i am wrintin a storport miniport driver.
> > > > it successfully loads and works fine. but if try to stop it from
> > > > device manager (right click on device in device manager and click on
> > > > disable ) it hangs.
> > > > i am getting control in adaptor control for stop adaptor and query
> > > > request.
> > > > can anybody tell me what i need to take care to successfully stop the
> > > > device?
> > > > thanks,
> > > > Hitesh
>
> > > What kind request did you get first in your AdapterControl routine?
> > > You should first get ScsiQuerySupportedControlTypes and specify
> > > supported types. After that you should get  ScsiStopAdapter.
> > > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > > \StorportMiniports.
>
> > > Igor Sharovar
>
> > hi igor,
> > thanks for the reply,
> > but here situation is different,
> > first i am getting the request for stopadaptor and then query ?
> > is it normal or something i am missing,
> > ~hitesh
>
> You should get first ScsiQuerySupportedControlTypes and latter
> ScsiStopAdapter.
> I don't really understand how you could get ScsiStopAdapter first
> because ScsiQuerySupportedControlTypes defines supported types.
>
> Igor Sharovar- Hide quoted text -
>
> - Show quoted text -

hi,
i am getting request in QueryAdaptor and then stop adaptor.
it works fine when i sleep or hibernate or shutdown/ restart the
system.
but if i try to unload the driver from device manager then it creates
problem, system hangs.
is there anything like i should handle call in startIo routine which
is related to unloading the driver?
regards,
~hitesh
eagersh
2010-08-26 17:02:45 UTC
Permalink
On Aug 25, 8:51 pm, hitesh <***@gmail.com> wrote:
> On Aug 23, 11:05 pm, eagersh <***@gmail.com> wrote:
>
>
>
> > On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
>
> > > On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
> > > > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > > > hi all,
> > > > > i am wrintin a storport miniport driver.
> > > > > it successfully loads and works fine. but if try to stop it from
> > > > > device manager (right click on device in device manager and click on
> > > > > disable ) it hangs.
> > > > > i am getting control in adaptor control for stop adaptor and query
> > > > > request.
> > > > > can anybody tell me what i need to take care to successfully stop the
> > > > > device?
> > > > > thanks,
> > > > > Hitesh
>
> > > > What kind request did you get first in your AdapterControl routine?
> > > > You should first get ScsiQuerySupportedControlTypes and specify
> > > > supported types. After that you should get  ScsiStopAdapter.
> > > > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > > > \StorportMiniports.
>
> > > > Igor Sharovar
>
> > > hi igor,
> > > thanks for the reply,
> > > but here situation is different,
> > > first i am getting the request for stopadaptor and then query ?
> > > is it normal or something i am missing,
> > > ~hitesh
>
> > You should get first ScsiQuerySupportedControlTypes and latter
> > ScsiStopAdapter.
> > I don't really understand how you could get ScsiStopAdapter first
> > because ScsiQuerySupportedControlTypes defines supported types.
>
> > Igor Sharovar- Hide quoted text -
>
> > - Show quoted text -
>
> hi,
> i am getting request in QueryAdaptor and then stop adaptor.
> it works fine when i sleep or hibernate or shutdown/ restart the
> system.
> but if i try to unload the driver from device manager then it creates
> problem, system hangs.
> is there anything like i should handle call in startIo routine which
> is related to unloading the driver?
> regards,
> ~hitesh

Attach WinDbg and run !analyze -v when the driver crash. Publish the
output here.

Igor Sharovar
hitesh
2010-08-27 11:37:41 UTC
Permalink
On Aug 26, 10:02 pm, eagersh <***@gmail.com> wrote:
> On Aug 25, 8:51 pm, hitesh <***@gmail.com> wrote:
>
>
>
>
>
> > On Aug 23, 11:05 pm, eagersh <***@gmail.com> wrote:
>
> > > On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
>
> > > > On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
> > > > > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > > > > hi all,
> > > > > > i am wrintin a storport miniport driver.
> > > > > > it successfully loads and works fine. but if try to stop it from
> > > > > > device manager (right click on device in device manager and click on
> > > > > > disable ) it hangs.
> > > > > > i am getting control in adaptor control for stop adaptor and query
> > > > > > request.
> > > > > > can anybody tell me what i need to take care to successfully stop the
> > > > > > device?
> > > > > > thanks,
> > > > > > Hitesh
>
> > > > > What kind request did you get first in your AdapterControl routine?
> > > > > You should first get ScsiQuerySupportedControlTypes and specify
> > > > > supported types. After that you should get  ScsiStopAdapter.
> > > > > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > > > > \StorportMiniports.
>
> > > > > Igor Sharovar
>
> > > > hi igor,
> > > > thanks for the reply,
> > > > but here situation is different,
> > > > first i am getting the request for stopadaptor and then query ?
> > > > is it normal or something i am missing,
> > > > ~hitesh
>
> > > You should get first ScsiQuerySupportedControlTypes and latter
> > > ScsiStopAdapter.
> > > I don't really understand how you could get ScsiStopAdapter first
> > > because ScsiQuerySupportedControlTypes defines supported types.
>
> > > Igor Sharovar- Hide quoted text -
>
> > > - Show quoted text -
>
> > hi,
> > i am getting request in QueryAdaptor and then stop adaptor.
> > it works fine when i sleep or hibernate or shutdown/ restart the
> > system.
> > but if i try to unload the driver from device manager then it creates
> > problem, system hangs.
> > is there anything like i should handle call in startIo routine which
> > is related to unloading the driver?
> > regards,
> > ~hitesh
>
> Attach WinDbg and run !analyze -v when the driver crash. Publish the
> output here.
>
> Igor Sharovar- Hide quoted text -
>
> - Show quoted text -

hi igor,
my driver doesnt crash but it hangs,
and when i tried to check with "!locks" command, it is somewhere in
kernel,
~hitesh
eagersh
2010-08-27 15:38:38 UTC
Permalink
On Aug 27, 5:37 am, hitesh <***@gmail.com> wrote:
> On Aug 26, 10:02 pm, eagersh <***@gmail.com> wrote:
>
>
>
> > On Aug 25, 8:51 pm, hitesh <***@gmail.com> wrote:
>
> > > On Aug 23, 11:05 pm, eagersh <***@gmail.com> wrote:
>
> > > > On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
>
> > > > > On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
> > > > > > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > > > > > hi all,
> > > > > > > i am wrintin a storport miniport driver.
> > > > > > > it successfully loads and works fine. but if try to stop it from
> > > > > > > device manager (right click on device in device manager and click on
> > > > > > > disable ) it hangs.
> > > > > > > i am getting control in adaptor control for stop adaptor and query
> > > > > > > request.
> > > > > > > can anybody tell me what i need to take care to successfully stop the
> > > > > > > device?
> > > > > > > thanks,
> > > > > > > Hitesh
>
> > > > > > What kind request did you get first in your AdapterControl routine?
> > > > > > You should first get ScsiQuerySupportedControlTypes and specify
> > > > > > supported types. After that you should get  ScsiStopAdapter.
> > > > > > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > > > > > \StorportMiniports.
>
> > > > > > Igor Sharovar
>
> > > > > hi igor,
> > > > > thanks for the reply,
> > > > > but here situation is different,
> > > > > first i am getting the request for stopadaptor and then query ?
> > > > > is it normal or something i am missing,
> > > > > ~hitesh
>
> > > > You should get first ScsiQuerySupportedControlTypes and latter
> > > > ScsiStopAdapter.
> > > > I don't really understand how you could get ScsiStopAdapter first
> > > > because ScsiQuerySupportedControlTypes defines supported types.
>
> > > > Igor Sharovar- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > hi,
> > > i am getting request in QueryAdaptor and then stop adaptor.
> > > it works fine when i sleep or hibernate or shutdown/ restart the
> > > system.
> > > but if i try to unload the driver from device manager then it creates
> > > problem, system hangs.
> > > is there anything like i should handle call in startIo routine which
> > > is related to unloading the driver?
> > > regards,
> > > ~hitesh
>
> > Attach WinDbg and run !analyze -v when the driver crash. Publish the
> > output here.
>
> > Igor Sharovar- Hide quoted text -
>
> > - Show quoted text -
>
> hi igor,
> my driver doesnt crash but it hangs,
> and when i tried to check with "!locks" command, it is somewhere in
> kernel,
> ~hitesh

What was the last call from your driver? Put debug messages in all
dispatch functions and see which was the last before the hang.
In general, you don't need to do something special in StopAdapter.
Igor Sharovar
eagersh
2010-08-27 16:17:39 UTC
Permalink
On Aug 27, 9:38 am, eagersh <***@gmail.com> wrote:
> On Aug 27, 5:37 am, hitesh <***@gmail.com> wrote:
>
>
>
> > On Aug 26, 10:02 pm, eagersh <***@gmail.com> wrote:
>
> > > On Aug 25, 8:51 pm, hitesh <***@gmail.com> wrote:
>
> > > > On Aug 23, 11:05 pm, eagersh <***@gmail.com> wrote:
>
> > > > > On Aug 23, 12:31 am, hitesh <***@gmail.com> wrote:
>
> > > > > > On Aug 20, 9:30 pm, eagersh <***@gmail.com> wrote:
>
> > > > > > > On Aug 19, 2:26 am, hitesh <***@gmail.com> wrote:
>
> > > > > > > > hi all,
> > > > > > > > i am wrintin a storport miniport driver.
> > > > > > > > it successfully loads and works fine. but if try to stop it from
> > > > > > > > device manager (right click on device in device manager and click on
> > > > > > > > disable ) it hangs.
> > > > > > > > i am getting control in adaptor control for stop adaptor and query
> > > > > > > > request.
> > > > > > > > can anybody tell me what i need to take care to successfully stop the
> > > > > > > > device?
> > > > > > > > thanks,
> > > > > > > > Hitesh
>
> > > > > > > What kind request did you get first in your AdapterControl routine?
> > > > > > > You should first get ScsiQuerySupportedControlTypes and specify
> > > > > > > supported types. After that you should get  ScsiStopAdapter.
> > > > > > > Look at miniport StorPort sample at \WinDDK\7600.16385.1\src\storage
> > > > > > > \StorportMiniports.
>
> > > > > > > Igor Sharovar
>
> > > > > > hi igor,
> > > > > > thanks for the reply,
> > > > > > but here situation is different,
> > > > > > first i am getting the request for stopadaptor and then query ?
> > > > > > is it normal or something i am missing,
> > > > > > ~hitesh
>
> > > > > You should get first ScsiQuerySupportedControlTypes and latter
> > > > > ScsiStopAdapter.
> > > > > I don't really understand how you could get ScsiStopAdapter first
> > > > > because ScsiQuerySupportedControlTypes defines supported types.
>
> > > > > Igor Sharovar- Hide quoted text -
>
> > > > > - Show quoted text -
>
> > > > hi,
> > > > i am getting request in QueryAdaptor and then stop adaptor.
> > > > it works fine when i sleep or hibernate or shutdown/ restart the
> > > > system.
> > > > but if i try to unload the driver from device manager then it creates
> > > > problem, system hangs.
> > > > is there anything like i should handle call in startIo routine which
> > > > is related to unloading the driver?
> > > > regards,
> > > > ~hitesh
>
> > > Attach WinDbg and run !analyze -v when the driver crash. Publish the
> > > output here.
>
> > > Igor Sharovar- Hide quoted text -
>
> > > - Show quoted text -
>
> > hi igor,
> > my driver doesnt crash but it hangs,
> > and when i tried to check with "!locks" command, it is somewhere in
> > kernel,
> > ~hitesh
>
> What was the last call from your driver? Put debug messages in all
> dispatch functions and see which was the last before the hang.
> In general, you don't need to do something special in StopAdapter.
> Igor Sharovar

Hitesh,
To additional to my previous advise you could run
!running which will show all currently running threads
and !stack 2 which shows full stack of running threads. There is good
post in OSR now which called "System lockup" and Scott Noone gave some
advises on similar to your situation. I would also suggest to install
check build version of partition manager, disk.sys and
scsiport(storport.sys whichever you use) and enable debug messages
from Windows kernel components by running ed !kd_WIN2000_Mask 0xffff.
You may see the last calls of storage stack components started from
partmng and finished your driver.

Igor Sharovar
Loading...