[U-Boot] [PATCH 1/1] dwc2 USB controller hangs with lan78xx

Peter Robinson pbrobinson at gmail.com
Fri Jun 22 06:37:42 UTC 2018


>>> This bug is the combination of dwc2 USB controller and lan78xx
>>> USB ethernet controller, which is the combination in use on
>>> the Raspberry Pi Model 3 B+.
>>>
>>> When the host attempts to receive a packet, but a packet has not
>>> arrived, the lan78xx controller responds by setting BIR
>>> (Bulk-In Empty Response) to NAK. Unfortunately, this hangs
>>> the USB controller and requires the USB controller to
>>> be reset.
>>>
>>> The fix proposed is to have the lan78xx controller respond
>>> by setting BIR to ZLP.
>>>
>>> Signed-off-by: Andrew Thomas <andrew.thomas at oracle.com>
>>
>> Tested-by: Peter Robinson <pbrobinson at gmail.com>
>>
>> Tested on the RPi 3B+ and certainly improves this situation a number
>> of Fedora users have seen.
>
>
> Thanks for testing!
>
> One odd, and inexplicable, issue I have encountered is that
> some VGA monitors will cause the dwc2/lan78xx combination to fail.
>
> I have a DVI based monitor, which causes the failure.
> Whereas an HDMI monitor works fine. I hesitate to
> guess why this is.

I have neither a DVI or VGA monitor, my guess with the later some
issue with the converter, from the little experience I've had they all
seem to be terrible. It's also likely to be a different problem to
this.

> For the monitor which causes problems, I am using a config
> file with:
>
> hdmi_ignore_edid=0xa5000080
> hdmi_group=2
> hdmi_mode=85
>
> With this config, I see no issues with the troublesome monitor.
>
> It's just bizzarre :-)
>
>
>>
>>> ---
>>>   drivers/usb/eth/lan78xx.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
>>> index c5ff379..e8ee665 100644
>>> --- a/drivers/usb/eth/lan78xx.c
>>> +++ b/drivers/usb/eth/lan78xx.c
>>> @@ -296,7 +296,7 @@ static int lan78xx_basic_reset(struct usb_device
>>> *udev,
>>>          ret = lan7x_read_reg(udev, LAN78XX_USB_CFG0, &val);
>>>          if (ret)
>>>                  return ret;
>>> -       val |= LAN78XX_USB_CFG0_BIR;
>>> +       val &= ~LAN78XX_USB_CFG0_BIR;
>>>          return lan7x_write_reg(udev, LAN78XX_USB_CFG0, val);
>>>   }
>>>
>>> --
>>> 1.8.3.1
>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> https://lists.denx.de/listinfo/u-boot
>
>


More information about the U-Boot mailing list