[SRU,Eoan/raspi2,0/1] IO errors when writing large amounts of data to USB storage in eoan on RPI2/3 (armhf kernel)
mbox series

Message ID 20191120141856.4890-1-hui.wang@canonical.com
Headers show
Series
  • IO errors when writing large amounts of data to USB storage in eoan on RPI2/3 (armhf kernel)
Related show

Message

Hui Wang Nov. 20, 2019, 2:18 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1852510

The upstream already looked at the patch and agreed with the change
(https://github.com/raspberrypi/linux/issues/3332), and I already
sent the pullrequest but looks like the maintainer is on vacation,
we need to wait for a long period of time.
(https://github.com/raspberrypi/linux/pull/3341)

But this bug is very critical, it is a block for generating our
image, so I send this patch to SRU before it is merged by upstream.


[Impact]
On the RPI2/3 boards with eoan armhf kernel, if we copy large size
files to usb stick, the usb host driver dwc_otg will fail and print
lots of IO errors in the dmesg.

[Fix]
To support rpi4, we enabled the LPAE/HIGHMEM/VMSPLIT_3G in the armhf
kernel, the dwc_otg has some problem with highmem enabled. If the
urb's buffer is in the highmem region, the enqueue function will return
the -EINVALID unconditionally, as a result, it can't handle the urb
which contains the highmem buffer. But the driver itself can handle the
highmem buffer, we just need to do a little change.

[Test Case]
With the patch applied, I tested armhf and arm64 kernel on rpi2/3/4,
all worked well, no regression and the usb driver works well.

[Regression Risk]
Low, the upstream already looked at my patch and agreed with my
change, and I tested the patch on rpi2/3/4 with armhf and arm64
kernels, all worked well.

Hui Wang (1):
  UBUNTU: SAUCE: dwc_otg: checking the urb->transfer_buffer too early
    (#3332)

 drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Khaled Elmously Nov. 21, 2019, 7:33 p.m. UTC | #1
On 2019-11-20 22:18:55 , Hui Wang wrote:
> BugLink: https://bugs.launchpad.net/bugs/1852510
> 
> The upstream already looked at the patch and agreed with the change
> (https://github.com/raspberrypi/linux/issues/3332), and I already
> sent the pullrequest but looks like the maintainer is on vacation,
> we need to wait for a long period of time.
> (https://github.com/raspberrypi/linux/pull/3341)
> 
> But this bug is very critical, it is a block for generating our
> image, so I send this patch to SRU before it is merged by upstream.
> 
> 
> [Impact]
> On the RPI2/3 boards with eoan armhf kernel, if we copy large size
> files to usb stick, the usb host driver dwc_otg will fail and print
> lots of IO errors in the dmesg.
> 
> [Fix]
> To support rpi4, we enabled the LPAE/HIGHMEM/VMSPLIT_3G in the armhf
> kernel, the dwc_otg has some problem with highmem enabled. If the
> urb's buffer is in the highmem region, the enqueue function will return
> the -EINVALID unconditionally, as a result, it can't handle the urb
> which contains the highmem buffer. But the driver itself can handle the
> highmem buffer, we just need to do a little change.
> 
> [Test Case]
> With the patch applied, I tested armhf and arm64 kernel on rpi2/3/4,
> all worked well, no regression and the usb driver works well.
> 
> [Regression Risk]
> Low, the upstream already looked at my patch and agreed with my
> change, and I tested the patch on rpi2/3/4 with armhf and arm64
> kernels, all worked well.
> 
> Hui Wang (1):
>   UBUNTU: SAUCE: dwc_otg: checking the urb->transfer_buffer too early
>     (#3332)
> 
>  drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team