BufferAccessScsiPortControlled Flag Information

Last reviewed: September 18, 1995
Article ID: Q116450
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows NT, versions 3.1, 3.5, and 3.51
  • Microsoft Win32 DDK for Windows 95

SUMMARY

Both Windows NT and Windows 95 use SCSI miniport drivers, though there are implementation differences. Using Windows 95 SCSI miniport drivers, the SCSI port driver can emulate scatter-gather in some cases. A large performance benefit can be gained if a miniport driver is written cleanly and notifies the port driver that it can emulate scatter-gather.

The PORT_CONFIGURATION_INFORMATION structure, defined in the header SRB.H, contains configuration information used to initialize the adapter. This structure contains a Boolean field BufferAccessScsiPortControlled which is used to indicate to the port driver that the miniport driver will not directly touch its data buffers. See "MORE INFORMATION" for details.

Using BufferAccessScsiPortControlled will currently effect behavior in Windows 95. The current SCSI port driver implementation in Windows NT does not look at this flag, so there is no current performance increase, but designing a miniport to work well under Windows 95 will not hurt performance under Windows NT.

MORE INFORMATION

The main reason for the Boolean BufferAccessScsiPortControlled is to give the SCSI port driver the ability to determine if a SCSI miniport driver does not include any coding behavior such as

   DataBufferPointer = x

and instead use the ScsiPort{Read,Write}XxxBuffer functions with the data buffer pointer. When the Boolean is set, depending on the operating system and SCSI port driver implementation, the the DataBuffer field in the miniport may not necessarily actually point to the data buffer.

If a miniport always uses the set of ScsiPort{Read,Write}Xxx() functions for I/O to ports and registers (using the character and buffer versions of these functions for for uchar, ushort, ulong data transfers), a miniport driver should set BufferAccessScsiPortControlled to TRUE. This will greatly speed up I/O performance, allowing the SCSI port driver to manage its scatter-gather support much more efficiently.

If a miniport directly touches the memory buffers from an SRB (for example, it sets values in this buffer using some form of "buffer = value" instead of using the ScsiPort{Read,Write}Xxx functions), then the driver should set BufferAccessScsiPortControlled to FALSE (the default value). As a result, the performance of this miniport will be much slower whenever the port driver emulates scatter-gather.


Additional reference words: 3.10 3.50 4.00
KBCategory: kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 18, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.