mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 17:40:53 +07:00
rt2x00: Fix efuse EEPROM reading on PPC32.
Fix __le32 to __le16 conversion of the first word of an 8-word block of EEPROM read via the efuse method. Reported-and-tested-by: Ingvar Hagelund <ingvar@redpill-linpro.com> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> CC: <stable@vger.kernel.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
23085d5796
commit
68fa64ef60
@ -3771,7 +3771,7 @@ static void rt2800_efuse_read(struct rt2x00_dev *rt2x00dev, unsigned int i)
|
||||
/* Apparently the data is read from end to start */
|
||||
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA3, ®);
|
||||
/* The returned value is in CPU order, but eeprom is le */
|
||||
rt2x00dev->eeprom[i] = cpu_to_le32(reg);
|
||||
*(u32 *)&rt2x00dev->eeprom[i] = cpu_to_le32(reg);
|
||||
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA2, ®);
|
||||
*(u32 *)&rt2x00dev->eeprom[i + 2] = cpu_to_le32(reg);
|
||||
rt2800_register_read_lock(rt2x00dev, EFUSE_DATA1, ®);
|
||||
|
Loading…
Reference in New Issue
Block a user