r8152: fix a WOL issue
authorHayes Wang <hayeswang@realtek.com>
Mon, 18 Jul 2022 08:21:20 +0000 (16:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:09 +0000 (17:25 +0200)
commit6bf450d92d0c5673ea5a7934083758c579a7fef0
treec6e39737b995d3cdd0ab998e91cd8098847ff194
parent44addae95ed747f270fa74c7e90036854203e37b
r8152: fix a WOL issue

commit cdf0b86b250fd3c1c3e120c86583ea510c52e4ce upstream.

This fixes that the platform is waked by an unexpected packet. The
size and range of FIFO is different when the device enters S3 state,
so it is necessary to correct some settings when suspending.

Regardless of jumbo frame, set RMS to 1522 and MTPS to MTPS_DEFAULT.
Besides, enable MCU_BORW_EN to update the method of calculating the
pointer of data. Then, the hardware could get the correct data.

Fixes: 195aae321c82 ("r8152: support new chips")
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Link: https://lore.kernel.org/r/20220718082120.10957-391-nic_swsd@realtek.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/r8152.c