Skip to content

Commit a54cdee

Browse files
khfengdavem330
authored andcommitted
r8152: Set macpassthru in reset_resume callback
r8152 may fail to establish network connection after resume from system suspend. If the USB port connects to r8152 lost its power during system suspend, the MAC address was written before is lost. The reason is that The MAC address doesn't get written again in its reset_resume callback. So let's set MAC address again in reset_resume callback. Also remove unnecessary lock as no other locking attempt will happen during reset_resume. Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6b51737 commit a54cdee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/usb/r8152.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4799,10 +4799,9 @@ static int rtl8152_reset_resume(struct usb_interface *intf)
47994799
struct r8152 *tp = usb_get_intfdata(intf);
48004800

48014801
clear_bit(SELECTIVE_SUSPEND, &tp->flags);
4802-
mutex_lock(&tp->control);
48034802
tp->rtl_ops.init(tp);
48044803
queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0);
4805-
mutex_unlock(&tp->control);
4804+
set_ethernet_addr(tp);
48064805
return rtl8152_resume(intf);
48074806
}
48084807

0 commit comments

Comments
 (0)