Skip to contentSkip to conversation

fix rtl8150

PATCH New Al Viro 1 participant 1 message Feb 4, 2007 USB

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 fix rtl8150

That code doesn't do what its author apparently thought
it would do...

---

drivers/usb/net/rtl8150.c +2 -1
index e0eecda..670262a 100644
@@ -284,7 +284,8 @@ static int write_mii_word(rtl8150_t * dev, u8 phy, __u8 indx, u16 reg)
 	u8 data[3], tmp;
 
 	data[0] = phy;
-	*(data + 1) = cpu_to_le16p(&reg);
+	data[1] = reg & 0xff;
+	data[2] = (reg >> 8) & 0xff;
 	tmp = indx | PHY_WRITE | PHY_GO;
 	i = 0;