Lines 989-996
Link Here
|
989 |
{ |
989 |
{ |
990 |
MPI2_DEFAULT_REPLY *reply; |
990 |
MPI2_DEFAULT_REPLY *reply; |
991 |
MPI2_IOC_FACTS_REQUEST request; |
991 |
MPI2_IOC_FACTS_REQUEST request; |
992 |
int error, req_sz, reply_sz; |
992 |
int error, req_sz, reply_sz, retry = 0; |
993 |
|
993 |
|
994 |
MPS_FUNCTRACE(sc); |
994 |
MPS_FUNCTRACE(sc); |
995 |
|
995 |
|
996 |
req_sz = sizeof(MPI2_IOC_FACTS_REQUEST); |
996 |
req_sz = sizeof(MPI2_IOC_FACTS_REQUEST); |
Lines 999-1006
Link Here
|
999 |
|
999 |
|
1000 |
bzero(&request, req_sz); |
1000 |
bzero(&request, req_sz); |
1001 |
request.Function = MPI2_FUNCTION_IOC_FACTS; |
1001 |
request.Function = MPI2_FUNCTION_IOC_FACTS; |
1002 |
error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); |
1002 |
while(retry < 5){ |
1003 |
|
1003 |
error = mps_request_sync(sc, &request, reply, req_sz, reply_sz, 5); |
|
|
1004 |
if(!error) |
1005 |
break; |
1006 |
mps_dprint(sc, MPS_FAULT, "mps_request_sync failed retry %d\n",retry); |
1007 |
DELAY(1000); |
1008 |
retry++; |
1009 |
} |
1004 |
return (error); |
1010 |
return (error); |
1005 |
} |
1011 |
} |
1006 |
|
1012 |
|
Lines 1009-1015
Link Here
|
1009 |
{ |
1015 |
{ |
1010 |
MPI2_IOC_INIT_REQUEST init; |
1016 |
MPI2_IOC_INIT_REQUEST init; |
1011 |
MPI2_DEFAULT_REPLY reply; |
1017 |
MPI2_DEFAULT_REPLY reply; |
1012 |
int req_sz, reply_sz, error; |
1018 |
int req_sz, reply_sz, error, retry = 0; |
1013 |
struct timeval now; |
1019 |
struct timeval now; |
1014 |
uint64_t time_in_msec; |
1020 |
uint64_t time_in_msec; |
1015 |
|
1021 |
|
Lines 1044-1054
Link Here
|
1044 |
time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); |
1050 |
time_in_msec = (now.tv_sec * 1000 + now.tv_usec/1000); |
1045 |
init.TimeStamp.High = htole32((time_in_msec >> 32) & 0xFFFFFFFF); |
1051 |
init.TimeStamp.High = htole32((time_in_msec >> 32) & 0xFFFFFFFF); |
1046 |
init.TimeStamp.Low = htole32(time_in_msec & 0xFFFFFFFF); |
1052 |
init.TimeStamp.Low = htole32(time_in_msec & 0xFFFFFFFF); |
|
|
1053 |
while(retry < 5){ |
1054 |
error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); |
1055 |
if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) |
1056 |
error = ENXIO; |
1057 |
if(!error) |
1058 |
break; |
1059 |
mps_dprint(sc, MPS_FAULT, "mps_request_sync failed retry %d\n",retry); |
1060 |
DELAY(1000); |
1061 |
retry++; |
1062 |
} |
1047 |
|
1063 |
|
1048 |
error = mps_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); |
|
|
1049 |
if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) |
1050 |
error = ENXIO; |
1051 |
|
1052 |
mps_dprint(sc, MPS_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); |
1064 |
mps_dprint(sc, MPS_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); |
1053 |
return (error); |
1065 |
return (error); |
1054 |
} |
1066 |
} |