OSDN Git Service

r8152: fix a WOL issue
authorHayes Wang <hayeswang@realtek.com>
Mon, 18 Jul 2022 08:21:20 +0000 (16:21 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 Jul 2022 00:10:56 +0000 (17:10 -0700)
commitcdf0b86b250fd3c1c3e120c86583ea510c52e4ce
treefa8fa803056df37125b747c31a7d30d744838a89
parentb3fcfc4f0c50a716487fd7ebd0e6b64a2db29d76
r8152: fix a WOL issue

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>
drivers/net/usb/r8152.c