Commit bfa6b7bb authored by Al Viro's avatar Al Viro

[PATCH] uses of ->Copy() in rioroute are bogus

... there we are building a command in normal memory; it will be
copied to iomem (by ->Copy()) later.  Use memcpy()...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c7c0d0a1
...@@ -307,7 +307,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -307,7 +307,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
if (!RIOBootOk(p, HostP, RtaUniq)) { if (!RIOBootOk(p, HostP, RtaUniq)) {
rio_dprintk(RIO_DEBUG_ROUTE, "RTA %x tried to get an ID, but does not belong - FOAD it!\n", RtaUniq); rio_dprintk(RIO_DEBUG_ROUTE, "RTA %x tried to get an ID, but does not belong - FOAD it!\n", RtaUniq);
PktReplyP->Command = ROUTE_FOAD; PktReplyP->Command = ROUTE_FOAD;
HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); memcpy(PktReplyP->CommandText, "RT_FOAD", 7);
RIOQueueCmdBlk(HostP, Rup, CmdBlkP); RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
return 1; return 1;
} }
...@@ -341,7 +341,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -341,7 +341,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
HostP->Mapping[ThisUnit].Flags |= MSG_DONE; HostP->Mapping[ThisUnit].Flags |= MSG_DONE;
} }
PktReplyP->Command = ROUTE_FOAD; PktReplyP->Command = ROUTE_FOAD;
HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); memcpy(PktReplyP->CommandText, "RT_FOAD", 7);
RIOQueueCmdBlk(HostP, Rup, CmdBlkP); RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
return 1; return 1;
} }
...@@ -367,7 +367,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -367,7 +367,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
PktReplyP->IDNum2 = ROUTE_NO_ID; PktReplyP->IDNum2 = ROUTE_NO_ID;
rio_dprintk(RIO_DEBUG_ROUTE, "RTA '%s' has been allocated ID %d\n", HostP->Mapping[ThisUnit].Name, PktReplyP->IDNum); rio_dprintk(RIO_DEBUG_ROUTE, "RTA '%s' has been allocated ID %d\n", HostP->Mapping[ThisUnit].Name, PktReplyP->IDNum);
} }
HostP->Copy("RT_ALLOCAT", PktReplyP->CommandText, 10); memcpy(PktReplyP->CommandText, "RT_ALLOCAT", 10);
RIOQueueCmdBlk(HostP, Rup, CmdBlkP); RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
...@@ -469,7 +469,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -469,7 +469,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
} }
PktReplyP->Command = ROUTE_FOAD; PktReplyP->Command = ROUTE_FOAD;
HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7); memcpy(PktReplyP->CommandText, "RT_FOAD", 7);
} else { } else {
/* /*
** we did boot it (as an extra), and there may now be a table ** we did boot it (as an extra), and there may now be a table
...@@ -489,7 +489,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -489,7 +489,7 @@ int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
} }
} }
PktReplyP->Command = ROUTE_USED; PktReplyP->Command = ROUTE_USED;
HostP->Copy("RT_USED", PktReplyP->CommandText, 7); memcpy(PktReplyP->CommandText, "RT_USED", 7);
} }
RIOQueueCmdBlk(HostP, Rup, CmdBlkP); RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
return 1; return 1;
......
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