Contents

UserReportHBAConstraints

Reports the I/O constraints for this controller.

Declaration

virtual kern_return_t UserReportHBAConstraints(OSDictionary *constraints);

Parameters

  • constraints:

    A dictionary containing I/O constraint keys, and Boolean values indicating that the device supports the constraint. See the discussion for valid and required keys.

Return Value

A value that indicates the result of reporting the HBA constraints. kIOReturnSuccess indicates success. For error definitions, see IOKit Constants.

Discussion

The valid keys for the constraints dictionary are as follows:

Key name

Required?

Kiomaximumsegmentcountreadkey

Yes

Kiomaximumsegmentcountwritekey

Yes

Kiomaximumsegmentbytecountreadkey

Yes

Kiomaximumsegmentbytecountwritekey

Yes

Kiominimumsegmentalignmentbytecountkey

Yes

Kiomaximumsegmentaddressablebitcountkey

Yes

kIOMinimumHBADataAlignmentMaskKey

Yes

kIOHierarchicalLogicalUnitSupportKey

No

Make sure your dext reports these constraints accurately — particularly all mandatory keys — during initialization. This helps prevent intermittent failures, such as controller firmware buffer overflows.

Subclasses must call this method from the dext before UserInitializeController returns.

If the controller has global transfer limits, set the properties kIOMaximumByteCountReadKey and kIOMaximumByteCountWriteKey on the dext, using the SetProperties method inherited from IOService. The UserReportHBAConstraints method doesn’t currently support these properties.

See Also

Managing host bus adapters