diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-02 17:06:54 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-02 17:06:54 +0000 |
commit | 668c60d01a56c0909251dd9da964d5c269f04c74 (patch) | |
tree | 8161c53b5ab03d5324fdac56cc209d3c1fc2f880 /sys/dev/pci | |
parent | 7b283478d26ca2bdff4c194e233d2c1908d55297 (diff) |
Fix for the Intel WiFi Link 1000.
The EEPROM image is in the OTPROM block before the last block, not in
the last block itself. Intel WiFi Link 1000 parts should work now.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_iwn.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index 106ebb62c85..366cc6ae511 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.83 2010/01/28 16:59:30 damien Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.84 2010/02/02 17:06:53 damien Exp $ */ /*- * Copyright (c) 2007-2009 Damien Bergamini <damien.bergamini@free.fr> @@ -884,8 +884,7 @@ iwn_eeprom_unlock(struct iwn_softc *sc) int iwn_init_otprom(struct iwn_softc *sc) { - uint32_t base; - uint16_t next; + uint16_t prev, base, next; int count, error; /* Wait for clock stabilization before accessing prph. */ @@ -910,8 +909,8 @@ iwn_init_otprom(struct iwn_softc *sc) IWN_OTP_GP_ECC_CORR_STTS | IWN_OTP_GP_ECC_UNCORR_STTS); /* - * Find last valid OTP block (contains the EEPROM image) for HW - * without OTP shadow RAM. + * Find the block before last block (contains the EEPROM image) + * for HW without OTP shadow RAM. */ if (sc->hw_type == IWN_HW_REV_TYPE_1000) { /* Switch to absolute addressing mode. */ @@ -923,12 +922,13 @@ iwn_init_otprom(struct iwn_softc *sc) return error; if (next == 0) /* End of linked-list. */ break; + prev = base; base = letoh16(next); } - if (base == 0 || count == IWN1000_OTP_NBLOCKS) + if (count == 0 || count == IWN1000_OTP_NBLOCKS) return EIO; /* Skip "next" word. */ - sc->prom_base = base + 1; + sc->prom_base = prev + 1; } return 0; } |