I developed Storage Miniport driver for windows storport model.

I am setting PORT_CONFIGURATION_INFORMATION for Storport Structure's member
AlignmentMask = 7.

(From DDK: Under Windows NT and Windows 2000 the valid mask values are 0
(byte aligned), 1 (word aligned), 3 (DWORD aligned) and 7 (double DWORD
aligned). The miniport driver should set this mask if the HBA supports
scatter/gather. The same considerations apply to the AlignmentMask member of

After setting this value, During Disk Discovery Windows 2003 R2 SP2 system
sends SCSi packets for Scsi Read_capacity and then Scsi Read/Write.....At
Disk discovery time only; Windows OS sends Data's Physical address for DMA
operations in Scatter Gather List allgined to 4 bytes or sometimes 2 bytes
This supposed to alligned to my Miniport driver specified allignmentMask 7
(Data Physical Addresss supplied in Scatter Gather List, must have last LSB
4 bits set to 1000 for 7 byte alignementMask) !

This was working fine with Windows 2003 (with or without Service Pack 1) and
windows 2003 R2 Service Pack 1.

Looks like something changed in windows 2003 R2 Service Pack 2 which is not
honoring this Alignment settings. Any clues ?

Does anyone knows why Alignment mask is not getting honor in SP2 ?
Your prompt response will be appreciated.

Followings are snapshot of my miniport driver where i specify this
AlignmentMask values along with other values :

In DriverEntry of my miniport driver i set
hwInitializationData.HwFindAdapter = HW_FindAdapter;
HW_FindAdapter( IN PADAPTER Adapter,
IN PVOID HwContext,
IN PVOID BusInformation,
IN PCHAR ArgumentString,
ConfigInfo->MaximumTransferLength = 262144; // Also tried 16384 ...same
ConfigInfo->NumberOfPhysicalBreaks = 64; // Also tried 4 ...same result
ConfigInfo->MaximumNumberOfTargets = VHBA_MAXIMUM_TARGETS; // currently its
ConfigInfo->NumberOfBuses = VHBA_NUMBER_OF_BUSSES; // 1
ConfigInfo->ScatterGather = TRUE;
ConfigInfo->CachesData = FALSE;
ConfigInfo->Master = TRUE;
ConfigInfo->ResetTargetSupported = TRUE; // XXX
ConfigInfo->Dma32BitAddresses = FALSE;
ConfigInfo->Dma64BitAddresses = TRUE;
ConfigInfo->AdapterInterfaceType = PCIBus;
ConfigInfo->NeedPhysicalAddresses = TRUE;
ConfigInfo->TaggedQueuing = TRUE;
ConfigInfo->AlignmentMask = 7; // Valid values for Win NT/2000 is 0,1,3,7.
means (1,2,4,8 bytes alligned)
ConfigInfo->WmiDataProvider = TRUE;
ConfigInfo->MapBuffers = STOR_MAP_NON_READ_WRITE_BUFFERS; // I also tried
STOR_MAP_NO_BUFFERS, same result..
ConfigInfo->SynchronizationModel = StorSynchronizeFullDuplex;
ConfigInfo->MaximumNumberOfLogicalUnits = MAX_FIBRE_LUNS;
ConfigInfo->ResetTargetSupported = Adapter->installMsg.enableTargetReset;
return SP_RETURN_FOUND; // success