Skip to content

Maximum transfer length (HwMaxXferLen) calculation is off by 1 page size #6

@tchaudev

Description

@tchaudev

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);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions