提交 513b6bee 编写于 作者: B Ben Dooks 提交者: Jeff Garzik

DM9000: Update retry count whilst identifying chip

Reading the ID register does not always return the correct ID
from the device, so we retry several times to see if we get
a correct value.

These failures seem to be excaserbated by the speed of the
access to the chip (possibly time between issuing the address
and then the data cycle).
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 f42d8aea
...@@ -643,7 +643,7 @@ dm9000_probe(struct platform_device *pdev) ...@@ -643,7 +643,7 @@ dm9000_probe(struct platform_device *pdev)
dm9000_reset(db); dm9000_reset(db);
/* try two times, DM9000 sometimes gets the first read wrong */ /* try two times, DM9000 sometimes gets the first read wrong */
for (i = 0; i < 2; i++) { for (i = 0; i < 8; i++) {
id_val = ior(db, DM9000_VIDL); id_val = ior(db, DM9000_VIDL);
id_val |= (u32)ior(db, DM9000_VIDH) << 8; id_val |= (u32)ior(db, DM9000_VIDH) << 8;
id_val |= (u32)ior(db, DM9000_PIDL) << 16; id_val |= (u32)ior(db, DM9000_PIDL) << 16;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册