git: 03d4b58feee3 - main - iwn: adjust EEPROM read timeout for Intel 4965AGN M2

Mark Johnston markj at FreeBSD.org
Sun Jun 6 20:45:15 UTC 2021


The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=03d4b58feee396d392668f192ecdde08ecc8036c

commit 03d4b58feee396d392668f192ecdde08ecc8036c
Author:     Radosław Chmielarz <radoslaw.chmielarz at emersi.eu>
AuthorDate: 2021-06-06 20:42:10 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-06-06 20:44:47 +0000

    iwn: adjust EEPROM read timeout for Intel 4965AGN M2
    
    Reading EEPROM from Intel 4965AGN M2 takes 60 us which was causing panic
    on system startup.
    
    PR:             255465
    Reviewed by:    markj
    MFC after:      1 week
---
 sys/dev/iwn/if_iwn.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index b07b52cbea7c..4191fb340a03 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1688,13 +1688,13 @@ iwn_read_prom_data(struct iwn_softc *sc, uint32_t addr, void *data, int count)
 	addr += sc->prom_base;
 	for (; count > 0; count -= 2, addr++) {
 		IWN_WRITE(sc, IWN_EEPROM, addr << 2);
-		for (ntries = 0; ntries < 10; ntries++) {
+		for (ntries = 0; ntries < 20; ntries++) {
 			val = IWN_READ(sc, IWN_EEPROM);
 			if (val & IWN_EEPROM_READ_VALID)
 				break;
 			DELAY(5);
 		}
-		if (ntries == 10) {
+		if (ntries == 20) {
 			device_printf(sc->sc_dev,
 			    "timeout reading ROM at 0x%x\n", addr);
 			return ETIMEDOUT;


More information about the dev-commits-src-all mailing list