BufferAccessScsiPortControlled Flag Information

ID: Q116450


The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.1, 3.5, 3.51
  • Microsoft Win32 Device Driver Kit (DDK) 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 query words: 3.10 3.50 4.00

Keywords :
Version :
Platform :
Issue type :


Last Reviewed: March 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.