OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15965d8
)
mt76: eeprom: tolerate corrected bit-flips
author
Daniel Golle
<daniel@makrotopia.org>
Thu, 25 Nov 2021 19:45:03 +0000
(19:45 +0000)
committer
Felix Fietkau
<nbd@nbd.name>
Sun, 19 Dec 2021 14:24:01 +0000
(15:24 +0100)
mtd_read() returns -EUCLEAN in case of corrected bit-flips.
As data was read, don't error out in this case.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/eeprom.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mediatek/mt76/eeprom.c
b/drivers/net/wireless/mediatek/mt76/eeprom.c
index
2d58aa3
..
a499861
100644
(file)
--- a/
drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/
drivers/net/wireless/mediatek/mt76/eeprom.c
@@
-65,6
+65,8
@@
int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
offset = be32_to_cpup(list);
ret = mtd_read(mtd, offset, len, &retlen, eep);
put_mtd_device(mtd);
+ if (mtd_is_bitflip(ret))
+ ret = 0;
if (ret) {
dev_err(dev->dev, "reading EEPROM from mtd %s failed: %i\n",
part, ret);