Skip to content

Commit cb89b1f

Browse files
Malcolm Priestleygregkh
authored andcommitted
staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
commit 90be652c9f157d44b9c2803f902a8839796c090d upstream. EPROM_CMD is 2 byte aligned on PCI map so calling with rtl92e_readl will return invalid data so use rtl92e_readw. The device is unable to select the right eeprom type. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 427907e commit cb89b1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ void rtl92e_get_eeprom_size(struct net_device *dev)
627627
struct r8192_priv *priv = rtllib_priv(dev);
628628

629629
RT_TRACE(COMP_INIT, "===========>%s()\n", __func__);
630-
curCR = rtl92e_readl(dev, EPROM_CMD);
630+
curCR = rtl92e_readw(dev, EPROM_CMD);
631631
RT_TRACE(COMP_INIT, "read from Reg Cmd9346CR(%x):%x\n", EPROM_CMD,
632632
curCR);
633633
priv->epromtype = (curCR & EPROM_CMD_9356SEL) ? EEPROM_93C56 :

0 commit comments

Comments
 (0)