DRV_MIIM_Scan Function
C
DRV_MIIM_OPERATION_HANDLE DRV_MIIM_Scan(DRV_HANDLE handle, unsigned int rIx, unsigned int
phyAdd, DRV_MIIM_OPERATION_FLAGS opFlags, DRV_MIIM_RESULT* pOpResult);
Returns
A not NULL DRV_MIIM_OPERATION_HANDLE if the operation was successfully scheduled. NULL if the operation failed. More details in pOpResult.
Description
This function initiates a SMI/MIIM scan transaction for a given MIIM register.
Remarks
If operation was scheduled successfully, the result will be DRV_MIIM_RES_OK. Otherwise an error code will be returned. When a new scan result is available:
If the operation is to be discarded (DRV_MIIM_OPERATION_FLAG_DISCARD is set) there will be no notification to the client.
If the operation is not to be discarded, then:
if the client has registered an operation notification callback (DRV_MIIM_RegisterCallback) then the notification callback will be called.
if there is no notification callback the MIIM driver will wait for the client to poll and read the operation result using DRV_MIIM_OperationResult(). Only then the operation will be released.
A scheduled scan operation will remain active in the background and will be available for returning the scan results. When polling is used, DRV_MIIM_OperationResult()will return the latest scan result. The operation associated resources will be released and scan stopped only when DRV_MIIM_OperationAbort() is called. While scan is active all other transactions (including from other clients) will be inhibited! Use carefully!
Preconditions
The DRV_MIIM_Initialize routine must have been called.
DRV_MIIM_Open must have been called to obtain a valid opened device handle.