From: Mark Cariddi [Cariddi@osr.com] Sent: Tuesday, July 03, 2001 8:15 AM To: NT Developers Interest List Subject: [ntdev] Re: Virtual disk with a bus enumerator (SRB_FUNCTION_ CLAIM_DEVICE) ? There is more going on here than you realize. Once a new disk (with a new disk signature) is installed on a W2K system, the Disk Manager will attempt to remove it, meaning that your bus driver will receive IRP_MN_QUERY_REMOVE and IRP_MN_REMOVE PnP Irps. This is so that the storage device stack can be rebuilt properly. Therefore, when your PDO receives the IRP_MN_REMOVE, you must not deleted your PDO. Just clear the claimed flag and reset your PNP device state to NotStarted. Eventually your PDO will receive another IRP_MN_START_DEVICE. -----Original Message----- From: anton_kolomyeytsev@hotmail.com [mailto:anton_kolomyeytsev@hotmail.com] Sent: Tuesday, July 03, 2001 3:55 AM To: NT Developers Interest List Subject: [ntdev] Re: Virtual disk with a bus enumerator (SRB_FUNCTION_CLAIM_DEVICE) ? Hi, You have to implement a couple of IOCTLs in your code as well. At least IOCTL_STORAGE_QUERY_PROPERTY. See the source of the disk class driver in DDK for this. Other IOCTLs are optional (as IOCTL_SCSI_GET_ADDRESS, IOCTL_DISK_GET_DRIVE_GEOMETRY etc). Regards, Anton Kolomyeytsev On 07/02/01, ""Zoltan Csizmadia" " wrote: > This is a multi-part message in MIME format. > > ------=_NextPart_000_0001_01C101A7.210C3960 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > I have a bus enumerator based on the Toaster sample. > I return =93DETECTED\FakeDisk=94 for deviceID, and =93GenDisk=94 for > CompatibleId. It works fine. The Pnp manager finds my fake disk drive > add to the device list, and send me an=20 > SRB_FUNCTION_CLAIM_DEVICE message (IRP_MJ_SCSI). I just return a > STATUS_SUCCESS status, and then the Pnp manager says I have to reboot > the system. That means I don=92t get more SRB_FUNCTIONs. I checked the > disk class driver source code in the DDK, and seems it doesn=92t need = > more > response for CLAIM_DEVICE, just the status. > =20 > How can I avoid the reboot? > =20 > As I remember Anton Kolomyeytsev asked similar question a few days ago, > but I couldn=92t find the answers.=20 > =20 > Regards, > =20 > Zoltan > =20 > Ps:=20 > =20 > Anton, > =20 > Maybe you can help me with this problem. > > > --- > You are currently subscribed to ntdev as: cariddi@osr.com > To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > > ------=_NextPart_000_0001_01C101A7.210C3960 > Content-Type: text/html; > charset="iso-8859-1" > Content-Transfer-Encoding: quoted-printable > > xmlns:w=3D"urn:schemas-microsoft-com:office:word" = > xmlns=3D"http://www.w3.org/TR/REC-html40"> > > > charset=3Diso-8859-1"> > > > > > > > > > > > > style=3D'tab-interval:.5in'> > >
> >

style=3D'font-size:10.0pt; font-family:Arial'>I class=3DGramE>have=A0 > a bus enumerator based on the Toaster = > sample.

> >

style=3D'font-size:10.0pt; font-family:Arial'>I return > “DETECTED\FakeDisk” for class=3DGramE>deviceID, and “GenDisk” for = > CompatibleId. It works fine.

> >

style=3D'font-size:10.0pt; font-family:Arial'>The Pnp manager finds my > fake disk drive add to the = device > list, and send me an

> >

style=3D'font-size:10.0pt; > font-family:Arial'>SRB_FUNCTION_CLAIM_DEVICE message (IRP_MJ_SCSI). I > = just return a STATUS_SUCCESS status, and then the Pnp manager says I > have to = reboot > the system. That means I don’t get more SRB_FUNCTIONs. I checked = > the disk > class driver source code in the DDK, and class=3DGramE>seems it > doesn’t need more response for CLAIM_DEVICE, just the = > status.

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; font-family:Arial'>How can I avoid the = > reboot?

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; font-family:Arial'>As I remember Anton > Kolomyeytsev asked similar question style=3D'mso-spacerun:yes'>=A0 = a few days > ago, but I couldn’t find the answers. = >

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Regards,

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Zoltan

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Ps:

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; > font-family:Arial'>Anton,

> >

style=3D'font-size:10.0pt; > font-family:Arial'> 

> >

style=3D'font-size:10.0pt; font-family:Arial'>Maybe you can help me > with this = problem.

> >
> > > ---
> You are currently subscribed to ntdev as: cariddi@osr.com
To > unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > ---
You are currently subscribed to ntdev as: cariddi@osr.com
To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com ---
You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com
To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com > > > > > ------=_NextPart_000_0001_01C101A7.210C3960-- > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com