Reset Device Function

This API can only be called in user-space.

The device can be reset using this API call. This will schedule a reset of the device. The device can also be reset using the adf_ctl utility, e.g., by calling adf_ctl qat_dev0 reset.

PF/VF Applicability

Reset APIs operate on enumerated devices in the caller context. In mixed PF/VF environments:

  • The accelId parameter refers to the device enumeration index (from cpaGetNumDevices / cpaGetDeviceInfo), not a physical PCIe function ID.

  • A reset on an enumerated device affects only that device (PF or VF); other coexisting functions are unaffected.

  • Device reset operations are scoped to the caller context. Applications cannot reset devices belonging to other physical or virtual functions.

icp_sal_reset_device

Resets the device.

Syntax

CpaStatus icp_sal_reset_device(Cpa32U accelId);

Parameters

accelId

The device number.

Return Value

The icp_sal_reset_device function returns one of the following codes:

CPA_STATUS_SUCCESS

Successful operation.

CPA_STATUS_FAIL

Indicates a failure.