Commit 1d491e3e authored by Claes Sjofors's avatar Claes Sjofors

PSS9000 stall for ao card in remote rack added

parent f4ee98c5
......@@ -39,10 +39,18 @@ pwr_tUInt16 bfbeth_get_data(io_sRackLocal *r, pwr_tUInt16 address, int *sts) {
return 0;
}
/*
Return status from last write request.
Status is
0 if address not found in request.
1 if ok status.
-1 if error status.
*/
void bfbeth_get_write_status(io_sRackLocal *r, pwr_tUInt16 address, int *sts) {
int i;
*sts = 1;
*sts = 0;
for (i=0; i<350; i++) {
if ( (0x8000 | r->write_area.item[i].address) == address) {
*sts = 0x8000 & r->write_area.item[i].address ? 1 : -1;
......
......@@ -275,7 +275,7 @@ static pwr_tStatus IoCardWrite (
}
else {
/* Ethernet I/O, Request a write to current address */
sts = 1;
sts = 0;
if ( !local->FirstScan)
bfbeth_get_write_status(r_local, (pwr_tUInt16) (local->Address + 2*i), &sts);
......@@ -301,7 +301,7 @@ static pwr_tStatus IoCardWrite (
}
if (sts == -1) continue;
}
else {
else if ( sts == 1) {
op->ErrorCount = 0;
}
}
......@@ -349,6 +349,8 @@ static pwr_tStatus IoCardWrite (
}
if ( local->WriteFirst)
local->WriteFirst--;
if ( local->FirstScan)
local->FirstScan = 0;
return 1;
}
......
......@@ -231,7 +231,7 @@ static pwr_tStatus IoCardWrite (
}
else {
/* Ethernet I/O, Request a write to current address */
sts = 1;
sts = 0;
if ( !local->FirstScan)
bfbeth_get_write_status(r_local, (pwr_tUInt16) local->Address[i], &sts);
......@@ -257,7 +257,7 @@ static pwr_tStatus IoCardWrite (
}
if (sts == -1) continue;
}
else {
else if ( sts == 1) {
op->ErrorCount = 0;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment