I believe the calculation for the HwMaxXferLen in the InitializeTransferPackets() function is off by 1 page size. Please see Windows-driver-samples/storage/class/classpnp/src/xferpkt.c line 70-73:
hwMaxPages = adapterDesc->MaximumPhysicalPages ? adapterDesc->MaximumPhysicalPages-1 : 0;
fdoData->HwMaxXferLen = MIN(adapterDesc->MaximumTransferLength, hwMaxPages << PAGE_SHIFT);
fdoData->HwMaxXferLen = MAX(fdoData->HwMaxXferLen, PAGE_SIZE);
I believe the calculation for the HwMaxXferLen in the InitializeTransferPackets() function is off by 1 page size. Please see Windows-driver-samples/storage/class/classpnp/src/xferpkt.c line 70-73:
hwMaxPages = adapterDesc->MaximumPhysicalPages ? adapterDesc->MaximumPhysicalPages-1 : 0;
fdoData->HwMaxXferLen = MIN(adapterDesc->MaximumTransferLength, hwMaxPages << PAGE_SHIFT);
fdoData->HwMaxXferLen = MAX(fdoData->HwMaxXferLen, PAGE_SIZE);