Ref: ScsiPortGetPhysicalAddress

Hi,

How can we verify that the address returned by
ScsiPortGetPhysicalAddress is a valid address range?
Can we calculate the physical memory size in the
miniport drivers?
Any pointer to this well appreciated.

TIA/


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs

> How can we verify that the address returned by

ScsiPortGetPhysicalAddress is a valid address range?

You can blindly rely on this.

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

I would like to believe this. But since the format of
my logical drives always fail (format always fail for
the first time whenver I reboot the system) but
subsequent format succeeds.
I debugged the commands coming from OS. All the
commands are passing with success except mode_sense
(which I am returning as invalid request). So I am
forced to think if there is a bad address in the SGL.
So there is no way to check if the address returned by
ScsiPortGetPhysicalAddress exceeds memory size (and
how to get the information about the memory size in
miniport).

TIA…

— “Maxim S. Shatskih”
wrote:

> > How can we verify that the address returned by
> > ScsiPortGetPhysicalAddress is a valid address
> range?
>
> You can blindly rely on this.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Why do you feel you need to do this?

-p

How can we verify that the address returned by
ScsiPortGetPhysicalAddress is a valid address range?
Can we calculate the physical memory size in the
miniport drivers?
Any pointer to this well appreciated.

TIA/


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Did you consider that failing the mode sense is what’s causing the
format to fail?

Mode Sense is a required SCSI command - perhaps you should think about
supporting it if you want to claim you’re emulating a scsi device.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gurpreet Anand
Sent: Monday, August 08, 2005 9:51 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Ref: ScsiPortGetPhysicalAddress

I would like to believe this. But since the format of
my logical drives always fail (format always fail for
the first time whenver I reboot the system) but
subsequent format succeeds.
I debugged the commands coming from OS. All the
commands are passing with success except mode_sense
(which I am returning as invalid request). So I am
forced to think if there is a bad address in the SGL.
So there is no way to check if the address returned by
ScsiPortGetPhysicalAddress exceeds memory size (and
how to get the information about the memory size in
miniport).

TIA…

— “Maxim S. Shatskih”
wrote:

> > How can we verify that the address returned by
> > ScsiPortGetPhysicalAddress is a valid address
> range?
>
> You can blindly rely on this.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

ScsiPortGetPhysicalAddress is fairly well tested code. I’m sure you have
convinced yourself that this is the only possible explanation for why
things have gone wrong, however as you have left out any actual evidence
that would lead the rest of us to conclude that it is
ScsiPortGetPhysicalAddress rather than your new and untested driver that
is buggy, you will have to allow for a fair amount of skepticism from
the peanut gallery.

New code is crappy code. The bugs are almost certainly in your driver
and not in ScsiPortGetPhysicalAddress. You might however have more
success here if you provided us with a bit more information about what
you are doing and what exactly is going wrong.

In the meanwhile - have you tried running with driver verifier enabled?
Have you tried running against the checked build? Google around and you
can find out how to enable scsiport debug printing in the checked build
(I’d tell you except I really can’t remember.)

Debug print the address/length returned by calls to
ScsiPortGetPhysicalAddress. Are you checking for a 0 address and/or
length?

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gurpreet Anand
Sent: Monday, August 08, 2005 12:51 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Ref: ScsiPortGetPhysicalAddress

I would like to believe this. But since the format of
my logical drives always fail (format always fail for
the first time whenver I reboot the system) but
subsequent format succeeds.
I debugged the commands coming from OS. All the
commands are passing with success except mode_sense
(which I am returning as invalid request). So I am
forced to think if there is a bad address in the SGL.
So there is no way to check if the address returned by
ScsiPortGetPhysicalAddress exceeds memory size (and
how to get the information about the memory size in
miniport).

TIA…

— “Maxim S. Shatskih”
wrote:

> > How can we verify that the address returned by
> > ScsiPortGetPhysicalAddress is a valid address
> range?
>
> You can blindly rely on this.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@yahoo.com
> To unsubscribe send a blank email to
> xxxxx@lists.osr.com
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


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

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> > > How can we verify that the address returned by

> > ScsiPortGetPhysicalAddress is a valid address
> range?

I would think if your hardware tries to DMA to it, and you get a master
abort, it wasn’t. Hardware frequently can interrupt (if enabled) and set
some status bits when a master abort happens.

  • Jan