Commit e445a944 authored by Jeff Garzik's avatar Jeff Garzik

[tokenring olympic] use memset_io to fix certain platforms

Prefer a single memset_io() to buggy writel/writew/writeb loops.

Bug found and fixed by IBM.
parent 76781ca6
...@@ -468,14 +468,7 @@ static int olympic_open(struct net_device *dev) ...@@ -468,14 +468,7 @@ static int olympic_open(struct net_device *dev)
printk("Before the open command \n"); printk("Before the open command \n");
#endif #endif
do { do {
int i; memset_io(init_srb,0,SRB_COMMAND_SIZE);
for(i=0;i<SRB_COMMAND_SIZE;i+=4)
writel(0,init_srb+i);
if(SRB_COMMAND_SIZE & 2)
writew(0,init_srb+(SRB_COMMAND_SIZE & ~3));
if(SRB_COMMAND_SIZE & 1)
writeb(0,init_srb+(SRB_COMMAND_SIZE & ~1));
writeb(SRB_OPEN_ADAPTER,init_srb) ; /* open */ writeb(SRB_OPEN_ADAPTER,init_srb) ; /* open */
writeb(OLYMPIC_CLEAR_RET_CODE,init_srb+2); writeb(OLYMPIC_CLEAR_RET_CODE,init_srb+2);
......
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