diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-02-06 21:57:07 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-02-06 21:57:07 +0000 |
commit | f80065534e8235776dc051498b81e1c76fec263a (patch) | |
tree | cd92ef05cad3e36bbae95d38645fab62cf19cc3c /sys/dev/ic | |
parent | 48e9b26f84bbddcf37b28ed040041c444fe41171 (diff) |
Wait 10ms for the completion of the EEPROM recall process, allowing a
couple of specific adapters (such as mine) to be correctly initiated.
Discussed with and okay jsg@.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/rtw.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index e7ad270cb7f..2c523563768 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.13 2005/02/06 10:35:54 jsg Exp $ */ +/* $OpenBSD: rtw.c,v 1.14 2005/02/06 21:57:06 pedro Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- * Copyright (c) 2004, 2005 David Young. All rights reserved. @@ -537,19 +537,21 @@ rtw_recall_eeprom(struct rtw_regs *regs, const char *dvname) RTW_WBR(regs, RTW_9346CR, RTW_9346CR); - /* wait 2.5ms for completion */ - for (i = 0; i < 25; i++) { + /* wait 10ms for completion */ + for (i = 0; i < 50; i++) { ecr = RTW_READ8(regs, RTW_9346CR); if ((ecr & RTW_9346CR_EEM_MASK) == RTW_9346CR_EEM_NORMAL) { RTW_DPRINTF(RTW_DEBUG_RESET, - ("%s: recall EEPROM in %dus\n", dvname, i * 100)); - return 0; + ("%s: recall EEPROM in %dus\n", dvname, i * 200)); + return (0); } RTW_RBR(regs, RTW_9346CR, RTW_9346CR); - DELAY(100); + DELAY(200); } - printf("%s: recall EEPROM failed\n", dvname); - return ETIMEDOUT; + + printf("%s: could not recall EEPROM in %dus\n", dvname, i * 200); + + return (ETIMEDOUT); } int |