global variables for scsi miniport for win 9x

Hi all,

We’ve written a scsi miniport driver for winNT to for
a virtual cdrom drive which is working fine. So, we
had to use some file operatiosn in the low level and
for that we used ‘ntddk.h’ . Now I’m facing problem in
porting it for Win9x because of those fileIO calls . I
want to replace those for Win9x. Can I get some tips
or tricks from anyone…

som


Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi, Som

Can you help me how to write SCSI miniport driver. As i am very new to this
filed.I read a lot about driver stuff , but still not able to write a device
driver.

TIA.

Binay

Hi all,

We’ve written a scsi miniport driver for winNT to for

a virtual cdrom drive which is working fine. So, we

had to use some file operatiosn in the low level and

for that we used ‘ntddk.h’ . Now I’m facing problem in

porting it for Win9x because of those fileIO calls . I

want to replace those for Win9x. Can I get some tips

or tricks from anyone…

som


Do You Yahoo!?

Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger

http://im.yahoo.com


You are currently subscribed to ntdev as: binay_mishra@g1.com

To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Have you tested your virtual driver under an SMP computer? You better do
this before christening your driver as done and working OK.

Jamey
xxxxx@storagecraft.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Raj Somsubhra
Sent: Thursday, August 30, 2001 7:27 AM
To: NT Developers Interest List
Subject: [ntdev] global variables for scsi miniport for win 9x

Hi all,

We’ve written a scsi miniport driver for winNT to for
a virtual cdrom drive which is working fine. So, we
had to use some file operatiosn in the low level and
for that we used ‘ntddk.h’ . Now I’m facing problem in
porting it for Win9x because of those fileIO calls . I
want to replace those for Win9x. Can I get some tips
or tricks from anyone…

som


Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger http://im.yahoo.com


You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Raj,

Well… I think it was you who received wrappers (I mean the
IFSMgr_Ring0_FileIO code that was wrappend in Zw* calls) for use with
network drives and it was you who received IOS wrappers for IFSMgr replacer
for use with local drives. Do you have any problems with this code?

Regards,
Anton Kolomyeytsev

CoolDev.Com - Toolkits for Network & Storage Kernel Software Developers
“KoolSockets” & “KoolStorage” - TDI Client, Kernel Sockets, iSCSI port
www.CoolDev.Com xxxxx@CoolDev.Com xxxxx@CoolDev.Com

We’ve written a scsi miniport driver for winNT to for
a virtual cdrom drive which is working fine. So, we
had to use some file operatiosn in the low level and
for that we used ‘ntddk.h’ . Now I’m facing problem in
porting it for Win9x because of those fileIO calls . I
want to replace those for Win9x. Can I get some tips
or tricks from anyone…


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Can anyone plese tell me whether using global variable
for a scsi miniport will cause any problem. and if so
how can we use use some data which required globally.


Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It really depends on what you are doing with that global data. The general
answer is that Microsoft would prefer that you didn’t use global data,
however there is nothing actually illegal (from a DDK API perspective, the
DDK police will not arrest you,) about doing so. By default global data is
nonpaged-pool and is at least theoretically safe to access from any IRQL.

The only reason I can see for actual global data is that you need to share
state across multiple, otherwise independent, adapters. This is a rather
unusual case, but I certainly have seen legitimate reasons for doing this.
There are major problems.

There are locking issues that are difficult to work around in SCSIPORT. Even
though each of your host adapters is single threaded, multiple host adapters
are not. (Even on a uniprocessor your ISR could be interrupted by a higher
priority ISR, and that higher priority ISR could be one of your host
adapters.) So, for multiple host adapters with global data, this is a
problem. Standard NT locking primitives aren’t available to miniport
drivers, and indeed won’t work if you cheat and use them anyway. On legacy
systems (NT4) you might be able to force all of your adapters to your
highest priority interrupt level and the same interrupt spinlock, but that
would be difficult with PnP hardware on w2k or xp, and more or less defeats
the purpose of multiple host adapters on an SMP platform.

-----Original Message-----
From: Raj Somsubhra [mailto:xxxxx@yahoo.com]
Sent: Friday, August 31, 2001 9:30 AM
To: NT Developers Interest List
Subject: [ntdev] global variables for scsi miniport for win 9x

Can anyone plese tell me whether using global variable
for a scsi miniport will cause any problem. and if so
how can we use use some data which required globally.


Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> -----Original Message-----

From: Raj Somsubhra [mailto:xxxxx@yahoo.com]
Sent: Friday, August 31, 2001 6:30 AM

Can anyone plese tell me whether using global variable
for a scsi miniport will cause any problem. and if so
how can we use use some data which required globally.

it’s not cool. The following snips are from the Win2k DDK:

Kernel-Mode Drivers: Windows 2000 DDK
2.1.3.1 Use the HwContext Pointer to HwScsiFindAdapter Correctly



(Using a global variable to store the HBA count is a bad practice, because
miniport drivers should not use global variables to maintain state
information.)



Try:

Kernel-Mode Drivers: Windows 2000 DDK
DEVICE_OBJECT



PVOID DeviceExtension
Points to the device extension. The structure and contents of the device
extension are driver-defined. The size is driver-determined, specified in
the driver’s call to IoCreateDevice. Most driver routines that process IRPs
are given a pointer to the device object so the device extension is usually
every driver’s primary global storage area and frequently a driver’s only
global storage area for objects, resources, and any state the driver
maintains about the I/O requests it handles.



Hope this helps,

–Christine


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You must have a way to serialize access to it using spinlocks.

----- Original Message -----
From: “Raj Somsubhra”
To: “NT Developers Interest List”
Sent: Friday, August 31, 2001 5:29 PM
Subject: [ntdev] global variables for scsi miniport for win 9x

> Can anyone plese tell me whether using global variable
> for a scsi miniport will cause any problem. and if so
> how can we use use some data which required globally.
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com