SCSI: TEST_UNIT_READY & GET_EVENT

Hi all:

I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
finish GET_EVENT command and it works fine when I test it with some
software.

But, it seems that usually Windows just uses TEST_UNIT_READY to check the
media status. Sometimes, after reboots or on another computer, Windows uses
GET_EVENT instead.

Could anybody tell me why? Thanks.

Regards,
ZG [@ Sydney]
Windows Driver Developer

The source code for CDROM.SYS is part of the DDK (Storage samples -
class drivers), so you should have a very easy time investigating this.
Also, why are you making another virtual drive? There are a number of
free/low-cost versions out there.

TUR is used when the device has been determined to not support
GET_EVENT_STATUS_NOTIFICATION (GESN) command. Also, CDROM.SYS requires
at least a subset of the commands to be supported. Furthermore,
CDROM.SYS detects common errors and can decide that a drive is not
reliable, and thus transition one-way back to use of TUR.

There was a whitepaper I wrote about how to avoid common firmware
mistakes with this command which I highly recommend, since you’re
essentially writing firmware. It was posted at:
http://www.microsoft.com/hwdev/tech/storage/GESN_Imp.asp.
Unfortunately, the powers that be have moved it around. It was posted
around May, 2002. Sorry I don’t have a direct link (and I don’t have a
copy – I looked).

So, at a minimum, look at the DDK sources
(%DDK_DIR%\src\storage\class\classpnp\autorun.c, etc.), focus on the
GESN functions:

ClasspInitializeGesn() – used to detect initial support
ClasspInterpretGesnData() – detects incorrect firmware support, works
around some

Hth,
.

-----Original Message-----
From: ZG [mailto:xxxxx@ybwork.com]
Sent: Thursday, December 08, 2005 5:33 AM
Subject: SCSI: TEST_UNIT_READY & GET_EVENT

Hi all:

I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
finish GET_EVENT command and it works fine when I test it with some
software.

But, it seems that usually Windows just uses TEST_UNIT_READY to check
the
media status. Sometimes, after reboots or on another computer, Windows
uses
GET_EVENT instead.

Could anybody tell me why? Thanks.

Regards,
ZG [@ Sydney]
Windows Driver Developer

Thanks for your information.

Regards,
ZG [@ Sydney]
Windows Driver Developer

“Henry Gabryjelski” wrote in message
news:xxxxx@ntdev…
The source code for CDROM.SYS is part of the DDK (Storage samples -
class drivers), so you should have a very easy time investigating this.
Also, why are you making another virtual drive? There are a number of
free/low-cost versions out there.

TUR is used when the device has been determined to not support
GET_EVENT_STATUS_NOTIFICATION (GESN) command. Also, CDROM.SYS requires
at least a subset of the commands to be supported. Furthermore,
CDROM.SYS detects common errors and can decide that a drive is not
reliable, and thus transition one-way back to use of TUR.

There was a whitepaper I wrote about how to avoid common firmware
mistakes with this command which I highly recommend, since you’re
essentially writing firmware. It was posted at:
http://www.microsoft.com/hwdev/tech/storage/GESN_Imp.asp.
Unfortunately, the powers that be have moved it around. It was posted
around May, 2002. Sorry I don’t have a direct link (and I don’t have a
copy – I looked).

So, at a minimum, look at the DDK sources
(%DDK_DIR%\src\storage\class\classpnp\autorun.c, etc.), focus on the
GESN functions:

ClasspInitializeGesn() – used to detect initial support
ClasspInterpretGesnData() – detects incorrect firmware support, works
around some

Hth,
.

-----Original Message-----
From: ZG [mailto:xxxxx@ybwork.com]
Sent: Thursday, December 08, 2005 5:33 AM
Subject: SCSI: TEST_UNIT_READY & GET_EVENT

Hi all:

I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
finish GET_EVENT command and it works fine when I test it with some
software.

But, it seems that usually Windows just uses TEST_UNIT_READY to check
the
media status. Sometimes, after reboots or on another computer, Windows
uses
GET_EVENT instead.

Could anybody tell me why? Thanks.



Regards,
ZG [@ Sydney]
Windows Driver Developer

The CdRom/ClassPnP source is in the DDK, so, just look into it.

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

----- Original Message -----
From: “ZG”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Thursday, December 08, 2005 4:33 PM
Subject: [ntdev] SCSI: TEST_UNIT_READY & GET_EVENT

> Hi all:
>
> I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
> finish GET_EVENT command and it works fine when I test it with some
> software.
>
> But, it seems that usually Windows just uses TEST_UNIT_READY to check the
> media status. Sometimes, after reboots or on another computer, Windows uses
> GET_EVENT instead.
>
> Could anybody tell me why? Thanks.
>
> –
>
> Regards,
> ZG [@ Sydney]
> Windows Driver Developer
>
>
>
>
> —
> 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

Yes. We’ve solved it by analyzing ClasspInitializeGesn. Thanks all.

Regards,
ZG [@ Sydney]
Windows Driver Developer

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntdev…
> The CdRom/ClassPnP source is in the DDK, so, just look into it.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “ZG”
> Newsgroups: ntdev
> To: “Windows System Software Devs Interest List”
> Sent: Thursday, December 08, 2005 4:33 PM
> Subject: [ntdev] SCSI: TEST_UNIT_READY & GET_EVENT
>
>
>> Hi all:
>>
>> I’m working on a SCSI miniport driver which simulates a DVD/CD drive. I
>> finish GET_EVENT command and it works fine when I test it with some
>> software.
>>
>> But, it seems that usually Windows just uses TEST_UNIT_READY to check the
>> media status. Sometimes, after reboots or on another computer, Windows
>> uses
>> GET_EVENT instead.
>>
>> Could anybody tell me why? Thanks.
>>
>> –
>>
>> Regards,
>> ZG [@ Sydney]
>> Windows Driver Developer
>>
>>
>>
>>
>> —
>> 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
>
>
>