[PATCH u-boot 1/4] eth/r8152: reset bmu after disabling Tx/Rx

Marek Vasut marex at denx.de
Tue Jun 9 16:20:43 CEST 2020


On 6/9/20 10:53 AM, Hayes Wang wrote:
> Reset bmu after disabling Tx/Rx. This is used to clear the FIFO of
> Tx/Rx. The remained data may be transferred after Tx/Rx is re-enabled.
> And it results in garbage data.
> 
> Signed-off-by: Hayes Wang <hayeswang at realtek.com>
> ---
>  drivers/usb/eth/r8152.c | 14 ++++++++++++++
>  drivers/usb/eth/r8152.h |  7 ++++++-
>  2 files changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
> index f201a1789b..dbb1721882 100644
> --- a/drivers/usb/eth/r8152.c
> +++ b/drivers/usb/eth/r8152.c
> @@ -568,6 +568,17 @@ static void r8153_power_cut_en(struct r8152 *tp, bool enable)
>  	ocp_write_word(tp, MCU_TYPE_USB, USB_MISC_0, ocp_data);
>  }
>  
> +static void rtl_reset_bmu(struct r8152 *tp)
> +{
> +	u32 ocp_data;

You're writing a byte, shouldn't that be u8 ?


More information about the U-Boot mailing list